From 5ea3d620dca5ab4992ddb834d866e5672322fd61 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Fri, 22 Aug 2014 13:10:48 +0200 Subject: [PATCH 01/46] =?UTF-8?q?Java8=20ANTLR-Parser=20angegf=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- antlr/Java8.g4 | 1028 +++++ antlr/Java8.tokens | 201 + antlr/Java8BaseListener.java | 1251 ++++++ antlr/Java8Lexer.java | 515 +++ antlr/Java8Lexer.tokens | 201 + antlr/Java8Listener.java | 1020 +++++ antlr/Java8Parser.java | 7695 ++++++++++++++++++++++++++++++++++ antlr/makefile | 4 + 8 files changed, 11915 insertions(+) create mode 100644 antlr/Java8.g4 create mode 100644 antlr/Java8.tokens create mode 100644 antlr/Java8BaseListener.java create mode 100644 antlr/Java8Lexer.java create mode 100644 antlr/Java8Lexer.tokens create mode 100644 antlr/Java8Listener.java create mode 100644 antlr/Java8Parser.java create mode 100644 antlr/makefile diff --git a/antlr/Java8.g4 b/antlr/Java8.g4 new file mode 100644 index 000000000..6810eb44b --- /dev/null +++ b/antlr/Java8.g4 @@ -0,0 +1,1028 @@ +/* + [The "BSD licence"] + Copyright (c) 2014 Terence Parr, Sam Harwell + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/** A Java 8 grammar for ANTLR v4 derived from ANTLR v3 Java grammar. + * Follows syntax from spec: + * http://docs.oracle.com/javase/specs/jls/se8/html/jls-19.html + * Uses ANTLR v4's left-recursive expression notation. + * + * You can test with + * + * $ antlr4 Java.g4 + * $ javac *.java + * $ grun Java compilationUnit *.java + * + * Or, +~/antlr/code/grammars-v4/java8 $ j Test . +/Users/parrt/antlr/code/grammars-v4/java8/./Java8BaseListener.java +/Users/parrt/antlr/code/grammars-v4/java8/./Java8Lexer.java +/Users/parrt/antlr/code/grammars-v4/java8/./Java8Listener.java +/Users/parrt/antlr/code/grammars-v4/java8/./Java8Parser.java +/Users/parrt/antlr/code/grammars-v4/java8/./Test.java +Total lexer+parser time 384ms. + */ +grammar Java8; + +// starting point for parsing a java file +compilationUnit + : packageDeclaration? importDeclaration* typeDeclaration* EOF + ; + +packageDeclaration + : annotation* 'package' qualifiedName ';' + ; + +importDeclaration + : 'import' 'static'? qualifiedName ('.' '*')? ';' + ; + +typeDeclaration + : classOrInterfaceModifier* classDeclaration + | classOrInterfaceModifier* enumDeclaration + | classOrInterfaceModifier* interfaceDeclaration + | classOrInterfaceModifier* annotationTypeDeclaration + | ';' + ; + +modifier + : classOrInterfaceModifier + | ( 'native' + | 'synchronized' + | 'transient' + | 'volatile' + ) + ; + +classOrInterfaceModifier + : annotation // class or interface + | ( 'public' // class or interface + | 'protected' // class or interface + | 'private' // class or interface + | 'static' // class or interface + | 'abstract' // class or interface + | 'final' // class only -- does not apply to interfaces + | 'strictfp' // class or interface + ) + ; + +variableModifier + : 'final' + | annotation + ; + +classDeclaration + : 'class' Identifier typeParameters? + ('extends' type)? + ('implements' typeList)? + classBody + ; + +typeParameters + : '<' typeParameter (',' typeParameter)* '>' + ; + +typeParameter + : Identifier ('extends' typeBound)? + ; + +typeBound + : type ('&' type)* + ; + +enumDeclaration + : ENUM Identifier ('implements' typeList)? + '{' enumConstants? ','? enumBodyDeclarations? '}' + ; + +enumConstants + : enumConstant (',' enumConstant)* + ; + +enumConstant + : annotation* Identifier arguments? classBody? + ; + +enumBodyDeclarations + : ';' classBodyDeclaration* + ; + +interfaceDeclaration + : 'interface' Identifier typeParameters? ('extends' typeList)? interfaceBody + ; + +typeList + : type (',' type)* + ; + +classBody + : '{' classBodyDeclaration* '}' + ; + +interfaceBody + : '{' interfaceBodyDeclaration* '}' + ; + +classBodyDeclaration + : ';' + | 'static'? block + | modifier* memberDeclaration + ; + +memberDeclaration + : methodDeclaration + | genericMethodDeclaration + | fieldDeclaration + | constructorDeclaration + | genericConstructorDeclaration + | interfaceDeclaration + | annotationTypeDeclaration + | classDeclaration + | enumDeclaration + ; + +/* We use rule this even for void methods which cannot have [] after parameters. + This simplifies grammar and we can consider void to be a type, which + renders the [] matching as a context-sensitive issue or a semantic check + for invalid return type after parsing. + */ +methodDeclaration + : (type|'void') Identifier formalParameters ('[' ']')* + ('throws' qualifiedNameList)? + ( methodBody + | ';' + ) + ; + +genericMethodDeclaration + : typeParameters methodDeclaration + ; + +constructorDeclaration + : Identifier formalParameters ('throws' qualifiedNameList)? + constructorBody + ; + +genericConstructorDeclaration + : typeParameters constructorDeclaration + ; + +fieldDeclaration + : type variableDeclarators ';' + ; + +interfaceBodyDeclaration + : modifier* interfaceMemberDeclaration + | ';' + ; + +interfaceMemberDeclaration + : constDeclaration + | interfaceMethodDeclaration + | genericInterfaceMethodDeclaration + | interfaceDeclaration + | annotationTypeDeclaration + | classDeclaration + | enumDeclaration + ; + +constDeclaration + : type constantDeclarator (',' constantDeclarator)* ';' + ; + +constantDeclarator + : Identifier ('[' ']')* '=' variableInitializer + ; + +// see matching of [] comment in methodDeclaratorRest +interfaceMethodDeclaration + : (type|'void') Identifier formalParameters ('[' ']')* + ('throws' qualifiedNameList)? + ';' + ; + +genericInterfaceMethodDeclaration + : typeParameters interfaceMethodDeclaration + ; + +variableDeclarators + : variableDeclarator (',' variableDeclarator)* + ; + +variableDeclarator + : variableDeclaratorId ('=' variableInitializer)? + ; + +variableDeclaratorId + : Identifier ('[' ']')* + ; + +variableInitializer + : arrayInitializer + | expression + ; + +arrayInitializer + : '{' (variableInitializer (',' variableInitializer)* (',')? )? '}' + ; + +enumConstantName + : Identifier + ; + +type + : classOrInterfaceType ('[' ']')* + | primitiveType ('[' ']')* + ; + +classOrInterfaceType + : Identifier typeArguments? ('.' Identifier typeArguments? )* + ; + +primitiveType + : 'boolean' + | 'char' + | 'byte' + | 'short' + | 'int' + | 'long' + | 'float' + | 'double' + ; + +typeArguments + : '<' typeArgument (',' typeArgument)* '>' + ; + +typeArgument + : type + | '?' (('extends' | 'super') type)? + ; + +qualifiedNameList + : qualifiedName (',' qualifiedName)* + ; + +formalParameters + : '(' formalParameterList? ')' + ; + +formalParameterList + : formalParameter (',' formalParameter)* (',' lastFormalParameter)? + | lastFormalParameter + ; + +formalParameter + : variableModifier* type variableDeclaratorId + ; + +lastFormalParameter + : variableModifier* type '...' variableDeclaratorId + ; + +methodBody + : block + ; + +constructorBody + : block + ; + +qualifiedName + : Identifier ('.' Identifier)* + ; + +literal + : IntegerLiteral + | FloatingPointLiteral + | CharacterLiteral + | StringLiteral + | BooleanLiteral + | 'null' + ; + +// ANNOTATIONS + +annotation + : '@' annotationName ( '(' ( elementValuePairs | elementValue )? ')' )? + ; + +annotationName : qualifiedName ; + +elementValuePairs + : elementValuePair (',' elementValuePair)* + ; + +elementValuePair + : Identifier '=' elementValue + ; + +elementValue + : expression + | annotation + | elementValueArrayInitializer + ; + +elementValueArrayInitializer + : '{' (elementValue (',' elementValue)*)? (',')? '}' + ; + +annotationTypeDeclaration + : '@' 'interface' Identifier annotationTypeBody + ; + +annotationTypeBody + : '{' (annotationTypeElementDeclaration)* '}' + ; + +annotationTypeElementDeclaration + : modifier* annotationTypeElementRest + | ';' // this is not allowed by the grammar, but apparently allowed by the actual compiler + ; + +annotationTypeElementRest + : type annotationMethodOrConstantRest ';' + | classDeclaration ';'? + | interfaceDeclaration ';'? + | enumDeclaration ';'? + | annotationTypeDeclaration ';'? + ; + +annotationMethodOrConstantRest + : annotationMethodRest + | annotationConstantRest + ; + +annotationMethodRest + : Identifier '(' ')' defaultValue? + ; + +annotationConstantRest + : variableDeclarators + ; + +defaultValue + : 'default' elementValue + ; + +// STATEMENTS / BLOCKS + +block + : '{' blockStatement* '}' + ; + +blockStatement + : localVariableDeclarationStatement + | statement + | typeDeclaration + ; + +localVariableDeclarationStatement + : localVariableDeclaration ';' + ; + +localVariableDeclaration + : variableModifier* type variableDeclarators + ; + +statement + : block + | ASSERT expression (':' expression)? ';' + | 'if' parExpression statement ('else' statement)? + | 'for' '(' forControl ')' statement + | 'while' parExpression statement + | 'do' statement 'while' parExpression ';' + | 'try' block (catchClause+ finallyBlock? | finallyBlock) + | 'try' resourceSpecification block catchClause* finallyBlock? + | 'switch' parExpression '{' switchBlockStatementGroup* switchLabel* '}' + | 'synchronized' parExpression block + | 'return' expression? ';' + | 'throw' expression ';' + | 'break' Identifier? ';' + | 'continue' Identifier? ';' + | ';' + | statementExpression ';' + | Identifier ':' statement + ; + +catchClause + : 'catch' '(' variableModifier* catchType Identifier ')' block + ; + +catchType + : qualifiedName ('|' qualifiedName)* + ; + +finallyBlock + : 'finally' block + ; + +resourceSpecification + : '(' resources ';'? ')' + ; + +resources + : resource (';' resource)* + ; + +resource + : variableModifier* classOrInterfaceType variableDeclaratorId '=' expression + ; + +/** Matches cases then statements, both of which are mandatory. + * To handle empty cases at the end, we add switchLabel* to statement. + */ +switchBlockStatementGroup + : switchLabel+ blockStatement+ + ; + +switchLabel + : 'case' constantExpression ':' + | 'case' enumConstantName ':' + | 'default' ':' + ; + +forControl + : enhancedForControl + | forInit? ';' expression? ';' forUpdate? + ; + +forInit + : localVariableDeclaration + | expressionList + ; + +enhancedForControl + : variableModifier* type Identifier ':' expression + ; + +forUpdate + : expressionList + ; + +// EXPRESSIONS + +parExpression + : '(' expression ')' + ; + +expressionList + : expression (',' expression)* + ; + +statementExpression + : expression + ; + +constantExpression + : expression + ; + +expression + : primary + | expression '.' Identifier + | expression '.' 'this' + | expression '.' 'new' nonWildcardTypeArguments? innerCreator + | expression '.' 'super' superSuffix + | expression '.' explicitGenericInvocation + | expression '[' expression ']' + | expression '(' expressionList? ')' + | 'new' creator + | '(' type ')' expression + | expression ('++' | '--') + | ('+'|'-'|'++'|'--') expression + | ('~'|'!') expression + | expression ('*'|'/'|'%') expression + | expression ('+'|'-') expression + | expression ('<' '<' | '>' '>' '>' | '>' '>') expression + | expression ('<=' | '>=' | '>' | '<') expression + | expression 'instanceof' type + | expression ('==' | '!=') expression + | expression '&' expression + | expression '^' expression + | expression '|' expression + | expression '&&' expression + | expression '||' expression + | expression '?' expression ':' expression + | expression + ( '=' + | '+=' + | '-=' + | '*=' + | '/=' + | '&=' + | '|=' + | '^=' + | '>>=' + | '>>>=' + | '<<=' + | '%=' + ) + expression + ; + +primary + : '(' expression ')' + | 'this' + | 'super' + | literal + | Identifier + | type '.' 'class' + | 'void' '.' 'class' + | nonWildcardTypeArguments (explicitGenericInvocationSuffix | 'this' arguments) + ; + +creator + : nonWildcardTypeArguments createdName classCreatorRest + | createdName (arrayCreatorRest | classCreatorRest) + ; + +createdName + : Identifier typeArgumentsOrDiamond? ('.' Identifier typeArgumentsOrDiamond?)* + | primitiveType + ; + +innerCreator + : Identifier nonWildcardTypeArgumentsOrDiamond? classCreatorRest + ; + +arrayCreatorRest + : '[' + ( ']' ('[' ']')* arrayInitializer + | expression ']' ('[' expression ']')* ('[' ']')* + ) + ; + +classCreatorRest + : arguments classBody? + ; + +explicitGenericInvocation + : nonWildcardTypeArguments explicitGenericInvocationSuffix + ; + +nonWildcardTypeArguments + : '<' typeList '>' + ; + +typeArgumentsOrDiamond + : '<' '>' + | typeArguments + ; + +nonWildcardTypeArgumentsOrDiamond + : '<' '>' + | nonWildcardTypeArguments + ; + +superSuffix + : arguments + | '.' Identifier arguments? + ; + +explicitGenericInvocationSuffix + : 'super' superSuffix + | Identifier arguments + ; + +arguments + : '(' expressionList? ')' + ; + +// LEXER + +// §3.9 Keywords + +ABSTRACT : 'abstract'; +ASSERT : 'assert'; +BOOLEAN : 'boolean'; +BREAK : 'break'; +BYTE : 'byte'; +CASE : 'case'; +CATCH : 'catch'; +CHAR : 'char'; +CLASS : 'class'; +CONST : 'const'; +CONTINUE : 'continue'; +DEFAULT : 'default'; +DO : 'do'; +DOUBLE : 'double'; +ELSE : 'else'; +ENUM : 'enum'; +EXTENDS : 'extends'; +FINAL : 'final'; +FINALLY : 'finally'; +FLOAT : 'float'; +FOR : 'for'; +IF : 'if'; +GOTO : 'goto'; +IMPLEMENTS : 'implements'; +IMPORT : 'import'; +INSTANCEOF : 'instanceof'; +INT : 'int'; +INTERFACE : 'interface'; +LONG : 'long'; +NATIVE : 'native'; +NEW : 'new'; +PACKAGE : 'package'; +PRIVATE : 'private'; +PROTECTED : 'protected'; +PUBLIC : 'public'; +RETURN : 'return'; +SHORT : 'short'; +STATIC : 'static'; +STRICTFP : 'strictfp'; +SUPER : 'super'; +SWITCH : 'switch'; +SYNCHRONIZED : 'synchronized'; +THIS : 'this'; +THROW : 'throw'; +THROWS : 'throws'; +TRANSIENT : 'transient'; +TRY : 'try'; +VOID : 'void'; +VOLATILE : 'volatile'; +WHILE : 'while'; + +// §3.10.1 Integer Literals + +IntegerLiteral + : DecimalIntegerLiteral + | HexIntegerLiteral + | OctalIntegerLiteral + | BinaryIntegerLiteral + ; + +fragment +DecimalIntegerLiteral + : DecimalNumeral IntegerTypeSuffix? + ; + +fragment +HexIntegerLiteral + : HexNumeral IntegerTypeSuffix? + ; + +fragment +OctalIntegerLiteral + : OctalNumeral IntegerTypeSuffix? + ; + +fragment +BinaryIntegerLiteral + : BinaryNumeral IntegerTypeSuffix? + ; + +fragment +IntegerTypeSuffix + : [lL] + ; + +fragment +DecimalNumeral + : '0' + | NonZeroDigit (Digits? | Underscores Digits) + ; + +fragment +Digits + : Digit (DigitOrUnderscore* Digit)? + ; + +fragment +Digit + : '0' + | NonZeroDigit + ; + +fragment +NonZeroDigit + : [1-9] + ; + +fragment +DigitOrUnderscore + : Digit + | '_' + ; + +fragment +Underscores + : '_'+ + ; + +fragment +HexNumeral + : '0' [xX] HexDigits + ; + +fragment +HexDigits + : HexDigit (HexDigitOrUnderscore* HexDigit)? + ; + +fragment +HexDigit + : [0-9a-fA-F] + ; + +fragment +HexDigitOrUnderscore + : HexDigit + | '_' + ; + +fragment +OctalNumeral + : '0' Underscores? OctalDigits + ; + +fragment +OctalDigits + : OctalDigit (OctalDigitOrUnderscore* OctalDigit)? + ; + +fragment +OctalDigit + : [0-7] + ; + +fragment +OctalDigitOrUnderscore + : OctalDigit + | '_' + ; + +fragment +BinaryNumeral + : '0' [bB] BinaryDigits + ; + +fragment +BinaryDigits + : BinaryDigit (BinaryDigitOrUnderscore* BinaryDigit)? + ; + +fragment +BinaryDigit + : [01] + ; + +fragment +BinaryDigitOrUnderscore + : BinaryDigit + | '_' + ; + +// §3.10.2 Floating-Point Literals + +FloatingPointLiteral + : DecimalFloatingPointLiteral + | HexadecimalFloatingPointLiteral + ; + +fragment +DecimalFloatingPointLiteral + : Digits '.' Digits? ExponentPart? FloatTypeSuffix? + | '.' Digits ExponentPart? FloatTypeSuffix? + | Digits ExponentPart FloatTypeSuffix? + | Digits FloatTypeSuffix + ; + +fragment +ExponentPart + : ExponentIndicator SignedInteger + ; + +fragment +ExponentIndicator + : [eE] + ; + +fragment +SignedInteger + : Sign? Digits + ; + +fragment +Sign + : [+-] + ; + +fragment +FloatTypeSuffix + : [fFdD] + ; + +fragment +HexadecimalFloatingPointLiteral + : HexSignificand BinaryExponent FloatTypeSuffix? + ; + +fragment +HexSignificand + : HexNumeral '.'? + | '0' [xX] HexDigits? '.' HexDigits + ; + +fragment +BinaryExponent + : BinaryExponentIndicator SignedInteger + ; + +fragment +BinaryExponentIndicator + : [pP] + ; + +// §3.10.3 Boolean Literals + +BooleanLiteral + : 'true' + | 'false' + ; + +// §3.10.4 Character Literals + +CharacterLiteral + : '\'' SingleCharacter '\'' + | '\'' EscapeSequence '\'' + ; + +fragment +SingleCharacter + : ~['\\] + ; + +// §3.10.5 String Literals + +StringLiteral + : '"' StringCharacters? '"' + ; + +fragment +StringCharacters + : StringCharacter+ + ; + +fragment +StringCharacter + : ~["\\] + | EscapeSequence + ; + +// §3.10.6 Escape Sequences for Character and String Literals + +fragment +EscapeSequence + : '\\' [btnfr"'\\] + | OctalEscape + | UnicodeEscape + ; + +fragment +OctalEscape + : '\\' OctalDigit + | '\\' OctalDigit OctalDigit + | '\\' ZeroToThree OctalDigit OctalDigit + ; + +fragment +UnicodeEscape + : '\\' 'u' HexDigit HexDigit HexDigit HexDigit + ; + +fragment +ZeroToThree + : [0-3] + ; + +// §3.10.7 The Null Literal + +NullLiteral + : 'null' + ; + +// §3.11 Separators + +LPAREN : '('; +RPAREN : ')'; +LBRACE : '{'; +RBRACE : '}'; +LBRACK : '['; +RBRACK : ']'; +SEMI : ';'; +COMMA : ','; +DOT : '.'; + +// §3.12 Operators + +ASSIGN : '='; +GT : '>'; +LT : '<'; +BANG : '!'; +TILDE : '~'; +QUESTION : '?'; +COLON : ':'; +EQUAL : '=='; +LE : '<='; +GE : '>='; +NOTEQUAL : '!='; +AND : '&&'; +OR : '||'; +INC : '++'; +DEC : '--'; +ADD : '+'; +SUB : '-'; +MUL : '*'; +DIV : '/'; +BITAND : '&'; +BITOR : '|'; +CARET : '^'; +MOD : '%'; + +ADD_ASSIGN : '+='; +SUB_ASSIGN : '-='; +MUL_ASSIGN : '*='; +DIV_ASSIGN : '/='; +AND_ASSIGN : '&='; +OR_ASSIGN : '|='; +XOR_ASSIGN : '^='; +MOD_ASSIGN : '%='; +LSHIFT_ASSIGN : '<<='; +RSHIFT_ASSIGN : '>>='; +URSHIFT_ASSIGN : '>>>='; + +// §3.8 Identifiers (must appear after all keywords in the grammar) + +Identifier + : JavaLetter JavaLetterOrDigit* + ; + +fragment +JavaLetter + : [a-zA-Z$_] // these are the "java letters" below 0xFF + | // covers all characters above 0xFF which are not a surrogate + ~[\u0000-\u00FF\uD800-\uDBFF] + {Character.isJavaIdentifierStart(_input.LA(-1))}? + | // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF + [\uD800-\uDBFF] [\uDC00-\uDFFF] + {Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}? + ; + +fragment +JavaLetterOrDigit + : [a-zA-Z0-9$_] // these are the "java letters or digits" below 0xFF + | // covers all characters above 0xFF which are not a surrogate + ~[\u0000-\u00FF\uD800-\uDBFF] + {Character.isJavaIdentifierPart(_input.LA(-1))}? + | // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF + [\uD800-\uDBFF] [\uDC00-\uDFFF] + {Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}? + ; + +// +// Additional symbols not defined in the lexical specification +// + +AT : '@'; +ELLIPSIS : '...'; + +// +// Whitespace and comments +// + +WS : [ \t\r\n\u000C]+ -> skip + ; + +COMMENT + : '/*' .*? '*/' -> skip + ; + +LINE_COMMENT + : '//' ~[\r\n]* -> skip + ; diff --git a/antlr/Java8.tokens b/antlr/Java8.tokens new file mode 100644 index 000000000..3f62bddf3 --- /dev/null +++ b/antlr/Java8.tokens @@ -0,0 +1,201 @@ +THROW=44 +STATIC=38 +INTERFACE=28 +AND_ASSIGN=93 +BREAK=4 +BYTE=5 +ELSE=15 +IF=22 +ENUM=16 +SUB=82 +BANG=69 +LPAREN=57 +DOT=65 +CASE=6 +AT=101 +LINE_COMMENT=105 +StringLiteral=55 +ELLIPSIS=102 +LBRACK=61 +PUBLIC=35 +THROWS=45 +NullLiteral=56 +RSHIFT_ASSIGN=98 +LBRACE=59 +GOTO=23 +SUB_ASSIGN=90 +SEMI=63 +CHAR=8 +ASSIGN=66 +COMMENT=104 +IMPORT=25 +BITOR=86 +CATCH=7 +MUL_ASSIGN=91 +DOUBLE=14 +PROTECTED=34 +LONG=29 +COMMA=64 +BITAND=85 +PRIVATE=33 +CONTINUE=11 +DIV=84 +FloatingPointLiteral=52 +LE=74 +CharacterLiteral=54 +VOLATILE=49 +EXTENDS=17 +INSTANCEOF=26 +NEW=31 +ADD=81 +LT=68 +CLASS=9 +DO=13 +FINALLY=19 +Identifier=100 +CONST=10 +PACKAGE=32 +OR_ASSIGN=94 +TRY=47 +IntegerLiteral=51 +SYNCHRONIZED=42 +MUL=83 +FOR=21 +FINAL=18 +RPAREN=58 +CARET=87 +URSHIFT_ASSIGN=99 +BOOLEAN=3 +NOTEQUAL=76 +RBRACK=62 +RBRACE=60 +AND=77 +THIS=43 +SWITCH=41 +VOID=48 +TRANSIENT=46 +INC=79 +FLOAT=20 +NATIVE=30 +DIV_ASSIGN=92 +BooleanLiteral=53 +ABSTRACT=1 +STRICTFP=39 +INT=27 +QUESTION=71 +RETURN=36 +LSHIFT_ASSIGN=97 +ADD_ASSIGN=89 +WS=103 +GE=75 +SUPER=40 +OR=78 +DEC=80 +MOD=88 +XOR_ASSIGN=95 +ASSERT=2 +EQUAL=73 +IMPLEMENTS=24 +COLON=72 +GT=67 +SHORT=37 +MOD_ASSIGN=96 +WHILE=50 +TILDE=70 +DEFAULT=12 +'import'=25 +'-'=82 +')'=58 +'super'=40 +'else'=15 +'%'=88 +'!'=69 +'>'=67 +'public'=35 +'=='=73 +'--'=80 +'|'=86 +'['=61 +':'=72 +'...'=102 +'throw'=44 +'case'=6 +'.'=65 +'this'=43 +'*'=83 +'switch'=41 +'synchronized'=42 +'&'=85 +'double'=14 +'break'=4 +'short'=37 +'<='=74 +'enum'=16 +'try'=47 +'?'=71 +'if'=22 +'extends'=17 +'goto'=23 +'}'=60 +'instanceof'=26 +';'=63 +'||'=78 +'>>='=98 +'class'=9 +'return'=36 +'&='=93 +'catch'=7 +'native'=30 +'continue'=11 +'strictfp'=39 +'/'=84 +'*='=91 +'+'=81 +'final'=18 +'protected'=34 +'static'=38 +'@'=101 +'transient'=46 +'~'=70 +'assert'=2 +']'=62 +'<'=68 +'++'=79 +'>>>='=99 +'>='=75 +'long'=29 +'boolean'=3 +'const'=10 +'abstract'=1 +'implements'=24 +'volatile'=49 +'throws'=45 +'/='=92 +','=64 +'-='=90 +'do'=13 +'package'=32 +'('=57 +'null'=56 +'int'=27 +'|='=94 +'for'=21 +'^'=87 +'<<='=97 +'='=66 +'byte'=5 +'&&'=77 +'^='=95 +'void'=48 +'while'=50 +'{'=59 +'float'=20 +'!='=76 +'new'=31 +'char'=8 +'finally'=19 +'interface'=28 +'%='=96 +'private'=33 +'+='=89 +'default'=12 diff --git a/antlr/Java8BaseListener.java b/antlr/Java8BaseListener.java new file mode 100644 index 000000000..ba69f6df5 --- /dev/null +++ b/antlr/Java8BaseListener.java @@ -0,0 +1,1251 @@ +// Generated from Java8.g4 by ANTLR 4.4 + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ErrorNode; +import org.antlr.v4.runtime.tree.TerminalNode; + +/** + * This class provides an empty implementation of {@link Java8Listener}, + * which can be extended to create a listener which only needs to handle a subset + * of the available methods. + */ +public class Java8BaseListener implements Java8Listener { + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterType(@NotNull Java8Parser.TypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitType(@NotNull Java8Parser.TypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBlock(@NotNull Java8Parser.BlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBlock(@NotNull Java8Parser.BlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterForUpdate(@NotNull Java8Parser.ForUpdateContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitForUpdate(@NotNull Java8Parser.ForUpdateContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExpressionList(@NotNull Java8Parser.ExpressionListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExpressionList(@NotNull Java8Parser.ExpressionListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeBound(@NotNull Java8Parser.TypeBoundContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeBound(@NotNull Java8Parser.TypeBoundContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPrimary(@NotNull Java8Parser.PrimaryContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPrimary(@NotNull Java8Parser.PrimaryContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLiteral(@NotNull Java8Parser.LiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLiteral(@NotNull Java8Parser.LiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCatchClause(@NotNull Java8Parser.CatchClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCatchClause(@NotNull Java8Parser.CatchClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeList(@NotNull Java8Parser.TypeListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeList(@NotNull Java8Parser.TypeListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassBody(@NotNull Java8Parser.ClassBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassBody(@NotNull Java8Parser.ClassBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCreatedName(@NotNull Java8Parser.CreatedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCreatedName(@NotNull Java8Parser.CreatedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterParExpression(@NotNull Java8Parser.ParExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitParExpression(@NotNull Java8Parser.ParExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotation(@NotNull Java8Parser.AnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotation(@NotNull Java8Parser.AnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCreator(@NotNull Java8Parser.CreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCreator(@NotNull Java8Parser.CreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExpression(@NotNull Java8Parser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExpression(@NotNull Java8Parser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterForControl(@NotNull Java8Parser.ForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitForControl(@NotNull Java8Parser.ForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCatchType(@NotNull Java8Parser.CatchTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCatchType(@NotNull Java8Parser.CatchTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterModifier(@NotNull Java8Parser.ModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitModifier(@NotNull Java8Parser.ModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterElementValue(@NotNull Java8Parser.ElementValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitElementValue(@NotNull Java8Parser.ElementValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterResource(@NotNull Java8Parser.ResourceContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitResource(@NotNull Java8Parser.ResourceContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMethodBody(@NotNull Java8Parser.MethodBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMethodBody(@NotNull Java8Parser.MethodBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStatement(@NotNull Java8Parser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStatement(@NotNull Java8Parser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterResources(@NotNull Java8Parser.ResourcesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitResources(@NotNull Java8Parser.ResourcesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterForInit(@NotNull Java8Parser.ForInitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitForInit(@NotNull Java8Parser.ForInitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArguments(@NotNull Java8Parser.ArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArguments(@NotNull Java8Parser.ArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx) { } + + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEveryRule(@NotNull ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEveryRule(@NotNull ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitTerminal(@NotNull TerminalNode node) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitErrorNode(@NotNull ErrorNode node) { } +} \ No newline at end of file diff --git a/antlr/Java8Lexer.java b/antlr/Java8Lexer.java new file mode 100644 index 000000000..91a2c30ed --- /dev/null +++ b/antlr/Java8Lexer.java @@ -0,0 +1,515 @@ +// Generated from Java8.g4 by ANTLR 4.4 +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class Java8Lexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.4", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + ABSTRACT=1, ASSERT=2, BOOLEAN=3, BREAK=4, BYTE=5, CASE=6, CATCH=7, CHAR=8, + CLASS=9, CONST=10, CONTINUE=11, DEFAULT=12, DO=13, DOUBLE=14, ELSE=15, + ENUM=16, EXTENDS=17, FINAL=18, FINALLY=19, FLOAT=20, FOR=21, IF=22, GOTO=23, + IMPLEMENTS=24, IMPORT=25, INSTANCEOF=26, INT=27, INTERFACE=28, LONG=29, + NATIVE=30, NEW=31, PACKAGE=32, PRIVATE=33, PROTECTED=34, PUBLIC=35, RETURN=36, + SHORT=37, STATIC=38, STRICTFP=39, SUPER=40, SWITCH=41, SYNCHRONIZED=42, + THIS=43, THROW=44, THROWS=45, TRANSIENT=46, TRY=47, VOID=48, VOLATILE=49, + WHILE=50, IntegerLiteral=51, FloatingPointLiteral=52, BooleanLiteral=53, + CharacterLiteral=54, StringLiteral=55, NullLiteral=56, LPAREN=57, RPAREN=58, + LBRACE=59, RBRACE=60, LBRACK=61, RBRACK=62, SEMI=63, COMMA=64, DOT=65, + ASSIGN=66, GT=67, LT=68, BANG=69, TILDE=70, QUESTION=71, COLON=72, EQUAL=73, + LE=74, GE=75, NOTEQUAL=76, AND=77, OR=78, INC=79, DEC=80, ADD=81, SUB=82, + MUL=83, DIV=84, BITAND=85, BITOR=86, CARET=87, MOD=88, ADD_ASSIGN=89, + SUB_ASSIGN=90, MUL_ASSIGN=91, DIV_ASSIGN=92, AND_ASSIGN=93, OR_ASSIGN=94, + XOR_ASSIGN=95, MOD_ASSIGN=96, LSHIFT_ASSIGN=97, RSHIFT_ASSIGN=98, URSHIFT_ASSIGN=99, + Identifier=100, AT=101, ELLIPSIS=102, WS=103, COMMENT=104, LINE_COMMENT=105; + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + public static final String[] tokenNames = { + "'\\u0000'", "'\\u0001'", "'\\u0002'", "'\\u0003'", "'\\u0004'", "'\\u0005'", + "'\\u0006'", "'\\u0007'", "'\b'", "'\t'", "'\n'", "'\\u000B'", "'\f'", + "'\r'", "'\\u000E'", "'\\u000F'", "'\\u0010'", "'\\u0011'", "'\\u0012'", + "'\\u0013'", "'\\u0014'", "'\\u0015'", "'\\u0016'", "'\\u0017'", "'\\u0018'", + "'\\u0019'", "'\\u001A'", "'\\u001B'", "'\\u001C'", "'\\u001D'", "'\\u001E'", + "'\\u001F'", "' '", "'!'", "'\"'", "'#'", "'$'", "'%'", "'&'", "'''", + "'('", "')'", "'*'", "'+'", "','", "'-'", "'.'", "'/'", "'0'", "'1'", + "'2'", "'3'", "'4'", "'5'", "'6'", "'7'", "'8'", "'9'", "':'", "';'", + "'<'", "'='", "'>'", "'?'", "'@'", "'A'", "'B'", "'C'", "'D'", "'E'", + "'F'", "'G'", "'H'", "'I'", "'J'", "'K'", "'L'", "'M'", "'N'", "'O'", + "'P'", "'Q'", "'R'", "'S'", "'T'", "'U'", "'V'", "'W'", "'X'", "'Y'", + "'Z'", "'['", "'\\'", "']'", "'^'", "'_'", "'`'", "'a'", "'b'", "'c'", + "'d'", "'e'", "'f'", "'g'", "'h'", "'i'" + }; + public static final String[] ruleNames = { + "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH", "CHAR", + "CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE", "ENUM", + "EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "IF", "GOTO", "IMPLEMENTS", + "IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG", "NATIVE", "NEW", "PACKAGE", + "PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "SHORT", "STATIC", "STRICTFP", + "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", "TRANSIENT", + "TRY", "VOID", "VOLATILE", "WHILE", "IntegerLiteral", "DecimalIntegerLiteral", + "HexIntegerLiteral", "OctalIntegerLiteral", "BinaryIntegerLiteral", "IntegerTypeSuffix", + "DecimalNumeral", "Digits", "Digit", "NonZeroDigit", "DigitOrUnderscore", + "Underscores", "HexNumeral", "HexDigits", "HexDigit", "HexDigitOrUnderscore", + "OctalNumeral", "OctalDigits", "OctalDigit", "OctalDigitOrUnderscore", + "BinaryNumeral", "BinaryDigits", "BinaryDigit", "BinaryDigitOrUnderscore", + "FloatingPointLiteral", "DecimalFloatingPointLiteral", "ExponentPart", + "ExponentIndicator", "SignedInteger", "Sign", "FloatTypeSuffix", "HexadecimalFloatingPointLiteral", + "HexSignificand", "BinaryExponent", "BinaryExponentIndicator", "BooleanLiteral", + "CharacterLiteral", "SingleCharacter", "StringLiteral", "StringCharacters", + "StringCharacter", "EscapeSequence", "OctalEscape", "UnicodeEscape", "ZeroToThree", + "NullLiteral", "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", + "SEMI", "COMMA", "DOT", "ASSIGN", "GT", "LT", "BANG", "TILDE", "QUESTION", + "COLON", "EQUAL", "LE", "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", "ADD", + "SUB", "MUL", "DIV", "BITAND", "BITOR", "CARET", "MOD", "ADD_ASSIGN", + "SUB_ASSIGN", "MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", + "MOD_ASSIGN", "LSHIFT_ASSIGN", "RSHIFT_ASSIGN", "URSHIFT_ASSIGN", "Identifier", + "JavaLetter", "JavaLetterOrDigit", "AT", "ELLIPSIS", "WS", "COMMENT", + "LINE_COMMENT" + }; + + + public Java8Lexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "Java8.g4"; } + + @Override + public String[] getTokenNames() { return tokenNames; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + @Override + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 140: return JavaLetter_sempred((RuleContext)_localctx, predIndex); + case 141: return JavaLetterOrDigit_sempred((RuleContext)_localctx, predIndex); + } + return true; + } + private boolean JavaLetterOrDigit_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 2: return Character.isJavaIdentifierPart(_input.LA(-1)); + case 3: return Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1))); + } + return true; + } + private boolean JavaLetter_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 0: return Character.isJavaIdentifierStart(_input.LA(-1)); + case 1: return Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1))); + } + return true; + } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2k\u042e\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"+ + "\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\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ + "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ + "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ + "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\t"+ + "k\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv\4"+ + "w\tw\4x\tx\4y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t\u0080"+ + "\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083\4\u0084\t\u0084\4\u0085"+ + "\t\u0085\4\u0086\t\u0086\4\u0087\t\u0087\4\u0088\t\u0088\4\u0089\t\u0089"+ + "\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"+ + "\4\u0093\t\u0093\4\u0094\t\u0094\3\2\3\2\3\2\3\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\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\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\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\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\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\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\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\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\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\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\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\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!\3!\3!\3!\3!\3\"\3\"\3"+ + "\"\3\"\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3$\3$\3$\3$\3$\3"+ + "$\3$\3%\3%\3%\3%\3%\3%\3%\3&\3&\3&\3&\3&\3&\3\'\3\'\3\'\3\'\3\'\3\'\3"+ + "\'\3(\3(\3(\3(\3(\3(\3(\3(\3(\3)\3)\3)\3)\3)\3)\3*\3*\3*\3*\3*\3*\3*\3"+ + "+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3,\3,\3,\3,\3,\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\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\64\3\64\5\64\u0281\n\64"+ + "\3\65\3\65\5\65\u0285\n\65\3\66\3\66\5\66\u0289\n\66\3\67\3\67\5\67\u028d"+ + "\n\67\38\38\58\u0291\n8\39\39\3:\3:\3:\5:\u0298\n:\3:\3:\3:\5:\u029d\n"+ + ":\5:\u029f\n:\3;\3;\7;\u02a3\n;\f;\16;\u02a6\13;\3;\5;\u02a9\n;\3<\3<"+ + "\5<\u02ad\n<\3=\3=\3>\3>\5>\u02b3\n>\3?\6?\u02b6\n?\r?\16?\u02b7\3@\3"+ + "@\3@\3@\3A\3A\7A\u02c0\nA\fA\16A\u02c3\13A\3A\5A\u02c6\nA\3B\3B\3C\3C"+ + "\5C\u02cc\nC\3D\3D\5D\u02d0\nD\3D\3D\3E\3E\7E\u02d6\nE\fE\16E\u02d9\13"+ + "E\3E\5E\u02dc\nE\3F\3F\3G\3G\5G\u02e2\nG\3H\3H\3H\3H\3I\3I\7I\u02ea\n"+ + "I\fI\16I\u02ed\13I\3I\5I\u02f0\nI\3J\3J\3K\3K\5K\u02f6\nK\3L\3L\5L\u02fa"+ + "\nL\3M\3M\3M\5M\u02ff\nM\3M\5M\u0302\nM\3M\5M\u0305\nM\3M\3M\3M\5M\u030a"+ + "\nM\3M\5M\u030d\nM\3M\3M\3M\5M\u0312\nM\3M\3M\3M\5M\u0317\nM\3N\3N\3N"+ + "\3O\3O\3P\5P\u031f\nP\3P\3P\3Q\3Q\3R\3R\3S\3S\3S\5S\u032a\nS\3T\3T\5T"+ + "\u032e\nT\3T\3T\3T\5T\u0333\nT\3T\3T\5T\u0337\nT\3U\3U\3U\3V\3V\3W\3W"+ + "\3W\3W\3W\3W\3W\3W\3W\5W\u0347\nW\3X\3X\3X\3X\3X\3X\3X\3X\5X\u0351\nX"+ + "\3Y\3Y\3Z\3Z\5Z\u0357\nZ\3Z\3Z\3[\6[\u035c\n[\r[\16[\u035d\3\\\3\\\5\\"+ + "\u0362\n\\\3]\3]\3]\3]\5]\u0368\n]\3^\3^\3^\3^\3^\3^\3^\3^\3^\3^\3^\5"+ + "^\u0375\n^\3_\3_\3_\3_\3_\3_\3_\3`\3`\3a\3a\3a\3a\3a\3b\3b\3c\3c\3d\3"+ + "d\3e\3e\3f\3f\3g\3g\3h\3h\3i\3i\3j\3j\3k\3k\3l\3l\3m\3m\3n\3n\3o\3o\3"+ + "p\3p\3q\3q\3r\3r\3r\3s\3s\3s\3t\3t\3t\3u\3u\3u\3v\3v\3v\3w\3w\3w\3x\3"+ + "x\3x\3y\3y\3y\3z\3z\3{\3{\3|\3|\3}\3}\3~\3~\3\177\3\177\3\u0080\3\u0080"+ + "\3\u0081\3\u0081\3\u0082\3\u0082\3\u0082\3\u0083\3\u0083\3\u0083\3\u0084"+ + "\3\u0084\3\u0084\3\u0085\3\u0085\3\u0085\3\u0086\3\u0086\3\u0086\3\u0087"+ + "\3\u0087\3\u0087\3\u0088\3\u0088\3\u0088\3\u0089\3\u0089\3\u0089\3\u008a"+ + "\3\u008a\3\u008a\3\u008a\3\u008b\3\u008b\3\u008b\3\u008b\3\u008c\3\u008c"+ + "\3\u008c\3\u008c\3\u008c\3\u008d\3\u008d\7\u008d\u03f4\n\u008d\f\u008d"+ + "\16\u008d\u03f7\13\u008d\3\u008e\3\u008e\3\u008e\3\u008e\3\u008e\3\u008e"+ + "\5\u008e\u03ff\n\u008e\3\u008f\3\u008f\3\u008f\3\u008f\3\u008f\3\u008f"+ + "\5\u008f\u0407\n\u008f\3\u0090\3\u0090\3\u0091\3\u0091\3\u0091\3\u0091"+ + "\3\u0092\6\u0092\u0410\n\u0092\r\u0092\16\u0092\u0411\3\u0092\3\u0092"+ + "\3\u0093\3\u0093\3\u0093\3\u0093\7\u0093\u041a\n\u0093\f\u0093\16\u0093"+ + "\u041d\13\u0093\3\u0093\3\u0093\3\u0093\3\u0093\3\u0093\3\u0094\3\u0094"+ + "\3\u0094\3\u0094\7\u0094\u0428\n\u0094\f\u0094\16\u0094\u042b\13\u0094"+ + "\3\u0094\3\u0094\3\u041b\2\u0095\3\3\5\4\7\5\t\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%\24\'\25)\26+\27-\30/\31"+ + "\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'M(O)Q*S+U,W-Y.[/]\60"+ + "_\61a\62c\63e\64g\65i\2k\2m\2o\2q\2s\2u\2w\2y\2{\2}\2\177\2\u0081\2\u0083"+ + "\2\u0085\2\u0087\2\u0089\2\u008b\2\u008d\2\u008f\2\u0091\2\u0093\2\u0095"+ + "\2\u0097\66\u0099\2\u009b\2\u009d\2\u009f\2\u00a1\2\u00a3\2\u00a5\2\u00a7"+ + "\2\u00a9\2\u00ab\2\u00ad\67\u00af8\u00b1\2\u00b39\u00b5\2\u00b7\2\u00b9"+ + "\2\u00bb\2\u00bd\2\u00bf\2\u00c1:\u00c3;\u00c5<\u00c7=\u00c9>\u00cb?\u00cd"+ + "@\u00cfA\u00d1B\u00d3C\u00d5D\u00d7E\u00d9F\u00dbG\u00ddH\u00dfI\u00e1"+ + "J\u00e3K\u00e5L\u00e7M\u00e9N\u00ebO\u00edP\u00efQ\u00f1R\u00f3S\u00f5"+ + "T\u00f7U\u00f9V\u00fbW\u00fdX\u00ffY\u0101Z\u0103[\u0105\\\u0107]\u0109"+ + "^\u010b_\u010d`\u010fa\u0111b\u0113c\u0115d\u0117e\u0119f\u011b\2\u011d"+ + "\2\u011fg\u0121h\u0123i\u0125j\u0127k\3\2\30\4\2NNnn\3\2\63;\4\2ZZzz\5"+ + "\2\62;CHch\3\2\629\4\2DDdd\3\2\62\63\4\2GGgg\4\2--//\6\2FFHHffhh\4\2R"+ + "Rrr\4\2))^^\4\2$$^^\n\2$$))^^ddhhppttvv\3\2\62\65\6\2&&C\\aac|\4\2\2\u0101"+ + "\ud802\udc01\3\2\ud802\udc01\3\2\udc02\ue001\7\2&&\62;C\\aac|\5\2\13\f"+ + "\16\17\"\"\4\2\f\f\17\17\u043c\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t"+ + "\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2"+ + "\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2"+ + "\37\3\2\2\2\2!\3\2\2\2\2#\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\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2"+ + "\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2"+ + "C\3\2\2\2\2E\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\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_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2"+ + "\u0097\3\2\2\2\2\u00ad\3\2\2\2\2\u00af\3\2\2\2\2\u00b3\3\2\2\2\2\u00c1"+ + "\3\2\2\2\2\u00c3\3\2\2\2\2\u00c5\3\2\2\2\2\u00c7\3\2\2\2\2\u00c9\3\2\2"+ + "\2\2\u00cb\3\2\2\2\2\u00cd\3\2\2\2\2\u00cf\3\2\2\2\2\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\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\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\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\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\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\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\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\2\2\u0119\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\u0127\3\2\2"+ + "\2\3\u0129\3\2\2\2\5\u0132\3\2\2\2\7\u0139\3\2\2\2\t\u0141\3\2\2\2\13"+ + "\u0147\3\2\2\2\r\u014c\3\2\2\2\17\u0151\3\2\2\2\21\u0157\3\2\2\2\23\u015c"+ + "\3\2\2\2\25\u0162\3\2\2\2\27\u0168\3\2\2\2\31\u0171\3\2\2\2\33\u0179\3"+ + "\2\2\2\35\u017c\3\2\2\2\37\u0183\3\2\2\2!\u0188\3\2\2\2#\u018d\3\2\2\2"+ + "%\u0195\3\2\2\2\'\u019b\3\2\2\2)\u01a3\3\2\2\2+\u01a9\3\2\2\2-\u01ad\3"+ + "\2\2\2/\u01b0\3\2\2\2\61\u01b5\3\2\2\2\63\u01c0\3\2\2\2\65\u01c7\3\2\2"+ + "\2\67\u01d2\3\2\2\29\u01d6\3\2\2\2;\u01e0\3\2\2\2=\u01e5\3\2\2\2?\u01ec"+ + "\3\2\2\2A\u01f0\3\2\2\2C\u01f8\3\2\2\2E\u0200\3\2\2\2G\u020a\3\2\2\2I"+ + "\u0211\3\2\2\2K\u0218\3\2\2\2M\u021e\3\2\2\2O\u0225\3\2\2\2Q\u022e\3\2"+ + "\2\2S\u0234\3\2\2\2U\u023b\3\2\2\2W\u0248\3\2\2\2Y\u024d\3\2\2\2[\u0253"+ + "\3\2\2\2]\u025a\3\2\2\2_\u0264\3\2\2\2a\u0268\3\2\2\2c\u026d\3\2\2\2e"+ + "\u0276\3\2\2\2g\u0280\3\2\2\2i\u0282\3\2\2\2k\u0286\3\2\2\2m\u028a\3\2"+ + "\2\2o\u028e\3\2\2\2q\u0292\3\2\2\2s\u029e\3\2\2\2u\u02a0\3\2\2\2w\u02ac"+ + "\3\2\2\2y\u02ae\3\2\2\2{\u02b2\3\2\2\2}\u02b5\3\2\2\2\177\u02b9\3\2\2"+ + "\2\u0081\u02bd\3\2\2\2\u0083\u02c7\3\2\2\2\u0085\u02cb\3\2\2\2\u0087\u02cd"+ + "\3\2\2\2\u0089\u02d3\3\2\2\2\u008b\u02dd\3\2\2\2\u008d\u02e1\3\2\2\2\u008f"+ + "\u02e3\3\2\2\2\u0091\u02e7\3\2\2\2\u0093\u02f1\3\2\2\2\u0095\u02f5\3\2"+ + "\2\2\u0097\u02f9\3\2\2\2\u0099\u0316\3\2\2\2\u009b\u0318\3\2\2\2\u009d"+ + "\u031b\3\2\2\2\u009f\u031e\3\2\2\2\u00a1\u0322\3\2\2\2\u00a3\u0324\3\2"+ + "\2\2\u00a5\u0326\3\2\2\2\u00a7\u0336\3\2\2\2\u00a9\u0338\3\2\2\2\u00ab"+ + "\u033b\3\2\2\2\u00ad\u0346\3\2\2\2\u00af\u0350\3\2\2\2\u00b1\u0352\3\2"+ + "\2\2\u00b3\u0354\3\2\2\2\u00b5\u035b\3\2\2\2\u00b7\u0361\3\2\2\2\u00b9"+ + "\u0367\3\2\2\2\u00bb\u0374\3\2\2\2\u00bd\u0376\3\2\2\2\u00bf\u037d\3\2"+ + "\2\2\u00c1\u037f\3\2\2\2\u00c3\u0384\3\2\2\2\u00c5\u0386\3\2\2\2\u00c7"+ + "\u0388\3\2\2\2\u00c9\u038a\3\2\2\2\u00cb\u038c\3\2\2\2\u00cd\u038e\3\2"+ + "\2\2\u00cf\u0390\3\2\2\2\u00d1\u0392\3\2\2\2\u00d3\u0394\3\2\2\2\u00d5"+ + "\u0396\3\2\2\2\u00d7\u0398\3\2\2\2\u00d9\u039a\3\2\2\2\u00db\u039c\3\2"+ + "\2\2\u00dd\u039e\3\2\2\2\u00df\u03a0\3\2\2\2\u00e1\u03a2\3\2\2\2\u00e3"+ + "\u03a4\3\2\2\2\u00e5\u03a7\3\2\2\2\u00e7\u03aa\3\2\2\2\u00e9\u03ad\3\2"+ + "\2\2\u00eb\u03b0\3\2\2\2\u00ed\u03b3\3\2\2\2\u00ef\u03b6\3\2\2\2\u00f1"+ + "\u03b9\3\2\2\2\u00f3\u03bc\3\2\2\2\u00f5\u03be\3\2\2\2\u00f7\u03c0\3\2"+ + "\2\2\u00f9\u03c2\3\2\2\2\u00fb\u03c4\3\2\2\2\u00fd\u03c6\3\2\2\2\u00ff"+ + "\u03c8\3\2\2\2\u0101\u03ca\3\2\2\2\u0103\u03cc\3\2\2\2\u0105\u03cf\3\2"+ + "\2\2\u0107\u03d2\3\2\2\2\u0109\u03d5\3\2\2\2\u010b\u03d8\3\2\2\2\u010d"+ + "\u03db\3\2\2\2\u010f\u03de\3\2\2\2\u0111\u03e1\3\2\2\2\u0113\u03e4\3\2"+ + "\2\2\u0115\u03e8\3\2\2\2\u0117\u03ec\3\2\2\2\u0119\u03f1\3\2\2\2\u011b"+ + "\u03fe\3\2\2\2\u011d\u0406\3\2\2\2\u011f\u0408\3\2\2\2\u0121\u040a\3\2"+ + "\2\2\u0123\u040f\3\2\2\2\u0125\u0415\3\2\2\2\u0127\u0423\3\2\2\2\u0129"+ + "\u012a\7c\2\2\u012a\u012b\7d\2\2\u012b\u012c\7u\2\2\u012c\u012d\7v\2\2"+ + "\u012d\u012e\7t\2\2\u012e\u012f\7c\2\2\u012f\u0130\7e\2\2\u0130\u0131"+ + "\7v\2\2\u0131\4\3\2\2\2\u0132\u0133\7c\2\2\u0133\u0134\7u\2\2\u0134\u0135"+ + "\7u\2\2\u0135\u0136\7g\2\2\u0136\u0137\7t\2\2\u0137\u0138\7v\2\2\u0138"+ + "\6\3\2\2\2\u0139\u013a\7d\2\2\u013a\u013b\7q\2\2\u013b\u013c\7q\2\2\u013c"+ + "\u013d\7n\2\2\u013d\u013e\7g\2\2\u013e\u013f\7c\2\2\u013f\u0140\7p\2\2"+ + "\u0140\b\3\2\2\2\u0141\u0142\7d\2\2\u0142\u0143\7t\2\2\u0143\u0144\7g"+ + "\2\2\u0144\u0145\7c\2\2\u0145\u0146\7m\2\2\u0146\n\3\2\2\2\u0147\u0148"+ + "\7d\2\2\u0148\u0149\7{\2\2\u0149\u014a\7v\2\2\u014a\u014b\7g\2\2\u014b"+ + "\f\3\2\2\2\u014c\u014d\7e\2\2\u014d\u014e\7c\2\2\u014e\u014f\7u\2\2\u014f"+ + "\u0150\7g\2\2\u0150\16\3\2\2\2\u0151\u0152\7e\2\2\u0152\u0153\7c\2\2\u0153"+ + "\u0154\7v\2\2\u0154\u0155\7e\2\2\u0155\u0156\7j\2\2\u0156\20\3\2\2\2\u0157"+ + "\u0158\7e\2\2\u0158\u0159\7j\2\2\u0159\u015a\7c\2\2\u015a\u015b\7t\2\2"+ + "\u015b\22\3\2\2\2\u015c\u015d\7e\2\2\u015d\u015e\7n\2\2\u015e\u015f\7"+ + "c\2\2\u015f\u0160\7u\2\2\u0160\u0161\7u\2\2\u0161\24\3\2\2\2\u0162\u0163"+ + "\7e\2\2\u0163\u0164\7q\2\2\u0164\u0165\7p\2\2\u0165\u0166\7u\2\2\u0166"+ + "\u0167\7v\2\2\u0167\26\3\2\2\2\u0168\u0169\7e\2\2\u0169\u016a\7q\2\2\u016a"+ + "\u016b\7p\2\2\u016b\u016c\7v\2\2\u016c\u016d\7k\2\2\u016d\u016e\7p\2\2"+ + "\u016e\u016f\7w\2\2\u016f\u0170\7g\2\2\u0170\30\3\2\2\2\u0171\u0172\7"+ + "f\2\2\u0172\u0173\7g\2\2\u0173\u0174\7h\2\2\u0174\u0175\7c\2\2\u0175\u0176"+ + "\7w\2\2\u0176\u0177\7n\2\2\u0177\u0178\7v\2\2\u0178\32\3\2\2\2\u0179\u017a"+ + "\7f\2\2\u017a\u017b\7q\2\2\u017b\34\3\2\2\2\u017c\u017d\7f\2\2\u017d\u017e"+ + "\7q\2\2\u017e\u017f\7w\2\2\u017f\u0180\7d\2\2\u0180\u0181\7n\2\2\u0181"+ + "\u0182\7g\2\2\u0182\36\3\2\2\2\u0183\u0184\7g\2\2\u0184\u0185\7n\2\2\u0185"+ + "\u0186\7u\2\2\u0186\u0187\7g\2\2\u0187 \3\2\2\2\u0188\u0189\7g\2\2\u0189"+ + "\u018a\7p\2\2\u018a\u018b\7w\2\2\u018b\u018c\7o\2\2\u018c\"\3\2\2\2\u018d"+ + "\u018e\7g\2\2\u018e\u018f\7z\2\2\u018f\u0190\7v\2\2\u0190\u0191\7g\2\2"+ + "\u0191\u0192\7p\2\2\u0192\u0193\7f\2\2\u0193\u0194\7u\2\2\u0194$\3\2\2"+ + "\2\u0195\u0196\7h\2\2\u0196\u0197\7k\2\2\u0197\u0198\7p\2\2\u0198\u0199"+ + "\7c\2\2\u0199\u019a\7n\2\2\u019a&\3\2\2\2\u019b\u019c\7h\2\2\u019c\u019d"+ + "\7k\2\2\u019d\u019e\7p\2\2\u019e\u019f\7c\2\2\u019f\u01a0\7n\2\2\u01a0"+ + "\u01a1\7n\2\2\u01a1\u01a2\7{\2\2\u01a2(\3\2\2\2\u01a3\u01a4\7h\2\2\u01a4"+ + "\u01a5\7n\2\2\u01a5\u01a6\7q\2\2\u01a6\u01a7\7c\2\2\u01a7\u01a8\7v\2\2"+ + "\u01a8*\3\2\2\2\u01a9\u01aa\7h\2\2\u01aa\u01ab\7q\2\2\u01ab\u01ac\7t\2"+ + "\2\u01ac,\3\2\2\2\u01ad\u01ae\7k\2\2\u01ae\u01af\7h\2\2\u01af.\3\2\2\2"+ + "\u01b0\u01b1\7i\2\2\u01b1\u01b2\7q\2\2\u01b2\u01b3\7v\2\2\u01b3\u01b4"+ + "\7q\2\2\u01b4\60\3\2\2\2\u01b5\u01b6\7k\2\2\u01b6\u01b7\7o\2\2\u01b7\u01b8"+ + "\7r\2\2\u01b8\u01b9\7n\2\2\u01b9\u01ba\7g\2\2\u01ba\u01bb\7o\2\2\u01bb"+ + "\u01bc\7g\2\2\u01bc\u01bd\7p\2\2\u01bd\u01be\7v\2\2\u01be\u01bf\7u\2\2"+ + "\u01bf\62\3\2\2\2\u01c0\u01c1\7k\2\2\u01c1\u01c2\7o\2\2\u01c2\u01c3\7"+ + "r\2\2\u01c3\u01c4\7q\2\2\u01c4\u01c5\7t\2\2\u01c5\u01c6\7v\2\2\u01c6\64"+ + "\3\2\2\2\u01c7\u01c8\7k\2\2\u01c8\u01c9\7p\2\2\u01c9\u01ca\7u\2\2\u01ca"+ + "\u01cb\7v\2\2\u01cb\u01cc\7c\2\2\u01cc\u01cd\7p\2\2\u01cd\u01ce\7e\2\2"+ + "\u01ce\u01cf\7g\2\2\u01cf\u01d0\7q\2\2\u01d0\u01d1\7h\2\2\u01d1\66\3\2"+ + "\2\2\u01d2\u01d3\7k\2\2\u01d3\u01d4\7p\2\2\u01d4\u01d5\7v\2\2\u01d58\3"+ + "\2\2\2\u01d6\u01d7\7k\2\2\u01d7\u01d8\7p\2\2\u01d8\u01d9\7v\2\2\u01d9"+ + "\u01da\7g\2\2\u01da\u01db\7t\2\2\u01db\u01dc\7h\2\2\u01dc\u01dd\7c\2\2"+ + "\u01dd\u01de\7e\2\2\u01de\u01df\7g\2\2\u01df:\3\2\2\2\u01e0\u01e1\7n\2"+ + "\2\u01e1\u01e2\7q\2\2\u01e2\u01e3\7p\2\2\u01e3\u01e4\7i\2\2\u01e4<\3\2"+ + "\2\2\u01e5\u01e6\7p\2\2\u01e6\u01e7\7c\2\2\u01e7\u01e8\7v\2\2\u01e8\u01e9"+ + "\7k\2\2\u01e9\u01ea\7x\2\2\u01ea\u01eb\7g\2\2\u01eb>\3\2\2\2\u01ec\u01ed"+ + "\7p\2\2\u01ed\u01ee\7g\2\2\u01ee\u01ef\7y\2\2\u01ef@\3\2\2\2\u01f0\u01f1"+ + "\7r\2\2\u01f1\u01f2\7c\2\2\u01f2\u01f3\7e\2\2\u01f3\u01f4\7m\2\2\u01f4"+ + "\u01f5\7c\2\2\u01f5\u01f6\7i\2\2\u01f6\u01f7\7g\2\2\u01f7B\3\2\2\2\u01f8"+ + "\u01f9\7r\2\2\u01f9\u01fa\7t\2\2\u01fa\u01fb\7k\2\2\u01fb\u01fc\7x\2\2"+ + "\u01fc\u01fd\7c\2\2\u01fd\u01fe\7v\2\2\u01fe\u01ff\7g\2\2\u01ffD\3\2\2"+ + "\2\u0200\u0201\7r\2\2\u0201\u0202\7t\2\2\u0202\u0203\7q\2\2\u0203\u0204"+ + "\7v\2\2\u0204\u0205\7g\2\2\u0205\u0206\7e\2\2\u0206\u0207\7v\2\2\u0207"+ + "\u0208\7g\2\2\u0208\u0209\7f\2\2\u0209F\3\2\2\2\u020a\u020b\7r\2\2\u020b"+ + "\u020c\7w\2\2\u020c\u020d\7d\2\2\u020d\u020e\7n\2\2\u020e\u020f\7k\2\2"+ + "\u020f\u0210\7e\2\2\u0210H\3\2\2\2\u0211\u0212\7t\2\2\u0212\u0213\7g\2"+ + "\2\u0213\u0214\7v\2\2\u0214\u0215\7w\2\2\u0215\u0216\7t\2\2\u0216\u0217"+ + "\7p\2\2\u0217J\3\2\2\2\u0218\u0219\7u\2\2\u0219\u021a\7j\2\2\u021a\u021b"+ + "\7q\2\2\u021b\u021c\7t\2\2\u021c\u021d\7v\2\2\u021dL\3\2\2\2\u021e\u021f"+ + "\7u\2\2\u021f\u0220\7v\2\2\u0220\u0221\7c\2\2\u0221\u0222\7v\2\2\u0222"+ + "\u0223\7k\2\2\u0223\u0224\7e\2\2\u0224N\3\2\2\2\u0225\u0226\7u\2\2\u0226"+ + "\u0227\7v\2\2\u0227\u0228\7t\2\2\u0228\u0229\7k\2\2\u0229\u022a\7e\2\2"+ + "\u022a\u022b\7v\2\2\u022b\u022c\7h\2\2\u022c\u022d\7r\2\2\u022dP\3\2\2"+ + "\2\u022e\u022f\7u\2\2\u022f\u0230\7w\2\2\u0230\u0231\7r\2\2\u0231\u0232"+ + "\7g\2\2\u0232\u0233\7t\2\2\u0233R\3\2\2\2\u0234\u0235\7u\2\2\u0235\u0236"+ + "\7y\2\2\u0236\u0237\7k\2\2\u0237\u0238\7v\2\2\u0238\u0239\7e\2\2\u0239"+ + "\u023a\7j\2\2\u023aT\3\2\2\2\u023b\u023c\7u\2\2\u023c\u023d\7{\2\2\u023d"+ + "\u023e\7p\2\2\u023e\u023f\7e\2\2\u023f\u0240\7j\2\2\u0240\u0241\7t\2\2"+ + "\u0241\u0242\7q\2\2\u0242\u0243\7p\2\2\u0243\u0244\7k\2\2\u0244\u0245"+ + "\7|\2\2\u0245\u0246\7g\2\2\u0246\u0247\7f\2\2\u0247V\3\2\2\2\u0248\u0249"+ + "\7v\2\2\u0249\u024a\7j\2\2\u024a\u024b\7k\2\2\u024b\u024c\7u\2\2\u024c"+ + "X\3\2\2\2\u024d\u024e\7v\2\2\u024e\u024f\7j\2\2\u024f\u0250\7t\2\2\u0250"+ + "\u0251\7q\2\2\u0251\u0252\7y\2\2\u0252Z\3\2\2\2\u0253\u0254\7v\2\2\u0254"+ + "\u0255\7j\2\2\u0255\u0256\7t\2\2\u0256\u0257\7q\2\2\u0257\u0258\7y\2\2"+ + "\u0258\u0259\7u\2\2\u0259\\\3\2\2\2\u025a\u025b\7v\2\2\u025b\u025c\7t"+ + "\2\2\u025c\u025d\7c\2\2\u025d\u025e\7p\2\2\u025e\u025f\7u\2\2\u025f\u0260"+ + "\7k\2\2\u0260\u0261\7g\2\2\u0261\u0262\7p\2\2\u0262\u0263\7v\2\2\u0263"+ + "^\3\2\2\2\u0264\u0265\7v\2\2\u0265\u0266\7t\2\2\u0266\u0267\7{\2\2\u0267"+ + "`\3\2\2\2\u0268\u0269\7x\2\2\u0269\u026a\7q\2\2\u026a\u026b\7k\2\2\u026b"+ + "\u026c\7f\2\2\u026cb\3\2\2\2\u026d\u026e\7x\2\2\u026e\u026f\7q\2\2\u026f"+ + "\u0270\7n\2\2\u0270\u0271\7c\2\2\u0271\u0272\7v\2\2\u0272\u0273\7k\2\2"+ + "\u0273\u0274\7n\2\2\u0274\u0275\7g\2\2\u0275d\3\2\2\2\u0276\u0277\7y\2"+ + "\2\u0277\u0278\7j\2\2\u0278\u0279\7k\2\2\u0279\u027a\7n\2\2\u027a\u027b"+ + "\7g\2\2\u027bf\3\2\2\2\u027c\u0281\5i\65\2\u027d\u0281\5k\66\2\u027e\u0281"+ + "\5m\67\2\u027f\u0281\5o8\2\u0280\u027c\3\2\2\2\u0280\u027d\3\2\2\2\u0280"+ + "\u027e\3\2\2\2\u0280\u027f\3\2\2\2\u0281h\3\2\2\2\u0282\u0284\5s:\2\u0283"+ + "\u0285\5q9\2\u0284\u0283\3\2\2\2\u0284\u0285\3\2\2\2\u0285j\3\2\2\2\u0286"+ + "\u0288\5\177@\2\u0287\u0289\5q9\2\u0288\u0287\3\2\2\2\u0288\u0289\3\2"+ + "\2\2\u0289l\3\2\2\2\u028a\u028c\5\u0087D\2\u028b\u028d\5q9\2\u028c\u028b"+ + "\3\2\2\2\u028c\u028d\3\2\2\2\u028dn\3\2\2\2\u028e\u0290\5\u008fH\2\u028f"+ + "\u0291\5q9\2\u0290\u028f\3\2\2\2\u0290\u0291\3\2\2\2\u0291p\3\2\2\2\u0292"+ + "\u0293\t\2\2\2\u0293r\3\2\2\2\u0294\u029f\7\62\2\2\u0295\u029c\5y=\2\u0296"+ + "\u0298\5u;\2\u0297\u0296\3\2\2\2\u0297\u0298\3\2\2\2\u0298\u029d\3\2\2"+ + "\2\u0299\u029a\5}?\2\u029a\u029b\5u;\2\u029b\u029d\3\2\2\2\u029c\u0297"+ + "\3\2\2\2\u029c\u0299\3\2\2\2\u029d\u029f\3\2\2\2\u029e\u0294\3\2\2\2\u029e"+ + "\u0295\3\2\2\2\u029ft\3\2\2\2\u02a0\u02a8\5w<\2\u02a1\u02a3\5{>\2\u02a2"+ + "\u02a1\3\2\2\2\u02a3\u02a6\3\2\2\2\u02a4\u02a2\3\2\2\2\u02a4\u02a5\3\2"+ + "\2\2\u02a5\u02a7\3\2\2\2\u02a6\u02a4\3\2\2\2\u02a7\u02a9\5w<\2\u02a8\u02a4"+ + "\3\2\2\2\u02a8\u02a9\3\2\2\2\u02a9v\3\2\2\2\u02aa\u02ad\7\62\2\2\u02ab"+ + "\u02ad\5y=\2\u02ac\u02aa\3\2\2\2\u02ac\u02ab\3\2\2\2\u02adx\3\2\2\2\u02ae"+ + "\u02af\t\3\2\2\u02afz\3\2\2\2\u02b0\u02b3\5w<\2\u02b1\u02b3\7a\2\2\u02b2"+ + "\u02b0\3\2\2\2\u02b2\u02b1\3\2\2\2\u02b3|\3\2\2\2\u02b4\u02b6\7a\2\2\u02b5"+ + "\u02b4\3\2\2\2\u02b6\u02b7\3\2\2\2\u02b7\u02b5\3\2\2\2\u02b7\u02b8\3\2"+ + "\2\2\u02b8~\3\2\2\2\u02b9\u02ba\7\62\2\2\u02ba\u02bb\t\4\2\2\u02bb\u02bc"+ + "\5\u0081A\2\u02bc\u0080\3\2\2\2\u02bd\u02c5\5\u0083B\2\u02be\u02c0\5\u0085"+ + "C\2\u02bf\u02be\3\2\2\2\u02c0\u02c3\3\2\2\2\u02c1\u02bf\3\2\2\2\u02c1"+ + "\u02c2\3\2\2\2\u02c2\u02c4\3\2\2\2\u02c3\u02c1\3\2\2\2\u02c4\u02c6\5\u0083"+ + "B\2\u02c5\u02c1\3\2\2\2\u02c5\u02c6\3\2\2\2\u02c6\u0082\3\2\2\2\u02c7"+ + "\u02c8\t\5\2\2\u02c8\u0084\3\2\2\2\u02c9\u02cc\5\u0083B\2\u02ca\u02cc"+ + "\7a\2\2\u02cb\u02c9\3\2\2\2\u02cb\u02ca\3\2\2\2\u02cc\u0086\3\2\2\2\u02cd"+ + "\u02cf\7\62\2\2\u02ce\u02d0\5}?\2\u02cf\u02ce\3\2\2\2\u02cf\u02d0\3\2"+ + "\2\2\u02d0\u02d1\3\2\2\2\u02d1\u02d2\5\u0089E\2\u02d2\u0088\3\2\2\2\u02d3"+ + "\u02db\5\u008bF\2\u02d4\u02d6\5\u008dG\2\u02d5\u02d4\3\2\2\2\u02d6\u02d9"+ + "\3\2\2\2\u02d7\u02d5\3\2\2\2\u02d7\u02d8\3\2\2\2\u02d8\u02da\3\2\2\2\u02d9"+ + "\u02d7\3\2\2\2\u02da\u02dc\5\u008bF\2\u02db\u02d7\3\2\2\2\u02db\u02dc"+ + "\3\2\2\2\u02dc\u008a\3\2\2\2\u02dd\u02de\t\6\2\2\u02de\u008c\3\2\2\2\u02df"+ + "\u02e2\5\u008bF\2\u02e0\u02e2\7a\2\2\u02e1\u02df\3\2\2\2\u02e1\u02e0\3"+ + "\2\2\2\u02e2\u008e\3\2\2\2\u02e3\u02e4\7\62\2\2\u02e4\u02e5\t\7\2\2\u02e5"+ + "\u02e6\5\u0091I\2\u02e6\u0090\3\2\2\2\u02e7\u02ef\5\u0093J\2\u02e8\u02ea"+ + "\5\u0095K\2\u02e9\u02e8\3\2\2\2\u02ea\u02ed\3\2\2\2\u02eb\u02e9\3\2\2"+ + "\2\u02eb\u02ec\3\2\2\2\u02ec\u02ee\3\2\2\2\u02ed\u02eb\3\2\2\2\u02ee\u02f0"+ + "\5\u0093J\2\u02ef\u02eb\3\2\2\2\u02ef\u02f0\3\2\2\2\u02f0\u0092\3\2\2"+ + "\2\u02f1\u02f2\t\b\2\2\u02f2\u0094\3\2\2\2\u02f3\u02f6\5\u0093J\2\u02f4"+ + "\u02f6\7a\2\2\u02f5\u02f3\3\2\2\2\u02f5\u02f4\3\2\2\2\u02f6\u0096\3\2"+ + "\2\2\u02f7\u02fa\5\u0099M\2\u02f8\u02fa\5\u00a5S\2\u02f9\u02f7\3\2\2\2"+ + "\u02f9\u02f8\3\2\2\2\u02fa\u0098\3\2\2\2\u02fb\u02fc\5u;\2\u02fc\u02fe"+ + "\7\60\2\2\u02fd\u02ff\5u;\2\u02fe\u02fd\3\2\2\2\u02fe\u02ff\3\2\2\2\u02ff"+ + "\u0301\3\2\2\2\u0300\u0302\5\u009bN\2\u0301\u0300\3\2\2\2\u0301\u0302"+ + "\3\2\2\2\u0302\u0304\3\2\2\2\u0303\u0305\5\u00a3R\2\u0304\u0303\3\2\2"+ + "\2\u0304\u0305\3\2\2\2\u0305\u0317\3\2\2\2\u0306\u0307\7\60\2\2\u0307"+ + "\u0309\5u;\2\u0308\u030a\5\u009bN\2\u0309\u0308\3\2\2\2\u0309\u030a\3"+ + "\2\2\2\u030a\u030c\3\2\2\2\u030b\u030d\5\u00a3R\2\u030c\u030b\3\2\2\2"+ + "\u030c\u030d\3\2\2\2\u030d\u0317\3\2\2\2\u030e\u030f\5u;\2\u030f\u0311"+ + "\5\u009bN\2\u0310\u0312\5\u00a3R\2\u0311\u0310\3\2\2\2\u0311\u0312\3\2"+ + "\2\2\u0312\u0317\3\2\2\2\u0313\u0314\5u;\2\u0314\u0315\5\u00a3R\2\u0315"+ + "\u0317\3\2\2\2\u0316\u02fb\3\2\2\2\u0316\u0306\3\2\2\2\u0316\u030e\3\2"+ + "\2\2\u0316\u0313\3\2\2\2\u0317\u009a\3\2\2\2\u0318\u0319\5\u009dO\2\u0319"+ + "\u031a\5\u009fP\2\u031a\u009c\3\2\2\2\u031b\u031c\t\t\2\2\u031c\u009e"+ + "\3\2\2\2\u031d\u031f\5\u00a1Q\2\u031e\u031d\3\2\2\2\u031e\u031f\3\2\2"+ + "\2\u031f\u0320\3\2\2\2\u0320\u0321\5u;\2\u0321\u00a0\3\2\2\2\u0322\u0323"+ + "\t\n\2\2\u0323\u00a2\3\2\2\2\u0324\u0325\t\13\2\2\u0325\u00a4\3\2\2\2"+ + "\u0326\u0327\5\u00a7T\2\u0327\u0329\5\u00a9U\2\u0328\u032a\5\u00a3R\2"+ + "\u0329\u0328\3\2\2\2\u0329\u032a\3\2\2\2\u032a\u00a6\3\2\2\2\u032b\u032d"+ + "\5\177@\2\u032c\u032e\7\60\2\2\u032d\u032c\3\2\2\2\u032d\u032e\3\2\2\2"+ + "\u032e\u0337\3\2\2\2\u032f\u0330\7\62\2\2\u0330\u0332\t\4\2\2\u0331\u0333"+ + "\5\u0081A\2\u0332\u0331\3\2\2\2\u0332\u0333\3\2\2\2\u0333\u0334\3\2\2"+ + "\2\u0334\u0335\7\60\2\2\u0335\u0337\5\u0081A\2\u0336\u032b\3\2\2\2\u0336"+ + "\u032f\3\2\2\2\u0337\u00a8\3\2\2\2\u0338\u0339\5\u00abV\2\u0339\u033a"+ + "\5\u009fP\2\u033a\u00aa\3\2\2\2\u033b\u033c\t\f\2\2\u033c\u00ac\3\2\2"+ + "\2\u033d\u033e\7v\2\2\u033e\u033f\7t\2\2\u033f\u0340\7w\2\2\u0340\u0347"+ + "\7g\2\2\u0341\u0342\7h\2\2\u0342\u0343\7c\2\2\u0343\u0344\7n\2\2\u0344"+ + "\u0345\7u\2\2\u0345\u0347\7g\2\2\u0346\u033d\3\2\2\2\u0346\u0341\3\2\2"+ + "\2\u0347\u00ae\3\2\2\2\u0348\u0349\7)\2\2\u0349\u034a\5\u00b1Y\2\u034a"+ + "\u034b\7)\2\2\u034b\u0351\3\2\2\2\u034c\u034d\7)\2\2\u034d\u034e\5\u00b9"+ + "]\2\u034e\u034f\7)\2\2\u034f\u0351\3\2\2\2\u0350\u0348\3\2\2\2\u0350\u034c"+ + "\3\2\2\2\u0351\u00b0\3\2\2\2\u0352\u0353\n\r\2\2\u0353\u00b2\3\2\2\2\u0354"+ + "\u0356\7$\2\2\u0355\u0357\5\u00b5[\2\u0356\u0355\3\2\2\2\u0356\u0357\3"+ + "\2\2\2\u0357\u0358\3\2\2\2\u0358\u0359\7$\2\2\u0359\u00b4\3\2\2\2\u035a"+ + "\u035c\5\u00b7\\\2\u035b\u035a\3\2\2\2\u035c\u035d\3\2\2\2\u035d\u035b"+ + "\3\2\2\2\u035d\u035e\3\2\2\2\u035e\u00b6\3\2\2\2\u035f\u0362\n\16\2\2"+ + "\u0360\u0362\5\u00b9]\2\u0361\u035f\3\2\2\2\u0361\u0360\3\2\2\2\u0362"+ + "\u00b8\3\2\2\2\u0363\u0364\7^\2\2\u0364\u0368\t\17\2\2\u0365\u0368\5\u00bb"+ + "^\2\u0366\u0368\5\u00bd_\2\u0367\u0363\3\2\2\2\u0367\u0365\3\2\2\2\u0367"+ + "\u0366\3\2\2\2\u0368\u00ba\3\2\2\2\u0369\u036a\7^\2\2\u036a\u0375\5\u008b"+ + "F\2\u036b\u036c\7^\2\2\u036c\u036d\5\u008bF\2\u036d\u036e\5\u008bF\2\u036e"+ + "\u0375\3\2\2\2\u036f\u0370\7^\2\2\u0370\u0371\5\u00bf`\2\u0371\u0372\5"+ + "\u008bF\2\u0372\u0373\5\u008bF\2\u0373\u0375\3\2\2\2\u0374\u0369\3\2\2"+ + "\2\u0374\u036b\3\2\2\2\u0374\u036f\3\2\2\2\u0375\u00bc\3\2\2\2\u0376\u0377"+ + "\7^\2\2\u0377\u0378\7w\2\2\u0378\u0379\5\u0083B\2\u0379\u037a\5\u0083"+ + "B\2\u037a\u037b\5\u0083B\2\u037b\u037c\5\u0083B\2\u037c\u00be\3\2\2\2"+ + "\u037d\u037e\t\20\2\2\u037e\u00c0\3\2\2\2\u037f\u0380\7p\2\2\u0380\u0381"+ + "\7w\2\2\u0381\u0382\7n\2\2\u0382\u0383\7n\2\2\u0383\u00c2\3\2\2\2\u0384"+ + "\u0385\7*\2\2\u0385\u00c4\3\2\2\2\u0386\u0387\7+\2\2\u0387\u00c6\3\2\2"+ + "\2\u0388\u0389\7}\2\2\u0389\u00c8\3\2\2\2\u038a\u038b\7\177\2\2\u038b"+ + "\u00ca\3\2\2\2\u038c\u038d\7]\2\2\u038d\u00cc\3\2\2\2\u038e\u038f\7_\2"+ + "\2\u038f\u00ce\3\2\2\2\u0390\u0391\7=\2\2\u0391\u00d0\3\2\2\2\u0392\u0393"+ + "\7.\2\2\u0393\u00d2\3\2\2\2\u0394\u0395\7\60\2\2\u0395\u00d4\3\2\2\2\u0396"+ + "\u0397\7?\2\2\u0397\u00d6\3\2\2\2\u0398\u0399\7@\2\2\u0399\u00d8\3\2\2"+ + "\2\u039a\u039b\7>\2\2\u039b\u00da\3\2\2\2\u039c\u039d\7#\2\2\u039d\u00dc"+ + "\3\2\2\2\u039e\u039f\7\u0080\2\2\u039f\u00de\3\2\2\2\u03a0\u03a1\7A\2"+ + "\2\u03a1\u00e0\3\2\2\2\u03a2\u03a3\7<\2\2\u03a3\u00e2\3\2\2\2\u03a4\u03a5"+ + "\7?\2\2\u03a5\u03a6\7?\2\2\u03a6\u00e4\3\2\2\2\u03a7\u03a8\7>\2\2\u03a8"+ + "\u03a9\7?\2\2\u03a9\u00e6\3\2\2\2\u03aa\u03ab\7@\2\2\u03ab\u03ac\7?\2"+ + "\2\u03ac\u00e8\3\2\2\2\u03ad\u03ae\7#\2\2\u03ae\u03af\7?\2\2\u03af\u00ea"+ + "\3\2\2\2\u03b0\u03b1\7(\2\2\u03b1\u03b2\7(\2\2\u03b2\u00ec\3\2\2\2\u03b3"+ + "\u03b4\7~\2\2\u03b4\u03b5\7~\2\2\u03b5\u00ee\3\2\2\2\u03b6\u03b7\7-\2"+ + "\2\u03b7\u03b8\7-\2\2\u03b8\u00f0\3\2\2\2\u03b9\u03ba\7/\2\2\u03ba\u03bb"+ + "\7/\2\2\u03bb\u00f2\3\2\2\2\u03bc\u03bd\7-\2\2\u03bd\u00f4\3\2\2\2\u03be"+ + "\u03bf\7/\2\2\u03bf\u00f6\3\2\2\2\u03c0\u03c1\7,\2\2\u03c1\u00f8\3\2\2"+ + "\2\u03c2\u03c3\7\61\2\2\u03c3\u00fa\3\2\2\2\u03c4\u03c5\7(\2\2\u03c5\u00fc"+ + "\3\2\2\2\u03c6\u03c7\7~\2\2\u03c7\u00fe\3\2\2\2\u03c8\u03c9\7`\2\2\u03c9"+ + "\u0100\3\2\2\2\u03ca\u03cb\7\'\2\2\u03cb\u0102\3\2\2\2\u03cc\u03cd\7-"+ + "\2\2\u03cd\u03ce\7?\2\2\u03ce\u0104\3\2\2\2\u03cf\u03d0\7/\2\2\u03d0\u03d1"+ + "\7?\2\2\u03d1\u0106\3\2\2\2\u03d2\u03d3\7,\2\2\u03d3\u03d4\7?\2\2\u03d4"+ + "\u0108\3\2\2\2\u03d5\u03d6\7\61\2\2\u03d6\u03d7\7?\2\2\u03d7\u010a\3\2"+ + "\2\2\u03d8\u03d9\7(\2\2\u03d9\u03da\7?\2\2\u03da\u010c\3\2\2\2\u03db\u03dc"+ + "\7~\2\2\u03dc\u03dd\7?\2\2\u03dd\u010e\3\2\2\2\u03de\u03df\7`\2\2\u03df"+ + "\u03e0\7?\2\2\u03e0\u0110\3\2\2\2\u03e1\u03e2\7\'\2\2\u03e2\u03e3\7?\2"+ + "\2\u03e3\u0112\3\2\2\2\u03e4\u03e5\7>\2\2\u03e5\u03e6\7>\2\2\u03e6\u03e7"+ + "\7?\2\2\u03e7\u0114\3\2\2\2\u03e8\u03e9\7@\2\2\u03e9\u03ea\7@\2\2\u03ea"+ + "\u03eb\7?\2\2\u03eb\u0116\3\2\2\2\u03ec\u03ed\7@\2\2\u03ed\u03ee\7@\2"+ + "\2\u03ee\u03ef\7@\2\2\u03ef\u03f0\7?\2\2\u03f0\u0118\3\2\2\2\u03f1\u03f5"+ + "\5\u011b\u008e\2\u03f2\u03f4\5\u011d\u008f\2\u03f3\u03f2\3\2\2\2\u03f4"+ + "\u03f7\3\2\2\2\u03f5\u03f3\3\2\2\2\u03f5\u03f6\3\2\2\2\u03f6\u011a\3\2"+ + "\2\2\u03f7\u03f5\3\2\2\2\u03f8\u03ff\t\21\2\2\u03f9\u03fa\n\22\2\2\u03fa"+ + "\u03ff\6\u008e\2\2\u03fb\u03fc\t\23\2\2\u03fc\u03fd\t\24\2\2\u03fd\u03ff"+ + "\6\u008e\3\2\u03fe\u03f8\3\2\2\2\u03fe\u03f9\3\2\2\2\u03fe\u03fb\3\2\2"+ + "\2\u03ff\u011c\3\2\2\2\u0400\u0407\t\25\2\2\u0401\u0402\n\22\2\2\u0402"+ + "\u0407\6\u008f\4\2\u0403\u0404\t\23\2\2\u0404\u0405\t\24\2\2\u0405\u0407"+ + "\6\u008f\5\2\u0406\u0400\3\2\2\2\u0406\u0401\3\2\2\2\u0406\u0403\3\2\2"+ + "\2\u0407\u011e\3\2\2\2\u0408\u0409\7B\2\2\u0409\u0120\3\2\2\2\u040a\u040b"+ + "\7\60\2\2\u040b\u040c\7\60\2\2\u040c\u040d\7\60\2\2\u040d\u0122\3\2\2"+ + "\2\u040e\u0410\t\26\2\2\u040f\u040e\3\2\2\2\u0410\u0411\3\2\2\2\u0411"+ + "\u040f\3\2\2\2\u0411\u0412\3\2\2\2\u0412\u0413\3\2\2\2\u0413\u0414\b\u0092"+ + "\2\2\u0414\u0124\3\2\2\2\u0415\u0416\7\61\2\2\u0416\u0417\7,\2\2\u0417"+ + "\u041b\3\2\2\2\u0418\u041a\13\2\2\2\u0419\u0418\3\2\2\2\u041a\u041d\3"+ + "\2\2\2\u041b\u041c\3\2\2\2\u041b\u0419\3\2\2\2\u041c\u041e\3\2\2\2\u041d"+ + "\u041b\3\2\2\2\u041e\u041f\7,\2\2\u041f\u0420\7\61\2\2\u0420\u0421\3\2"+ + "\2\2\u0421\u0422\b\u0093\2\2\u0422\u0126\3\2\2\2\u0423\u0424\7\61\2\2"+ + "\u0424\u0425\7\61\2\2\u0425\u0429\3\2\2\2\u0426\u0428\n\27\2\2\u0427\u0426"+ + "\3\2\2\2\u0428\u042b\3\2\2\2\u0429\u0427\3\2\2\2\u0429\u042a\3\2\2\2\u042a"+ + "\u042c\3\2\2\2\u042b\u0429\3\2\2\2\u042c\u042d\b\u0094\2\2\u042d\u0128"+ + "\3\2\2\2\64\2\u0280\u0284\u0288\u028c\u0290\u0297\u029c\u029e\u02a4\u02a8"+ + "\u02ac\u02b2\u02b7\u02c1\u02c5\u02cb\u02cf\u02d7\u02db\u02e1\u02eb\u02ef"+ + "\u02f5\u02f9\u02fe\u0301\u0304\u0309\u030c\u0311\u0316\u031e\u0329\u032d"+ + "\u0332\u0336\u0346\u0350\u0356\u035d\u0361\u0367\u0374\u03f5\u03fe\u0406"+ + "\u0411\u041b\u0429\3\b\2\2"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/antlr/Java8Lexer.tokens b/antlr/Java8Lexer.tokens new file mode 100644 index 000000000..3f62bddf3 --- /dev/null +++ b/antlr/Java8Lexer.tokens @@ -0,0 +1,201 @@ +THROW=44 +STATIC=38 +INTERFACE=28 +AND_ASSIGN=93 +BREAK=4 +BYTE=5 +ELSE=15 +IF=22 +ENUM=16 +SUB=82 +BANG=69 +LPAREN=57 +DOT=65 +CASE=6 +AT=101 +LINE_COMMENT=105 +StringLiteral=55 +ELLIPSIS=102 +LBRACK=61 +PUBLIC=35 +THROWS=45 +NullLiteral=56 +RSHIFT_ASSIGN=98 +LBRACE=59 +GOTO=23 +SUB_ASSIGN=90 +SEMI=63 +CHAR=8 +ASSIGN=66 +COMMENT=104 +IMPORT=25 +BITOR=86 +CATCH=7 +MUL_ASSIGN=91 +DOUBLE=14 +PROTECTED=34 +LONG=29 +COMMA=64 +BITAND=85 +PRIVATE=33 +CONTINUE=11 +DIV=84 +FloatingPointLiteral=52 +LE=74 +CharacterLiteral=54 +VOLATILE=49 +EXTENDS=17 +INSTANCEOF=26 +NEW=31 +ADD=81 +LT=68 +CLASS=9 +DO=13 +FINALLY=19 +Identifier=100 +CONST=10 +PACKAGE=32 +OR_ASSIGN=94 +TRY=47 +IntegerLiteral=51 +SYNCHRONIZED=42 +MUL=83 +FOR=21 +FINAL=18 +RPAREN=58 +CARET=87 +URSHIFT_ASSIGN=99 +BOOLEAN=3 +NOTEQUAL=76 +RBRACK=62 +RBRACE=60 +AND=77 +THIS=43 +SWITCH=41 +VOID=48 +TRANSIENT=46 +INC=79 +FLOAT=20 +NATIVE=30 +DIV_ASSIGN=92 +BooleanLiteral=53 +ABSTRACT=1 +STRICTFP=39 +INT=27 +QUESTION=71 +RETURN=36 +LSHIFT_ASSIGN=97 +ADD_ASSIGN=89 +WS=103 +GE=75 +SUPER=40 +OR=78 +DEC=80 +MOD=88 +XOR_ASSIGN=95 +ASSERT=2 +EQUAL=73 +IMPLEMENTS=24 +COLON=72 +GT=67 +SHORT=37 +MOD_ASSIGN=96 +WHILE=50 +TILDE=70 +DEFAULT=12 +'import'=25 +'-'=82 +')'=58 +'super'=40 +'else'=15 +'%'=88 +'!'=69 +'>'=67 +'public'=35 +'=='=73 +'--'=80 +'|'=86 +'['=61 +':'=72 +'...'=102 +'throw'=44 +'case'=6 +'.'=65 +'this'=43 +'*'=83 +'switch'=41 +'synchronized'=42 +'&'=85 +'double'=14 +'break'=4 +'short'=37 +'<='=74 +'enum'=16 +'try'=47 +'?'=71 +'if'=22 +'extends'=17 +'goto'=23 +'}'=60 +'instanceof'=26 +';'=63 +'||'=78 +'>>='=98 +'class'=9 +'return'=36 +'&='=93 +'catch'=7 +'native'=30 +'continue'=11 +'strictfp'=39 +'/'=84 +'*='=91 +'+'=81 +'final'=18 +'protected'=34 +'static'=38 +'@'=101 +'transient'=46 +'~'=70 +'assert'=2 +']'=62 +'<'=68 +'++'=79 +'>>>='=99 +'>='=75 +'long'=29 +'boolean'=3 +'const'=10 +'abstract'=1 +'implements'=24 +'volatile'=49 +'throws'=45 +'/='=92 +','=64 +'-='=90 +'do'=13 +'package'=32 +'('=57 +'null'=56 +'int'=27 +'|='=94 +'for'=21 +'^'=87 +'<<='=97 +'='=66 +'byte'=5 +'&&'=77 +'^='=95 +'void'=48 +'while'=50 +'{'=59 +'float'=20 +'!='=76 +'new'=31 +'char'=8 +'finally'=19 +'interface'=28 +'%='=96 +'private'=33 +'+='=89 +'default'=12 diff --git a/antlr/Java8Listener.java b/antlr/Java8Listener.java new file mode 100644 index 000000000..5b49ebda2 --- /dev/null +++ b/antlr/Java8Listener.java @@ -0,0 +1,1020 @@ +// Generated from Java8.g4 by ANTLR 4.4 +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link Java8Parser}. + */ +public interface Java8Listener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link Java8Parser#memberDeclaration}. + * @param ctx the parse tree + */ + void enterMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#memberDeclaration}. + * @param ctx the parse tree + */ + void exitMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#defaultValue}. + * @param ctx the parse tree + */ + void enterDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#defaultValue}. + * @param ctx the parse tree + */ + void exitDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationTypeElementDeclaration}. + * @param ctx the parse tree + */ + void enterAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationTypeElementDeclaration}. + * @param ctx the parse tree + */ + void exitAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#type}. + * @param ctx the parse tree + */ + void enterType(@NotNull Java8Parser.TypeContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#type}. + * @param ctx the parse tree + */ + void exitType(@NotNull Java8Parser.TypeContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationTypeBody}. + * @param ctx the parse tree + */ + void enterAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationTypeBody}. + * @param ctx the parse tree + */ + void exitAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#genericInterfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void enterGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#genericInterfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void exitGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#classBodyDeclaration}. + * @param ctx the parse tree + */ + void enterClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#classBodyDeclaration}. + * @param ctx the parse tree + */ + void exitClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#block}. + * @param ctx the parse tree + */ + void enterBlock(@NotNull Java8Parser.BlockContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#block}. + * @param ctx the parse tree + */ + void exitBlock(@NotNull Java8Parser.BlockContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#enumBodyDeclarations}. + * @param ctx the parse tree + */ + void enterEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#enumBodyDeclarations}. + * @param ctx the parse tree + */ + void exitEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#forUpdate}. + * @param ctx the parse tree + */ + void enterForUpdate(@NotNull Java8Parser.ForUpdateContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#forUpdate}. + * @param ctx the parse tree + */ + void exitForUpdate(@NotNull Java8Parser.ForUpdateContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#enhancedForControl}. + * @param ctx the parse tree + */ + void enterEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#enhancedForControl}. + * @param ctx the parse tree + */ + void exitEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationConstantRest}. + * @param ctx the parse tree + */ + void enterAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationConstantRest}. + * @param ctx the parse tree + */ + void exitAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#explicitGenericInvocation}. + * @param ctx the parse tree + */ + void enterExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#explicitGenericInvocation}. + * @param ctx the parse tree + */ + void exitExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#nonWildcardTypeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void enterNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#nonWildcardTypeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void exitNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#expressionList}. + * @param ctx the parse tree + */ + void enterExpressionList(@NotNull Java8Parser.ExpressionListContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#expressionList}. + * @param ctx the parse tree + */ + void exitExpressionList(@NotNull Java8Parser.ExpressionListContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationTypeElementRest}. + * @param ctx the parse tree + */ + void enterAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationTypeElementRest}. + * @param ctx the parse tree + */ + void exitAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#classOrInterfaceType}. + * @param ctx the parse tree + */ + void enterClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#classOrInterfaceType}. + * @param ctx the parse tree + */ + void exitClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeBound}. + * @param ctx the parse tree + */ + void enterTypeBound(@NotNull Java8Parser.TypeBoundContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeBound}. + * @param ctx the parse tree + */ + void exitTypeBound(@NotNull Java8Parser.TypeBoundContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#variableDeclaratorId}. + * @param ctx the parse tree + */ + void enterVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#variableDeclaratorId}. + * @param ctx the parse tree + */ + void exitVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#primary}. + * @param ctx the parse tree + */ + void enterPrimary(@NotNull Java8Parser.PrimaryContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#primary}. + * @param ctx the parse tree + */ + void exitPrimary(@NotNull Java8Parser.PrimaryContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#classCreatorRest}. + * @param ctx the parse tree + */ + void enterClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#classCreatorRest}. + * @param ctx the parse tree + */ + void exitClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#interfaceBodyDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#interfaceBodyDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeArguments}. + * @param ctx the parse tree + */ + void enterTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeArguments}. + * @param ctx the parse tree + */ + void exitTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationName}. + * @param ctx the parse tree + */ + void enterAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationName}. + * @param ctx the parse tree + */ + void exitAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#finallyBlock}. + * @param ctx the parse tree + */ + void enterFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#finallyBlock}. + * @param ctx the parse tree + */ + void exitFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeParameters}. + * @param ctx the parse tree + */ + void enterTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeParameters}. + * @param ctx the parse tree + */ + void exitTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#lastFormalParameter}. + * @param ctx the parse tree + */ + void enterLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#lastFormalParameter}. + * @param ctx the parse tree + */ + void exitLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#constructorBody}. + * @param ctx the parse tree + */ + void enterConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#constructorBody}. + * @param ctx the parse tree + */ + void exitConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#literal}. + * @param ctx the parse tree + */ + void enterLiteral(@NotNull Java8Parser.LiteralContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#literal}. + * @param ctx the parse tree + */ + void exitLiteral(@NotNull Java8Parser.LiteralContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationMethodOrConstantRest}. + * @param ctx the parse tree + */ + void enterAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationMethodOrConstantRest}. + * @param ctx the parse tree + */ + void exitAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#catchClause}. + * @param ctx the parse tree + */ + void enterCatchClause(@NotNull Java8Parser.CatchClauseContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#catchClause}. + * @param ctx the parse tree + */ + void exitCatchClause(@NotNull Java8Parser.CatchClauseContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#variableDeclarator}. + * @param ctx the parse tree + */ + void enterVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#variableDeclarator}. + * @param ctx the parse tree + */ + void exitVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeList}. + * @param ctx the parse tree + */ + void enterTypeList(@NotNull Java8Parser.TypeListContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeList}. + * @param ctx the parse tree + */ + void exitTypeList(@NotNull Java8Parser.TypeListContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#enumConstants}. + * @param ctx the parse tree + */ + void enterEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#enumConstants}. + * @param ctx the parse tree + */ + void exitEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#classBody}. + * @param ctx the parse tree + */ + void enterClassBody(@NotNull Java8Parser.ClassBodyContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#classBody}. + * @param ctx the parse tree + */ + void exitClassBody(@NotNull Java8Parser.ClassBodyContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#createdName}. + * @param ctx the parse tree + */ + void enterCreatedName(@NotNull Java8Parser.CreatedNameContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#createdName}. + * @param ctx the parse tree + */ + void exitCreatedName(@NotNull Java8Parser.CreatedNameContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#enumDeclaration}. + * @param ctx the parse tree + */ + void enterEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#enumDeclaration}. + * @param ctx the parse tree + */ + void exitEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#formalParameter}. + * @param ctx the parse tree + */ + void enterFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#formalParameter}. + * @param ctx the parse tree + */ + void exitFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#parExpression}. + * @param ctx the parse tree + */ + void enterParExpression(@NotNull Java8Parser.ParExpressionContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#parExpression}. + * @param ctx the parse tree + */ + void exitParExpression(@NotNull Java8Parser.ParExpressionContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotation}. + * @param ctx the parse tree + */ + void enterAnnotation(@NotNull Java8Parser.AnnotationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotation}. + * @param ctx the parse tree + */ + void exitAnnotation(@NotNull Java8Parser.AnnotationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#variableInitializer}. + * @param ctx the parse tree + */ + void enterVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#variableInitializer}. + * @param ctx the parse tree + */ + void exitVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#elementValueArrayInitializer}. + * @param ctx the parse tree + */ + void enterElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#elementValueArrayInitializer}. + * @param ctx the parse tree + */ + void exitElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#creator}. + * @param ctx the parse tree + */ + void enterCreator(@NotNull Java8Parser.CreatorContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#creator}. + * @param ctx the parse tree + */ + void exitCreator(@NotNull Java8Parser.CreatorContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#arrayCreatorRest}. + * @param ctx the parse tree + */ + void enterArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#arrayCreatorRest}. + * @param ctx the parse tree + */ + void exitArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#expression}. + * @param ctx the parse tree + */ + void enterExpression(@NotNull Java8Parser.ExpressionContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#expression}. + * @param ctx the parse tree + */ + void exitExpression(@NotNull Java8Parser.ExpressionContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#constantExpression}. + * @param ctx the parse tree + */ + void enterConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#constantExpression}. + * @param ctx the parse tree + */ + void exitConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#qualifiedNameList}. + * @param ctx the parse tree + */ + void enterQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#qualifiedNameList}. + * @param ctx the parse tree + */ + void exitQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#constructorDeclaration}. + * @param ctx the parse tree + */ + void enterConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#constructorDeclaration}. + * @param ctx the parse tree + */ + void exitConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#forControl}. + * @param ctx the parse tree + */ + void enterForControl(@NotNull Java8Parser.ForControlContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#forControl}. + * @param ctx the parse tree + */ + void exitForControl(@NotNull Java8Parser.ForControlContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#superSuffix}. + * @param ctx the parse tree + */ + void enterSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#superSuffix}. + * @param ctx the parse tree + */ + void exitSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#variableDeclarators}. + * @param ctx the parse tree + */ + void enterVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#variableDeclarators}. + * @param ctx the parse tree + */ + void exitVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#catchType}. + * @param ctx the parse tree + */ + void enterCatchType(@NotNull Java8Parser.CatchTypeContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#catchType}. + * @param ctx the parse tree + */ + void exitCatchType(@NotNull Java8Parser.CatchTypeContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#classOrInterfaceModifier}. + * @param ctx the parse tree + */ + void enterClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#classOrInterfaceModifier}. + * @param ctx the parse tree + */ + void exitClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#enumConstantName}. + * @param ctx the parse tree + */ + void enterEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#enumConstantName}. + * @param ctx the parse tree + */ + void exitEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#modifier}. + * @param ctx the parse tree + */ + void enterModifier(@NotNull Java8Parser.ModifierContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#modifier}. + * @param ctx the parse tree + */ + void exitModifier(@NotNull Java8Parser.ModifierContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#innerCreator}. + * @param ctx the parse tree + */ + void enterInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#innerCreator}. + * @param ctx the parse tree + */ + void exitInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#explicitGenericInvocationSuffix}. + * @param ctx the parse tree + */ + void enterExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#explicitGenericInvocationSuffix}. + * @param ctx the parse tree + */ + void exitExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#variableModifier}. + * @param ctx the parse tree + */ + void enterVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#variableModifier}. + * @param ctx the parse tree + */ + void exitVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#elementValuePair}. + * @param ctx the parse tree + */ + void enterElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#elementValuePair}. + * @param ctx the parse tree + */ + void exitElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#arrayInitializer}. + * @param ctx the parse tree + */ + void enterArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#arrayInitializer}. + * @param ctx the parse tree + */ + void exitArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#elementValue}. + * @param ctx the parse tree + */ + void enterElementValue(@NotNull Java8Parser.ElementValueContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#elementValue}. + * @param ctx the parse tree + */ + void exitElementValue(@NotNull Java8Parser.ElementValueContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#constDeclaration}. + * @param ctx the parse tree + */ + void enterConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#constDeclaration}. + * @param ctx the parse tree + */ + void exitConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#resource}. + * @param ctx the parse tree + */ + void enterResource(@NotNull Java8Parser.ResourceContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#resource}. + * @param ctx the parse tree + */ + void exitResource(@NotNull Java8Parser.ResourceContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#qualifiedName}. + * @param ctx the parse tree + */ + void enterQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#qualifiedName}. + * @param ctx the parse tree + */ + void exitQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#resourceSpecification}. + * @param ctx the parse tree + */ + void enterResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#resourceSpecification}. + * @param ctx the parse tree + */ + void exitResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#formalParameterList}. + * @param ctx the parse tree + */ + void enterFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#formalParameterList}. + * @param ctx the parse tree + */ + void exitFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationTypeDeclaration}. + * @param ctx the parse tree + */ + void enterAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationTypeDeclaration}. + * @param ctx the parse tree + */ + void exitAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#compilationUnit}. + * @param ctx the parse tree + */ + void enterCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#compilationUnit}. + * @param ctx the parse tree + */ + void exitCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationMethodRest}. + * @param ctx the parse tree + */ + void enterAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationMethodRest}. + * @param ctx the parse tree + */ + void exitAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#switchBlockStatementGroup}. + * @param ctx the parse tree + */ + void enterSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#switchBlockStatementGroup}. + * @param ctx the parse tree + */ + void exitSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeParameter}. + * @param ctx the parse tree + */ + void enterTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeParameter}. + * @param ctx the parse tree + */ + void exitTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#interfaceBody}. + * @param ctx the parse tree + */ + void enterInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#interfaceBody}. + * @param ctx the parse tree + */ + void exitInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#methodDeclaration}. + * @param ctx the parse tree + */ + void enterMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#methodDeclaration}. + * @param ctx the parse tree + */ + void exitMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#methodBody}. + * @param ctx the parse tree + */ + void enterMethodBody(@NotNull Java8Parser.MethodBodyContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#methodBody}. + * @param ctx the parse tree + */ + void exitMethodBody(@NotNull Java8Parser.MethodBodyContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeArgument}. + * @param ctx the parse tree + */ + void enterTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeArgument}. + * @param ctx the parse tree + */ + void exitTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeDeclaration}. + * @param ctx the parse tree + */ + void enterTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeDeclaration}. + * @param ctx the parse tree + */ + void exitTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#genericConstructorDeclaration}. + * @param ctx the parse tree + */ + void enterGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#genericConstructorDeclaration}. + * @param ctx the parse tree + */ + void exitGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#classDeclaration}. + * @param ctx the parse tree + */ + void enterClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#classDeclaration}. + * @param ctx the parse tree + */ + void exitClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#enumConstant}. + * @param ctx the parse tree + */ + void enterEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#enumConstant}. + * @param ctx the parse tree + */ + void exitEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#statement}. + * @param ctx the parse tree + */ + void enterStatement(@NotNull Java8Parser.StatementContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#statement}. + * @param ctx the parse tree + */ + void exitStatement(@NotNull Java8Parser.StatementContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#importDeclaration}. + * @param ctx the parse tree + */ + void enterImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#importDeclaration}. + * @param ctx the parse tree + */ + void exitImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#primitiveType}. + * @param ctx the parse tree + */ + void enterPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#primitiveType}. + * @param ctx the parse tree + */ + void exitPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#interfaceDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#interfaceDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#localVariableDeclarationStatement}. + * @param ctx the parse tree + */ + void enterLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#localVariableDeclarationStatement}. + * @param ctx the parse tree + */ + void exitLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#blockStatement}. + * @param ctx the parse tree + */ + void enterBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#blockStatement}. + * @param ctx the parse tree + */ + void exitBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#fieldDeclaration}. + * @param ctx the parse tree + */ + void enterFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#fieldDeclaration}. + * @param ctx the parse tree + */ + void exitFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#constantDeclarator}. + * @param ctx the parse tree + */ + void enterConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#constantDeclarator}. + * @param ctx the parse tree + */ + void exitConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#resources}. + * @param ctx the parse tree + */ + void enterResources(@NotNull Java8Parser.ResourcesContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#resources}. + * @param ctx the parse tree + */ + void exitResources(@NotNull Java8Parser.ResourcesContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#statementExpression}. + * @param ctx the parse tree + */ + void enterStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#statementExpression}. + * @param ctx the parse tree + */ + void exitStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#interfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#interfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#packageDeclaration}. + * @param ctx the parse tree + */ + void enterPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#packageDeclaration}. + * @param ctx the parse tree + */ + void exitPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#elementValuePairs}. + * @param ctx the parse tree + */ + void enterElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#elementValuePairs}. + * @param ctx the parse tree + */ + void exitElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#localVariableDeclaration}. + * @param ctx the parse tree + */ + void enterLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#localVariableDeclaration}. + * @param ctx the parse tree + */ + void exitLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#nonWildcardTypeArguments}. + * @param ctx the parse tree + */ + void enterNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#nonWildcardTypeArguments}. + * @param ctx the parse tree + */ + void exitNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#interfaceMemberDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#interfaceMemberDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#switchLabel}. + * @param ctx the parse tree + */ + void enterSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#switchLabel}. + * @param ctx the parse tree + */ + void exitSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#forInit}. + * @param ctx the parse tree + */ + void enterForInit(@NotNull Java8Parser.ForInitContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#forInit}. + * @param ctx the parse tree + */ + void exitForInit(@NotNull Java8Parser.ForInitContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#formalParameters}. + * @param ctx the parse tree + */ + void enterFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#formalParameters}. + * @param ctx the parse tree + */ + void exitFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#arguments}. + * @param ctx the parse tree + */ + void enterArguments(@NotNull Java8Parser.ArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#arguments}. + * @param ctx the parse tree + */ + void exitArguments(@NotNull Java8Parser.ArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#genericMethodDeclaration}. + * @param ctx the parse tree + */ + void enterGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#genericMethodDeclaration}. + * @param ctx the parse tree + */ + void exitGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void enterTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void exitTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx); +} \ No newline at end of file diff --git a/antlr/Java8Parser.java b/antlr/Java8Parser.java new file mode 100644 index 000000000..1ebb18417 --- /dev/null +++ b/antlr/Java8Parser.java @@ -0,0 +1,7695 @@ +// Generated from Java8.g4 by ANTLR 4.4 +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.misc.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; +import java.util.Iterator; +import java.util.ArrayList; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class Java8Parser extends Parser { + static { RuntimeMetaData.checkVersion("4.4", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + ABSTRACT=1, ASSERT=2, BOOLEAN=3, BREAK=4, BYTE=5, CASE=6, CATCH=7, CHAR=8, + CLASS=9, CONST=10, CONTINUE=11, DEFAULT=12, DO=13, DOUBLE=14, ELSE=15, + ENUM=16, EXTENDS=17, FINAL=18, FINALLY=19, FLOAT=20, FOR=21, IF=22, GOTO=23, + IMPLEMENTS=24, IMPORT=25, INSTANCEOF=26, INT=27, INTERFACE=28, LONG=29, + NATIVE=30, NEW=31, PACKAGE=32, PRIVATE=33, PROTECTED=34, PUBLIC=35, RETURN=36, + SHORT=37, STATIC=38, STRICTFP=39, SUPER=40, SWITCH=41, SYNCHRONIZED=42, + THIS=43, THROW=44, THROWS=45, TRANSIENT=46, TRY=47, VOID=48, VOLATILE=49, + WHILE=50, IntegerLiteral=51, FloatingPointLiteral=52, BooleanLiteral=53, + CharacterLiteral=54, StringLiteral=55, NullLiteral=56, LPAREN=57, RPAREN=58, + LBRACE=59, RBRACE=60, LBRACK=61, RBRACK=62, SEMI=63, COMMA=64, DOT=65, + ASSIGN=66, GT=67, LT=68, BANG=69, TILDE=70, QUESTION=71, COLON=72, EQUAL=73, + LE=74, GE=75, NOTEQUAL=76, AND=77, OR=78, INC=79, DEC=80, ADD=81, SUB=82, + MUL=83, DIV=84, BITAND=85, BITOR=86, CARET=87, MOD=88, ADD_ASSIGN=89, + SUB_ASSIGN=90, MUL_ASSIGN=91, DIV_ASSIGN=92, AND_ASSIGN=93, OR_ASSIGN=94, + XOR_ASSIGN=95, MOD_ASSIGN=96, LSHIFT_ASSIGN=97, RSHIFT_ASSIGN=98, URSHIFT_ASSIGN=99, + Identifier=100, AT=101, ELLIPSIS=102, WS=103, COMMENT=104, LINE_COMMENT=105; + public static final String[] tokenNames = { + "", "'abstract'", "'assert'", "'boolean'", "'break'", "'byte'", + "'case'", "'catch'", "'char'", "'class'", "'const'", "'continue'", "'default'", + "'do'", "'double'", "'else'", "'enum'", "'extends'", "'final'", "'finally'", + "'float'", "'for'", "'if'", "'goto'", "'implements'", "'import'", "'instanceof'", + "'int'", "'interface'", "'long'", "'native'", "'new'", "'package'", "'private'", + "'protected'", "'public'", "'return'", "'short'", "'static'", "'strictfp'", + "'super'", "'switch'", "'synchronized'", "'this'", "'throw'", "'throws'", + "'transient'", "'try'", "'void'", "'volatile'", "'while'", "IntegerLiteral", + "FloatingPointLiteral", "BooleanLiteral", "CharacterLiteral", "StringLiteral", + "'null'", "'('", "')'", "'{'", "'}'", "'['", "']'", "';'", "','", "'.'", + "'='", "'>'", "'<'", "'!'", "'~'", "'?'", "':'", "'=='", "'<='", "'>='", + "'!='", "'&&'", "'||'", "'++'", "'--'", "'+'", "'-'", "'*'", "'/'", "'&'", + "'|'", "'^'", "'%'", "'+='", "'-='", "'*='", "'/='", "'&='", "'|='", "'^='", + "'%='", "'<<='", "'>>='", "'>>>='", "Identifier", "'@'", "'...'", "WS", + "COMMENT", "LINE_COMMENT" + }; + public static final int + RULE_compilationUnit = 0, RULE_packageDeclaration = 1, RULE_importDeclaration = 2, + RULE_typeDeclaration = 3, RULE_modifier = 4, RULE_classOrInterfaceModifier = 5, + RULE_variableModifier = 6, RULE_classDeclaration = 7, RULE_typeParameters = 8, + RULE_typeParameter = 9, RULE_typeBound = 10, RULE_enumDeclaration = 11, + RULE_enumConstants = 12, RULE_enumConstant = 13, RULE_enumBodyDeclarations = 14, + RULE_interfaceDeclaration = 15, RULE_typeList = 16, RULE_classBody = 17, + RULE_interfaceBody = 18, RULE_classBodyDeclaration = 19, RULE_memberDeclaration = 20, + RULE_methodDeclaration = 21, RULE_genericMethodDeclaration = 22, RULE_constructorDeclaration = 23, + RULE_genericConstructorDeclaration = 24, RULE_fieldDeclaration = 25, RULE_interfaceBodyDeclaration = 26, + RULE_interfaceMemberDeclaration = 27, RULE_constDeclaration = 28, RULE_constantDeclarator = 29, + RULE_interfaceMethodDeclaration = 30, RULE_genericInterfaceMethodDeclaration = 31, + RULE_variableDeclarators = 32, RULE_variableDeclarator = 33, RULE_variableDeclaratorId = 34, + RULE_variableInitializer = 35, RULE_arrayInitializer = 36, RULE_enumConstantName = 37, + RULE_type = 38, RULE_classOrInterfaceType = 39, RULE_primitiveType = 40, + RULE_typeArguments = 41, RULE_typeArgument = 42, RULE_qualifiedNameList = 43, + RULE_formalParameters = 44, RULE_formalParameterList = 45, RULE_formalParameter = 46, + RULE_lastFormalParameter = 47, RULE_methodBody = 48, RULE_constructorBody = 49, + RULE_qualifiedName = 50, RULE_literal = 51, RULE_annotation = 52, RULE_annotationName = 53, + RULE_elementValuePairs = 54, RULE_elementValuePair = 55, RULE_elementValue = 56, + RULE_elementValueArrayInitializer = 57, RULE_annotationTypeDeclaration = 58, + RULE_annotationTypeBody = 59, RULE_annotationTypeElementDeclaration = 60, + RULE_annotationTypeElementRest = 61, RULE_annotationMethodOrConstantRest = 62, + RULE_annotationMethodRest = 63, RULE_annotationConstantRest = 64, RULE_defaultValue = 65, + RULE_block = 66, RULE_blockStatement = 67, RULE_localVariableDeclarationStatement = 68, + RULE_localVariableDeclaration = 69, RULE_statement = 70, RULE_catchClause = 71, + RULE_catchType = 72, RULE_finallyBlock = 73, RULE_resourceSpecification = 74, + RULE_resources = 75, RULE_resource = 76, RULE_switchBlockStatementGroup = 77, + RULE_switchLabel = 78, RULE_forControl = 79, RULE_forInit = 80, RULE_enhancedForControl = 81, + RULE_forUpdate = 82, RULE_parExpression = 83, RULE_expressionList = 84, + RULE_statementExpression = 85, RULE_constantExpression = 86, RULE_expression = 87, + RULE_primary = 88, RULE_creator = 89, RULE_createdName = 90, RULE_innerCreator = 91, + RULE_arrayCreatorRest = 92, RULE_classCreatorRest = 93, RULE_explicitGenericInvocation = 94, + RULE_nonWildcardTypeArguments = 95, RULE_typeArgumentsOrDiamond = 96, + RULE_nonWildcardTypeArgumentsOrDiamond = 97, RULE_superSuffix = 98, RULE_explicitGenericInvocationSuffix = 99, + RULE_arguments = 100; + public static final String[] ruleNames = { + "compilationUnit", "packageDeclaration", "importDeclaration", "typeDeclaration", + "modifier", "classOrInterfaceModifier", "variableModifier", "classDeclaration", + "typeParameters", "typeParameter", "typeBound", "enumDeclaration", "enumConstants", + "enumConstant", "enumBodyDeclarations", "interfaceDeclaration", "typeList", + "classBody", "interfaceBody", "classBodyDeclaration", "memberDeclaration", + "methodDeclaration", "genericMethodDeclaration", "constructorDeclaration", + "genericConstructorDeclaration", "fieldDeclaration", "interfaceBodyDeclaration", + "interfaceMemberDeclaration", "constDeclaration", "constantDeclarator", + "interfaceMethodDeclaration", "genericInterfaceMethodDeclaration", "variableDeclarators", + "variableDeclarator", "variableDeclaratorId", "variableInitializer", "arrayInitializer", + "enumConstantName", "type", "classOrInterfaceType", "primitiveType", "typeArguments", + "typeArgument", "qualifiedNameList", "formalParameters", "formalParameterList", + "formalParameter", "lastFormalParameter", "methodBody", "constructorBody", + "qualifiedName", "literal", "annotation", "annotationName", "elementValuePairs", + "elementValuePair", "elementValue", "elementValueArrayInitializer", "annotationTypeDeclaration", + "annotationTypeBody", "annotationTypeElementDeclaration", "annotationTypeElementRest", + "annotationMethodOrConstantRest", "annotationMethodRest", "annotationConstantRest", + "defaultValue", "block", "blockStatement", "localVariableDeclarationStatement", + "localVariableDeclaration", "statement", "catchClause", "catchType", "finallyBlock", + "resourceSpecification", "resources", "resource", "switchBlockStatementGroup", + "switchLabel", "forControl", "forInit", "enhancedForControl", "forUpdate", + "parExpression", "expressionList", "statementExpression", "constantExpression", + "expression", "primary", "creator", "createdName", "innerCreator", "arrayCreatorRest", + "classCreatorRest", "explicitGenericInvocation", "nonWildcardTypeArguments", + "typeArgumentsOrDiamond", "nonWildcardTypeArgumentsOrDiamond", "superSuffix", + "explicitGenericInvocationSuffix", "arguments" + }; + + @Override + public String getGrammarFileName() { return "Java8.g4"; } + + @Override + public String[] getTokenNames() { return tokenNames; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public Java8Parser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + public static class CompilationUnitContext extends ParserRuleContext { + public TypeDeclarationContext typeDeclaration(int i) { + return getRuleContext(TypeDeclarationContext.class,i); + } + public ImportDeclarationContext importDeclaration(int i) { + return getRuleContext(ImportDeclarationContext.class,i); + } + public List importDeclaration() { + return getRuleContexts(ImportDeclarationContext.class); + } + public TerminalNode EOF() { return getToken(Java8Parser.EOF, 0); } + public PackageDeclarationContext packageDeclaration() { + return getRuleContext(PackageDeclarationContext.class,0); + } + public List typeDeclaration() { + return getRuleContexts(TypeDeclarationContext.class); + } + public CompilationUnitContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_compilationUnit; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterCompilationUnit(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitCompilationUnit(this); + } + } + + public final CompilationUnitContext compilationUnit() throws RecognitionException { + CompilationUnitContext _localctx = new CompilationUnitContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_compilationUnit); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(203); + switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) { + case 1: + { + setState(202); packageDeclaration(); + } + break; + } + setState(208); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==IMPORT) { + { + { + setState(205); importDeclaration(); + } + } + setState(210); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(214); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << CLASS) | (1L << ENUM) | (1L << FINAL) | (1L << INTERFACE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP) | (1L << SEMI))) != 0) || _la==AT) { + { + { + setState(211); typeDeclaration(); + } + } + setState(216); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(217); match(EOF); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PackageDeclarationContext extends ParserRuleContext { + public List annotation() { + return getRuleContexts(AnnotationContext.class); + } + public QualifiedNameContext qualifiedName() { + return getRuleContext(QualifiedNameContext.class,0); + } + public AnnotationContext annotation(int i) { + return getRuleContext(AnnotationContext.class,i); + } + public PackageDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_packageDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterPackageDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitPackageDeclaration(this); + } + } + + public final PackageDeclarationContext packageDeclaration() throws RecognitionException { + PackageDeclarationContext _localctx = new PackageDeclarationContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_packageDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(222); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==AT) { + { + { + setState(219); annotation(); + } + } + setState(224); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(225); match(PACKAGE); + setState(226); qualifiedName(); + setState(227); match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImportDeclarationContext extends ParserRuleContext { + public QualifiedNameContext qualifiedName() { + return getRuleContext(QualifiedNameContext.class,0); + } + public ImportDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_importDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterImportDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitImportDeclaration(this); + } + } + + public final ImportDeclarationContext importDeclaration() throws RecognitionException { + ImportDeclarationContext _localctx = new ImportDeclarationContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_importDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(229); match(IMPORT); + setState(231); + _la = _input.LA(1); + if (_la==STATIC) { + { + setState(230); match(STATIC); + } + } + + setState(233); qualifiedName(); + setState(236); + _la = _input.LA(1); + if (_la==DOT) { + { + setState(234); match(DOT); + setState(235); match(MUL); + } + } + + setState(238); match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeDeclarationContext extends ParserRuleContext { + public ClassOrInterfaceModifierContext classOrInterfaceModifier(int i) { + return getRuleContext(ClassOrInterfaceModifierContext.class,i); + } + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public List classOrInterfaceModifier() { + return getRuleContexts(ClassOrInterfaceModifierContext.class); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public TypeDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeDeclaration(this); + } + } + + public final TypeDeclarationContext typeDeclaration() throws RecognitionException { + TypeDeclarationContext _localctx = new TypeDeclarationContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_typeDeclaration); + int _la; + try { + int _alt; + setState(269); + switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(243); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==AT) { + { + { + setState(240); classOrInterfaceModifier(); + } + } + setState(245); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(246); classDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(250); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==AT) { + { + { + setState(247); classOrInterfaceModifier(); + } + } + setState(252); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(253); enumDeclaration(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(257); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==AT) { + { + { + setState(254); classOrInterfaceModifier(); + } + } + setState(259); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(260); interfaceDeclaration(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(264); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,9,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(261); classOrInterfaceModifier(); + } + } + } + setState(266); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,9,_ctx); + } + setState(267); annotationTypeDeclaration(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(268); match(SEMI); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ModifierContext extends ParserRuleContext { + public ClassOrInterfaceModifierContext classOrInterfaceModifier() { + return getRuleContext(ClassOrInterfaceModifierContext.class,0); + } + public ModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_modifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitModifier(this); + } + } + + public final ModifierContext modifier() throws RecognitionException { + ModifierContext _localctx = new ModifierContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_modifier); + int _la; + try { + setState(273); + switch (_input.LA(1)) { + case ABSTRACT: + case FINAL: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case STATIC: + case STRICTFP: + case AT: + enterOuterAlt(_localctx, 1); + { + setState(271); classOrInterfaceModifier(); + } + break; + case NATIVE: + case SYNCHRONIZED: + case TRANSIENT: + case VOLATILE: + enterOuterAlt(_localctx, 2); + { + setState(272); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NATIVE) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOLATILE))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassOrInterfaceModifierContext extends ParserRuleContext { + public AnnotationContext annotation() { + return getRuleContext(AnnotationContext.class,0); + } + public ClassOrInterfaceModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classOrInterfaceModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterClassOrInterfaceModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitClassOrInterfaceModifier(this); + } + } + + public final ClassOrInterfaceModifierContext classOrInterfaceModifier() throws RecognitionException { + ClassOrInterfaceModifierContext _localctx = new ClassOrInterfaceModifierContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_classOrInterfaceModifier); + int _la; + try { + setState(277); + switch (_input.LA(1)) { + case AT: + enterOuterAlt(_localctx, 1); + { + setState(275); annotation(); + } + break; + case ABSTRACT: + case FINAL: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case STATIC: + case STRICTFP: + enterOuterAlt(_localctx, 2); + { + setState(276); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableModifierContext extends ParserRuleContext { + public AnnotationContext annotation() { + return getRuleContext(AnnotationContext.class,0); + } + public VariableModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterVariableModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitVariableModifier(this); + } + } + + public final VariableModifierContext variableModifier() throws RecognitionException { + VariableModifierContext _localctx = new VariableModifierContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_variableModifier); + try { + setState(281); + switch (_input.LA(1)) { + case FINAL: + enterOuterAlt(_localctx, 1); + { + setState(279); match(FINAL); + } + break; + case AT: + enterOuterAlt(_localctx, 2); + { + setState(280); annotation(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public TypeListContext typeList() { + return getRuleContext(TypeListContext.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public ClassDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterClassDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitClassDeclaration(this); + } + } + + public final ClassDeclarationContext classDeclaration() throws RecognitionException { + ClassDeclarationContext _localctx = new ClassDeclarationContext(_ctx, getState()); + enterRule(_localctx, 14, RULE_classDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(283); match(CLASS); + setState(284); match(Identifier); + setState(286); + _la = _input.LA(1); + if (_la==LT) { + { + setState(285); typeParameters(); + } + } + + setState(290); + _la = _input.LA(1); + if (_la==EXTENDS) { + { + setState(288); match(EXTENDS); + setState(289); type(); + } + } + + setState(294); + _la = _input.LA(1); + if (_la==IMPLEMENTS) { + { + setState(292); match(IMPLEMENTS); + setState(293); typeList(); + } + } + + setState(296); classBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeParametersContext extends ParserRuleContext { + public List typeParameter() { + return getRuleContexts(TypeParameterContext.class); + } + public TypeParameterContext typeParameter(int i) { + return getRuleContext(TypeParameterContext.class,i); + } + public TypeParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeParameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeParameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeParameters(this); + } + } + + public final TypeParametersContext typeParameters() throws RecognitionException { + TypeParametersContext _localctx = new TypeParametersContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_typeParameters); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(298); match(LT); + setState(299); typeParameter(); + setState(304); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(300); match(COMMA); + setState(301); typeParameter(); + } + } + setState(306); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(307); match(GT); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeParameterContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public TypeBoundContext typeBound() { + return getRuleContext(TypeBoundContext.class,0); + } + public TypeParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeParameter(this); + } + } + + public final TypeParameterContext typeParameter() throws RecognitionException { + TypeParameterContext _localctx = new TypeParameterContext(_ctx, getState()); + enterRule(_localctx, 18, RULE_typeParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(309); match(Identifier); + setState(312); + _la = _input.LA(1); + if (_la==EXTENDS) { + { + setState(310); match(EXTENDS); + setState(311); typeBound(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeBoundContext extends ParserRuleContext { + public TypeContext type(int i) { + return getRuleContext(TypeContext.class,i); + } + public List type() { + return getRuleContexts(TypeContext.class); + } + public TypeBoundContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeBound; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeBound(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeBound(this); + } + } + + public final TypeBoundContext typeBound() throws RecognitionException { + TypeBoundContext _localctx = new TypeBoundContext(_ctx, getState()); + enterRule(_localctx, 20, RULE_typeBound); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(314); type(); + setState(319); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==BITAND) { + { + { + setState(315); match(BITAND); + setState(316); type(); + } + } + setState(321); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumDeclarationContext extends ParserRuleContext { + public EnumBodyDeclarationsContext enumBodyDeclarations() { + return getRuleContext(EnumBodyDeclarationsContext.class,0); + } + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public TypeListContext typeList() { + return getRuleContext(TypeListContext.class,0); + } + public TerminalNode ENUM() { return getToken(Java8Parser.ENUM, 0); } + public EnumConstantsContext enumConstants() { + return getRuleContext(EnumConstantsContext.class,0); + } + public EnumDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterEnumDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitEnumDeclaration(this); + } + } + + public final EnumDeclarationContext enumDeclaration() throws RecognitionException { + EnumDeclarationContext _localctx = new EnumDeclarationContext(_ctx, getState()); + enterRule(_localctx, 22, RULE_enumDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(322); match(ENUM); + setState(323); match(Identifier); + setState(326); + _la = _input.LA(1); + if (_la==IMPLEMENTS) { + { + setState(324); match(IMPLEMENTS); + setState(325); typeList(); + } + } + + setState(328); match(LBRACE); + setState(330); + _la = _input.LA(1); + if (_la==Identifier || _la==AT) { + { + setState(329); enumConstants(); + } + } + + setState(333); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(332); match(COMMA); + } + } + + setState(336); + _la = _input.LA(1); + if (_la==SEMI) { + { + setState(335); enumBodyDeclarations(); + } + } + + setState(338); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumConstantsContext extends ParserRuleContext { + public List enumConstant() { + return getRuleContexts(EnumConstantContext.class); + } + public EnumConstantContext enumConstant(int i) { + return getRuleContext(EnumConstantContext.class,i); + } + public EnumConstantsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumConstants; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterEnumConstants(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitEnumConstants(this); + } + } + + public final EnumConstantsContext enumConstants() throws RecognitionException { + EnumConstantsContext _localctx = new EnumConstantsContext(_ctx, getState()); + enterRule(_localctx, 24, RULE_enumConstants); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(340); enumConstant(); + setState(345); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,24,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(341); match(COMMA); + setState(342); enumConstant(); + } + } + } + setState(347); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,24,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumConstantContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public List annotation() { + return getRuleContexts(AnnotationContext.class); + } + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public AnnotationContext annotation(int i) { + return getRuleContext(AnnotationContext.class,i); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public EnumConstantContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumConstant; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterEnumConstant(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitEnumConstant(this); + } + } + + public final EnumConstantContext enumConstant() throws RecognitionException { + EnumConstantContext _localctx = new EnumConstantContext(_ctx, getState()); + enterRule(_localctx, 26, RULE_enumConstant); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(351); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==AT) { + { + { + setState(348); annotation(); + } + } + setState(353); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(354); match(Identifier); + setState(356); + _la = _input.LA(1); + if (_la==LPAREN) { + { + setState(355); arguments(); + } + } + + setState(359); + _la = _input.LA(1); + if (_la==LBRACE) { + { + setState(358); classBody(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumBodyDeclarationsContext extends ParserRuleContext { + public List classBodyDeclaration() { + return getRuleContexts(ClassBodyDeclarationContext.class); + } + public ClassBodyDeclarationContext classBodyDeclaration(int i) { + return getRuleContext(ClassBodyDeclarationContext.class,i); + } + public EnumBodyDeclarationsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumBodyDeclarations; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterEnumBodyDeclarations(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitEnumBodyDeclarations(this); + } + } + + public final EnumBodyDeclarationsContext enumBodyDeclarations() throws RecognitionException { + EnumBodyDeclarationsContext _localctx = new EnumBodyDeclarationsContext(_ctx, getState()); + enterRule(_localctx, 28, RULE_enumBodyDeclarations); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(361); match(SEMI); + setState(365); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOID) | (1L << VOLATILE) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + { + setState(362); classBodyDeclaration(); + } + } + setState(367); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public InterfaceBodyContext interfaceBody() { + return getRuleContext(InterfaceBodyContext.class,0); + } + public TypeListContext typeList() { + return getRuleContext(TypeListContext.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public InterfaceDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterInterfaceDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitInterfaceDeclaration(this); + } + } + + public final InterfaceDeclarationContext interfaceDeclaration() throws RecognitionException { + InterfaceDeclarationContext _localctx = new InterfaceDeclarationContext(_ctx, getState()); + enterRule(_localctx, 30, RULE_interfaceDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(368); match(INTERFACE); + setState(369); match(Identifier); + setState(371); + _la = _input.LA(1); + if (_la==LT) { + { + setState(370); typeParameters(); + } + } + + setState(375); + _la = _input.LA(1); + if (_la==EXTENDS) { + { + setState(373); match(EXTENDS); + setState(374); typeList(); + } + } + + setState(377); interfaceBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeListContext extends ParserRuleContext { + public TypeContext type(int i) { + return getRuleContext(TypeContext.class,i); + } + public List type() { + return getRuleContexts(TypeContext.class); + } + public TypeListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeList(this); + } + } + + public final TypeListContext typeList() throws RecognitionException { + TypeListContext _localctx = new TypeListContext(_ctx, getState()); + enterRule(_localctx, 32, RULE_typeList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(379); type(); + setState(384); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(380); match(COMMA); + setState(381); type(); + } + } + setState(386); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassBodyContext extends ParserRuleContext { + public List classBodyDeclaration() { + return getRuleContexts(ClassBodyDeclarationContext.class); + } + public ClassBodyDeclarationContext classBodyDeclaration(int i) { + return getRuleContext(ClassBodyDeclarationContext.class,i); + } + public ClassBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterClassBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitClassBody(this); + } + } + + public final ClassBodyContext classBody() throws RecognitionException { + ClassBodyContext _localctx = new ClassBodyContext(_ctx, getState()); + enterRule(_localctx, 34, RULE_classBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(387); match(LBRACE); + setState(391); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOID) | (1L << VOLATILE) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + { + setState(388); classBodyDeclaration(); + } + } + setState(393); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(394); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceBodyContext extends ParserRuleContext { + public List interfaceBodyDeclaration() { + return getRuleContexts(InterfaceBodyDeclarationContext.class); + } + public InterfaceBodyDeclarationContext interfaceBodyDeclaration(int i) { + return getRuleContext(InterfaceBodyDeclarationContext.class,i); + } + public InterfaceBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterInterfaceBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitInterfaceBody(this); + } + } + + public final InterfaceBodyContext interfaceBody() throws RecognitionException { + InterfaceBodyContext _localctx = new InterfaceBodyContext(_ctx, getState()); + enterRule(_localctx, 36, RULE_interfaceBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(396); match(LBRACE); + setState(400); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOID) | (1L << VOLATILE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + { + setState(397); interfaceBodyDeclaration(); + } + } + setState(402); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(403); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassBodyDeclarationContext extends ParserRuleContext { + public List modifier() { + return getRuleContexts(ModifierContext.class); + } + public MemberDeclarationContext memberDeclaration() { + return getRuleContext(MemberDeclarationContext.class,0); + } + public ModifierContext modifier(int i) { + return getRuleContext(ModifierContext.class,i); + } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public ClassBodyDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classBodyDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterClassBodyDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitClassBodyDeclaration(this); + } + } + + public final ClassBodyDeclarationContext classBodyDeclaration() throws RecognitionException { + ClassBodyDeclarationContext _localctx = new ClassBodyDeclarationContext(_ctx, getState()); + enterRule(_localctx, 38, RULE_classBodyDeclaration); + int _la; + try { + int _alt; + setState(417); + switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(405); match(SEMI); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(407); + _la = _input.LA(1); + if (_la==STATIC) { + { + setState(406); match(STATIC); + } + } + + setState(409); block(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(413); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(410); modifier(); + } + } + } + setState(415); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); + } + setState(416); memberDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MemberDeclarationContext extends ParserRuleContext { + public GenericMethodDeclarationContext genericMethodDeclaration() { + return getRuleContext(GenericMethodDeclarationContext.class,0); + } + public MethodDeclarationContext methodDeclaration() { + return getRuleContext(MethodDeclarationContext.class,0); + } + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public GenericConstructorDeclarationContext genericConstructorDeclaration() { + return getRuleContext(GenericConstructorDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public ConstructorDeclarationContext constructorDeclaration() { + return getRuleContext(ConstructorDeclarationContext.class,0); + } + public FieldDeclarationContext fieldDeclaration() { + return getRuleContext(FieldDeclarationContext.class,0); + } + public MemberDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_memberDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterMemberDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitMemberDeclaration(this); + } + } + + public final MemberDeclarationContext memberDeclaration() throws RecognitionException { + MemberDeclarationContext _localctx = new MemberDeclarationContext(_ctx, getState()); + enterRule(_localctx, 40, RULE_memberDeclaration); + try { + setState(428); + switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(419); methodDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(420); genericMethodDeclaration(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(421); fieldDeclaration(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(422); constructorDeclaration(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(423); genericConstructorDeclaration(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(424); interfaceDeclaration(); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(425); annotationTypeDeclaration(); + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(426); classDeclaration(); + } + break; + case 9: + enterOuterAlt(_localctx, 9); + { + setState(427); enumDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MethodDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public MethodBodyContext methodBody() { + return getRuleContext(MethodBodyContext.class,0); + } + public QualifiedNameListContext qualifiedNameList() { + return getRuleContext(QualifiedNameListContext.class,0); + } + public FormalParametersContext formalParameters() { + return getRuleContext(FormalParametersContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public MethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_methodDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterMethodDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitMethodDeclaration(this); + } + } + + public final MethodDeclarationContext methodDeclaration() throws RecognitionException { + MethodDeclarationContext _localctx = new MethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 42, RULE_methodDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(432); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + { + setState(430); type(); + } + break; + case VOID: + { + setState(431); match(VOID); + } + break; + default: + throw new NoViableAltException(this); + } + setState(434); match(Identifier); + setState(435); formalParameters(); + setState(440); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(436); match(LBRACK); + setState(437); match(RBRACK); + } + } + setState(442); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(445); + _la = _input.LA(1); + if (_la==THROWS) { + { + setState(443); match(THROWS); + setState(444); qualifiedNameList(); + } + } + + setState(449); + switch (_input.LA(1)) { + case LBRACE: + { + setState(447); methodBody(); + } + break; + case SEMI: + { + setState(448); match(SEMI); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GenericMethodDeclarationContext extends ParserRuleContext { + public MethodDeclarationContext methodDeclaration() { + return getRuleContext(MethodDeclarationContext.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public GenericMethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_genericMethodDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterGenericMethodDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitGenericMethodDeclaration(this); + } + } + + public final GenericMethodDeclarationContext genericMethodDeclaration() throws RecognitionException { + GenericMethodDeclarationContext _localctx = new GenericMethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 44, RULE_genericMethodDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(451); typeParameters(); + setState(452); methodDeclaration(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstructorDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public ConstructorBodyContext constructorBody() { + return getRuleContext(ConstructorBodyContext.class,0); + } + public QualifiedNameListContext qualifiedNameList() { + return getRuleContext(QualifiedNameListContext.class,0); + } + public FormalParametersContext formalParameters() { + return getRuleContext(FormalParametersContext.class,0); + } + public ConstructorDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constructorDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterConstructorDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitConstructorDeclaration(this); + } + } + + public final ConstructorDeclarationContext constructorDeclaration() throws RecognitionException { + ConstructorDeclarationContext _localctx = new ConstructorDeclarationContext(_ctx, getState()); + enterRule(_localctx, 46, RULE_constructorDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(454); match(Identifier); + setState(455); formalParameters(); + setState(458); + _la = _input.LA(1); + if (_la==THROWS) { + { + setState(456); match(THROWS); + setState(457); qualifiedNameList(); + } + } + + setState(460); constructorBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GenericConstructorDeclarationContext extends ParserRuleContext { + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public ConstructorDeclarationContext constructorDeclaration() { + return getRuleContext(ConstructorDeclarationContext.class,0); + } + public GenericConstructorDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_genericConstructorDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterGenericConstructorDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitGenericConstructorDeclaration(this); + } + } + + public final GenericConstructorDeclarationContext genericConstructorDeclaration() throws RecognitionException { + GenericConstructorDeclarationContext _localctx = new GenericConstructorDeclarationContext(_ctx, getState()); + enterRule(_localctx, 48, RULE_genericConstructorDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(462); typeParameters(); + setState(463); constructorDeclaration(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FieldDeclarationContext extends ParserRuleContext { + public VariableDeclaratorsContext variableDeclarators() { + return getRuleContext(VariableDeclaratorsContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public FieldDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_fieldDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterFieldDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitFieldDeclaration(this); + } + } + + public final FieldDeclarationContext fieldDeclaration() throws RecognitionException { + FieldDeclarationContext _localctx = new FieldDeclarationContext(_ctx, getState()); + enterRule(_localctx, 50, RULE_fieldDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(465); type(); + setState(466); variableDeclarators(); + setState(467); match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceBodyDeclarationContext extends ParserRuleContext { + public List modifier() { + return getRuleContexts(ModifierContext.class); + } + public ModifierContext modifier(int i) { + return getRuleContext(ModifierContext.class,i); + } + public InterfaceMemberDeclarationContext interfaceMemberDeclaration() { + return getRuleContext(InterfaceMemberDeclarationContext.class,0); + } + public InterfaceBodyDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceBodyDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterInterfaceBodyDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitInterfaceBodyDeclaration(this); + } + } + + public final InterfaceBodyDeclarationContext interfaceBodyDeclaration() throws RecognitionException { + InterfaceBodyDeclarationContext _localctx = new InterfaceBodyDeclarationContext(_ctx, getState()); + enterRule(_localctx, 52, RULE_interfaceBodyDeclaration); + try { + int _alt; + setState(477); + switch (_input.LA(1)) { + case ABSTRACT: + case BOOLEAN: + case BYTE: + case CHAR: + case CLASS: + case DOUBLE: + case ENUM: + case FINAL: + case FLOAT: + case INT: + case INTERFACE: + case LONG: + case NATIVE: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case SHORT: + case STATIC: + case STRICTFP: + case SYNCHRONIZED: + case TRANSIENT: + case VOID: + case VOLATILE: + case LT: + case Identifier: + case AT: + enterOuterAlt(_localctx, 1); + { + setState(472); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,43,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(469); modifier(); + } + } + } + setState(474); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,43,_ctx); + } + setState(475); interfaceMemberDeclaration(); + } + break; + case SEMI: + enterOuterAlt(_localctx, 2); + { + setState(476); match(SEMI); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceMemberDeclarationContext extends ParserRuleContext { + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public GenericInterfaceMethodDeclarationContext genericInterfaceMethodDeclaration() { + return getRuleContext(GenericInterfaceMethodDeclarationContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public ConstDeclarationContext constDeclaration() { + return getRuleContext(ConstDeclarationContext.class,0); + } + public InterfaceMethodDeclarationContext interfaceMethodDeclaration() { + return getRuleContext(InterfaceMethodDeclarationContext.class,0); + } + public InterfaceMemberDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceMemberDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterInterfaceMemberDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitInterfaceMemberDeclaration(this); + } + } + + public final InterfaceMemberDeclarationContext interfaceMemberDeclaration() throws RecognitionException { + InterfaceMemberDeclarationContext _localctx = new InterfaceMemberDeclarationContext(_ctx, getState()); + enterRule(_localctx, 54, RULE_interfaceMemberDeclaration); + try { + setState(486); + switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(479); constDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(480); interfaceMethodDeclaration(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(481); genericInterfaceMethodDeclaration(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(482); interfaceDeclaration(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(483); annotationTypeDeclaration(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(484); classDeclaration(); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(485); enumDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstDeclarationContext extends ParserRuleContext { + public ConstantDeclaratorContext constantDeclarator(int i) { + return getRuleContext(ConstantDeclaratorContext.class,i); + } + public List constantDeclarator() { + return getRuleContexts(ConstantDeclaratorContext.class); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public ConstDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterConstDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitConstDeclaration(this); + } + } + + public final ConstDeclarationContext constDeclaration() throws RecognitionException { + ConstDeclarationContext _localctx = new ConstDeclarationContext(_ctx, getState()); + enterRule(_localctx, 56, RULE_constDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(488); type(); + setState(489); constantDeclarator(); + setState(494); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(490); match(COMMA); + setState(491); constantDeclarator(); + } + } + setState(496); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(497); match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstantDeclaratorContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public VariableInitializerContext variableInitializer() { + return getRuleContext(VariableInitializerContext.class,0); + } + public ConstantDeclaratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constantDeclarator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterConstantDeclarator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitConstantDeclarator(this); + } + } + + public final ConstantDeclaratorContext constantDeclarator() throws RecognitionException { + ConstantDeclaratorContext _localctx = new ConstantDeclaratorContext(_ctx, getState()); + enterRule(_localctx, 58, RULE_constantDeclarator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(499); match(Identifier); + setState(504); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(500); match(LBRACK); + setState(501); match(RBRACK); + } + } + setState(506); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(507); match(ASSIGN); + setState(508); variableInitializer(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceMethodDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public QualifiedNameListContext qualifiedNameList() { + return getRuleContext(QualifiedNameListContext.class,0); + } + public FormalParametersContext formalParameters() { + return getRuleContext(FormalParametersContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public InterfaceMethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceMethodDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterInterfaceMethodDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitInterfaceMethodDeclaration(this); + } + } + + public final InterfaceMethodDeclarationContext interfaceMethodDeclaration() throws RecognitionException { + InterfaceMethodDeclarationContext _localctx = new InterfaceMethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 60, RULE_interfaceMethodDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(512); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + { + setState(510); type(); + } + break; + case VOID: + { + setState(511); match(VOID); + } + break; + default: + throw new NoViableAltException(this); + } + setState(514); match(Identifier); + setState(515); formalParameters(); + setState(520); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(516); match(LBRACK); + setState(517); match(RBRACK); + } + } + setState(522); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(525); + _la = _input.LA(1); + if (_la==THROWS) { + { + setState(523); match(THROWS); + setState(524); qualifiedNameList(); + } + } + + setState(527); match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GenericInterfaceMethodDeclarationContext extends ParserRuleContext { + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public InterfaceMethodDeclarationContext interfaceMethodDeclaration() { + return getRuleContext(InterfaceMethodDeclarationContext.class,0); + } + public GenericInterfaceMethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_genericInterfaceMethodDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterGenericInterfaceMethodDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitGenericInterfaceMethodDeclaration(this); + } + } + + public final GenericInterfaceMethodDeclarationContext genericInterfaceMethodDeclaration() throws RecognitionException { + GenericInterfaceMethodDeclarationContext _localctx = new GenericInterfaceMethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 62, RULE_genericInterfaceMethodDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(529); typeParameters(); + setState(530); interfaceMethodDeclaration(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclaratorsContext extends ParserRuleContext { + public List variableDeclarator() { + return getRuleContexts(VariableDeclaratorContext.class); + } + public VariableDeclaratorContext variableDeclarator(int i) { + return getRuleContext(VariableDeclaratorContext.class,i); + } + public VariableDeclaratorsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclarators; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterVariableDeclarators(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitVariableDeclarators(this); + } + } + + public final VariableDeclaratorsContext variableDeclarators() throws RecognitionException { + VariableDeclaratorsContext _localctx = new VariableDeclaratorsContext(_ctx, getState()); + enterRule(_localctx, 64, RULE_variableDeclarators); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(532); variableDeclarator(); + setState(537); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(533); match(COMMA); + setState(534); variableDeclarator(); + } + } + setState(539); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclaratorContext extends ParserRuleContext { + public VariableInitializerContext variableInitializer() { + return getRuleContext(VariableInitializerContext.class,0); + } + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public VariableDeclaratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclarator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterVariableDeclarator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitVariableDeclarator(this); + } + } + + public final VariableDeclaratorContext variableDeclarator() throws RecognitionException { + VariableDeclaratorContext _localctx = new VariableDeclaratorContext(_ctx, getState()); + enterRule(_localctx, 66, RULE_variableDeclarator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(540); variableDeclaratorId(); + setState(543); + _la = _input.LA(1); + if (_la==ASSIGN) { + { + setState(541); match(ASSIGN); + setState(542); variableInitializer(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclaratorIdContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public VariableDeclaratorIdContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclaratorId; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterVariableDeclaratorId(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitVariableDeclaratorId(this); + } + } + + public final VariableDeclaratorIdContext variableDeclaratorId() throws RecognitionException { + VariableDeclaratorIdContext _localctx = new VariableDeclaratorIdContext(_ctx, getState()); + enterRule(_localctx, 68, RULE_variableDeclaratorId); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(545); match(Identifier); + setState(550); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(546); match(LBRACK); + setState(547); match(RBRACK); + } + } + setState(552); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableInitializerContext extends ParserRuleContext { + public ArrayInitializerContext arrayInitializer() { + return getRuleContext(ArrayInitializerContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public VariableInitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableInitializer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterVariableInitializer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitVariableInitializer(this); + } + } + + public final VariableInitializerContext variableInitializer() throws RecognitionException { + VariableInitializerContext _localctx = new VariableInitializerContext(_ctx, getState()); + enterRule(_localctx, 70, RULE_variableInitializer); + try { + setState(555); + switch (_input.LA(1)) { + case LBRACE: + enterOuterAlt(_localctx, 1); + { + setState(553); arrayInitializer(); + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case NEW: + case SHORT: + case SUPER: + case THIS: + case VOID: + case IntegerLiteral: + case FloatingPointLiteral: + case BooleanLiteral: + case CharacterLiteral: + case StringLiteral: + case NullLiteral: + case LPAREN: + case LT: + case BANG: + case TILDE: + case INC: + case DEC: + case ADD: + case SUB: + case Identifier: + enterOuterAlt(_localctx, 2); + { + setState(554); expression(0); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrayInitializerContext extends ParserRuleContext { + public List variableInitializer() { + return getRuleContexts(VariableInitializerContext.class); + } + public VariableInitializerContext variableInitializer(int i) { + return getRuleContext(VariableInitializerContext.class,i); + } + public ArrayInitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayInitializer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterArrayInitializer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitArrayInitializer(this); + } + } + + public final ArrayInitializerContext arrayInitializer() throws RecognitionException { + ArrayInitializerContext _localctx = new ArrayInitializerContext(_ctx, getState()); + enterRule(_localctx, 72, RULE_arrayInitializer); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(557); match(LBRACE); + setState(569); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(558); variableInitializer(); + setState(563); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,55,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(559); match(COMMA); + setState(560); variableInitializer(); + } + } + } + setState(565); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,55,_ctx); + } + setState(567); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(566); match(COMMA); + } + } + + } + } + + setState(571); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumConstantNameContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public EnumConstantNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumConstantName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterEnumConstantName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitEnumConstantName(this); + } + } + + public final EnumConstantNameContext enumConstantName() throws RecognitionException { + EnumConstantNameContext _localctx = new EnumConstantNameContext(_ctx, getState()); + enterRule(_localctx, 74, RULE_enumConstantName); + try { + enterOuterAlt(_localctx, 1); + { + setState(573); match(Identifier); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeContext extends ParserRuleContext { + public PrimitiveTypeContext primitiveType() { + return getRuleContext(PrimitiveTypeContext.class,0); + } + public ClassOrInterfaceTypeContext classOrInterfaceType() { + return getRuleContext(ClassOrInterfaceTypeContext.class,0); + } + public TypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_type; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitType(this); + } + } + + public final TypeContext type() throws RecognitionException { + TypeContext _localctx = new TypeContext(_ctx, getState()); + enterRule(_localctx, 76, RULE_type); + try { + int _alt; + setState(591); + switch (_input.LA(1)) { + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(575); classOrInterfaceType(); + setState(580); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,58,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(576); match(LBRACK); + setState(577); match(RBRACK); + } + } + } + setState(582); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,58,_ctx); + } + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + enterOuterAlt(_localctx, 2); + { + setState(583); primitiveType(); + setState(588); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,59,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(584); match(LBRACK); + setState(585); match(RBRACK); + } + } + } + setState(590); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,59,_ctx); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassOrInterfaceTypeContext extends ParserRuleContext { + public List typeArguments() { + return getRuleContexts(TypeArgumentsContext.class); + } + public List Identifier() { return getTokens(Java8Parser.Identifier); } + public TerminalNode Identifier(int i) { + return getToken(Java8Parser.Identifier, i); + } + public TypeArgumentsContext typeArguments(int i) { + return getRuleContext(TypeArgumentsContext.class,i); + } + public ClassOrInterfaceTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classOrInterfaceType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterClassOrInterfaceType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitClassOrInterfaceType(this); + } + } + + public final ClassOrInterfaceTypeContext classOrInterfaceType() throws RecognitionException { + ClassOrInterfaceTypeContext _localctx = new ClassOrInterfaceTypeContext(_ctx, getState()); + enterRule(_localctx, 78, RULE_classOrInterfaceType); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(593); match(Identifier); + setState(595); + switch ( getInterpreter().adaptivePredict(_input,61,_ctx) ) { + case 1: + { + setState(594); typeArguments(); + } + break; + } + setState(604); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,63,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(597); match(DOT); + setState(598); match(Identifier); + setState(600); + switch ( getInterpreter().adaptivePredict(_input,62,_ctx) ) { + case 1: + { + setState(599); typeArguments(); + } + break; + } + } + } + } + setState(606); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,63,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PrimitiveTypeContext extends ParserRuleContext { + public PrimitiveTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_primitiveType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterPrimitiveType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitPrimitiveType(this); + } + } + + public final PrimitiveTypeContext primitiveType() throws RecognitionException { + PrimitiveTypeContext _localctx = new PrimitiveTypeContext(_ctx, getState()); + enterRule(_localctx, 80, RULE_primitiveType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(607); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << SHORT))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentsContext extends ParserRuleContext { + public List typeArgument() { + return getRuleContexts(TypeArgumentContext.class); + } + public TypeArgumentContext typeArgument(int i) { + return getRuleContext(TypeArgumentContext.class,i); + } + public TypeArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeArguments(this); + } + } + + public final TypeArgumentsContext typeArguments() throws RecognitionException { + TypeArgumentsContext _localctx = new TypeArgumentsContext(_ctx, getState()); + enterRule(_localctx, 82, RULE_typeArguments); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(609); match(LT); + setState(610); typeArgument(); + setState(615); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(611); match(COMMA); + setState(612); typeArgument(); + } + } + setState(617); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(618); match(GT); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentContext extends ParserRuleContext { + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public TypeArgumentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArgument; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeArgument(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeArgument(this); + } + } + + public final TypeArgumentContext typeArgument() throws RecognitionException { + TypeArgumentContext _localctx = new TypeArgumentContext(_ctx, getState()); + enterRule(_localctx, 84, RULE_typeArgument); + int _la; + try { + setState(626); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(620); type(); + } + break; + case QUESTION: + enterOuterAlt(_localctx, 2); + { + setState(621); match(QUESTION); + setState(624); + _la = _input.LA(1); + if (_la==EXTENDS || _la==SUPER) { + { + setState(622); + _la = _input.LA(1); + if ( !(_la==EXTENDS || _la==SUPER) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(623); type(); + } + } + + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class QualifiedNameListContext extends ParserRuleContext { + public List qualifiedName() { + return getRuleContexts(QualifiedNameContext.class); + } + public QualifiedNameContext qualifiedName(int i) { + return getRuleContext(QualifiedNameContext.class,i); + } + public QualifiedNameListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_qualifiedNameList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterQualifiedNameList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitQualifiedNameList(this); + } + } + + public final QualifiedNameListContext qualifiedNameList() throws RecognitionException { + QualifiedNameListContext _localctx = new QualifiedNameListContext(_ctx, getState()); + enterRule(_localctx, 86, RULE_qualifiedNameList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(628); qualifiedName(); + setState(633); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(629); match(COMMA); + setState(630); qualifiedName(); + } + } + setState(635); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FormalParametersContext extends ParserRuleContext { + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public FormalParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_formalParameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterFormalParameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitFormalParameters(this); + } + } + + public final FormalParametersContext formalParameters() throws RecognitionException { + FormalParametersContext _localctx = new FormalParametersContext(_ctx, getState()); + enterRule(_localctx, 88, RULE_formalParameters); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(636); match(LPAREN); + setState(638); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << SHORT))) != 0) || _la==Identifier || _la==AT) { + { + setState(637); formalParameterList(); + } + } + + setState(640); match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FormalParameterListContext extends ParserRuleContext { + public List formalParameter() { + return getRuleContexts(FormalParameterContext.class); + } + public LastFormalParameterContext lastFormalParameter() { + return getRuleContext(LastFormalParameterContext.class,0); + } + public FormalParameterContext formalParameter(int i) { + return getRuleContext(FormalParameterContext.class,i); + } + public FormalParameterListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_formalParameterList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterFormalParameterList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitFormalParameterList(this); + } + } + + public final FormalParameterListContext formalParameterList() throws RecognitionException { + FormalParameterListContext _localctx = new FormalParameterListContext(_ctx, getState()); + enterRule(_localctx, 90, RULE_formalParameterList); + int _la; + try { + int _alt; + setState(655); + switch ( getInterpreter().adaptivePredict(_input,71,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(642); formalParameter(); + setState(647); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,69,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(643); match(COMMA); + setState(644); formalParameter(); + } + } + } + setState(649); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,69,_ctx); + } + setState(652); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(650); match(COMMA); + setState(651); lastFormalParameter(); + } + } + + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(654); lastFormalParameter(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FormalParameterContext extends ParserRuleContext { + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public FormalParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_formalParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterFormalParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitFormalParameter(this); + } + } + + public final FormalParameterContext formalParameter() throws RecognitionException { + FormalParameterContext _localctx = new FormalParameterContext(_ctx, getState()); + enterRule(_localctx, 92, RULE_formalParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(660); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(657); variableModifier(); + } + } + setState(662); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(663); type(); + setState(664); variableDeclaratorId(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LastFormalParameterContext extends ParserRuleContext { + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public LastFormalParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lastFormalParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterLastFormalParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitLastFormalParameter(this); + } + } + + public final LastFormalParameterContext lastFormalParameter() throws RecognitionException { + LastFormalParameterContext _localctx = new LastFormalParameterContext(_ctx, getState()); + enterRule(_localctx, 94, RULE_lastFormalParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(669); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(666); variableModifier(); + } + } + setState(671); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(672); type(); + setState(673); match(ELLIPSIS); + setState(674); variableDeclaratorId(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MethodBodyContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public MethodBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_methodBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterMethodBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitMethodBody(this); + } + } + + public final MethodBodyContext methodBody() throws RecognitionException { + MethodBodyContext _localctx = new MethodBodyContext(_ctx, getState()); + enterRule(_localctx, 96, RULE_methodBody); + try { + enterOuterAlt(_localctx, 1); + { + setState(676); block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstructorBodyContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public ConstructorBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constructorBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterConstructorBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitConstructorBody(this); + } + } + + public final ConstructorBodyContext constructorBody() throws RecognitionException { + ConstructorBodyContext _localctx = new ConstructorBodyContext(_ctx, getState()); + enterRule(_localctx, 98, RULE_constructorBody); + try { + enterOuterAlt(_localctx, 1); + { + setState(678); block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class QualifiedNameContext extends ParserRuleContext { + public List Identifier() { return getTokens(Java8Parser.Identifier); } + public TerminalNode Identifier(int i) { + return getToken(Java8Parser.Identifier, i); + } + public QualifiedNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_qualifiedName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterQualifiedName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitQualifiedName(this); + } + } + + public final QualifiedNameContext qualifiedName() throws RecognitionException { + QualifiedNameContext _localctx = new QualifiedNameContext(_ctx, getState()); + enterRule(_localctx, 100, RULE_qualifiedName); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(680); match(Identifier); + setState(685); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,74,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(681); match(DOT); + setState(682); match(Identifier); + } + } + } + setState(687); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,74,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LiteralContext extends ParserRuleContext { + public TerminalNode StringLiteral() { return getToken(Java8Parser.StringLiteral, 0); } + public TerminalNode IntegerLiteral() { return getToken(Java8Parser.IntegerLiteral, 0); } + public TerminalNode FloatingPointLiteral() { return getToken(Java8Parser.FloatingPointLiteral, 0); } + public TerminalNode BooleanLiteral() { return getToken(Java8Parser.BooleanLiteral, 0); } + public TerminalNode CharacterLiteral() { return getToken(Java8Parser.CharacterLiteral, 0); } + public LiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_literal; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitLiteral(this); + } + } + + public final LiteralContext literal() throws RecognitionException { + LiteralContext _localctx = new LiteralContext(_ctx, getState()); + enterRule(_localctx, 102, RULE_literal); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(688); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationContext extends ParserRuleContext { + public ElementValuePairsContext elementValuePairs() { + return getRuleContext(ElementValuePairsContext.class,0); + } + public AnnotationNameContext annotationName() { + return getRuleContext(AnnotationNameContext.class,0); + } + public ElementValueContext elementValue() { + return getRuleContext(ElementValueContext.class,0); + } + public AnnotationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotation(this); + } + } + + public final AnnotationContext annotation() throws RecognitionException { + AnnotationContext _localctx = new AnnotationContext(_ctx, getState()); + enterRule(_localctx, 104, RULE_annotation); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(690); match(AT); + setState(691); annotationName(); + setState(698); + _la = _input.LA(1); + if (_la==LPAREN) { + { + setState(692); match(LPAREN); + setState(695); + switch ( getInterpreter().adaptivePredict(_input,75,_ctx) ) { + case 1: + { + setState(693); elementValuePairs(); + } + break; + case 2: + { + setState(694); elementValue(); + } + break; + } + setState(697); match(RPAREN); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationNameContext extends ParserRuleContext { + public QualifiedNameContext qualifiedName() { + return getRuleContext(QualifiedNameContext.class,0); + } + public AnnotationNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationName(this); + } + } + + public final AnnotationNameContext annotationName() throws RecognitionException { + AnnotationNameContext _localctx = new AnnotationNameContext(_ctx, getState()); + enterRule(_localctx, 106, RULE_annotationName); + try { + enterOuterAlt(_localctx, 1); + { + setState(700); qualifiedName(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValuePairsContext extends ParserRuleContext { + public ElementValuePairContext elementValuePair(int i) { + return getRuleContext(ElementValuePairContext.class,i); + } + public List elementValuePair() { + return getRuleContexts(ElementValuePairContext.class); + } + public ElementValuePairsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValuePairs; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterElementValuePairs(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitElementValuePairs(this); + } + } + + public final ElementValuePairsContext elementValuePairs() throws RecognitionException { + ElementValuePairsContext _localctx = new ElementValuePairsContext(_ctx, getState()); + enterRule(_localctx, 108, RULE_elementValuePairs); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(702); elementValuePair(); + setState(707); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(703); match(COMMA); + setState(704); elementValuePair(); + } + } + setState(709); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValuePairContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public ElementValueContext elementValue() { + return getRuleContext(ElementValueContext.class,0); + } + public ElementValuePairContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValuePair; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterElementValuePair(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitElementValuePair(this); + } + } + + public final ElementValuePairContext elementValuePair() throws RecognitionException { + ElementValuePairContext _localctx = new ElementValuePairContext(_ctx, getState()); + enterRule(_localctx, 110, RULE_elementValuePair); + try { + enterOuterAlt(_localctx, 1); + { + setState(710); match(Identifier); + setState(711); match(ASSIGN); + setState(712); elementValue(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValueContext extends ParserRuleContext { + public ElementValueArrayInitializerContext elementValueArrayInitializer() { + return getRuleContext(ElementValueArrayInitializerContext.class,0); + } + public AnnotationContext annotation() { + return getRuleContext(AnnotationContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ElementValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValue; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterElementValue(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitElementValue(this); + } + } + + public final ElementValueContext elementValue() throws RecognitionException { + ElementValueContext _localctx = new ElementValueContext(_ctx, getState()); + enterRule(_localctx, 112, RULE_elementValue); + try { + setState(717); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case NEW: + case SHORT: + case SUPER: + case THIS: + case VOID: + case IntegerLiteral: + case FloatingPointLiteral: + case BooleanLiteral: + case CharacterLiteral: + case StringLiteral: + case NullLiteral: + case LPAREN: + case LT: + case BANG: + case TILDE: + case INC: + case DEC: + case ADD: + case SUB: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(714); expression(0); + } + break; + case AT: + enterOuterAlt(_localctx, 2); + { + setState(715); annotation(); + } + break; + case LBRACE: + enterOuterAlt(_localctx, 3); + { + setState(716); elementValueArrayInitializer(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValueArrayInitializerContext extends ParserRuleContext { + public ElementValueContext elementValue(int i) { + return getRuleContext(ElementValueContext.class,i); + } + public List elementValue() { + return getRuleContexts(ElementValueContext.class); + } + public ElementValueArrayInitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValueArrayInitializer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterElementValueArrayInitializer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitElementValueArrayInitializer(this); + } + } + + public final ElementValueArrayInitializerContext elementValueArrayInitializer() throws RecognitionException { + ElementValueArrayInitializerContext _localctx = new ElementValueArrayInitializerContext(_ctx, getState()); + enterRule(_localctx, 114, RULE_elementValueArrayInitializer); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(719); match(LBRACE); + setState(728); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + setState(720); elementValue(); + setState(725); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,79,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(721); match(COMMA); + setState(722); elementValue(); + } + } + } + setState(727); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,79,_ctx); + } + } + } + + setState(731); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(730); match(COMMA); + } + } + + setState(733); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public AnnotationTypeBodyContext annotationTypeBody() { + return getRuleContext(AnnotationTypeBodyContext.class,0); + } + public AnnotationTypeDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationTypeDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationTypeDeclaration(this); + } + } + + public final AnnotationTypeDeclarationContext annotationTypeDeclaration() throws RecognitionException { + AnnotationTypeDeclarationContext _localctx = new AnnotationTypeDeclarationContext(_ctx, getState()); + enterRule(_localctx, 116, RULE_annotationTypeDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(735); match(AT); + setState(736); match(INTERFACE); + setState(737); match(Identifier); + setState(738); annotationTypeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeBodyContext extends ParserRuleContext { + public List annotationTypeElementDeclaration() { + return getRuleContexts(AnnotationTypeElementDeclarationContext.class); + } + public AnnotationTypeElementDeclarationContext annotationTypeElementDeclaration(int i) { + return getRuleContext(AnnotationTypeElementDeclarationContext.class,i); + } + public AnnotationTypeBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationTypeBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationTypeBody(this); + } + } + + public final AnnotationTypeBodyContext annotationTypeBody() throws RecognitionException { + AnnotationTypeBodyContext _localctx = new AnnotationTypeBodyContext(_ctx, getState()); + enterRule(_localctx, 118, RULE_annotationTypeBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(740); match(LBRACE); + setState(744); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOLATILE) | (1L << SEMI))) != 0) || _la==Identifier || _la==AT) { + { + { + setState(741); annotationTypeElementDeclaration(); + } + } + setState(746); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(747); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeElementDeclarationContext extends ParserRuleContext { + public List modifier() { + return getRuleContexts(ModifierContext.class); + } + public AnnotationTypeElementRestContext annotationTypeElementRest() { + return getRuleContext(AnnotationTypeElementRestContext.class,0); + } + public ModifierContext modifier(int i) { + return getRuleContext(ModifierContext.class,i); + } + public AnnotationTypeElementDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeElementDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationTypeElementDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationTypeElementDeclaration(this); + } + } + + public final AnnotationTypeElementDeclarationContext annotationTypeElementDeclaration() throws RecognitionException { + AnnotationTypeElementDeclarationContext _localctx = new AnnotationTypeElementDeclarationContext(_ctx, getState()); + enterRule(_localctx, 120, RULE_annotationTypeElementDeclaration); + try { + int _alt; + setState(757); + switch (_input.LA(1)) { + case ABSTRACT: + case BOOLEAN: + case BYTE: + case CHAR: + case CLASS: + case DOUBLE: + case ENUM: + case FINAL: + case FLOAT: + case INT: + case INTERFACE: + case LONG: + case NATIVE: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case SHORT: + case STATIC: + case STRICTFP: + case SYNCHRONIZED: + case TRANSIENT: + case VOLATILE: + case Identifier: + case AT: + enterOuterAlt(_localctx, 1); + { + setState(752); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,83,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(749); modifier(); + } + } + } + setState(754); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,83,_ctx); + } + setState(755); annotationTypeElementRest(); + } + break; + case SEMI: + enterOuterAlt(_localctx, 2); + { + setState(756); match(SEMI); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeElementRestContext extends ParserRuleContext { + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public AnnotationMethodOrConstantRestContext annotationMethodOrConstantRest() { + return getRuleContext(AnnotationMethodOrConstantRestContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public AnnotationTypeElementRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeElementRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationTypeElementRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationTypeElementRest(this); + } + } + + public final AnnotationTypeElementRestContext annotationTypeElementRest() throws RecognitionException { + AnnotationTypeElementRestContext _localctx = new AnnotationTypeElementRestContext(_ctx, getState()); + enterRule(_localctx, 122, RULE_annotationTypeElementRest); + try { + setState(779); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(759); type(); + setState(760); annotationMethodOrConstantRest(); + setState(761); match(SEMI); + } + break; + case CLASS: + enterOuterAlt(_localctx, 2); + { + setState(763); classDeclaration(); + setState(765); + switch ( getInterpreter().adaptivePredict(_input,85,_ctx) ) { + case 1: + { + setState(764); match(SEMI); + } + break; + } + } + break; + case INTERFACE: + enterOuterAlt(_localctx, 3); + { + setState(767); interfaceDeclaration(); + setState(769); + switch ( getInterpreter().adaptivePredict(_input,86,_ctx) ) { + case 1: + { + setState(768); match(SEMI); + } + break; + } + } + break; + case ENUM: + enterOuterAlt(_localctx, 4); + { + setState(771); enumDeclaration(); + setState(773); + switch ( getInterpreter().adaptivePredict(_input,87,_ctx) ) { + case 1: + { + setState(772); match(SEMI); + } + break; + } + } + break; + case AT: + enterOuterAlt(_localctx, 5); + { + setState(775); annotationTypeDeclaration(); + setState(777); + switch ( getInterpreter().adaptivePredict(_input,88,_ctx) ) { + case 1: + { + setState(776); match(SEMI); + } + break; + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationMethodOrConstantRestContext extends ParserRuleContext { + public AnnotationMethodRestContext annotationMethodRest() { + return getRuleContext(AnnotationMethodRestContext.class,0); + } + public AnnotationConstantRestContext annotationConstantRest() { + return getRuleContext(AnnotationConstantRestContext.class,0); + } + public AnnotationMethodOrConstantRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationMethodOrConstantRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationMethodOrConstantRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationMethodOrConstantRest(this); + } + } + + public final AnnotationMethodOrConstantRestContext annotationMethodOrConstantRest() throws RecognitionException { + AnnotationMethodOrConstantRestContext _localctx = new AnnotationMethodOrConstantRestContext(_ctx, getState()); + enterRule(_localctx, 124, RULE_annotationMethodOrConstantRest); + try { + setState(783); + switch ( getInterpreter().adaptivePredict(_input,90,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(781); annotationMethodRest(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(782); annotationConstantRest(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationMethodRestContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public DefaultValueContext defaultValue() { + return getRuleContext(DefaultValueContext.class,0); + } + public AnnotationMethodRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationMethodRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationMethodRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationMethodRest(this); + } + } + + public final AnnotationMethodRestContext annotationMethodRest() throws RecognitionException { + AnnotationMethodRestContext _localctx = new AnnotationMethodRestContext(_ctx, getState()); + enterRule(_localctx, 126, RULE_annotationMethodRest); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(785); match(Identifier); + setState(786); match(LPAREN); + setState(787); match(RPAREN); + setState(789); + _la = _input.LA(1); + if (_la==DEFAULT) { + { + setState(788); defaultValue(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationConstantRestContext extends ParserRuleContext { + public VariableDeclaratorsContext variableDeclarators() { + return getRuleContext(VariableDeclaratorsContext.class,0); + } + public AnnotationConstantRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationConstantRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationConstantRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationConstantRest(this); + } + } + + public final AnnotationConstantRestContext annotationConstantRest() throws RecognitionException { + AnnotationConstantRestContext _localctx = new AnnotationConstantRestContext(_ctx, getState()); + enterRule(_localctx, 128, RULE_annotationConstantRest); + try { + enterOuterAlt(_localctx, 1); + { + setState(791); variableDeclarators(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DefaultValueContext extends ParserRuleContext { + public ElementValueContext elementValue() { + return getRuleContext(ElementValueContext.class,0); + } + public DefaultValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_defaultValue; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterDefaultValue(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitDefaultValue(this); + } + } + + public final DefaultValueContext defaultValue() throws RecognitionException { + DefaultValueContext _localctx = new DefaultValueContext(_ctx, getState()); + enterRule(_localctx, 130, RULE_defaultValue); + try { + enterOuterAlt(_localctx, 1); + { + setState(793); match(DEFAULT); + setState(794); elementValue(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BlockContext extends ParserRuleContext { + public List blockStatement() { + return getRuleContexts(BlockStatementContext.class); + } + public BlockStatementContext blockStatement(int i) { + return getRuleContext(BlockStatementContext.class,i); + } + public BlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_block; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitBlock(this); + } + } + + public final BlockContext block() throws RecognitionException { + BlockContext _localctx = new BlockContext(_ctx, getState()); + enterRule(_localctx, 132, RULE_block); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(796); match(LBRACE); + setState(800); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << ASSERT) | (1L << BOOLEAN) | (1L << BREAK) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << CONTINUE) | (1L << DO) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << FOR) | (1L << IF) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NEW) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << RETURN) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SUPER) | (1L << SWITCH) | (1L << SYNCHRONIZED) | (1L << THIS) | (1L << THROW) | (1L << TRY) | (1L << VOID) | (1L << WHILE) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + { + setState(797); blockStatement(); + } + } + setState(802); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(803); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BlockStatementContext extends ParserRuleContext { + public TypeDeclarationContext typeDeclaration() { + return getRuleContext(TypeDeclarationContext.class,0); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public LocalVariableDeclarationStatementContext localVariableDeclarationStatement() { + return getRuleContext(LocalVariableDeclarationStatementContext.class,0); + } + public BlockStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_blockStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterBlockStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitBlockStatement(this); + } + } + + public final BlockStatementContext blockStatement() throws RecognitionException { + BlockStatementContext _localctx = new BlockStatementContext(_ctx, getState()); + enterRule(_localctx, 134, RULE_blockStatement); + try { + setState(808); + switch ( getInterpreter().adaptivePredict(_input,93,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(805); localVariableDeclarationStatement(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(806); statement(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(807); typeDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LocalVariableDeclarationStatementContext extends ParserRuleContext { + public LocalVariableDeclarationContext localVariableDeclaration() { + return getRuleContext(LocalVariableDeclarationContext.class,0); + } + public LocalVariableDeclarationStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_localVariableDeclarationStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterLocalVariableDeclarationStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitLocalVariableDeclarationStatement(this); + } + } + + public final LocalVariableDeclarationStatementContext localVariableDeclarationStatement() throws RecognitionException { + LocalVariableDeclarationStatementContext _localctx = new LocalVariableDeclarationStatementContext(_ctx, getState()); + enterRule(_localctx, 136, RULE_localVariableDeclarationStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(810); localVariableDeclaration(); + setState(811); match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LocalVariableDeclarationContext extends ParserRuleContext { + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableDeclaratorsContext variableDeclarators() { + return getRuleContext(VariableDeclaratorsContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public LocalVariableDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_localVariableDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterLocalVariableDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitLocalVariableDeclaration(this); + } + } + + public final LocalVariableDeclarationContext localVariableDeclaration() throws RecognitionException { + LocalVariableDeclarationContext _localctx = new LocalVariableDeclarationContext(_ctx, getState()); + enterRule(_localctx, 138, RULE_localVariableDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(816); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(813); variableModifier(); + } + } + setState(818); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(819); type(); + setState(820); variableDeclarators(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StatementContext extends ParserRuleContext { + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public StatementExpressionContext statementExpression() { + return getRuleContext(StatementExpressionContext.class,0); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public List switchLabel() { + return getRuleContexts(SwitchLabelContext.class); + } + public List switchBlockStatementGroup() { + return getRuleContexts(SwitchBlockStatementGroupContext.class); + } + public ParExpressionContext parExpression() { + return getRuleContext(ParExpressionContext.class,0); + } + public List catchClause() { + return getRuleContexts(CatchClauseContext.class); + } + public CatchClauseContext catchClause(int i) { + return getRuleContext(CatchClauseContext.class,i); + } + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public FinallyBlockContext finallyBlock() { + return getRuleContext(FinallyBlockContext.class,0); + } + public SwitchBlockStatementGroupContext switchBlockStatementGroup(int i) { + return getRuleContext(SwitchBlockStatementGroupContext.class,i); + } + public ForControlContext forControl() { + return getRuleContext(ForControlContext.class,0); + } + public TerminalNode ASSERT() { return getToken(Java8Parser.ASSERT, 0); } + public ResourceSpecificationContext resourceSpecification() { + return getRuleContext(ResourceSpecificationContext.class,0); + } + public List statement() { + return getRuleContexts(StatementContext.class); + } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public SwitchLabelContext switchLabel(int i) { + return getRuleContext(SwitchLabelContext.class,i); + } + public StatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitStatement(this); + } + } + + public final StatementContext statement() throws RecognitionException { + StatementContext _localctx = new StatementContext(_ctx, getState()); + enterRule(_localctx, 140, RULE_statement); + int _la; + try { + int _alt; + setState(926); + switch ( getInterpreter().adaptivePredict(_input,107,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(822); block(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(823); match(ASSERT); + setState(824); expression(0); + setState(827); + _la = _input.LA(1); + if (_la==COLON) { + { + setState(825); match(COLON); + setState(826); expression(0); + } + } + + setState(829); match(SEMI); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(831); match(IF); + setState(832); parExpression(); + setState(833); statement(); + setState(836); + switch ( getInterpreter().adaptivePredict(_input,96,_ctx) ) { + case 1: + { + setState(834); match(ELSE); + setState(835); statement(); + } + break; + } + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(838); match(FOR); + setState(839); match(LPAREN); + setState(840); forControl(); + setState(841); match(RPAREN); + setState(842); statement(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(844); match(WHILE); + setState(845); parExpression(); + setState(846); statement(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(848); match(DO); + setState(849); statement(); + setState(850); match(WHILE); + setState(851); parExpression(); + setState(852); match(SEMI); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(854); match(TRY); + setState(855); block(); + setState(865); + switch (_input.LA(1)) { + case CATCH: + { + setState(857); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(856); catchClause(); + } + } + setState(859); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==CATCH ); + setState(862); + _la = _input.LA(1); + if (_la==FINALLY) { + { + setState(861); finallyBlock(); + } + } + + } + break; + case FINALLY: + { + setState(864); finallyBlock(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(867); match(TRY); + setState(868); resourceSpecification(); + setState(869); block(); + setState(873); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==CATCH) { + { + { + setState(870); catchClause(); + } + } + setState(875); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(877); + _la = _input.LA(1); + if (_la==FINALLY) { + { + setState(876); finallyBlock(); + } + } + + } + break; + case 9: + enterOuterAlt(_localctx, 9); + { + setState(879); match(SWITCH); + setState(880); parExpression(); + setState(881); match(LBRACE); + setState(885); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,102,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(882); switchBlockStatementGroup(); + } + } + } + setState(887); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,102,_ctx); + } + setState(891); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==CASE || _la==DEFAULT) { + { + { + setState(888); switchLabel(); + } + } + setState(893); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(894); match(RBRACE); + } + break; + case 10: + enterOuterAlt(_localctx, 10); + { + setState(896); match(SYNCHRONIZED); + setState(897); parExpression(); + setState(898); block(); + } + break; + case 11: + enterOuterAlt(_localctx, 11); + { + setState(900); match(RETURN); + setState(902); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(901); expression(0); + } + } + + setState(904); match(SEMI); + } + break; + case 12: + enterOuterAlt(_localctx, 12); + { + setState(905); match(THROW); + setState(906); expression(0); + setState(907); match(SEMI); + } + break; + case 13: + enterOuterAlt(_localctx, 13); + { + setState(909); match(BREAK); + setState(911); + _la = _input.LA(1); + if (_la==Identifier) { + { + setState(910); match(Identifier); + } + } + + setState(913); match(SEMI); + } + break; + case 14: + enterOuterAlt(_localctx, 14); + { + setState(914); match(CONTINUE); + setState(916); + _la = _input.LA(1); + if (_la==Identifier) { + { + setState(915); match(Identifier); + } + } + + setState(918); match(SEMI); + } + break; + case 15: + enterOuterAlt(_localctx, 15); + { + setState(919); match(SEMI); + } + break; + case 16: + enterOuterAlt(_localctx, 16); + { + setState(920); statementExpression(); + setState(921); match(SEMI); + } + break; + case 17: + enterOuterAlt(_localctx, 17); + { + setState(923); match(Identifier); + setState(924); match(COLON); + setState(925); statement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CatchClauseContext extends ParserRuleContext { + public CatchTypeContext catchType() { + return getRuleContext(CatchTypeContext.class,0); + } + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public CatchClauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_catchClause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterCatchClause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitCatchClause(this); + } + } + + public final CatchClauseContext catchClause() throws RecognitionException { + CatchClauseContext _localctx = new CatchClauseContext(_ctx, getState()); + enterRule(_localctx, 142, RULE_catchClause); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(928); match(CATCH); + setState(929); match(LPAREN); + setState(933); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(930); variableModifier(); + } + } + setState(935); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(936); catchType(); + setState(937); match(Identifier); + setState(938); match(RPAREN); + setState(939); block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CatchTypeContext extends ParserRuleContext { + public List qualifiedName() { + return getRuleContexts(QualifiedNameContext.class); + } + public QualifiedNameContext qualifiedName(int i) { + return getRuleContext(QualifiedNameContext.class,i); + } + public CatchTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_catchType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterCatchType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitCatchType(this); + } + } + + public final CatchTypeContext catchType() throws RecognitionException { + CatchTypeContext _localctx = new CatchTypeContext(_ctx, getState()); + enterRule(_localctx, 144, RULE_catchType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(941); qualifiedName(); + setState(946); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==BITOR) { + { + { + setState(942); match(BITOR); + setState(943); qualifiedName(); + } + } + setState(948); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FinallyBlockContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public FinallyBlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_finallyBlock; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterFinallyBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitFinallyBlock(this); + } + } + + public final FinallyBlockContext finallyBlock() throws RecognitionException { + FinallyBlockContext _localctx = new FinallyBlockContext(_ctx, getState()); + enterRule(_localctx, 146, RULE_finallyBlock); + try { + enterOuterAlt(_localctx, 1); + { + setState(949); match(FINALLY); + setState(950); block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ResourceSpecificationContext extends ParserRuleContext { + public ResourcesContext resources() { + return getRuleContext(ResourcesContext.class,0); + } + public ResourceSpecificationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_resourceSpecification; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterResourceSpecification(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitResourceSpecification(this); + } + } + + public final ResourceSpecificationContext resourceSpecification() throws RecognitionException { + ResourceSpecificationContext _localctx = new ResourceSpecificationContext(_ctx, getState()); + enterRule(_localctx, 148, RULE_resourceSpecification); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(952); match(LPAREN); + setState(953); resources(); + setState(955); + _la = _input.LA(1); + if (_la==SEMI) { + { + setState(954); match(SEMI); + } + } + + setState(957); match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ResourcesContext extends ParserRuleContext { + public ResourceContext resource(int i) { + return getRuleContext(ResourceContext.class,i); + } + public List resource() { + return getRuleContexts(ResourceContext.class); + } + public ResourcesContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_resources; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterResources(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitResources(this); + } + } + + public final ResourcesContext resources() throws RecognitionException { + ResourcesContext _localctx = new ResourcesContext(_ctx, getState()); + enterRule(_localctx, 150, RULE_resources); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(959); resource(); + setState(964); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,111,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(960); match(SEMI); + setState(961); resource(); + } + } + } + setState(966); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,111,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ResourceContext extends ParserRuleContext { + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public ClassOrInterfaceTypeContext classOrInterfaceType() { + return getRuleContext(ClassOrInterfaceTypeContext.class,0); + } + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ResourceContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_resource; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterResource(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitResource(this); + } + } + + public final ResourceContext resource() throws RecognitionException { + ResourceContext _localctx = new ResourceContext(_ctx, getState()); + enterRule(_localctx, 152, RULE_resource); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(970); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(967); variableModifier(); + } + } + setState(972); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(973); classOrInterfaceType(); + setState(974); variableDeclaratorId(); + setState(975); match(ASSIGN); + setState(976); expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SwitchBlockStatementGroupContext extends ParserRuleContext { + public List blockStatement() { + return getRuleContexts(BlockStatementContext.class); + } + public List switchLabel() { + return getRuleContexts(SwitchLabelContext.class); + } + public BlockStatementContext blockStatement(int i) { + return getRuleContext(BlockStatementContext.class,i); + } + public SwitchLabelContext switchLabel(int i) { + return getRuleContext(SwitchLabelContext.class,i); + } + public SwitchBlockStatementGroupContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_switchBlockStatementGroup; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterSwitchBlockStatementGroup(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitSwitchBlockStatementGroup(this); + } + } + + public final SwitchBlockStatementGroupContext switchBlockStatementGroup() throws RecognitionException { + SwitchBlockStatementGroupContext _localctx = new SwitchBlockStatementGroupContext(_ctx, getState()); + enterRule(_localctx, 154, RULE_switchBlockStatementGroup); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(979); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(978); switchLabel(); + } + } + setState(981); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==CASE || _la==DEFAULT ); + setState(984); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(983); blockStatement(); + } + } + setState(986); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << ASSERT) | (1L << BOOLEAN) | (1L << BREAK) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << CONTINUE) | (1L << DO) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << FOR) | (1L << IF) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NEW) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << RETURN) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SUPER) | (1L << SWITCH) | (1L << SYNCHRONIZED) | (1L << THIS) | (1L << THROW) | (1L << TRY) | (1L << VOID) | (1L << WHILE) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0) ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SwitchLabelContext extends ParserRuleContext { + public ConstantExpressionContext constantExpression() { + return getRuleContext(ConstantExpressionContext.class,0); + } + public EnumConstantNameContext enumConstantName() { + return getRuleContext(EnumConstantNameContext.class,0); + } + public SwitchLabelContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_switchLabel; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterSwitchLabel(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitSwitchLabel(this); + } + } + + public final SwitchLabelContext switchLabel() throws RecognitionException { + SwitchLabelContext _localctx = new SwitchLabelContext(_ctx, getState()); + enterRule(_localctx, 156, RULE_switchLabel); + try { + setState(998); + switch ( getInterpreter().adaptivePredict(_input,115,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(988); match(CASE); + setState(989); constantExpression(); + setState(990); match(COLON); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(992); match(CASE); + setState(993); enumConstantName(); + setState(994); match(COLON); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(996); match(DEFAULT); + setState(997); match(COLON); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ForControlContext extends ParserRuleContext { + public ForUpdateContext forUpdate() { + return getRuleContext(ForUpdateContext.class,0); + } + public ForInitContext forInit() { + return getRuleContext(ForInitContext.class,0); + } + public EnhancedForControlContext enhancedForControl() { + return getRuleContext(EnhancedForControlContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ForControlContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_forControl; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterForControl(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitForControl(this); + } + } + + public final ForControlContext forControl() throws RecognitionException { + ForControlContext _localctx = new ForControlContext(_ctx, getState()); + enterRule(_localctx, 158, RULE_forControl); + int _la; + try { + setState(1012); + switch ( getInterpreter().adaptivePredict(_input,119,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1000); enhancedForControl(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1002); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + setState(1001); forInit(); + } + } + + setState(1004); match(SEMI); + setState(1006); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(1005); expression(0); + } + } + + setState(1008); match(SEMI); + setState(1010); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(1009); forUpdate(); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ForInitContext extends ParserRuleContext { + public LocalVariableDeclarationContext localVariableDeclaration() { + return getRuleContext(LocalVariableDeclarationContext.class,0); + } + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public ForInitContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_forInit; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterForInit(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitForInit(this); + } + } + + public final ForInitContext forInit() throws RecognitionException { + ForInitContext _localctx = new ForInitContext(_ctx, getState()); + enterRule(_localctx, 160, RULE_forInit); + try { + setState(1016); + switch ( getInterpreter().adaptivePredict(_input,120,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1014); localVariableDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1015); expressionList(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnhancedForControlContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public EnhancedForControlContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enhancedForControl; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterEnhancedForControl(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitEnhancedForControl(this); + } + } + + public final EnhancedForControlContext enhancedForControl() throws RecognitionException { + EnhancedForControlContext _localctx = new EnhancedForControlContext(_ctx, getState()); + enterRule(_localctx, 162, RULE_enhancedForControl); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1021); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(1018); variableModifier(); + } + } + setState(1023); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1024); type(); + setState(1025); match(Identifier); + setState(1026); match(COLON); + setState(1027); expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ForUpdateContext extends ParserRuleContext { + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public ForUpdateContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_forUpdate; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterForUpdate(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitForUpdate(this); + } + } + + public final ForUpdateContext forUpdate() throws RecognitionException { + ForUpdateContext _localctx = new ForUpdateContext(_ctx, getState()); + enterRule(_localctx, 164, RULE_forUpdate); + try { + enterOuterAlt(_localctx, 1); + { + setState(1029); expressionList(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ParExpressionContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ParExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_parExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterParExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitParExpression(this); + } + } + + public final ParExpressionContext parExpression() throws RecognitionException { + ParExpressionContext _localctx = new ParExpressionContext(_ctx, getState()); + enterRule(_localctx, 166, RULE_parExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(1031); match(LPAREN); + setState(1032); expression(0); + setState(1033); match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpressionListContext extends ParserRuleContext { + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expressionList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterExpressionList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitExpressionList(this); + } + } + + public final ExpressionListContext expressionList() throws RecognitionException { + ExpressionListContext _localctx = new ExpressionListContext(_ctx, getState()); + enterRule(_localctx, 168, RULE_expressionList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1035); expression(0); + setState(1040); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(1036); match(COMMA); + setState(1037); expression(0); + } + } + setState(1042); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StatementExpressionContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public StatementExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statementExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterStatementExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitStatementExpression(this); + } + } + + public final StatementExpressionContext statementExpression() throws RecognitionException { + StatementExpressionContext _localctx = new StatementExpressionContext(_ctx, getState()); + enterRule(_localctx, 170, RULE_statementExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(1043); expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstantExpressionContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ConstantExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constantExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterConstantExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitConstantExpression(this); + } + } + + public final ConstantExpressionContext constantExpression() throws RecognitionException { + ConstantExpressionContext _localctx = new ConstantExpressionContext(_ctx, getState()); + enterRule(_localctx, 172, RULE_constantExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(1045); expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpressionContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public ExplicitGenericInvocationContext explicitGenericInvocation() { + return getRuleContext(ExplicitGenericInvocationContext.class,0); + } + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public InnerCreatorContext innerCreator() { + return getRuleContext(InnerCreatorContext.class,0); + } + public SuperSuffixContext superSuffix() { + return getRuleContext(SuperSuffixContext.class,0); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public PrimaryContext primary() { + return getRuleContext(PrimaryContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public CreatorContext creator() { + return getRuleContext(CreatorContext.class,0); + } + public ExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitExpression(this); + } + } + + public final ExpressionContext expression() throws RecognitionException { + return expression(0); + } + + private ExpressionContext expression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ExpressionContext _localctx = new ExpressionContext(_ctx, _parentState); + ExpressionContext _prevctx = _localctx; + int _startState = 174; + enterRecursionRule(_localctx, 174, RULE_expression, _p); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1060); + switch ( getInterpreter().adaptivePredict(_input,123,_ctx) ) { + case 1: + { + setState(1048); match(LPAREN); + setState(1049); type(); + setState(1050); match(RPAREN); + setState(1051); expression(17); + } + break; + case 2: + { + setState(1053); + _la = _input.LA(1); + if ( !(((((_la - 79)) & ~0x3f) == 0 && ((1L << (_la - 79)) & ((1L << (INC - 79)) | (1L << (DEC - 79)) | (1L << (ADD - 79)) | (1L << (SUB - 79)))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1054); expression(15); + } + break; + case 3: + { + setState(1055); + _la = _input.LA(1); + if ( !(_la==BANG || _la==TILDE) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1056); expression(14); + } + break; + case 4: + { + setState(1057); primary(); + } + break; + case 5: + { + setState(1058); match(NEW); + setState(1059); creator(); + } + break; + } + _ctx.stop = _input.LT(-1); + setState(1147); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,128,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(1145); + switch ( getInterpreter().adaptivePredict(_input,127,_ctx) ) { + case 1: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1062); + if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); + setState(1063); + _la = _input.LA(1); + if ( !(((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (MUL - 83)) | (1L << (DIV - 83)) | (1L << (MOD - 83)))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1064); expression(14); + } + break; + case 2: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1065); + if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); + setState(1066); + _la = _input.LA(1); + if ( !(_la==ADD || _la==SUB) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1067); expression(13); + } + break; + case 3: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1068); + if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); + setState(1076); + switch ( getInterpreter().adaptivePredict(_input,124,_ctx) ) { + case 1: + { + setState(1069); match(LT); + setState(1070); match(LT); + } + break; + case 2: + { + setState(1071); match(GT); + setState(1072); match(GT); + setState(1073); match(GT); + } + break; + case 3: + { + setState(1074); match(GT); + setState(1075); match(GT); + } + break; + } + setState(1078); expression(12); + } + break; + case 4: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1079); + if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); + setState(1080); + _la = _input.LA(1); + if ( !(((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (GT - 67)) | (1L << (LT - 67)) | (1L << (LE - 67)) | (1L << (GE - 67)))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1081); expression(11); + } + break; + case 5: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1082); + if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); + setState(1083); + _la = _input.LA(1); + if ( !(_la==EQUAL || _la==NOTEQUAL) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1084); expression(9); + } + break; + case 6: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1085); + if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); + setState(1086); match(BITAND); + setState(1087); expression(8); + } + break; + case 7: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1088); + if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); + setState(1089); match(CARET); + setState(1090); expression(7); + } + break; + case 8: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1091); + if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); + setState(1092); match(BITOR); + setState(1093); expression(6); + } + break; + case 9: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1094); + if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)"); + setState(1095); match(AND); + setState(1096); expression(5); + } + break; + case 10: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1097); + if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); + setState(1098); match(OR); + setState(1099); expression(4); + } + break; + case 11: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1100); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(1101); match(QUESTION); + setState(1102); expression(0); + setState(1103); match(COLON); + setState(1104); expression(3); + } + break; + case 12: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1106); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(1107); + _la = _input.LA(1); + if ( !(((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (ASSIGN - 66)) | (1L << (ADD_ASSIGN - 66)) | (1L << (SUB_ASSIGN - 66)) | (1L << (MUL_ASSIGN - 66)) | (1L << (DIV_ASSIGN - 66)) | (1L << (AND_ASSIGN - 66)) | (1L << (OR_ASSIGN - 66)) | (1L << (XOR_ASSIGN - 66)) | (1L << (MOD_ASSIGN - 66)) | (1L << (LSHIFT_ASSIGN - 66)) | (1L << (RSHIFT_ASSIGN - 66)) | (1L << (URSHIFT_ASSIGN - 66)))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1108); expression(2); + } + break; + case 13: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1109); + if (!(precpred(_ctx, 25))) throw new FailedPredicateException(this, "precpred(_ctx, 25)"); + setState(1110); match(DOT); + setState(1111); match(Identifier); + } + break; + case 14: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1112); + if (!(precpred(_ctx, 24))) throw new FailedPredicateException(this, "precpred(_ctx, 24)"); + setState(1113); match(DOT); + setState(1114); match(THIS); + } + break; + case 15: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1115); + if (!(precpred(_ctx, 23))) throw new FailedPredicateException(this, "precpred(_ctx, 23)"); + setState(1116); match(DOT); + setState(1117); match(NEW); + setState(1119); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1118); nonWildcardTypeArguments(); + } + } + + setState(1121); innerCreator(); + } + break; + case 16: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1122); + if (!(precpred(_ctx, 22))) throw new FailedPredicateException(this, "precpred(_ctx, 22)"); + setState(1123); match(DOT); + setState(1124); match(SUPER); + setState(1125); superSuffix(); + } + break; + case 17: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1126); + if (!(precpred(_ctx, 21))) throw new FailedPredicateException(this, "precpred(_ctx, 21)"); + setState(1127); match(DOT); + setState(1128); explicitGenericInvocation(); + } + break; + case 18: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1129); + if (!(precpred(_ctx, 20))) throw new FailedPredicateException(this, "precpred(_ctx, 20)"); + setState(1130); match(LBRACK); + setState(1131); expression(0); + setState(1132); match(RBRACK); + } + break; + case 19: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1134); + if (!(precpred(_ctx, 19))) throw new FailedPredicateException(this, "precpred(_ctx, 19)"); + setState(1135); match(LPAREN); + setState(1137); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(1136); expressionList(); + } + } + + setState(1139); match(RPAREN); + } + break; + case 20: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1140); + if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)"); + setState(1141); + _la = _input.LA(1); + if ( !(_la==INC || _la==DEC) ) { + _errHandler.recoverInline(this); + } + consume(); + } + break; + case 21: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1142); + if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); + setState(1143); match(INSTANCEOF); + setState(1144); type(); + } + break; + } + } + } + setState(1149); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,128,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class PrimaryContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public ExplicitGenericInvocationSuffixContext explicitGenericInvocationSuffix() { + return getRuleContext(ExplicitGenericInvocationSuffixContext.class,0); + } + public LiteralContext literal() { + return getRuleContext(LiteralContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public PrimaryContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_primary; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterPrimary(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitPrimary(this); + } + } + + public final PrimaryContext primary() throws RecognitionException { + PrimaryContext _localctx = new PrimaryContext(_ctx, getState()); + enterRule(_localctx, 176, RULE_primary); + try { + setState(1171); + switch ( getInterpreter().adaptivePredict(_input,130,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1150); match(LPAREN); + setState(1151); expression(0); + setState(1152); match(RPAREN); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1154); match(THIS); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1155); match(SUPER); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(1156); literal(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(1157); match(Identifier); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(1158); type(); + setState(1159); match(DOT); + setState(1160); match(CLASS); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(1162); match(VOID); + setState(1163); match(DOT); + setState(1164); match(CLASS); + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(1165); nonWildcardTypeArguments(); + setState(1169); + switch (_input.LA(1)) { + case SUPER: + case Identifier: + { + setState(1166); explicitGenericInvocationSuffix(); + } + break; + case THIS: + { + setState(1167); match(THIS); + setState(1168); arguments(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CreatorContext extends ParserRuleContext { + public ArrayCreatorRestContext arrayCreatorRest() { + return getRuleContext(ArrayCreatorRestContext.class,0); + } + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public ClassCreatorRestContext classCreatorRest() { + return getRuleContext(ClassCreatorRestContext.class,0); + } + public CreatedNameContext createdName() { + return getRuleContext(CreatedNameContext.class,0); + } + public CreatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_creator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterCreator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitCreator(this); + } + } + + public final CreatorContext creator() throws RecognitionException { + CreatorContext _localctx = new CreatorContext(_ctx, getState()); + enterRule(_localctx, 178, RULE_creator); + try { + setState(1182); + switch (_input.LA(1)) { + case LT: + enterOuterAlt(_localctx, 1); + { + setState(1173); nonWildcardTypeArguments(); + setState(1174); createdName(); + setState(1175); classCreatorRest(); + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + enterOuterAlt(_localctx, 2); + { + setState(1177); createdName(); + setState(1180); + switch (_input.LA(1)) { + case LBRACK: + { + setState(1178); arrayCreatorRest(); + } + break; + case LPAREN: + { + setState(1179); classCreatorRest(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CreatedNameContext extends ParserRuleContext { + public List Identifier() { return getTokens(Java8Parser.Identifier); } + public TerminalNode Identifier(int i) { + return getToken(Java8Parser.Identifier, i); + } + public List typeArgumentsOrDiamond() { + return getRuleContexts(TypeArgumentsOrDiamondContext.class); + } + public PrimitiveTypeContext primitiveType() { + return getRuleContext(PrimitiveTypeContext.class,0); + } + public TypeArgumentsOrDiamondContext typeArgumentsOrDiamond(int i) { + return getRuleContext(TypeArgumentsOrDiamondContext.class,i); + } + public CreatedNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_createdName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterCreatedName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitCreatedName(this); + } + } + + public final CreatedNameContext createdName() throws RecognitionException { + CreatedNameContext _localctx = new CreatedNameContext(_ctx, getState()); + enterRule(_localctx, 180, RULE_createdName); + int _la; + try { + setState(1199); + switch (_input.LA(1)) { + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(1184); match(Identifier); + setState(1186); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1185); typeArgumentsOrDiamond(); + } + } + + setState(1195); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==DOT) { + { + { + setState(1188); match(DOT); + setState(1189); match(Identifier); + setState(1191); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1190); typeArgumentsOrDiamond(); + } + } + + } + } + setState(1197); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + enterOuterAlt(_localctx, 2); + { + setState(1198); primitiveType(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InnerCreatorContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public ClassCreatorRestContext classCreatorRest() { + return getRuleContext(ClassCreatorRestContext.class,0); + } + public NonWildcardTypeArgumentsOrDiamondContext nonWildcardTypeArgumentsOrDiamond() { + return getRuleContext(NonWildcardTypeArgumentsOrDiamondContext.class,0); + } + public InnerCreatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_innerCreator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterInnerCreator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitInnerCreator(this); + } + } + + public final InnerCreatorContext innerCreator() throws RecognitionException { + InnerCreatorContext _localctx = new InnerCreatorContext(_ctx, getState()); + enterRule(_localctx, 182, RULE_innerCreator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1201); match(Identifier); + setState(1203); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1202); nonWildcardTypeArgumentsOrDiamond(); + } + } + + setState(1205); classCreatorRest(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrayCreatorRestContext extends ParserRuleContext { + public ArrayInitializerContext arrayInitializer() { + return getRuleContext(ArrayInitializerContext.class,0); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ArrayCreatorRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayCreatorRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterArrayCreatorRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitArrayCreatorRest(this); + } + } + + public final ArrayCreatorRestContext arrayCreatorRest() throws RecognitionException { + ArrayCreatorRestContext _localctx = new ArrayCreatorRestContext(_ctx, getState()); + enterRule(_localctx, 184, RULE_arrayCreatorRest); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1207); match(LBRACK); + setState(1235); + switch (_input.LA(1)) { + case RBRACK: + { + setState(1208); match(RBRACK); + setState(1213); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(1209); match(LBRACK); + setState(1210); match(RBRACK); + } + } + setState(1215); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1216); arrayInitializer(); + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case NEW: + case SHORT: + case SUPER: + case THIS: + case VOID: + case IntegerLiteral: + case FloatingPointLiteral: + case BooleanLiteral: + case CharacterLiteral: + case StringLiteral: + case NullLiteral: + case LPAREN: + case LT: + case BANG: + case TILDE: + case INC: + case DEC: + case ADD: + case SUB: + case Identifier: + { + setState(1217); expression(0); + setState(1218); match(RBRACK); + setState(1225); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,139,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1219); match(LBRACK); + setState(1220); expression(0); + setState(1221); match(RBRACK); + } + } + } + setState(1227); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,139,_ctx); + } + setState(1232); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,140,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1228); match(LBRACK); + setState(1229); match(RBRACK); + } + } + } + setState(1234); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,140,_ctx); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassCreatorRestContext extends ParserRuleContext { + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public ClassCreatorRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classCreatorRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterClassCreatorRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitClassCreatorRest(this); + } + } + + public final ClassCreatorRestContext classCreatorRest() throws RecognitionException { + ClassCreatorRestContext _localctx = new ClassCreatorRestContext(_ctx, getState()); + enterRule(_localctx, 186, RULE_classCreatorRest); + try { + enterOuterAlt(_localctx, 1); + { + setState(1237); arguments(); + setState(1239); + switch ( getInterpreter().adaptivePredict(_input,142,_ctx) ) { + case 1: + { + setState(1238); classBody(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExplicitGenericInvocationContext extends ParserRuleContext { + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public ExplicitGenericInvocationSuffixContext explicitGenericInvocationSuffix() { + return getRuleContext(ExplicitGenericInvocationSuffixContext.class,0); + } + public ExplicitGenericInvocationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_explicitGenericInvocation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterExplicitGenericInvocation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitExplicitGenericInvocation(this); + } + } + + public final ExplicitGenericInvocationContext explicitGenericInvocation() throws RecognitionException { + ExplicitGenericInvocationContext _localctx = new ExplicitGenericInvocationContext(_ctx, getState()); + enterRule(_localctx, 188, RULE_explicitGenericInvocation); + try { + enterOuterAlt(_localctx, 1); + { + setState(1241); nonWildcardTypeArguments(); + setState(1242); explicitGenericInvocationSuffix(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NonWildcardTypeArgumentsContext extends ParserRuleContext { + public TypeListContext typeList() { + return getRuleContext(TypeListContext.class,0); + } + public NonWildcardTypeArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_nonWildcardTypeArguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterNonWildcardTypeArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitNonWildcardTypeArguments(this); + } + } + + public final NonWildcardTypeArgumentsContext nonWildcardTypeArguments() throws RecognitionException { + NonWildcardTypeArgumentsContext _localctx = new NonWildcardTypeArgumentsContext(_ctx, getState()); + enterRule(_localctx, 190, RULE_nonWildcardTypeArguments); + try { + enterOuterAlt(_localctx, 1); + { + setState(1244); match(LT); + setState(1245); typeList(); + setState(1246); match(GT); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentsOrDiamondContext extends ParserRuleContext { + public TypeArgumentsContext typeArguments() { + return getRuleContext(TypeArgumentsContext.class,0); + } + public TypeArgumentsOrDiamondContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArgumentsOrDiamond; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeArgumentsOrDiamond(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeArgumentsOrDiamond(this); + } + } + + public final TypeArgumentsOrDiamondContext typeArgumentsOrDiamond() throws RecognitionException { + TypeArgumentsOrDiamondContext _localctx = new TypeArgumentsOrDiamondContext(_ctx, getState()); + enterRule(_localctx, 192, RULE_typeArgumentsOrDiamond); + try { + setState(1251); + switch ( getInterpreter().adaptivePredict(_input,143,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1248); match(LT); + setState(1249); match(GT); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1250); typeArguments(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NonWildcardTypeArgumentsOrDiamondContext extends ParserRuleContext { + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public NonWildcardTypeArgumentsOrDiamondContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_nonWildcardTypeArgumentsOrDiamond; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterNonWildcardTypeArgumentsOrDiamond(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitNonWildcardTypeArgumentsOrDiamond(this); + } + } + + public final NonWildcardTypeArgumentsOrDiamondContext nonWildcardTypeArgumentsOrDiamond() throws RecognitionException { + NonWildcardTypeArgumentsOrDiamondContext _localctx = new NonWildcardTypeArgumentsOrDiamondContext(_ctx, getState()); + enterRule(_localctx, 194, RULE_nonWildcardTypeArgumentsOrDiamond); + try { + setState(1256); + switch ( getInterpreter().adaptivePredict(_input,144,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1253); match(LT); + setState(1254); match(GT); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1255); nonWildcardTypeArguments(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SuperSuffixContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public SuperSuffixContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_superSuffix; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterSuperSuffix(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitSuperSuffix(this); + } + } + + public final SuperSuffixContext superSuffix() throws RecognitionException { + SuperSuffixContext _localctx = new SuperSuffixContext(_ctx, getState()); + enterRule(_localctx, 196, RULE_superSuffix); + try { + setState(1264); + switch (_input.LA(1)) { + case LPAREN: + enterOuterAlt(_localctx, 1); + { + setState(1258); arguments(); + } + break; + case DOT: + enterOuterAlt(_localctx, 2); + { + setState(1259); match(DOT); + setState(1260); match(Identifier); + setState(1262); + switch ( getInterpreter().adaptivePredict(_input,145,_ctx) ) { + case 1: + { + setState(1261); arguments(); + } + break; + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExplicitGenericInvocationSuffixContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public SuperSuffixContext superSuffix() { + return getRuleContext(SuperSuffixContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public ExplicitGenericInvocationSuffixContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_explicitGenericInvocationSuffix; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterExplicitGenericInvocationSuffix(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitExplicitGenericInvocationSuffix(this); + } + } + + public final ExplicitGenericInvocationSuffixContext explicitGenericInvocationSuffix() throws RecognitionException { + ExplicitGenericInvocationSuffixContext _localctx = new ExplicitGenericInvocationSuffixContext(_ctx, getState()); + enterRule(_localctx, 198, RULE_explicitGenericInvocationSuffix); + try { + setState(1270); + switch (_input.LA(1)) { + case SUPER: + enterOuterAlt(_localctx, 1); + { + setState(1266); match(SUPER); + setState(1267); superSuffix(); + } + break; + case Identifier: + enterOuterAlt(_localctx, 2); + { + setState(1268); match(Identifier); + setState(1269); arguments(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArgumentsContext extends ParserRuleContext { + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public ArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitArguments(this); + } + } + + public final ArgumentsContext arguments() throws RecognitionException { + ArgumentsContext _localctx = new ArgumentsContext(_ctx, getState()); + enterRule(_localctx, 200, RULE_arguments); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1272); match(LPAREN); + setState(1274); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(1273); expressionList(); + } + } + + setState(1276); match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 87: return expression_sempred((ExpressionContext)_localctx, predIndex); + } + return true; + } + private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 0: return precpred(_ctx, 13); + case 1: return precpred(_ctx, 12); + case 2: return precpred(_ctx, 11); + case 3: return precpred(_ctx, 10); + case 4: return precpred(_ctx, 8); + case 5: return precpred(_ctx, 7); + case 6: return precpred(_ctx, 6); + case 7: return precpred(_ctx, 5); + case 8: return precpred(_ctx, 4); + case 9: return precpred(_ctx, 3); + case 10: return precpred(_ctx, 2); + case 11: return precpred(_ctx, 1); + case 12: return precpred(_ctx, 25); + case 13: return precpred(_ctx, 24); + case 14: return precpred(_ctx, 23); + case 15: return precpred(_ctx, 22); + case 16: return precpred(_ctx, 21); + case 17: return precpred(_ctx, 20); + case 18: return precpred(_ctx, 19); + case 19: return precpred(_ctx, 16); + case 20: return precpred(_ctx, 9); + } + return true; + } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3k\u0501\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\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\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ + "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ + "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ + "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\3\2\5\2\u00ce\n\2\3\2\7\2\u00d1"+ + "\n\2\f\2\16\2\u00d4\13\2\3\2\7\2\u00d7\n\2\f\2\16\2\u00da\13\2\3\2\3\2"+ + "\3\3\7\3\u00df\n\3\f\3\16\3\u00e2\13\3\3\3\3\3\3\3\3\3\3\4\3\4\5\4\u00ea"+ + "\n\4\3\4\3\4\3\4\5\4\u00ef\n\4\3\4\3\4\3\5\7\5\u00f4\n\5\f\5\16\5\u00f7"+ + "\13\5\3\5\3\5\7\5\u00fb\n\5\f\5\16\5\u00fe\13\5\3\5\3\5\7\5\u0102\n\5"+ + "\f\5\16\5\u0105\13\5\3\5\3\5\7\5\u0109\n\5\f\5\16\5\u010c\13\5\3\5\3\5"+ + "\5\5\u0110\n\5\3\6\3\6\5\6\u0114\n\6\3\7\3\7\5\7\u0118\n\7\3\b\3\b\5\b"+ + "\u011c\n\b\3\t\3\t\3\t\5\t\u0121\n\t\3\t\3\t\5\t\u0125\n\t\3\t\3\t\5\t"+ + "\u0129\n\t\3\t\3\t\3\n\3\n\3\n\3\n\7\n\u0131\n\n\f\n\16\n\u0134\13\n\3"+ + "\n\3\n\3\13\3\13\3\13\5\13\u013b\n\13\3\f\3\f\3\f\7\f\u0140\n\f\f\f\16"+ + "\f\u0143\13\f\3\r\3\r\3\r\3\r\5\r\u0149\n\r\3\r\3\r\5\r\u014d\n\r\3\r"+ + "\5\r\u0150\n\r\3\r\5\r\u0153\n\r\3\r\3\r\3\16\3\16\3\16\7\16\u015a\n\16"+ + "\f\16\16\16\u015d\13\16\3\17\7\17\u0160\n\17\f\17\16\17\u0163\13\17\3"+ + "\17\3\17\5\17\u0167\n\17\3\17\5\17\u016a\n\17\3\20\3\20\7\20\u016e\n\20"+ + "\f\20\16\20\u0171\13\20\3\21\3\21\3\21\5\21\u0176\n\21\3\21\3\21\5\21"+ + "\u017a\n\21\3\21\3\21\3\22\3\22\3\22\7\22\u0181\n\22\f\22\16\22\u0184"+ + "\13\22\3\23\3\23\7\23\u0188\n\23\f\23\16\23\u018b\13\23\3\23\3\23\3\24"+ + "\3\24\7\24\u0191\n\24\f\24\16\24\u0194\13\24\3\24\3\24\3\25\3\25\5\25"+ + "\u019a\n\25\3\25\3\25\7\25\u019e\n\25\f\25\16\25\u01a1\13\25\3\25\5\25"+ + "\u01a4\n\25\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\5\26\u01af\n"+ + "\26\3\27\3\27\5\27\u01b3\n\27\3\27\3\27\3\27\3\27\7\27\u01b9\n\27\f\27"+ + "\16\27\u01bc\13\27\3\27\3\27\5\27\u01c0\n\27\3\27\3\27\5\27\u01c4\n\27"+ + "\3\30\3\30\3\30\3\31\3\31\3\31\3\31\5\31\u01cd\n\31\3\31\3\31\3\32\3\32"+ + "\3\32\3\33\3\33\3\33\3\33\3\34\7\34\u01d9\n\34\f\34\16\34\u01dc\13\34"+ + "\3\34\3\34\5\34\u01e0\n\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35\5\35\u01e9"+ + "\n\35\3\36\3\36\3\36\3\36\7\36\u01ef\n\36\f\36\16\36\u01f2\13\36\3\36"+ + "\3\36\3\37\3\37\3\37\7\37\u01f9\n\37\f\37\16\37\u01fc\13\37\3\37\3\37"+ + "\3\37\3 \3 \5 \u0203\n \3 \3 \3 \3 \7 \u0209\n \f \16 \u020c\13 \3 \3"+ + " \5 \u0210\n \3 \3 \3!\3!\3!\3\"\3\"\3\"\7\"\u021a\n\"\f\"\16\"\u021d"+ + "\13\"\3#\3#\3#\5#\u0222\n#\3$\3$\3$\7$\u0227\n$\f$\16$\u022a\13$\3%\3"+ + "%\5%\u022e\n%\3&\3&\3&\3&\7&\u0234\n&\f&\16&\u0237\13&\3&\5&\u023a\n&"+ + "\5&\u023c\n&\3&\3&\3\'\3\'\3(\3(\3(\7(\u0245\n(\f(\16(\u0248\13(\3(\3"+ + "(\3(\7(\u024d\n(\f(\16(\u0250\13(\5(\u0252\n(\3)\3)\5)\u0256\n)\3)\3)"+ + "\3)\5)\u025b\n)\7)\u025d\n)\f)\16)\u0260\13)\3*\3*\3+\3+\3+\3+\7+\u0268"+ + "\n+\f+\16+\u026b\13+\3+\3+\3,\3,\3,\3,\5,\u0273\n,\5,\u0275\n,\3-\3-\3"+ + "-\7-\u027a\n-\f-\16-\u027d\13-\3.\3.\5.\u0281\n.\3.\3.\3/\3/\3/\7/\u0288"+ + "\n/\f/\16/\u028b\13/\3/\3/\5/\u028f\n/\3/\5/\u0292\n/\3\60\7\60\u0295"+ + "\n\60\f\60\16\60\u0298\13\60\3\60\3\60\3\60\3\61\7\61\u029e\n\61\f\61"+ + "\16\61\u02a1\13\61\3\61\3\61\3\61\3\61\3\62\3\62\3\63\3\63\3\64\3\64\3"+ + "\64\7\64\u02ae\n\64\f\64\16\64\u02b1\13\64\3\65\3\65\3\66\3\66\3\66\3"+ + "\66\3\66\5\66\u02ba\n\66\3\66\5\66\u02bd\n\66\3\67\3\67\38\38\38\78\u02c4"+ + "\n8\f8\168\u02c7\138\39\39\39\39\3:\3:\3:\5:\u02d0\n:\3;\3;\3;\3;\7;\u02d6"+ + "\n;\f;\16;\u02d9\13;\5;\u02db\n;\3;\5;\u02de\n;\3;\3;\3<\3<\3<\3<\3<\3"+ + "=\3=\7=\u02e9\n=\f=\16=\u02ec\13=\3=\3=\3>\7>\u02f1\n>\f>\16>\u02f4\13"+ + ">\3>\3>\5>\u02f8\n>\3?\3?\3?\3?\3?\3?\5?\u0300\n?\3?\3?\5?\u0304\n?\3"+ + "?\3?\5?\u0308\n?\3?\3?\5?\u030c\n?\5?\u030e\n?\3@\3@\5@\u0312\n@\3A\3"+ + "A\3A\3A\5A\u0318\nA\3B\3B\3C\3C\3C\3D\3D\7D\u0321\nD\fD\16D\u0324\13D"+ + "\3D\3D\3E\3E\3E\5E\u032b\nE\3F\3F\3F\3G\7G\u0331\nG\fG\16G\u0334\13G\3"+ + "G\3G\3G\3H\3H\3H\3H\3H\5H\u033e\nH\3H\3H\3H\3H\3H\3H\3H\5H\u0347\nH\3"+ + "H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\6H\u035c\nH\r"+ + "H\16H\u035d\3H\5H\u0361\nH\3H\5H\u0364\nH\3H\3H\3H\3H\7H\u036a\nH\fH\16"+ + "H\u036d\13H\3H\5H\u0370\nH\3H\3H\3H\3H\7H\u0376\nH\fH\16H\u0379\13H\3"+ + "H\7H\u037c\nH\fH\16H\u037f\13H\3H\3H\3H\3H\3H\3H\3H\3H\5H\u0389\nH\3H"+ + "\3H\3H\3H\3H\3H\3H\5H\u0392\nH\3H\3H\3H\5H\u0397\nH\3H\3H\3H\3H\3H\3H"+ + "\3H\3H\5H\u03a1\nH\3I\3I\3I\7I\u03a6\nI\fI\16I\u03a9\13I\3I\3I\3I\3I\3"+ + "I\3J\3J\3J\7J\u03b3\nJ\fJ\16J\u03b6\13J\3K\3K\3K\3L\3L\3L\5L\u03be\nL"+ + "\3L\3L\3M\3M\3M\7M\u03c5\nM\fM\16M\u03c8\13M\3N\7N\u03cb\nN\fN\16N\u03ce"+ + "\13N\3N\3N\3N\3N\3N\3O\6O\u03d6\nO\rO\16O\u03d7\3O\6O\u03db\nO\rO\16O"+ + "\u03dc\3P\3P\3P\3P\3P\3P\3P\3P\3P\3P\5P\u03e9\nP\3Q\3Q\5Q\u03ed\nQ\3Q"+ + "\3Q\5Q\u03f1\nQ\3Q\3Q\5Q\u03f5\nQ\5Q\u03f7\nQ\3R\3R\5R\u03fb\nR\3S\7S"+ + "\u03fe\nS\fS\16S\u0401\13S\3S\3S\3S\3S\3S\3T\3T\3U\3U\3U\3U\3V\3V\3V\7"+ + "V\u0411\nV\fV\16V\u0414\13V\3W\3W\3X\3X\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y"+ + "\3Y\3Y\3Y\5Y\u0427\nY\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\5Y\u0437"+ + "\nY\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y"+ + "\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\5Y\u0462\nY"+ + "\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\5Y\u0474\nY\3Y\3Y\3Y"+ + "\3Y\3Y\3Y\7Y\u047c\nY\fY\16Y\u047f\13Y\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3"+ + "Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\5Z\u0494\nZ\5Z\u0496\nZ\3[\3[\3[\3[\3[\3[\3"+ + "[\5[\u049f\n[\5[\u04a1\n[\3\\\3\\\5\\\u04a5\n\\\3\\\3\\\3\\\5\\\u04aa"+ + "\n\\\7\\\u04ac\n\\\f\\\16\\\u04af\13\\\3\\\5\\\u04b2\n\\\3]\3]\5]\u04b6"+ + "\n]\3]\3]\3^\3^\3^\3^\7^\u04be\n^\f^\16^\u04c1\13^\3^\3^\3^\3^\3^\3^\3"+ + "^\7^\u04ca\n^\f^\16^\u04cd\13^\3^\3^\7^\u04d1\n^\f^\16^\u04d4\13^\5^\u04d6"+ + "\n^\3_\3_\5_\u04da\n_\3`\3`\3`\3a\3a\3a\3a\3b\3b\3b\5b\u04e6\nb\3c\3c"+ + "\3c\5c\u04eb\nc\3d\3d\3d\3d\5d\u04f1\nd\5d\u04f3\nd\3e\3e\3e\3e\5e\u04f9"+ + "\ne\3f\3f\5f\u04fd\nf\3f\3f\3f\2\3\u00b0g\2\4\6\b\n\f\16\20\22\24\26\30"+ + "\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~\u0080"+ + "\u0082\u0084\u0086\u0088\u008a\u008c\u008e\u0090\u0092\u0094\u0096\u0098"+ + "\u009a\u009c\u009e\u00a0\u00a2\u00a4\u00a6\u00a8\u00aa\u00ac\u00ae\u00b0"+ + "\u00b2\u00b4\u00b6\u00b8\u00ba\u00bc\u00be\u00c0\u00c2\u00c4\u00c6\u00c8"+ + "\u00ca\2\17\6\2 ,,\60\60\63\63\6\2\3\3\24\24#%()\n\2\5\5\7\7\n\n\20\20"+ + "\26\26\35\35\37\37\'\'\4\2\23\23**\3\2\65:\3\2QT\3\2GH\4\2UVZZ\3\2ST\4"+ + "\2EFLM\4\2KKNN\4\2DD[e\3\2QR\u0573\2\u00cd\3\2\2\2\4\u00e0\3\2\2\2\6\u00e7"+ + "\3\2\2\2\b\u010f\3\2\2\2\n\u0113\3\2\2\2\f\u0117\3\2\2\2\16\u011b\3\2"+ + "\2\2\20\u011d\3\2\2\2\22\u012c\3\2\2\2\24\u0137\3\2\2\2\26\u013c\3\2\2"+ + "\2\30\u0144\3\2\2\2\32\u0156\3\2\2\2\34\u0161\3\2\2\2\36\u016b\3\2\2\2"+ + " \u0172\3\2\2\2\"\u017d\3\2\2\2$\u0185\3\2\2\2&\u018e\3\2\2\2(\u01a3\3"+ + "\2\2\2*\u01ae\3\2\2\2,\u01b2\3\2\2\2.\u01c5\3\2\2\2\60\u01c8\3\2\2\2\62"+ + "\u01d0\3\2\2\2\64\u01d3\3\2\2\2\66\u01df\3\2\2\28\u01e8\3\2\2\2:\u01ea"+ + "\3\2\2\2<\u01f5\3\2\2\2>\u0202\3\2\2\2@\u0213\3\2\2\2B\u0216\3\2\2\2D"+ + "\u021e\3\2\2\2F\u0223\3\2\2\2H\u022d\3\2\2\2J\u022f\3\2\2\2L\u023f\3\2"+ + "\2\2N\u0251\3\2\2\2P\u0253\3\2\2\2R\u0261\3\2\2\2T\u0263\3\2\2\2V\u0274"+ + "\3\2\2\2X\u0276\3\2\2\2Z\u027e\3\2\2\2\\\u0291\3\2\2\2^\u0296\3\2\2\2"+ + "`\u029f\3\2\2\2b\u02a6\3\2\2\2d\u02a8\3\2\2\2f\u02aa\3\2\2\2h\u02b2\3"+ + "\2\2\2j\u02b4\3\2\2\2l\u02be\3\2\2\2n\u02c0\3\2\2\2p\u02c8\3\2\2\2r\u02cf"+ + "\3\2\2\2t\u02d1\3\2\2\2v\u02e1\3\2\2\2x\u02e6\3\2\2\2z\u02f7\3\2\2\2|"+ + "\u030d\3\2\2\2~\u0311\3\2\2\2\u0080\u0313\3\2\2\2\u0082\u0319\3\2\2\2"+ + "\u0084\u031b\3\2\2\2\u0086\u031e\3\2\2\2\u0088\u032a\3\2\2\2\u008a\u032c"+ + "\3\2\2\2\u008c\u0332\3\2\2\2\u008e\u03a0\3\2\2\2\u0090\u03a2\3\2\2\2\u0092"+ + "\u03af\3\2\2\2\u0094\u03b7\3\2\2\2\u0096\u03ba\3\2\2\2\u0098\u03c1\3\2"+ + "\2\2\u009a\u03cc\3\2\2\2\u009c\u03d5\3\2\2\2\u009e\u03e8\3\2\2\2\u00a0"+ + "\u03f6\3\2\2\2\u00a2\u03fa\3\2\2\2\u00a4\u03ff\3\2\2\2\u00a6\u0407\3\2"+ + "\2\2\u00a8\u0409\3\2\2\2\u00aa\u040d\3\2\2\2\u00ac\u0415\3\2\2\2\u00ae"+ + "\u0417\3\2\2\2\u00b0\u0426\3\2\2\2\u00b2\u0495\3\2\2\2\u00b4\u04a0\3\2"+ + "\2\2\u00b6\u04b1\3\2\2\2\u00b8\u04b3\3\2\2\2\u00ba\u04b9\3\2\2\2\u00bc"+ + "\u04d7\3\2\2\2\u00be\u04db\3\2\2\2\u00c0\u04de\3\2\2\2\u00c2\u04e5\3\2"+ + "\2\2\u00c4\u04ea\3\2\2\2\u00c6\u04f2\3\2\2\2\u00c8\u04f8\3\2\2\2\u00ca"+ + "\u04fa\3\2\2\2\u00cc\u00ce\5\4\3\2\u00cd\u00cc\3\2\2\2\u00cd\u00ce\3\2"+ + "\2\2\u00ce\u00d2\3\2\2\2\u00cf\u00d1\5\6\4\2\u00d0\u00cf\3\2\2\2\u00d1"+ + "\u00d4\3\2\2\2\u00d2\u00d0\3\2\2\2\u00d2\u00d3\3\2\2\2\u00d3\u00d8\3\2"+ + "\2\2\u00d4\u00d2\3\2\2\2\u00d5\u00d7\5\b\5\2\u00d6\u00d5\3\2\2\2\u00d7"+ + "\u00da\3\2\2\2\u00d8\u00d6\3\2\2\2\u00d8\u00d9\3\2\2\2\u00d9\u00db\3\2"+ + "\2\2\u00da\u00d8\3\2\2\2\u00db\u00dc\7\2\2\3\u00dc\3\3\2\2\2\u00dd\u00df"+ + "\5j\66\2\u00de\u00dd\3\2\2\2\u00df\u00e2\3\2\2\2\u00e0\u00de\3\2\2\2\u00e0"+ + "\u00e1\3\2\2\2\u00e1\u00e3\3\2\2\2\u00e2\u00e0\3\2\2\2\u00e3\u00e4\7\""+ + "\2\2\u00e4\u00e5\5f\64\2\u00e5\u00e6\7A\2\2\u00e6\5\3\2\2\2\u00e7\u00e9"+ + "\7\33\2\2\u00e8\u00ea\7(\2\2\u00e9\u00e8\3\2\2\2\u00e9\u00ea\3\2\2\2\u00ea"+ + "\u00eb\3\2\2\2\u00eb\u00ee\5f\64\2\u00ec\u00ed\7C\2\2\u00ed\u00ef\7U\2"+ + "\2\u00ee\u00ec\3\2\2\2\u00ee\u00ef\3\2\2\2\u00ef\u00f0\3\2\2\2\u00f0\u00f1"+ + "\7A\2\2\u00f1\7\3\2\2\2\u00f2\u00f4\5\f\7\2\u00f3\u00f2\3\2\2\2\u00f4"+ + "\u00f7\3\2\2\2\u00f5\u00f3\3\2\2\2\u00f5\u00f6\3\2\2\2\u00f6\u00f8\3\2"+ + "\2\2\u00f7\u00f5\3\2\2\2\u00f8\u0110\5\20\t\2\u00f9\u00fb\5\f\7\2\u00fa"+ + "\u00f9\3\2\2\2\u00fb\u00fe\3\2\2\2\u00fc\u00fa\3\2\2\2\u00fc\u00fd\3\2"+ + "\2\2\u00fd\u00ff\3\2\2\2\u00fe\u00fc\3\2\2\2\u00ff\u0110\5\30\r\2\u0100"+ + "\u0102\5\f\7\2\u0101\u0100\3\2\2\2\u0102\u0105\3\2\2\2\u0103\u0101\3\2"+ + "\2\2\u0103\u0104\3\2\2\2\u0104\u0106\3\2\2\2\u0105\u0103\3\2\2\2\u0106"+ + "\u0110\5 \21\2\u0107\u0109\5\f\7\2\u0108\u0107\3\2\2\2\u0109\u010c\3\2"+ + "\2\2\u010a\u0108\3\2\2\2\u010a\u010b\3\2\2\2\u010b\u010d\3\2\2\2\u010c"+ + "\u010a\3\2\2\2\u010d\u0110\5v<\2\u010e\u0110\7A\2\2\u010f\u00f5\3\2\2"+ + "\2\u010f\u00fc\3\2\2\2\u010f\u0103\3\2\2\2\u010f\u010a\3\2\2\2\u010f\u010e"+ + "\3\2\2\2\u0110\t\3\2\2\2\u0111\u0114\5\f\7\2\u0112\u0114\t\2\2\2\u0113"+ + "\u0111\3\2\2\2\u0113\u0112\3\2\2\2\u0114\13\3\2\2\2\u0115\u0118\5j\66"+ + "\2\u0116\u0118\t\3\2\2\u0117\u0115\3\2\2\2\u0117\u0116\3\2\2\2\u0118\r"+ + "\3\2\2\2\u0119\u011c\7\24\2\2\u011a\u011c\5j\66\2\u011b\u0119\3\2\2\2"+ + "\u011b\u011a\3\2\2\2\u011c\17\3\2\2\2\u011d\u011e\7\13\2\2\u011e\u0120"+ + "\7f\2\2\u011f\u0121\5\22\n\2\u0120\u011f\3\2\2\2\u0120\u0121\3\2\2\2\u0121"+ + "\u0124\3\2\2\2\u0122\u0123\7\23\2\2\u0123\u0125\5N(\2\u0124\u0122\3\2"+ + "\2\2\u0124\u0125\3\2\2\2\u0125\u0128\3\2\2\2\u0126\u0127\7\32\2\2\u0127"+ + "\u0129\5\"\22\2\u0128\u0126\3\2\2\2\u0128\u0129\3\2\2\2\u0129\u012a\3"+ + "\2\2\2\u012a\u012b\5$\23\2\u012b\21\3\2\2\2\u012c\u012d\7F\2\2\u012d\u0132"+ + "\5\24\13\2\u012e\u012f\7B\2\2\u012f\u0131\5\24\13\2\u0130\u012e\3\2\2"+ + "\2\u0131\u0134\3\2\2\2\u0132\u0130\3\2\2\2\u0132\u0133\3\2\2\2\u0133\u0135"+ + "\3\2\2\2\u0134\u0132\3\2\2\2\u0135\u0136\7E\2\2\u0136\23\3\2\2\2\u0137"+ + "\u013a\7f\2\2\u0138\u0139\7\23\2\2\u0139\u013b\5\26\f\2\u013a\u0138\3"+ + "\2\2\2\u013a\u013b\3\2\2\2\u013b\25\3\2\2\2\u013c\u0141\5N(\2\u013d\u013e"+ + "\7W\2\2\u013e\u0140\5N(\2\u013f\u013d\3\2\2\2\u0140\u0143\3\2\2\2\u0141"+ + "\u013f\3\2\2\2\u0141\u0142\3\2\2\2\u0142\27\3\2\2\2\u0143\u0141\3\2\2"+ + "\2\u0144\u0145\7\22\2\2\u0145\u0148\7f\2\2\u0146\u0147\7\32\2\2\u0147"+ + "\u0149\5\"\22\2\u0148\u0146\3\2\2\2\u0148\u0149\3\2\2\2\u0149\u014a\3"+ + "\2\2\2\u014a\u014c\7=\2\2\u014b\u014d\5\32\16\2\u014c\u014b\3\2\2\2\u014c"+ + "\u014d\3\2\2\2\u014d\u014f\3\2\2\2\u014e\u0150\7B\2\2\u014f\u014e\3\2"+ + "\2\2\u014f\u0150\3\2\2\2\u0150\u0152\3\2\2\2\u0151\u0153\5\36\20\2\u0152"+ + "\u0151\3\2\2\2\u0152\u0153\3\2\2\2\u0153\u0154\3\2\2\2\u0154\u0155\7>"+ + "\2\2\u0155\31\3\2\2\2\u0156\u015b\5\34\17\2\u0157\u0158\7B\2\2\u0158\u015a"+ + "\5\34\17\2\u0159\u0157\3\2\2\2\u015a\u015d\3\2\2\2\u015b\u0159\3\2\2\2"+ + "\u015b\u015c\3\2\2\2\u015c\33\3\2\2\2\u015d\u015b\3\2\2\2\u015e\u0160"+ + "\5j\66\2\u015f\u015e\3\2\2\2\u0160\u0163\3\2\2\2\u0161\u015f\3\2\2\2\u0161"+ + "\u0162\3\2\2\2\u0162\u0164\3\2\2\2\u0163\u0161\3\2\2\2\u0164\u0166\7f"+ + "\2\2\u0165\u0167\5\u00caf\2\u0166\u0165\3\2\2\2\u0166\u0167\3\2\2\2\u0167"+ + "\u0169\3\2\2\2\u0168\u016a\5$\23\2\u0169\u0168\3\2\2\2\u0169\u016a\3\2"+ + "\2\2\u016a\35\3\2\2\2\u016b\u016f\7A\2\2\u016c\u016e\5(\25\2\u016d\u016c"+ + "\3\2\2\2\u016e\u0171\3\2\2\2\u016f\u016d\3\2\2\2\u016f\u0170\3\2\2\2\u0170"+ + "\37\3\2\2\2\u0171\u016f\3\2\2\2\u0172\u0173\7\36\2\2\u0173\u0175\7f\2"+ + "\2\u0174\u0176\5\22\n\2\u0175\u0174\3\2\2\2\u0175\u0176\3\2\2\2\u0176"+ + "\u0179\3\2\2\2\u0177\u0178\7\23\2\2\u0178\u017a\5\"\22\2\u0179\u0177\3"+ + "\2\2\2\u0179\u017a\3\2\2\2\u017a\u017b\3\2\2\2\u017b\u017c\5&\24\2\u017c"+ + "!\3\2\2\2\u017d\u0182\5N(\2\u017e\u017f\7B\2\2\u017f\u0181\5N(\2\u0180"+ + "\u017e\3\2\2\2\u0181\u0184\3\2\2\2\u0182\u0180\3\2\2\2\u0182\u0183\3\2"+ + "\2\2\u0183#\3\2\2\2\u0184\u0182\3\2\2\2\u0185\u0189\7=\2\2\u0186\u0188"+ + "\5(\25\2\u0187\u0186\3\2\2\2\u0188\u018b\3\2\2\2\u0189\u0187\3\2\2\2\u0189"+ + "\u018a\3\2\2\2\u018a\u018c\3\2\2\2\u018b\u0189\3\2\2\2\u018c\u018d\7>"+ + "\2\2\u018d%\3\2\2\2\u018e\u0192\7=\2\2\u018f\u0191\5\66\34\2\u0190\u018f"+ + "\3\2\2\2\u0191\u0194\3\2\2\2\u0192\u0190\3\2\2\2\u0192\u0193\3\2\2\2\u0193"+ + "\u0195\3\2\2\2\u0194\u0192\3\2\2\2\u0195\u0196\7>\2\2\u0196\'\3\2\2\2"+ + "\u0197\u01a4\7A\2\2\u0198\u019a\7(\2\2\u0199\u0198\3\2\2\2\u0199\u019a"+ + "\3\2\2\2\u019a\u019b\3\2\2\2\u019b\u01a4\5\u0086D\2\u019c\u019e\5\n\6"+ + "\2\u019d\u019c\3\2\2\2\u019e\u01a1\3\2\2\2\u019f\u019d\3\2\2\2\u019f\u01a0"+ + "\3\2\2\2\u01a0\u01a2\3\2\2\2\u01a1\u019f\3\2\2\2\u01a2\u01a4\5*\26\2\u01a3"+ + "\u0197\3\2\2\2\u01a3\u0199\3\2\2\2\u01a3\u019f\3\2\2\2\u01a4)\3\2\2\2"+ + "\u01a5\u01af\5,\27\2\u01a6\u01af\5.\30\2\u01a7\u01af\5\64\33\2\u01a8\u01af"+ + "\5\60\31\2\u01a9\u01af\5\62\32\2\u01aa\u01af\5 \21\2\u01ab\u01af\5v<\2"+ + "\u01ac\u01af\5\20\t\2\u01ad\u01af\5\30\r\2\u01ae\u01a5\3\2\2\2\u01ae\u01a6"+ + "\3\2\2\2\u01ae\u01a7\3\2\2\2\u01ae\u01a8\3\2\2\2\u01ae\u01a9\3\2\2\2\u01ae"+ + "\u01aa\3\2\2\2\u01ae\u01ab\3\2\2\2\u01ae\u01ac\3\2\2\2\u01ae\u01ad\3\2"+ + "\2\2\u01af+\3\2\2\2\u01b0\u01b3\5N(\2\u01b1\u01b3\7\62\2\2\u01b2\u01b0"+ + "\3\2\2\2\u01b2\u01b1\3\2\2\2\u01b3\u01b4\3\2\2\2\u01b4\u01b5\7f\2\2\u01b5"+ + "\u01ba\5Z.\2\u01b6\u01b7\7?\2\2\u01b7\u01b9\7@\2\2\u01b8\u01b6\3\2\2\2"+ + "\u01b9\u01bc\3\2\2\2\u01ba\u01b8\3\2\2\2\u01ba\u01bb\3\2\2\2\u01bb\u01bf"+ + "\3\2\2\2\u01bc\u01ba\3\2\2\2\u01bd\u01be\7/\2\2\u01be\u01c0\5X-\2\u01bf"+ + "\u01bd\3\2\2\2\u01bf\u01c0\3\2\2\2\u01c0\u01c3\3\2\2\2\u01c1\u01c4\5b"+ + "\62\2\u01c2\u01c4\7A\2\2\u01c3\u01c1\3\2\2\2\u01c3\u01c2\3\2\2\2\u01c4"+ + "-\3\2\2\2\u01c5\u01c6\5\22\n\2\u01c6\u01c7\5,\27\2\u01c7/\3\2\2\2\u01c8"+ + "\u01c9\7f\2\2\u01c9\u01cc\5Z.\2\u01ca\u01cb\7/\2\2\u01cb\u01cd\5X-\2\u01cc"+ + "\u01ca\3\2\2\2\u01cc\u01cd\3\2\2\2\u01cd\u01ce\3\2\2\2\u01ce\u01cf\5d"+ + "\63\2\u01cf\61\3\2\2\2\u01d0\u01d1\5\22\n\2\u01d1\u01d2\5\60\31\2\u01d2"+ + "\63\3\2\2\2\u01d3\u01d4\5N(\2\u01d4\u01d5\5B\"\2\u01d5\u01d6\7A\2\2\u01d6"+ + "\65\3\2\2\2\u01d7\u01d9\5\n\6\2\u01d8\u01d7\3\2\2\2\u01d9\u01dc\3\2\2"+ + "\2\u01da\u01d8\3\2\2\2\u01da\u01db\3\2\2\2\u01db\u01dd\3\2\2\2\u01dc\u01da"+ + "\3\2\2\2\u01dd\u01e0\58\35\2\u01de\u01e0\7A\2\2\u01df\u01da\3\2\2\2\u01df"+ + "\u01de\3\2\2\2\u01e0\67\3\2\2\2\u01e1\u01e9\5:\36\2\u01e2\u01e9\5> \2"+ + "\u01e3\u01e9\5@!\2\u01e4\u01e9\5 \21\2\u01e5\u01e9\5v<\2\u01e6\u01e9\5"+ + "\20\t\2\u01e7\u01e9\5\30\r\2\u01e8\u01e1\3\2\2\2\u01e8\u01e2\3\2\2\2\u01e8"+ + "\u01e3\3\2\2\2\u01e8\u01e4\3\2\2\2\u01e8\u01e5\3\2\2\2\u01e8\u01e6\3\2"+ + "\2\2\u01e8\u01e7\3\2\2\2\u01e99\3\2\2\2\u01ea\u01eb\5N(\2\u01eb\u01f0"+ + "\5<\37\2\u01ec\u01ed\7B\2\2\u01ed\u01ef\5<\37\2\u01ee\u01ec\3\2\2\2\u01ef"+ + "\u01f2\3\2\2\2\u01f0\u01ee\3\2\2\2\u01f0\u01f1\3\2\2\2\u01f1\u01f3\3\2"+ + "\2\2\u01f2\u01f0\3\2\2\2\u01f3\u01f4\7A\2\2\u01f4;\3\2\2\2\u01f5\u01fa"+ + "\7f\2\2\u01f6\u01f7\7?\2\2\u01f7\u01f9\7@\2\2\u01f8\u01f6\3\2\2\2\u01f9"+ + "\u01fc\3\2\2\2\u01fa\u01f8\3\2\2\2\u01fa\u01fb\3\2\2\2\u01fb\u01fd\3\2"+ + "\2\2\u01fc\u01fa\3\2\2\2\u01fd\u01fe\7D\2\2\u01fe\u01ff\5H%\2\u01ff=\3"+ + "\2\2\2\u0200\u0203\5N(\2\u0201\u0203\7\62\2\2\u0202\u0200\3\2\2\2\u0202"+ + "\u0201\3\2\2\2\u0203\u0204\3\2\2\2\u0204\u0205\7f\2\2\u0205\u020a\5Z."+ + "\2\u0206\u0207\7?\2\2\u0207\u0209\7@\2\2\u0208\u0206\3\2\2\2\u0209\u020c"+ + "\3\2\2\2\u020a\u0208\3\2\2\2\u020a\u020b\3\2\2\2\u020b\u020f\3\2\2\2\u020c"+ + "\u020a\3\2\2\2\u020d\u020e\7/\2\2\u020e\u0210\5X-\2\u020f\u020d\3\2\2"+ + "\2\u020f\u0210\3\2\2\2\u0210\u0211\3\2\2\2\u0211\u0212\7A\2\2\u0212?\3"+ + "\2\2\2\u0213\u0214\5\22\n\2\u0214\u0215\5> \2\u0215A\3\2\2\2\u0216\u021b"+ + "\5D#\2\u0217\u0218\7B\2\2\u0218\u021a\5D#\2\u0219\u0217\3\2\2\2\u021a"+ + "\u021d\3\2\2\2\u021b\u0219\3\2\2\2\u021b\u021c\3\2\2\2\u021cC\3\2\2\2"+ + "\u021d\u021b\3\2\2\2\u021e\u0221\5F$\2\u021f\u0220\7D\2\2\u0220\u0222"+ + "\5H%\2\u0221\u021f\3\2\2\2\u0221\u0222\3\2\2\2\u0222E\3\2\2\2\u0223\u0228"+ + "\7f\2\2\u0224\u0225\7?\2\2\u0225\u0227\7@\2\2\u0226\u0224\3\2\2\2\u0227"+ + "\u022a\3\2\2\2\u0228\u0226\3\2\2\2\u0228\u0229\3\2\2\2\u0229G\3\2\2\2"+ + "\u022a\u0228\3\2\2\2\u022b\u022e\5J&\2\u022c\u022e\5\u00b0Y\2\u022d\u022b"+ + "\3\2\2\2\u022d\u022c\3\2\2\2\u022eI\3\2\2\2\u022f\u023b\7=\2\2\u0230\u0235"+ + "\5H%\2\u0231\u0232\7B\2\2\u0232\u0234\5H%\2\u0233\u0231\3\2\2\2\u0234"+ + "\u0237\3\2\2\2\u0235\u0233\3\2\2\2\u0235\u0236\3\2\2\2\u0236\u0239\3\2"+ + "\2\2\u0237\u0235\3\2\2\2\u0238\u023a\7B\2\2\u0239\u0238\3\2\2\2\u0239"+ + "\u023a\3\2\2\2\u023a\u023c\3\2\2\2\u023b\u0230\3\2\2\2\u023b\u023c\3\2"+ + "\2\2\u023c\u023d\3\2\2\2\u023d\u023e\7>\2\2\u023eK\3\2\2\2\u023f\u0240"+ + "\7f\2\2\u0240M\3\2\2\2\u0241\u0246\5P)\2\u0242\u0243\7?\2\2\u0243\u0245"+ + "\7@\2\2\u0244\u0242\3\2\2\2\u0245\u0248\3\2\2\2\u0246\u0244\3\2\2\2\u0246"+ + "\u0247\3\2\2\2\u0247\u0252\3\2\2\2\u0248\u0246\3\2\2\2\u0249\u024e\5R"+ + "*\2\u024a\u024b\7?\2\2\u024b\u024d\7@\2\2\u024c\u024a\3\2\2\2\u024d\u0250"+ + "\3\2\2\2\u024e\u024c\3\2\2\2\u024e\u024f\3\2\2\2\u024f\u0252\3\2\2\2\u0250"+ + "\u024e\3\2\2\2\u0251\u0241\3\2\2\2\u0251\u0249\3\2\2\2\u0252O\3\2\2\2"+ + "\u0253\u0255\7f\2\2\u0254\u0256\5T+\2\u0255\u0254\3\2\2\2\u0255\u0256"+ + "\3\2\2\2\u0256\u025e\3\2\2\2\u0257\u0258\7C\2\2\u0258\u025a\7f\2\2\u0259"+ + "\u025b\5T+\2\u025a\u0259\3\2\2\2\u025a\u025b\3\2\2\2\u025b\u025d\3\2\2"+ + "\2\u025c\u0257\3\2\2\2\u025d\u0260\3\2\2\2\u025e\u025c\3\2\2\2\u025e\u025f"+ + "\3\2\2\2\u025fQ\3\2\2\2\u0260\u025e\3\2\2\2\u0261\u0262\t\4\2\2\u0262"+ + "S\3\2\2\2\u0263\u0264\7F\2\2\u0264\u0269\5V,\2\u0265\u0266\7B\2\2\u0266"+ + "\u0268\5V,\2\u0267\u0265\3\2\2\2\u0268\u026b\3\2\2\2\u0269\u0267\3\2\2"+ + "\2\u0269\u026a\3\2\2\2\u026a\u026c\3\2\2\2\u026b\u0269\3\2\2\2\u026c\u026d"+ + "\7E\2\2\u026dU\3\2\2\2\u026e\u0275\5N(\2\u026f\u0272\7I\2\2\u0270\u0271"+ + "\t\5\2\2\u0271\u0273\5N(\2\u0272\u0270\3\2\2\2\u0272\u0273\3\2\2\2\u0273"+ + "\u0275\3\2\2\2\u0274\u026e\3\2\2\2\u0274\u026f\3\2\2\2\u0275W\3\2\2\2"+ + "\u0276\u027b\5f\64\2\u0277\u0278\7B\2\2\u0278\u027a\5f\64\2\u0279\u0277"+ + "\3\2\2\2\u027a\u027d\3\2\2\2\u027b\u0279\3\2\2\2\u027b\u027c\3\2\2\2\u027c"+ + "Y\3\2\2\2\u027d\u027b\3\2\2\2\u027e\u0280\7;\2\2\u027f\u0281\5\\/\2\u0280"+ + "\u027f\3\2\2\2\u0280\u0281\3\2\2\2\u0281\u0282\3\2\2\2\u0282\u0283\7<"+ + "\2\2\u0283[\3\2\2\2\u0284\u0289\5^\60\2\u0285\u0286\7B\2\2\u0286\u0288"+ + "\5^\60\2\u0287\u0285\3\2\2\2\u0288\u028b\3\2\2\2\u0289\u0287\3\2\2\2\u0289"+ + "\u028a\3\2\2\2\u028a\u028e\3\2\2\2\u028b\u0289\3\2\2\2\u028c\u028d\7B"+ + "\2\2\u028d\u028f\5`\61\2\u028e\u028c\3\2\2\2\u028e\u028f\3\2\2\2\u028f"+ + "\u0292\3\2\2\2\u0290\u0292\5`\61\2\u0291\u0284\3\2\2\2\u0291\u0290\3\2"+ + "\2\2\u0292]\3\2\2\2\u0293\u0295\5\16\b\2\u0294\u0293\3\2\2\2\u0295\u0298"+ + "\3\2\2\2\u0296\u0294\3\2\2\2\u0296\u0297\3\2\2\2\u0297\u0299\3\2\2\2\u0298"+ + "\u0296\3\2\2\2\u0299\u029a\5N(\2\u029a\u029b\5F$\2\u029b_\3\2\2\2\u029c"+ + "\u029e\5\16\b\2\u029d\u029c\3\2\2\2\u029e\u02a1\3\2\2\2\u029f\u029d\3"+ + "\2\2\2\u029f\u02a0\3\2\2\2\u02a0\u02a2\3\2\2\2\u02a1\u029f\3\2\2\2\u02a2"+ + "\u02a3\5N(\2\u02a3\u02a4\7h\2\2\u02a4\u02a5\5F$\2\u02a5a\3\2\2\2\u02a6"+ + "\u02a7\5\u0086D\2\u02a7c\3\2\2\2\u02a8\u02a9\5\u0086D\2\u02a9e\3\2\2\2"+ + "\u02aa\u02af\7f\2\2\u02ab\u02ac\7C\2\2\u02ac\u02ae\7f\2\2\u02ad\u02ab"+ + "\3\2\2\2\u02ae\u02b1\3\2\2\2\u02af\u02ad\3\2\2\2\u02af\u02b0\3\2\2\2\u02b0"+ + "g\3\2\2\2\u02b1\u02af\3\2\2\2\u02b2\u02b3\t\6\2\2\u02b3i\3\2\2\2\u02b4"+ + "\u02b5\7g\2\2\u02b5\u02bc\5l\67\2\u02b6\u02b9\7;\2\2\u02b7\u02ba\5n8\2"+ + "\u02b8\u02ba\5r:\2\u02b9\u02b7\3\2\2\2\u02b9\u02b8\3\2\2\2\u02b9\u02ba"+ + "\3\2\2\2\u02ba\u02bb\3\2\2\2\u02bb\u02bd\7<\2\2\u02bc\u02b6\3\2\2\2\u02bc"+ + "\u02bd\3\2\2\2\u02bdk\3\2\2\2\u02be\u02bf\5f\64\2\u02bfm\3\2\2\2\u02c0"+ + "\u02c5\5p9\2\u02c1\u02c2\7B\2\2\u02c2\u02c4\5p9\2\u02c3\u02c1\3\2\2\2"+ + "\u02c4\u02c7\3\2\2\2\u02c5\u02c3\3\2\2\2\u02c5\u02c6\3\2\2\2\u02c6o\3"+ + "\2\2\2\u02c7\u02c5\3\2\2\2\u02c8\u02c9\7f\2\2\u02c9\u02ca\7D\2\2\u02ca"+ + "\u02cb\5r:\2\u02cbq\3\2\2\2\u02cc\u02d0\5\u00b0Y\2\u02cd\u02d0\5j\66\2"+ + "\u02ce\u02d0\5t;\2\u02cf\u02cc\3\2\2\2\u02cf\u02cd\3\2\2\2\u02cf\u02ce"+ + "\3\2\2\2\u02d0s\3\2\2\2\u02d1\u02da\7=\2\2\u02d2\u02d7\5r:\2\u02d3\u02d4"+ + "\7B\2\2\u02d4\u02d6\5r:\2\u02d5\u02d3\3\2\2\2\u02d6\u02d9\3\2\2\2\u02d7"+ + "\u02d5\3\2\2\2\u02d7\u02d8\3\2\2\2\u02d8\u02db\3\2\2\2\u02d9\u02d7\3\2"+ + "\2\2\u02da\u02d2\3\2\2\2\u02da\u02db\3\2\2\2\u02db\u02dd\3\2\2\2\u02dc"+ + "\u02de\7B\2\2\u02dd\u02dc\3\2\2\2\u02dd\u02de\3\2\2\2\u02de\u02df\3\2"+ + "\2\2\u02df\u02e0\7>\2\2\u02e0u\3\2\2\2\u02e1\u02e2\7g\2\2\u02e2\u02e3"+ + "\7\36\2\2\u02e3\u02e4\7f\2\2\u02e4\u02e5\5x=\2\u02e5w\3\2\2\2\u02e6\u02ea"+ + "\7=\2\2\u02e7\u02e9\5z>\2\u02e8\u02e7\3\2\2\2\u02e9\u02ec\3\2\2\2\u02ea"+ + "\u02e8\3\2\2\2\u02ea\u02eb\3\2\2\2\u02eb\u02ed\3\2\2\2\u02ec\u02ea\3\2"+ + "\2\2\u02ed\u02ee\7>\2\2\u02eey\3\2\2\2\u02ef\u02f1\5\n\6\2\u02f0\u02ef"+ + "\3\2\2\2\u02f1\u02f4\3\2\2\2\u02f2\u02f0\3\2\2\2\u02f2\u02f3\3\2\2\2\u02f3"+ + "\u02f5\3\2\2\2\u02f4\u02f2\3\2\2\2\u02f5\u02f8\5|?\2\u02f6\u02f8\7A\2"+ + "\2\u02f7\u02f2\3\2\2\2\u02f7\u02f6\3\2\2\2\u02f8{\3\2\2\2\u02f9\u02fa"+ + "\5N(\2\u02fa\u02fb\5~@\2\u02fb\u02fc\7A\2\2\u02fc\u030e\3\2\2\2\u02fd"+ + "\u02ff\5\20\t\2\u02fe\u0300\7A\2\2\u02ff\u02fe\3\2\2\2\u02ff\u0300\3\2"+ + "\2\2\u0300\u030e\3\2\2\2\u0301\u0303\5 \21\2\u0302\u0304\7A\2\2\u0303"+ + "\u0302\3\2\2\2\u0303\u0304\3\2\2\2\u0304\u030e\3\2\2\2\u0305\u0307\5\30"+ + "\r\2\u0306\u0308\7A\2\2\u0307\u0306\3\2\2\2\u0307\u0308\3\2\2\2\u0308"+ + "\u030e\3\2\2\2\u0309\u030b\5v<\2\u030a\u030c\7A\2\2\u030b\u030a\3\2\2"+ + "\2\u030b\u030c\3\2\2\2\u030c\u030e\3\2\2\2\u030d\u02f9\3\2\2\2\u030d\u02fd"+ + "\3\2\2\2\u030d\u0301\3\2\2\2\u030d\u0305\3\2\2\2\u030d\u0309\3\2\2\2\u030e"+ + "}\3\2\2\2\u030f\u0312\5\u0080A\2\u0310\u0312\5\u0082B\2\u0311\u030f\3"+ + "\2\2\2\u0311\u0310\3\2\2\2\u0312\177\3\2\2\2\u0313\u0314\7f\2\2\u0314"+ + "\u0315\7;\2\2\u0315\u0317\7<\2\2\u0316\u0318\5\u0084C\2\u0317\u0316\3"+ + "\2\2\2\u0317\u0318\3\2\2\2\u0318\u0081\3\2\2\2\u0319\u031a\5B\"\2\u031a"+ + "\u0083\3\2\2\2\u031b\u031c\7\16\2\2\u031c\u031d\5r:\2\u031d\u0085\3\2"+ + "\2\2\u031e\u0322\7=\2\2\u031f\u0321\5\u0088E\2\u0320\u031f\3\2\2\2\u0321"+ + "\u0324\3\2\2\2\u0322\u0320\3\2\2\2\u0322\u0323\3\2\2\2\u0323\u0325\3\2"+ + "\2\2\u0324\u0322\3\2\2\2\u0325\u0326\7>\2\2\u0326\u0087\3\2\2\2\u0327"+ + "\u032b\5\u008aF\2\u0328\u032b\5\u008eH\2\u0329\u032b\5\b\5\2\u032a\u0327"+ + "\3\2\2\2\u032a\u0328\3\2\2\2\u032a\u0329\3\2\2\2\u032b\u0089\3\2\2\2\u032c"+ + "\u032d\5\u008cG\2\u032d\u032e\7A\2\2\u032e\u008b\3\2\2\2\u032f\u0331\5"+ + "\16\b\2\u0330\u032f\3\2\2\2\u0331\u0334\3\2\2\2\u0332\u0330\3\2\2\2\u0332"+ + "\u0333\3\2\2\2\u0333\u0335\3\2\2\2\u0334\u0332\3\2\2\2\u0335\u0336\5N"+ + "(\2\u0336\u0337\5B\"\2\u0337\u008d\3\2\2\2\u0338\u03a1\5\u0086D\2\u0339"+ + "\u033a\7\4\2\2\u033a\u033d\5\u00b0Y\2\u033b\u033c\7J\2\2\u033c\u033e\5"+ + "\u00b0Y\2\u033d\u033b\3\2\2\2\u033d\u033e\3\2\2\2\u033e\u033f\3\2\2\2"+ + "\u033f\u0340\7A\2\2\u0340\u03a1\3\2\2\2\u0341\u0342\7\30\2\2\u0342\u0343"+ + "\5\u00a8U\2\u0343\u0346\5\u008eH\2\u0344\u0345\7\21\2\2\u0345\u0347\5"+ + "\u008eH\2\u0346\u0344\3\2\2\2\u0346\u0347\3\2\2\2\u0347\u03a1\3\2\2\2"+ + "\u0348\u0349\7\27\2\2\u0349\u034a\7;\2\2\u034a\u034b\5\u00a0Q\2\u034b"+ + "\u034c\7<\2\2\u034c\u034d\5\u008eH\2\u034d\u03a1\3\2\2\2\u034e\u034f\7"+ + "\64\2\2\u034f\u0350\5\u00a8U\2\u0350\u0351\5\u008eH\2\u0351\u03a1\3\2"+ + "\2\2\u0352\u0353\7\17\2\2\u0353\u0354\5\u008eH\2\u0354\u0355\7\64\2\2"+ + "\u0355\u0356\5\u00a8U\2\u0356\u0357\7A\2\2\u0357\u03a1\3\2\2\2\u0358\u0359"+ + "\7\61\2\2\u0359\u0363\5\u0086D\2\u035a\u035c\5\u0090I\2\u035b\u035a\3"+ + "\2\2\2\u035c\u035d\3\2\2\2\u035d\u035b\3\2\2\2\u035d\u035e\3\2\2\2\u035e"+ + "\u0360\3\2\2\2\u035f\u0361\5\u0094K\2\u0360\u035f\3\2\2\2\u0360\u0361"+ + "\3\2\2\2\u0361\u0364\3\2\2\2\u0362\u0364\5\u0094K\2\u0363\u035b\3\2\2"+ + "\2\u0363\u0362\3\2\2\2\u0364\u03a1\3\2\2\2\u0365\u0366\7\61\2\2\u0366"+ + "\u0367\5\u0096L\2\u0367\u036b\5\u0086D\2\u0368\u036a\5\u0090I\2\u0369"+ + "\u0368\3\2\2\2\u036a\u036d\3\2\2\2\u036b\u0369\3\2\2\2\u036b\u036c\3\2"+ + "\2\2\u036c\u036f\3\2\2\2\u036d\u036b\3\2\2\2\u036e\u0370\5\u0094K\2\u036f"+ + "\u036e\3\2\2\2\u036f\u0370\3\2\2\2\u0370\u03a1\3\2\2\2\u0371\u0372\7+"+ + "\2\2\u0372\u0373\5\u00a8U\2\u0373\u0377\7=\2\2\u0374\u0376\5\u009cO\2"+ + "\u0375\u0374\3\2\2\2\u0376\u0379\3\2\2\2\u0377\u0375\3\2\2\2\u0377\u0378"+ + "\3\2\2\2\u0378\u037d\3\2\2\2\u0379\u0377\3\2\2\2\u037a\u037c\5\u009eP"+ + "\2\u037b\u037a\3\2\2\2\u037c\u037f\3\2\2\2\u037d\u037b\3\2\2\2\u037d\u037e"+ + "\3\2\2\2\u037e\u0380\3\2\2\2\u037f\u037d\3\2\2\2\u0380\u0381\7>\2\2\u0381"+ + "\u03a1\3\2\2\2\u0382\u0383\7,\2\2\u0383\u0384\5\u00a8U\2\u0384\u0385\5"+ + "\u0086D\2\u0385\u03a1\3\2\2\2\u0386\u0388\7&\2\2\u0387\u0389\5\u00b0Y"+ + "\2\u0388\u0387\3\2\2\2\u0388\u0389\3\2\2\2\u0389\u038a\3\2\2\2\u038a\u03a1"+ + "\7A\2\2\u038b\u038c\7.\2\2\u038c\u038d\5\u00b0Y\2\u038d\u038e\7A\2\2\u038e"+ + "\u03a1\3\2\2\2\u038f\u0391\7\6\2\2\u0390\u0392\7f\2\2\u0391\u0390\3\2"+ + "\2\2\u0391\u0392\3\2\2\2\u0392\u0393\3\2\2\2\u0393\u03a1\7A\2\2\u0394"+ + "\u0396\7\r\2\2\u0395\u0397\7f\2\2\u0396\u0395\3\2\2\2\u0396\u0397\3\2"+ + "\2\2\u0397\u0398\3\2\2\2\u0398\u03a1\7A\2\2\u0399\u03a1\7A\2\2\u039a\u039b"+ + "\5\u00acW\2\u039b\u039c\7A\2\2\u039c\u03a1\3\2\2\2\u039d\u039e\7f\2\2"+ + "\u039e\u039f\7J\2\2\u039f\u03a1\5\u008eH\2\u03a0\u0338\3\2\2\2\u03a0\u0339"+ + "\3\2\2\2\u03a0\u0341\3\2\2\2\u03a0\u0348\3\2\2\2\u03a0\u034e\3\2\2\2\u03a0"+ + "\u0352\3\2\2\2\u03a0\u0358\3\2\2\2\u03a0\u0365\3\2\2\2\u03a0\u0371\3\2"+ + "\2\2\u03a0\u0382\3\2\2\2\u03a0\u0386\3\2\2\2\u03a0\u038b\3\2\2\2\u03a0"+ + "\u038f\3\2\2\2\u03a0\u0394\3\2\2\2\u03a0\u0399\3\2\2\2\u03a0\u039a\3\2"+ + "\2\2\u03a0\u039d\3\2\2\2\u03a1\u008f\3\2\2\2\u03a2\u03a3\7\t\2\2\u03a3"+ + "\u03a7\7;\2\2\u03a4\u03a6\5\16\b\2\u03a5\u03a4\3\2\2\2\u03a6\u03a9\3\2"+ + "\2\2\u03a7\u03a5\3\2\2\2\u03a7\u03a8\3\2\2\2\u03a8\u03aa\3\2\2\2\u03a9"+ + "\u03a7\3\2\2\2\u03aa\u03ab\5\u0092J\2\u03ab\u03ac\7f\2\2\u03ac\u03ad\7"+ + "<\2\2\u03ad\u03ae\5\u0086D\2\u03ae\u0091\3\2\2\2\u03af\u03b4\5f\64\2\u03b0"+ + "\u03b1\7X\2\2\u03b1\u03b3\5f\64\2\u03b2\u03b0\3\2\2\2\u03b3\u03b6\3\2"+ + "\2\2\u03b4\u03b2\3\2\2\2\u03b4\u03b5\3\2\2\2\u03b5\u0093\3\2\2\2\u03b6"+ + "\u03b4\3\2\2\2\u03b7\u03b8\7\25\2\2\u03b8\u03b9\5\u0086D\2\u03b9\u0095"+ + "\3\2\2\2\u03ba\u03bb\7;\2\2\u03bb\u03bd\5\u0098M\2\u03bc\u03be\7A\2\2"+ + "\u03bd\u03bc\3\2\2\2\u03bd\u03be\3\2\2\2\u03be\u03bf\3\2\2\2\u03bf\u03c0"+ + "\7<\2\2\u03c0\u0097\3\2\2\2\u03c1\u03c6\5\u009aN\2\u03c2\u03c3\7A\2\2"+ + "\u03c3\u03c5\5\u009aN\2\u03c4\u03c2\3\2\2\2\u03c5\u03c8\3\2\2\2\u03c6"+ + "\u03c4\3\2\2\2\u03c6\u03c7\3\2\2\2\u03c7\u0099\3\2\2\2\u03c8\u03c6\3\2"+ + "\2\2\u03c9\u03cb\5\16\b\2\u03ca\u03c9\3\2\2\2\u03cb\u03ce\3\2\2\2\u03cc"+ + "\u03ca\3\2\2\2\u03cc\u03cd\3\2\2\2\u03cd\u03cf\3\2\2\2\u03ce\u03cc\3\2"+ + "\2\2\u03cf\u03d0\5P)\2\u03d0\u03d1\5F$\2\u03d1\u03d2\7D\2\2\u03d2\u03d3"+ + "\5\u00b0Y\2\u03d3\u009b\3\2\2\2\u03d4\u03d6\5\u009eP\2\u03d5\u03d4\3\2"+ + "\2\2\u03d6\u03d7\3\2\2\2\u03d7\u03d5\3\2\2\2\u03d7\u03d8\3\2\2\2\u03d8"+ + "\u03da\3\2\2\2\u03d9\u03db\5\u0088E\2\u03da\u03d9\3\2\2\2\u03db\u03dc"+ + "\3\2\2\2\u03dc\u03da\3\2\2\2\u03dc\u03dd\3\2\2\2\u03dd\u009d\3\2\2\2\u03de"+ + "\u03df\7\b\2\2\u03df\u03e0\5\u00aeX\2\u03e0\u03e1\7J\2\2\u03e1\u03e9\3"+ + "\2\2\2\u03e2\u03e3\7\b\2\2\u03e3\u03e4\5L\'\2\u03e4\u03e5\7J\2\2\u03e5"+ + "\u03e9\3\2\2\2\u03e6\u03e7\7\16\2\2\u03e7\u03e9\7J\2\2\u03e8\u03de\3\2"+ + "\2\2\u03e8\u03e2\3\2\2\2\u03e8\u03e6\3\2\2\2\u03e9\u009f\3\2\2\2\u03ea"+ + "\u03f7\5\u00a4S\2\u03eb\u03ed\5\u00a2R\2\u03ec\u03eb\3\2\2\2\u03ec\u03ed"+ + "\3\2\2\2\u03ed\u03ee\3\2\2\2\u03ee\u03f0\7A\2\2\u03ef\u03f1\5\u00b0Y\2"+ + "\u03f0\u03ef\3\2\2\2\u03f0\u03f1\3\2\2\2\u03f1\u03f2\3\2\2\2\u03f2\u03f4"+ + "\7A\2\2\u03f3\u03f5\5\u00a6T\2\u03f4\u03f3\3\2\2\2\u03f4\u03f5\3\2\2\2"+ + "\u03f5\u03f7\3\2\2\2\u03f6\u03ea\3\2\2\2\u03f6\u03ec\3\2\2\2\u03f7\u00a1"+ + "\3\2\2\2\u03f8\u03fb\5\u008cG\2\u03f9\u03fb\5\u00aaV\2\u03fa\u03f8\3\2"+ + "\2\2\u03fa\u03f9\3\2\2\2\u03fb\u00a3\3\2\2\2\u03fc\u03fe\5\16\b\2\u03fd"+ + "\u03fc\3\2\2\2\u03fe\u0401\3\2\2\2\u03ff\u03fd\3\2\2\2\u03ff\u0400\3\2"+ + "\2\2\u0400\u0402\3\2\2\2\u0401\u03ff\3\2\2\2\u0402\u0403\5N(\2\u0403\u0404"+ + "\7f\2\2\u0404\u0405\7J\2\2\u0405\u0406\5\u00b0Y\2\u0406\u00a5\3\2\2\2"+ + "\u0407\u0408\5\u00aaV\2\u0408\u00a7\3\2\2\2\u0409\u040a\7;\2\2\u040a\u040b"+ + "\5\u00b0Y\2\u040b\u040c\7<\2\2\u040c\u00a9\3\2\2\2\u040d\u0412\5\u00b0"+ + "Y\2\u040e\u040f\7B\2\2\u040f\u0411\5\u00b0Y\2\u0410\u040e\3\2\2\2\u0411"+ + "\u0414\3\2\2\2\u0412\u0410\3\2\2\2\u0412\u0413\3\2\2\2\u0413\u00ab\3\2"+ + "\2\2\u0414\u0412\3\2\2\2\u0415\u0416\5\u00b0Y\2\u0416\u00ad\3\2\2\2\u0417"+ + "\u0418\5\u00b0Y\2\u0418\u00af\3\2\2\2\u0419\u041a\bY\1\2\u041a\u041b\7"+ + ";\2\2\u041b\u041c\5N(\2\u041c\u041d\7<\2\2\u041d\u041e\5\u00b0Y\23\u041e"+ + "\u0427\3\2\2\2\u041f\u0420\t\7\2\2\u0420\u0427\5\u00b0Y\21\u0421\u0422"+ + "\t\b\2\2\u0422\u0427\5\u00b0Y\20\u0423\u0427\5\u00b2Z\2\u0424\u0425\7"+ + "!\2\2\u0425\u0427\5\u00b4[\2\u0426\u0419\3\2\2\2\u0426\u041f\3\2\2\2\u0426"+ + "\u0421\3\2\2\2\u0426\u0423\3\2\2\2\u0426\u0424\3\2\2\2\u0427\u047d\3\2"+ + "\2\2\u0428\u0429\f\17\2\2\u0429\u042a\t\t\2\2\u042a\u047c\5\u00b0Y\20"+ + "\u042b\u042c\f\16\2\2\u042c\u042d\t\n\2\2\u042d\u047c\5\u00b0Y\17\u042e"+ + "\u0436\f\r\2\2\u042f\u0430\7F\2\2\u0430\u0437\7F\2\2\u0431\u0432\7E\2"+ + "\2\u0432\u0433\7E\2\2\u0433\u0437\7E\2\2\u0434\u0435\7E\2\2\u0435\u0437"+ + "\7E\2\2\u0436\u042f\3\2\2\2\u0436\u0431\3\2\2\2\u0436\u0434\3\2\2\2\u0437"+ + "\u0438\3\2\2\2\u0438\u047c\5\u00b0Y\16\u0439\u043a\f\f\2\2\u043a\u043b"+ + "\t\13\2\2\u043b\u047c\5\u00b0Y\r\u043c\u043d\f\n\2\2\u043d\u043e\t\f\2"+ + "\2\u043e\u047c\5\u00b0Y\13\u043f\u0440\f\t\2\2\u0440\u0441\7W\2\2\u0441"+ + "\u047c\5\u00b0Y\n\u0442\u0443\f\b\2\2\u0443\u0444\7Y\2\2\u0444\u047c\5"+ + "\u00b0Y\t\u0445\u0446\f\7\2\2\u0446\u0447\7X\2\2\u0447\u047c\5\u00b0Y"+ + "\b\u0448\u0449\f\6\2\2\u0449\u044a\7O\2\2\u044a\u047c\5\u00b0Y\7\u044b"+ + "\u044c\f\5\2\2\u044c\u044d\7P\2\2\u044d\u047c\5\u00b0Y\6\u044e\u044f\f"+ + "\4\2\2\u044f\u0450\7I\2\2\u0450\u0451\5\u00b0Y\2\u0451\u0452\7J\2\2\u0452"+ + "\u0453\5\u00b0Y\5\u0453\u047c\3\2\2\2\u0454\u0455\f\3\2\2\u0455\u0456"+ + "\t\r\2\2\u0456\u047c\5\u00b0Y\4\u0457\u0458\f\33\2\2\u0458\u0459\7C\2"+ + "\2\u0459\u047c\7f\2\2\u045a\u045b\f\32\2\2\u045b\u045c\7C\2\2\u045c\u047c"+ + "\7-\2\2\u045d\u045e\f\31\2\2\u045e\u045f\7C\2\2\u045f\u0461\7!\2\2\u0460"+ + "\u0462\5\u00c0a\2\u0461\u0460\3\2\2\2\u0461\u0462\3\2\2\2\u0462\u0463"+ + "\3\2\2\2\u0463\u047c\5\u00b8]\2\u0464\u0465\f\30\2\2\u0465\u0466\7C\2"+ + "\2\u0466\u0467\7*\2\2\u0467\u047c\5\u00c6d\2\u0468\u0469\f\27\2\2\u0469"+ + "\u046a\7C\2\2\u046a\u047c\5\u00be`\2\u046b\u046c\f\26\2\2\u046c\u046d"+ + "\7?\2\2\u046d\u046e\5\u00b0Y\2\u046e\u046f\7@\2\2\u046f\u047c\3\2\2\2"+ + "\u0470\u0471\f\25\2\2\u0471\u0473\7;\2\2\u0472\u0474\5\u00aaV\2\u0473"+ + "\u0472\3\2\2\2\u0473\u0474\3\2\2\2\u0474\u0475\3\2\2\2\u0475\u047c\7<"+ + "\2\2\u0476\u0477\f\22\2\2\u0477\u047c\t\16\2\2\u0478\u0479\f\13\2\2\u0479"+ + "\u047a\7\34\2\2\u047a\u047c\5N(\2\u047b\u0428\3\2\2\2\u047b\u042b\3\2"+ + "\2\2\u047b\u042e\3\2\2\2\u047b\u0439\3\2\2\2\u047b\u043c\3\2\2\2\u047b"+ + "\u043f\3\2\2\2\u047b\u0442\3\2\2\2\u047b\u0445\3\2\2\2\u047b\u0448\3\2"+ + "\2\2\u047b\u044b\3\2\2\2\u047b\u044e\3\2\2\2\u047b\u0454\3\2\2\2\u047b"+ + "\u0457\3\2\2\2\u047b\u045a\3\2\2\2\u047b\u045d\3\2\2\2\u047b\u0464\3\2"+ + "\2\2\u047b\u0468\3\2\2\2\u047b\u046b\3\2\2\2\u047b\u0470\3\2\2\2\u047b"+ + "\u0476\3\2\2\2\u047b\u0478\3\2\2\2\u047c\u047f\3\2\2\2\u047d\u047b\3\2"+ + "\2\2\u047d\u047e\3\2\2\2\u047e\u00b1\3\2\2\2\u047f\u047d\3\2\2\2\u0480"+ + "\u0481\7;\2\2\u0481\u0482\5\u00b0Y\2\u0482\u0483\7<\2\2\u0483\u0496\3"+ + "\2\2\2\u0484\u0496\7-\2\2\u0485\u0496\7*\2\2\u0486\u0496\5h\65\2\u0487"+ + "\u0496\7f\2\2\u0488\u0489\5N(\2\u0489\u048a\7C\2\2\u048a\u048b\7\13\2"+ + "\2\u048b\u0496\3\2\2\2\u048c\u048d\7\62\2\2\u048d\u048e\7C\2\2\u048e\u0496"+ + "\7\13\2\2\u048f\u0493\5\u00c0a\2\u0490\u0494\5\u00c8e\2\u0491\u0492\7"+ + "-\2\2\u0492\u0494\5\u00caf\2\u0493\u0490\3\2\2\2\u0493\u0491\3\2\2\2\u0494"+ + "\u0496\3\2\2\2\u0495\u0480\3\2\2\2\u0495\u0484\3\2\2\2\u0495\u0485\3\2"+ + "\2\2\u0495\u0486\3\2\2\2\u0495\u0487\3\2\2\2\u0495\u0488\3\2\2\2\u0495"+ + "\u048c\3\2\2\2\u0495\u048f\3\2\2\2\u0496\u00b3\3\2\2\2\u0497\u0498\5\u00c0"+ + "a\2\u0498\u0499\5\u00b6\\\2\u0499\u049a\5\u00bc_\2\u049a\u04a1\3\2\2\2"+ + "\u049b\u049e\5\u00b6\\\2\u049c\u049f\5\u00ba^\2\u049d\u049f\5\u00bc_\2"+ + "\u049e\u049c\3\2\2\2\u049e\u049d\3\2\2\2\u049f\u04a1\3\2\2\2\u04a0\u0497"+ + "\3\2\2\2\u04a0\u049b\3\2\2\2\u04a1\u00b5\3\2\2\2\u04a2\u04a4\7f\2\2\u04a3"+ + "\u04a5\5\u00c2b\2\u04a4\u04a3\3\2\2\2\u04a4\u04a5\3\2\2\2\u04a5\u04ad"+ + "\3\2\2\2\u04a6\u04a7\7C\2\2\u04a7\u04a9\7f\2\2\u04a8\u04aa\5\u00c2b\2"+ + "\u04a9\u04a8\3\2\2\2\u04a9\u04aa\3\2\2\2\u04aa\u04ac\3\2\2\2\u04ab\u04a6"+ + "\3\2\2\2\u04ac\u04af\3\2\2\2\u04ad\u04ab\3\2\2\2\u04ad\u04ae\3\2\2\2\u04ae"+ + "\u04b2\3\2\2\2\u04af\u04ad\3\2\2\2\u04b0\u04b2\5R*\2\u04b1\u04a2\3\2\2"+ + "\2\u04b1\u04b0\3\2\2\2\u04b2\u00b7\3\2\2\2\u04b3\u04b5\7f\2\2\u04b4\u04b6"+ + "\5\u00c4c\2\u04b5\u04b4\3\2\2\2\u04b5\u04b6\3\2\2\2\u04b6\u04b7\3\2\2"+ + "\2\u04b7\u04b8\5\u00bc_\2\u04b8\u00b9\3\2\2\2\u04b9\u04d5\7?\2\2\u04ba"+ + "\u04bf\7@\2\2\u04bb\u04bc\7?\2\2\u04bc\u04be\7@\2\2\u04bd\u04bb\3\2\2"+ + "\2\u04be\u04c1\3\2\2\2\u04bf\u04bd\3\2\2\2\u04bf\u04c0\3\2\2\2\u04c0\u04c2"+ + "\3\2\2\2\u04c1\u04bf\3\2\2\2\u04c2\u04d6\5J&\2\u04c3\u04c4\5\u00b0Y\2"+ + "\u04c4\u04cb\7@\2\2\u04c5\u04c6\7?\2\2\u04c6\u04c7\5\u00b0Y\2\u04c7\u04c8"+ + "\7@\2\2\u04c8\u04ca\3\2\2\2\u04c9\u04c5\3\2\2\2\u04ca\u04cd\3\2\2\2\u04cb"+ + "\u04c9\3\2\2\2\u04cb\u04cc\3\2\2\2\u04cc\u04d2\3\2\2\2\u04cd\u04cb\3\2"+ + "\2\2\u04ce\u04cf\7?\2\2\u04cf\u04d1\7@\2\2\u04d0\u04ce\3\2\2\2\u04d1\u04d4"+ + "\3\2\2\2\u04d2\u04d0\3\2\2\2\u04d2\u04d3\3\2\2\2\u04d3\u04d6\3\2\2\2\u04d4"+ + "\u04d2\3\2\2\2\u04d5\u04ba\3\2\2\2\u04d5\u04c3\3\2\2\2\u04d6\u00bb\3\2"+ + "\2\2\u04d7\u04d9\5\u00caf\2\u04d8\u04da\5$\23\2\u04d9\u04d8\3\2\2\2\u04d9"+ + "\u04da\3\2\2\2\u04da\u00bd\3\2\2\2\u04db\u04dc\5\u00c0a\2\u04dc\u04dd"+ + "\5\u00c8e\2\u04dd\u00bf\3\2\2\2\u04de\u04df\7F\2\2\u04df\u04e0\5\"\22"+ + "\2\u04e0\u04e1\7E\2\2\u04e1\u00c1\3\2\2\2\u04e2\u04e3\7F\2\2\u04e3\u04e6"+ + "\7E\2\2\u04e4\u04e6\5T+\2\u04e5\u04e2\3\2\2\2\u04e5\u04e4\3\2\2\2\u04e6"+ + "\u00c3\3\2\2\2\u04e7\u04e8\7F\2\2\u04e8\u04eb\7E\2\2\u04e9\u04eb\5\u00c0"+ + "a\2\u04ea\u04e7\3\2\2\2\u04ea\u04e9\3\2\2\2\u04eb\u00c5\3\2\2\2\u04ec"+ + "\u04f3\5\u00caf\2\u04ed\u04ee\7C\2\2\u04ee\u04f0\7f\2\2\u04ef\u04f1\5"+ + "\u00caf\2\u04f0\u04ef\3\2\2\2\u04f0\u04f1\3\2\2\2\u04f1\u04f3\3\2\2\2"+ + "\u04f2\u04ec\3\2\2\2\u04f2\u04ed\3\2\2\2\u04f3\u00c7\3\2\2\2\u04f4\u04f5"+ + "\7*\2\2\u04f5\u04f9\5\u00c6d\2\u04f6\u04f7\7f\2\2\u04f7\u04f9\5\u00ca"+ + "f\2\u04f8\u04f4\3\2\2\2\u04f8\u04f6\3\2\2\2\u04f9\u00c9\3\2\2\2\u04fa"+ + "\u04fc\7;\2\2\u04fb\u04fd\5\u00aaV\2\u04fc\u04fb\3\2\2\2\u04fc\u04fd\3"+ + "\2\2\2\u04fd\u04fe\3\2\2\2\u04fe\u04ff\7<\2\2\u04ff\u00cb\3\2\2\2\u0097"+ + "\u00cd\u00d2\u00d8\u00e0\u00e9\u00ee\u00f5\u00fc\u0103\u010a\u010f\u0113"+ + "\u0117\u011b\u0120\u0124\u0128\u0132\u013a\u0141\u0148\u014c\u014f\u0152"+ + "\u015b\u0161\u0166\u0169\u016f\u0175\u0179\u0182\u0189\u0192\u0199\u019f"+ + "\u01a3\u01ae\u01b2\u01ba\u01bf\u01c3\u01cc\u01da\u01df\u01e8\u01f0\u01fa"+ + "\u0202\u020a\u020f\u021b\u0221\u0228\u022d\u0235\u0239\u023b\u0246\u024e"+ + "\u0251\u0255\u025a\u025e\u0269\u0272\u0274\u027b\u0280\u0289\u028e\u0291"+ + "\u0296\u029f\u02af\u02b9\u02bc\u02c5\u02cf\u02d7\u02da\u02dd\u02ea\u02f2"+ + "\u02f7\u02ff\u0303\u0307\u030b\u030d\u0311\u0317\u0322\u032a\u0332\u033d"+ + "\u0346\u035d\u0360\u0363\u036b\u036f\u0377\u037d\u0388\u0391\u0396\u03a0"+ + "\u03a7\u03b4\u03bd\u03c6\u03cc\u03d7\u03dc\u03e8\u03ec\u03f0\u03f4\u03f6"+ + "\u03fa\u03ff\u0412\u0426\u0436\u0461\u0473\u047b\u047d\u0493\u0495\u049e"+ + "\u04a0\u04a4\u04a9\u04ad\u04b1\u04b5\u04bf\u04cb\u04d2\u04d5\u04d9\u04e5"+ + "\u04ea\u04f0\u04f2\u04f8\u04fc"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/antlr/makefile b/antlr/makefile new file mode 100644 index 000000000..fb834ab21 --- /dev/null +++ b/antlr/makefile @@ -0,0 +1,4 @@ +all: + java -jar ./antlr-4.4-complete.jar Java8.g4 + javac -cp ./antlr-4.4-complete.jar:. *.java + From d6c75463ca0fad4fcf58a2e8d9f4e374b4a1ae96 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 2 Sep 2014 10:33:54 +0200 Subject: [PATCH 02/46] =?UTF-8?q?Projektstruktur=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../JavaParserBuilder.launch | 4 +- .settings/org.eclipse.core.resources.prefs | 6 +- bin/.gitignore | 8 +- .../core}/AClassOrInterface.java | 6 +- .../dhbwstuttgart/core}/IItemWithOffset.java | 2 +- .../dhbwstuttgart/core}/MyCompiler.java | 53 +- .../dhbwstuttgart/core}/MyCompilerAPI.java | 13 +- .../dhbwstuttgart/core}/SourceFile.java | 71 +- .../dhbwstuttgart/core}/SyntaxTreeNode.java | 28 +- .../syntaxtree}/BasicAssumptionClass.java | 2 +- .../dhbwstuttgart/syntaxtree}/Class.java | 63 +- .../dhbwstuttgart/syntaxtree}/ClassBody.java | 15 +- .../syntaxtree}/ClassHelper.java | 10 +- .../dhbwstuttgart/syntaxtree}/Constant.java | 16 +- .../syntaxtree}/Constructor.java | 29 +- .../syntaxtree}/ExceptionList.java | 6 +- .../dhbwstuttgart/syntaxtree}/Field.java | 29 +- .../syntaxtree}/FieldDeclaration.java | 31 +- .../syntaxtree}/FormalParameter.java | 30 +- .../dhbwstuttgart/syntaxtree}/Generic.java | 4 +- .../syntaxtree}/GenericDeclarationList.java | 6 +- .../syntaxtree}/ImportDeclarations.java | 4 +- .../dhbwstuttgart/syntaxtree}/Method.java | 41 +- .../syntaxtree}/ParameterList.java | 9 +- .../syntaxtree/misc}/DeclId.java | 25 +- .../syntaxtree/misc}/Status.java | 2 +- .../syntaxtree/misc}/UsedId.java | 13 +- .../syntaxtree/misc}/UserDef.java | 2 +- .../syntaxtree/operator}/AddOp.java | 22 +- .../syntaxtree/operator/AndOp.java | 29 + .../syntaxtree/operator}/DivideOp.java | 8 +- .../syntaxtree/operator}/EqualOp.java | 13 +- .../syntaxtree/operator}/GreaterEquOp.java | 8 +- .../syntaxtree/operator}/GreaterOp.java | 8 +- .../syntaxtree/operator}/LessEquOp.java | 8 +- .../syntaxtree/operator}/LessOp.java | 8 +- .../syntaxtree/operator}/LogOp.java | 28 +- .../syntaxtree/operator}/MinusOp.java | 8 +- .../syntaxtree/operator}/ModuloOp.java | 8 +- .../syntaxtree/operator}/MulOp.java | 14 +- .../syntaxtree/operator}/NotEqualOp.java | 13 +- .../syntaxtree/operator}/Operator.java | 28 +- .../syntaxtree/operator}/OrOp.java | 2 +- .../syntaxtree/operator}/PlusOp.java | 8 +- .../syntaxtree/operator}/RelOp.java | 14 +- .../syntaxtree/operator}/TimesOp.java | 8 +- .../syntaxtree/statement}/ArgumentList.java | 8 +- .../syntaxtree/statement}/Assign.java | 35 +- .../syntaxtree/statement}/Binary.java | 48 +- .../syntaxtree/statement}/BinaryExpr.java | 7 +- .../syntaxtree/statement}/Block.java | 36 +- .../syntaxtree/statement}/BoolLiteral.java | 29 +- .../syntaxtree/statement}/CastExpr.java | 25 +- .../syntaxtree/statement}/CharLiteral.java | 29 +- .../syntaxtree/statement}/DoubleLiteral.java | 26 +- .../syntaxtree/statement}/EmptyStmt.java | 25 +- .../syntaxtree/statement}/Expr.java | 14 +- .../syntaxtree/statement}/ExprStmt.java | 14 +- .../syntaxtree/statement}/FloatLiteral.java | 22 +- .../syntaxtree/statement}/ForStmt.java | 28 +- .../syntaxtree/statement}/IfStmt.java | 46 +- .../syntaxtree/statement}/InstVar.java | 45 +- .../syntaxtree/statement}/InstanceOf.java | 29 +- .../syntaxtree/statement}/IntLiteral.java | 29 +- .../statement}/LambdaExpression.java | 44 +- .../statement}/LambdaParameter.java | 14 +- .../syntaxtree/statement}/Literal.java | 2 +- .../statement}/LocalOrFieldVar.java | 39 +- .../syntaxtree/statement}/LocalVarDecl.java | 52 +- .../syntaxtree/statement}/LongLiteral.java | 24 +- .../syntaxtree/statement}/MethodCall.java | 56 +- .../syntaxtree/statement}/NegativeExpr.java | 31 +- .../syntaxtree/statement}/NewArray.java | 25 +- .../syntaxtree/statement}/NewClass.java | 49 +- .../syntaxtree/statement}/NotExpr.java | 35 +- .../syntaxtree/statement}/Null.java | 27 +- .../syntaxtree/statement}/PositivExpr.java | 25 +- .../syntaxtree/statement}/PostDecExpr.java | 31 +- .../syntaxtree/statement}/PostIncExpr.java | 37 +- .../syntaxtree/statement}/PreDecExpr.java | 31 +- .../syntaxtree/statement}/PreIncExpr.java | 31 +- .../syntaxtree/statement}/Receiver.java | 13 +- .../syntaxtree/statement}/Return.java | 31 +- .../syntaxtree/statement}/Statement.java | 28 +- .../syntaxtree/statement}/StringLiteral.java | 32 +- .../syntaxtree/statement}/This.java | 30 +- .../syntaxtree/statement}/UnaryExpr.java | 14 +- .../syntaxtree/statement}/UnaryMinus.java | 2 +- .../syntaxtree/statement}/UnaryNot.java | 2 +- .../syntaxtree/statement}/UnaryPlus.java | 2 +- .../syntaxtree/statement}/WhileStmt.java | 40 +- .../syntaxtree/type}/BaseType.java | 6 +- .../syntaxtree/type}/BooleanType.java | 6 +- .../type}/BoundedGenericTypeVar.java | 10 +- .../syntaxtree/type}/CRefTypeSet.java | 2 +- .../syntaxtree/type}/CharacterType.java | 6 +- .../syntaxtree/type}/DoubleType.java | 6 +- .../syntaxtree/type}/ExtendsWildcardType.java | 2 +- .../syntaxtree/type}/FloatType.java | 6 +- .../type}/FreshExtendsWildcardType.java | 2 +- .../type}/FreshSuperWildcardType.java | 2 +- .../syntaxtree/type}/FreshWildcardType.java | 6 +- .../syntaxtree/type}/GenericTypeVar.java | 21 +- .../syntaxtree/type}/IMatchable.java | 2 +- .../syntaxtree/type}/ITypeContainer.java | 2 +- .../syntaxtree/type}/IntegerType.java | 6 +- .../syntaxtree/type}/LongType.java | 6 +- .../dhbwstuttgart/syntaxtree/type}/Pair.java | 2 +- .../syntaxtree/type}/ParaList.java | 2 +- .../syntaxtree/type}/RefType.java | 24 +- .../syntaxtree/type}/ReturnType.java | 6 +- .../syntaxtree/type}/SuperWildcardType.java | 6 +- .../dhbwstuttgart/syntaxtree/type}/Type.java | 17 +- .../syntaxtree/type}/TypePlaceholder.java | 14 +- .../dhbwstuttgart/syntaxtree/type}/Void.java | 10 +- .../syntaxtree/type}/WildcardType.java | 6 +- .../typeinference}/ConstraintsSet.java | 4 +- .../typeinference}/FreshTypeVariable.java | 4 +- .../dhbwstuttgart/typeinference}/FunN.java | 18 +- .../typeinference}/FunNInterface.java | 14 +- .../typeinference}/FunNMethod.java | 11 +- .../typeinference}/GenericTypeInsertable.java | 2 +- .../typeinference}/JavaCodeResult.java | 5 +- .../typeinference}/KarthesischesProdukt.java | 2 +- .../typeinference}/OderConstraint.java | 10 +- .../typeinference}/Overloading.java | 18 +- .../typeinference}/ResultSet.java | 8 +- .../typeinference}/SingleConstraint.java | 16 +- .../typeinference}/TIPConstraints.java | 4 +- .../typeinference}/TypeInsertable.java | 8 +- .../typeinference}/Typeable.java | 4 +- .../TypeinferenceResultSet.java | 28 +- .../typeinference}/UndConstraint.java | 6 +- .../assumptions/Assumption.java | 11 +- .../assumptions/ClassAssumption.java | 4 +- .../assumptions/ConstructorAssumption.java | 10 +- .../assumptions/FieldAssumption.java | 10 +- .../assumptions/GenericVarAssumption.java | 12 +- .../assumptions/LocalVarAssumption.java | 7 +- .../assumptions/MethodAssumption.java | 10 +- .../assumptions/ParameterAssumption.java | 4 +- .../assumptions/TypeAssumptions.java | 24 +- .../exceptions/DebugException.java | 2 +- .../exceptions/ParserError.java | 4 +- .../exceptions/TypeinferenceException.java | 4 +- .../typeinference/parser}/.cvsignore | 0 .../parser}/BoundedClassIdentifierList.java | 6 +- .../parser}/ClassAndParameter.java | 8 +- .../parser}/GenericVarDeclarationList.java | 6 +- .../parser}/InterfaceAndParameter.java | 8 +- .../typeinference/parser}/InterfaceList.java | 6 +- .../typeinference/parser}/JavaClassName.java | 4 +- .../typeinference/parser}/JavaLexer.java | 2 +- .../typeinference/parser}/JavaLexer.lex | 0 .../typeinference/parser}/JavaParser.java | 175 +- .../typeinference/parser}/JavaParser.jay | 0 .../typeinference/parser}/JavaParser_old.jay | 0 .../typeinference/parser}/Scanner.java | 2 +- .../typeinference/parser}/Token.java | 2 +- .../GenericTypeInsertPoint.java | 26 +- .../typedeployment/SourcePatchPoint.java | 8 +- .../typedeployment/TypeInsertPoint.java | 20 +- .../typedeployment/TypeInsertSet.java | 20 +- src/mycompiler/mybytecode/ClassFile.java | 19 +- src/mycompiler/mybytecode/CodeAttribute.java | 3 +- src/mycompiler/mybytecode/JVMCode.java | 5 +- src/mycompiler/mybytecode/SignatureInfo.java | 15 +- .../CTypeReconstructionException.java | 4 +- src/mycompiler/myinterface/Interface.java | 27 +- src/mycompiler/myinterface/InterfaceBody.java | 7 +- src/mycompiler/mymodifier/Abstract.java | 5 +- src/mycompiler/mymodifier/Final.java | 5 +- .../mymodifier/InterfaceModifier.java | 4 +- src/mycompiler/mymodifier/Modifier.java | 4 +- src/mycompiler/mymodifier/Modifiers.java | 6 +- src/mycompiler/mymodifier/Private.java | 5 +- src/mycompiler/mymodifier/Protected.java | 5 +- src/mycompiler/mymodifier/Public.java | 5 +- src/mycompiler/mymodifier/Static.java | 5 +- src/mycompiler/mymodifier/Super.java | 4 +- src/mycompiler/myoperator/AndOp.java | 30 - src/mycompiler/myparser/.cvsignore | 3 - src/mycompiler/myparser/JavaLexer.lex | 173 -- src/mycompiler/myparser/JavaParser.jay | 2473 ----------------- src/mycompiler/myparser/JavaParser_old.jay | 1567 ----------- src/mycompiler/mytest/APITest.java | 4 +- src/mycompiler/mytest/LambdaTest.java | 14 +- .../mytypereconstruction/CMultiplyTuple.java | 3 +- .../mytypereconstruction/CSubstitution.java | 13 +- .../CSubstitutionGenVar.java | 5 +- .../mytypereconstruction/CSupportData.java | 6 +- .../mytypereconstruction/CTriple.java | 2 +- .../CReplaceTypeEvent.java | 3 +- .../set/CSubstitutionSet.java | 5 +- .../CInstVarTypeAssumption.java | 3 +- .../CLocalVarTypeAssumption.java | 3 +- .../typeassumption/CMethodTypeAssumption.java | 5 +- .../typeassumption/CParaTypeAssumption.java | 3 +- .../typeassumption/CTypeAssumption.java | 5 +- .../mytypereconstruction/unify/FC_TTO.java | 6 +- .../mytypereconstruction/unify/MUB.java | 6 +- .../mytypereconstruction/unify/Unify.java | 37 +- src/mycompiler/unused/Import.java | 2 +- src/mycompiler/unused/JavaCompiler.java | 4 +- src/userinterface/ConsoleInterface.java | 11 +- test/bytecode/BytecodeTester.java | 4 +- test/bytecode/EmptyClassTest.java | 7 +- test/mycompiler/test/blocks/TestForStmt.java | 2 +- test/mycompiler/test/blocks/TestIfStmt.java | 8 +- .../blocks/TestInferenceAcrossBlocks.java | 2 +- .../test/blocks/TestSimpleBlocks.java | 2 +- .../test/blocks/TestSimpleVariable.java | 2 +- .../TestUndeterminedReturnNegative.java | 8 +- .../blocks/TestUninitializedVariable.java | 2 +- .../mycompiler/test/blocks/TestWhileStmt.java | 2 +- .../test/complexTypes/TestOwnClassMember.java | 2 +- .../test/complexTypes/TestOwnClassMethod.java | 2 +- .../TestStandardLibInheritanceInference.java | 2 +- .../complexTypes/TestStandardLibMethod.java | 2 +- .../test/expectationTypes/ClassExpect.java | 2 +- .../test/expectationTypes/MethodExpect.java | 4 +- .../test/expectationTypes/VarExpect.java | 2 +- ...TestAssignmentTwoGenericTypesNegative.java | 4 +- ...tClassesWithBoundedGenericsOfTwoTypes.java | 8 +- ...assesWithBoundedGenericsUsedInMethods.java | 8 +- ...estExtendedClassesWithBoundedGenerics.java | 8 +- .../test/generics/TestNestedGenerics.java | 12 +- .../TestNestedGenericsNonExistingType.java | 12 +- .../TestSimpleClassesWithBoundedGenerics.java | 10 +- ...pleClassesWithBoundedGenericsNegative.java | 6 +- .../TestSimpleClassesWithGenerics.java | 6 +- ...TestSimpleClassesWithGenericsNegative.java | 6 +- .../TestInferenceOwnTypeByMember.java | 2 +- ...InferenceOwnTypeByMemberAcrossClasses.java | 2 +- .../TestInferenceOwnTypeByMethodCall.java | 2 +- ...renceOwnTypeByMethodCallAcrossClasses.java | 2 +- ...TestInferenceOwnTypeByMethodParameter.java | 2 +- ...erenceOwnTypeByMethodReturnTypeMixed1.java | 2 +- .../TestInferenceOwnTypeByReturnType.java | 2 +- ...renceOwnTypeByReturnTypeAcrossClasses.java | 2 +- .../TestInferenceStdTypeByOperation.java | 2 +- .../TestInferenceStdTypeByReturnType.java | 8 +- .../TestInheritanceAcrossLevel.java | 2 +- .../inheritance/TestInheritanceCircle.java | 2 +- .../TestInheritanceConstructor.java | 2 +- .../inheritance/TestInheritanceMultiple.java | 2 +- .../TestInheritanceOverriding.java | 2 +- .../TestInheritanceTwoHierarchies.java | 2 +- .../inheritance/TestSimpleInheritance.java | 2 +- ...verloadingDifferentNumberOfParameters.java | 2 +- ...ntNumberOfParametersAndDifferentTypes.java | 2 +- .../OverloadingGenericNotSameHierarchy.java | 6 +- .../OverloadingGenericSameHierarchy.java | 6 +- ...gGenericTypeInferenceNotSameHierarchy.java | 10 +- ...dingGenericTypeInferenceSameHierarchy.java | 12 +- .../OverloadingNotSameHierarchy.java | 2 +- .../overloading/OverloadingSameHierarchy.java | 2 +- ...rloadingTypeInferenceNotSameHierarchy.java | 2 +- ...OverloadingTypeInferenceSameHierarchy.java | 2 +- .../staticAccess/TestNonStaticAccess.java | 4 +- .../staticAccess/TestStaticAccess.java | 4 +- .../staticAccess/TestStaticAccessError.java | 2 +- .../test/lambda/ConstructorTest.java | 6 +- .../test/lambda/GenericParameterTest.java | 3 +- .../test/lambda/GenericVarTest.java | 3 +- .../test/lambda/OverloadingTest.java | 3 +- .../test/lambda/ParseMultipleFilesTest.java | 6 +- test/mycompiler/test/lambda/TestAssign.java | 3 +- test/mycompiler/test/lambda/TestLambda.java | 3 +- test/mycompiler/test/lambda/TestWhile.java | 8 +- .../AbstractInferenceTestExtendedOLD.java | 2 +- .../AbstractInferenceTestOLD_2.java | 8 +- .../AbstractInferenceTestOld.java | 14 +- .../CTypeAssumptionWrapper.java | 2 +- .../test/notUsedAnymore/IResultValidator.java | 2 +- .../TestAbstractInferenceTest2.java | 6 +- .../TestConstantsWithoutType.java | 2 +- .../test/notUsedAnymore/TestGenerics.java | 6 +- ...CheckValidImplementationFromInterface.java | 4 +- .../notUsedAnymore/TestMethodReturnType.java | 6 +- .../TestMethodReturnTypeNegative.java | 2 +- .../TestMethodReturnTypeNegative2.java | 2 +- .../operators/TestOperatorArithmetic.java | 4 +- .../test/operators/TestOperatorBitwise.java | 2 +- .../test/operators/TestOperatorBool.java | 2 +- .../operators/TestOperatorComparison.java | 6 +- .../test/operators/TestOperatorIncrement.java | 4 +- .../test/operators/TestOperatorObjects.java | 2 +- .../test/operators/TestOperatorString.java | 2 +- .../test/primitiveTypes/BooleanTest.java | 2 +- .../test/primitiveTypes/ByteTest.java | 2 +- .../test/primitiveTypes/CharTest.java | 2 +- .../test/primitiveTypes/DoubleTest.java | 2 +- .../test/primitiveTypes/FloatTest.java | 2 +- .../test/primitiveTypes/IntegerTest.java | 2 +- .../test/primitiveTypes/LongTest.java | 2 +- .../test/primitiveTypes/StringTest.java | 2 +- .../test/primitiveTypes/TestSimpleTypes.java | 6 +- .../test/trivial/TestClassEmptyGenerics.java | 2 +- .../test/trivial/TestClassMember.java | 4 +- .../trivial/TestClassMemberAssignment.java | 4 +- .../test/trivial/TestConstants.java | 2 +- .../test/trivial/TestConstructor.java | 2 +- .../test/trivial/TestConstructorNegative.java | 2 +- .../test/trivial/TestInterfaceMember.java | 2 +- .../test/trivial/TestInterfaceMethod.java | 2 +- .../trivial/TestInterfaceNotInferenced.java | 2 +- .../test/trivial/TestMethodEmpty.java | 2 +- .../test/trivial/TestMethodEmptyGeneric.java | 4 +- .../trivial/TestMethodEmptyParameter.java | 2 +- ...estMethodEmptyParameterGenericExtends.java | 8 +- .../typeReconstructionTest/TrMakeFCTest.java | 17 +- .../TrSubUnifyTest.java | 25 +- .../typeReconstructionTest/TrUnifyTest.java | 23 +- test/parser/GeneralParserTest.java | 5 +- .../InsertSingleTypeTest.java | 12 +- .../MartinTestCases/Tester.java | 10 +- test/plugindevelopment/TRMEqualTest.java | 28 +- .../TypeInsertSetEqualTest.java | 10 +- test/plugindevelopment/TypeInsertTester.java | 12 +- .../TypeInsertTests/LambdaTest22.jav | 2 +- .../TypeInsertTests/LambdaTest22.java | 2 +- .../MultipleTypesInsertTester.java | 12 +- .../OverloadingInsertTest.java | 10 +- test/syntaxTree/NodeEqualTest.java | 11 +- 325 files changed, 1961 insertions(+), 5876 deletions(-) rename src/{mycompiler => de/dhbwstuttgart/core}/AClassOrInterface.java (98%) rename src/{mycompiler => de/dhbwstuttgart/core}/IItemWithOffset.java (92%) rename src/{mycompiler => de/dhbwstuttgart/core}/MyCompiler.java (96%) rename src/{mycompiler => de/dhbwstuttgart/core}/MyCompilerAPI.java (93%) rename src/{mycompiler => de/dhbwstuttgart/core}/SourceFile.java (97%) rename src/{mycompiler => de/dhbwstuttgart/core}/SyntaxTreeNode.java (79%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/BasicAssumptionClass.java (95%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/Class.java (97%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/ClassBody.java (97%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/ClassHelper.java (90%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/Constant.java (93%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/Constructor.java (90%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/ExceptionList.java (87%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/Field.java (83%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/FieldDeclaration.java (86%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/FormalParameter.java (91%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/Generic.java (78%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/GenericDeclarationList.java (74%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/ImportDeclarations.java (90%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/Method.java (95%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/ParameterList.java (95%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree/misc}/DeclId.java (94%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree/misc}/Status.java (95%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree/misc}/UsedId.java (96%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree/misc}/UserDef.java (81%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/AddOp.java (82%) create mode 100755 src/de/dhbwstuttgart/syntaxtree/operator/AndOp.java rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/DivideOp.java (88%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/EqualOp.java (90%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/GreaterEquOp.java (91%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/GreaterOp.java (91%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/LessEquOp.java (91%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/LessOp.java (91%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/LogOp.java (92%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/MinusOp.java (88%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/ModuloOp.java (88%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/MulOp.java (82%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/NotEqualOp.java (90%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/Operator.java (83%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/OrOp.java (89%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/PlusOp.java (88%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/RelOp.java (86%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/TimesOp.java (89%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/ArgumentList.java (92%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/Assign.java (92%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/Binary.java (87%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/BinaryExpr.java (79%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/Block.java (92%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/BoolLiteral.java (90%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/CastExpr.java (89%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/CharLiteral.java (90%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/DoubleLiteral.java (91%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/EmptyStmt.java (87%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/Expr.java (90%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/ExprStmt.java (88%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/FloatLiteral.java (92%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/ForStmt.java (84%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/IfStmt.java (94%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/InstVar.java (90%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/InstanceOf.java (88%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/IntLiteral.java (92%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/LambdaExpression.java (85%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/LambdaParameter.java (58%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/Literal.java (98%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/LocalOrFieldVar.java (89%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/LocalVarDecl.java (93%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/LongLiteral.java (91%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/MethodCall.java (95%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/NegativeExpr.java (87%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/NewArray.java (93%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/NewClass.java (89%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/NotExpr.java (86%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/Null.java (86%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/PositivExpr.java (89%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/PostDecExpr.java (90%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/PostIncExpr.java (88%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/PreDecExpr.java (90%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/PreIncExpr.java (90%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/Receiver.java (90%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/Return.java (86%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/Statement.java (86%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/StringLiteral.java (86%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/This.java (90%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/UnaryExpr.java (82%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/UnaryMinus.java (93%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/UnaryNot.java (96%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/UnaryPlus.java (78%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/WhileStmt.java (88%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/BaseType.java (93%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/BooleanType.java (89%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/BoundedGenericTypeVar.java (93%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/CRefTypeSet.java (94%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/CharacterType.java (90%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/DoubleType.java (89%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/ExtendsWildcardType.java (98%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/FloatType.java (89%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/FreshExtendsWildcardType.java (97%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/FreshSuperWildcardType.java (97%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/FreshWildcardType.java (96%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/GenericTypeVar.java (92%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/IMatchable.java (90%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/ITypeContainer.java (89%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/IntegerType.java (89%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/LongType.java (89%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/Pair.java (99%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/ParaList.java (97%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/RefType.java (98%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/ReturnType.java (89%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/SuperWildcardType.java (94%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/Type.java (94%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/TypePlaceholder.java (98%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/Void.java (85%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/WildcardType.java (92%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/ConstraintsSet.java (94%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/FreshTypeVariable.java (88%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/FunN.java (90%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/FunNInterface.java (77%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/FunNMethod.java (81%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/GenericTypeInsertable.java (88%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/JavaCodeResult.java (94%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/KarthesischesProdukt.java (97%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/OderConstraint.java (88%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/Overloading.java (88%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/ResultSet.java (94%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/SingleConstraint.java (88%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/TIPConstraints.java (62%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/TypeInsertable.java (73%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/Typeable.java (87%) rename src/{mycompiler/mytypereconstruction => de/dhbwstuttgart/typeinference}/TypeinferenceResultSet.java (81%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/UndConstraint.java (85%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/assumptions/Assumption.java (60%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/assumptions/ClassAssumption.java (87%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/assumptions/ConstructorAssumption.java (57%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/assumptions/FieldAssumption.java (76%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/assumptions/GenericVarAssumption.java (60%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/assumptions/LocalVarAssumption.java (67%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/assumptions/MethodAssumption.java (87%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/assumptions/ParameterAssumption.java (72%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/assumptions/TypeAssumptions.java (96%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/exceptions/DebugException.java (72%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/exceptions/ParserError.java (56%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/exceptions/TypeinferenceException.java (92%) rename {bin/mycompiler/myparser => src/de/dhbwstuttgart/typeinference/parser}/.cvsignore (100%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/BoundedClassIdentifierList.java (75%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/ClassAndParameter.java (94%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/GenericVarDeclarationList.java (74%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/InterfaceAndParameter.java (94%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/InterfaceList.java (91%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/JavaClassName.java (96%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/JavaLexer.java (99%) rename {bin/mycompiler/myparser => src/de/dhbwstuttgart/typeinference/parser}/JavaLexer.lex (100%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/JavaParser.java (97%) rename {bin/mycompiler/myparser => src/de/dhbwstuttgart/typeinference/parser}/JavaParser.jay (100%) rename {bin/mycompiler/myparser => src/de/dhbwstuttgart/typeinference/parser}/JavaParser_old.jay (100%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/Scanner.java (96%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/Token.java (98%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/typedeployment/GenericTypeInsertPoint.java (87%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/typedeployment/SourcePatchPoint.java (69%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/typedeployment/TypeInsertPoint.java (85%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/typedeployment/TypeInsertSet.java (89%) delete mode 100755 src/mycompiler/myoperator/AndOp.java delete mode 100755 src/mycompiler/myparser/.cvsignore delete mode 100755 src/mycompiler/myparser/JavaLexer.lex delete mode 100755 src/mycompiler/myparser/JavaParser.jay delete mode 100755 src/mycompiler/myparser/JavaParser_old.jay diff --git a/.externalToolBuilders/JavaParserBuilder.launch b/.externalToolBuilders/JavaParserBuilder.launch index b918f2b12..0db12c073 100755 --- a/.externalToolBuilders/JavaParserBuilder.launch +++ b/.externalToolBuilders/JavaParserBuilder.launch @@ -4,10 +4,10 @@ - + - + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs index be5086350..70bbb4df6 100755 --- a/.settings/org.eclipse.core.resources.prefs +++ b/.settings/org.eclipse.core.resources.prefs @@ -1,5 +1,5 @@ eclipse.preferences.version=1 -encoding//src/mycompiler/mystatement/LambdaExpression.java=UTF-8 -encoding//src/typinferenz/SingleConstraint.java=UTF-8 -encoding//src/typinferenz/UndConstraint.java=UTF-8 +encoding//src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java=UTF-8 +encoding//src/de/dhbwstuttgart/typeinference/SingleConstraint.java=UTF-8 +encoding//src/de/dhbwstuttgart/typeinference/UndConstraint.java=UTF-8 encoding/=ISO-8859-1 diff --git a/bin/.gitignore b/bin/.gitignore index acd086ea2..8fbf17459 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,8 +1,8 @@ -/myJvmDisassembler /mycompiler +/userinterface +/de +/myJvmDisassembler +/bytecode /parser /plugindevelopment /syntaxTree -/typinferenz -/userinterface -/bytecode diff --git a/src/mycompiler/AClassOrInterface.java b/src/de/dhbwstuttgart/core/AClassOrInterface.java similarity index 98% rename from src/mycompiler/AClassOrInterface.java rename to src/de/dhbwstuttgart/core/AClassOrInterface.java index 0669be90c..12a44d432 100755 --- a/src/mycompiler/AClassOrInterface.java +++ b/src/de/dhbwstuttgart/core/AClassOrInterface.java @@ -1,18 +1,20 @@ // ino.module.AClassOrInterface.8526.package -package mycompiler; +package de.dhbwstuttgart.core; // ino.end // ino.module.AClassOrInterface.8526.import import java.util.Vector; -import mycompiler.myclass.UsedId; import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; import org.apache.log4j.Logger; // ino.end + +import de.dhbwstuttgart.syntaxtree.misc.UsedId; + // ino.class.AClassOrInterface.21186.description type=javadoc /** * Superklasse von Class und Interface. Beinhaltet gemeinsame Attribute diff --git a/src/mycompiler/IItemWithOffset.java b/src/de/dhbwstuttgart/core/IItemWithOffset.java similarity index 92% rename from src/mycompiler/IItemWithOffset.java rename to src/de/dhbwstuttgart/core/IItemWithOffset.java index e199fd8c4..8dc277f96 100755 --- a/src/mycompiler/IItemWithOffset.java +++ b/src/de/dhbwstuttgart/core/IItemWithOffset.java @@ -1,5 +1,5 @@ // ino.module.IItemWithOffset.8527.package -package mycompiler; +package de.dhbwstuttgart.core; // ino.end // ino.class.IItemWithOffset.21249.declaration diff --git a/src/mycompiler/MyCompiler.java b/src/de/dhbwstuttgart/core/MyCompiler.java similarity index 96% rename from src/mycompiler/MyCompiler.java rename to src/de/dhbwstuttgart/core/MyCompiler.java index cd6c03680..50002f167 100755 --- a/src/mycompiler/MyCompiler.java +++ b/src/de/dhbwstuttgart/core/MyCompiler.java @@ -1,5 +1,5 @@ // ino.module.MyCompiler.8569.package -package mycompiler; +package de.dhbwstuttgart.core; // ino.end @@ -14,27 +14,8 @@ import java.io.StringReader; import java.util.Vector; import mycompiler.mybytecode.ClassFile; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassBody; -import mycompiler.myclass.DeclId; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.ImportDeclarations; -import mycompiler.myclass.Method; -import mycompiler.myclass.ParameterList; -import mycompiler.myclass.UsedId; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.myparser.JavaParser; -import mycompiler.myparser.Scanner; -import mycompiler.myparser.JavaParser.yyException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.IMatchable; -import mycompiler.mytype.ITypeContainer; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.apache.log4j.Logger; import org.apache.log4j.xml.DOMConfigurator; @@ -42,13 +23,31 @@ import org.apache.log4j.xml.DOMConfigurator; import com.sun.corba.se.spi.orbutil.fsm.Guard.Result; import com.sun.org.apache.xerces.internal.impl.xs.identity.Field; -import typinferenz.FunNInterface; -import typinferenz.ResultSet; -// ino.end -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.DebugException; -import typinferenz.exceptions.ParserError; -import typinferenz.exceptions.TypeinferenceException; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ClassBody; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.syntaxtree.ImportDeclarations; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.IMatchable; +import de.dhbwstuttgart.syntaxtree.type.ITypeContainer; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.FunNInterface; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.exceptions.ParserError; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.parser.JavaParser; +import de.dhbwstuttgart.typeinference.parser.Scanner; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; diff --git a/src/mycompiler/MyCompilerAPI.java b/src/de/dhbwstuttgart/core/MyCompilerAPI.java similarity index 93% rename from src/mycompiler/MyCompilerAPI.java rename to src/de/dhbwstuttgart/core/MyCompilerAPI.java index d75cbd4d5..b6a72b36e 100755 --- a/src/mycompiler/MyCompilerAPI.java +++ b/src/de/dhbwstuttgart/core/MyCompilerAPI.java @@ -1,5 +1,5 @@ // ino.module.MyCompilerAPI.8570.package -package mycompiler; +package de.dhbwstuttgart.core; // ino.end // ino.module.MyCompilerAPI.8570.import @@ -8,15 +8,14 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.util.Vector; -import typinferenz.ResultSet; -import typinferenz.exceptions.ParserError; -import typinferenz.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.exceptions.ParserError; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.parser.JavaParser; import mycompiler.mybytecode.ClassFile; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.myparser.JavaParser; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; -// ino.end // ino.class.MyCompilerAPI.21328.description type=javadoc /** diff --git a/src/mycompiler/SourceFile.java b/src/de/dhbwstuttgart/core/SourceFile.java similarity index 97% rename from src/mycompiler/SourceFile.java rename to src/de/dhbwstuttgart/core/SourceFile.java index 1a4f26858..4ebc3d9c5 100755 --- a/src/mycompiler/SourceFile.java +++ b/src/de/dhbwstuttgart/core/SourceFile.java @@ -1,5 +1,5 @@ // ino.module.SourceFile.8722.package -package mycompiler; +package de.dhbwstuttgart.core; // ino.end // ino.module.SourceFile.8722.import @@ -11,14 +11,6 @@ import java.util.Iterator; import java.util.Vector; import mycompiler.mybytecode.ClassFile; -import mycompiler.myclass.BasicAssumptionClass; -import mycompiler.myclass.Class; -import mycompiler.myclass.Constructor; -import mycompiler.myclass.Field; -import mycompiler.myclass.FieldDeclaration; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.ImportDeclarations; -import mycompiler.myclass.UsedId; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCClassException; @@ -26,16 +18,8 @@ import mycompiler.myexception.SCException; import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; import mycompiler.mymodifier.Public; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CIntersectionType; import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; @@ -45,22 +29,41 @@ import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; +import de.dhbwstuttgart.syntaxtree.BasicAssumptionClass; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.Constructor; +import de.dhbwstuttgart.syntaxtree.Field; +import de.dhbwstuttgart.syntaxtree.FieldDeclaration; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.syntaxtree.ImportDeclarations; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.BooleanType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FunN; +import de.dhbwstuttgart.typeinference.FunNInterface; +import de.dhbwstuttgart.typeinference.FunNMethod; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.UndConstraint; +import de.dhbwstuttgart.typeinference.assumptions.ClassAssumption; +import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; +import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.myclass.*; import mycompiler.*; import sun.reflect.generics.reflectiveObjects.NotImplementedException; import sun.reflect.generics.reflectiveObjects.TypeVariableImpl; -import typinferenz.ConstraintsSet; -import typinferenz.FunN; -import typinferenz.FunNInterface; -import typinferenz.FunNMethod; -import typinferenz.ResultSet; -import typinferenz.UndConstraint; -import typinferenz.assumptions.ClassAssumption; -import typinferenz.assumptions.MethodAssumption; -import typinferenz.assumptions.ParameterAssumption; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.DebugException; -import typinferenz.exceptions.TypeinferenceException; @@ -686,7 +689,7 @@ public class SourceFile } xConstraints.add(cons); } - typinferenzLog.debug("Karthesisches Produkt der Constraints: "+xConstraints); + //typinferenzLog.debug("Karthesisches Produkt der Constraints: "+xConstraints); ////////////////////////////// // Unifizierung der Constraints: @@ -736,7 +739,7 @@ public class SourceFile Type t = p.TA1; //TypeCheck, falls es sich um einen RefType handelt: if(t!=null && (t instanceof RefType)&& - !(t instanceof mycompiler.mytype.Void)){ + !(t instanceof de.dhbwstuttgart.syntaxtree.type.Void)){ Type replaceType = null; replaceType = globalAssumptions.getTypeFor((RefType)t, null); if(!(replaceType == null))p.TA1 = replaceType; @@ -744,7 +747,7 @@ public class SourceFile t = p.TA2; //TypeCheck, falls es sich um einen RefType handelt: if(t!=null && (t instanceof RefType)&& - !(t instanceof mycompiler.mytype.Void)){ + !(t instanceof de.dhbwstuttgart.syntaxtree.type.Void)){ Type replaceType = null; replaceType = globalAssumptions.getTypeFor((RefType)t, null); if(!(replaceType == null))p.TA2 = replaceType; @@ -1195,7 +1198,7 @@ public class SourceFile java.lang.Class[] pt=methods[j].getParameterTypes(); //CMethodTypeAssumption method = new CMethodTypeAssumption(new RefType(className, 0), methodName, returnType, pt.length,MyCompiler.NO_LINENUMBER,MyCompiler.NO_LINENUMBER,new Vector(),null); - Method method = mycompiler.myclass.Method.createEmptyMethod(methodName, parentClass); + Method method = de.dhbwstuttgart.syntaxtree.Method.createEmptyMethod(methodName, parentClass); method.setType(returnType); ParameterList parameterList = new ParameterList(); @@ -1230,7 +1233,7 @@ public class SourceFile constructor.addParaAssumption(new CParaTypeAssumption(className, methodName, constructors[j].getParameterTypes().length,0,paraType, new RefType(paraType,-1), MyCompiler.NO_LINENUMBER,MyCompiler.NO_LINENUMBER,new Vector())); } //basicAssumptions.addMethodIntersectionType(new CIntersectionType(constructor)); - Method constructorMethod = mycompiler.myclass.Method.createEmptyMethod(methodName, parentClass); + Method constructorMethod = de.dhbwstuttgart.syntaxtree.Method.createEmptyMethod(methodName, parentClass); constructorMethod.parameterlist = paraList; parentClass.addField(new Constructor(constructorMethod)); } diff --git a/src/mycompiler/SyntaxTreeNode.java b/src/de/dhbwstuttgart/core/SyntaxTreeNode.java similarity index 79% rename from src/mycompiler/SyntaxTreeNode.java rename to src/de/dhbwstuttgart/core/SyntaxTreeNode.java index 53e24e5a7..6a947d5bc 100644 --- a/src/mycompiler/SyntaxTreeNode.java +++ b/src/de/dhbwstuttgart/core/SyntaxTreeNode.java @@ -1,20 +1,20 @@ -package mycompiler; +package de.dhbwstuttgart.core; import java.util.Vector; -import typinferenz.ResultSet; -import typinferenz.TypeInsertable; -import typinferenz.exceptions.DebugException; -import typinferenz.exceptions.TypeinferenceException; -import typinferenz.typedeployment.GenericTypeInsertPoint; -import typinferenz.typedeployment.TypeInsertPoint; -import typinferenz.typedeployment.TypeInsertSet; -import mycompiler.myclass.Class; -import mycompiler.myclass.Generic; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.Generic; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.typedeployment.GenericTypeInsertPoint; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; public abstract class SyntaxTreeNode{ diff --git a/src/mycompiler/myclass/BasicAssumptionClass.java b/src/de/dhbwstuttgart/syntaxtree/BasicAssumptionClass.java similarity index 95% rename from src/mycompiler/myclass/BasicAssumptionClass.java rename to src/de/dhbwstuttgart/syntaxtree/BasicAssumptionClass.java index 0e392e65b..81c082efa 100755 --- a/src/mycompiler/myclass/BasicAssumptionClass.java +++ b/src/de/dhbwstuttgart/syntaxtree/BasicAssumptionClass.java @@ -1,5 +1,5 @@ // ino.module.BasicAssumptionClass.8552.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.BasicAssumptionClass.8552.import diff --git a/src/mycompiler/myclass/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java similarity index 97% rename from src/mycompiler/myclass/Class.java rename to src/de/dhbwstuttgart/syntaxtree/Class.java index e589045ce..822984635 100755 --- a/src/mycompiler/myclass/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -1,5 +1,5 @@ // ino.module.Class.8553.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.Class.8553.import import java.util.ArrayList; @@ -9,9 +9,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.AClassOrInterface; -import mycompiler.IItemWithOffset; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; @@ -20,18 +17,10 @@ import mycompiler.myexception.SCClassException; import mycompiler.myexception.SCExcept; import mycompiler.mymodifier.Modifiers; import mycompiler.mystatement.*; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.WildcardType; import mycompiler.mytypereconstruction.CReconstructionTuple; import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.set.CReconstructionTupleSet; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -46,7 +35,6 @@ import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; import mycompiler.mytypereconstruction.unify.FC_TTO; import mycompiler.mytypereconstruction.unify.Unify; -import mycompiler.SourceFile; import org.apache.log4j.Logger; // ino.end @@ -70,20 +58,39 @@ import org.apache.log4j.Logger; + + + + + + + + + + + +import de.dhbwstuttgart.core.AClassOrInterface; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.core.SourceFile; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.statement.Block; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.statement.Statement; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.WildcardType; +import de.dhbwstuttgart.typeinference.*; +import de.dhbwstuttgart.typeinference.assumptions.ClassAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.OderConstraint; -import typinferenz.ResultSet; -import typinferenz.Typeable; -import typinferenz.UndConstraint; -import typinferenz.FunN; -import typinferenz.assumptions.ClassAssumption; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.DebugException; -import typinferenz.exceptions.TypeinferenceException; -import typinferenz.typedeployment.TypeInsertPoint; -import typinferenz.*; // ino.class.Class.23010.declaration @@ -882,7 +889,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit this.typeAssumptions = assumptions; //Diese müssen anschließend nicht wieder generiert werden. return assumptions; } - + /* public ConstraintsSet TYPE(Vector methodList, Vector fielddeclarationList, TypeAssumptions assumptions){ ConstraintsSet ret = new ConstraintsSet(); // Die Felddeklarationen werden zu den Assumptions hinzugefügt und gelten danach für jede Methode. @@ -897,7 +904,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } return ret; } - + */ // ino.method.clear.23113.defdescription type=javadoc /** * Entfernt Annahmen f�r lokale Variablen, die f�r Methodenparameter erzeugt diff --git a/src/mycompiler/myclass/ClassBody.java b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java similarity index 97% rename from src/mycompiler/myclass/ClassBody.java rename to src/de/dhbwstuttgart/syntaxtree/ClassBody.java index 12b4f4628..230b0c352 100755 --- a/src/mycompiler/myclass/ClassBody.java +++ b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java @@ -1,22 +1,27 @@ // ino.module.ClassBody.8554.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.ClassBody.8554.import import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; + import mycompiler.mybytecode.ClassFile; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCClassBodyException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCMethodException; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; + import org.apache.log4j.Logger; // ino.end -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; + + + +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/myclass/ClassHelper.java b/src/de/dhbwstuttgart/syntaxtree/ClassHelper.java similarity index 90% rename from src/mycompiler/myclass/ClassHelper.java rename to src/de/dhbwstuttgart/syntaxtree/ClassHelper.java index 4a8b0e642..110256b75 100755 --- a/src/mycompiler/myclass/ClassHelper.java +++ b/src/de/dhbwstuttgart/syntaxtree/ClassHelper.java @@ -1,13 +1,13 @@ // ino.module.ClassHelper.8555.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.ClassHelper.8555.import import java.util.Vector; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -// ino.end + +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; // ino.class.ClassHelper.23206.declaration public class ClassHelper diff --git a/src/mycompiler/myclass/Constant.java b/src/de/dhbwstuttgart/syntaxtree/Constant.java similarity index 93% rename from src/mycompiler/myclass/Constant.java rename to src/de/dhbwstuttgart/syntaxtree/Constant.java index f4936a3ea..e58511975 100755 --- a/src/mycompiler/myclass/Constant.java +++ b/src/de/dhbwstuttgart/syntaxtree/Constant.java @@ -1,23 +1,23 @@ // ino.module.Constant.8556.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.Constant.8556.import import java.util.Vector; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.statement.Literal; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; import mycompiler.mybytecode.AttributeInfo; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.JVMCode; -import mycompiler.MyCompiler; import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.Literal; -import mycompiler.mytype.Type; // ino.end import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; diff --git a/src/mycompiler/myclass/Constructor.java b/src/de/dhbwstuttgart/syntaxtree/Constructor.java similarity index 90% rename from src/mycompiler/myclass/Constructor.java rename to src/de/dhbwstuttgart/syntaxtree/Constructor.java index c978fccd6..ac50a5a3e 100644 --- a/src/mycompiler/myclass/Constructor.java +++ b/src/de/dhbwstuttgart/syntaxtree/Constructor.java @@ -1,24 +1,25 @@ -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; import java.util.Vector; -import mycompiler.SyntaxTreeNode; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.statement.Block; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.ConstructorAssumption; +import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.mybytecode.ClassFile; import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; -import mycompiler.mystatement.Block; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.SingleConstraint; -import typinferenz.assumptions.ConstructorAssumption; -import typinferenz.assumptions.MethodAssumption; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; public class Constructor extends Method { private Method methode; diff --git a/src/mycompiler/myclass/ExceptionList.java b/src/de/dhbwstuttgart/syntaxtree/ExceptionList.java similarity index 87% rename from src/mycompiler/myclass/ExceptionList.java rename to src/de/dhbwstuttgart/syntaxtree/ExceptionList.java index a402ec4e4..7e41e64d6 100755 --- a/src/mycompiler/myclass/ExceptionList.java +++ b/src/de/dhbwstuttgart/syntaxtree/ExceptionList.java @@ -1,10 +1,10 @@ // ino.module.ExceptionList.8559.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.ExceptionList.8559.import import java.util.Vector; -import mycompiler.mytype.RefType; -// ino.end + +import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/mycompiler/myclass/Field.java b/src/de/dhbwstuttgart/syntaxtree/Field.java similarity index 83% rename from src/mycompiler/myclass/Field.java rename to src/de/dhbwstuttgart/syntaxtree/Field.java index e612966b5..04714d3b5 100644 --- a/src/mycompiler/myclass/Field.java +++ b/src/de/dhbwstuttgart/syntaxtree/Field.java @@ -1,23 +1,24 @@ -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; import java.util.Vector; -import mycompiler.SyntaxTreeNode; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.GenericTypeInsertable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.Typeable; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import mycompiler.mybytecode.ClassFile; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import typinferenz.ConstraintsSet; -import typinferenz.GenericTypeInsertable; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.Typeable; -import typinferenz.TypeInsertable; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.typedeployment.TypeInsertPoint; public abstract class Field extends SyntaxTreeNode implements TypeInsertable, Typeable, Generic, GenericTypeInsertable{ diff --git a/src/mycompiler/myclass/FieldDeclaration.java b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java similarity index 86% rename from src/mycompiler/myclass/FieldDeclaration.java rename to src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java index 91ef8382b..fc44782f5 100644 --- a/src/mycompiler/myclass/FieldDeclaration.java +++ b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java @@ -1,23 +1,24 @@ -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; import java.util.Vector; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.OderConstraint; -import typinferenz.ResultSet; -import typinferenz.SingleConstraint; -import typinferenz.assumptions.FieldAssumption; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; -import mycompiler.SyntaxTreeNode; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.FieldAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.mybytecode.ClassFile; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Expr; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; /** diff --git a/src/mycompiler/myclass/FormalParameter.java b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java similarity index 91% rename from src/mycompiler/myclass/FormalParameter.java rename to src/de/dhbwstuttgart/syntaxtree/FormalParameter.java index cef327a54..856aa3b4e 100755 --- a/src/mycompiler/myclass/FormalParameter.java +++ b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java @@ -1,15 +1,12 @@ // ino.module.FormalParameter.8561.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.FormalParameter.8561.import import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; @@ -29,14 +26,25 @@ import org.apache.log4j.Logger; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.Typeable; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.Typeable; -import typinferenz.TypeInsertable; -import typinferenz.exceptions.TypeinferenceException; -import typinferenz.typedeployment.TypeInsertPoint; -import typinferenz.typedeployment.TypeInsertSet; // ino.class.FormalParameter.23391.declaration public class FormalParameter extends SyntaxTreeNode implements ITypeReplacementListener, Typeable, TypeInsertable diff --git a/src/mycompiler/myclass/Generic.java b/src/de/dhbwstuttgart/syntaxtree/Generic.java similarity index 78% rename from src/mycompiler/myclass/Generic.java rename to src/de/dhbwstuttgart/syntaxtree/Generic.java index 0d2a37d1c..0c1f7a5ef 100644 --- a/src/mycompiler/myclass/Generic.java +++ b/src/de/dhbwstuttgart/syntaxtree/Generic.java @@ -1,9 +1,9 @@ -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytype.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; /** * Wird von allen Klassen implementiert, welche generische Parameter halten können. (Class, Method und Field) diff --git a/src/mycompiler/myclass/GenericDeclarationList.java b/src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java similarity index 74% rename from src/mycompiler/myclass/GenericDeclarationList.java rename to src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java index bd9f58f45..45f23959d 100644 --- a/src/mycompiler/myclass/GenericDeclarationList.java +++ b/src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java @@ -1,9 +1,9 @@ -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; import java.util.Vector; -import mycompiler.myparser.GenericVarDeclarationList; -import mycompiler.mytype.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.typeinference.parser.GenericVarDeclarationList; /** diff --git a/src/mycompiler/myclass/ImportDeclarations.java b/src/de/dhbwstuttgart/syntaxtree/ImportDeclarations.java similarity index 90% rename from src/mycompiler/myclass/ImportDeclarations.java rename to src/de/dhbwstuttgart/syntaxtree/ImportDeclarations.java index 88ac5e1f5..15cfad5f7 100755 --- a/src/mycompiler/myclass/ImportDeclarations.java +++ b/src/de/dhbwstuttgart/syntaxtree/ImportDeclarations.java @@ -1,11 +1,13 @@ // ino.module.ImportDeclarations.8562.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.ImportDeclarations.8562.import import java.util.Vector; // ino.end +import de.dhbwstuttgart.syntaxtree.misc.UsedId; + // ino.class.ImportDeclarations.23434.description type=javadoc /** diff --git a/src/mycompiler/myclass/Method.java b/src/de/dhbwstuttgart/syntaxtree/Method.java similarity index 95% rename from src/mycompiler/myclass/Method.java rename to src/de/dhbwstuttgart/syntaxtree/Method.java index 42ee79f01..2001a1fa4 100755 --- a/src/mycompiler/myclass/Method.java +++ b/src/de/dhbwstuttgart/syntaxtree/Method.java @@ -1,5 +1,5 @@ // ino.module.Method.8564.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.Method.8564.import import java.util.Enumeration; @@ -7,20 +7,11 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.IItemWithOffset; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; -import mycompiler.MyCompiler; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCMethodException; import mycompiler.myexception.SCStatementException; import mycompiler.mymodifier.Modifiers; -import mycompiler.mystatement.Block; -import mycompiler.mystatement.Return; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; @@ -32,16 +23,26 @@ import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -import typinferenz.JavaCodeResult; -import typinferenz.SingleConstraint; -import typinferenz.ConstraintsSet; -import typinferenz.ResultSet; -import typinferenz.TypeInsertable; -import typinferenz.assumptions.MethodAssumption; -import typinferenz.assumptions.ParameterAssumption; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; -import typinferenz.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.statement.Block; +import de.dhbwstuttgart.syntaxtree.statement.Return; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; +import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; diff --git a/src/mycompiler/myclass/ParameterList.java b/src/de/dhbwstuttgart/syntaxtree/ParameterList.java similarity index 95% rename from src/mycompiler/myclass/ParameterList.java rename to src/de/dhbwstuttgart/syntaxtree/ParameterList.java index ee4e75bf9..a99333f3d 100755 --- a/src/mycompiler/myclass/ParameterList.java +++ b/src/de/dhbwstuttgart/syntaxtree/ParameterList.java @@ -1,17 +1,20 @@ // ino.module.ParameterList.8565.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.ParameterList.8565.import import java.util.Vector; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mytype.*; import java.util.Iterator; +import de.dhbwstuttgart.syntaxtree.type.BaseType; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; + // ino.end diff --git a/src/mycompiler/myclass/DeclId.java b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java similarity index 94% rename from src/mycompiler/myclass/DeclId.java rename to src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java index 96ef68ad3..c597d2978 100755 --- a/src/mycompiler/myclass/DeclId.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java @@ -1,30 +1,37 @@ // ino.module.DeclId.8558.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree.misc; // ino.end // ino.module.DeclId.8558.import import java.util.Vector; + import mycompiler.mybytecode.Attribute; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.mybytecode.SignatureInfo; -import mycompiler.MyCompiler; import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Final; import mycompiler.mymodifier.Modifiers; -import mycompiler.mystatement.Assign; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.ExprStmt; -import mycompiler.mystatement.InstVar; -import mycompiler.mystatement.LocalOrFieldVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; + import org.apache.log4j.Logger; // ino.end +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.syntaxtree.Constant; +import de.dhbwstuttgart.syntaxtree.statement.Assign; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.statement.ExprStmt; +import de.dhbwstuttgart.syntaxtree.statement.InstVar; +import de.dhbwstuttgart.syntaxtree.statement.LocalOrFieldVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; + + + + // ino.class.DeclId.23280.declaration public class DeclId // ino.end diff --git a/src/mycompiler/myclass/Status.java b/src/de/dhbwstuttgart/syntaxtree/misc/Status.java similarity index 95% rename from src/mycompiler/myclass/Status.java rename to src/de/dhbwstuttgart/syntaxtree/misc/Status.java index f2f46c747..ea598693c 100755 --- a/src/mycompiler/myclass/Status.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/Status.java @@ -1,5 +1,5 @@ // ino.module.Status.8566.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree.misc; // ino.end // ino.module.Status.8566.import diff --git a/src/mycompiler/myclass/UsedId.java b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java similarity index 96% rename from src/mycompiler/myclass/UsedId.java rename to src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java index b367580e5..c83226744 100755 --- a/src/mycompiler/myclass/UsedId.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java @@ -1,17 +1,16 @@ // ino.module.UsedId.8567.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree.misc; // ino.end // ino.module.UsedId.8567.import import java.util.Iterator; import java.util.Vector; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.exceptions.TypeinferenceException; -import mycompiler.IItemWithOffset; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.mybytecode.JVMCode; -import mycompiler.mytype.Type; -// ino.end // ino.class.UsedId.23659.declaration diff --git a/src/mycompiler/myclass/UserDef.java b/src/de/dhbwstuttgart/syntaxtree/misc/UserDef.java similarity index 81% rename from src/mycompiler/myclass/UserDef.java rename to src/de/dhbwstuttgart/syntaxtree/misc/UserDef.java index 0550e99de..96085afed 100755 --- a/src/mycompiler/myclass/UserDef.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/UserDef.java @@ -1,5 +1,5 @@ // ino.module.UserDef.8568.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree.misc; // ino.end // ino.class.UserDef.23741.declaration public class UserDef extends Status diff --git a/src/mycompiler/myoperator/AddOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java similarity index 82% rename from src/mycompiler/myoperator/AddOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java index c472c504b..fcd93bc91 100755 --- a/src/mycompiler/myoperator/AddOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java @@ -1,5 +1,5 @@ // ino.module.AddOp.8594.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.AddOp.8594.import import java.util.HashMap; @@ -7,20 +7,20 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import typinferenz.ConstraintsSet; -import typinferenz.SingleConstraint; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.DebugException; +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.type.IntegerType; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/AndOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/AndOp.java new file mode 100755 index 000000000..85081d7a4 --- /dev/null +++ b/src/de/dhbwstuttgart/syntaxtree/operator/AndOp.java @@ -0,0 +1,29 @@ +// ino.module.AndOp.8595.package +package de.dhbwstuttgart.syntaxtree.operator; + +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.type.BooleanType; +import de.dhbwstuttgart.syntaxtree.type.IntegerType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; + +// ino.class.AndOp.24101.declaration +public class AndOp extends LogOp +// ino.end +// ino.class.AndOp.24101.body +{ + + // ino.method.AndOp.24105.definition + public AndOp(int offset, int variableLength) + // ino.end + // ino.method.AndOp.24105.body + { + super(offset,variableLength); + } + // ino.end + + +} +// ino.end diff --git a/src/mycompiler/myoperator/DivideOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java similarity index 88% rename from src/mycompiler/myoperator/DivideOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java index decfa0526..1c6fc1df4 100755 --- a/src/mycompiler/myoperator/DivideOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java @@ -1,15 +1,15 @@ // ino.module.DivideOp.8596.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.DivideOp.8596.import import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -// ino.end diff --git a/src/mycompiler/myoperator/EqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java similarity index 90% rename from src/mycompiler/myoperator/EqualOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java index 038a6ab81..059b94350 100755 --- a/src/mycompiler/myoperator/EqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java @@ -1,19 +1,20 @@ // ino.module.EqualOp.8597.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.EqualOp.8597.import import java.util.Iterator; import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.statement.Null; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.Null; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/mycompiler/myoperator/GreaterEquOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java similarity index 91% rename from src/mycompiler/myoperator/GreaterEquOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java index bcd12eb01..d0b9df89e 100755 --- a/src/mycompiler/myoperator/GreaterEquOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java @@ -1,15 +1,15 @@ // ino.module.GreaterEquOp.8598.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.GreaterEquOp.8598.import import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -// ino.end diff --git a/src/mycompiler/myoperator/GreaterOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterOp.java similarity index 91% rename from src/mycompiler/myoperator/GreaterOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/GreaterOp.java index 22f66fae1..aa74d16db 100755 --- a/src/mycompiler/myoperator/GreaterOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterOp.java @@ -1,15 +1,15 @@ // ino.module.GreaterOp.8599.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.GreaterOp.8599.import import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -// ino.end diff --git a/src/mycompiler/myoperator/LessEquOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/LessEquOp.java similarity index 91% rename from src/mycompiler/myoperator/LessEquOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/LessEquOp.java index fb1d28537..7fc886e5e 100755 --- a/src/mycompiler/myoperator/LessEquOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/LessEquOp.java @@ -1,15 +1,15 @@ // ino.module.LessEquOp.8600.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.LessEquOp.8600.import import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -// ino.end diff --git a/src/mycompiler/myoperator/LessOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/LessOp.java similarity index 91% rename from src/mycompiler/myoperator/LessOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/LessOp.java index bce42f972..3e43922b3 100755 --- a/src/mycompiler/myoperator/LessOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/LessOp.java @@ -1,15 +1,15 @@ // ino.module.LessOp.8601.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.LessOp.8601.import import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -// ino.end diff --git a/src/mycompiler/myoperator/LogOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java similarity index 92% rename from src/mycompiler/myoperator/LogOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java index 13a52c997..98f298719 100755 --- a/src/mycompiler/myoperator/LogOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java @@ -1,5 +1,5 @@ // ino.module.LogOp.8602.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.LogOp.8602.import import java.util.HashMap; @@ -7,24 +7,24 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import typinferenz.ConstraintsSet; -import typinferenz.SingleConstraint; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.DebugException; +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.statement.NotExpr; +import de.dhbwstuttgart.syntaxtree.statement.Null; +import de.dhbwstuttgart.syntaxtree.statement.Statement; +import de.dhbwstuttgart.syntaxtree.type.BooleanType; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.NotExpr; -import mycompiler.mystatement.Null; -import mycompiler.mystatement.Statement; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/mycompiler/myoperator/MinusOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/MinusOp.java similarity index 88% rename from src/mycompiler/myoperator/MinusOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/MinusOp.java index e240db973..c4c4560b3 100755 --- a/src/mycompiler/myoperator/MinusOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/MinusOp.java @@ -1,15 +1,15 @@ // ino.module.MinusOp.8603.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.MinusOp.8603.import import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -// ino.end diff --git a/src/mycompiler/myoperator/ModuloOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/ModuloOp.java similarity index 88% rename from src/mycompiler/myoperator/ModuloOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/ModuloOp.java index 44245b639..5e92239d4 100755 --- a/src/mycompiler/myoperator/ModuloOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/ModuloOp.java @@ -1,15 +1,15 @@ // ino.module.ModuloOp.8604.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.ModuloOp.8604.import import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -// ino.end diff --git a/src/mycompiler/myoperator/MulOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java similarity index 82% rename from src/mycompiler/myoperator/MulOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java index 40d160f3a..23fb3c3e6 100755 --- a/src/mycompiler/myoperator/MulOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java @@ -1,5 +1,5 @@ // ino.module.MulOp.8605.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.MulOp.8605.import @@ -8,13 +8,13 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.DebugException; +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.mystatement.Binary; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/mycompiler/myoperator/NotEqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java similarity index 90% rename from src/mycompiler/myoperator/NotEqualOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java index 007891906..9d566ba5d 100755 --- a/src/mycompiler/myoperator/NotEqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java @@ -1,19 +1,20 @@ // ino.module.NotEqualOp.8606.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.NotEqualOp.8606.import import java.util.Iterator; import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.statement.Null; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.Null; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/mycompiler/myoperator/Operator.java b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java similarity index 83% rename from src/mycompiler/myoperator/Operator.java rename to src/de/dhbwstuttgart/syntaxtree/operator/Operator.java index 7ea83b242..dde6d288e 100755 --- a/src/mycompiler/myoperator/Operator.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java @@ -1,5 +1,5 @@ // ino.module.Operator.8607.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.Operator.8607.import import java.util.HashMap; @@ -7,24 +7,24 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import typinferenz.ConstraintsSet; -import typinferenz.OderConstraint; -import typinferenz.SingleConstraint; -import typinferenz.UndConstraint; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; -import mycompiler.IItemWithOffset; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.UndConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/mycompiler/myoperator/OrOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/OrOp.java similarity index 89% rename from src/mycompiler/myoperator/OrOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/OrOp.java index f8a96dc5c..41bbdac90 100755 --- a/src/mycompiler/myoperator/OrOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/OrOp.java @@ -1,5 +1,5 @@ // ino.module.OrOp.8608.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end diff --git a/src/mycompiler/myoperator/PlusOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/PlusOp.java similarity index 88% rename from src/mycompiler/myoperator/PlusOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/PlusOp.java index af1e55961..886ea59b8 100755 --- a/src/mycompiler/myoperator/PlusOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/PlusOp.java @@ -1,15 +1,15 @@ // ino.module.PlusOp.8609.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.PlusOp.8609.import import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -// ino.end diff --git a/src/mycompiler/myoperator/RelOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java similarity index 86% rename from src/mycompiler/myoperator/RelOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java index 1b9e9f24b..7ea190334 100755 --- a/src/mycompiler/myoperator/RelOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java @@ -1,5 +1,5 @@ // ino.module.RelOp.8610.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.RelOp.8610.import @@ -8,16 +8,16 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.DebugException; +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/mycompiler/myoperator/TimesOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/TimesOp.java similarity index 89% rename from src/mycompiler/myoperator/TimesOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/TimesOp.java index 723b6b4a2..9e4802b2c 100755 --- a/src/mycompiler/myoperator/TimesOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/TimesOp.java @@ -1,16 +1,16 @@ // ino.module.TimesOp.8611.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.TimesOp.8611.import import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -// ino.end // ino.class.TimesOp.24312.declaration public class TimesOp extends MulOp diff --git a/src/mycompiler/mystatement/ArgumentList.java b/src/de/dhbwstuttgart/syntaxtree/statement/ArgumentList.java similarity index 92% rename from src/mycompiler/mystatement/ArgumentList.java rename to src/de/dhbwstuttgart/syntaxtree/statement/ArgumentList.java index ffda3031b..98094f508 100755 --- a/src/mycompiler/mystatement/ArgumentList.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ArgumentList.java @@ -1,16 +1,16 @@ // ino.module.ArgumentList.8621.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.ArgumentList.8621.import import java.util.Iterator; import java.util.Vector; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.FormalParameter; import mycompiler.myexception.JVMCodeException; // ino.end diff --git a/src/mycompiler/mystatement/Assign.java b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java similarity index 92% rename from src/mycompiler/mystatement/Assign.java rename to src/de/dhbwstuttgart/syntaxtree/statement/Assign.java index bc81c7450..2d8e125ee 100755 --- a/src/mycompiler/mystatement/Assign.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java @@ -1,5 +1,5 @@ // ino.module.Assign.8622.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Assign.8622.import import java.util.Enumeration; @@ -7,20 +7,13 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CMultiplyTuple; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; @@ -35,12 +28,26 @@ import org.apache.log4j.Logger; // ino.end -import typinferenz.JavaCodeResult; -import typinferenz.SingleConstraint; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/Binary.java b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java similarity index 87% rename from src/mycompiler/mystatement/Binary.java rename to src/de/dhbwstuttgart/syntaxtree/statement/Binary.java index 80c6a885a..94fb695cf 100755 --- a/src/mycompiler/mystatement/Binary.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java @@ -1,5 +1,5 @@ // ino.module.Binary.8623.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Binary.8623.import import java.util.Enumeration; @@ -7,25 +7,13 @@ import java.util.HashMap; import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.myoperator.AddOp; -import mycompiler.myoperator.LogOp; -import mycompiler.myoperator.MulOp; -import mycompiler.myoperator.Operator; -import mycompiler.myoperator.RelOp; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -41,14 +29,34 @@ import org.apache.log4j.Logger; + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.operator.AddOp; +import de.dhbwstuttgart.syntaxtree.operator.LogOp; +import de.dhbwstuttgart.syntaxtree.operator.MulOp; +import de.dhbwstuttgart.syntaxtree.operator.Operator; +import de.dhbwstuttgart.syntaxtree.operator.RelOp; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.UndConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.OderConstraint; -import typinferenz.ResultSet; -import typinferenz.SingleConstraint; -import typinferenz.UndConstraint; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/BinaryExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/BinaryExpr.java similarity index 79% rename from src/mycompiler/mystatement/BinaryExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/BinaryExpr.java index a8e4ca28a..561803d36 100755 --- a/src/mycompiler/mystatement/BinaryExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/BinaryExpr.java @@ -1,9 +1,8 @@ // ino.module.BinaryExpr.8624.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; -import typinferenz.ConstraintsSet; -import typinferenz.assumptions.TypeAssumptions; -// ino.end +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; // ino.class.BinaryExpr.25030.declaration diff --git a/src/mycompiler/mystatement/Block.java b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java similarity index 92% rename from src/mycompiler/mystatement/Block.java rename to src/de/dhbwstuttgart/syntaxtree/statement/Block.java index efabb756e..06e27a029 100755 --- a/src/mycompiler/mystatement/Block.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java @@ -1,5 +1,5 @@ // ino.module.Block.8625.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Block.8625.import import java.util.Enumeration; @@ -7,18 +7,12 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -33,14 +27,28 @@ import org.apache.log4j.Logger; + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.SingleConstraint; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; diff --git a/src/mycompiler/mystatement/BoolLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java similarity index 90% rename from src/mycompiler/mystatement/BoolLiteral.java rename to src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java index bdc1bb799..75e6e1236 100755 --- a/src/mycompiler/mystatement/BoolLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java @@ -1,21 +1,15 @@ // ino.module.BoolLiteral.8626.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.BoolLiteral.8626.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -27,10 +21,23 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.BooleanType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/CastExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java similarity index 89% rename from src/mycompiler/mystatement/CastExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java index 20add38d2..75c250076 100755 --- a/src/mycompiler/mystatement/CastExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java @@ -1,22 +1,18 @@ // ino.module.CastExpr.8627.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.CastExpr.8627.import import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -29,10 +25,21 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/CharLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java similarity index 90% rename from src/mycompiler/mystatement/CharLiteral.java rename to src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java index c1ed88936..b45b874d1 100755 --- a/src/mycompiler/mystatement/CharLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java @@ -1,21 +1,15 @@ // ino.module.CharLiteral.8628.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.CharLiteral.8628.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.CharacterType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -28,10 +22,23 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.CharacterType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/DoubleLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java similarity index 91% rename from src/mycompiler/mystatement/DoubleLiteral.java rename to src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java index b3188d7ad..f62d77ee5 100755 --- a/src/mycompiler/mystatement/DoubleLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java @@ -1,23 +1,15 @@ // ino.module.IntLiteral.8635.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.IntLiteral.8635.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.DoubleType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.LongType; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -27,12 +19,20 @@ import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.DoubleType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.IntegerType; +import de.dhbwstuttgart.syntaxtree.type.LongType; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; // ino.end -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/EmptyStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java similarity index 87% rename from src/mycompiler/mystatement/EmptyStmt.java rename to src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java index b944dcd43..2dedecbb5 100755 --- a/src/mycompiler/mystatement/EmptyStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java @@ -1,18 +1,14 @@ // ino.module.EmptyStmt.8629.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.EmptyStmt.8629.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -25,11 +21,22 @@ import org.apache.log4j.Logger; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/Expr.java b/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java similarity index 90% rename from src/mycompiler/mystatement/Expr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/Expr.java index 8fd300e8a..131fa8671 100755 --- a/src/mycompiler/mystatement/Expr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java @@ -1,20 +1,20 @@ // ino.module.Expr.8630.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Expr.8630.import import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.ConstraintsSet; -import typinferenz.assumptions.TypeAssumptions; -import mycompiler.myclass.Class; -import mycompiler.myclass.UsedId; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CMultiplyTuple; import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.CSupportData; diff --git a/src/mycompiler/mystatement/ExprStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java similarity index 88% rename from src/mycompiler/mystatement/ExprStmt.java rename to src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java index 08eb65d98..89458d433 100755 --- a/src/mycompiler/mystatement/ExprStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java @@ -1,14 +1,11 @@ // ino.module.ExprStmt.8631.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.ExprStmt.8631.import import java.util.Iterator; import java.util.Vector; -import mycompiler.MyCompiler; -import mycompiler.mytype.Pair; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; + import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -16,9 +13,16 @@ import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListe import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.unify.Unify; + import org.apache.log4j.Logger; // ino.end + +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; + // ino.class.ExprStmt.25265.declaration public abstract class ExprStmt extends Statement implements ITypeReplacementListener // ino.end diff --git a/src/mycompiler/mystatement/FloatLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java similarity index 92% rename from src/mycompiler/mystatement/FloatLiteral.java rename to src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java index 55cec4f80..effc2c058 100755 --- a/src/mycompiler/mystatement/FloatLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java @@ -1,20 +1,14 @@ // ino.module.IntLiteral.8635.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.IntLiteral.8635.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.FloatType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -23,10 +17,16 @@ import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.FloatType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/ForStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java similarity index 84% rename from src/mycompiler/mystatement/ForStmt.java rename to src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java index 51e25223a..16c7de494 100755 --- a/src/mycompiler/mystatement/ForStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java @@ -1,26 +1,17 @@ -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.myoperator.LogOp; -import mycompiler.myoperator.Operator; -import mycompiler.myoperator.RelOp; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -32,11 +23,20 @@ import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.operator.LogOp; +import de.dhbwstuttgart.syntaxtree.operator.Operator; +import de.dhbwstuttgart.syntaxtree.operator.RelOp; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/IfStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java similarity index 94% rename from src/mycompiler/mystatement/IfStmt.java rename to src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java index 421323af0..8660dba0e 100755 --- a/src/mycompiler/mystatement/IfStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java @@ -1,5 +1,5 @@ // ino.module.IfStmt.8632.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.IfStmt.8632.import import java.util.Enumeration; @@ -7,25 +7,13 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.myoperator.LogOp; -import mycompiler.myoperator.Operator; -import mycompiler.myoperator.RelOp; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; @@ -42,13 +30,33 @@ import org.apache.log4j.Logger; + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.operator.LogOp; +import de.dhbwstuttgart.syntaxtree.operator.Operator; +import de.dhbwstuttgart.syntaxtree.operator.RelOp; +import de.dhbwstuttgart.syntaxtree.type.BooleanType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.SingleConstraint; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/InstVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java similarity index 90% rename from src/mycompiler/mystatement/InstVar.java rename to src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java index 45a2ba42b..86f93b4e0 100755 --- a/src/mycompiler/mystatement/InstVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java @@ -1,5 +1,5 @@ // ino.module.InstVar.8634.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.InstVar.8634.import import java.util.Enumeration; @@ -7,22 +7,13 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; -import mycompiler.myclass.UsedId; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; @@ -39,14 +30,32 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.JavaCodeResult; -import typinferenz.OderConstraint; -import typinferenz.ResultSet; -import typinferenz.UndConstraint; -import typinferenz.assumptions.FieldAssumption; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.UndConstraint; +import de.dhbwstuttgart.typeinference.assumptions.FieldAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/InstanceOf.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java similarity index 88% rename from src/mycompiler/mystatement/InstanceOf.java rename to src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java index 07975f8b1..a3a29ef3b 100755 --- a/src/mycompiler/mystatement/InstanceOf.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java @@ -1,23 +1,17 @@ // ino.module.InstanceOf.8633.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.InstanceOf.8633.import import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -29,10 +23,23 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.BooleanType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/IntLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java similarity index 92% rename from src/mycompiler/mystatement/IntLiteral.java rename to src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java index 4b486986f..ec93cb4ea 100755 --- a/src/mycompiler/mystatement/IntLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java @@ -1,21 +1,15 @@ // ino.module.IntLiteral.8635.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.IntLiteral.8635.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -28,11 +22,24 @@ import org.apache.log4j.Logger; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.IntegerType; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/LambdaExpression.java b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java similarity index 85% rename from src/mycompiler/mystatement/LambdaExpression.java rename to src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java index 3374ecfbb..5ba7b0388 100755 --- a/src/mycompiler/mystatement/LambdaExpression.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java @@ -1,34 +1,34 @@ -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import typinferenz.JavaCodeResult; -import typinferenz.SingleConstraint; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.FunN; -import typinferenz.ResultSet; -import typinferenz.Typeable; -import typinferenz.assumptions.ParameterAssumption; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; -import mycompiler.SyntaxTreeNode; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ClassHelper; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.type.DoubleType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.FunN; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.Typeable; +import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassHelper; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.Method; -import mycompiler.myclass.ParameterList; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.DoubleType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/mycompiler/mystatement/LambdaParameter.java b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaParameter.java similarity index 58% rename from src/mycompiler/mystatement/LambdaParameter.java rename to src/de/dhbwstuttgart/syntaxtree/statement/LambdaParameter.java index 4dad882ae..c97636e20 100644 --- a/src/mycompiler/mystatement/LambdaParameter.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaParameter.java @@ -1,11 +1,11 @@ -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; -import typinferenz.ResultSet; -import typinferenz.typedeployment.TypeInsertPoint; -import mycompiler.myclass.DeclId; -import mycompiler.myclass.FormalParameter; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; /** * Der FormalParameter einer LambdaExpression hat gesonderte Eigenschaften. diff --git a/src/mycompiler/mystatement/Literal.java b/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java similarity index 98% rename from src/mycompiler/mystatement/Literal.java rename to src/de/dhbwstuttgart/syntaxtree/statement/Literal.java index 41274a682..4b4ae7d2e 100755 --- a/src/mycompiler/mystatement/Literal.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java @@ -1,5 +1,5 @@ // ino.module.Literal.8636.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Literal.8636.import diff --git a/src/mycompiler/mystatement/LocalOrFieldVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java similarity index 89% rename from src/mycompiler/mystatement/LocalOrFieldVar.java rename to src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java index 53958a980..ece05e0a6 100755 --- a/src/mycompiler/mystatement/LocalOrFieldVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java @@ -1,25 +1,18 @@ // ino.module.LocalOrFieldVar.8637.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.LocalOrFieldVar.8637.import import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; -import mycompiler.myclass.UsedId; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -35,14 +28,30 @@ import org.apache.log4j.Logger; + + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.SingleConstraint; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; diff --git a/src/mycompiler/mystatement/LocalVarDecl.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java similarity index 93% rename from src/mycompiler/mystatement/LocalVarDecl.java rename to src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java index 76b19cd6a..d69fa85e0 100755 --- a/src/mycompiler/mystatement/LocalVarDecl.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java @@ -1,5 +1,5 @@ // ino.module.LocalVarDecl.8638.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.LocalVarDecl.8638.import import java.util.Enumeration; @@ -8,19 +8,9 @@ import java.util.Vector; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassHelper; -import mycompiler.myclass.DeclId; -import mycompiler.MyCompiler; -import mycompiler.SyntaxTreeNode; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -43,16 +33,36 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.SingleConstraint; -import typinferenz.TypeInsertable; -import typinferenz.assumptions.LocalVarAssumption; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; -import typinferenz.typedeployment.TypeInsertPoint; + + + + + + + + + + +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ClassHelper; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.assumptions.LocalVarAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; diff --git a/src/mycompiler/mystatement/LongLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java similarity index 91% rename from src/mycompiler/mystatement/LongLiteral.java rename to src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java index 31d1b724b..73d5e9d28 100755 --- a/src/mycompiler/mystatement/LongLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java @@ -1,22 +1,15 @@ // ino.module.IntLiteral.8635.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.IntLiteral.8635.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.LongType; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -26,12 +19,19 @@ import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.IntegerType; +import de.dhbwstuttgart.syntaxtree.type.LongType; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; // ino.end -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/MethodCall.java b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java similarity index 95% rename from src/mycompiler/mystatement/MethodCall.java rename to src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java index ab73632c0..2e61c530e 100755 --- a/src/mycompiler/mystatement/MethodCall.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java @@ -1,5 +1,5 @@ // ino.module.MethodCall.8639.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.MethodCall.8639.import import java.util.Enumeration; @@ -7,35 +7,19 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassBody; -import mycompiler.myclass.DeclId; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.Method; -import mycompiler.myclass.ParameterList; -import mycompiler.myclass.UsedId; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CIntersectionType; import mycompiler.mytypereconstruction.CMultiplyTuple; import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.CSubstitutionGenVar; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import mycompiler.mytypereconstruction.set.CMultiplyTupleSet; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -52,13 +36,39 @@ import org.apache.log4j.Logger; + + + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ClassBody; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.Overloading; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.JavaCodeResult; -import typinferenz.Overloading; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/NegativeExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java similarity index 87% rename from src/mycompiler/mystatement/NegativeExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java index 4263d1281..0c43064ac 100755 --- a/src/mycompiler/mystatement/NegativeExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java @@ -1,24 +1,17 @@ // ino.module.NegativeExpr.8640.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.NegativeExpr.8640.import import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -32,10 +25,24 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/NewArray.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java similarity index 93% rename from src/mycompiler/mystatement/NewArray.java rename to src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java index cf07bbc83..eb25c781d 100755 --- a/src/mycompiler/mystatement/NewArray.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java @@ -1,19 +1,15 @@ // ino.module.NewArray.8641.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.NewArray.8641.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -25,10 +21,21 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/NewClass.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java similarity index 89% rename from src/mycompiler/mystatement/NewClass.java rename to src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java index 9f250fff6..c5bbc7177 100755 --- a/src/mycompiler/mystatement/NewClass.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java @@ -1,5 +1,5 @@ // ino.module.NewClass.8642.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.NewClass.8642.import import java.util.Enumeration; @@ -7,21 +7,13 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; -import mycompiler.myclass.UsedId; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CMultiplyTuple; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; @@ -41,17 +33,34 @@ import org.apache.log4j.Logger; -import typinferenz.JavaCodeResult; -import typinferenz.Overloading; -import typinferenz.SingleConstraint; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.FunN; -import typinferenz.ResultSet; -import typinferenz.UndConstraint; -import typinferenz.assumptions.ConstructorAssumption; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; + + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.FunN; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.Overloading; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.UndConstraint; +import de.dhbwstuttgart.typeinference.assumptions.ConstructorAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; diff --git a/src/mycompiler/mystatement/NotExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java similarity index 86% rename from src/mycompiler/mystatement/NotExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java index 607d25d43..b86208ce3 100755 --- a/src/mycompiler/mystatement/NotExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java @@ -1,24 +1,16 @@ // ino.module.NotExpr.8643.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.NotExpr.8643.import import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -34,11 +26,26 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.OderConstraint; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.BooleanType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/Null.java b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java similarity index 86% rename from src/mycompiler/mystatement/Null.java rename to src/de/dhbwstuttgart/syntaxtree/statement/Null.java index 58db707fd..1743e1361 100755 --- a/src/mycompiler/mystatement/Null.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java @@ -1,20 +1,15 @@ // ino.module.Null.8644.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Null.8644.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -27,10 +22,22 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/PositivExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java similarity index 89% rename from src/mycompiler/mystatement/PositivExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java index d086074b8..f3e8659d2 100755 --- a/src/mycompiler/mystatement/PositivExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java @@ -1,18 +1,14 @@ // ino.module.PositivExpr.8645.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.PositivExpr.8645.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -24,10 +20,21 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/PostDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java similarity index 90% rename from src/mycompiler/mystatement/PostDecExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java index 91c0f37c6..e8d7293e7 100755 --- a/src/mycompiler/mystatement/PostDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java @@ -1,25 +1,18 @@ // ino.module.PostDecExpr.8646.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.PostDecExpr.8646.import import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -33,10 +26,24 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/PostIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java similarity index 88% rename from src/mycompiler/mystatement/PostIncExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java index c17300d04..2aed476d7 100755 --- a/src/mycompiler/mystatement/PostIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java @@ -1,26 +1,18 @@ // ino.module.PostIncExpr.8647.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.PostIncExpr.8647.import import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -37,12 +29,27 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.OderConstraint; -import typinferenz.ResultSet; -import typinferenz.UndConstraint; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.UndConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/PreDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java similarity index 90% rename from src/mycompiler/mystatement/PreDecExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java index 5f0c07183..bba294885 100755 --- a/src/mycompiler/mystatement/PreDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java @@ -1,25 +1,18 @@ // ino.module.PreDecExpr.8648.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.PreDecExpr.8648.import import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -33,10 +26,24 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/PreIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java similarity index 90% rename from src/mycompiler/mystatement/PreIncExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java index de1e4de5e..fdef93775 100755 --- a/src/mycompiler/mystatement/PreIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java @@ -1,25 +1,18 @@ // ino.module.PreIncExpr.8649.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.PreIncExpr.8649.import import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -33,10 +26,24 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/Receiver.java b/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java similarity index 90% rename from src/mycompiler/mystatement/Receiver.java rename to src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java index 650839f5f..1b566fc16 100755 --- a/src/mycompiler/mystatement/Receiver.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java @@ -1,16 +1,21 @@ // ino.module.Receiver.8650.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Receiver.8650.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.myclass.Class; + import mycompiler.myexception.SCStatementException; + import org.apache.log4j.Logger; // ino.end -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; + + + +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/mystatement/Return.java b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java similarity index 86% rename from src/mycompiler/mystatement/Return.java rename to src/de/dhbwstuttgart/syntaxtree/statement/Return.java index 5e9b7dd88..6a4421d97 100755 --- a/src/mycompiler/mystatement/Return.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java @@ -1,22 +1,17 @@ // ino.module.Return.8651.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Return.8651.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -29,13 +24,25 @@ import org.apache.log4j.Logger; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.SingleConstraint; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/Statement.java b/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java similarity index 86% rename from src/mycompiler/mystatement/Statement.java rename to src/de/dhbwstuttgart/syntaxtree/statement/Statement.java index 874781560..879bc88ee 100755 --- a/src/mycompiler/mystatement/Statement.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java @@ -1,29 +1,29 @@ // ino.module.Statement.8652.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Statement.8652.import import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.Typeable; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.Typeable; -import typinferenz.assumptions.TypeAssumptions; -import mycompiler.IItemWithOffset; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; @@ -153,7 +153,7 @@ public abstract class Statement extends SyntaxTreeNode implements IItemWithOffse } public Type getReturnType(){ - return new mycompiler.mytype.Void(-1); + return new de.dhbwstuttgart.syntaxtree.type.Void(-1); } } // ino.end diff --git a/src/mycompiler/mystatement/StringLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java similarity index 86% rename from src/mycompiler/mystatement/StringLiteral.java rename to src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java index 9e56bc8aa..53fbdc68a 100755 --- a/src/mycompiler/mystatement/StringLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java @@ -1,21 +1,15 @@ // ino.module.StringLiteral.8653.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.StringLiteral.8653.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.CharacterType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -28,11 +22,25 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.CharacterType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; diff --git a/src/mycompiler/mystatement/This.java b/src/de/dhbwstuttgart/syntaxtree/statement/This.java similarity index 90% rename from src/mycompiler/mystatement/This.java rename to src/de/dhbwstuttgart/syntaxtree/statement/This.java index a77bb2228..3be2dbc1d 100755 --- a/src/mycompiler/mystatement/This.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/This.java @@ -1,22 +1,16 @@ // ino.module.This.8654.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.This.8654.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; -import mycompiler.myclass.UsedId; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -29,10 +23,24 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/UnaryExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.java similarity index 82% rename from src/mycompiler/mystatement/UnaryExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.java index 86b32dd3b..972ed71db 100755 --- a/src/mycompiler/mystatement/UnaryExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.java @@ -1,19 +1,19 @@ // ino.module.UnaryExpr.8655.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.UnaryExpr.8655.import import java.util.Vector; -import typinferenz.ConstraintsSet; -import typinferenz.OderConstraint; -import typinferenz.UndConstraint; -import typinferenz.assumptions.TypeAssumptions; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.UndConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.myexception.JVMCodeException; // ino.end -import mycompiler.mytype.RefType; -import mycompiler.mytype.TypePlaceholder; diff --git a/src/mycompiler/mystatement/UnaryMinus.java b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryMinus.java similarity index 93% rename from src/mycompiler/mystatement/UnaryMinus.java rename to src/de/dhbwstuttgart/syntaxtree/statement/UnaryMinus.java index cad939870..d473aa479 100755 --- a/src/mycompiler/mystatement/UnaryMinus.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryMinus.java @@ -1,5 +1,5 @@ // ino.module.UnaryMinus.8656.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.UnaryMinus.8656.import diff --git a/src/mycompiler/mystatement/UnaryNot.java b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryNot.java similarity index 96% rename from src/mycompiler/mystatement/UnaryNot.java rename to src/de/dhbwstuttgart/syntaxtree/statement/UnaryNot.java index c2cb7b0ce..f884b9b83 100755 --- a/src/mycompiler/mystatement/UnaryNot.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryNot.java @@ -1,5 +1,5 @@ // ino.module.UnaryNot.8657.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.UnaryNot.8657.import diff --git a/src/mycompiler/mystatement/UnaryPlus.java b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryPlus.java similarity index 78% rename from src/mycompiler/mystatement/UnaryPlus.java rename to src/de/dhbwstuttgart/syntaxtree/statement/UnaryPlus.java index 5fbdddf32..32432ca11 100755 --- a/src/mycompiler/mystatement/UnaryPlus.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryPlus.java @@ -1,5 +1,5 @@ // ino.module.UnaryPlus.8658.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.class.UnaryPlus.26323.declaration public class UnaryPlus diff --git a/src/mycompiler/mystatement/WhileStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java similarity index 88% rename from src/mycompiler/mystatement/WhileStmt.java rename to src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java index ee4e880df..600e3fb21 100755 --- a/src/mycompiler/mystatement/WhileStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java @@ -1,5 +1,5 @@ // ino.module.WhileStmt.8659.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.WhileStmt.8659.import import java.util.Enumeration; @@ -7,23 +7,13 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.myoperator.LogOp; -import mycompiler.myoperator.Operator; -import mycompiler.myoperator.RelOp; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -38,12 +28,30 @@ import org.apache.log4j.Logger; + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.operator.LogOp; +import de.dhbwstuttgart.syntaxtree.operator.Operator; +import de.dhbwstuttgart.syntaxtree.operator.RelOp; +import de.dhbwstuttgart.syntaxtree.type.BooleanType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.SingleConstraint; -import typinferenz.ConstraintsSet; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mytype/BaseType.java b/src/de/dhbwstuttgart/syntaxtree/type/BaseType.java similarity index 93% rename from src/mycompiler/mytype/BaseType.java rename to src/de/dhbwstuttgart/syntaxtree/type/BaseType.java index 21c0c6f9e..944d19e83 100755 --- a/src/mycompiler/mytype/BaseType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/BaseType.java @@ -1,8 +1,8 @@ // ino.module.BaseType.8667.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import mycompiler.IItemWithOffset; -import typinferenz.assumptions.TypeAssumptions; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; // ino.end // ino.class.BaseType.26435.declaration diff --git a/src/mycompiler/mytype/BooleanType.java b/src/de/dhbwstuttgart/syntaxtree/type/BooleanType.java similarity index 89% rename from src/mycompiler/mytype/BooleanType.java rename to src/de/dhbwstuttgart/syntaxtree/type/BooleanType.java index b66073f75..2b8dce528 100755 --- a/src/mycompiler/mytype/BooleanType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/BooleanType.java @@ -1,8 +1,8 @@ // ino.module.BooleanType.8668.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.end // ino.class.BooleanType.26451.declaration diff --git a/src/mycompiler/mytype/BoundedGenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java similarity index 93% rename from src/mycompiler/mytype/BoundedGenericTypeVar.java rename to src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java index 80632722c..7d0f33089 100755 --- a/src/mycompiler/mytype/BoundedGenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java @@ -1,17 +1,17 @@ // ino.module.BoundedGenericTypeVar.8669.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; // ino.end // ino.module.BoundedGenericTypeVar.8669.import import java.util.Vector; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import sun.reflect.generics.reflectiveObjects.NotImplementedException; // ino.end -import typinferenz.ConstraintsSet; -import typinferenz.SingleConstraint; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; // ino.class.BoundedGenericTypeVar.26464.description type=javadoc /** diff --git a/src/mycompiler/mytype/CRefTypeSet.java b/src/de/dhbwstuttgart/syntaxtree/type/CRefTypeSet.java similarity index 94% rename from src/mycompiler/mytype/CRefTypeSet.java rename to src/de/dhbwstuttgart/syntaxtree/type/CRefTypeSet.java index 296d9e260..9c909450b 100755 --- a/src/mycompiler/mytype/CRefTypeSet.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/CRefTypeSet.java @@ -1,4 +1,4 @@ -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; import java.util.Iterator; import java.util.Vector; diff --git a/src/mycompiler/mytype/CharacterType.java b/src/de/dhbwstuttgart/syntaxtree/type/CharacterType.java similarity index 90% rename from src/mycompiler/mytype/CharacterType.java rename to src/de/dhbwstuttgart/syntaxtree/type/CharacterType.java index b8c78462d..0b7d61bee 100755 --- a/src/mycompiler/mytype/CharacterType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/CharacterType.java @@ -1,8 +1,8 @@ // ino.module.CharacterType.8670.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.end // ino.class.CharacterType.26492.declaration diff --git a/src/mycompiler/mytype/DoubleType.java b/src/de/dhbwstuttgart/syntaxtree/type/DoubleType.java similarity index 89% rename from src/mycompiler/mytype/DoubleType.java rename to src/de/dhbwstuttgart/syntaxtree/type/DoubleType.java index a497d5e7b..975afd927 100755 --- a/src/mycompiler/mytype/DoubleType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/DoubleType.java @@ -1,8 +1,8 @@ // ino.module.IntegerType.8672.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.end // ino.class.IntegerType.26527.declaration diff --git a/src/mycompiler/mytype/ExtendsWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java similarity index 98% rename from src/mycompiler/mytype/ExtendsWildcardType.java rename to src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java index 132958c6a..9ef46ec74 100755 --- a/src/mycompiler/mytype/ExtendsWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java @@ -1,4 +1,4 @@ -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; /** diff --git a/src/mycompiler/mytype/FloatType.java b/src/de/dhbwstuttgart/syntaxtree/type/FloatType.java similarity index 89% rename from src/mycompiler/mytype/FloatType.java rename to src/de/dhbwstuttgart/syntaxtree/type/FloatType.java index bcfde7257..fa5e7a9ca 100755 --- a/src/mycompiler/mytype/FloatType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FloatType.java @@ -1,8 +1,8 @@ // ino.module.IntegerType.8672.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.end // ino.class.IntegerType.26527.declaration diff --git a/src/mycompiler/mytype/FreshExtendsWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/FreshExtendsWildcardType.java similarity index 97% rename from src/mycompiler/mytype/FreshExtendsWildcardType.java rename to src/de/dhbwstuttgart/syntaxtree/type/FreshExtendsWildcardType.java index 731d93761..b79d6c722 100755 --- a/src/mycompiler/mytype/FreshExtendsWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FreshExtendsWildcardType.java @@ -1,4 +1,4 @@ -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; public class FreshExtendsWildcardType extends FreshWildcardType implements IMatchable { diff --git a/src/mycompiler/mytype/FreshSuperWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/FreshSuperWildcardType.java similarity index 97% rename from src/mycompiler/mytype/FreshSuperWildcardType.java rename to src/de/dhbwstuttgart/syntaxtree/type/FreshSuperWildcardType.java index 66889b79f..a48cd03e9 100755 --- a/src/mycompiler/mytype/FreshSuperWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FreshSuperWildcardType.java @@ -1,4 +1,4 @@ -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; public class FreshSuperWildcardType extends FreshWildcardType implements IMatchable { diff --git a/src/mycompiler/mytype/FreshWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java similarity index 96% rename from src/mycompiler/mytype/FreshWildcardType.java rename to src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java index e1eb4a9c5..cdbba367f 100755 --- a/src/mycompiler/mytype/FreshWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java @@ -1,10 +1,10 @@ -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; import java.util.Vector; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; public class FreshWildcardType extends Type { diff --git a/src/mycompiler/mytype/GenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java similarity index 92% rename from src/mycompiler/mytype/GenericTypeVar.java rename to src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java index efb5b9e32..7c6e47ab4 100755 --- a/src/mycompiler/mytype/GenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java @@ -1,5 +1,5 @@ // ino.module.GenericTypeVar.8671.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; // ino.end // ino.module.GenericTypeVar.8671.import @@ -18,15 +18,20 @@ import java.util.Vector; + + + + + +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.SingleConstraint; -import typinferenz.TypeInsertable; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.typedeployment.TypeInsertPoint; // ino.class.GenericTypeVar.26505.description type=javadoc diff --git a/src/mycompiler/mytype/IMatchable.java b/src/de/dhbwstuttgart/syntaxtree/type/IMatchable.java similarity index 90% rename from src/mycompiler/mytype/IMatchable.java rename to src/de/dhbwstuttgart/syntaxtree/type/IMatchable.java index 0981d13f8..0395001ec 100755 --- a/src/mycompiler/mytype/IMatchable.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/IMatchable.java @@ -1,4 +1,4 @@ -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; /** * Dieses Interface wird von allen Klassen implementiert, die weitere Klassen diff --git a/src/mycompiler/mytype/ITypeContainer.java b/src/de/dhbwstuttgart/syntaxtree/type/ITypeContainer.java similarity index 89% rename from src/mycompiler/mytype/ITypeContainer.java rename to src/de/dhbwstuttgart/syntaxtree/type/ITypeContainer.java index 0b7fdbae3..2c8ad5c0d 100755 --- a/src/mycompiler/mytype/ITypeContainer.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/ITypeContainer.java @@ -1,4 +1,4 @@ -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; /** * Dieses Interface wird von allen Klassen implementiert, die weitere Klassen enthalten. diff --git a/src/mycompiler/mytype/IntegerType.java b/src/de/dhbwstuttgart/syntaxtree/type/IntegerType.java similarity index 89% rename from src/mycompiler/mytype/IntegerType.java rename to src/de/dhbwstuttgart/syntaxtree/type/IntegerType.java index 4fa054588..1bd61acf4 100755 --- a/src/mycompiler/mytype/IntegerType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/IntegerType.java @@ -1,8 +1,8 @@ // ino.module.IntegerType.8672.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.end // ino.class.IntegerType.26527.declaration diff --git a/src/mycompiler/mytype/LongType.java b/src/de/dhbwstuttgart/syntaxtree/type/LongType.java similarity index 89% rename from src/mycompiler/mytype/LongType.java rename to src/de/dhbwstuttgart/syntaxtree/type/LongType.java index 9a28792fc..53612cb3c 100755 --- a/src/mycompiler/mytype/LongType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/LongType.java @@ -1,8 +1,8 @@ // ino.module.IntegerType.8672.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.end // ino.class.IntegerType.26527.declaration diff --git a/src/mycompiler/mytype/Pair.java b/src/de/dhbwstuttgart/syntaxtree/type/Pair.java similarity index 99% rename from src/mycompiler/mytype/Pair.java rename to src/de/dhbwstuttgart/syntaxtree/type/Pair.java index 35ce4b3d6..5e14f3d56 100755 --- a/src/mycompiler/mytype/Pair.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Pair.java @@ -1,5 +1,5 @@ // ino.module.Pair.8673.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; // ino.end // ino.module.Pair.8673.import import java.util.Hashtable; diff --git a/src/mycompiler/mytype/ParaList.java b/src/de/dhbwstuttgart/syntaxtree/type/ParaList.java similarity index 97% rename from src/mycompiler/mytype/ParaList.java rename to src/de/dhbwstuttgart/syntaxtree/type/ParaList.java index 2ea154bbf..efa0b35f2 100755 --- a/src/mycompiler/mytype/ParaList.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/ParaList.java @@ -1,5 +1,5 @@ // ino.module.ParaList.8674.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; // ino.end // ino.module.ParaList.8674.import import java.util.Vector; diff --git a/src/mycompiler/mytype/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java similarity index 98% rename from src/mycompiler/mytype/RefType.java rename to src/de/dhbwstuttgart/syntaxtree/type/RefType.java index 6cc1a93a7..5c70c5fe0 100755 --- a/src/mycompiler/mytype/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -1,5 +1,5 @@ // ino.module.RefType.8675.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; // ino.end // ino.module.RefType.8675.import import java.util.ArrayList; @@ -8,9 +8,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.IItemWithOffset; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.UsedId; import mycompiler.myexception.SCException; import mycompiler.mytypereconstruction.CSubstitutionGenVar; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -23,12 +21,22 @@ import org.apache.log4j.Logger; + + + + + + + + +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.TypeInsertable; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; diff --git a/src/mycompiler/mytype/ReturnType.java b/src/de/dhbwstuttgart/syntaxtree/type/ReturnType.java similarity index 89% rename from src/mycompiler/mytype/ReturnType.java rename to src/de/dhbwstuttgart/syntaxtree/type/ReturnType.java index c7663f45e..0d93f65fa 100755 --- a/src/mycompiler/mytype/ReturnType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/ReturnType.java @@ -1,8 +1,8 @@ // ino.module.ReturnType.8676.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.end // ino.class.ReturnType.26703.declaration diff --git a/src/mycompiler/mytype/SuperWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java similarity index 94% rename from src/mycompiler/mytype/SuperWildcardType.java rename to src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java index 1a65a4c29..3c7d6bcc5 100755 --- a/src/mycompiler/mytype/SuperWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java @@ -1,7 +1,7 @@ -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; /** * Stellt eine Wildcard mit unterer Grenze dar. diff --git a/src/mycompiler/mytype/Type.java b/src/de/dhbwstuttgart/syntaxtree/type/Type.java similarity index 94% rename from src/mycompiler/mytype/Type.java rename to src/de/dhbwstuttgart/syntaxtree/type/Type.java index d5f7dcc05..6d0d73c58 100755 --- a/src/mycompiler/mytype/Type.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Type.java @@ -1,19 +1,18 @@ // ino.module.Type.8677.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; // ino.end // ino.module.Type.8677.import import java.util.ArrayList; import java.util.Vector; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; -import mycompiler.IItemWithOffset; -import mycompiler.SyntaxTreeNode; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.UsedId; -// ino.end diff --git a/src/mycompiler/mytype/TypePlaceholder.java b/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java similarity index 98% rename from src/mycompiler/mytype/TypePlaceholder.java rename to src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java index aab6d4da8..e4d794411 100755 --- a/src/mycompiler/mytype/TypePlaceholder.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java @@ -1,5 +1,5 @@ // ino.module.TypePlaceholder.8678.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; // ino.end // ino.module.TypePlaceholder.8678.import @@ -8,12 +8,12 @@ import java.util.Iterator; import java.util.Vector; import java.util.logging.Logger; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.TypeInsertable; -import typinferenz.typedeployment.TypeInsertPoint; -import typinferenz.typedeployment.TypeInsertSet; -import mycompiler.MyCompiler; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.IReplaceTypeEventProvider; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; diff --git a/src/mycompiler/mytype/Void.java b/src/de/dhbwstuttgart/syntaxtree/type/Void.java similarity index 85% rename from src/mycompiler/mytype/Void.java rename to src/de/dhbwstuttgart/syntaxtree/type/Void.java index 61426af73..4a07a13a5 100755 --- a/src/mycompiler/mytype/Void.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Void.java @@ -1,10 +1,10 @@ // ino.module.Void.8679.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import mycompiler.IItemWithOffset; -import mycompiler.myclass.Method; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; // ino.end // ino.class.Void.26857.declaration diff --git a/src/mycompiler/mytype/WildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java similarity index 92% rename from src/mycompiler/mytype/WildcardType.java rename to src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java index 0a796db7d..b3dd66d6a 100755 --- a/src/mycompiler/mytype/WildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java @@ -1,8 +1,8 @@ -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; /** * Stellt eine Wildcard in Java dar. diff --git a/src/typinferenz/ConstraintsSet.java b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java similarity index 94% rename from src/typinferenz/ConstraintsSet.java rename to src/de/dhbwstuttgart/typeinference/ConstraintsSet.java index ba5aa979e..6cb026fa8 100755 --- a/src/typinferenz/ConstraintsSet.java +++ b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java @@ -1,9 +1,9 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytype.Pair; +import de.dhbwstuttgart.syntaxtree.type.Pair; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSet; import mycompiler.mytypereconstruction.set.CTripleSet; diff --git a/src/typinferenz/FreshTypeVariable.java b/src/de/dhbwstuttgart/typeinference/FreshTypeVariable.java similarity index 88% rename from src/typinferenz/FreshTypeVariable.java rename to src/de/dhbwstuttgart/typeinference/FreshTypeVariable.java index e381f3aba..1d3394fcf 100755 --- a/src/typinferenz/FreshTypeVariable.java +++ b/src/de/dhbwstuttgart/typeinference/FreshTypeVariable.java @@ -1,7 +1,7 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; +import de.dhbwstuttgart.syntaxtree.type.Type; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.mytype.Type; public class FreshTypeVariable extends Type{ diff --git a/src/typinferenz/FunN.java b/src/de/dhbwstuttgart/typeinference/FunN.java similarity index 90% rename from src/typinferenz/FunN.java rename to src/de/dhbwstuttgart/typeinference/FunN.java index f00ae9ec5..ea1616b61 100755 --- a/src/typinferenz/FunN.java +++ b/src/de/dhbwstuttgart/typeinference/FunN.java @@ -1,17 +1,17 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Iterator; import java.util.Vector; -import mycompiler.myclass.Method; -import mycompiler.myclass.ParameterList; -import typinferenz.assumptions.MethodAssumption; -import typinferenz.assumptions.TypeAssumptions; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; diff --git a/src/typinferenz/FunNInterface.java b/src/de/dhbwstuttgart/typeinference/FunNInterface.java similarity index 77% rename from src/typinferenz/FunNInterface.java rename to src/de/dhbwstuttgart/typeinference/FunNInterface.java index 0b5e3dec6..d9226f4f4 100644 --- a/src/typinferenz/FunNInterface.java +++ b/src/de/dhbwstuttgart/typeinference/FunNInterface.java @@ -1,13 +1,15 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Vector; -import typinferenz.assumptions.ClassAssumption; -import typinferenz.assumptions.MethodAssumption; -import typinferenz.assumptions.TypeAssumptions; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.assumptions.ClassAssumption; +import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import mycompiler.mytype.*; -import mycompiler.myclass.Class; -import mycompiler.mytype.TypePlaceholder; /** * Stellt das Interface FunN dar. diff --git a/src/typinferenz/FunNMethod.java b/src/de/dhbwstuttgart/typeinference/FunNMethod.java similarity index 81% rename from src/typinferenz/FunNMethod.java rename to src/de/dhbwstuttgart/typeinference/FunNMethod.java index 269a58ab7..bb61be65c 100644 --- a/src/typinferenz/FunNMethod.java +++ b/src/de/dhbwstuttgart/typeinference/FunNMethod.java @@ -1,11 +1,16 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Vector; -import typinferenz.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import mycompiler.mytype.*; import mycompiler.myclass.*; -import mycompiler.mytype.TypePlaceholder; public class FunNMethod extends Method{ /** diff --git a/src/typinferenz/GenericTypeInsertable.java b/src/de/dhbwstuttgart/typeinference/GenericTypeInsertable.java similarity index 88% rename from src/typinferenz/GenericTypeInsertable.java rename to src/de/dhbwstuttgart/typeinference/GenericTypeInsertable.java index 1d676f761..b6694ce1b 100644 --- a/src/typinferenz/GenericTypeInsertable.java +++ b/src/de/dhbwstuttgart/typeinference/GenericTypeInsertable.java @@ -1,4 +1,4 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; /** * Wird von Knoten im Syntaxbaum implementiert, welche ein Einsetzen von generischen Variablendeklarationen erlauben. diff --git a/src/typinferenz/JavaCodeResult.java b/src/de/dhbwstuttgart/typeinference/JavaCodeResult.java similarity index 94% rename from src/typinferenz/JavaCodeResult.java rename to src/de/dhbwstuttgart/typeinference/JavaCodeResult.java index 4ec7160c7..bd9c19788 100755 --- a/src/typinferenz/JavaCodeResult.java +++ b/src/de/dhbwstuttgart/typeinference/JavaCodeResult.java @@ -1,11 +1,10 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Vector; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.mytype.TypePlaceholder; - public class JavaCodeResult{ private String javaCode = ""; diff --git a/src/typinferenz/KarthesischesProdukt.java b/src/de/dhbwstuttgart/typeinference/KarthesischesProdukt.java similarity index 97% rename from src/typinferenz/KarthesischesProdukt.java rename to src/de/dhbwstuttgart/typeinference/KarthesischesProdukt.java index 7add75e30..48db9ff3f 100755 --- a/src/typinferenz/KarthesischesProdukt.java +++ b/src/de/dhbwstuttgart/typeinference/KarthesischesProdukt.java @@ -1,4 +1,4 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Vector; diff --git a/src/typinferenz/OderConstraint.java b/src/de/dhbwstuttgart/typeinference/OderConstraint.java similarity index 88% rename from src/typinferenz/OderConstraint.java rename to src/de/dhbwstuttgart/typeinference/OderConstraint.java index 61aff4fe0..92aa327ac 100755 --- a/src/typinferenz/OderConstraint.java +++ b/src/de/dhbwstuttgart/typeinference/OderConstraint.java @@ -1,11 +1,11 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Vector; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; public class OderConstraint{ private Vector oderConstraintPairs; diff --git a/src/typinferenz/Overloading.java b/src/de/dhbwstuttgart/typeinference/Overloading.java similarity index 88% rename from src/typinferenz/Overloading.java rename to src/de/dhbwstuttgart/typeinference/Overloading.java index d371e2f75..c06421ec8 100755 --- a/src/typinferenz/Overloading.java +++ b/src/de/dhbwstuttgart/typeinference/Overloading.java @@ -1,15 +1,15 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Vector; -import typinferenz.assumptions.MethodAssumption; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.MethodCall; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.statement.MethodCall; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; diff --git a/src/typinferenz/ResultSet.java b/src/de/dhbwstuttgart/typeinference/ResultSet.java similarity index 94% rename from src/typinferenz/ResultSet.java rename to src/de/dhbwstuttgart/typeinference/ResultSet.java index 997c5c1d9..0a124ca23 100755 --- a/src/typinferenz/ResultSet.java +++ b/src/de/dhbwstuttgart/typeinference/ResultSet.java @@ -1,11 +1,11 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytype.Pair; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; /** * Im Grunde Sammlung von Pair s mit Equal-Operatoren. diff --git a/src/typinferenz/SingleConstraint.java b/src/de/dhbwstuttgart/typeinference/SingleConstraint.java similarity index 88% rename from src/typinferenz/SingleConstraint.java rename to src/de/dhbwstuttgart/typeinference/SingleConstraint.java index 12d353204..b6bf0d2a1 100755 --- a/src/typinferenz/SingleConstraint.java +++ b/src/de/dhbwstuttgart/typeinference/SingleConstraint.java @@ -1,14 +1,14 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Vector; -import typinferenz.exceptions.DebugException; -import typinferenz.exceptions.TypeinferenceException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CTripleSet; diff --git a/src/typinferenz/TIPConstraints.java b/src/de/dhbwstuttgart/typeinference/TIPConstraints.java similarity index 62% rename from src/typinferenz/TIPConstraints.java rename to src/de/dhbwstuttgart/typeinference/TIPConstraints.java index d664e601b..e65fd9bda 100644 --- a/src/typinferenz/TIPConstraints.java +++ b/src/de/dhbwstuttgart/typeinference/TIPConstraints.java @@ -1,8 +1,8 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Vector; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; /** * diff --git a/src/typinferenz/TypeInsertable.java b/src/de/dhbwstuttgart/typeinference/TypeInsertable.java similarity index 73% rename from src/typinferenz/TypeInsertable.java rename to src/de/dhbwstuttgart/typeinference/TypeInsertable.java index ca93a49e6..bd283a5e6 100644 --- a/src/typinferenz/TypeInsertable.java +++ b/src/de/dhbwstuttgart/typeinference/TypeInsertable.java @@ -1,8 +1,8 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; -import typinferenz.typedeployment.TypeInsertPoint; -import mycompiler.IItemWithOffset; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; public interface TypeInsertable extends ITypeReplacementListener, Typeable, IItemWithOffset { diff --git a/src/typinferenz/Typeable.java b/src/de/dhbwstuttgart/typeinference/Typeable.java similarity index 87% rename from src/typinferenz/Typeable.java rename to src/de/dhbwstuttgart/typeinference/Typeable.java index 2f307e2b7..bfcc35597 100755 --- a/src/typinferenz/Typeable.java +++ b/src/de/dhbwstuttgart/typeinference/Typeable.java @@ -1,6 +1,6 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; public interface Typeable { diff --git a/src/mycompiler/mytypereconstruction/TypeinferenceResultSet.java b/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java similarity index 81% rename from src/mycompiler/mytypereconstruction/TypeinferenceResultSet.java rename to src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java index 51575b459..77eee7599 100755 --- a/src/mycompiler/mytypereconstruction/TypeinferenceResultSet.java +++ b/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java @@ -1,5 +1,5 @@ // ino.module.CTypeReconstructionResult.8689.package -package mycompiler.mytypereconstruction; +package de.dhbwstuttgart.typeinference; // ino.end // ino.module.CTypeReconstructionResult.8689.import @@ -7,17 +7,15 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import typinferenz.ConstraintsSet; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; -import typinferenz.typedeployment.TypeInsertPoint; -import typinferenz.typedeployment.TypeInsertSet; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; @@ -50,10 +48,10 @@ public class TypeinferenceResultSet * Das unifizierte ConstaraintsSet */ private ResultSet unifiedConstraints; - private mycompiler.myclass.Class ownerOfResultSet;//Jedes Resultset gilt immer nur für eine Klasse. Diese wird in dieser Variable gespeichert. + private de.dhbwstuttgart.syntaxtree.Class ownerOfResultSet;//Jedes Resultset gilt immer nur für eine Klasse. Diese wird in dieser Variable gespeichert. // ino.method.CTypeReconstructionResult.27256.definition - public TypeinferenceResultSet(mycompiler.myclass.Class inferedClass, Vector constraints, ResultSet unifiedConstraints) + public TypeinferenceResultSet(de.dhbwstuttgart.syntaxtree.Class inferedClass, Vector constraints, ResultSet unifiedConstraints) // ino.end // ino.method.CTypeReconstructionResult.27256.body { @@ -97,7 +95,7 @@ public class TypeinferenceResultSet * Jedes TypeReconstructionResultSet entstand bei der Typinferierung einer Klasse. * @return Gibt die Klasse zurück der dieses ResultSet zugeordnet ist. */ - public mycompiler.myclass.Class getInterferedClass(){ + public de.dhbwstuttgart.syntaxtree.Class getInterferedClass(){ return this.ownerOfResultSet; } diff --git a/src/typinferenz/UndConstraint.java b/src/de/dhbwstuttgart/typeinference/UndConstraint.java similarity index 85% rename from src/typinferenz/UndConstraint.java rename to src/de/dhbwstuttgart/typeinference/UndConstraint.java index f5dc88084..96a0f2173 100755 --- a/src/typinferenz/UndConstraint.java +++ b/src/de/dhbwstuttgart/typeinference/UndConstraint.java @@ -1,9 +1,9 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Vector; -import mycompiler.mytype.Pair; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; /** * Stellt ein Constraint dar, welches aus mehreren Constraint-Paaren besteht. Diese gelten alle stets gleichzeitig / sind per "Und" miteinander verknüpft. diff --git a/src/typinferenz/assumptions/Assumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/Assumption.java similarity index 60% rename from src/typinferenz/assumptions/Assumption.java rename to src/de/dhbwstuttgart/typeinference/assumptions/Assumption.java index 1d52b9d15..d95089ca3 100644 --- a/src/typinferenz/assumptions/Assumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/Assumption.java @@ -1,10 +1,11 @@ -package typinferenz.assumptions; +package de.dhbwstuttgart.typeinference.assumptions; -import typinferenz.TypeInsertable; -import typinferenz.Typeable; -import mycompiler.myparser.JavaClassName; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.Typeable; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import mycompiler.mytype.*; -import mycompiler.myclass.Class; public class Assumption { diff --git a/src/typinferenz/assumptions/ClassAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/ClassAssumption.java similarity index 87% rename from src/typinferenz/assumptions/ClassAssumption.java rename to src/de/dhbwstuttgart/typeinference/assumptions/ClassAssumption.java index 98b9f4b65..16699e0d4 100644 --- a/src/typinferenz/assumptions/ClassAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/ClassAssumption.java @@ -1,7 +1,7 @@ -package typinferenz.assumptions; +package de.dhbwstuttgart.typeinference.assumptions; +import de.dhbwstuttgart.syntaxtree.Class; import mycompiler.myclass.*; -import mycompiler.myclass.Class; import mycompiler.mytype.*; /** diff --git a/src/typinferenz/assumptions/ConstructorAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/ConstructorAssumption.java similarity index 57% rename from src/typinferenz/assumptions/ConstructorAssumption.java rename to src/de/dhbwstuttgart/typeinference/assumptions/ConstructorAssumption.java index 855c40f9f..8bc393bb5 100644 --- a/src/typinferenz/assumptions/ConstructorAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/ConstructorAssumption.java @@ -1,9 +1,9 @@ -package typinferenz.assumptions; +package de.dhbwstuttgart.typeinference.assumptions; -import mycompiler.myclass.Class; -import mycompiler.myclass.Field; -import mycompiler.myclass.Method; -import mycompiler.mystatement.ArgumentList; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.Field; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.statement.ArgumentList; public class ConstructorAssumption extends MethodAssumption{ diff --git a/src/typinferenz/assumptions/FieldAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/FieldAssumption.java similarity index 76% rename from src/typinferenz/assumptions/FieldAssumption.java rename to src/de/dhbwstuttgart/typeinference/assumptions/FieldAssumption.java index 46243e71b..79b60d5c9 100644 --- a/src/typinferenz/assumptions/FieldAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/FieldAssumption.java @@ -1,9 +1,9 @@ -package typinferenz.assumptions; +package de.dhbwstuttgart.typeinference.assumptions; -import mycompiler.myclass.Field; -import mycompiler.myclass.Class; -import mycompiler.myparser.JavaClassName; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.Field; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; public class FieldAssumption extends Assumption { diff --git a/src/typinferenz/assumptions/GenericVarAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java similarity index 60% rename from src/typinferenz/assumptions/GenericVarAssumption.java rename to src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java index c564878a4..9f45b5c45 100644 --- a/src/typinferenz/assumptions/GenericVarAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java @@ -1,10 +1,10 @@ -package typinferenz.assumptions; +package de.dhbwstuttgart.typeinference.assumptions; -import mycompiler.myparser.JavaClassName; -import mycompiler.mystatement.LocalVarDecl; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.statement.LocalVarDecl; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; public class GenericVarAssumption extends Assumption{ diff --git a/src/typinferenz/assumptions/LocalVarAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/LocalVarAssumption.java similarity index 67% rename from src/typinferenz/assumptions/LocalVarAssumption.java rename to src/de/dhbwstuttgart/typeinference/assumptions/LocalVarAssumption.java index 218c9fd26..11530f64b 100644 --- a/src/typinferenz/assumptions/LocalVarAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/LocalVarAssumption.java @@ -1,8 +1,7 @@ -package typinferenz.assumptions; +package de.dhbwstuttgart.typeinference.assumptions; -import mycompiler.mytype.Type; - -import mycompiler.mystatement.LocalVarDecl; +import de.dhbwstuttgart.syntaxtree.statement.LocalVarDecl; +import de.dhbwstuttgart.syntaxtree.type.Type; public class LocalVarAssumption extends Assumption { private LocalVarDecl localVar; diff --git a/src/typinferenz/assumptions/MethodAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java similarity index 87% rename from src/typinferenz/assumptions/MethodAssumption.java rename to src/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java index 5981d0a1e..98c8a5642 100644 --- a/src/typinferenz/assumptions/MethodAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java @@ -1,13 +1,13 @@ -package typinferenz.assumptions; +package de.dhbwstuttgart.typeinference.assumptions; import java.util.Iterator; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.Method; -import mycompiler.myclass.Class; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; import mycompiler.mytype.*; -import mycompiler.myclass.Class; public class MethodAssumption extends FieldAssumption { diff --git a/src/typinferenz/assumptions/ParameterAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/ParameterAssumption.java similarity index 72% rename from src/typinferenz/assumptions/ParameterAssumption.java rename to src/de/dhbwstuttgart/typeinference/assumptions/ParameterAssumption.java index 543573d62..ffbcec8f2 100644 --- a/src/typinferenz/assumptions/ParameterAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/ParameterAssumption.java @@ -1,6 +1,6 @@ -package typinferenz.assumptions; +package de.dhbwstuttgart.typeinference.assumptions; -import mycompiler.myclass.FormalParameter; +import de.dhbwstuttgart.syntaxtree.FormalParameter; /** * ParameterAssumptions repräsentieren die Methodenparameter innerhalb des Rumpfes einer Methode. diff --git a/src/typinferenz/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java similarity index 96% rename from src/typinferenz/assumptions/TypeAssumptions.java rename to src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index e2df73abd..13ee62662 100755 --- a/src/typinferenz/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -1,21 +1,19 @@ -package typinferenz.assumptions; +package de.dhbwstuttgart.typeinference.assumptions; import java.util.Iterator; - -import mycompiler.IItemWithOffset; -import mycompiler.myclass.Class; - import java.util.Vector; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.FunN; +import de.dhbwstuttgart.typeinference.FunNInterface; +import de.dhbwstuttgart.typeinference.FunNMethod; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.FunN; -import typinferenz.FunNInterface; -import typinferenz.FunNMethod; -import typinferenz.exceptions.TypeinferenceException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; diff --git a/src/typinferenz/exceptions/DebugException.java b/src/de/dhbwstuttgart/typeinference/exceptions/DebugException.java similarity index 72% rename from src/typinferenz/exceptions/DebugException.java rename to src/de/dhbwstuttgart/typeinference/exceptions/DebugException.java index 2043320aa..1f2e2775c 100644 --- a/src/typinferenz/exceptions/DebugException.java +++ b/src/de/dhbwstuttgart/typeinference/exceptions/DebugException.java @@ -1,4 +1,4 @@ -package typinferenz.exceptions; +package de.dhbwstuttgart.typeinference.exceptions; public class DebugException extends RuntimeException { diff --git a/src/typinferenz/exceptions/ParserError.java b/src/de/dhbwstuttgart/typeinference/exceptions/ParserError.java similarity index 56% rename from src/typinferenz/exceptions/ParserError.java rename to src/de/dhbwstuttgart/typeinference/exceptions/ParserError.java index 02105ba51..7d1d51ef9 100644 --- a/src/typinferenz/exceptions/ParserError.java +++ b/src/de/dhbwstuttgart/typeinference/exceptions/ParserError.java @@ -1,6 +1,6 @@ -package typinferenz.exceptions; +package de.dhbwstuttgart.typeinference.exceptions; -import mycompiler.myparser.JavaParser.yyException; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; public class ParserError extends TypeinferenceException{ diff --git a/src/typinferenz/exceptions/TypeinferenceException.java b/src/de/dhbwstuttgart/typeinference/exceptions/TypeinferenceException.java similarity index 92% rename from src/typinferenz/exceptions/TypeinferenceException.java rename to src/de/dhbwstuttgart/typeinference/exceptions/TypeinferenceException.java index 2fe6897e7..7a72266ca 100755 --- a/src/typinferenz/exceptions/TypeinferenceException.java +++ b/src/de/dhbwstuttgart/typeinference/exceptions/TypeinferenceException.java @@ -1,6 +1,6 @@ -package typinferenz.exceptions; +package de.dhbwstuttgart.typeinference.exceptions; -import mycompiler.IItemWithOffset; +import de.dhbwstuttgart.core.IItemWithOffset; /** * Eine RuntimeException, welche bei einem Fehler während des Typinferenzalgorithmus ausgelöst wird. diff --git a/bin/mycompiler/myparser/.cvsignore b/src/de/dhbwstuttgart/typeinference/parser/.cvsignore similarity index 100% rename from bin/mycompiler/myparser/.cvsignore rename to src/de/dhbwstuttgart/typeinference/parser/.cvsignore diff --git a/src/mycompiler/myparser/BoundedClassIdentifierList.java b/src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java similarity index 75% rename from src/mycompiler/myparser/BoundedClassIdentifierList.java rename to src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java index da4a48cd4..1dcdb4d09 100644 --- a/src/mycompiler/myparser/BoundedClassIdentifierList.java +++ b/src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java @@ -1,9 +1,9 @@ -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; public class BoundedClassIdentifierList extends Vector{ diff --git a/src/mycompiler/myparser/ClassAndParameter.java b/src/de/dhbwstuttgart/typeinference/parser/ClassAndParameter.java similarity index 94% rename from src/mycompiler/myparser/ClassAndParameter.java rename to src/de/dhbwstuttgart/typeinference/parser/ClassAndParameter.java index a72acd318..ef928aeeb 100755 --- a/src/mycompiler/myparser/ClassAndParameter.java +++ b/src/de/dhbwstuttgart/typeinference/parser/ClassAndParameter.java @@ -1,12 +1,12 @@ // ino.module.ClassAndParameter.8613.package -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; // ino.end // ino.module.ClassAndParameter.8613.import import java.util.Vector; -import mycompiler.mytype.ParaList; -import mycompiler.mytype.Type; -// ino.end + +import de.dhbwstuttgart.syntaxtree.type.ParaList; +import de.dhbwstuttgart.syntaxtree.type.Type; // ino.class.ClassAndParameter.24323.description type=javadoc /** diff --git a/src/mycompiler/myparser/GenericVarDeclarationList.java b/src/de/dhbwstuttgart/typeinference/parser/GenericVarDeclarationList.java similarity index 74% rename from src/mycompiler/myparser/GenericVarDeclarationList.java rename to src/de/dhbwstuttgart/typeinference/parser/GenericVarDeclarationList.java index fc9f67271..0833d3707 100644 --- a/src/mycompiler/myparser/GenericVarDeclarationList.java +++ b/src/de/dhbwstuttgart/typeinference/parser/GenericVarDeclarationList.java @@ -1,9 +1,9 @@ -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; import java.util.Vector; -import typinferenz.exceptions.DebugException; -import mycompiler.mytype.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; public class GenericVarDeclarationList { diff --git a/src/mycompiler/myparser/InterfaceAndParameter.java b/src/de/dhbwstuttgart/typeinference/parser/InterfaceAndParameter.java similarity index 94% rename from src/mycompiler/myparser/InterfaceAndParameter.java rename to src/de/dhbwstuttgart/typeinference/parser/InterfaceAndParameter.java index b003846cf..b13858d99 100755 --- a/src/mycompiler/myparser/InterfaceAndParameter.java +++ b/src/de/dhbwstuttgart/typeinference/parser/InterfaceAndParameter.java @@ -1,12 +1,12 @@ // ino.module.InterfaceAndParameter.8614.package -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; // ino.end // ino.module.InterfaceAndParameter.8614.import import java.util.Vector; -import mycompiler.mytype.ParaList; -import mycompiler.mytype.Type; -// ino.end + +import de.dhbwstuttgart.syntaxtree.type.ParaList; +import de.dhbwstuttgart.syntaxtree.type.Type; // ino.class.InterfaceAndParameter.24353.description type=javadoc /** diff --git a/src/mycompiler/myparser/InterfaceList.java b/src/de/dhbwstuttgart/typeinference/parser/InterfaceList.java similarity index 91% rename from src/mycompiler/myparser/InterfaceList.java rename to src/de/dhbwstuttgart/typeinference/parser/InterfaceList.java index c09a2c55e..3e20555f9 100755 --- a/src/mycompiler/myparser/InterfaceList.java +++ b/src/de/dhbwstuttgart/typeinference/parser/InterfaceList.java @@ -1,11 +1,11 @@ // ino.module.InterfaceList.8615.package -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; // ino.end // ino.module.InterfaceList.8615.import import java.util.Vector; -import mycompiler.myclass.UsedId; -// ino.end + +import de.dhbwstuttgart.syntaxtree.misc.UsedId; // ino.class.InterfaceList.24383.description type=javadoc /** diff --git a/src/mycompiler/myparser/JavaClassName.java b/src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java similarity index 96% rename from src/mycompiler/myparser/JavaClassName.java rename to src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java index adf9b0549..12c41520c 100644 --- a/src/mycompiler/myparser/JavaClassName.java +++ b/src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java @@ -1,8 +1,8 @@ -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; import java.util.Vector; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; /** * Stellt den Namen einer Java Klasse dar. diff --git a/src/mycompiler/myparser/JavaLexer.java b/src/de/dhbwstuttgart/typeinference/parser/JavaLexer.java similarity index 99% rename from src/mycompiler/myparser/JavaLexer.java rename to src/de/dhbwstuttgart/typeinference/parser/JavaLexer.java index 88c7f7cd0..92f09f6af 100644 --- a/src/mycompiler/myparser/JavaLexer.java +++ b/src/de/dhbwstuttgart/typeinference/parser/JavaLexer.java @@ -6,7 +6,7 @@ * * ********************************************/ // user code: -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; public class JavaLexer { diff --git a/bin/mycompiler/myparser/JavaLexer.lex b/src/de/dhbwstuttgart/typeinference/parser/JavaLexer.lex similarity index 100% rename from bin/mycompiler/myparser/JavaLexer.lex rename to src/de/dhbwstuttgart/typeinference/parser/JavaLexer.lex diff --git a/src/mycompiler/myparser/JavaParser.java b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java similarity index 97% rename from src/mycompiler/myparser/JavaParser.java rename to src/de/dhbwstuttgart/typeinference/parser/JavaParser.java index de6808704..8b944a832 100644 --- a/src/mycompiler/myparser/JavaParser.java +++ b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java @@ -6,25 +6,96 @@ Backup von JavaParser.jay 10.April 17 Uhr */ -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; -import mycompiler.myclass.FieldDeclaration; -import mycompiler.myclass.GenericDeclarationList; -import mycompiler.myclass.Field; import java.util.Vector; -import mycompiler.SourceFile; -import mycompiler.AClassOrInterface; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassBody; -import mycompiler.myclass.Constructor; -import mycompiler.myclass.Constant; -import mycompiler.myclass.ImportDeclarations; -import mycompiler.myclass.DeclId; -import mycompiler.myclass.ExceptionList; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.Method; -import mycompiler.myclass.ParameterList; -import mycompiler.myclass.UsedId; + +import de.dhbwstuttgart.core.AClassOrInterface; +import de.dhbwstuttgart.core.SourceFile; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ClassBody; +import de.dhbwstuttgart.syntaxtree.Constant; +import de.dhbwstuttgart.syntaxtree.Constructor; +import de.dhbwstuttgart.syntaxtree.ExceptionList; +import de.dhbwstuttgart.syntaxtree.Field; +import de.dhbwstuttgart.syntaxtree.FieldDeclaration; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.syntaxtree.GenericDeclarationList; +import de.dhbwstuttgart.syntaxtree.ImportDeclarations; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.operator.AndOp; +import de.dhbwstuttgart.syntaxtree.operator.DivideOp; +import de.dhbwstuttgart.syntaxtree.operator.EqualOp; +import de.dhbwstuttgart.syntaxtree.operator.GreaterEquOp; +import de.dhbwstuttgart.syntaxtree.operator.GreaterOp; +import de.dhbwstuttgart.syntaxtree.operator.LessEquOp; +import de.dhbwstuttgart.syntaxtree.operator.LessOp; +import de.dhbwstuttgart.syntaxtree.operator.MinusOp; +import de.dhbwstuttgart.syntaxtree.operator.ModuloOp; +import de.dhbwstuttgart.syntaxtree.operator.NotEqualOp; +import de.dhbwstuttgart.syntaxtree.operator.Operator; +import de.dhbwstuttgart.syntaxtree.operator.OrOp; +import de.dhbwstuttgart.syntaxtree.operator.PlusOp; +import de.dhbwstuttgart.syntaxtree.operator.TimesOp; +import de.dhbwstuttgart.syntaxtree.statement.ArgumentList; +import de.dhbwstuttgart.syntaxtree.statement.Assign; +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Block; +import de.dhbwstuttgart.syntaxtree.statement.BoolLiteral; +import de.dhbwstuttgart.syntaxtree.statement.CastExpr; +import de.dhbwstuttgart.syntaxtree.statement.CharLiteral; +import de.dhbwstuttgart.syntaxtree.statement.DoubleLiteral; +import de.dhbwstuttgart.syntaxtree.statement.EmptyStmt; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.statement.ExprStmt; +import de.dhbwstuttgart.syntaxtree.statement.FloatLiteral; +import de.dhbwstuttgart.syntaxtree.statement.ForStmt; +import de.dhbwstuttgart.syntaxtree.statement.IfStmt; +import de.dhbwstuttgart.syntaxtree.statement.InstVar; +import de.dhbwstuttgart.syntaxtree.statement.InstanceOf; +import de.dhbwstuttgart.syntaxtree.statement.IntLiteral; +import de.dhbwstuttgart.syntaxtree.statement.LambdaExpression; +import de.dhbwstuttgart.syntaxtree.statement.Literal; +import de.dhbwstuttgart.syntaxtree.statement.LocalOrFieldVar; +import de.dhbwstuttgart.syntaxtree.statement.LocalVarDecl; +import de.dhbwstuttgart.syntaxtree.statement.LongLiteral; +import de.dhbwstuttgart.syntaxtree.statement.MethodCall; +import de.dhbwstuttgart.syntaxtree.statement.NegativeExpr; +import de.dhbwstuttgart.syntaxtree.statement.NewClass; +import de.dhbwstuttgart.syntaxtree.statement.NotExpr; +import de.dhbwstuttgart.syntaxtree.statement.Null; +import de.dhbwstuttgart.syntaxtree.statement.PositivExpr; +import de.dhbwstuttgart.syntaxtree.statement.PostDecExpr; +import de.dhbwstuttgart.syntaxtree.statement.PostIncExpr; +import de.dhbwstuttgart.syntaxtree.statement.PreDecExpr; +import de.dhbwstuttgart.syntaxtree.statement.PreIncExpr; +import de.dhbwstuttgart.syntaxtree.statement.Receiver; +import de.dhbwstuttgart.syntaxtree.statement.Return; +import de.dhbwstuttgart.syntaxtree.statement.Statement; +import de.dhbwstuttgart.syntaxtree.statement.StringLiteral; +import de.dhbwstuttgart.syntaxtree.statement.This; +import de.dhbwstuttgart.syntaxtree.statement.UnaryMinus; +import de.dhbwstuttgart.syntaxtree.statement.UnaryNot; +import de.dhbwstuttgart.syntaxtree.statement.UnaryPlus; +import de.dhbwstuttgart.syntaxtree.statement.WhileStmt; +import de.dhbwstuttgart.syntaxtree.type.BaseType; +import de.dhbwstuttgart.syntaxtree.type.BooleanType; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.CharacterType; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.IntegerType; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.ParaList; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.syntaxtree.type.WildcardType; import mycompiler.myinterface.Interface; import mycompiler.myinterface.InterfaceBody; import mycompiler.mymodifier.Abstract; @@ -35,76 +106,6 @@ import mycompiler.mymodifier.Private; import mycompiler.mymodifier.Protected; import mycompiler.mymodifier.Public; import mycompiler.mymodifier.Static; -import mycompiler.myoperator.AndOp; -import mycompiler.myoperator.DivideOp; -import mycompiler.myoperator.EqualOp; -import mycompiler.myoperator.GreaterEquOp; -import mycompiler.myoperator.GreaterOp; -import mycompiler.myoperator.LessEquOp; -import mycompiler.myoperator.LessOp; -import mycompiler.myoperator.MinusOp; -import mycompiler.myoperator.ModuloOp; -import mycompiler.myoperator.NotEqualOp; -import mycompiler.myoperator.Operator; -import mycompiler.myoperator.OrOp; -import mycompiler.myoperator.PlusOp; -import mycompiler.myoperator.TimesOp; -import mycompiler.mystatement.ArgumentList; -import mycompiler.mystatement.Assign; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Block; -import mycompiler.mystatement.BoolLiteral; -import mycompiler.mystatement.FloatLiteral; -import mycompiler.mystatement.DoubleLiteral; -import mycompiler.mystatement.LongLiteral; -import mycompiler.mystatement.CastExpr; -import mycompiler.mystatement.CharLiteral; -import mycompiler.mystatement.EmptyStmt; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.ExprStmt; -import mycompiler.mystatement.IfStmt; -import mycompiler.mystatement.InstanceOf; -import mycompiler.mystatement.IntLiteral; -import mycompiler.mystatement.Literal; -import mycompiler.mystatement.InstVar; -import mycompiler.mystatement.LocalOrFieldVar; -import mycompiler.mystatement.LocalVarDecl; -import mycompiler.mystatement.MethodCall; -import mycompiler.mystatement.NegativeExpr; -import mycompiler.mystatement.NewClass; -import mycompiler.mystatement.NotExpr; -import mycompiler.mystatement.Null; -import mycompiler.mystatement.PositivExpr; -import mycompiler.mystatement.PostDecExpr; -import mycompiler.mystatement.PostIncExpr; -import mycompiler.mystatement.PreDecExpr; -import mycompiler.mystatement.PreIncExpr; -import mycompiler.mystatement.Receiver; -import mycompiler.mystatement.Return; -import mycompiler.mystatement.Statement; -import mycompiler.mystatement.StringLiteral; -import mycompiler.mystatement.This; -import mycompiler.mystatement.UnaryMinus; -import mycompiler.mystatement.UnaryNot; -import mycompiler.mystatement.UnaryPlus; -import mycompiler.mystatement.WhileStmt; -import mycompiler.mystatement.ForStmt; -import mycompiler.mystatement.LambdaExpression; -import mycompiler.mytype.BaseType; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.CharacterType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.ParaList; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; -import mycompiler.mytype.WildcardType; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Pair; public class JavaParser{ public Vector path = new Vector(); diff --git a/bin/mycompiler/myparser/JavaParser.jay b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay similarity index 100% rename from bin/mycompiler/myparser/JavaParser.jay rename to src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay diff --git a/bin/mycompiler/myparser/JavaParser_old.jay b/src/de/dhbwstuttgart/typeinference/parser/JavaParser_old.jay similarity index 100% rename from bin/mycompiler/myparser/JavaParser_old.jay rename to src/de/dhbwstuttgart/typeinference/parser/JavaParser_old.jay diff --git a/src/mycompiler/myparser/Scanner.java b/src/de/dhbwstuttgart/typeinference/parser/Scanner.java similarity index 96% rename from src/mycompiler/myparser/Scanner.java rename to src/de/dhbwstuttgart/typeinference/parser/Scanner.java index 95553520c..e8a0f9b9d 100755 --- a/src/mycompiler/myparser/Scanner.java +++ b/src/de/dhbwstuttgart/typeinference/parser/Scanner.java @@ -1,5 +1,5 @@ // ino.module.Scanner.8618.package -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; // ino.end // ino.class.Scanner.24842.declaration public class Scanner extends JavaLexer implements JavaParser.yyInput diff --git a/src/mycompiler/myparser/Token.java b/src/de/dhbwstuttgart/typeinference/parser/Token.java similarity index 98% rename from src/mycompiler/myparser/Token.java rename to src/de/dhbwstuttgart/typeinference/parser/Token.java index 3a7133bf4..4c433d089 100755 --- a/src/mycompiler/myparser/Token.java +++ b/src/de/dhbwstuttgart/typeinference/parser/Token.java @@ -1,5 +1,5 @@ // ino.module.Token.8619.package -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; // ino.end // ino.class.Token.24859.declaration public class Token diff --git a/src/typinferenz/typedeployment/GenericTypeInsertPoint.java b/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java similarity index 87% rename from src/typinferenz/typedeployment/GenericTypeInsertPoint.java rename to src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java index 61322247a..5939a91b9 100644 --- a/src/typinferenz/typedeployment/GenericTypeInsertPoint.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java @@ -1,20 +1,20 @@ -package typinferenz.typedeployment; +package de.dhbwstuttgart.typeinference.typedeployment; import java.util.Iterator; import java.util.Vector; -import typinferenz.GenericTypeInsertable; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.TypeInsertable; -import typinferenz.exceptions.DebugException; -import mycompiler.IItemWithOffset; -import mycompiler.SyntaxTreeNode; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.GenericTypeInsertable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; /** * Ein InsertPoint für Generische Variablen diff --git a/src/typinferenz/typedeployment/SourcePatchPoint.java b/src/de/dhbwstuttgart/typeinference/typedeployment/SourcePatchPoint.java similarity index 69% rename from src/typinferenz/typedeployment/SourcePatchPoint.java rename to src/de/dhbwstuttgart/typeinference/typedeployment/SourcePatchPoint.java index b61396698..75c69b019 100644 --- a/src/typinferenz/typedeployment/SourcePatchPoint.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/SourcePatchPoint.java @@ -1,8 +1,8 @@ -package typinferenz.typedeployment; +package de.dhbwstuttgart.typeinference.typedeployment; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.TypeInsertable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; public abstract class SourcePatchPoint implements Comparable{ protected ResultSet resultSet; diff --git a/src/typinferenz/typedeployment/TypeInsertPoint.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java similarity index 85% rename from src/typinferenz/typedeployment/TypeInsertPoint.java rename to src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java index a00258b11..54ad0c1af 100644 --- a/src/typinferenz/typedeployment/TypeInsertPoint.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java @@ -1,16 +1,18 @@ -package typinferenz.typedeployment; +package de.dhbwstuttgart.typeinference.typedeployment; import java.util.Vector; -import typinferenz.GenericTypeInsertable; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.TypeInsertable; -import typinferenz.exceptions.DebugException; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.Field; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.GenericTypeInsertable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; import mycompiler.myclass.*; -import mycompiler.myclass.Class; -import mycompiler.IItemWithOffset; -import mycompiler.SyntaxTreeNode; import mycompiler.mytype.*; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; diff --git a/src/typinferenz/typedeployment/TypeInsertSet.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java similarity index 89% rename from src/typinferenz/typedeployment/TypeInsertSet.java rename to src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java index 5503cf62d..5d939f3cd 100644 --- a/src/typinferenz/typedeployment/TypeInsertSet.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java @@ -1,4 +1,4 @@ -package typinferenz.typedeployment; +package de.dhbwstuttgart.typeinference.typedeployment; import java.util.Collections; import java.util.HashMap; @@ -7,15 +7,15 @@ import java.util.Vector; import org.apache.log4j.Logger; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.TypeInsertable; -import mycompiler.IItemWithOffset; -import mycompiler.SyntaxTreeNode; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; /** * Bündelt ein Set von TypeInsertPoints, welche zu einem TypeInferenceResultSet gehören. diff --git a/src/mycompiler/mybytecode/ClassFile.java b/src/mycompiler/mybytecode/ClassFile.java index 619c8aed0..2306a10f4 100755 --- a/src/mycompiler/mybytecode/ClassFile.java +++ b/src/mycompiler/mybytecode/ClassFile.java @@ -13,20 +13,25 @@ import java.io.OutputStream; import java.lang.reflect.Array; import java.util.Vector; -import mycompiler.myclass.ParameterList; -import mycompiler.myclass.UsedId; -import mycompiler.MyCompiler; import mycompiler.myexception.JVMCodeException; import mycompiler.myinterface.Interface; -import mycompiler.mystatement.Assign; -import mycompiler.mystatement.Block; -import mycompiler.mytype.Type; -import mycompiler.SourceFile; import org.apache.log4j.Logger; // ino.end + + + +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.SourceFile; +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.statement.Assign; +import de.dhbwstuttgart.syntaxtree.statement.Block; +import de.dhbwstuttgart.syntaxtree.type.Type; + + // ino.class.ClassFile.21492.description type=javadoc /** * Darstellung einer Klassendatei aus Sicht fuer die JVM. diff --git a/src/mycompiler/mybytecode/CodeAttribute.java b/src/mycompiler/mybytecode/CodeAttribute.java index 86997fdc3..d8844f206 100755 --- a/src/mycompiler/mybytecode/CodeAttribute.java +++ b/src/mycompiler/mybytecode/CodeAttribute.java @@ -14,10 +14,9 @@ import java.io.OutputStream; import java.lang.reflect.Array; import java.util.Vector; +import de.dhbwstuttgart.syntaxtree.type.Type; import sun.reflect.generics.reflectiveObjects.NotImplementedException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.Type; -// ino.end // ino.class.CodeAttribute.21681.declaration public class CodeAttribute extends Attribute diff --git a/src/mycompiler/mybytecode/JVMCode.java b/src/mycompiler/mybytecode/JVMCode.java index aaa0392b6..7e3e5c902 100755 --- a/src/mycompiler/mybytecode/JVMCode.java +++ b/src/mycompiler/mybytecode/JVMCode.java @@ -3,11 +3,14 @@ package mycompiler.mybytecode; // ino.end // ino.module.JVMCode.8547.import import java.util.Vector; + import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.GenericTypeVar; + import org.apache.log4j.Logger; // ino.end +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; + // ino.class.JVMCode.22140.description type=javadoc /** * Enthaelt die Befehle fuer die Umsetzung in JVM-Code und diff --git a/src/mycompiler/mybytecode/SignatureInfo.java b/src/mycompiler/mybytecode/SignatureInfo.java index a7d2e6c10..8bb421661 100755 --- a/src/mycompiler/mybytecode/SignatureInfo.java +++ b/src/mycompiler/mybytecode/SignatureInfo.java @@ -8,17 +8,20 @@ import java.io.IOException; import java.io.OutputStream; import java.util.Vector; -import mycompiler.myclass.ParameterList; -import mycompiler.myclass.UsedId; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import org.apache.log4j.Logger; // ino.end + + + +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import sun.reflect.generics.reflectiveObjects.NotImplementedException; // ino.class.SignatureInfo.22968.description type=javadoc diff --git a/src/mycompiler/myexception/CTypeReconstructionException.java b/src/mycompiler/myexception/CTypeReconstructionException.java index ccb15f67b..132daf7be 100755 --- a/src/mycompiler/myexception/CTypeReconstructionException.java +++ b/src/mycompiler/myexception/CTypeReconstructionException.java @@ -4,8 +4,8 @@ package mycompiler.myexception; // ino.module.CTypeReconstructionException.8572.import import java.util.Vector; -import mycompiler.IItemWithOffset; -// ino.end + +import de.dhbwstuttgart.core.IItemWithOffset; // ino.class.CTypeReconstructionException.23746.description type=javadoc /** diff --git a/src/mycompiler/myinterface/Interface.java b/src/mycompiler/myinterface/Interface.java index 2e7cad7f3..d19a49b15 100755 --- a/src/mycompiler/myinterface/Interface.java +++ b/src/mycompiler/myinterface/Interface.java @@ -5,28 +5,27 @@ package mycompiler.myinterface; // ino.module.Interface.8582.import import java.util.Vector; -import mycompiler.AClassOrInterface; +import de.dhbwstuttgart.core.AClassOrInterface; +import de.dhbwstuttgart.core.SourceFile; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ClassHelper; +import de.dhbwstuttgart.syntaxtree.Constant; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import mycompiler.mybytecode.ClassFile; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassHelper; -import mycompiler.myclass.Constant; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.Method; -import mycompiler.myclass.ParameterList; -import mycompiler.myclass.UsedId; import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CIntersectionType; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; -import mycompiler.SourceFile; -// ino.end /** * Ein Interface ist eine abstrakte Klasse, erbt daher von Class diff --git a/src/mycompiler/myinterface/InterfaceBody.java b/src/mycompiler/myinterface/InterfaceBody.java index 35123ef21..56135a0a1 100755 --- a/src/mycompiler/myinterface/InterfaceBody.java +++ b/src/mycompiler/myinterface/InterfaceBody.java @@ -5,11 +5,10 @@ package mycompiler.myinterface; // ino.module.InterfaceBody.8583.import import java.util.Vector; -import mycompiler.myclass.Field; - +import de.dhbwstuttgart.syntaxtree.Constant; +import de.dhbwstuttgart.syntaxtree.Field; +import de.dhbwstuttgart.syntaxtree.Method; import mycompiler.mybytecode.ClassFile; -import mycompiler.myclass.Constant; -import mycompiler.myclass.Method; import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; // ino.end diff --git a/src/mycompiler/mymodifier/Abstract.java b/src/mycompiler/mymodifier/Abstract.java index 17a4c21e1..69027ed72 100755 --- a/src/mycompiler/mymodifier/Abstract.java +++ b/src/mycompiler/mymodifier/Abstract.java @@ -1,9 +1,8 @@ // ino.module.Abstract.8585.package package mycompiler.mymodifier; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -// ino.end +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.class.Abstract.24015.description type=javadoc diff --git a/src/mycompiler/mymodifier/Final.java b/src/mycompiler/mymodifier/Final.java index 487b6424d..8330eba5e 100755 --- a/src/mycompiler/mymodifier/Final.java +++ b/src/mycompiler/mymodifier/Final.java @@ -1,9 +1,8 @@ // ino.module.Final.8586.package package mycompiler.mymodifier; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -// ino.end +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.class.Final.24022.description type=javadoc diff --git a/src/mycompiler/mymodifier/InterfaceModifier.java b/src/mycompiler/mymodifier/InterfaceModifier.java index 6c38c8c36..8de2bee13 100755 --- a/src/mycompiler/mymodifier/InterfaceModifier.java +++ b/src/mycompiler/mymodifier/InterfaceModifier.java @@ -3,8 +3,8 @@ */ package mycompiler.mymodifier; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; /** * @author Daniel diff --git a/src/mycompiler/mymodifier/Modifier.java b/src/mycompiler/mymodifier/Modifier.java index 614308245..1d72d4e72 100755 --- a/src/mycompiler/mymodifier/Modifier.java +++ b/src/mycompiler/mymodifier/Modifier.java @@ -1,8 +1,8 @@ // ino.module.Modifier.8587.package package mycompiler.mymodifier; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.end // ino.class.Modifier.24029.declaration diff --git a/src/mycompiler/mymodifier/Modifiers.java b/src/mycompiler/mymodifier/Modifiers.java index 7ae00aeb2..c51a0ccde 100755 --- a/src/mycompiler/mymodifier/Modifiers.java +++ b/src/mycompiler/mymodifier/Modifiers.java @@ -5,11 +5,11 @@ package mycompiler.mymodifier; // ino.module.Modifiers.8588.import import java.util.Vector; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.syntaxtree.type.BaseType; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.end -import mycompiler.mytype.BaseType; // ino.class.Modifiers.24035.description type=javadoc /** diff --git a/src/mycompiler/mymodifier/Private.java b/src/mycompiler/mymodifier/Private.java index d2ab98f59..4b36125ca 100755 --- a/src/mycompiler/mymodifier/Private.java +++ b/src/mycompiler/mymodifier/Private.java @@ -1,9 +1,8 @@ // ino.module.Private.8589.package package mycompiler.mymodifier; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -// ino.end +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.class.Private.24059.declaration diff --git a/src/mycompiler/mymodifier/Protected.java b/src/mycompiler/mymodifier/Protected.java index 9f05e62d3..c732b00ff 100755 --- a/src/mycompiler/mymodifier/Protected.java +++ b/src/mycompiler/mymodifier/Protected.java @@ -1,9 +1,8 @@ // ino.module.Protected.8590.package package mycompiler.mymodifier; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -// ino.end +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.class.Protected.24066.declaration diff --git a/src/mycompiler/mymodifier/Public.java b/src/mycompiler/mymodifier/Public.java index 79444d895..0236b80e2 100755 --- a/src/mycompiler/mymodifier/Public.java +++ b/src/mycompiler/mymodifier/Public.java @@ -1,9 +1,8 @@ // ino.module.Public.8591.package package mycompiler.mymodifier; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -// ino.end +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.class.Public.24073.declaration diff --git a/src/mycompiler/mymodifier/Static.java b/src/mycompiler/mymodifier/Static.java index 1e79cd7c6..c5de6ead0 100755 --- a/src/mycompiler/mymodifier/Static.java +++ b/src/mycompiler/mymodifier/Static.java @@ -1,9 +1,8 @@ // ino.module.Static.8592.package package mycompiler.mymodifier; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -// ino.end +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.class.Static.24080.declaration diff --git a/src/mycompiler/mymodifier/Super.java b/src/mycompiler/mymodifier/Super.java index e56085067..c12de8263 100755 --- a/src/mycompiler/mymodifier/Super.java +++ b/src/mycompiler/mymodifier/Super.java @@ -3,8 +3,8 @@ */ package mycompiler.mymodifier; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; /** * @author Daniel diff --git a/src/mycompiler/myoperator/AndOp.java b/src/mycompiler/myoperator/AndOp.java deleted file mode 100755 index 91926d7d1..000000000 --- a/src/mycompiler/myoperator/AndOp.java +++ /dev/null @@ -1,30 +0,0 @@ -// ino.module.AndOp.8595.package -package mycompiler.myoperator; - -import mycompiler.mystatement.Expr; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.Type; -import typinferenz.ConstraintsSet; -import typinferenz.SingleConstraint; -import typinferenz.assumptions.TypeAssumptions; -// ino.end - -// ino.class.AndOp.24101.declaration -public class AndOp extends LogOp -// ino.end -// ino.class.AndOp.24101.body -{ - - // ino.method.AndOp.24105.definition - public AndOp(int offset, int variableLength) - // ino.end - // ino.method.AndOp.24105.body - { - super(offset,variableLength); - } - // ino.end - - -} -// ino.end diff --git a/src/mycompiler/myparser/.cvsignore b/src/mycompiler/myparser/.cvsignore deleted file mode 100755 index 4f70a70af..000000000 --- a/src/mycompiler/myparser/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -JavaLexer.java -JavaParser.java - diff --git a/src/mycompiler/myparser/JavaLexer.lex b/src/mycompiler/myparser/JavaLexer.lex deleted file mode 100755 index cae5b2ce4..000000000 --- a/src/mycompiler/myparser/JavaLexer.lex +++ /dev/null @@ -1,173 +0,0 @@ -/******************************************** - * file: JavaLexer.lex * - * * - * enth�lt die JLex-Spezifikation f�r die * - * Generierung des lexical analyzers * - * * - ********************************************/ - -// user code: -package mycompiler.myparser; - -%% - -%char -%line - -%{ - Token token; -%} - -%public -%class JavaLexer -%type boolean -%eofval{ - return false; -%eofval} - -ws = [ \t\r\n\b\015]+ -%state commentblock -%state commentsingleline -%% - -abstract {this.token = new Token(JavaParser.ABSTRACT, yytext(), yyline, yychar);return true;} -boolean {this.token = new Token(JavaParser.BOOLEAN, yytext(), yyline, yychar);return true;} -break {this.token = new Token(JavaParser.BREAK, yytext(), yyline, yychar);return true;} -case {this.token = new Token(JavaParser.CASE, yytext(), yyline, yychar);return true;} -catch {this.token = new Token(JavaParser.CATCH, yytext(), yyline, yychar);return true;} -char {this.token = new Token(JavaParser.CHAR, yytext(), yyline, yychar);return true;} -class {this.token = new Token(JavaParser.CLASS, yytext(), yyline, yychar);return true;} -continue {this.token = new Token(JavaParser.CONTINUE, yytext(), yyline, yychar);return true;} -default {this.token = new Token(JavaParser.DEFAULT, yytext(), yyline, yychar);return true;} -do {this.token = new Token(JavaParser.DO, yytext(), yyline, yychar);return true;} -else {this.token = new Token(JavaParser.ELSE, yytext(), yyline, yychar);return true;} -extends {this.token = new Token(JavaParser.EXTENDS, yytext(), yyline, yychar);return true;} -final {this.token = new Token(JavaParser.FINAL, yytext(), yyline, yychar);return true;} -finally {this.token = new Token(JavaParser.FINALLY, yytext(), yyline, yychar);return true;} -for {this.token = new Token(JavaParser.FOR, yytext(), yyline, yychar);return true;} -if {this.token = new Token(JavaParser.IF, yytext(), yyline, yychar);return true;} -instanceof {this.token = new Token(JavaParser.INSTANCEOF, yytext(), yyline, yychar);return true;} -interface {this.token = new Token(JavaParser.INTERFACE, yytext(), yyline, yychar);return true;} -int {this.token = new Token(JavaParser.INT, yytext(), yyline, yychar);return true;} -implements {this.token = new Token(JavaParser.IMPLEMENTS, yytext(), yyline, yychar);return true;} -new {this.token = new Token(JavaParser.NEW, yytext(), yyline, yychar);return true;} -package {this.token = new Token(JavaParser.PACKAGE, yytext(), yyline, yychar);return true;} -import {this.token = new Token(JavaParser.IMPORT, yytext(), yyline, yychar);return true;} -private {this.token = new Token(JavaParser.PRIVATE, yytext(), yyline, yychar);return true;} -protected {this.token = new Token(JavaParser.PROTECTED, yytext(), yyline, yychar);return true;} -public {this.token = new Token(JavaParser.PUBLIC, yytext(), yyline, yychar);return true;} -return {this.token = new Token(JavaParser.RETURN, yytext(), yyline, yychar);return true;} -static {this.token = new Token(JavaParser.STATIC, yytext(), yyline, yychar);return true;} -super {this.token = new Token(JavaParser.SUPER, yytext(), yyline, yychar);return true;} -switch {this.token = new Token(JavaParser.SWITCH, yytext(), yyline, yychar);return true;} -this {this.token = new Token(JavaParser.THIS, yytext(), yyline,yychar);return true;} -throw {this.token = new Token(JavaParser.THROW, yytext(), yyline, yychar);return true;} -throws {this.token = new Token(JavaParser.THROWS, yytext(), yyline, yychar);return true;} -try {this.token = new Token(JavaParser.TRY, yytext(), yyline, yychar);return true;} -void {this.token = new Token(JavaParser.VOID, yytext(), yyline, yychar);return true;} -while {this.token = new Token(JavaParser.WHILE, yytext(), yyline, yychar);return true;} - -"//" {yybegin(commentsingleline);} -"/*" {yybegin(commentblock);} - "*/" {yybegin(YYINITIAL);} - [^\*]* {} - "*" {} - [\t\r\n\b\015]+ {yybegin(YYINITIAL);} - [^\\t\r\n\b\015]+ {} - -[1-9][0-9]*[L]? { - String lexem = yytext(); - if(lexem.endsWith("L")) - { - lexem = lexem.substring(0, lexem.length() - 1); - this.token = new Token(JavaParser.LONGLITERAL, lexem, yyline, yychar);return true; - } - else - { - this.token = new Token(JavaParser.INTLITERAL, lexem, yyline, yychar);return true; - } -} -0[xX][0-9a-fA-F]+[L]? { - String lexem = yytext(); - if(lexem.endsWith("L")) - { - lexem = lexem.substring(0, lexem.length() - 1); - this.token = new Token(JavaParser.LONGLITERAL, lexem, yyline, yychar);return true; - } - else - { - this.token = new Token(JavaParser.INTLITERAL, lexem, yyline, yychar);return true; - } -} -0[0-7]*[L]? { - String lexem = yytext(); - if(lexem.endsWith("L")) - { - lexem = lexem.substring(0, lexem.length() - 1); - this.token = new Token(JavaParser.LONGLITERAL, lexem, yyline, yychar);return true; - } - else - { - this.token = new Token(JavaParser.INTLITERAL, lexem, yyline, yychar);return true; - } -} -[1-9][0-9]*[.]?[0-9]*[f] { - this.token = new Token(JavaParser.FLOATLITERAL, yytext(), yyline, yychar);return true; -} - -[1-9][0-9]*[.][0-9]* { - this.token = new Token(JavaParser.DOUBLELITERAL, yytext(), yyline, yychar);return true; -} - -true|false { - this.token = new Token(JavaParser.BOOLLITERAL, yytext(), yyline, yychar);return true; -} -null { - this.token = new Token(JavaParser.JNULL, yytext(), yyline, yychar);return true; -} -\'[a-zA-Z0-9!@#$%\&*\(\),\<.\>/\?;:]\' { - this.token = new Token(JavaParser.CHARLITERAL, yytext(), yyline, yychar);return true; -} -\"[a-zA-Z0-9!@#$%^&*\(\),\<.\>/\?;:\ ]*\" { - this.token = new Token(JavaParser.STRINGLITERAL, yytext(), yyline, yychar);return true; -} -[a-zA-Z$_][a-zA-Z0-9$_]* { - this.token = new Token(JavaParser.IDENTIFIER, yytext(), yyline, yychar);return true; -} -[()\{\}\[\];,.] { - this.token = new Token(JavaParser.BRACE,yytext().charAt(0), yyline, yychar);return true; -} -[=>=" {this.token = new Token(JavaParser.GREATEREQUAL, yytext(), yyline, yychar);return true;} -"!=" {this.token = new Token(JavaParser.NOTEQUAL, yytext(), yyline, yychar);return true;} -"||" {this.token = new Token(JavaParser.LOGICALOR, yytext(), yyline, yychar);return true;} -"&&" {this.token = new Token(JavaParser.LOGICALAND, yytext(), yyline, yychar);return true;} -"++" {this.token = new Token(JavaParser.INCREMENT, yytext(), yyline, yychar);return true;} -"--" {this.token = new Token(JavaParser.DECREMENT, yytext(), yyline, yychar);return true;} - -[+\-*/&|^%] { - this.token = new Token(JavaParser.OP, yytext().charAt(0), yyline, yychar);return true; -} -//"<<" {this.token = new Token(JavaParser.SHIFTLEFT, yytext(), yyline, yychar);return true;} -//">>" {this.token = new Token(JavaParser.SHIFTRIGHT, yytext(), yyline, yychar);return true;} -//">>>" {this.token = new Token(JavaParser.UNSIGNEDSHIFTRIGHT, yytext(), yyline, yychar);return true;} -"+=" {this.token = new Token(JavaParser.PLUSEQUAL, yytext(), yyline, yychar);return true;} -"-=" {this.token = new Token(JavaParser.MINUSEQUAL, yytext(), yyline, yychar);return true;} -"*=" {this.token = new Token(JavaParser.TIMESEQUAL, yytext(), yyline, yychar);return true;} -"/=" {this.token = new Token(JavaParser.DIVIDEEQUAL, yytext(), yyline, yychar);return true;} -"&=" {this.token = new Token(JavaParser.ANDEQUAL, yytext(), yyline, yychar);return true;} -"|=" {this.token = new Token(JavaParser.OREQUAL, yytext(), yyline, yychar);return true;} -"^=" {this.token = new Token(JavaParser.XOREQUAL, yytext(), yyline, yychar);return true;} -"%=" {this.token = new Token(JavaParser.MODULOEQUAL, yytext(), yyline, yychar);return true;} -//"<<=" {this.token = new Token(JavaParser.SHIFTLEFTEQUAL, yytext(), yyline, yychar);return true;} -//">>=" {this.token = new Token(JavaParser.SIGNEDSHIFTRIGHTEQUAL, yytext(), yyline, yychar);return true;} -//">>>=" {this.token = new Token(JavaParser.UNSIGNEDSHIFTRIGHTEQUAL, yytext(), yyline, yychar);return true;} -{ws}|\n { /* System.out.print(yytext()); */ } -\\.\n {org.apache.log4j.Logger.getLogger("parser").debug("Kommentar: "+yytext());} -"->" {this.token = new Token(JavaParser.LAMBDAASSIGNMENT, yytext(), yyline, yychar);return true;} - - diff --git a/src/mycompiler/myparser/JavaParser.jay b/src/mycompiler/myparser/JavaParser.jay deleted file mode 100755 index 851e8e656..000000000 --- a/src/mycompiler/myparser/JavaParser.jay +++ /dev/null @@ -1,2473 +0,0 @@ -%{ - -/* -Backup von JavaParser.jay 10.April 17 Uhr -*/ - -package mycompiler.myparser; - -import mycompiler.myclass.FieldDeclaration; -import mycompiler.myclass.GenericDeclarationList; -import mycompiler.myclass.Field; -import java.util.Vector; -import mycompiler.SourceFile; -import mycompiler.AClassOrInterface; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassBody; -import mycompiler.myclass.Constructor; -import mycompiler.myclass.Constant; -import mycompiler.myclass.ImportDeclarations; -import mycompiler.myclass.DeclId; -import mycompiler.myclass.ExceptionList; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.Method; -import mycompiler.myclass.ParameterList; -import mycompiler.myclass.UsedId; -import mycompiler.myinterface.Interface; -import mycompiler.myinterface.InterfaceBody; -import mycompiler.mymodifier.Abstract; -import mycompiler.mymodifier.Final; -import mycompiler.mymodifier.Modifier; -import mycompiler.mymodifier.Modifiers; -import mycompiler.mymodifier.Private; -import mycompiler.mymodifier.Protected; -import mycompiler.mymodifier.Public; -import mycompiler.mymodifier.Static; -import mycompiler.myoperator.AndOp; -import mycompiler.myoperator.DivideOp; -import mycompiler.myoperator.EqualOp; -import mycompiler.myoperator.GreaterEquOp; -import mycompiler.myoperator.GreaterOp; -import mycompiler.myoperator.LessEquOp; -import mycompiler.myoperator.LessOp; -import mycompiler.myoperator.MinusOp; -import mycompiler.myoperator.ModuloOp; -import mycompiler.myoperator.NotEqualOp; -import mycompiler.myoperator.Operator; -import mycompiler.myoperator.OrOp; -import mycompiler.myoperator.PlusOp; -import mycompiler.myoperator.TimesOp; -import mycompiler.mystatement.ArgumentList; -import mycompiler.mystatement.Assign; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Block; -import mycompiler.mystatement.BoolLiteral; -import mycompiler.mystatement.FloatLiteral; -import mycompiler.mystatement.DoubleLiteral; -import mycompiler.mystatement.LongLiteral; -import mycompiler.mystatement.CastExpr; -import mycompiler.mystatement.CharLiteral; -import mycompiler.mystatement.EmptyStmt; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.ExprStmt; -import mycompiler.mystatement.IfStmt; -import mycompiler.mystatement.InstanceOf; -import mycompiler.mystatement.IntLiteral; -import mycompiler.mystatement.Literal; -import mycompiler.mystatement.InstVar; -import mycompiler.mystatement.LocalOrFieldVar; -import mycompiler.mystatement.LocalVarDecl; -import mycompiler.mystatement.MethodCall; -import mycompiler.mystatement.NegativeExpr; -import mycompiler.mystatement.NewClass; -import mycompiler.mystatement.NotExpr; -import mycompiler.mystatement.Null; -import mycompiler.mystatement.PositivExpr; -import mycompiler.mystatement.PostDecExpr; -import mycompiler.mystatement.PostIncExpr; -import mycompiler.mystatement.PreDecExpr; -import mycompiler.mystatement.PreIncExpr; -import mycompiler.mystatement.Receiver; -import mycompiler.mystatement.Return; -import mycompiler.mystatement.Statement; -import mycompiler.mystatement.StringLiteral; -import mycompiler.mystatement.This; -import mycompiler.mystatement.UnaryMinus; -import mycompiler.mystatement.UnaryNot; -import mycompiler.mystatement.UnaryPlus; -import mycompiler.mystatement.WhileStmt; -import mycompiler.mystatement.ForStmt; -import mycompiler.mystatement.LambdaExpression; -import mycompiler.mytype.BaseType; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.CharacterType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.ParaList; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; -import mycompiler.mytype.WildcardType; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Pair; - -public class JavaParser{ -public Vector path = new Vector(); - -//PL 05-07-30 eingefuegt. ANFANG -private Vector containedTypes = new Vector(); -private Vector usedIdsToCheck = new Vector(); - //Vektor aller Typdeklarationen die in aktueller Klasse vorkommen. - //wird nach Beendigung der Klasse des Attributs der jeweiligen - //Klasse zugeordnet - //nach dem Parsen wird mit wandleGeneric2RefType die - //die RefTypes gesetzt. -void initContainedTypes() { - this.containedTypes = new Vector(); -} -void initUsedIdsToCheck() { - this.usedIdsToCheck = new Vector(); -} -//PL 05-07-30 eingefuegt. ENDE - -//LUAR 07-05-29 Anfang für Wildcard Test -public Vector testPair = new Vector(); -//LUAR 07-05-29 Ende -%} - -%token ABSTRACT -%token BOOLEAN -%token BREAK -%token CASE -%token CATCH -%token CHAR -%token CLASS -%token CONTINUE -%token DEFAULT -%token DO -%token ELSE -%token EXTENDS -%token FINAL -%token FINALLY -%token FOR -%token IF -%token INSTANCEOF -%token INT -%token NEW -%token PRIVATE -%token PROTECTED -%token PUBLIC -%token PACKAGE -%token IMPORT -%token INTERFACE -%token IMPLEMENTS -%token RETURN -%token STATIC -%token SUPER -%token SWITCH -%token THIS -%token THROW -%token THROWS -%token TRY -%token VOID -%token WHILE -%token INTLITERAL -%token LONGLITERAL -%token DOUBLELITERAL -%token FLOATLITERAL -%token BOOLLITERAL -%token JNULL -%token CHARLITERAL -%token STRINGLITERAL -%token IDENTIFIER -%token EQUAL -%token LESSEQUAL -%token GREATEREQUAL -%token NOTEQUAL -%token LOGICALOR -%token LOGICALAND -%token INCREMENT -%token DECREMENT -%token SHIFTLEFT -%token SHIFTRIGHT -%token UNSIGNEDSHIFTRIGHT -%token SIGNEDSHIFTRIGHT -%token PLUSEQUAL -%token MINUSEQUAL -%token TIMESEQUAL -%token DIVIDEEQUAL -%token ANDEQUAL -%token OREQUAL -%token XOREQUAL -%token MODULOEQUAL -%token SHIFTLEFTEQUAL -%token SIGNEDSHIFTRIGHTEQUAL -%token UNSIGNEDSHIFTRIGHTEQUAL -%token BRACE -%token RELOP -%token OP -%token EOF -%token LAMBDAASSIGNMENT -%token ENDOFGENERICVARDECLARATION - -%type classdeclaration -%type interfacedeclaration -%type interfacebody -%type interfacememberdeclarations -%type interfacememberdeclaration -%type abstractmethoddeclaration -%type classbody -%type classidentifier -%type interfaceidentifier -%type constantdeclaration -%type genericdeclarationlist -%type fielddeclaration -%type methodheader -%type methoddeclaration -%type methoddeclarator -%type classbodydeclarations -%type classbodydeclaration -%type classmemberdeclaration -%type variabledeclarators -%type fielddeclarator; -%type variabledeclarator -%type variabledeclaratorid -%type simplename -%type typename -%type qualifiedname -%type importqualifiedname -%type importdeclaration -%type importdeclarations -%type name -%type super -%type classtype -%type classorinterfacetype -%type interfacetype -%type interfaces -%type extendsinterfaces -%type integraltype -%type numerictype -%type primitivetype -%type referencetype -%type classtypelist -%type type -%type modifiers -%type modifier -%type block -%type methodbody -%type blockstatements -%type lambdabody -%type localvariabledeclarationstatement -%type localvariabledeclaration -%type throws -%type formalparameter -%type formalparameterlist -%type lambdaexpressionparameter -%type literal -%type primarynonewarray -%type primary -%type postfixexpression -%type unaryexpressionnotplusminus -%type unaryexpression -%type multiplicativeexpression -%type additiveexpression -%type shiftexpression -%type relationalexpression -%type equalityexpression -%type andexpression -%type exclusiveorexpression -%type inclusiveorexpression -%type conditionalandexpression -%type conditionalorexpression -%type conditionalexpression -%type assignmentexpression -%type lambdaexpression /*added by Andreas Stadelmeier*/ -%type expression -%type statementexpression -%type preincrementexpression -%type predecrementexpression -%type postincrementexpression -%type postdecrementexpression -%type expressionstatement -%type variableinitializer -%type statementwithouttrailingsubstatement -%type blockstatement -%type statement -%type statementnoshortif -%type whilestatement -%type forstatement -%type whilestatementnoshortif -%type ifthenstatement -%type ifthenelsestatement -%type ifthenelsestatementnoshortif -%type emptystatement -%type returnstatement -%type classinstancecreationexpression -%type compilationunit -%type typedeclarations -%type boundedMethodParameter; -%type boundedClassParameter; -%type boundedclassidentifierlist //Vector -%type boundedMethodParameters; // Vector -%type boundedClassParameters; // ParaList -%type packagedeclaration -%type assignment -%type assignmentoperator -%type lambdaassignmentoperator /*added by Andreas Stadelmeier*/ -%type lefthandside -%type argumentlist -%type methodinvocation -%type typedeclaration -%type constructordeclaration -%type constructordeclarator -%type constructorbody -%type explicitconstructorinvocation -%type staticinitializer -%type castexpression -%type paralist -%type typelist parameter -%type wildcardparameter -%left ',' -%% - -compilationunit : typedeclarations - { - $$=$1; - } - |importdeclarations typedeclarations - { - $2.addImports($1); - $$=$2; - } - | packagedeclaration importdeclarations typedeclarations - { - // SCJU: Package - $3.setPackageName($1); - $3.addImports($2); - $$=$3; - } - | packagedeclaration typedeclarations - { - // SCJU: Package - $2.setPackageName($1); - $$=$2; - } - | type type compilationunit - { - this.testPair.add(new Pair($1,$2)); - $$=$3; - } - -packagedeclaration : PACKAGE name ';' ; - { - // SCJU: Package - $$ = $2; - } - -importdeclarations :importdeclaration - { - ImportDeclarations declarations=new ImportDeclarations(); - declarations.addElement($1); - $$=declarations; - } - |importdeclarations importdeclaration - { - $1.addElement($2); - $$=$1; - } - -importdeclaration : IMPORT importqualifiedname ';' - { - $$=$2; - } - -typedeclarations :typedeclaration - { - SourceFile Scfile = new SourceFile(); - Scfile.addElement($1); - $$=Scfile; - } - |typedeclarations typedeclaration - { - $1.addElement($2); - $$=$1; - } - -name :qualifiedname - { - $$=$1; - } - |simplename - { - $$=$1; - } - -typedeclaration :classdeclaration - { - $$=$1; - } - | interfacedeclaration - { - // SCJU: Interface - $$=$1; - } - - -qualifiedname : name '.' IDENTIFIER - { - $1.set_Name($3.getLexem()); - $1.setOffset($1.getOffset()); - $$=$1; - } - -importqualifiedname : name '.' IDENTIFIER - { - $1.set_Name($3.getLexem()); - $1.setOffset($1.getOffset()); - $$=$1; - } - | name '.' '*' - { - $1.set_Name("*"); - $1.setOffset($1.getOffset()); - $$=$1; - } - - -simplename : IDENTIFIER - { - UsedId UI = new UsedId($1.getOffset()); - UI.set_Name( $1.getLexem() ); - UI.setOffset($1.getOffset());//hinzugef�gt hoth: 07.04.2006 - $$ = UI; - } - -classdeclaration : CLASS classidentifier classbody - { - // SCJU: Um das hier uebersichtlicher zu halten, - // gibt es einen allumfassenden Konstruktor fuer Class - // Parameter: - // String name, - // Modifiers mod, - // ClassBody classbody, - // Vector containedtypes, - // UsedId superclass, - // Vector SuperInterfaces, - // Vector Parameterliste - - $$ = new Class($2.getName(), null, $3, containedTypes, usedIdsToCheck, null, null, $2.getParaVector(), $1.getOffset()); - this.initContainedTypes(); - this.initUsedIdsToCheck(); - } - | modifiers CLASS classidentifier classbody - { - $$ = new Class($3.getName(), $1, $4, containedTypes,usedIdsToCheck, null, null, $3.getParaVector(), $2.getOffset()); - this.initContainedTypes(); - this.initUsedIdsToCheck(); - } - | CLASS classidentifier super classbody - { - $$ = new Class($2.getName(), null, $4, containedTypes,usedIdsToCheck, $3, null, $2.getParaVector(), $1.getOffset()); - this.initContainedTypes(); - this.initUsedIdsToCheck(); - } - | modifiers CLASS classidentifier super classbody - { - $$ = new Class($3.getName(), $1, $5, containedTypes, usedIdsToCheck, $4, null, $3.getParaVector(), $2.getOffset()); - this.initContainedTypes(); - this.initUsedIdsToCheck(); - } - ///* auskommentiert von Andreas Stadelmeier A10023 - | CLASS classidentifier interfaces classbody - { - $$ = new Class($2.getName(), null, $4, containedTypes, usedIdsToCheck, null, $3.getVector(), $2.getParaVector(), $1.getOffset()); - this.initContainedTypes(); - this.initUsedIdsToCheck(); - } - | modifiers CLASS classidentifier interfaces classbody - { - $$ = new Class($3.getName(), $1, $5, containedTypes, usedIdsToCheck, null, $4.getVector(), $3.getParaVector(), $2.getOffset()); - this.initContainedTypes(); - this.initUsedIdsToCheck(); - } - | CLASS classidentifier super interfaces classbody - { - $$ = new Class($2.getName(), null, $5, containedTypes,usedIdsToCheck, $3, $4.getVector(), $2.getParaVector(), $1.getOffset()); - this.initContainedTypes(); - this.initUsedIdsToCheck(); - } - | modifiers CLASS classidentifier super interfaces classbody - { - $$ = new Class($3.getName(), $1, $6, containedTypes, usedIdsToCheck, $4, $5.getVector(), $3.getParaVector(), $2.getOffset()); - this.initContainedTypes(); - this.initUsedIdsToCheck(); - } - //*/ -interfaceidentifier : IDENTIFIER - { - // HOTI - // Verbindet den Namen eines Interfaces mit einer optionalen Parameterliste - $$ = new InterfaceAndParameter($1.getLexem()); - } - | IDENTIFIER '<' boundedClassParameters '>' - { - $$ = new InterfaceAndParameter($1.getLexem(), $3); - } - -classidentifier : IDENTIFIER - { - // SCJU: Hilfskonstrukt, um die Grammatik ueberschaubar zu halten - // Verbindet den Namen einer Klasse mit einer optionalen Parameterliste - $$ = new ClassAndParameter($1.getLexem()); - } - | IDENTIFIER '<' boundedClassParameters '>' - { - $$ = new ClassAndParameter($1.getLexem(), $3); - } - -interfacedeclaration: INTERFACE interfaceidentifier interfacebody - { - // SCJU: Interface - Interface ic = new Interface($2.getName(), $1.getOffset()); - ic.setParaList($2.getParaVector()); - ic.setInterfaceBody($3); - ic.setContainedTypes(containedTypes); - initContainedTypes(); - $$ = ic; - } - | modifiers INTERFACE interfaceidentifier interfacebody - { - Interface ic = new Interface($3.getName(), $1, $2.getOffset()); - ic.setInterfaceBody($4); - ic.setParaList($3.getParaVector()); - ic.setContainedTypes(containedTypes); - initContainedTypes(); - $$ = ic; - } - | INTERFACE interfaceidentifier extendsinterfaces interfacebody - { - Interface ic = new Interface($2.getName(), $1.getOffset()); - ic.setParaList($2.getParaVector()); - ic.setSuperInterfaces($3.getVector()); - ic.setInterfaceBody($4); - ic.setContainedTypes(containedTypes); - initContainedTypes(); - $$ = ic; - } - | modifiers INTERFACE interfaceidentifier extendsinterfaces interfacebody ; - { - Interface ic = new Interface($3.getName(), $1, $2.getOffset()); - ic.setParaList($3.getParaVector()); - ic.setSuperInterfaces($4.getVector()); - ic.setInterfaceBody($5); - ic.setContainedTypes(containedTypes); - initContainedTypes(); - $$ = ic; - } - -paralist : IDENTIFIER - { - ParaList pl = new ParaList(); - /* #JB# 05.04.2005 */ - /* ########################################################### */ - pl.getParalist().addElement(new GenericTypeVar($1.getLexem(), $1.getOffset())); - //pl.getParalist().addElement( new TypePlaceholder($1.getLexem()) ); - /* ########################################################### */ - org.apache.log4j.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + $1.getLexem() + " TV"); - $$ = pl; - } - | IDENTIFIER '<' paralist '>' - { - ParaList pl = new ParaList(); - RefType t = new RefType( $1.getLexem(),$1.getOffset() ); - t.set_ParaList( $3.get_ParaList() ); - pl.getParalist().addElement(t); - org.apache.log4j.Logger.getLogger("parser").debug( "IDENTIFIER '<' paralist '>' --> Paralist f�r " + $1.getLexem() + ": RefType"); - $$ = pl; - } - | wildcardparameter - { - ParaList pl = new ParaList(); - pl.getParalist().addElement($1); - $$ = pl; - } - | paralist ',' IDENTIFIER - { - - /* #JB# 05.04.2005 */ - /* ########################################################### */ - $1.getParalist().addElement(new GenericTypeVar($3.getLexem(),$3.getOffset())); - //$1.getParalist().addElement(new TypePlaceholder($3.getLexem())); - /* ########################################################### */ - org.apache.log4j.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER --> Paralist f�r " + $3.getLexem() + ": TV"); - org.apache.log4j.Logger.getLogger("parser").debug( "paralist: " + $1.getParalist()); - $$=$1; - } - - | paralist ',' IDENTIFIER '<' paralist '>' - { - RefType t = new RefType( $3.getLexem() ,$3.getOffset() ); - t.set_ParaList( $5.get_ParaList() ); - $1.getParalist().addElement(t); - org.apache.log4j.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER '<' paralist '>' --> Paralist f�r " + $3.getLexem() + ": RefType"); - $$=$1; - } - | paralist ',' wildcardparameter - { - $1.getParalist().addElement($3); - $$=$1; - } - -wildcardparameter : '?' - { - //Luar 29.11.06 Offset auf -1, da keine Angabe vorhanden - WildcardType wc = new WildcardType(-1); - $$ = wc; - } - | '?' EXTENDS referencetype - { - ExtendsWildcardType ewc = new ExtendsWildcardType($2.getOffset(),$3); - $$ = ewc; - } - | '?' SUPER referencetype - { - SuperWildcardType swc = new SuperWildcardType($2.getOffset(),$3); - $$ = swc; - } - -classbody : '{' '}' - { - ClassBody CB = new ClassBody(); - $$ = CB; - } - - | '{' classbodydeclarations '}' - { - $$ = $2; - } - -modifiers :modifier - { - Modifiers Mod = new Modifiers(); - Mod.addModifier($1); - $$ = Mod; - } - |modifiers modifier - { - $1.addModifier($2); - $$ = $1; - } - -super :EXTENDS classtype - { - $$ = $2; - } - -interfaces : IMPLEMENTS interfacetype - { - // SCJU: Interface - InterfaceList il = new InterfaceList(); - il.addInterface($2); - $$ = il; - } - | interfaces ',' interfacetype ; - { - $1.addInterface($3); - $$ = $1; - } - -interfacebody : '{' '}' - { - // SCJU: Interface - $$ = new InterfaceBody(); - } - | '{' interfacememberdeclarations '}' - { - $$ = $2; - } - - - -extendsinterfaces : EXTENDS interfacetype - { - // SCJU: Interface - InterfaceList il = new InterfaceList(); - il.addInterface($2); - $$ = il; - } - | extendsinterfaces ',' interfacetype ; - { - $1.addInterface($3); - $$ = $1; - } - - -classbodydeclarations : classbodydeclaration - { - ClassBody CB = new ClassBody(); - CB.addField( $1 ); - $$=CB; - } - | classbodydeclarations classbodydeclaration - { - $1.addField($2); - $$ = $1; - } - - -modifier : PUBLIC - { - Public Pub = new Public(); - $$=Pub; - } - | PROTECTED - { - Protected Pro = new Protected(); - $$=Pro; - } - | PRIVATE - { - Private Pri = new Private(); - $$=Pri; - } - | STATIC - { - Static Sta = new Static(); - $$=Sta; - } - | ABSTRACT - { - Abstract Abs = new Abstract(); - $$=Abs; - } - | FINAL - { Final fin = new Final(); - $$ = fin; - } - - -classtype : classorinterfacetype - { - //PL 05-07-30 eingefuegt containedTypes ANFANG - RefType RT = new RefType(-1); - //RT.set_UsedId($1); - //RT.setName(RT.get_UsedId().get_Name_1Element()); - RT.set_ParaList($1.get_RealParaList()); - RT.setName($1.get_Name_1Element()); - containedTypes.addElement(RT); - //PL 05-07-30 eingefuegt containedTypes ENDE - - $$ = $1; - } - - -interfacememberdeclarations : interfacememberdeclaration - { - // SCJU: Interface - InterfaceBody ib = new InterfaceBody(); - ib.addElement($1); - $$ = ib; - } - | interfacememberdeclarations interfacememberdeclaration ; - { - $1.addElement($2); - $$ = $1; - } - -interfacetype : classorinterfacetype ; - { - // SCJU: Interfaces - $$ = $1; - } - -classbodydeclaration : classmemberdeclaration - { - $$=$1; - } - ///* auskommentiert von Andreas Stadelmeier a10023 - | staticinitializer - { - $$=$1; - } - | constructordeclaration - { - $$=$1; - } - //*/ - -classorinterfacetype : name parameter - { - if ($2 != null) { - //$1.set_ParaList($2.get_ParaList()); - $1.set_ParaList($2);//Änderung von Andreas Stadelmeier. Type statt GenericVarType - /* otth: originale (also diese) Parameterliste retten */ - //((UsedId)$1).vParaOrg = new Vector( $2.get_ParaList() ); - } - $$=$1; - } - -typelist : type - { - Vector tl = new Vector(); - tl.add($1); - $$ = tl; - } - | typelist ',' type - { - $1.add($3); - $$=$1; - } - | typelist ',' wildcardparameter - { - $1.add($3); - $$=$1; - } - | wildcardparameter - { - Vector tl = new Vector(); - tl.add($1); - $$ = tl; - } - -/* PL 05-07-28 erg�nzt, weil jeder classorinterfacetype auch parametrisiert sein kann */ -//TODO: Das hier ist möglicherweise falsch. Ein Typ hat keine parameterliste, nur eine Liste von RefTypes -parameter : { $$ = null; } - | '<' typelist '>' //'<'paralist'>'//typelist statt - { - $$ = $2; - } - -interfacememberdeclaration : constantdeclaration - { - // SCJU: Interfaces, Spezialform Konstantendef. - $$ = $1; - } - | abstractmethoddeclaration - { - $$ = $1; - } - -classmemberdeclaration : fielddeclaration - { - $$=$1; - } - | methoddeclaration - { - $$=$1; - } - -staticinitializer : STATIC block - { - Method STAT = new Method($1.getOffset()); - DeclId DST = new DeclId(); - DST.set_Name($1.getLexem()); - STAT.set_DeclId(DST); - Static ST = new Static(); - Modifiers MOD = new Modifiers(); - MOD.addModifier(ST); - STAT.set_Modifiers(MOD); - STAT.set_Block($2); - $$=STAT; - } - -constructordeclaration : constructordeclarator constructorbody - { - $1.set_Block($2); - $$ = $1; - } - | modifiers constructordeclarator constructorbody - { - $2.set_Block($3); - $2.set_Modifiers($1); - $$ = $2; - } - -constantdeclaration : modifiers type IDENTIFIER '=' expression';' ; - { - // SCJU: Interface - Constant c = new Constant($3.getLexem(), $1); - c.setType($2); - c.setValue($5); - $$ = c; - } - -abstractmethoddeclaration : methodheader ';' ; - { - // SCJU: Interface - $$ = $1; - } - -/* -added by Andreas Stadelmeier, a10023 -Bei Lokalen Variablen ist eine initialisierung der Variablen während der Deklarisierung nicht erlaubt. -Beispiel: var = 2; -Bei einer lokalen Variable lässt sich hier nicht ermitteln ob die Variable deklariert werden soll oder bereits deklariert wurde und ihr nur ein Wert zugewiesen werden soll. -Dieses Problem ist bei Feldern nicht der Fall. -*/ -fielddeclarator : - /* - type variabledeclarator '=' expression - { - FieldDeclaration ret = new FieldDeclaration($2.getOffset()); - ret.setType($1); - ret.set_DeclId($2); - ret.setWert($4); - $$=ret; - } - | - */ - variabledeclarator '=' expression - { - FieldDeclaration ret = new FieldDeclaration($1.getOffset()); - ret.set_DeclId($1); - ret.setWert($3); - $$=ret; - } - | variabledeclarator - { - FieldDeclaration ret = new FieldDeclaration($1.getOffset()); - ret.set_DeclId($1); - $$=ret; - } - -genericdeclarationlist : '<' boundedMethodParameters '>' - { - GenericDeclarationList ret = new GenericDeclarationList($2.getElements(),$2.getEndOffset()); - $$ = ret; - } - - -fielddeclaration : fielddeclarator ';' - { - $$=$1; - } - | type fielddeclarator ';' - { - $2.setType($1); - $$=$2; - } - | genericdeclarationlist type fielddeclarator ';' - {//angefügt von Andreas Stadelmeier - $3.setType($2); - $3.setGenericParameter($1); - $$=$3; - } - | - variabledeclarators ';' - { - $$=$1; - } - | - type variabledeclarators ';' - { - org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + $1); - $2.setType($1); - $$ = $2; - } - - | modifiers type variabledeclarators ';' - { - $3.setType($2); - for(int i=0;i<($3.getDeclIdVector().size());i++) - { - $3.getDeclIdVector().elementAt(i).modifiers=$1; - } - $$ = $3; - } - -methoddeclaration : methodheader methodbody - { - $1.set_Block($2); - $$=$1; - } - -block : '{' '}' - - { - Block Bl = new Block(); - $$=Bl; - } - - | '{' blockstatements '}' - { - $$=$2; - } - -constructordeclarator : simplename '(' ')' - { - Constructor CON = new Constructor(null); //TODO: Der Parser kann sowieso nicht zwischen einem Konstruktor und einer Methode unterscheiden. Das hier kann wegfallen... - DeclId DIDCon = new DeclId(); - DIDCon.set_Name($1.get_Name_1Element()); - CON.set_DeclId(DIDCon); - $$=CON; - } - | simplename '('formalparameterlist')' - { - Constructor CONpara = new Constructor(null); - DeclId DIconpara = new DeclId(); - DIconpara.set_Name($1.get_Name_1Element()); - CONpara.set_DeclId(DIconpara); - CONpara.setParameterList($3); - $$=CONpara; - } - -constructorbody : '{' '}' - { - Block CBL = new Block(); - $$=CBL; - } - | '{' explicitconstructorinvocation '}' - { - Block CBLexpl = new Block(); - CBLexpl.set_Statement($2); - $$=CBLexpl; - } - | '{' blockstatements '}' - { - $$=$2; - } - | '{'explicitconstructorinvocation blockstatements '}' - { - Block CBes = new Block(); - CBes.set_Statement($2); - for(int j=0;j<$3.statements.size();j++) - { - CBes.set_Statement((Statement)$3.statements.elementAt(j)); - } - $$=CBes; - } - -throws : THROWS classtypelist - { - ExceptionList EL = new ExceptionList(); - EL.set_addElem($2); - $$=EL; - } - -boundedClassParameter : boundedMethodParameter - { - $$ = $1; - } - -boundedClassParameters : boundedClassParameter - { - ParaList p = new ParaList(); - p.add_ParaList($1); - $$=p; - } - | boundedClassParameters ',' boundedClassParameter - { - $1.add_ParaList($3); - $$=$1; - } - -// returns GenericTypeVar -boundedMethodParameter : IDENTIFIER - { - $$=new GenericTypeVar($1.getLexem(),$1.getOffset()); - } - | IDENTIFIER EXTENDS boundedclassidentifierlist - { - BoundedGenericTypeVar gtv=new BoundedGenericTypeVar($1.getLexem(), $3, $1.getOffset() ,$3.getEndOffset()); - //gtv.setBounds($3); - $$=gtv; - } -// returns Vector -boundedclassidentifierlist : referencetype - { - Vector vec=new Vector(); - vec.addElement($1); - containedTypes.addElement($1); - $$=new BoundedClassIdentifierList(vec, $1.getOffset()+$1.getName().length()); - } - | boundedclassidentifierlist '&' referencetype - { - $1.addElement($3); - $1.addOffsetOff($3); - containedTypes.addElement($3); - $$=$1; - } -// returns Vector -boundedMethodParameters : boundedMethodParameter - { - GenericVarDeclarationList vec=new GenericVarDeclarationList(); - vec.addElement($1); - $$=vec; - } - | boundedMethodParameters ',' boundedMethodParameter - { - $1.addElement($3); - $$=$1; - } - - -// returns Method -methodheader :genericdeclarationlist type methoddeclarator - { - $3.setType($2); - $3.setGenericParameter($1); - $$=$3; - } - | type methoddeclarator - { - $2.setType($1); - $$=$2; - } - | modifiers type methoddeclarator - { - $3.set_Modifiers($1); - $3.setType($2); - $$=$3; - } - | modifiers genericdeclarationlist type methoddeclarator - { - $4.set_Modifiers($1); - $4.setGenericParameter($2); - $4.setType($3); - $$=$4; - } - | type methoddeclarator throws - { - $2.setType($1); - $2.set_ExceptionList($3); - $$=$2; - } - | genericdeclarationlist type methoddeclarator throws - { - $3.setGenericParameter($1); - $3.setType($2); - $3.set_ExceptionList($4); - $$=$3; - } - | modifiers type methoddeclarator throws - { - $3.set_Modifiers($1); - $3.setType($2); - $3.set_ExceptionList($4); - $$=$3; - } - | modifiers genericdeclarationlist type methoddeclarator throws - { - $4.set_Modifiers($1); - $4.setGenericParameter($2); - $4.setType($3); - $4.set_ExceptionList($5); - $$=$4; - } - | VOID methoddeclarator - { - Void Voit = new Void($1.getOffset()); - $2.setType(Voit); - $$=$2; - } - | modifiers VOID methoddeclarator - { - Void voit = new Void($2.getOffset()); - $3.set_Modifiers($1); - $3.setType(voit); - $$=$3; - } - | VOID methoddeclarator throws - { - Void voyt = new Void($1.getOffset()); - $2.setType(voyt); - $2.set_ExceptionList($3); - $$=$2; - } - | modifiers VOID methoddeclarator throws - { - Void voyd = new Void($2.getOffset()); - $3.set_Modifiers($1); - $3.setType(voyd); - $3.set_ExceptionList($4); - $$=$3; - } - | genericdeclarationlist VOID methoddeclarator - { - Void Voit = new Void($2.getOffset()); - $3.setType(Voit); - $3.setGenericParameter($1); - $$=$3; - } - | modifiers genericdeclarationlist VOID methoddeclarator - { - Void voit = new Void($3.getOffset()); - $4.set_Modifiers($1); - $4.setType(voit); - $4.setGenericParameter($2); - $$=$4; - } - | genericdeclarationlist VOID methoddeclarator throws - { - Void voyt = new Void($2.getOffset()); - $3.setType(voyt); - $3.set_ExceptionList($4); - $3.setGenericParameter($1); - $$=$3; - } - | modifiers genericdeclarationlist VOID methoddeclarator throws - { - Void voyd = new Void($3.getOffset()); - $4.set_Modifiers($1); - $4.setType(voyd); - $4.set_ExceptionList($5); - $4.setGenericParameter($2); - $$=$4; - } - - | methoddeclarator - { - //auskommentiert von Andreas Stadelmeier (a10023) $1.setType(TypePlaceholder.fresh()); - $$=$1; - } - | genericdeclarationlist methoddeclarator - { - //auskommentiert von Andreas Stadelmeier (a10023) $4.setType(TypePlaceholder.fresh()); - $2.setGenericParameter($1); - $$=$2; - } - - | modifiers methoddeclarator - { - $2.set_Modifiers($1); - //auskommentiert von Andreas Stadelmeier (a10023) $2.setType(TypePlaceholder.fresh()); - $$=$2; - } - | methoddeclarator throws - { - //auskommentiert von Andreas Stadelmeier (a10023) $1.setType(TypePlaceholder.fresh()); - $1.set_ExceptionList($2); - $$=$1; - } - | modifiers methoddeclarator throws - { - $2.set_Modifiers($1); - //auskommentiert von Andreas Stadelmeier (a10023) $2.setType(TypePlaceholder.fresh()); - $2.set_ExceptionList($3); - $$=$2; - } - - -type : primitivetype - { - $$=$1; - } - |primitivetype '[' ']' - { - $1.setArray(true); - } - |referencetype - { - $$=$1; - } - |referencetype '[' ']' - { - $1.setArray(true); - } -variabledeclarators : variabledeclarator - { - FieldDeclaration IVD = new FieldDeclaration($1.getOffset()); - IVD.getDeclIdVector().addElement( $1 ); - IVD.setOffset($1.getOffset()); - $$ = IVD; - } - | variabledeclarators ',' variabledeclarator - { - $1.getDeclIdVector().addElement($3); - $$=$1; - } - -methodbody : block - { - $$=$1; - } - -blockstatements : blockstatement - { - Block Blstat = new Block(); - Blstat.set_Statement($1); - $$=Blstat; - } - - | blockstatements blockstatement - { - $1.set_Statement($2); - $$=$1; - } - -formalparameterlist :formalparameter - { - ParameterList PL = new ParameterList(); - PL.set_AddParameter($1); - $$ = PL; - } - |formalparameterlist ',' formalparameter - { - $1.set_AddParameter($3); - $$ = $1; - } - -explicitconstructorinvocation : THIS '(' ')' ';' - { - This THCON = new This($1.getOffset(),$1.getLexem().length()); - $$=THCON; - } - |THIS '(' argumentlist ')' ';' - { - This THCONargl = new This($1.getOffset(),$1.getLexem().length()); - THCONargl.set_ArgumentList($3); - $$=THCONargl; - } - // |SUPER '(' ')' ';' - // |SUPER '(' argumentlist ')' ';' - -classtypelist : classtype - { - RefType RT = new RefType(-1); - RT.set_UsedId($1); - RT.setName(RT.get_UsedId().get_Name_1Element()); - $$=RT; - } - | classtypelist ',' classtype - { - $1.set_UsedId($3); - $1.setName($1.get_UsedId().get_Name_1Element()); - $$=$1; - } - -methoddeclarator :IDENTIFIER '(' ')' - { - Method met = new Method($1.getOffset()); - /* #JB# 10.04.2005 */ - /* ########################################################### */ - met.setLineNumber($1.getLineNumber()); - met.setOffset($1.getOffset());//hinzugef�gt hoth: 07.04.2006 - /* ########################################################### */ - DeclId DImethod = new DeclId(); - DImethod.set_Name($1.getLexem()); - met.set_DeclId(DImethod); - $$ = met; - } - |IDENTIFIER '(' formalparameterlist ')' - { - Method met_para = new Method($1.getOffset()); - /* #JB# 10.04.2005 */ - /* ########################################################### */ - met_para.setLineNumber($1.getLineNumber()); - met_para.setOffset($1.getOffset());//hinzugef�gt hoth: 07.04.2006 - /* ########################################################### */ - DeclId Dimet_para = new DeclId(); - Dimet_para.set_Name($1.getLexem()); - met_para.set_DeclId(Dimet_para); - met_para.setParameterList($3); - $$ = met_para; - } - -primitivetype :BOOLEAN - { - BooleanType BT = new BooleanType(); - /* #JB# 05.04.2005 */ - /* ########################################################### */ - //BT.setName($1.getLexem()); - /* ########################################################### */ - $$=BT; - } - |numerictype - { - $$=$1; - } - -referencelongtype : typename parameter - { - if ($2 != null) { - //$1.set_ParaList($2.get_ParaList()); - $1.set_ParaList($2);//Änderung von Andreas Stadelmeier. Type statt GenericVarType - /* otth: originale (also diese) Parameterliste retten */ - //((UsedId)$1).vParaOrg = new Vector( $2.get_ParaList() ); - } - UsedId uid = $1; - RefType RT = new RefType(uid.getOffset()); - - RT.set_ParaList(uid.get_RealParaList()); - RT.setName(uid.getQualifiedName()); - - - //PL 05-07-30 eingefuegt containedTypes ANFANG - containedTypes.addElement(RT); - //PL 05-07-30 eingefuegt containedTypes ENDE - - $$=RT; - } - -referencetype :classorinterfacetype - { - org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->referenctype: " + $1); - RefType RT = new RefType($1.getOffset()); - - //ausgetauscht PL 05-07-30 - //RT.set_UsedId($1); - //RT.setName(RT.get_UsedId().get_Name_1Element()); - RT.set_ParaList($1.get_RealParaList()); - RT.setName($1.getQualifiedName()); - - - //PL 05-07-30 eingefuegt containedTypes ANFANG - containedTypes.addElement(RT); - //PL 05-07-30 eingefuegt containedTypes ENDE - - $$=RT; - } - - -/* 05-07-28 PL Parameterdeklarationen zur classorinterfacetype verschoben */ - -variabledeclarator : variabledeclaratorid - { - $$=$1; - } - /* auskommentiert von Andreas Stadelmeier, a10023: - eine Variable mit Initialisierung wird sowieso nicht geparst. - | variabledeclaratorid '=' variableinitializer - { - $1.set_Wert($3); - $$=$1; - } - */ -/* 05-07-28 PL auskommentiert - wird nicht ben�tigt aufgrund neuer classorinterfacetype declaration - | '<' paralist'>' variabledeclaratorid '=' variableinitializer - { - $4.set_Wert($6); - $4.set_Paratyp($2.get_ParaList()); - $$=$4; - } -*/ -blockstatement :localvariabledeclarationstatement - { - $$=$1; - } - |statement - { - $$=$1; - } - -formalparameter : type variabledeclaratorid - { - FormalParameter FP = new FormalParameter($2); - FP.setType($1); - //FP.set_DeclId($2); //auskommentiert von Andreas Stadelmeier. DeclId wird nun dem Konstruktor von FormalParameter übergeben. - $$=FP; - } - - /* otth: Methodenargumente koennen hiermit auch polymorph sein. */ -/* 05-07-28 PL auskommentiert - wird nicht ben�tigt aufgrund neuer classorinterfacetype declaration - | type '<'paralist'>' variabledeclaratorid - { - Parameterliste setzen - $5.set_Paratyp($3.get_ParaList()); - - FormalParameter FP = new FormalParameter($5); - FP.setType($1); - //FP.set_DeclId($5); - $$=FP; - - org.apache.log4j.Logger.getLogger("parser").debug("P->Polymorphes Methodenargument hinzugefuegt: Name = " + $5.get_Name() + " Typ = " + $1.getName()); - } -*/ - - | variabledeclaratorid - { - org.apache.log4j.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + $1.name); - - FormalParameter FP = new FormalParameter($1); - - // #JB# 31.03.2005 - // ########################################################### - //Type T = TypePlaceholder.fresh(); //auskommentiert von Andreas Stadelmeier - // Type T = new TypePlaceholder(""); /* otth: Name wird automatisch berechnet */ - // ########################################################### - //org.apache.log4j.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName()); - - //auskommentiert von Andreas Stadelmeier (a10023) FP.setType( T ); - //FP.set_DeclId($1); - - $$=FP; - } - -argumentlist : expression - { - ArgumentList AL = new ArgumentList(); - AL.expr.addElement($1); - $$=AL; - } - |argumentlist ',' expression - { - $1.expr.addElement($3); - $$=$1; - } - -numerictype :integraltype - { - $$=$1; - } - -variabledeclaratorid : IDENTIFIER - { - DeclId DI = new DeclId(); - /* #JB# 10.04.2005 */ - /* ########################################################### */ - DI.setLineNumber($1.getLineNumber()); - DI.setOffset($1.getOffset());//hinzugef�gt hoth: 07.04.2006 - /* ########################################################### */ - DI.set_Name($1.getLexem()); - $$=DI; - } - -variableinitializer :expression - { - $$=$1; - } - -localvariabledeclarationstatement :localvariabledeclaration ';' - { - $$=$1; - } - -statement :statementwithouttrailingsubstatement - { - $$=$1; - } - |ifthenstatement - { - $$=$1; - } - |ifthenelsestatement - { - $$=$1; - } - |whilestatement - { - $$=$1; - } - |forstatement - { - $$=$1; - } - -expression :assignmentexpression - { - $$=$1; - } - |classinstancecreationexpression - { - $$=$1; - } - -integraltype :INT - { - IntegerType IT = new IntegerType(); - /* #JB# 05.04.2005 */ - /* ########################################################### */ - //IT.setName($1.getLexem()); - /* ########################################################### */ - $$=IT; - } - | CHAR - { - CharacterType CT = new CharacterType(); - /* #JB# 05.04.2005 */ - /* ########################################################### */ - //CT.setName($1.getLexem()); - /* ########################################################### */ - $$=CT; - } - -localvariabledeclaration : type variabledeclarators - { - org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); - LocalVarDecl LVD = new LocalVarDecl($1.getOffset(),$1.getVariableLength()); - LVD.setType($1); - LVD.setDeclidVector($2.getDeclIdVector()); - $$ = LVD; - } - - /* #JB# 31.03.2005 */ - /* ########################################################### */ - |variabledeclarators - { - org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); - LocalVarDecl LVD = new LocalVarDecl($1.getOffset(),$1.getVariableLength()); - //auskommentiert von Andreas Stadelmeier (a10023) LVD.setType(TypePlaceholder.fresh()); - LVD.setDeclidVector($1.getDeclIdVector()); - $$ = LVD; - } - /* ########################################################### */ - -statementwithouttrailingsubstatement : block - { - $$=$1; - } - | emptystatement - { - $$=$1; - } - | expressionstatement - { - $$=$1; - } - | returnstatement - { - $$=$1; - } - -ifthenstatement : IF '(' expression ')' statement - { - IfStmt Ifst = new IfStmt($3.getOffset(),$3.getVariableLength()); - Ifst.set_Expr($3); - Ifst.set_Then_block($5); - $$=Ifst; - } - -ifthenelsestatement : IF '('expression ')'statementnoshortif ELSE statement - { - IfStmt IfstElst = new IfStmt($3.getOffset(),$3.getVariableLength()); - IfstElst.set_Expr($3); - IfstElst.set_Then_block($5); - IfstElst.set_Else_block($7); - $$=IfstElst; - } - -whilestatement : WHILE '(' expression ')' statement - { - WhileStmt Whlst = new WhileStmt($3.getOffset(),$3.getVariableLength()); - Whlst.set_Expr($3); - Whlst.set_Loop_block($5); - $$=Whlst; - } - -//forschleife -forstatement - //Bsp: for(i=0 ; i<10 ; i++){System.out.println(i)} - : FOR '(' expression ';' expression ';' expression ')' statement - { - ForStmt Fst = new ForStmt($3.getOffset(),$3.getVariableLength()); - Fst.set_head_Initializer($3); - Fst.set_head_Condition($5); - Fst.set_head_Loop_expr($7); - Fst.set_body_Loop_block($9); - - //Typannahme - $$ = Fst; - } - //Bsp: for(i=0 ; i<10 ; ){System.out.println(i)} - | FOR '(' expression ';' expression ';' ')' statement - { - ForStmt Fst = new ForStmt($3.getOffset(),$3.getVariableLength()); - Fst.set_head_Initializer($3); - Fst.set_head_Condition($5); - Fst.set_body_Loop_block($8); - - //Typannahme - $$ = Fst; - } - //Bsp: for(i=0 ; ; i++){System.out.println(i)} - | FOR '(' expression ';' ';' expression ')' statement - { - ForStmt Fst = new ForStmt($3.getOffset(),$3.getVariableLength()); - Fst.set_head_Initializer($3); - Fst.set_head_Loop_expr($6); - Fst.set_body_Loop_block($8); - - //Typannahme - $$ = Fst; - } - //Bsp: for( ; i<10 ; i++){System.out.println(i)} - | FOR '(' ';' expression ';' expression ')' statement - { - ForStmt Fst = new ForStmt($4.getOffset(),$4.getVariableLength()); - Fst.set_head_Condition($4); - Fst.set_head_Loop_expr($6); - Fst.set_body_Loop_block($8); - - //Typannahme - $$ = Fst; - } - //Bsp: for(i=0 ; ; ){System.out.println(i)} - | FOR '(' expression ';' ';' ')' statement - { - ForStmt Fst = new ForStmt($3.getOffset(),$3.getVariableLength()); - Fst.set_head_Initializer($3); - Fst.set_body_Loop_block($7); - - //Typannahme - $$ = Fst; - } - //Bsp: for( ; i<10 ; ){System.out.println(i)} - | FOR '(' ';' expression ';' ')' statement - { - ForStmt Fst = new ForStmt($4.getOffset(),$4.getVariableLength()); - Fst.set_head_Condition($4); - Fst.set_body_Loop_block($7); - - //Typannahme - $$ = Fst; - } - //Bsp: for( ; ; i++){System.out.println(i)} - | FOR '(' ';' ';' expression ')' statement - { - ForStmt Fst = new ForStmt($5.getOffset(),$5.getVariableLength()); - Fst.set_head_Loop_expr($5); - Fst.set_body_Loop_block($7); - - //Typannahme - $$ = Fst; - } - //Bsp: for( ; ; ){System.out.println(i)} - | FOR '(' ';' ';' ')' statement - { - ForStmt Fst = new ForStmt($6.getOffset(),$6.getVariableLength()); - Fst.set_body_Loop_block($6); - - //Typannahme - $$ = Fst; - } - -assignmentexpression : conditionalexpression - { - org.apache.log4j.Logger.getLogger("parser").debug("conditionalexpression"); - $$=$1; - } - | assignment - { - $$=$1; - } - - -emptystatement : ';' - { - EmptyStmt Empst = new EmptyStmt(); - $$=Empst; - } - -expressionstatement : statementexpression ';' - { - $$=$1; - } - -returnstatement : RETURN ';' - { - Return ret = new Return(-1,-1); - $$= ret; - } - | RETURN expression ';' - { - Return retexp = new Return($2.getOffset(),$2.getVariableLength()); - retexp.set_ReturnExpr($2); - $$=retexp; - } - -statementnoshortif :statementwithouttrailingsubstatement - { - $$=$1; - } - | ifthenelsestatementnoshortif - { - $$=$1; - } - | whilestatementnoshortif - { - $$=$1; - } - -conditionalexpression :conditionalorexpression - { - $$=$1; - } - // | conditionalorexpression '?' expression ':' conditionalexpression - -assignment :lefthandside assignmentoperator assignmentexpression - { - org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n"); - Assign Ass = new Assign($1.getOffset(),$1.getVariableLength()); - LocalOrFieldVar LOFV = new LocalOrFieldVar($1.getOffset(),$1.getVariableLength()); - LOFV.set_UsedId($1); - //auskommentiert von Andreas Stadelmeier (a10023) LOFV.setType(TypePlaceholder.fresh()); - //auskommentiert von Andreas Stadelmeier (a10023) Ass.setType(TypePlaceholder.fresh()); - if( $2 == null ) - { - org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> " + $3 + " \n"); - Ass.set_Expr( LOFV,$3 ); - } - else - { - Binary Bin = new Binary($3.getOffset(),$3.getVariableLength()); - Bin.set_Expr1(LOFV); - Bin.set_Operator($2); - Bin.set_Expr2($3); - org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> Binary\n"); - //auskommentiert von Andreas Stadelmeier (a10023) Bin.setType(TypePlaceholder.fresh()); - Ass.set_Expr( LOFV, Bin ); - } - $$=Ass; - } - | lefthandside assignmentoperator classinstancecreationexpression - { - Assign Ass =new Assign($1.getOffset(),$1.getVariableLength()); - LocalOrFieldVar LOFV = new LocalOrFieldVar($1.getOffset(),$1.getVariableLength()); - LOFV.set_UsedId($1); - //auskommentiert von Andreas Stadelmeier (a10023) LOFV.setType(TypePlaceholder.fresh()); - //auskommentiert von Andreas Stadelmeier (a10023) Ass.setType(TypePlaceholder.fresh()); - if($2==null) - { - Ass.set_Expr(LOFV,$3); - } - else - { - Binary Bin = new Binary($3.getOffset(),$3.getVariableLength()); - Bin.set_Expr1(LOFV); - Bin.set_Operator($2); - //auskommentiert von Andreas Stadelmeier (a10023) Bin.setType(TypePlaceholder.fresh()); - Bin.set_Expr2($3); - Ass.set_Expr(LOFV,Bin); - } - $$=Ass; - } - -statementexpression :assignment - { - $$=$1; - } - | preincrementexpression - { - $$=$1; - } - | predecrementexpression - { - $$=$1; - } - | postincrementexpression - { - $$=$1; - } - | postdecrementexpression - { - $$=$1; - } - | methodinvocation - { - $$=$1; - } -/* | classinstancecreationexpression - { - $$=$1; - } -*/ - -ifthenelsestatementnoshortif :IF '(' expression ')' statementnoshortif - ELSE statementnoshortif - { - IfStmt IfElno = new IfStmt($3.getOffset(),$3.getVariableLength()); - IfElno.set_Expr($3); - IfElno.set_Then_block($5); - IfElno.set_Else_block($7); - $$=IfElno; - } - -whilestatementnoshortif :WHILE '(' expression ')' statementnoshortif - { - WhileStmt Whstno = new WhileStmt($3.getOffset(),$3.getVariableLength()); - Whstno.set_Expr($3); - Whstno.set_Loop_block($5); - $$=Whstno; - } - -conditionalorexpression : conditionalandexpression - { - $$=$1; - } - | conditionalorexpression LOGICALOR conditionalandexpression - { - Binary LogOr = new Binary($1.getOffset(),$1.getVariableLength()); - OrOp OrO = new OrOp($1.getOffset(),$1.getVariableLength()); - LogOr.set_Expr1($1); - LogOr.set_Expr2($3); - LogOr.set_Operator(OrO); - //auskommentiert von Andreas Stadelmeier (a10023) LogOr.setType(TypePlaceholder.fresh()); - $$=LogOr; - } - -// LambdaExpression eingefügt von Andreas Stadelmeier, a10023: - -lambdaassignmentoperator : LAMBDAASSIGNMENT - { - $$=null; - } - -lambdabody : block - { - $$=$1; - } - | expression - { - //Lambdabody kann auch nur aus einer Expression bestehen. In diesem Fall wird ein Block erstellt, welcher als einziges Statement ein return statment mit der expression hat. - //Bsp.: Aus der Expression |var=="hallo"| wird: |{return var=="hallo";}| - Block ret=new Block(); - ret.statements.add((Statement)new Return(0,0).set_ReturnExpr($1)); - //ret.statements.add((ExprStmt)$1); - $$=ret; - } - -lambdaexpressionparameter : '(' ')' - { - $$=null; - } - | '(' formalparameterlist ')' - { - $$=$2; - } - -lambdaexpression : lambdaexpressionparameter lambdaassignmentoperator lambdabody - { - LambdaExpression lambda = new LambdaExpression(/*((ParameSterList)$2).getOffset(),((ParameterList)$2).getVariableLength()*/0,0); - if($1!=null)lambda.setParameterList($1); - lambda.setBody((Block)$3); - $$=lambda; - } - - /* - | '(' ')' lambdaassignmentoperator lambdabody - { - LambdaExpression lambda = new LambdaExpression(0,0); //hier noch fixen - lambda.setBody((Block)$4); - $$=lambda; - } - */ - - - -lefthandside :name - { - $$=$1; - } - -assignmentoperator : '=' - { - $$=null; - } - | TIMESEQUAL - { - TimesOp TEO = new TimesOp(-1,-1); - $$=TEO; - } - | DIVIDEEQUAL - { - DivideOp DEO = new DivideOp(-1,-1); - $$=DEO; - } - | MODULOEQUAL - { - ModuloOp MEO = new ModuloOp(-1,-1); - $$=MEO; - } - | PLUSEQUAL - { - PlusOp PEO = new PlusOp(-1,-1); - $$=PEO; - } - | MINUSEQUAL - { - MinusOp MEO = new MinusOp(-1,-1); - $$=MEO; - } - // | SHIFTLEFTEQUAL - // | SIGNEDSHIFTRIGHTEQUAL - // | UNSIGNEDSHIFTRIGHTEQUAL - // | ANDEQUAL - // | XOREQUAL - // | OREQUAL - -preincrementexpression :INCREMENT unaryexpression - { - PreIncExpr PRINC = new PreIncExpr($2.getOffset(),$2.getVariableLength()); - PRINC.set_Expr($2); - $$=PRINC; - } - -predecrementexpression :DECREMENT unaryexpression - { - PreDecExpr PRDEC = new PreDecExpr($2.getOffset(),$2.getVariableLength()); - PRDEC.set_Expr($2); - $$=PRDEC; - } - -postincrementexpression :postfixexpression INCREMENT - { - PostIncExpr PIE = new PostIncExpr($1.getOffset(),$1.getVariableLength()); - PIE.set_Expr($1); - $$=PIE; - } - -postdecrementexpression :postfixexpression DECREMENT - { - PostDecExpr PDE = new PostDecExpr($1.getOffset(),$1.getVariableLength()); - PDE.set_Expr($1); - $$=PDE; - } - -methodinvocation: - name '(' ')' - { - org.apache.log4j.Logger.getLogger("parser").debug("M1"); - MethodCall MC = new MethodCall($1.getOffset(),$1.getVariableLength()); - UsedId udidmeth = new UsedId($1.getOffset()); - udidmeth.set_Name((String)(($1.get_Name()).elementAt($1.get_Name().size()-1))); - MC.set_UsedId(udidmeth); - Receiver rec = null; - if ($1.get_Name().size() > 2) { - - $1.removeLast(); - - //macht aus der Liste von Strings - //in usedid.name einen InstVar - InstVar INSTVA = new InstVar($1,$1.getOffset(),$1.getVariableLength()); - - //auskommentiert von Andreas Stadelmeier (a10023) INSTVA.setType(TypePlaceholder.fresh()); - rec = new Receiver(INSTVA); - } - else if ($1.get_Name().size() == 2) { - LocalOrFieldVar LOFV = new LocalOrFieldVar($1.getOffset(),$1.getVariableLength()); - $1.removeLast(); - LOFV.set_UsedId($1); - //auskommentiert von Andreas Stadelmeier (a10023) LOFV.setType(TypePlaceholder.fresh()); - rec = new Receiver(LOFV); - } - MC.set_Receiver(rec); - //auskommentiert von Andreas Stadelmeier (a10023) MC.setType(TypePlaceholder.fresh()); - $$=MC; - } - | name '('argumentlist')' - { - org.apache.log4j.Logger.getLogger("parser").debug("M2"); - MethodCall MCarg = new MethodCall($1.getOffset(),$1.getVariableLength()); - UsedId udidmeth = new UsedId($1.getOffset()); - udidmeth.set_Name((String)(($1.get_Name()).elementAt($1.get_Name().size()-1))); - MCarg.set_UsedId(udidmeth); - Receiver rec = null; - if ($1.get_Name().size() > 2) { - - $1.removeLast(); - - //macht aus der Liste von Strings - //in usedid.name einen InstVar - InstVar INSTVA = new InstVar($1,$1.getOffset(),$1.getVariableLength()); - - //auskommentiert von Andreas Stadelmeier (a10023) INSTVA.setType(TypePlaceholder.fresh()); - rec = new Receiver(INSTVA); - } - else if ($1.get_Name().size() == 2) { - LocalOrFieldVar LOFV = new LocalOrFieldVar($1.getOffset(),$1.getVariableLength()); - $1.removeLast(); - LOFV.set_UsedId($1); - //auskommentiert von Andreas Stadelmeier (a10023) LOFV.setType(TypePlaceholder.fresh()); - rec = new Receiver(LOFV); - } - MCarg.set_Receiver(rec); - MCarg.set_ArgumentList($3); - //auskommentiert von Andreas Stadelmeier (a10023) MCarg.setType(TypePlaceholder.fresh()); - $$=MCarg; - } - | primary '.' IDENTIFIER '(' ')' - { - org.apache.log4j.Logger.getLogger("parser").debug("M3"); - MethodCall MCpr = new MethodCall($1.getOffset(),$1.getVariableLength()); - - // PL 05-08-21 primary ist kein UsedId - //$1.usedid.set_Name($3.getLexem()); - //MCpr.set_UsedId($1.get_UsedId()); - UsedId udidmeth = new UsedId($1.getOffset()); - udidmeth.set_Name($3.getLexem()); - MCpr.set_UsedId(udidmeth); - - /* #JB# 04.06.2005 */ - /* ########################################################### */ - MCpr.set_Receiver(new Receiver($1)); - /* ########################################################### */ - //auskommentiert von Andreas Stadelmeier (a10023) MCpr.setType(TypePlaceholder.fresh()); - $$=MCpr; - } - | primary '.' IDENTIFIER '('argumentlist ')' - { - org.apache.log4j.Logger.getLogger("parser").debug("M4"); - MethodCall MCPA = new MethodCall($1.getOffset(),$1.getVariableLength()); - - // PL 05-08-21 primary ist kein UsedId - //$1.usedid.set_Name($3.getLexem()); - //MCPA.set_UsedId($1.get_UsedId()); - UsedId udidmeth = new UsedId($3.getOffset()); - udidmeth.set_Name($3.getLexem()); - MCPA.set_UsedId(udidmeth); - - /* #JB# 04.06.2005 */ - /* ########################################################### */ - MCPA.set_Receiver(new Receiver($1)); - /* ########################################################### */ - MCPA.set_ArgumentList($5); - //auskommentiert von Andreas Stadelmeier (a10023) MCPA.setType(TypePlaceholder.fresh()); - $$=MCPA; - } - // | SUPER '.' IDENTIFIER '(' ')' - // | SUPER '.' IDENTIFIER '('argumentlist')' - -classinstancecreationexpression : NEW classtype '(' ')' - { - NewClass NC = new NewClass($2.getOffset(),$2.getVariableLength()); - NC.set_UsedId($2); - usedIdsToCheck.addElement($2); - //auskommentiert von Andreas Stadelmeier (a10023) NC.setType(TypePlaceholder.fresh()); - $$=NC; - } - | NEW classtype '(' argumentlist ')' - { - NewClass NCarg = new NewClass($2.getOffset(),$2.getVariableLength()); - NCarg.set_UsedId($2); - usedIdsToCheck.addElement($2); - NCarg.set_ArgumentList($4); - //auskommentiert von Andreas Stadelmeier (a10023) NCarg.setType(TypePlaceholder.fresh()); - $$=NCarg; - } - -conditionalandexpression : inclusiveorexpression - { - $$=$1; - } - | conditionalandexpression LOGICALAND inclusiveorexpression - { - Binary And = new Binary($1.getOffset(),$1.getVariableLength()); - AndOp AndO = new AndOp($1.getOffset(),$1.getVariableLength()); - And.set_Expr1($1); - And.set_Expr2($3); - And.set_Operator(AndO); - //auskommentiert von Andreas Stadelmeier (a10023) And.setType(TypePlaceholder.fresh()); - $$=And; - } - -/* -fieldaccess :primary '.' IDENTIFIER - | SUPER '.' IDENTIFIER -*/ - -unaryexpression : preincrementexpression - { - $$=$1; - } - | predecrementexpression - { - $$=$1; - } - | '+' unaryexpression - { - PositivExpr POSEX=new PositivExpr($2.getOffset(),$2.getVariableLength()); - UnaryPlus UP= new UnaryPlus(); - POSEX.set_UnaryPlus(UP); - POSEX.set_Expr($2); - $$=POSEX; - } - | '-' unaryexpression - { - NegativeExpr NEGEX=new NegativeExpr($2.getOffset(),$2.getVariableLength()); - UnaryMinus UM=new UnaryMinus(); - NEGEX.set_UnaryMinus(UM); - NEGEX.set_Expr($2); - $$=NEGEX; - } - | unaryexpressionnotplusminus - { - $$=$1; - } - -postfixexpression :primary - { - $$=$1; - } - | name - { - if ($1.get_Name().size() > 1) { - - //macht aus der Liste von Strings - //in usedid.name einen InstVar - InstVar INSTVA = new InstVar($1,$1.getOffset(),$1.getVariableLength()); - - //auskommentiert von Andreas Stadelmeier (a10023) INSTVA.setType(TypePlaceholder.fresh()); - $$ = INSTVA; - } - else { - LocalOrFieldVar Postincexpr = new LocalOrFieldVar($1.getOffset(),$1.getVariableLength()); - Postincexpr.set_UsedId($1); - //auskommentiert von Andreas Stadelmeier (a10023) Postincexpr.setType(TypePlaceholder.fresh()); - $$=Postincexpr; - } - } - | postincrementexpression - { - $$=$1; - } - | postdecrementexpression - { - $$=$1; - } - -primary : primarynonewarray - { - $$=$1; - } - -inclusiveorexpression : exclusiveorexpression - { - $$=$1; - } - | inclusiveorexpression '|' exclusiveorexpression - -primarynonewarray : literal - { - $$=$1; - } - | THIS - { - This T = new This($1.getOffset(),$1.getLexem().length()); - UsedId UT = new UsedId($1.getOffset()); - UT.set_Name($1.getLexem()); - T.set_UsedId(UT); - $$=T; - } -/* auskommentiert von Andreas Stadelmeier - | '('expression')' - { - $$=$2; - } - */ -/* - | classinstancecreationexpression - { - $$=$1; - } - | fieldaccess -*/ - | methodinvocation - { - $$=$1; - } - |lambdaexpression - { - $$=$1; - } - - -unaryexpressionnotplusminus : postfixexpression {$$=$1;} - // | '~' unaryexpression - | '!' unaryexpression {NotExpr NE=new NotExpr($2.getOffset(),$2.getVariableLength()); - UnaryNot UN=new UnaryNot(); - NE.set_UnaryNot(UN); - NE.set_Expr($2); - $$=NE; - } - | castexpression {$$=$1;} - -exclusiveorexpression :andexpression {$$=$1;} - | exclusiveorexpression '^' andexpression //{ - // - //} - -literal : INTLITERAL {IntLiteral IL = new IntLiteral(); - IL.set_Int($1.String2Int()); - $$ = IL; - } - - | BOOLLITERAL {BoolLiteral BL = new BoolLiteral(); - BL.set_Bool($1.String2Bool()); - $$ = BL; - } - | CHARLITERAL {CharLiteral CL = new CharLiteral(); - CL.set_Char($1.CharInString()); - $$=CL; - } - | STRINGLITERAL - { - StringLiteral ST = new StringLiteral(); - ST.set_String($1.get_String()); - $$=ST; - } - | LONGLITERAL { LongLiteral LL = new LongLiteral(); - LL.set_Long($1.String2Long()); - $$ = LL; - } - | FLOATLITERAL { - FloatLiteral FL = new FloatLiteral(); - FL.set_Float($1.String2Float()); - $$ = FL; - } - | DOUBLELITERAL { - DoubleLiteral DL = new DoubleLiteral(); - DL.set_Double($1.String2Double()); - $$ = DL; - } - | JNULL; - { - Null NN = new Null(); - $$=NN; - } - -castexpression : '(' primitivetype ')' unaryexpression - { - CastExpr CaEx=new CastExpr($4.getOffset(),$4.getVariableLength()); - CaEx.set_Type($2); - CaEx.set_Expr($4); - $$=CaEx; - } - //| '(' expression ')' unaryexpressionnotplusminus - -andexpression :equalityexpression - { - $$=$1; - } - | andexpression '&' equalityexpression - { - } - -equalityexpression : relationalexpression - { - $$=$1; - } - | equalityexpression EQUAL relationalexpression - { - Binary EQ = new Binary($1.getOffset(),$1.getVariableLength()); - EqualOp EO = new EqualOp($1.getOffset(),$1.getVariableLength()); - EQ.set_Expr1($1); - EQ.set_Expr2($3); - EQ.set_Operator(EO); - //auskommentiert von Andreas Stadelmeier (a10023) EQ.setType(TypePlaceholder.fresh()); - $$=EQ; - } - | equalityexpression NOTEQUAL relationalexpression - { - Binary NEQ = new Binary($1.getOffset(),$1.getVariableLength()); - NotEqualOp NEO = new NotEqualOp($1.getOffset(),$1.getVariableLength()); - NEQ.set_Expr1($1); - NEQ.set_Expr2($3); - NEQ.set_Operator(NEO); - //auskommentiert von Andreas Stadelmeier (a10023) NEQ.setType(TypePlaceholder.fresh()); - $$=NEQ; - } - -relationalexpression : shiftexpression - { - $$=$1; - } - | relationalexpression '<' shiftexpression - { - Binary LO = new Binary($1.getOffset(),$1.getVariableLength()); - LessOp LOO = new LessOp($1.getOffset(),$1.getVariableLength()); - LO.set_Expr1($1); - LO.set_Expr2($3); - LO.set_Operator(LOO); - //auskommentiert von Andreas Stadelmeier (a10023) LO.setType(TypePlaceholder.fresh()); - $$=LO; - } - | relationalexpression '>' shiftexpression - { - Binary GO = new Binary($1.getOffset(),$1.getVariableLength()); - GreaterOp GOO = new GreaterOp($1.getOffset(),$1.getVariableLength()); - GO.set_Expr1($1); - GO.set_Expr2($3); - GO.set_Operator( GOO ); - //auskommentiert von Andreas Stadelmeier (a10023) GO.setType(TypePlaceholder.fresh()); - $$=GO; - } - | relationalexpression LESSEQUAL shiftexpression - { - Binary LE = new Binary($1.getOffset(),$1.getVariableLength()); - LessEquOp LEO = new LessEquOp($1.getOffset(),$1.getVariableLength()); - LE.set_Expr1($1); - LE.set_Expr2($3); - LE.set_Operator(LEO); - //auskommentiert von Andreas Stadelmeier (a10023) LE.setType(TypePlaceholder.fresh()); - $$=LE; - } - | relationalexpression GREATEREQUAL shiftexpression - { - Binary GE = new Binary($1.getOffset(),$1.getVariableLength()); - GreaterEquOp GEO = new GreaterEquOp($1.getOffset(),$1.getVariableLength()); - GE.set_Expr1($1); - GE.set_Expr2($3); - GE.set_Operator(GEO); - //auskommentiert von Andreas Stadelmeier (a10023) GE.setType(TypePlaceholder.fresh()); - $$=GE; - } - | relationalexpression INSTANCEOF referencetype - { - InstanceOf ISO=new InstanceOf($1.getOffset(),$1.getVariableLength()); - ISO.set_Expr($1); - ISO.set_Type($3); - $$=ISO; - } - -shiftexpression : additiveexpression - { - $$=$1; - } - -additiveexpression :multiplicativeexpression - { - $$=$1; - } - | additiveexpression '+' multiplicativeexpression - { - Binary AD = new Binary($1.getOffset(),$1.getVariableLength()); - PlusOp PO = new PlusOp($1.getOffset(),$1.getVariableLength()); - AD.set_Expr1($1); - AD.set_Expr2($3); - AD.set_Operator(PO); - //auskommentiert von Andreas Stadelmeier (a10023) AD.setType(TypePlaceholder.fresh()); - $$=AD; - } - | additiveexpression '-' multiplicativeexpression - { - Binary MI = new Binary($1.getOffset(),$1.getVariableLength()); - MinusOp MO = new MinusOp($1.getOffset(),$1.getVariableLength()); - MI.set_Expr1($1); - MI.set_Expr2($3); - MI.set_Operator(MO); - //auskommentiert von Andreas Stadelmeier (a10023) MI.setType(TypePlaceholder.fresh()); - $$=MI; - } - -multiplicativeexpression : unaryexpression - { - $$=$1; - } - | multiplicativeexpression '*' unaryexpression - { - Binary ML = new Binary($1.getOffset(),$1.getVariableLength()); - TimesOp TO = new TimesOp($1.getOffset(),$1.getVariableLength()); - ML.set_Expr1($1); - ML.set_Expr2($3); - ML.set_Operator(TO); - //auskommentiert von Andreas Stadelmeier (a10023) ML.setType(TypePlaceholder.fresh()); - $$=ML; - } - | multiplicativeexpression '/' unaryexpression - { - Binary DV = new Binary($1.getOffset(),$1.getVariableLength()); - DivideOp DO = new DivideOp($1.getOffset(),$1.getVariableLength()); - DV.set_Expr1($1); - DV.set_Expr2($3); - DV.set_Operator(DO); - //auskommentiert von Andreas Stadelmeier (a10023) DV.setType(TypePlaceholder.fresh()); - $$ = DV; - } - | multiplicativeexpression '%' unaryexpression - { - Binary MD = new Binary($1.getOffset(),$1.getVariableLength()); - ModuloOp MO = new ModuloOp($1.getOffset(),$1.getVariableLength()); - MD.set_Expr1($1); - MD.set_Expr2($3); - MD.set_Operator(MO); - //auskommentiert von Andreas Stadelmeier (a10023) MD.setType(TypePlaceholder.fresh()); - $$ =MD; - } - - -%% \ No newline at end of file diff --git a/src/mycompiler/myparser/JavaParser_old.jay b/src/mycompiler/myparser/JavaParser_old.jay deleted file mode 100755 index 4c5a00e4e..000000000 --- a/src/mycompiler/myparser/JavaParser_old.jay +++ /dev/null @@ -1,1567 +0,0 @@ -%{ -package mycompiler.myparser; - -import java.util.Vector; - -import mycompiler.DeclId; -import mycompiler.ExceptionList; -import mycompiler.MyCompiler; -import mycompiler.ParaList; -import mycompiler.SourceFile; -import mycompiler.UsedId; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassBody; -import mycompiler.myclass.ClassDeclId; -import mycompiler.myclass.Constructor; -import mycompiler.myclass.FieldDecl; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.InstVarDecl; -import mycompiler.myclass.Method; -import mycompiler.myclass.ParameterList; -import mycompiler.mymodifier.Abstract; -import mycompiler.mymodifier.Modifier; -import mycompiler.mymodifier.Modifiers; -import mycompiler.mymodifier.Private; -import mycompiler.mymodifier.Protected; -import mycompiler.mymodifier.Public; -import mycompiler.mymodifier.Static; -import mycompiler.myoperator.AndOp; -import mycompiler.myoperator.DivideOp; -import mycompiler.myoperator.EqualOp; -import mycompiler.myoperator.GreaterEquOp; -import mycompiler.myoperator.GreaterOp; -import mycompiler.myoperator.LessEquOp; -import mycompiler.myoperator.LessOp; -import mycompiler.myoperator.MinusOp; -import mycompiler.myoperator.ModuloOp; -import mycompiler.myoperator.NotEqualOp; -import mycompiler.myoperator.Operator; -import mycompiler.myoperator.OrOp; -import mycompiler.myoperator.PlusOp; -import mycompiler.myoperator.TimesOp; -import mycompiler.mystatement.ArgumentList; -import mycompiler.mystatement.Assign; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Block; -import mycompiler.mystatement.BoolLiteral; -import mycompiler.mystatement.CastExpr; -import mycompiler.mystatement.CharLiteral; -import mycompiler.mystatement.EmptyStmt; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.ExprStmt; -import mycompiler.mystatement.IfStmt; -import mycompiler.mystatement.InstanceOf; -import mycompiler.mystatement.IntLiteral; -import mycompiler.mystatement.Literal; -import mycompiler.mystatement.LocalOrFieldVar; -import mycompiler.mystatement.LocalVarDecl; -import mycompiler.mystatement.MethodCall; -import mycompiler.mystatement.NegativeExpr; -import mycompiler.mystatement.NewClass; -import mycompiler.mystatement.NotExpr; -import mycompiler.mystatement.Null; -import mycompiler.mystatement.PositivExpr; -import mycompiler.mystatement.PostDecExpr; -import mycompiler.mystatement.PostIncExpr; -import mycompiler.mystatement.PreDecExpr; -import mycompiler.mystatement.PreIncExpr; -import mycompiler.mystatement.Return; -import mycompiler.mystatement.Statement; -import mycompiler.mystatement.StringLiteral; -import mycompiler.mystatement.This; -import mycompiler.mystatement.UnaryMinus; -import mycompiler.mystatement.UnaryNot; -import mycompiler.mystatement.UnaryPlus; -import mycompiler.mystatement.WhileStmt; -import mycompiler.mytype.BaseType; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.CharacterType; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TyploseVariable; - -public class JavaParser{ -public Vector path = new Vector(); -%} - -%token ABSTRACT -%token BOOLEAN -%token BREAK -%token CASE -%token CATCH -%token CHAR -%token CLASS -%token CONTINUE -%token DEFAULT -%token DO -%token ELSE -%token EXTENDS -%token FINALLY -%token FOR -%token IF -%token INSTANCEOF -%token INT -%token NEW -%token PRIVATE -%token PROTECTED -%token PUBLIC -%token RETURN -%token STATIC -%token SUPER -%token SWITCH -%token THIS -%token THROW -%token THROWS -%token TRY -%token VOID -%token WHILE -%token INTLITERAL -%token BOOLLITERAL -%token JNULL -%token CHARLITERAL -%token STRINGLITERAL -%token IDENTIFIER -%token EQUAL -%token LESSEQUAL -%token GREATEREQUAL -%token NOTEQUAL -%token LOGICALOR -%token LOGICALAND -%token INCREMENT -%token DECREMENT -%token SHIFTLEFT -%token SHIFTRIGHT -%token UNSIGNEDSHIFTRIGHT -%token SIGNEDSHIFTRIGHT -%token PLUSEQUAL -%token MINUSEQUAL -%token TIMESEQUAL -%token DIVIDEEQUAL -%token ANDEQUAL -%token OREQUAL -%token XOREQUAL -%token MODULOEQUAL -%token SHIFTLEFTEQUAL -%token SIGNEDSHIFTRIGHTEQUAL -%token UNSIGNEDSHIFTRIGHTEQUAL -%token BRACE -%token RELOP -%token OP -%token EOF - -%type classdeclaration -%type classbody -%type fielddeclaration -%type methodheader -%type methoddeclaration -%type methoddeclarator -%type classbodydeclarations -%type classbodydeclaration -%type classmemberdeclaration -%type variabledeclarators -%type variabledeclarator -%type variabledeclaratorid -%type simplename -%type qualifiedname -%type name -%type super -%type classtype -%type classorinterfacetype -%type integraltype -%type numerictype -%type primitivetype -%type referencetype -%type classtypelist -%type type -%type modifiers -%type modifier -%type block -%type methodbody -%type blockstatements -%type localvariabledeclarationstatement -%type localvariabledeclaration -%type throws -%type formalparameter -%type formalparameterlist -%type literal -%type primarynonewarray -%type primary -%type postfixexpression -%type unaryexpressionnotplusminus -%type unaryexpression -%type multiplicativeexpression -%type additiveexpression -%type shiftexpression -%type relationalexpression -%type equalityexpression -%type andexpression -%type exclusiveorexpression -%type inclusiveorexpression -%type conditionalandexpression -%type conditionalorexpression -%type conditionalexpression -%type assignmentexpression -%type expression -%type statementexpression -%type preincrementexpression -%type predecrementexpression -%type postincrementexpression -%type postdecrementexpression -%type expressionstatement -%type variableinitializer -%type statementwithouttrailingsubstatement -%type blockstatement -%type statement -%type statementnoshortif -%type whilestatement -%type whilestatementnoshortif -%type ifthenstatement -%type ifthenelsestatement -%type ifthenelsestatementnoshortif -%type emptystatement -%type returnstatement -%type classinstancecreationexpression -%type compilationunit -%type typedeclarations -%type assignment -%type assignmentoperator -%type lefthandside -%type argumentlist -%type methodinvocation -%type typedeclaration -%type constructordeclaration -%type constructordeclarator -%type constructorbody -%type explicitconstructorinvocation -%type staticinitializer -%type castexpression -%type paralist -%left ',' -%% - -compilationunit :typedeclarations - { - $$=$1; - } - -typedeclarations :typedeclaration - { - SourceFile Scfile = new SourceFile(); - Scfile.set_Class($1); - $$=Scfile; - } - |typedeclarations typedeclaration - { - $1.set_Class($2); - $$=$1; - } - -name :qualifiedname - { - $$=$1; - } - |simplename - { - $$=$1; - } - -typedeclaration :classdeclaration - { - $$=$1; - } - -qualifiedname : name '.' IDENTIFIER - { - $1.set_Name($3.getLexem()); - $$=$1; - } - -simplename : IDENTIFIER - { - UsedId UI = new UsedId(); - UI.set_Name( $1.getLexem() ); - $$ = UI; - } - -classdeclaration : CLASS IDENTIFIER classbody - { - MyCompiler.Debug("P->Neue Klasse: " + $2.getLexem(), 3); - Class C = new Class(); - ClassDeclId CDI = new ClassDeclId(); - CDI.set_classname( $2.getLexem() ); - C.set_ClassDeclId( CDI ); - C.set_ClassBody($3); - $$ = C; - } - - | modifiers CLASS IDENTIFIER classbody - { - Class Cmod = new Class(); - ClassDeclId CDImod = new ClassDeclId(); - CDImod.set_Modifiers($1); - CDImod.set_classname($3.getLexem()); - Cmod.set_ClassDeclId(CDImod); - Cmod.set_ClassBody($4); - $$ = Cmod; - } - - | CLASS IDENTIFIER super classbody - { - Class Csup = new Class(); - ClassDeclId CDIsup = new ClassDeclId(); - CDIsup.set_classname($2.getLexem()); - Csup.set_ClassDeclId(CDIsup); - Csup.set_UsedId($3); - Csup.set_ClassBody($4); - $$ = Csup; - } - - |modifiers CLASS IDENTIFIER super classbody - { - Class Cmodsup = new Class(); - ClassDeclId CDImodsup = new ClassDeclId(); - CDImodsup.set_Modifiers($1); - CDImodsup.set_classname($3.getLexem()); - Cmodsup.set_ClassDeclId(CDImodsup); - Cmodsup.set_UsedId($4); - Cmodsup.set_ClassBody($5); - $$ = Cmodsup; - } - | modifiers CLASS IDENTIFIER '<'paralist'>'classbody - { - Class Cmod = new Class(); - ClassDeclId CDImod = new ClassDeclId(); - CDImod.set_Modifiers($1); - CDImod.set_classname($3.getLexem()); - Cmod.set_ClassDeclId(CDImod); - Cmod.set_ParaList($5.get_ParaList()); - Cmod.set_ClassBody($7); - $$ = Cmod; - } - - |CLASS IDENTIFIER '<' paralist '>'classbody - { - Class C = new Class(); - ClassDeclId CDI = new ClassDeclId(); - CDI.set_classname($2.getLexem()); - C.set_ClassDeclId(CDI); - C.set_ClassBody($6); - C.set_ParaList($4.get_ParaList()); - $$ = C; - } - - | CLASS IDENTIFIER '<' paralist '>'super classbody - { - MyCompiler.Debug( "Klassendefinition: Basisklassen-Parameter = " + $4.get_ParaList(), 3 ); - MyCompiler.Debug( "Klassendefinition: Superklassen-Parameter = " + $6.get_ParaList(), 3 ); - MyCompiler.Debug( "Klassendefinition: Superklassen-Parameter = " + $6.get_ParaList().hashCode(), 3 ); - Class Csup = new Class(); - ClassDeclId CDIsup = new ClassDeclId(); - CDIsup.set_classname($2.getLexem()); - Csup.set_ClassDeclId(CDIsup); - Csup.set_ParaList($4.get_ParaList()); - Csup.set_UsedId($6); - Csup.set_ClassBody($7); - $$ = Csup; - } - - |modifiers CLASS IDENTIFIER '<'paralist'>'super classbody - { - Class Cmodsup = new Class(); - ClassDeclId CDImodsup = new ClassDeclId(); - CDImodsup.set_Modifiers($1); - CDImodsup.set_classname($3.getLexem()); - Cmodsup.set_ClassDeclId(CDImodsup); - Cmodsup.set_ParaList($5.get_ParaList()); - Cmodsup.set_UsedId($7); - Cmodsup.set_ClassBody($8); - $$ = Cmodsup; - } - - -paralist : IDENTIFIER - { - ParaList pl = new ParaList(); - pl.paralist.addElement( new TyploseVariable($1.getLexem()) ); - MyCompiler.Debug( "IDENTIFIER --> Paralist für " + $1.getLexem() + " TV", 3 ); - $$ = pl; - } - - | IDENTIFIER '<' paralist '>' - { - ParaList pl = new ParaList(); - RefType t = new RefType( $1.getLexem() ); - t.set_ParaList( $3.get_ParaList() ); - pl.paralist.addElement(t); - MyCompiler.Debug( "IDENTIFIER '<' paralist '>' --> Paralist für " + $1.getLexem() + ": RefType", 3 ); - $$ = pl; - } - - | paralist ',' IDENTIFIER - { - $1.paralist.addElement(new TyploseVariable($3.getLexem())); - MyCompiler.Debug( "paralist ',' IDENTIFIER --> Paralist für " + $3.getLexem() + ": TV", 3 ); - MyCompiler.Debug( "paralist: " + $1.paralist, 3 ); - $$=$1; - } - - | paralist ',' IDENTIFIER '<' paralist '>' - { - RefType t = new RefType( $3.getLexem() ); - t.set_ParaList( $5.get_ParaList() ); - $1.paralist.addElement(t); - MyCompiler.Debug( "paralist ',' IDENTIFIER '<' paralist '>' --> Paralist für " + $3.getLexem() + ": RefType", 3 ); - $$=$1; - } - -classbody : '{' '}' - { - ClassBody CB = new ClassBody(); - $$ = CB; - } - - | '{'classbodydeclarations '}' - { - $$ = $2; - } - -modifiers :modifier - { - Modifiers Mod = new Modifiers(); - Mod.modifier.addElement($1); - $$ = Mod; - } - |modifiers modifier - { - $1.modifier.addElement($2); - $$ = $1; - } - -super :EXTENDS classtype - { - $$ = $2; - } - -classbodydeclarations : classbodydeclaration - { - ClassBody CB = new ClassBody(); - CB.set_FieldDecl( $1 ); - $$=CB; - } - | classbodydeclarations classbodydeclaration - { - $1.set_FieldDecl($2); - $$ = $1; - } - - -modifier : PUBLIC - { - Public Pub = new Public(); - $$=Pub; - } - | PROTECTED - { - Protected Pro = new Protected(); - $$=Pro; - } - | PRIVATE - { - Private Pri = new Private(); - $$=Pri; - } - | STATIC - { - Static Sta = new Static(); - $$=Sta; - } - | ABSTRACT - { - Abstract Abs = new Abstract(); - $$=Abs; - } - -classtype : classorinterfacetype - { - $$ = $1; - } - | classorinterfacetype '<'paralist'>' - { - $1.set_ParaList($3.get_ParaList()); - - /* otth: originale (also diese) Parameterliste retten */ - ((UsedId)$1).vParaOrg = new Vector( $3.get_ParaList() ); - - $$ = $1; - } - -classbodydeclaration : classmemberdeclaration - { - $$=$1; - } - | staticinitializer - { - $$=$1; - } - | constructordeclaration - { - $$=$1; - } - -classorinterfacetype : name - { - $$=$1; - } - -classmemberdeclaration : fielddeclaration - { - $$=$1; - } - | methoddeclaration - { - $$=$1; - } - -staticinitializer : STATIC block - { - Method STAT = new Method(); - DeclId DST = new DeclId(); - DST.set_Name($1.getLexem()); - STAT.set_DeclId(DST); - Static ST = new Static(); - Modifiers MOD = new Modifiers(); - MOD.modifier.addElement(ST); - STAT.set_Modifiers(MOD); - STAT.set_Block($2); - $$=STAT; - } - -constructordeclaration : constructordeclarator constructorbody - { - $1.set_Block($2); - $$ = $1; - } - | modifiers constructordeclarator constructorbody - { - $2.set_Block($3); - $2.set_Modifiers($1); - $$ = $2; - } - -fielddeclaration : type variabledeclarators ';' - { - MyCompiler.Debug("T->Parser->fielddeclaration ...: type " + $1, 5); - $2.set_Type($1); - $$ = $2; - } - - | modifiers type variabledeclarators ';' - { - $3.set_Type($2); - for(int i=0;i<($3.declid.size());i++) - { - $3.declid.setElementAt((((DeclId)($3.declid.elementAt(i))).modifiers=$1),i); - } - $$ = $3; - } - -methoddeclaration : methodheader methodbody - { - $1.set_Block($2); - $$=$1; - } - -block : '{' '}' - - { - Block Bl = new Block(); - $$=Bl; - } - - | '{' blockstatements '}' - { - $$=$2; - } - -constructordeclarator : simplename '(' ')' - { - Constructor CON = new Constructor(); - DeclId DIDCon = new DeclId(); - DIDCon.set_Name($1.get_Name_1Element()); - CON.set_DeclId(DIDCon); - $$=CON; - } - | simplename '('formalparameterlist')' - { - Constructor CONpara = new Constructor(); - DeclId DIconpara = new DeclId(); - DIconpara.set_Name($1.get_Name_1Element()); - CONpara.set_DeclId(DIconpara); - CONpara.set_ParaList($3); - $$=CONpara; - } - -constructorbody : '{' '}' - { - Block CBL = new Block(); - $$=CBL; - } - | '{' explicitconstructorinvocation '}' - { - Block CBLexpl = new Block(); - CBLexpl.set_Statement($2); - $$=CBLexpl; - } - | '{' blockstatements '}' - { - $$=$2; - } - | '{'explicitconstructorinvocation blockstatements '}' - { - Block CBes = new Block(); - CBes.set_Statement($2); - for(int j=0;j<$3.statements.size();j++) - { - CBes.set_Statement((Statement)$3.statements.elementAt(j)); - } - $$=CBes; - } - -throws : THROWS classtypelist - { - ExceptionList EL = new ExceptionList(); - EL.set_addElem($2); - $$=EL; - } - -methodheader : type methoddeclarator - { - $2.set_ReturnType($1); - $$=$2; - } - | modifiers type methoddeclarator - { - $3.set_Modifiers($1); - $3.set_ReturnType($2); - $$=$3; - } - | type methoddeclarator throws - { - $2.set_ReturnType($1); - $2.set_ExceptionList($3); - $$=$2; - } - | modifiers type methoddeclarator throws - { - $3.set_Modifiers($1); - $3.set_ReturnType($2); - $3.set_ExceptionList($4); - $$=$3; - } - | VOID methoddeclarator - { - Type Voit = new Type(); - Voit.set_Type($1.getLexem()); - $2.set_ReturnType(Voit); - $$=$2; - } - | modifiers VOID methoddeclarator - { - Type voit = new Type(); - voit.set_Type($2.getLexem()); - $3.set_Modifiers($1); - $3.set_ReturnType(voit); - $$=$3; - } - | VOID methoddeclarator throws - { - Type voyt = new Type(); - voyt.set_Type($1.getLexem()); - $2.set_ReturnType(voyt); - $2.set_ExceptionList($3); - $$=$2; - } - | modifiers VOID methoddeclarator throws - { - Type voyd = new Type(); - voyd.set_Type($2.getLexem()); - $3.set_Modifiers($1); - $3.set_ReturnType(voyd); - $3.set_ExceptionList($4); - $$=$3; - } - -type : primitivetype - { - $$=$1; - } - |referencetype - { - $$=$1; - } - -variabledeclarators : variabledeclarator - { - InstVarDecl IVD = new InstVarDecl(); - IVD.declid.addElement( $1 ); - $$ = IVD; - } - | variabledeclarators ',' variabledeclarator - { - $1.declid.addElement($3); - $$=$1; - } - -methodbody : block - { - $$=$1; - } - -blockstatements : blockstatement - { - Block Blstat = new Block(); - Blstat.set_Statement($1); - $$=Blstat; - } - - | blockstatements blockstatement - { - $1.set_Statement($2); - $$=$1; - } - -formalparameterlist :formalparameter - { - ParameterList PL = new ParameterList(); - PL.set_AddParameter($1); - $$ = PL; - } - |formalparameterlist ',' formalparameter - { - $1.set_AddParameter($3); - $$ = $1; - } - -explicitconstructorinvocation : THIS '(' ')' ';' - { - This THCON = new This(); - $$=THCON; - } - |THIS '(' argumentlist ')' ';' - { - This THCONargl = new This(); - THCONargl.set_ArgumentList($3); - $$=THCONargl; - } - // |SUPER '(' ')' ';' - // |SUPER '(' argumentlist ')' ';' - -classtypelist : classtype - { - RefType RT = new RefType(); - RT.set_UsedId($1); - RT.set_Type(RT.used.get_Name_1Element()); - $$=RT; - } - | classtypelist ',' classtype - { - $1.set_UsedId($3); - $1.set_Type($1.used.get_Name_1Element()); - $$=$1; - } - -methoddeclarator :IDENTIFIER '(' ')' - { - Method met = new Method(); - DeclId DImethod = new DeclId(); - DImethod.set_Name($1.getLexem()); - met.set_DeclId(DImethod); - $$ = met; - } - |IDENTIFIER '(' formalparameterlist ')' - { - Method met_para = new Method(); - DeclId Dimet_para = new DeclId(); - Dimet_para.set_Name($1.getLexem()); - met_para.set_DeclId(Dimet_para); - met_para.set_ParaList($3); - $$ = met_para; - } - -primitivetype :BOOLEAN - { - BooleanType BT = new BooleanType(); - BT.set_Type($1.getLexem()); - $$=BT; - } - |numerictype - { - $$=$1; - } - -referencetype :classorinterfacetype - { - MyCompiler.Debug("T->Parser->referenctype: " + $1, 5); - RefType RT = new RefType(); - RT.set_UsedId($1); - RT.set_Type(RT.used.get_Name_1Element()); - $$=RT; - } - -variabledeclarator : variabledeclaratorid - { - $$=$1; - } - - | variabledeclaratorid '=' variableinitializer - { - $1.set_Wert($3); - $$=$1; - } - - | '<' paralist'>' variabledeclaratorid '=' variableinitializer - { - $4.set_Wert($6); - $4.set_Paratyp($2.get_ParaList()); - $$=$4; - } - -blockstatement :localvariabledeclarationstatement - { - $$=$1; - } - |statement - { - $$=$1; - } - -formalparameter : type variabledeclaratorid - { - FormalParameter FP = new FormalParameter(); - FP.set_Type($1); - FP.set_DeclId($2); - $$=FP; - } - - /* otth: Methodenargumente koennen hiermit auch polymorph sein. */ - | type '<'paralist'>' variabledeclaratorid - { - /* Parameterliste setzen */ - $5.set_Paratyp($3.get_ParaList()); - - FormalParameter FP = new FormalParameter(); - FP.set_Type($1); - FP.set_DeclId($5); - $$=FP; - - MyCompiler.Debug("P->Polymorphes Methodenargument hinzugefuegt: Name = " + $5.get_Name() + " Typ = " + $1.get_Type(), 3); - } - -argumentlist : expression - { - ArgumentList AL = new ArgumentList(); - AL.expr.addElement($1); - $$=AL; - } - |argumentlist ',' expression - { - $1.expr.addElement($3); - $$=$1; - } - -numerictype :integraltype - { - $$=$1; - } - -variabledeclaratorid :IDENTIFIER - { - DeclId DI = new DeclId(); - DI.set_Name($1.getLexem()); - $$=DI; - } - -variableinitializer :expression - { - $$=$1; - } - -localvariabledeclarationstatement :localvariabledeclaration ';' - { - $$=$1; - } - -statement :statementwithouttrailingsubstatement - { - $$=$1; - } - |ifthenstatement - { - $$=$1; - } - |ifthenelsestatement - { - $$=$1; - } - |whilestatement - { - $$=$1; - } - -expression :assignmentexpression - { - $$=$1; - } - |classinstancecreationexpression - { - $$=$1; - } - -integraltype :INT - { - IntegerType IT = new IntegerType(); - IT.set_Type($1.getLexem()); - $$=IT; - } - | CHAR - { - CharacterType CT = new CharacterType(); - CT.set_Type($1.getLexem()); - $$=CT; - } - -localvariabledeclaration : type variabledeclarators - { - MyCompiler.Debug("P -> Lokale Variable angelegt!", 3); - LocalVarDecl LVD = new LocalVarDecl(); - LVD.set_Type($1); - LVD.declid=$2.declid; - $$ = LVD; - } - -statementwithouttrailingsubstatement : block - { - $$=$1; - } - | emptystatement - { - $$=$1; - } - | expressionstatement - { - $$=$1; - } - | returnstatement - { - $$=$1; - } - -ifthenstatement : IF '(' expression ')' statement - { - IfStmt Ifst = new IfStmt(); - Ifst.set_Expr($3); - Ifst.set_Then_block($5); - $$=Ifst; - } - -ifthenelsestatement : IF '('expression ')'statementnoshortif ELSE statement - { - IfStmt IfstElst = new IfStmt(); - IfstElst.set_Expr($3); - IfstElst.set_Then_block($5); - IfstElst.set_Else_block($7); - $$=IfstElst; - } - -whilestatement : WHILE '(' expression ')' statement - { - WhileStmt Whlst = new WhileStmt(); - Whlst.set_Expr($3); - Whlst.set_Loop_block($5); - $$=Whlst; - } - -assignmentexpression : conditionalexpression - { - $$=$1; - } - | assignment - { - $$=$1; - } - -emptystatement : ';' - { - EmptyStmt Empst = new EmptyStmt(); - $$=Empst; - } - -expressionstatement : statementexpression ';' - { - $$=$1; - } - -returnstatement : RETURN ';' - { - Return ret = new Return(); - $$= ret; - } - | RETURN expression ';' - { - Return retexp = new Return(); - retexp.set_ReturnExpr($2); - $$=retexp; - } - -statementnoshortif :statementwithouttrailingsubstatement - { - $$=$1; - } - | ifthenelsestatementnoshortif - { - $$=$1; - } - | whilestatementnoshortif - { - $$=$1; - } - -conditionalexpression :conditionalorexpression - { - $$=$1; - } - // | conditionalorexpression '?' expression ':' conditionalexpression - -assignment :lefthandside assignmentoperator assignmentexpression - { - MyCompiler.Debug("\nParser --> Zuweisung1!\n", 3); - Assign Ass = new Assign(); - LocalOrFieldVar LOFV = new LocalOrFieldVar(); - LOFV.set_UsedId($1); - if( $2 == null ) - { - MyCompiler.Debug("\nParser --> Zuweisung1 --> " + $3 + " \n", 3); - Ass.set_Expr( LOFV,$3 ); - } - else - { - Binary Bin = new Binary(); - Bin.set_Expr1(LOFV); - Bin.set_Operator($2); - Bin.set_Expr2($3); - MyCompiler.Debug("\nParser --> Zuweisung1 --> Binary\n", 3); - Ass.set_Expr( LOFV, Bin ); - } - $$=Ass; - } - | lefthandside assignmentoperator classinstancecreationexpression - { - Assign Ass =new Assign(); - LocalOrFieldVar LOFV = new LocalOrFieldVar(); - LOFV.set_UsedId($1); - if($2==null) - { - Ass.set_Expr(LOFV,$3); - } - else - { - Binary Bin = new Binary(); - Bin.set_Expr1(LOFV); - Bin.set_Operator($2); - Bin.set_Expr2($3); - Ass.set_Expr(LOFV,Bin); - } - $$=Ass; - } - -statementexpression :assignment - { - $$=$1; - } - | preincrementexpression - { - $$=$1; - } - | predecrementexpression - { - $$=$1; - } - | postincrementexpression - { - $$=$1; - } - | postdecrementexpression - { - $$=$1; - } - | methodinvocation - { - $$=$1; - } -/* | classinstancecreationexpression - { - $$=$1; - } -*/ - -ifthenelsestatementnoshortif :IF '(' expression ')' statementnoshortif - ELSE statementnoshortif - { - IfStmt IfElno = new IfStmt(); - IfElno.set_Expr($3); - IfElno.set_Then_block($5); - IfElno.set_Else_block($7); - $$=IfElno; - } - -whilestatementnoshortif :WHILE '(' expression ')' statementnoshortif - { - WhileStmt Whstno = new WhileStmt(); - Whstno.set_Expr($3); - Whstno.set_Loop_block($5); - $$=Whstno; - } - -conditionalorexpression : conditionalandexpression - { - $$=$1; - } - | conditionalorexpression LOGICALOR conditionalandexpression - { - Binary LogOr = new Binary(); - OrOp OrO = new OrOp(); - LogOr.set_Expr1($1); - LogOr.set_Expr2($3); - LogOr.set_Operator(OrO); - $$=LogOr; - } - - -lefthandside :name - { - $$=$1; - } - -assignmentoperator : '=' - { - $$=null; - } - | TIMESEQUAL - { - TimesOp TEO = new TimesOp(); - $$=TEO; - } - | DIVIDEEQUAL - { - DivideOp DEO = new DivideOp(); - $$=DEO; - } - | MODULOEQUAL - { - ModuloOp MEO = new ModuloOp(); - $$=MEO; - } - | PLUSEQUAL - { - PlusOp PEO = new PlusOp(); - $$=PEO; - } - | MINUSEQUAL - { - MinusOp MEO = new MinusOp(); - $$=MEO; - } - // | SHIFTLEFTEQUAL - // | SIGNEDSHIFTRIGHTEQUAL - // | UNSIGNEDSHIFTRIGHTEQUAL - // | ANDEQUAL - // | XOREQUAL - // | OREQUAL - -preincrementexpression :INCREMENT unaryexpression - { - PreIncExpr PRINC = new PreIncExpr(); - PRINC.set_Expr($2); - $$=PRINC; - } - -predecrementexpression :DECREMENT unaryexpression - { - PreDecExpr PRDEC = new PreDecExpr(); - PRDEC.set_Expr($2); - $$=PRDEC; - } - -postincrementexpression :postfixexpression INCREMENT - { - PostIncExpr PIE = new PostIncExpr(); - PIE.set_Expr($1); - $$=PIE; - } - -postdecrementexpression :postfixexpression DECREMENT - { - PostDecExpr PDE = new PostDecExpr(); - PDE.set_Expr($1); - $$=PDE; - } - -methodinvocation :name '(' ')' - { - MethodCall MC = new MethodCall(); - MC.set_UsedId($1); - $$=MC; - } - | name '('argumentlist')' - { - MethodCall MCarg = new MethodCall(); - MCarg.set_UsedId($1); - MCarg.set_ArgumentList($3); - $$=MCarg; - } - | primary '.' IDENTIFIER '(' ')' - { - MethodCall MCpr = new MethodCall(); - $1.usedid.set_Name($3.getLexem()); - MCpr.set_UsedId($1.get_UsedId()); - $$=MCpr; - } - | primary '.' IDENTIFIER '('argumentlist ')' - { - MethodCall MCPA = new MethodCall(); - $1.usedid.set_Name($3.getLexem()); - MCPA.set_UsedId($1.get_UsedId()); - MCPA.set_ArgumentList($5); - $$=MCPA; - } - // | SUPER '.' IDENTIFIER '(' ')' - // | SUPER '.' IDENTIFIER '('argumentlist')' - -classinstancecreationexpression : NEW classtype '(' ')' - { - NewClass NC = new NewClass(); - NC.set_UsedId($2); - $$=NC; - } - | NEW classtype '(' argumentlist ')' - { - NewClass NCarg = new NewClass(); - NCarg.set_UsedId($2); - NCarg.set_ArgumentList($4); - $$=NCarg; - } - -conditionalandexpression : inclusiveorexpression - { - $$=$1; - } - | conditionalandexpression LOGICALAND inclusiveorexpression - { - Binary And = new Binary(); - AndOp AndO = new AndOp(); - And.set_Expr1($1); - And.set_Expr2($3); - And.set_Operator(AndO); - $$=And; - } - -/* -fieldaccess :primary '.' IDENTIFIER - | SUPER '.' IDENTIFIER -*/ - -unaryexpression : preincrementexpression - { - $$=$1; - } - | predecrementexpression - { - $$=$1; - } - | '+' unaryexpression - { - PositivExpr POSEX=new PositivExpr(); - UnaryPlus UP= new UnaryPlus(); - POSEX.set_UnaryPlus(UP); - POSEX.set_Expr($2); - $$=POSEX; - } - | '-' unaryexpression - { - NegativeExpr NEGEX=new NegativeExpr(); - UnaryMinus UM=new UnaryMinus(); - NEGEX.set_UnaryMinus(UM); - NEGEX.set_Expr($2); - $$=NEGEX; - } - | unaryexpressionnotplusminus - { - $$=$1; - } - -postfixexpression :primary - { - $$=$1; - } - | name - { - LocalOrFieldVar Postincexpr = new LocalOrFieldVar(); - Postincexpr.set_UsedId($1); - $$=Postincexpr; - } - | postincrementexpression - { - $$=$1; - } - | postdecrementexpression - { - $$=$1; - } - -primary : primarynonewarray - { - $$=$1; - } - -inclusiveorexpression : exclusiveorexpression - { - $$=$1; - } - | inclusiveorexpression '|' exclusiveorexpression - -primarynonewarray : literal - { - $$=$1; - } - | THIS - { - This T = new This(); - UsedId UT = new UsedId(); - UT.set_Name($1.getLexem()); - T.set_UsedId(UT); - $$=T; - } - - | '('expression')' - { - $$=$2; - } -/* - | classinstancecreationexpression - { - $$=$1; - } - | fieldaccess -*/ - | methodinvocation - { - $$=$1; - } - -unaryexpressionnotplusminus : postfixexpression {$$=$1;} - // | '~' unaryexpression - | '!' unaryexpression {NotExpr NE=new NotExpr(); - UnaryNot UN=new UnaryNot(); - NE.set_UnaryNot(UN); - NE.set_Expr($2); - $$=NE; - } - | castexpression {$$=$1;} - -exclusiveorexpression :andexpression {$$=$1;} - | exclusiveorexpression '^' andexpression //{ - // - //} - -literal : INTLITERAL {IntLiteral IL = new IntLiteral(); - IL.set_Int($1.String2Int()); - $$ = IL; - } - - | BOOLLITERAL {BoolLiteral BL = new BoolLiteral(); - BL.set_Bool($1.String2Bool()); - $$ = BL; - } - | CHARLITERAL {CharLiteral CL = new CharLiteral(); - CL.set_Char($1.CharInString()); - $$=CL; - } - | STRINGLITERAL - { - StringLiteral ST = new StringLiteral(); - ST.set_String($1.get_String()); - $$=ST; - } - | JNULL; - { - Null NN = new Null(); - $$=NN; - } - -castexpression : '(' primitivetype ')' unaryexpression - { - CastExpr CaEx=new CastExpr(); - CaEx.set_Type($2); - CaEx.set_Expr($4); - $$=CaEx; - } - //| '(' expression ')' unaryexpressionnotplusminus - -andexpression :equalityexpression - { - $$=$1; - } - | andexpression '&' equalityexpression - { - } - -equalityexpression : relationalexpression - { - $$=$1; - } - | equalityexpression EQUAL relationalexpression - { - Binary EQ = new Binary(); - EqualOp EO = new EqualOp(); - EQ.set_Expr1($1); - EQ.set_Expr2($3); - EQ.set_Operator(EO); - $$=EQ; - } - | equalityexpression NOTEQUAL relationalexpression - { - Binary NEQ = new Binary(); - NotEqualOp NEO = new NotEqualOp(); - NEQ.set_Expr1($1); - NEQ.set_Expr2($3); - NEQ.set_Operator(NEO); - $$=NEQ; - } - -relationalexpression : shiftexpression - { - $$=$1; - } - | relationalexpression '<' shiftexpression - { - Binary LO = new Binary(); - LessOp LOO = new LessOp(); - LO.set_Expr1($1); - LO.set_Expr2($3); - LO.set_Operator(LOO); - $$=LO; - } - | relationalexpression '>' shiftexpression - { - Binary GO = new Binary(); - GreaterOp GOO = new GreaterOp(); - GO.set_Expr1($1); - GO.set_Expr2($3); - GO.set_Operator( GOO ); - $$=GO; - } - | relationalexpression LESSEQUAL shiftexpression - { - Binary LE = new Binary(); - LessEquOp LEO = new LessEquOp(); - LE.set_Expr1($1); - LE.set_Expr2($3); - LE.set_Operator(LEO); - $$=LE; - } - | relationalexpression GREATEREQUAL shiftexpression - { - Binary GE = new Binary(); - GreaterEquOp GEO = new GreaterEquOp(); - GE.set_Expr1($1); - GE.set_Expr2($3); - GE.set_Operator(GEO); - $$=GE; - } - | relationalexpression INSTANCEOF referencetype - { - InstanceOf ISO=new InstanceOf(); - ISO.set_Expr($1); - ISO.set_Type($3); - $$=ISO; - } - -shiftexpression : additiveexpression - { - $$=$1; - } - -additiveexpression :multiplicativeexpression - { - $$=$1; - } - | additiveexpression '+' multiplicativeexpression - { - Binary AD = new Binary(); - PlusOp PO = new PlusOp(); - AD.set_Expr1($1); - AD.set_Expr2($3); - AD.set_Operator(PO); - $$=AD; - } - | additiveexpression '-' multiplicativeexpression - { - Binary MI = new Binary(); - MinusOp MO = new MinusOp(); - MI.set_Expr1($1); - MI.set_Expr2($3); - MI.set_Operator(MO); - $$=MI; - } - -multiplicativeexpression : unaryexpression - { - $$=$1; - } - | multiplicativeexpression '*' unaryexpression - { - Binary ML = new Binary(); - TimesOp TO = new TimesOp(); - ML.set_Expr1($1); - ML.set_Expr2($3); - ML.set_Operator(TO); - $$=ML; - } - | multiplicativeexpression '/' unaryexpression - { - Binary DV = new Binary(); - DivideOp DO = new DivideOp(); - DV.set_Expr1($1); - DV.set_Expr2($3); - DV.set_Operator(DO); - $$ = DV; - } - | multiplicativeexpression '%' unaryexpression - { - Binary MD = new Binary(); - ModuloOp MO = new ModuloOp(); - MD.set_Expr1($1); - MD.set_Expr2($3); - MD.set_Operator(MO); - $$ =MD; - } - -/* OTTH: Methodenparametertypen müssen nicht mehr angegeben werden */ - -formalparameter : variabledeclaratorid - { - MyCompiler.Debug("\nFunktionsdeklaration mit typlosen Parametern: " + $1.name, 3); - - FormalParameter FP = new FormalParameter(); - - Type T = new TyploseVariable(""); /* otth: Name wird automatisch berechnet */ - MyCompiler.Debug("\n--> berechneter Name: " + T.get_Type(), 3); - - FP.set_Type( T ); - FP.set_DeclId($1); - - $$=FP; - } - -%% \ No newline at end of file diff --git a/src/mycompiler/mytest/APITest.java b/src/mycompiler/mytest/APITest.java index eade20e6a..947e64055 100755 --- a/src/mycompiler/mytest/APITest.java +++ b/src/mycompiler/mytest/APITest.java @@ -1,7 +1,7 @@ package mycompiler.mytest; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; public class APITest { diff --git a/src/mycompiler/mytest/LambdaTest.java b/src/mycompiler/mytest/LambdaTest.java index a86bcf755..f1c61f276 100755 --- a/src/mycompiler/mytest/LambdaTest.java +++ b/src/mycompiler/mytest/LambdaTest.java @@ -15,14 +15,14 @@ import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import org.apache.log4j.SimpleLayout; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.mytypereconstruction.CSubstitution; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; public class LambdaTest { diff --git a/src/mycompiler/mytypereconstruction/CMultiplyTuple.java b/src/mycompiler/mytypereconstruction/CMultiplyTuple.java index 086411758..1a386ee01 100755 --- a/src/mycompiler/mytypereconstruction/CMultiplyTuple.java +++ b/src/mycompiler/mytypereconstruction/CMultiplyTuple.java @@ -5,7 +5,8 @@ package mycompiler.mytypereconstruction; // ino.module.CMultiplyTuple.8683.import import java.util.Iterator; import java.util.Vector; -import mycompiler.mytype.Type; + +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; // ino.end diff --git a/src/mycompiler/mytypereconstruction/CSubstitution.java b/src/mycompiler/mytypereconstruction/CSubstitution.java index 9ba5ecfa5..13586222a 100755 --- a/src/mycompiler/mytypereconstruction/CSubstitution.java +++ b/src/mycompiler/mytypereconstruction/CSubstitution.java @@ -5,16 +5,19 @@ package mycompiler.mytypereconstruction; // ino.module.CSubstitution.8685.import import java.util.Iterator; import java.util.Vector; + import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.set.CSubstitutionSet; + import org.apache.log4j.Logger; // ino.end +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; + // ino.class.CSubstitution.27003.description type=javadoc /** * Implementierung einer Typsubstitution. Bildet eine zu ersetzende diff --git a/src/mycompiler/mytypereconstruction/CSubstitutionGenVar.java b/src/mycompiler/mytypereconstruction/CSubstitutionGenVar.java index a4b4b9b0b..c8a13829a 100755 --- a/src/mycompiler/mytypereconstruction/CSubstitutionGenVar.java +++ b/src/mycompiler/mytypereconstruction/CSubstitutionGenVar.java @@ -3,9 +3,8 @@ package mycompiler.mytypereconstruction; // ino.end // ino.module.CSubstitutionGenVar.8686.import -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; -// ino.end +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; // ino.class.CSubstitutionGenVar.27057.description type=javadoc /** diff --git a/src/mycompiler/mytypereconstruction/CSupportData.java b/src/mycompiler/mytypereconstruction/CSupportData.java index 2915577e4..199f033ae 100755 --- a/src/mycompiler/mytypereconstruction/CSupportData.java +++ b/src/mycompiler/mytypereconstruction/CSupportData.java @@ -4,8 +4,10 @@ package mycompiler.mytypereconstruction; // ino.module.CSupportData.8687.import import java.util.Vector; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; + +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import mycompiler.mytypereconstruction.unify.FC_TTO; // ino.end diff --git a/src/mycompiler/mytypereconstruction/CTriple.java b/src/mycompiler/mytypereconstruction/CTriple.java index c5f483d5f..cd525f5d9 100755 --- a/src/mycompiler/mytypereconstruction/CTriple.java +++ b/src/mycompiler/mytypereconstruction/CTriple.java @@ -3,7 +3,7 @@ package mycompiler.mytypereconstruction; // ino.end // ino.module.CTriple.8688.import -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; // ino.end diff --git a/src/mycompiler/mytypereconstruction/replacementlistener/CReplaceTypeEvent.java b/src/mycompiler/mytypereconstruction/replacementlistener/CReplaceTypeEvent.java index 66c2c638c..b39868a9d 100755 --- a/src/mycompiler/mytypereconstruction/replacementlistener/CReplaceTypeEvent.java +++ b/src/mycompiler/mytypereconstruction/replacementlistener/CReplaceTypeEvent.java @@ -3,8 +3,7 @@ package mycompiler.mytypereconstruction.replacementlistener; // ino.end // ino.module.CReplaceTypeEvent.8691.import -import mycompiler.mytype.Type; -// ino.end +import de.dhbwstuttgart.syntaxtree.type.Type; // ino.class.CReplaceTypeEvent.27311.description type=javadoc /** diff --git a/src/mycompiler/mytypereconstruction/set/CSubstitutionSet.java b/src/mycompiler/mytypereconstruction/set/CSubstitutionSet.java index c63106dbe..6a98c4067 100755 --- a/src/mycompiler/mytypereconstruction/set/CSubstitutionSet.java +++ b/src/mycompiler/mytypereconstruction/set/CSubstitutionSet.java @@ -5,9 +5,10 @@ package mycompiler.mytypereconstruction.set; // ino.module.CSubstitutionSet.8699.import import java.util.Iterator; import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.mytype.Pair; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSubstitution; // ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumption/CInstVarTypeAssumption.java b/src/mycompiler/mytypereconstruction/typeassumption/CInstVarTypeAssumption.java index 2f3b3be4b..408b4049a 100755 --- a/src/mycompiler/mytypereconstruction/typeassumption/CInstVarTypeAssumption.java +++ b/src/mycompiler/mytypereconstruction/typeassumption/CInstVarTypeAssumption.java @@ -4,7 +4,8 @@ package mycompiler.mytypereconstruction.typeassumption; // ino.module.CInstVarTypeAssumption.8706.import import java.util.Vector; -import mycompiler.mytype.Type; + +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.mytypereconstruction.set.IHashSetKey; import mycompiler.mytypereconstruction.typeassumptionkey.CInstVarKey; // ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumption/CLocalVarTypeAssumption.java b/src/mycompiler/mytypereconstruction/typeassumption/CLocalVarTypeAssumption.java index ffbfa2ec4..a24086392 100755 --- a/src/mycompiler/mytypereconstruction/typeassumption/CLocalVarTypeAssumption.java +++ b/src/mycompiler/mytypereconstruction/typeassumption/CLocalVarTypeAssumption.java @@ -4,7 +4,8 @@ package mycompiler.mytypereconstruction.typeassumption; // ino.module.CLocalVarTypeAssumption.8707.import import java.util.Vector; -import mycompiler.mytype.Type; + +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.mytypereconstruction.set.IHashSetKey; import mycompiler.mytypereconstruction.typeassumptionkey.CLocalVarKey; // ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumption/CMethodTypeAssumption.java b/src/mycompiler/mytypereconstruction/typeassumption/CMethodTypeAssumption.java index d492502c2..189c00e21 100755 --- a/src/mycompiler/mytypereconstruction/typeassumption/CMethodTypeAssumption.java +++ b/src/mycompiler/mytypereconstruction/typeassumption/CMethodTypeAssumption.java @@ -5,8 +5,9 @@ package mycompiler.mytypereconstruction.typeassumption; // ino.module.CMethodTypeAssumption.8708.import import java.util.Iterator; import java.util.Vector; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; + +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.set.IHashSetKey; import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; diff --git a/src/mycompiler/mytypereconstruction/typeassumption/CParaTypeAssumption.java b/src/mycompiler/mytypereconstruction/typeassumption/CParaTypeAssumption.java index 57bcc8fd8..868ae7eb5 100755 --- a/src/mycompiler/mytypereconstruction/typeassumption/CParaTypeAssumption.java +++ b/src/mycompiler/mytypereconstruction/typeassumption/CParaTypeAssumption.java @@ -4,7 +4,8 @@ package mycompiler.mytypereconstruction.typeassumption; // ino.module.CParaTypeAssumption.8709.import import java.util.Vector; -import mycompiler.mytype.Type; + +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.mytypereconstruction.set.IHashSetKey; import mycompiler.mytypereconstruction.typeassumptionkey.CMethodParaKey; // ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumption/CTypeAssumption.java b/src/mycompiler/mytypereconstruction/typeassumption/CTypeAssumption.java index eed59bf4d..d9e0436be 100755 --- a/src/mycompiler/mytypereconstruction/typeassumption/CTypeAssumption.java +++ b/src/mycompiler/mytypereconstruction/typeassumption/CTypeAssumption.java @@ -5,8 +5,9 @@ package mycompiler.mytypereconstruction.typeassumption; // ino.module.CTypeAssumption.8710.import import java.util.Iterator; import java.util.Vector; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; + +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.IHashSetElement; diff --git a/src/mycompiler/mytypereconstruction/unify/FC_TTO.java b/src/mycompiler/mytypereconstruction/unify/FC_TTO.java index 79d60fff9..651f02d53 100755 --- a/src/mycompiler/mytypereconstruction/unify/FC_TTO.java +++ b/src/mycompiler/mytypereconstruction/unify/FC_TTO.java @@ -4,9 +4,9 @@ package mycompiler.mytypereconstruction.unify; // ino.module.FC_TTO.8719.import import java.util.Vector; -import mycompiler.mytype.Pair; -import mycompiler.myclass.Class; -// ino.end + +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.Pair; // ino.class.FC_TTO.28013.description type=javadoc /** diff --git a/src/mycompiler/mytypereconstruction/unify/MUB.java b/src/mycompiler/mytypereconstruction/unify/MUB.java index 09a0a44fa..c050b6d6d 100755 --- a/src/mycompiler/mytypereconstruction/unify/MUB.java +++ b/src/mycompiler/mytypereconstruction/unify/MUB.java @@ -4,9 +4,9 @@ package mycompiler.mytypereconstruction.unify; // ino.module.MUB.8720.import import java.util.Vector; -import mycompiler.mytype.Pair; -import mycompiler.mytype.Type; -// ino.end + +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; // ino.class.MUB.28031.declaration public class MUB diff --git a/src/mycompiler/mytypereconstruction/unify/Unify.java b/src/mycompiler/mytypereconstruction/unify/Unify.java index 48cad7419..2be23e210 100755 --- a/src/mycompiler/mytypereconstruction/unify/Unify.java +++ b/src/mycompiler/mytypereconstruction/unify/Unify.java @@ -7,29 +7,32 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.MyCompiler; + import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.MatchException; import mycompiler.myexception.SCException; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.CRefTypeSet; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.FreshExtendsWildcardType; -import mycompiler.mytype.FreshSuperWildcardType; -import mycompiler.mytype.FreshWildcardType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.IMatchable; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.WildcardType; -import mycompiler.mytype.Pair.PairOperator; -import mycompiler.myclass.Class; import mycompiler.mytypereconstruction.set.CSubstitutionSet; + import org.apache.log4j.Logger; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.CRefTypeSet; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.FreshExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.FreshSuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.FreshWildcardType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.IMatchable; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.WildcardType; +import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; + // ino.end // ino.class.Unify.28049.description type=javadoc diff --git a/src/mycompiler/unused/Import.java b/src/mycompiler/unused/Import.java index 319b3d53b..65b9432ba 100755 --- a/src/mycompiler/unused/Import.java +++ b/src/mycompiler/unused/Import.java @@ -1,6 +1,6 @@ package mycompiler.unused; -import mycompiler.myclass.Status; +import de.dhbwstuttgart.syntaxtree.misc.Status; public class Import extends Status { diff --git a/src/mycompiler/unused/JavaCompiler.java b/src/mycompiler/unused/JavaCompiler.java index 35a02b304..b8a1063ef 100755 --- a/src/mycompiler/unused/JavaCompiler.java +++ b/src/mycompiler/unused/JavaCompiler.java @@ -1,7 +1,7 @@ package mycompiler.unused; -import mycompiler.myparser.JavaParser; -import mycompiler.myparser.Scanner; +import de.dhbwstuttgart.typeinference.parser.JavaParser; +import de.dhbwstuttgart.typeinference.parser.Scanner; public class JavaCompiler extends JavaParser { diff --git a/src/userinterface/ConsoleInterface.java b/src/userinterface/ConsoleInterface.java index b009508d1..8bd5e0280 100755 --- a/src/userinterface/ConsoleInterface.java +++ b/src/userinterface/ConsoleInterface.java @@ -4,16 +4,15 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; import java.util.Vector; - -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; -import typinferenz.exceptions.TypeinferenceException; - import java.util.*; import org.apache.log4j.Logger; import org.apache.log4j.varia.NullAppender; + +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; public class ConsoleInterface { private static final String directory = System.getProperty("user.dir"); diff --git a/test/bytecode/BytecodeTester.java b/test/bytecode/BytecodeTester.java index db64d3d87..47096d0aa 100644 --- a/test/bytecode/BytecodeTester.java +++ b/test/bytecode/BytecodeTester.java @@ -7,9 +7,9 @@ import java.nio.file.Files; import java.nio.file.Paths; import java.util.Vector; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; import mycompiler.mybytecode.ClassFile; import mycompiler.myexception.JVMCodeException; diff --git a/test/bytecode/EmptyClassTest.java b/test/bytecode/EmptyClassTest.java index 471640ef5..601bb28c0 100644 --- a/test/bytecode/EmptyClassTest.java +++ b/test/bytecode/EmptyClassTest.java @@ -3,13 +3,14 @@ package bytecode; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; + public class EmptyClassTest extends TestCase { @Test diff --git a/test/mycompiler/test/blocks/TestForStmt.java b/test/mycompiler/test/blocks/TestForStmt.java index f41318661..587992cca 100755 --- a/test/mycompiler/test/blocks/TestForStmt.java +++ b/test/mycompiler/test/blocks/TestForStmt.java @@ -1,6 +1,6 @@ package mycompiler.test.blocks; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.BlockExpect; import mycompiler.test.expectationTypes.ClassExpect; diff --git a/test/mycompiler/test/blocks/TestIfStmt.java b/test/mycompiler/test/blocks/TestIfStmt.java index 8ca1ee79e..8c61f4cd4 100755 --- a/test/mycompiler/test/blocks/TestIfStmt.java +++ b/test/mycompiler/test/blocks/TestIfStmt.java @@ -2,10 +2,10 @@ package mycompiler.test.blocks; import java.util.Vector; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/blocks/TestInferenceAcrossBlocks.java b/test/mycompiler/test/blocks/TestInferenceAcrossBlocks.java index a89499ad2..8bccc6f36 100755 --- a/test/mycompiler/test/blocks/TestInferenceAcrossBlocks.java +++ b/test/mycompiler/test/blocks/TestInferenceAcrossBlocks.java @@ -1,6 +1,6 @@ package mycompiler.test.blocks; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.BlockExpect; import mycompiler.test.expectationTypes.ClassExpect; diff --git a/test/mycompiler/test/blocks/TestSimpleBlocks.java b/test/mycompiler/test/blocks/TestSimpleBlocks.java index 93bac75ac..11221b7de 100755 --- a/test/mycompiler/test/blocks/TestSimpleBlocks.java +++ b/test/mycompiler/test/blocks/TestSimpleBlocks.java @@ -1,6 +1,6 @@ package mycompiler.test.blocks; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.BlockExpect; import mycompiler.test.expectationTypes.ClassExpect; diff --git a/test/mycompiler/test/blocks/TestSimpleVariable.java b/test/mycompiler/test/blocks/TestSimpleVariable.java index 9cd4ff6e3..26f4d2c36 100755 --- a/test/mycompiler/test/blocks/TestSimpleVariable.java +++ b/test/mycompiler/test/blocks/TestSimpleVariable.java @@ -1,6 +1,6 @@ package mycompiler.test.blocks; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/blocks/TestUndeterminedReturnNegative.java b/test/mycompiler/test/blocks/TestUndeterminedReturnNegative.java index 373d8ba30..418962853 100755 --- a/test/mycompiler/test/blocks/TestUndeterminedReturnNegative.java +++ b/test/mycompiler/test/blocks/TestUndeterminedReturnNegative.java @@ -2,10 +2,10 @@ package mycompiler.test.blocks; import java.util.Vector; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/blocks/TestUninitializedVariable.java b/test/mycompiler/test/blocks/TestUninitializedVariable.java index a0923c84a..be8d16166 100755 --- a/test/mycompiler/test/blocks/TestUninitializedVariable.java +++ b/test/mycompiler/test/blocks/TestUninitializedVariable.java @@ -1,6 +1,6 @@ package mycompiler.test.blocks; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/blocks/TestWhileStmt.java b/test/mycompiler/test/blocks/TestWhileStmt.java index e6d9cabbf..28f207411 100755 --- a/test/mycompiler/test/blocks/TestWhileStmt.java +++ b/test/mycompiler/test/blocks/TestWhileStmt.java @@ -1,6 +1,6 @@ package mycompiler.test.blocks; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/complexTypes/TestOwnClassMember.java b/test/mycompiler/test/complexTypes/TestOwnClassMember.java index 5f9cdaea4..60fceee07 100755 --- a/test/mycompiler/test/complexTypes/TestOwnClassMember.java +++ b/test/mycompiler/test/complexTypes/TestOwnClassMember.java @@ -1,6 +1,6 @@ package mycompiler.test.complexTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/complexTypes/TestOwnClassMethod.java b/test/mycompiler/test/complexTypes/TestOwnClassMethod.java index 87405f49b..19eaad005 100755 --- a/test/mycompiler/test/complexTypes/TestOwnClassMethod.java +++ b/test/mycompiler/test/complexTypes/TestOwnClassMethod.java @@ -2,7 +2,7 @@ package mycompiler.test.complexTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/complexTypes/TestStandardLibInheritanceInference.java b/test/mycompiler/test/complexTypes/TestStandardLibInheritanceInference.java index 5ac5316fd..060322cb3 100755 --- a/test/mycompiler/test/complexTypes/TestStandardLibInheritanceInference.java +++ b/test/mycompiler/test/complexTypes/TestStandardLibInheritanceInference.java @@ -1,6 +1,6 @@ package mycompiler.test.complexTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/complexTypes/TestStandardLibMethod.java b/test/mycompiler/test/complexTypes/TestStandardLibMethod.java index 55887770d..eca0c6a31 100755 --- a/test/mycompiler/test/complexTypes/TestStandardLibMethod.java +++ b/test/mycompiler/test/complexTypes/TestStandardLibMethod.java @@ -2,7 +2,7 @@ package mycompiler.test.complexTypes; import java.util.Vector; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/expectationTypes/ClassExpect.java b/test/mycompiler/test/expectationTypes/ClassExpect.java index 998aaf3c5..75f4e0e74 100755 --- a/test/mycompiler/test/expectationTypes/ClassExpect.java +++ b/test/mycompiler/test/expectationTypes/ClassExpect.java @@ -3,7 +3,7 @@ package mycompiler.test.expectationTypes; import java.util.HashMap; import java.util.Vector; -import mycompiler.mytype.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; /** * 15-04-08 diff --git a/test/mycompiler/test/expectationTypes/MethodExpect.java b/test/mycompiler/test/expectationTypes/MethodExpect.java index e344a5dd1..584a0a4a6 100755 --- a/test/mycompiler/test/expectationTypes/MethodExpect.java +++ b/test/mycompiler/test/expectationTypes/MethodExpect.java @@ -3,8 +3,8 @@ package mycompiler.test.expectationTypes; import java.util.HashMap; import java.util.Vector; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; /** * 15-04-08 * @author diff --git a/test/mycompiler/test/expectationTypes/VarExpect.java b/test/mycompiler/test/expectationTypes/VarExpect.java index 3fb0e81b2..5d538b06f 100755 --- a/test/mycompiler/test/expectationTypes/VarExpect.java +++ b/test/mycompiler/test/expectationTypes/VarExpect.java @@ -2,7 +2,7 @@ package mycompiler.test.expectationTypes; import java.util.Vector; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.Type; /** * 15-04-08 * @author diff --git a/test/mycompiler/test/generics/TestAssignmentTwoGenericTypesNegative.java b/test/mycompiler/test/generics/TestAssignmentTwoGenericTypesNegative.java index a3de8a853..73bf38dd7 100755 --- a/test/mycompiler/test/generics/TestAssignmentTwoGenericTypesNegative.java +++ b/test/mycompiler/test/generics/TestAssignmentTwoGenericTypesNegative.java @@ -2,8 +2,8 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/generics/TestClassesWithBoundedGenericsOfTwoTypes.java b/test/mycompiler/test/generics/TestClassesWithBoundedGenericsOfTwoTypes.java index 62b8c29b0..0f8cec05b 100755 --- a/test/mycompiler/test/generics/TestClassesWithBoundedGenericsOfTwoTypes.java +++ b/test/mycompiler/test/generics/TestClassesWithBoundedGenericsOfTwoTypes.java @@ -2,10 +2,10 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/generics/TestClassesWithBoundedGenericsUsedInMethods.java b/test/mycompiler/test/generics/TestClassesWithBoundedGenericsUsedInMethods.java index 9a59cd5f4..c76e427ca 100755 --- a/test/mycompiler/test/generics/TestClassesWithBoundedGenericsUsedInMethods.java +++ b/test/mycompiler/test/generics/TestClassesWithBoundedGenericsUsedInMethods.java @@ -2,10 +2,10 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/generics/TestExtendedClassesWithBoundedGenerics.java b/test/mycompiler/test/generics/TestExtendedClassesWithBoundedGenerics.java index 25992b9c9..0528d3e25 100755 --- a/test/mycompiler/test/generics/TestExtendedClassesWithBoundedGenerics.java +++ b/test/mycompiler/test/generics/TestExtendedClassesWithBoundedGenerics.java @@ -2,10 +2,10 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/generics/TestNestedGenerics.java b/test/mycompiler/test/generics/TestNestedGenerics.java index 9ed0a0080..8ff2f845e 100755 --- a/test/mycompiler/test/generics/TestNestedGenerics.java +++ b/test/mycompiler/test/generics/TestNestedGenerics.java @@ -2,17 +2,17 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; import mycompiler.test.expectationTypes.MethodExpect; import mycompiler.test.expectationTypes.VarExpect; -import mycompiler.mytype.ExtendsWildcardType; /** * 16-05-08 * @author diff --git a/test/mycompiler/test/generics/TestNestedGenericsNonExistingType.java b/test/mycompiler/test/generics/TestNestedGenericsNonExistingType.java index f1a512680..64657905e 100755 --- a/test/mycompiler/test/generics/TestNestedGenericsNonExistingType.java +++ b/test/mycompiler/test/generics/TestNestedGenericsNonExistingType.java @@ -2,17 +2,17 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; import mycompiler.test.expectationTypes.MethodExpect; import mycompiler.test.expectationTypes.VarExpect; -import mycompiler.mytype.ExtendsWildcardType; /** * 16-05-08 * @author diff --git a/test/mycompiler/test/generics/TestSimpleClassesWithBoundedGenerics.java b/test/mycompiler/test/generics/TestSimpleClassesWithBoundedGenerics.java index 75a0c54eb..c946a6740 100755 --- a/test/mycompiler/test/generics/TestSimpleClassesWithBoundedGenerics.java +++ b/test/mycompiler/test/generics/TestSimpleClassesWithBoundedGenerics.java @@ -2,16 +2,16 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; import mycompiler.test.expectationTypes.MethodExpect; import mycompiler.test.expectationTypes.VarExpect; -import mycompiler.mytype.ExtendsWildcardType; /** * 13-05-08 * @author diff --git a/test/mycompiler/test/generics/TestSimpleClassesWithBoundedGenericsNegative.java b/test/mycompiler/test/generics/TestSimpleClassesWithBoundedGenericsNegative.java index 074b74df7..4f33ead62 100755 --- a/test/mycompiler/test/generics/TestSimpleClassesWithBoundedGenericsNegative.java +++ b/test/mycompiler/test/generics/TestSimpleClassesWithBoundedGenericsNegative.java @@ -2,14 +2,14 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; import mycompiler.test.expectationTypes.MethodExpect; import mycompiler.test.expectationTypes.VarExpect; -import mycompiler.mytype.Type; /** * verifies correct identification of a bounded generic which is instanciated with a type not included in bounds diff --git a/test/mycompiler/test/generics/TestSimpleClassesWithGenerics.java b/test/mycompiler/test/generics/TestSimpleClassesWithGenerics.java index 586aa42fe..c422e82ba 100755 --- a/test/mycompiler/test/generics/TestSimpleClassesWithGenerics.java +++ b/test/mycompiler/test/generics/TestSimpleClassesWithGenerics.java @@ -2,14 +2,14 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; import mycompiler.test.expectationTypes.MethodExpect; import mycompiler.test.expectationTypes.VarExpect; -import mycompiler.mytype.GenericTypeVar; /** * checks simple usage of generics without bounds diff --git a/test/mycompiler/test/generics/TestSimpleClassesWithGenericsNegative.java b/test/mycompiler/test/generics/TestSimpleClassesWithGenericsNegative.java index 9ebb680f5..80e5dfd59 100755 --- a/test/mycompiler/test/generics/TestSimpleClassesWithGenericsNegative.java +++ b/test/mycompiler/test/generics/TestSimpleClassesWithGenericsNegative.java @@ -2,14 +2,14 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; import mycompiler.test.expectationTypes.MethodExpect; import mycompiler.test.expectationTypes.VarExpect; -import mycompiler.mytype.GenericTypeVar; /** * checks whether wrong usage of generics is detected diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMember.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMember.java index d5219e39f..897943fa7 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMember.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMember.java @@ -1,6 +1,6 @@ package mycompiler.test.inferenceByCharacteristic; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMemberAcrossClasses.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMemberAcrossClasses.java index 132a674bf..8493685a7 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMemberAcrossClasses.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMemberAcrossClasses.java @@ -1,6 +1,6 @@ package mycompiler.test.inferenceByCharacteristic; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCall.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCall.java index 158114383..fb2bf1846 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCall.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCall.java @@ -2,7 +2,7 @@ package mycompiler.test.inferenceByCharacteristic; import org.apache.log4j.xml.DOMConfigurator; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCallAcrossClasses.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCallAcrossClasses.java index 0f5e38ba5..7ece1945d 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCallAcrossClasses.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCallAcrossClasses.java @@ -1,6 +1,6 @@ package mycompiler.test.inferenceByCharacteristic; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodParameter.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodParameter.java index 183e1553d..4aa74bcfd 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodParameter.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodParameter.java @@ -1,6 +1,6 @@ package mycompiler.test.inferenceByCharacteristic; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodReturnTypeMixed1.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodReturnTypeMixed1.java index 1ed0cff0e..a771f483c 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodReturnTypeMixed1.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodReturnTypeMixed1.java @@ -5,7 +5,7 @@ package mycompiler.test.inferenceByCharacteristic; * * identifying type of a variable by parameter passed to a method of another class */ -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnType.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnType.java index a4ab611aa..81b10adf1 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnType.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnType.java @@ -1,6 +1,6 @@ package mycompiler.test.inferenceByCharacteristic; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnTypeAcrossClasses.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnTypeAcrossClasses.java index c2df63787..bf5c07acb 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnTypeAcrossClasses.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnTypeAcrossClasses.java @@ -1,6 +1,6 @@ package mycompiler.test.inferenceByCharacteristic; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByOperation.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByOperation.java index 937a8b95e..c098cf17a 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByOperation.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByOperation.java @@ -1,6 +1,6 @@ package mycompiler.test.inferenceByCharacteristic; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByReturnType.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByReturnType.java index 4de16f852..5252b1f24 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByReturnType.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByReturnType.java @@ -2,15 +2,15 @@ package mycompiler.test.inferenceByCharacteristic; import java.util.Vector; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; import mycompiler.test.expectationTypes.MethodExpect; import mycompiler.test.expectationTypes.VarExpect; -import mycompiler.mytype.SuperWildcardType; /** * 4-05-08 diff --git a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceAcrossLevel.java b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceAcrossLevel.java index 7123952e5..7dbfefb58 100755 --- a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceAcrossLevel.java +++ b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceAcrossLevel.java @@ -1,6 +1,6 @@ package mycompiler.test.javaConcepts.inheritance; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceCircle.java b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceCircle.java index 62b514954..2184b4490 100755 --- a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceCircle.java +++ b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceCircle.java @@ -1,6 +1,6 @@ package mycompiler.test.javaConcepts.inheritance; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceConstructor.java b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceConstructor.java index 17a4070b5..7552296f8 100755 --- a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceConstructor.java +++ b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceConstructor.java @@ -1,6 +1,6 @@ package mycompiler.test.javaConcepts.inheritance; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceMultiple.java b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceMultiple.java index 7f3cc31c5..bf44556b4 100755 --- a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceMultiple.java +++ b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceMultiple.java @@ -1,6 +1,6 @@ package mycompiler.test.javaConcepts.inheritance; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceOverriding.java b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceOverriding.java index 06d501610..498ebdecd 100755 --- a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceOverriding.java +++ b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceOverriding.java @@ -1,6 +1,6 @@ package mycompiler.test.javaConcepts.inheritance; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceTwoHierarchies.java b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceTwoHierarchies.java index 023a5086b..32d98791b 100755 --- a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceTwoHierarchies.java +++ b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceTwoHierarchies.java @@ -1,6 +1,6 @@ package mycompiler.test.javaConcepts.inheritance; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/inheritance/TestSimpleInheritance.java b/test/mycompiler/test/javaConcepts/inheritance/TestSimpleInheritance.java index 4f36fd722..1eaa2d3dd 100755 --- a/test/mycompiler/test/javaConcepts/inheritance/TestSimpleInheritance.java +++ b/test/mycompiler/test/javaConcepts/inheritance/TestSimpleInheritance.java @@ -1,6 +1,6 @@ package mycompiler.test.javaConcepts.inheritance; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParameters.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParameters.java index 18622cc1d..89404d4d7 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParameters.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParameters.java @@ -5,7 +5,7 @@ package mycompiler.test.javaConcepts.overloading; * * */ -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParametersAndDifferentTypes.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParametersAndDifferentTypes.java index 919c600bd..e7b1b28ff 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParametersAndDifferentTypes.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParametersAndDifferentTypes.java @@ -5,7 +5,7 @@ package mycompiler.test.javaConcepts.overloading; * * */ -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericNotSameHierarchy.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericNotSameHierarchy.java index c31dec617..7ddcf6b3d 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericNotSameHierarchy.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericNotSameHierarchy.java @@ -7,9 +7,9 @@ package mycompiler.test.javaConcepts.overloading; */ import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericSameHierarchy.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericSameHierarchy.java index 27bcc7896..7ae0f93f6 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericSameHierarchy.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericSameHierarchy.java @@ -7,9 +7,9 @@ package mycompiler.test.javaConcepts.overloading; */ import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceNotSameHierarchy.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceNotSameHierarchy.java index 71abf6856..28b2fa37e 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceNotSameHierarchy.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceNotSameHierarchy.java @@ -7,11 +7,11 @@ package mycompiler.test.javaConcepts.overloading; */ import java.util.Vector; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceSameHierarchy.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceSameHierarchy.java index d8b4a5e8a..7748b4506 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceSameHierarchy.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceSameHierarchy.java @@ -2,17 +2,17 @@ package mycompiler.test.javaConcepts.overloading; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; import mycompiler.test.expectationTypes.MethodExpect; import mycompiler.test.expectationTypes.VarExpect; -import mycompiler.mytype.GenericTypeVar; public class OverloadingGenericTypeInferenceSameHierarchy extends AbstractInferenceTest { private final static String TESTEDCLASSNAME="OverloadingGenericTypeInferenceSameHierarchy"; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingNotSameHierarchy.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingNotSameHierarchy.java index 0a52914fa..30f86e927 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingNotSameHierarchy.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingNotSameHierarchy.java @@ -5,7 +5,7 @@ package mycompiler.test.javaConcepts.overloading; * * */ -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingSameHierarchy.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingSameHierarchy.java index f652f2f72..63813ef14 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingSameHierarchy.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingSameHierarchy.java @@ -5,7 +5,7 @@ package mycompiler.test.javaConcepts.overloading; * * */ -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceNotSameHierarchy.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceNotSameHierarchy.java index e9d69bf18..749902f97 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceNotSameHierarchy.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceNotSameHierarchy.java @@ -5,7 +5,7 @@ package mycompiler.test.javaConcepts.overloading; * * */ -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceSameHierarchy.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceSameHierarchy.java index 1c3b0d79a..031bd3432 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceSameHierarchy.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceSameHierarchy.java @@ -5,7 +5,7 @@ package mycompiler.test.javaConcepts.overloading; * * */ -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/staticAccess/TestNonStaticAccess.java b/test/mycompiler/test/javaConcepts/staticAccess/TestNonStaticAccess.java index 55ee1f6d3..14531571f 100755 --- a/test/mycompiler/test/javaConcepts/staticAccess/TestNonStaticAccess.java +++ b/test/mycompiler/test/javaConcepts/staticAccess/TestNonStaticAccess.java @@ -1,8 +1,8 @@ package mycompiler.test.javaConcepts.staticAccess; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/staticAccess/TestStaticAccess.java b/test/mycompiler/test/javaConcepts/staticAccess/TestStaticAccess.java index be6183ed9..b0c9fa2f8 100755 --- a/test/mycompiler/test/javaConcepts/staticAccess/TestStaticAccess.java +++ b/test/mycompiler/test/javaConcepts/staticAccess/TestStaticAccess.java @@ -1,8 +1,8 @@ package mycompiler.test.javaConcepts.staticAccess; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/staticAccess/TestStaticAccessError.java b/test/mycompiler/test/javaConcepts/staticAccess/TestStaticAccessError.java index 8b0e61a85..3c284eb9b 100755 --- a/test/mycompiler/test/javaConcepts/staticAccess/TestStaticAccessError.java +++ b/test/mycompiler/test/javaConcepts/staticAccess/TestStaticAccessError.java @@ -1,5 +1,5 @@ package mycompiler.test.javaConcepts.staticAccess; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/lambda/ConstructorTest.java b/test/mycompiler/test/lambda/ConstructorTest.java index b1ab6b916..c26e204ac 100755 --- a/test/mycompiler/test/lambda/ConstructorTest.java +++ b/test/mycompiler/test/lambda/ConstructorTest.java @@ -6,11 +6,11 @@ import static org.junit.Assert.fail; import java.util.Vector; import mycompiler.mytest.LambdaTest; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; -import typinferenz.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; public class ConstructorTest { @@ -31,7 +31,7 @@ public class ConstructorTest { Vector results = tester.runTest(); int anzahlGeparsterKlassen = 0; for(TypeinferenceResultSet res : results){ - mycompiler.myclass.Class cl = res.getInterferedClass(); + de.dhbwstuttgart.syntaxtree.Class cl = res.getInterferedClass(); TypeAssumptions ass = cl.getPublicFieldAssumptions(); if(cl.getName().equals("ConstructorTest1")){ anzahlGeparsterKlassen++; diff --git a/test/mycompiler/test/lambda/GenericParameterTest.java b/test/mycompiler/test/lambda/GenericParameterTest.java index b99317fa4..f0adfa957 100644 --- a/test/mycompiler/test/lambda/GenericParameterTest.java +++ b/test/mycompiler/test/lambda/GenericParameterTest.java @@ -1,10 +1,11 @@ package mycompiler.test.lambda; import mycompiler.mytest.LambdaTest; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; + public class GenericParameterTest { @Test public void test() { diff --git a/test/mycompiler/test/lambda/GenericVarTest.java b/test/mycompiler/test/lambda/GenericVarTest.java index 729809f2c..3999f8aa6 100755 --- a/test/mycompiler/test/lambda/GenericVarTest.java +++ b/test/mycompiler/test/lambda/GenericVarTest.java @@ -5,10 +5,11 @@ import static org.junit.Assert.*; import java.util.Vector; import mycompiler.mytest.LambdaTest; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; + public class GenericVarTest { @Test diff --git a/test/mycompiler/test/lambda/OverloadingTest.java b/test/mycompiler/test/lambda/OverloadingTest.java index cf8388d65..43fca0ac4 100755 --- a/test/mycompiler/test/lambda/OverloadingTest.java +++ b/test/mycompiler/test/lambda/OverloadingTest.java @@ -5,10 +5,11 @@ import static org.junit.Assert.*; import java.util.Vector; import mycompiler.mytest.LambdaTest; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; + public class OverloadingTest { @Test diff --git a/test/mycompiler/test/lambda/ParseMultipleFilesTest.java b/test/mycompiler/test/lambda/ParseMultipleFilesTest.java index cebc22648..d2c054370 100755 --- a/test/mycompiler/test/lambda/ParseMultipleFilesTest.java +++ b/test/mycompiler/test/lambda/ParseMultipleFilesTest.java @@ -4,11 +4,11 @@ import java.util.Vector; import static org.junit.Assert.*; import mycompiler.mytest.LambdaTest; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; -import typinferenz.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; public class ParseMultipleFilesTest { @@ -29,7 +29,7 @@ public class ParseMultipleFilesTest { Vector results = tester.runTest(); int anzahlGeparsterKlassen = 0; for(TypeinferenceResultSet res : results){ - mycompiler.myclass.Class cl = res.getInterferedClass(); + de.dhbwstuttgart.syntaxtree.Class cl = res.getInterferedClass(); TypeAssumptions ass = cl.getPublicFieldAssumptions(); if(cl.getName().equals("Klasse1")){ anzahlGeparsterKlassen++; diff --git a/test/mycompiler/test/lambda/TestAssign.java b/test/mycompiler/test/lambda/TestAssign.java index 83e101c74..149a9213d 100755 --- a/test/mycompiler/test/lambda/TestAssign.java +++ b/test/mycompiler/test/lambda/TestAssign.java @@ -5,10 +5,11 @@ import java.util.Vector; import junit.framework.TestCase; import mycompiler.mytest.LambdaTest; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; + public class TestAssign extends TestCase{ private static final String exampleJavFile = "TestAssign.jav"; diff --git a/test/mycompiler/test/lambda/TestLambda.java b/test/mycompiler/test/lambda/TestLambda.java index 71abf1373..4c540f483 100755 --- a/test/mycompiler/test/lambda/TestLambda.java +++ b/test/mycompiler/test/lambda/TestLambda.java @@ -5,10 +5,11 @@ import static org.junit.Assert.*; import java.util.HashMap; import mycompiler.mytest.LambdaTest; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; + public class TestLambda { private static final String exampleJavFile = "TestLambda.jav"; diff --git a/test/mycompiler/test/lambda/TestWhile.java b/test/mycompiler/test/lambda/TestWhile.java index 4d04fca96..974b14bd5 100755 --- a/test/mycompiler/test/lambda/TestWhile.java +++ b/test/mycompiler/test/lambda/TestWhile.java @@ -6,14 +6,14 @@ import java.util.HashMap; import java.util.Vector; import mycompiler.mytest.LambdaTest; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import org.junit.Test; -import typinferenz.assumptions.TypeAssumptions; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; public class TestWhile { diff --git a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestExtendedOLD.java b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestExtendedOLD.java index d71deb109..6ebc1e457 100755 --- a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestExtendedOLD.java +++ b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestExtendedOLD.java @@ -3,7 +3,7 @@ package mycompiler.test.notUsedAnymore; import java.util.HashMap; import java.util.Vector; -import mycompiler.mytype.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; diff --git a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOLD_2.java b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOLD_2.java index d435f175e..c5dc6b913 100755 --- a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOLD_2.java +++ b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOLD_2.java @@ -5,13 +5,13 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.mytype.GenericTypeVar; import mycompiler.mytypereconstruction.CIntersectionType; import mycompiler.mytypereconstruction.CSubstitution; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; diff --git a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOld.java b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOld.java index 0448fcb81..59ca47f72 100755 --- a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOld.java +++ b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOld.java @@ -5,16 +5,16 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CIntersectionType; import mycompiler.mytypereconstruction.CSubstitution; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; diff --git a/test/mycompiler/test/notUsedAnymore/CTypeAssumptionWrapper.java b/test/mycompiler/test/notUsedAnymore/CTypeAssumptionWrapper.java index 7d4c42ae9..4bc8c82ca 100755 --- a/test/mycompiler/test/notUsedAnymore/CTypeAssumptionWrapper.java +++ b/test/mycompiler/test/notUsedAnymore/CTypeAssumptionWrapper.java @@ -1,6 +1,6 @@ package mycompiler.test.notUsedAnymore; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; public class CTypeAssumptionWrapper { diff --git a/test/mycompiler/test/notUsedAnymore/IResultValidator.java b/test/mycompiler/test/notUsedAnymore/IResultValidator.java index 7aba75bc3..55f28f0c3 100755 --- a/test/mycompiler/test/notUsedAnymore/IResultValidator.java +++ b/test/mycompiler/test/notUsedAnymore/IResultValidator.java @@ -2,7 +2,7 @@ package mycompiler.test.notUsedAnymore; import java.util.Vector; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; public interface IResultValidator { diff --git a/test/mycompiler/test/notUsedAnymore/TestAbstractInferenceTest2.java b/test/mycompiler/test/notUsedAnymore/TestAbstractInferenceTest2.java index 527aa8101..a64868578 100755 --- a/test/mycompiler/test/notUsedAnymore/TestAbstractInferenceTest2.java +++ b/test/mycompiler/test/notUsedAnymore/TestAbstractInferenceTest2.java @@ -1,8 +1,8 @@ package mycompiler.test.notUsedAnymore; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/notUsedAnymore/TestConstantsWithoutType.java b/test/mycompiler/test/notUsedAnymore/TestConstantsWithoutType.java index 5b9a001d7..971aee158 100755 --- a/test/mycompiler/test/notUsedAnymore/TestConstantsWithoutType.java +++ b/test/mycompiler/test/notUsedAnymore/TestConstantsWithoutType.java @@ -1,6 +1,6 @@ package mycompiler.test.notUsedAnymore; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/notUsedAnymore/TestGenerics.java b/test/mycompiler/test/notUsedAnymore/TestGenerics.java index 001bffae6..77f37f8d7 100755 --- a/test/mycompiler/test/notUsedAnymore/TestGenerics.java +++ b/test/mycompiler/test/notUsedAnymore/TestGenerics.java @@ -2,9 +2,9 @@ package mycompiler.test.notUsedAnymore; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/notUsedAnymore/TestInheritanceCheckValidImplementationFromInterface.java b/test/mycompiler/test/notUsedAnymore/TestInheritanceCheckValidImplementationFromInterface.java index 1f8c15d8b..946001d8f 100755 --- a/test/mycompiler/test/notUsedAnymore/TestInheritanceCheckValidImplementationFromInterface.java +++ b/test/mycompiler/test/notUsedAnymore/TestInheritanceCheckValidImplementationFromInterface.java @@ -1,7 +1,7 @@ package mycompiler.test.notUsedAnymore; -import mycompiler.mytype.RefType; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/notUsedAnymore/TestMethodReturnType.java b/test/mycompiler/test/notUsedAnymore/TestMethodReturnType.java index 00bc3cceb..ff24c613f 100755 --- a/test/mycompiler/test/notUsedAnymore/TestMethodReturnType.java +++ b/test/mycompiler/test/notUsedAnymore/TestMethodReturnType.java @@ -1,8 +1,8 @@ package mycompiler.test.notUsedAnymore; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative.java b/test/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative.java index 2e8590745..7f333dedd 100755 --- a/test/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative.java +++ b/test/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative.java @@ -1,6 +1,6 @@ package mycompiler.test.notUsedAnymore; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative2.java b/test/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative2.java index 63ec83fd1..da9a797a7 100755 --- a/test/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative2.java +++ b/test/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative2.java @@ -1,6 +1,6 @@ package mycompiler.test.notUsedAnymore; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/operators/TestOperatorArithmetic.java b/test/mycompiler/test/operators/TestOperatorArithmetic.java index f250c7dc3..0a2aa5979 100755 --- a/test/mycompiler/test/operators/TestOperatorArithmetic.java +++ b/test/mycompiler/test/operators/TestOperatorArithmetic.java @@ -1,8 +1,8 @@ package mycompiler.test.operators; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/operators/TestOperatorBitwise.java b/test/mycompiler/test/operators/TestOperatorBitwise.java index dc13f9c03..337627d03 100755 --- a/test/mycompiler/test/operators/TestOperatorBitwise.java +++ b/test/mycompiler/test/operators/TestOperatorBitwise.java @@ -1,6 +1,6 @@ package mycompiler.test.operators; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/operators/TestOperatorBool.java b/test/mycompiler/test/operators/TestOperatorBool.java index 794220229..38e10d116 100755 --- a/test/mycompiler/test/operators/TestOperatorBool.java +++ b/test/mycompiler/test/operators/TestOperatorBool.java @@ -1,6 +1,6 @@ package mycompiler.test.operators; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/operators/TestOperatorComparison.java b/test/mycompiler/test/operators/TestOperatorComparison.java index 9038e505e..e8ecd727d 100755 --- a/test/mycompiler/test/operators/TestOperatorComparison.java +++ b/test/mycompiler/test/operators/TestOperatorComparison.java @@ -1,9 +1,9 @@ package mycompiler.test.operators; import java.util.Vector; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.IntegerType; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/operators/TestOperatorIncrement.java b/test/mycompiler/test/operators/TestOperatorIncrement.java index 2910afd6b..0af789063 100755 --- a/test/mycompiler/test/operators/TestOperatorIncrement.java +++ b/test/mycompiler/test/operators/TestOperatorIncrement.java @@ -1,8 +1,8 @@ package mycompiler.test.operators; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/operators/TestOperatorObjects.java b/test/mycompiler/test/operators/TestOperatorObjects.java index 7d5bb1c64..f9cccff4c 100755 --- a/test/mycompiler/test/operators/TestOperatorObjects.java +++ b/test/mycompiler/test/operators/TestOperatorObjects.java @@ -1,5 +1,5 @@ package mycompiler.test.operators; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/operators/TestOperatorString.java b/test/mycompiler/test/operators/TestOperatorString.java index a1aa6f7ea..3b778ccc0 100755 --- a/test/mycompiler/test/operators/TestOperatorString.java +++ b/test/mycompiler/test/operators/TestOperatorString.java @@ -1,5 +1,5 @@ package mycompiler.test.operators; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/primitiveTypes/BooleanTest.java b/test/mycompiler/test/primitiveTypes/BooleanTest.java index bc99f4ca2..ad3f59c38 100755 --- a/test/mycompiler/test/primitiveTypes/BooleanTest.java +++ b/test/mycompiler/test/primitiveTypes/BooleanTest.java @@ -1,6 +1,6 @@ package mycompiler.test.primitiveTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/primitiveTypes/ByteTest.java b/test/mycompiler/test/primitiveTypes/ByteTest.java index 4050ae397..a283d6d1b 100755 --- a/test/mycompiler/test/primitiveTypes/ByteTest.java +++ b/test/mycompiler/test/primitiveTypes/ByteTest.java @@ -1,6 +1,6 @@ package mycompiler.test.primitiveTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.BlockExpect; import mycompiler.test.expectationTypes.ClassExpect; diff --git a/test/mycompiler/test/primitiveTypes/CharTest.java b/test/mycompiler/test/primitiveTypes/CharTest.java index 53cc277d1..7cd905cee 100755 --- a/test/mycompiler/test/primitiveTypes/CharTest.java +++ b/test/mycompiler/test/primitiveTypes/CharTest.java @@ -1,6 +1,6 @@ package mycompiler.test.primitiveTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/primitiveTypes/DoubleTest.java b/test/mycompiler/test/primitiveTypes/DoubleTest.java index 367cc791a..597fa8d52 100755 --- a/test/mycompiler/test/primitiveTypes/DoubleTest.java +++ b/test/mycompiler/test/primitiveTypes/DoubleTest.java @@ -1,6 +1,6 @@ package mycompiler.test.primitiveTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/primitiveTypes/FloatTest.java b/test/mycompiler/test/primitiveTypes/FloatTest.java index ece240eea..a910b8294 100755 --- a/test/mycompiler/test/primitiveTypes/FloatTest.java +++ b/test/mycompiler/test/primitiveTypes/FloatTest.java @@ -1,6 +1,6 @@ package mycompiler.test.primitiveTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/primitiveTypes/IntegerTest.java b/test/mycompiler/test/primitiveTypes/IntegerTest.java index fedbde4aa..42a6559ce 100755 --- a/test/mycompiler/test/primitiveTypes/IntegerTest.java +++ b/test/mycompiler/test/primitiveTypes/IntegerTest.java @@ -1,6 +1,6 @@ package mycompiler.test.primitiveTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/primitiveTypes/LongTest.java b/test/mycompiler/test/primitiveTypes/LongTest.java index ddb1b41db..8951408cd 100755 --- a/test/mycompiler/test/primitiveTypes/LongTest.java +++ b/test/mycompiler/test/primitiveTypes/LongTest.java @@ -1,6 +1,6 @@ package mycompiler.test.primitiveTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/primitiveTypes/StringTest.java b/test/mycompiler/test/primitiveTypes/StringTest.java index 01f64cbcc..4c538aee6 100755 --- a/test/mycompiler/test/primitiveTypes/StringTest.java +++ b/test/mycompiler/test/primitiveTypes/StringTest.java @@ -1,6 +1,6 @@ package mycompiler.test.primitiveTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/primitiveTypes/TestSimpleTypes.java b/test/mycompiler/test/primitiveTypes/TestSimpleTypes.java index 839c51e6a..bbdfac28c 100755 --- a/test/mycompiler/test/primitiveTypes/TestSimpleTypes.java +++ b/test/mycompiler/test/primitiveTypes/TestSimpleTypes.java @@ -1,8 +1,8 @@ package mycompiler.test.primitiveTypes; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.CharacterType; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.CharacterType; +import de.dhbwstuttgart.syntaxtree.type.IntegerType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestClassEmptyGenerics.java b/test/mycompiler/test/trivial/TestClassEmptyGenerics.java index 4c24c3817..8556a7f5e 100755 --- a/test/mycompiler/test/trivial/TestClassEmptyGenerics.java +++ b/test/mycompiler/test/trivial/TestClassEmptyGenerics.java @@ -1,6 +1,6 @@ package mycompiler.test.trivial; -import mycompiler.mytype.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestClassMember.java b/test/mycompiler/test/trivial/TestClassMember.java index 7d3ee1cc1..6c36a6367 100755 --- a/test/mycompiler/test/trivial/TestClassMember.java +++ b/test/mycompiler/test/trivial/TestClassMember.java @@ -2,8 +2,8 @@ package mycompiler.test.trivial; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestClassMemberAssignment.java b/test/mycompiler/test/trivial/TestClassMemberAssignment.java index ea3da679a..9d244ea9a 100755 --- a/test/mycompiler/test/trivial/TestClassMemberAssignment.java +++ b/test/mycompiler/test/trivial/TestClassMemberAssignment.java @@ -2,8 +2,8 @@ package mycompiler.test.trivial; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestConstants.java b/test/mycompiler/test/trivial/TestConstants.java index 9170c3b7b..cc6f9852a 100755 --- a/test/mycompiler/test/trivial/TestConstants.java +++ b/test/mycompiler/test/trivial/TestConstants.java @@ -1,6 +1,6 @@ package mycompiler.test.trivial; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestConstructor.java b/test/mycompiler/test/trivial/TestConstructor.java index 7e25ddf11..8fee9776a 100755 --- a/test/mycompiler/test/trivial/TestConstructor.java +++ b/test/mycompiler/test/trivial/TestConstructor.java @@ -1,6 +1,6 @@ package mycompiler.test.trivial; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestConstructorNegative.java b/test/mycompiler/test/trivial/TestConstructorNegative.java index 8a842de2d..56e6e299c 100755 --- a/test/mycompiler/test/trivial/TestConstructorNegative.java +++ b/test/mycompiler/test/trivial/TestConstructorNegative.java @@ -1,6 +1,6 @@ package mycompiler.test.trivial; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestInterfaceMember.java b/test/mycompiler/test/trivial/TestInterfaceMember.java index 9ee65c2bb..b1a42a20e 100755 --- a/test/mycompiler/test/trivial/TestInterfaceMember.java +++ b/test/mycompiler/test/trivial/TestInterfaceMember.java @@ -1,6 +1,6 @@ package mycompiler.test.trivial; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestInterfaceMethod.java b/test/mycompiler/test/trivial/TestInterfaceMethod.java index 77dcbd7ac..af58cf8ae 100755 --- a/test/mycompiler/test/trivial/TestInterfaceMethod.java +++ b/test/mycompiler/test/trivial/TestInterfaceMethod.java @@ -1,6 +1,6 @@ package mycompiler.test.trivial; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestInterfaceNotInferenced.java b/test/mycompiler/test/trivial/TestInterfaceNotInferenced.java index c3193ed0e..cce9d8775 100755 --- a/test/mycompiler/test/trivial/TestInterfaceNotInferenced.java +++ b/test/mycompiler/test/trivial/TestInterfaceNotInferenced.java @@ -1,6 +1,6 @@ package mycompiler.test.trivial; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestMethodEmpty.java b/test/mycompiler/test/trivial/TestMethodEmpty.java index 73f26ac49..05b1f535f 100755 --- a/test/mycompiler/test/trivial/TestMethodEmpty.java +++ b/test/mycompiler/test/trivial/TestMethodEmpty.java @@ -1,6 +1,6 @@ package mycompiler.test.trivial; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestMethodEmptyGeneric.java b/test/mycompiler/test/trivial/TestMethodEmptyGeneric.java index 63b2d81d7..26325c4eb 100755 --- a/test/mycompiler/test/trivial/TestMethodEmptyGeneric.java +++ b/test/mycompiler/test/trivial/TestMethodEmptyGeneric.java @@ -1,7 +1,7 @@ package mycompiler.test.trivial; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestMethodEmptyParameter.java b/test/mycompiler/test/trivial/TestMethodEmptyParameter.java index 275ce90f3..e0503619c 100755 --- a/test/mycompiler/test/trivial/TestMethodEmptyParameter.java +++ b/test/mycompiler/test/trivial/TestMethodEmptyParameter.java @@ -1,6 +1,6 @@ package mycompiler.test.trivial; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestMethodEmptyParameterGenericExtends.java b/test/mycompiler/test/trivial/TestMethodEmptyParameterGenericExtends.java index a1b672dd8..18d8c7a1d 100755 --- a/test/mycompiler/test/trivial/TestMethodEmptyParameterGenericExtends.java +++ b/test/mycompiler/test/trivial/TestMethodEmptyParameterGenericExtends.java @@ -2,10 +2,10 @@ package mycompiler.test.trivial; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java index 51aea795b..3b7a9b5e1 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java @@ -3,21 +3,22 @@ package mycompiler.test.unittest.typeReconstructionTest; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.SourceFile; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassBody; -import mycompiler.myclass.UsedId; import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.unify.FC_TTO; import org.apache.log4j.Logger; import org.apache.log4j.xml.DOMConfigurator; +import de.dhbwstuttgart.core.SourceFile; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ClassBody; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; + public class TrMakeFCTest extends TestCase{ /* makeFC() is not being tested according to unit test specs -> used objects cannot be mocked*/ diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java index ef3866204..13f151ba1 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java @@ -4,20 +4,8 @@ package mycompiler.test.unittest.typeReconstructionTest; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.SourceFile; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassBody; -import mycompiler.myclass.UsedId; import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Pair.PairOperator; import mycompiler.mytypereconstruction.unify.FC_TTO; import mycompiler.mytypereconstruction.unify.Unify; @@ -27,6 +15,19 @@ import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; +import de.dhbwstuttgart.core.SourceFile; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ClassBody; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; + /*TODO: - mock makeFC and needs to be relocated (now called for every test) * - erase2 -> FreshWildcardType?? * - reduce2 wird niemals verwendet!!! <-> erase3 diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java index 88490fec0..de3afa943 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java @@ -3,19 +3,8 @@ package mycompiler.test.unittest.typeReconstructionTest; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.SourceFile; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassBody; -import mycompiler.myclass.UsedId; import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Pair.PairOperator; import mycompiler.mytypereconstruction.unify.FC_TTO; import mycompiler.mytypereconstruction.unify.Unify; @@ -24,6 +13,18 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; +import de.dhbwstuttgart.core.SourceFile; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ClassBody; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; + public class TrUnifyTest extends TestCase { FC_TTO fc=null; diff --git a/test/parser/GeneralParserTest.java b/test/parser/GeneralParserTest.java index 3349d324c..7edd2fb8f 100644 --- a/test/parser/GeneralParserTest.java +++ b/test/parser/GeneralParserTest.java @@ -11,11 +11,12 @@ import java.nio.file.Paths; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; import org.junit.Test; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; + /** * Dieser Test prüft nur, ob .java-Dateien fehlerfrei geparst werden. * Der dabei erstellte Syntaxbaum wird nicht kontrolliert. diff --git a/test/plugindevelopment/InsertSingleTypeTest.java b/test/plugindevelopment/InsertSingleTypeTest.java index 0a524771a..ce73fefc2 100644 --- a/test/plugindevelopment/InsertSingleTypeTest.java +++ b/test/plugindevelopment/InsertSingleTypeTest.java @@ -10,13 +10,13 @@ import java.util.Vector; import org.junit.Test; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.myparser.JavaParser.yyException; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; -import typinferenz.typedeployment.TypeInsertPoint; -import typinferenz.typedeployment.TypeInsertSet; public class InsertSingleTypeTest { private static final String testFile = "SingleTypeInsertTest.jav"; diff --git a/test/plugindevelopment/MartinTestCases/Tester.java b/test/plugindevelopment/MartinTestCases/Tester.java index ddea7b3b8..cd5cbebb9 100644 --- a/test/plugindevelopment/MartinTestCases/Tester.java +++ b/test/plugindevelopment/MartinTestCases/Tester.java @@ -6,14 +6,14 @@ import java.util.Vector; import org.junit.Test; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import plugindevelopment.TypeInsertTester; import plugindevelopment.TypeInsertTests.MultipleTypesInsertTester; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.myparser.JavaParser.yyException; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; -import typinferenz.typedeployment.TypeInsertSet; public class Tester extends TypeInsertTester{ diff --git a/test/plugindevelopment/TRMEqualTest.java b/test/plugindevelopment/TRMEqualTest.java index 888daf427..01fa86985 100644 --- a/test/plugindevelopment/TRMEqualTest.java +++ b/test/plugindevelopment/TRMEqualTest.java @@ -9,22 +9,22 @@ import java.util.Vector; import org.junit.Test; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.SyntaxTreeNode; -import mycompiler.myparser.JavaParser.yyException; -import mycompiler.mytype.Pair; -import mycompiler.mytype.Pair.PairOperator; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import typinferenz.ResultSet; -import typinferenz.TypeInsertable; -import typinferenz.typedeployment.TypeInsertPoint; -import typinferenz.typedeployment.TypeInsertSet; public class TRMEqualTest { Vector replaceSet = new Vector(); diff --git a/test/plugindevelopment/TypeInsertSetEqualTest.java b/test/plugindevelopment/TypeInsertSetEqualTest.java index 592a9f1e2..ade51473e 100644 --- a/test/plugindevelopment/TypeInsertSetEqualTest.java +++ b/test/plugindevelopment/TypeInsertSetEqualTest.java @@ -5,14 +5,14 @@ import java.io.IOException; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.myparser.JavaParser.yyException; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; -import typinferenz.typedeployment.TypeInsertSet; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; public class TypeInsertSetEqualTest { diff --git a/test/plugindevelopment/TypeInsertTester.java b/test/plugindevelopment/TypeInsertTester.java index f1129eac2..a0e79f993 100644 --- a/test/plugindevelopment/TypeInsertTester.java +++ b/test/plugindevelopment/TypeInsertTester.java @@ -17,14 +17,14 @@ import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import org.apache.log4j.SimpleLayout; -import typinferenz.typedeployment.TypeInsertPoint; -import typinferenz.typedeployment.TypeInsertSet; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.myparser.JavaParser.yyException; import mycompiler.mytest.LambdaTest; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; public class TypeInsertTester{ diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest22.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest22.jav index 001e3d5bb..0cdc36b1c 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest22.jav +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest22.jav @@ -3,7 +3,7 @@ import java.util.Vector; class Matrix extends Vector> { Matrix mul(m){ - Vector> ret; + ret; ret = new Matrix(); i; i = 0; diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest22.java b/test/plugindevelopment/TypeInsertTests/LambdaTest22.java index 569bfb2f8..bf97eeebd 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest22.java +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest22.java @@ -10,7 +10,7 @@ public class LambdaTest22 { @Test public void run(){ Vector mustContain = new Vector(); - mustContain.add("TestIfStmt var"); + mustContain.add("Matrix ret"); MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); } } diff --git a/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java b/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java index ca337c4b1..64233edd0 100644 --- a/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java +++ b/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java @@ -4,14 +4,14 @@ import java.io.File; import java.io.IOException; import java.util.Vector; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import plugindevelopment.TypeInsertTester; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.myparser.JavaParser.yyException; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; -import typinferenz.typedeployment.TypeInsertPoint; -import typinferenz.typedeployment.TypeInsertSet; public class MultipleTypesInsertTester extends TypeInsertTester{ diff --git a/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.java b/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.java index 77e3ea9d9..18cb01a73 100644 --- a/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.java +++ b/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.java @@ -5,14 +5,14 @@ import java.io.IOException; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.myparser.JavaParser.yyException; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; -import typinferenz.typedeployment.TypeInsertSet; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; public class OverloadingInsertTest { private static final String TEST_FILE = "OverloadingInsertTest.jav"; diff --git a/test/syntaxTree/NodeEqualTest.java b/test/syntaxTree/NodeEqualTest.java index 312d4a368..daaaf534c 100644 --- a/test/syntaxTree/NodeEqualTest.java +++ b/test/syntaxTree/NodeEqualTest.java @@ -4,14 +4,13 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.SourceFile; -import mycompiler.SyntaxTreeNode; -import mycompiler.myparser.JavaParser.yyException; - import org.junit.Test; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.core.SourceFile; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import junit.framework.TestCase; public class NodeEqualTest extends TestCase{ From 585ca78de82ebaeea571d01fadd392a76dafee4d Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 2 Sep 2014 10:34:06 +0200 Subject: [PATCH 03/46] =?UTF-8?q?Tests=20angef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TypeInsertTests/LambdaTest23.jav | 14 ++++++++++++++ .../TypeInsertTests/LambdaTest23.java | 16 ++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest23.jav create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest23.java diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav new file mode 100644 index 000000000..1d4b28d80 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav @@ -0,0 +1,14 @@ +import java.util.Vector; + +class Matrix extends Vector> { + + Matrix mul(m){ + ret; + ret = new Matrix(); + i; + i = this.size(); + + return ret; + } + +} \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest23.java b/test/plugindevelopment/TypeInsertTests/LambdaTest23.java new file mode 100644 index 000000000..e406551f1 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest23.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class LambdaTest23 { + private static final String TEST_FILE = "LambdaTest23.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + mustContain.add("Matrix ret"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} From 01c6a934edb79dbf03ff7df7ad4d17bc2ded1e0a Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 2 Sep 2014 11:07:16 +0200 Subject: [PATCH 04/46] Projekt umstrukturierung --- src/de/dhbwstuttgart/core/SourceFile.java | 4 ++-- src/de/dhbwstuttgart/syntaxtree/Class.java | 5 +++-- src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java | 3 +-- src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java | 3 +-- src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java | 3 +-- src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java | 3 +-- src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java | 3 +-- src/de/dhbwstuttgart/syntaxtree/operator/Operator.java | 3 +-- src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java | 3 +-- src/de/dhbwstuttgart/syntaxtree/statement/Assign.java | 3 ++- src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java | 3 ++- src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java | 2 +- src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java | 5 +++-- src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java | 3 ++- src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java | 5 +++-- src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java | 3 ++- src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java | 3 ++- src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java | 3 ++- src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java | 3 ++- src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java | 3 ++- src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java | 3 ++- src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java | 3 ++- .../dhbwstuttgart/typeinference}/unify/FC_TTO.java | 2 +- .../dhbwstuttgart/typeinference}/unify/MUB.java | 2 +- .../dhbwstuttgart/typeinference}/unify/Unify.java | 2 +- src/mycompiler/mytypereconstruction/CSupportData.java | 3 +-- .../test/unittest/typeReconstructionTest/TrMakeFCTest.java | 2 +- .../test/unittest/typeReconstructionTest/TrSubUnifyTest.java | 4 ++-- .../test/unittest/typeReconstructionTest/TrUnifyTest.java | 4 ++-- 29 files changed, 48 insertions(+), 43 deletions(-) rename src/{mycompiler/mytypereconstruction => de/dhbwstuttgart/typeinference}/unify/FC_TTO.java (96%) rename src/{mycompiler/mytypereconstruction => de/dhbwstuttgart/typeinference}/unify/MUB.java (95%) rename src/{mycompiler/mytypereconstruction => de/dhbwstuttgart/typeinference}/unify/Unify.java (99%) diff --git a/src/de/dhbwstuttgart/core/SourceFile.java b/src/de/dhbwstuttgart/core/SourceFile.java index 4ebc3d9c5..ed48e266e 100755 --- a/src/de/dhbwstuttgart/core/SourceFile.java +++ b/src/de/dhbwstuttgart/core/SourceFile.java @@ -24,8 +24,6 @@ import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.FC_TTO; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; @@ -60,6 +58,8 @@ import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.unify.FC_TTO; +import de.dhbwstuttgart.typeinference.unify.Unify; import mycompiler.myclass.*; import mycompiler.*; import sun.reflect.generics.reflectiveObjects.NotImplementedException; diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index 822984635..fa85019ee 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -33,8 +33,6 @@ import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; -import mycompiler.mytypereconstruction.unify.FC_TTO; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -67,6 +65,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.AClassOrInterface; @@ -90,6 +89,8 @@ import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.unify.FC_TTO; +import de.dhbwstuttgart.typeinference.unify.Unify; import sun.reflect.generics.reflectiveObjects.NotImplementedException; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java index fcd93bc91..85d3b9b26 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java @@ -17,6 +17,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.unify.Unify; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.myexception.CTypeReconstructionException; @@ -26,8 +27,6 @@ import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.unify.Unify; -// ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java index 059b94350..f901f2423 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java @@ -10,6 +10,7 @@ import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Null; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.typeinference.unify.Unify; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -20,8 +21,6 @@ import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.unify.Unify; -// ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java index 98f298719..5b019a080 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java @@ -20,6 +20,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.unify.Unify; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -30,8 +31,6 @@ import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.unify.Unify; -// ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java index 23fb3c3e6..10a57ee77 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java @@ -14,14 +14,13 @@ import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.unify.Unify; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.unify.Unify; -// ino.end // ino.class.MulOp.24231.declaration public abstract class MulOp extends Operator diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java index 9d566ba5d..044e6fb1e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java @@ -10,6 +10,7 @@ import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Null; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.typeinference.unify.Unify; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -20,8 +21,6 @@ import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.unify.Unify; -// ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java index dde6d288e..dc6a52a4e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java @@ -20,6 +20,7 @@ import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.unify.Unify; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -30,8 +31,6 @@ import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.unify.Unify; -// ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java index 7ea190334..9e984c2a0 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java @@ -14,6 +14,7 @@ import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.unify.Unify; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.myexception.CTypeReconstructionException; @@ -23,8 +24,6 @@ import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.unify.Unify; -// ino.end // ino.class.RelOp.24299.declaration public abstract class RelOp extends Operator diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java index 2d8e125ee..04c75d2a8 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java @@ -22,7 +22,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; @@ -35,6 +34,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -48,6 +48,7 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java index 89458d433..76a38c5de 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java @@ -12,16 +12,17 @@ import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end + import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.unify.Unify; // ino.class.ExprStmt.25265.declaration public abstract class ExprStmt extends Statement implements ITypeReplacementListener diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java index 16c7de494..e8a752b2b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java @@ -19,7 +19,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; @@ -36,6 +35,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; import sun.reflect.generics.reflectiveObjects.NotImplementedException; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java index 8660dba0e..f46f531e6 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java @@ -22,8 +22,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.MUB; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -38,6 +36,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.operator.LogOp; @@ -56,6 +55,8 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.MUB; +import de.dhbwstuttgart.typeinference.unify.Unify; import sun.reflect.generics.reflectiveObjects.NotImplementedException; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java index 86f93b4e0..1082d3d9e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java @@ -20,7 +20,6 @@ import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import mycompiler.mytypereconstruction.typeassumptionkey.CInstVarKey; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -39,6 +38,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.misc.UsedId; @@ -56,6 +56,7 @@ import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.FieldAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java index 2e61c530e..49b0d48bb 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java @@ -28,8 +28,6 @@ import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; -import mycompiler.mytypereconstruction.unify.FC_TTO; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -46,6 +44,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassBody; @@ -68,6 +67,8 @@ import de.dhbwstuttgart.typeinference.Overloading; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.FC_TTO; +import de.dhbwstuttgart.typeinference.unify.Unify; import sun.reflect.generics.reflectiveObjects.NotImplementedException; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java index 0c43064ac..a702fef3b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java @@ -18,7 +18,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -32,6 +31,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -43,6 +43,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java index b86208ce3..ba45d57d9 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java @@ -17,7 +17,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -33,6 +32,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.BooleanType; @@ -46,6 +46,7 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.OderConstraint; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java index e8d7293e7..352f11543 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java @@ -19,7 +19,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -33,6 +32,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -44,6 +44,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java index 2aed476d7..30ba7ee96 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java @@ -19,7 +19,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -36,6 +35,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -50,6 +50,7 @@ import de.dhbwstuttgart.typeinference.OderConstraint; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java index bba294885..a95f64816 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java @@ -19,7 +19,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -33,6 +32,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -44,6 +44,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java index fdef93775..191216e98 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java @@ -19,7 +19,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -33,6 +32,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -44,6 +44,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java index 600e3fb21..2f5458b96 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java @@ -21,7 +21,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -36,6 +35,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.operator.LogOp; @@ -51,6 +51,7 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; import sun.reflect.generics.reflectiveObjects.NotImplementedException; diff --git a/src/mycompiler/mytypereconstruction/unify/FC_TTO.java b/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java similarity index 96% rename from src/mycompiler/mytypereconstruction/unify/FC_TTO.java rename to src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java index 651f02d53..9bfd99b32 100755 --- a/src/mycompiler/mytypereconstruction/unify/FC_TTO.java +++ b/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java @@ -1,5 +1,5 @@ // ino.module.FC_TTO.8719.package -package mycompiler.mytypereconstruction.unify; +package de.dhbwstuttgart.typeinference.unify; // ino.end // ino.module.FC_TTO.8719.import diff --git a/src/mycompiler/mytypereconstruction/unify/MUB.java b/src/de/dhbwstuttgart/typeinference/unify/MUB.java similarity index 95% rename from src/mycompiler/mytypereconstruction/unify/MUB.java rename to src/de/dhbwstuttgart/typeinference/unify/MUB.java index c050b6d6d..7fd2213f7 100755 --- a/src/mycompiler/mytypereconstruction/unify/MUB.java +++ b/src/de/dhbwstuttgart/typeinference/unify/MUB.java @@ -1,5 +1,5 @@ // ino.module.MUB.8720.package -package mycompiler.mytypereconstruction.unify; +package de.dhbwstuttgart.typeinference.unify; // ino.end // ino.module.MUB.8720.import diff --git a/src/mycompiler/mytypereconstruction/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java similarity index 99% rename from src/mycompiler/mytypereconstruction/unify/Unify.java rename to src/de/dhbwstuttgart/typeinference/unify/Unify.java index 2be23e210..33bf95533 100755 --- a/src/mycompiler/mytypereconstruction/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -1,6 +1,6 @@ //otth/pluemicke2.1.jav funktioniert nicht xxx anschauen // ino.module.Unify.8721.package -package mycompiler.mytypereconstruction.unify; +package de.dhbwstuttgart.typeinference.unify; // ino.end // ino.module.Unify.8721.import import java.util.Enumeration; diff --git a/src/mycompiler/mytypereconstruction/CSupportData.java b/src/mycompiler/mytypereconstruction/CSupportData.java index 199f033ae..7ddb28cc4 100755 --- a/src/mycompiler/mytypereconstruction/CSupportData.java +++ b/src/mycompiler/mytypereconstruction/CSupportData.java @@ -8,8 +8,7 @@ import java.util.Vector; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import mycompiler.mytypereconstruction.unify.FC_TTO; -// ino.end +import de.dhbwstuttgart.typeinference.unify.FC_TTO; // ino.class.CSupportData.27076.description type=javadoc /** diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java index 3b7a9b5e1..54f6a05b6 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java @@ -5,7 +5,6 @@ import java.util.Vector; import junit.framework.TestCase; import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; -import mycompiler.mytypereconstruction.unify.FC_TTO; import org.apache.log4j.Logger; import org.apache.log4j.xml.DOMConfigurator; @@ -18,6 +17,7 @@ import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.unify.FC_TTO; public class TrMakeFCTest extends TestCase{ diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java index 13f151ba1..c24539c15 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java @@ -6,8 +6,6 @@ import java.util.Vector; import junit.framework.TestCase; import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; -import mycompiler.mytypereconstruction.unify.FC_TTO; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; import org.apache.log4j.xml.DOMConfigurator; @@ -27,6 +25,8 @@ import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; +import de.dhbwstuttgart.typeinference.unify.FC_TTO; +import de.dhbwstuttgart.typeinference.unify.Unify; /*TODO: - mock makeFC and needs to be relocated (now called for every test) * - erase2 -> FreshWildcardType?? diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java index de3afa943..fc76f76d8 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java @@ -5,8 +5,6 @@ import java.util.Vector; import junit.framework.TestCase; import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; -import mycompiler.mytypereconstruction.unify.FC_TTO; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.xml.DOMConfigurator; import org.junit.After; @@ -24,6 +22,8 @@ import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; +import de.dhbwstuttgart.typeinference.unify.FC_TTO; +import de.dhbwstuttgart.typeinference.unify.Unify; public class TrUnifyTest extends TestCase { From 37d33b7a31c0f40dbdc9c4e046fc40476edfcf5f Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 2 Sep 2014 18:49:19 +0200 Subject: [PATCH 05/46] JavaClassName implementiert --- bin/.gitignore | 5 +- .../dhbwstuttgart/core/AClassOrInterface.java | 4 +- src/de/dhbwstuttgart/core/MyCompiler.java | 18 +++++-- src/de/dhbwstuttgart/core/SourceFile.java | 43 ++++++++--------- src/de/dhbwstuttgart/syntaxtree/Class.java | 26 ++++++---- .../dhbwstuttgart/syntaxtree/ClassBody.java | 2 +- src/de/dhbwstuttgart/syntaxtree/Constant.java | 7 +-- .../dhbwstuttgart/syntaxtree/Constructor.java | 3 +- .../syntaxtree/FormalParameter.java | 2 +- src/de/dhbwstuttgart/syntaxtree/Method.java | 3 +- .../dhbwstuttgart/syntaxtree/misc/DeclId.java | 4 +- .../dhbwstuttgart/syntaxtree/misc/UsedId.java | 9 ++-- .../syntaxtree/statement/Assign.java | 12 +++-- .../syntaxtree/statement/CastExpr.java | 4 +- .../syntaxtree/statement/ExprStmt.java | 2 +- .../syntaxtree/statement/InstanceOf.java | 2 +- .../syntaxtree/statement/LocalOrFieldVar.java | 6 +-- .../syntaxtree/statement/LocalVarDecl.java | 10 ++-- .../syntaxtree/statement/MethodCall.java | 14 +++--- .../syntaxtree/statement/NewArray.java | 4 +- .../syntaxtree/statement/NewClass.java | 2 +- .../syntaxtree/statement/PostDecExpr.java | 4 +- .../syntaxtree/statement/PostIncExpr.java | 4 +- .../syntaxtree/statement/PreDecExpr.java | 4 +- .../syntaxtree/statement/PreIncExpr.java | 4 +- .../type/BoundedGenericTypeVar.java | 2 +- .../type/FreshExtendsWildcardType.java | 2 +- .../type/FreshSuperWildcardType.java | 2 +- .../syntaxtree/type/FreshWildcardType.java | 11 +++-- .../syntaxtree/type/GenericTypeVar.java | 16 ++++--- .../dhbwstuttgart/syntaxtree/type/Pair.java | 4 +- .../syntaxtree/type/RefType.java | 40 +++++++++------- .../syntaxtree/type/SuperWildcardType.java | 4 +- .../dhbwstuttgart/syntaxtree/type/Type.java | 19 ++++---- .../syntaxtree/type/TypePlaceholder.java | 17 +++---- src/de/dhbwstuttgart/typeinference/FunN.java | 5 +- .../assumptions/ClassAssumption.java | 2 +- .../assumptions/GenericVarAssumption.java | 2 +- .../assumptions/TypeAssumptions.java | 23 ++++----- .../parser/BoundedClassIdentifierList.java | 2 +- .../typeinference/parser/JavaClassName.java | 17 ++++--- .../typeinference/parser/JavaParser.java | 6 +-- .../typeinference/parser/JavaParser.jay | 2 +- .../typeinference/unify/Unify.java | 47 ++++++++++--------- .../mytypereconstruction/CSubstitution.java | 2 +- 45 files changed, 227 insertions(+), 196 deletions(-) diff --git a/bin/.gitignore b/bin/.gitignore index 8fbf17459..79da6df78 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,8 +1,7 @@ -/mycompiler -/userinterface +/bytecode /de /myJvmDisassembler -/bytecode +/mycompiler /parser /plugindevelopment /syntaxTree diff --git a/src/de/dhbwstuttgart/core/AClassOrInterface.java b/src/de/dhbwstuttgart/core/AClassOrInterface.java index 12a44d432..39249e677 100755 --- a/src/de/dhbwstuttgart/core/AClassOrInterface.java +++ b/src/de/dhbwstuttgart/core/AClassOrInterface.java @@ -13,7 +13,9 @@ import org.apache.log4j.Logger; // ino.end + import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; // ino.class.AClassOrInterface.21186.description type=javadoc /** @@ -30,7 +32,7 @@ public interface AClassOrInterface // ino.class.AClassOrInterface.21186.body { - public String getName(); + public JavaClassName getName(); public Vector getSuperInterfaces(); public void setSuperInterfaces(Vector vector); diff --git a/src/de/dhbwstuttgart/core/MyCompiler.java b/src/de/dhbwstuttgart/core/MyCompiler.java index 50002f167..20e885010 100755 --- a/src/de/dhbwstuttgart/core/MyCompiler.java +++ b/src/de/dhbwstuttgart/core/MyCompiler.java @@ -174,7 +174,7 @@ public class MyCompiler implements MyCompilerAPI // Klasse existiert, darf aber keine Parameterliste in der Definition haben if( KlassenVektor.elementAt(k).get_ParaList().size() == 0 ) { - RefType RNeu = new RefType( TempParameter.getName(), null,TempParameter.getOffset()); + RefType RNeu = new RefType( TempParameter.getName().toString(), null,TempParameter.getOffset()); inferencelog.debug( "Vorher: " + Parameter ); // i-te Stelle ersetzen Parameter.set( i, RNeu ); @@ -561,7 +561,7 @@ public class MyCompiler implements MyCompilerAPI * Generiert den Bytecode und das Class-File f�r den Syntaxbaum. * @throws NullPointerException Wenn noch kein abstrakter Syntaxbaum vorhanden * ist. - */ + @Override public Vector codeGeneration(ResultSet result) throws NullPointerException, JVMCodeException @@ -579,7 +579,8 @@ public class MyCompiler implements MyCompilerAPI codegenlog.info("Codegenerierung beendet!"); return ret; - } + }*/ + // ino.method.main.21313.defdescription type=javadoc /** @@ -668,7 +669,7 @@ public class MyCompiler implements MyCompilerAPI for(int j=0;j codeGeneration(ResultSet result) + throws NullPointerException, JVMCodeException { + // TODO Auto-generated method stub + return null; + } } // ino.end diff --git a/src/de/dhbwstuttgart/core/SourceFile.java b/src/de/dhbwstuttgart/core/SourceFile.java index ed48e266e..61170af10 100755 --- a/src/de/dhbwstuttgart/core/SourceFile.java +++ b/src/de/dhbwstuttgart/core/SourceFile.java @@ -58,6 +58,7 @@ import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.unify.FC_TTO; import de.dhbwstuttgart.typeinference.unify.Unify; import mycompiler.myclass.*; @@ -231,7 +232,7 @@ public class SourceFile * Startet die Bytecodegenerierung fuer alle in der Datei * enthaltenen Klassen und Interfaces. * - */ + // ino.end // ino.method.codegen.21397.definition public Vector codegen(ResultSet result) @@ -254,7 +255,7 @@ public class SourceFile return ret; } // ino.end - + */ // ino.method.createPairFromClassAndSuperclass.21400.defdescription type=javadoc /** * Erstellt ein Typ-Paar, welches im 1. Durchlauf in die Menge der Finite Closure @@ -264,7 +265,7 @@ public class SourceFile */ // ino.end // ino.method.createPairFromClassAndSuperclass.21400.definition - private Pair createPairFromClassAndSuperclass(String className, String superclassName, Vector classParaOrg, Vector superclassParaOrg) + private Pair createPairFromClassAndSuperclass(JavaClassName className, JavaClassName superclassName, Vector classParaOrg, Vector superclassParaOrg) // ino.end // ino.method.createPairFromClassAndSuperclass.21400.body { @@ -276,15 +277,15 @@ public class SourceFile superclassParaOrg=null; } Pair P = new Pair( - new RefType( className, classParaOrg,-1), - new RefType( superclassName, superclassParaOrg,-1) + new RefType( className.toString(), classParaOrg,-1), + new RefType( superclassName.toString(), superclassParaOrg,-1) ); //PL 04-12-29 freshe Variablen ANFANG RefType r1 = (RefType)P.getTA1Copy(); RefType r2 = (RefType)P.getTA2Copy(); // #JB# 05.04.2005 // ########################################################### - Hashtable substHash = new Hashtable(); //fuer jedes Paar komplett neue Variablen + Hashtable substHash = new Hashtable(); //fuer jedes Paar komplett neue Variablen Unify.varSubst(r1, substHash); Unify.varSubst(r2, substHash); // ########################################################### @@ -330,7 +331,7 @@ public class SourceFile Iterator interfaceIterator=tempKlasse.getSuperInterfaces().iterator(); while(interfaceIterator.hasNext()){ UsedId intf=interfaceIterator.next(); - String interfaceName=intf.getQualifiedName(); + JavaClassName interfaceName=intf.getQualifiedName(); Pair P=createPairFromClassAndSuperclass(tempKlasse.getName(),interfaceName,tempKlasse.get_ParaList(),intf.get_ParaList()); vFC.add( P ); @@ -343,7 +344,7 @@ public class SourceFile Iterator interfaceIterator=intf.getSuperInterfaces().iterator(); while(interfaceIterator.hasNext()){ UsedId superintf=interfaceIterator.next(); - String superinterfaceName=superintf.getQualifiedName(); + JavaClassName superinterfaceName=superintf.getQualifiedName(); Pair P=createPairFromClassAndSuperclass(intf.getName(),superinterfaceName,intf.getParaList(), superintf.get_ParaList()); vFC.add( P ); @@ -456,7 +457,7 @@ public class SourceFile //es werden alle Parameter in einem Typeterm, der //der Argumente hat ersetzt PL 04-12-28 - Hashtable hts = new Hashtable(); + Hashtable hts = new Hashtable(); //for(int u = nSubstStelle; u < vPara.size(); u++) { for(int u = 0; u < vPara.size(); u++) { try { @@ -467,7 +468,7 @@ public class SourceFile // ########################################################### inferencelog.debug("Typterm_Name: " + vPara.elementAt(u)); inferencelog.debug("Typterm_Name: " + ((Type)vPara.elementAt(u)).Type2String()); - hts.put(((RefType)PSuchen.TA1).getParaN(u), vPara.elementAt(u)); + hts.put(new JavaClassName(((RefType)PSuchen.TA1).getParaN(u)), vPara.elementAt(u)); } catch( Exception E ) { inferencelog.error(E.getMessage()); @@ -532,7 +533,7 @@ public class SourceFile RefType RSuch = (RefType)PSuch.TA1; //if( R.getName().equals(RSuch.getName()) ) - if (R.is_Equiv(RSuch, new Hashtable())) //eingefuegt PL 05-01-07 + if (R.is_Equiv(RSuch, new Hashtable())) //eingefuegt PL 05-01-07 { // Paar einfuegen, falls noch nicht vorhanden RefType L1 = (RefType)PTemp.getTA1Copy(); @@ -543,10 +544,10 @@ public class SourceFile //zunaechst Variablen disjunkt machen ANFANG // #JB# 05.04.2005 // ########################################################### - Hashtable substHash1 = new Hashtable(); + Hashtable substHash1 = new Hashtable(); Unify.varSubst(L1, substHash1); Unify.varSubst(L2, substHash1); - Hashtable substHash2 = new Hashtable(); + Hashtable substHash2 = new Hashtable(); Unify.varSubst(R1, substHash2); Unify.varSubst(R2, substHash2); // ########################################################### @@ -557,9 +558,9 @@ public class SourceFile // #JB# 05.04.2005 // ########################################################### - Hashtable h = new Hashtable(); + Hashtable h = new Hashtable(); L2.Equiv2Equal(R1, h); - Hashtable substHash3 = h; + Hashtable substHash3 = h; Unify.varSubst(L1, substHash3); Unify.varSubst(R2, substHash3); // ########################################################### @@ -689,7 +690,7 @@ public class SourceFile } xConstraints.add(cons); } - //typinferenzLog.debug("Karthesisches Produkt der Constraints: "+xConstraints); + typinferenzLog.debug("Karthesisches Produkt der Constraints: "+xConstraints); ////////////////////////////// // Unifizierung der Constraints: @@ -958,7 +959,7 @@ public class SourceFile // Properties laden java.lang.Class x; try { - x = java.lang.Class.forName(importDecl.getQualifiedName()); + x = java.lang.Class.forName(importDecl.getQualifiedName().toString()); } catch (ClassNotFoundException e) { throw new CTypeReconstructionException("Fehlerhafte Import-Declaration: "+e.getMessage(),importDecl); } @@ -1050,7 +1051,7 @@ public class SourceFile for(int k=0;k())); + method.addParaAssumption(new CParaTypeAssumption(className, methodName, pt.length,0,type.getName().toString(), type, MyCompiler.NO_LINENUMBER,MyCompiler.NO_LINENUMBER,new Vector())); } //basicAssumptions.addMethodIntersectionType(new CIntersectionType(method)); //ret.add(method); //auskommentiert von Andreas Stadelmeier @@ -1107,7 +1108,7 @@ public class SourceFile // Properties laden java.lang.Class x; try { - x = java.lang.Class.forName(importDecl.getQualifiedName()); + x = java.lang.Class.forName(importDecl.getQualifiedName().toString()); } catch (ClassNotFoundException e) { throw new CTypeReconstructionException("Fehlerhafte Import-Declaration: "+e.getMessage(),importDecl); } @@ -1269,7 +1270,7 @@ public class SourceFile boolean found = false; for(UsedId id : searchVector) { - String s = id.getQualifiedName(); + String s = id.getQualifiedName().toString(); found |= s.equals(searchString); } return found; @@ -1283,7 +1284,7 @@ public class SourceFile { if(type instanceof TypeVariableImpl){ TypeVariableImpl tvi=((TypeVariableImpl)type); - return(new GenericTypeVar(jreSpiderRegistry.get(tvi.getName()).getName(),-1)); + return(new GenericTypeVar(jreSpiderRegistry.get(tvi.getName()).getName().toString(),-1)); }else{ //String jccNameForClass=baseTypeTranslationTable.get(cl.getSimpleName()); String jccNameForClass=baseTypeTranslationTable.get(cl.getName()); diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index fa85019ee..2dba67201 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -65,6 +65,8 @@ import org.apache.log4j.Logger; + + @@ -88,6 +90,7 @@ import de.dhbwstuttgart.typeinference.assumptions.ClassAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.unify.FC_TTO; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -119,9 +122,9 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit { this.pkgName = pkgName; } - public String getName() + public JavaClassName getName() { - return name; + return new JavaClassName((this.pkgName!=null ? this.pkgName.toString() +"." : "") +this.name); } public void setName(String strName) { @@ -333,7 +336,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit * @param typeinferenceResult - Das ResultSet einer Typinferierung oder null, falls alle Typen eindeutig feststehen. * @return * @throws JVMCodeException - */ + // ino.method.codegen.23071.definition public ClassFile codegen(ResultSet typeinferenceResult) throws JVMCodeException @@ -359,7 +362,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit //geändert von Andreas Stadelmeier: pkgName wird nicht mehr aus dem SourceFile ausgelesen: String packageName = ""; if(pkgName != null) packageName = pkgName.get_Name_1Element(); - classfile.add_class(getName(), packageName, superClass, getAccessFlags()); + classfile.add_class(getName(), superClass, getAccessFlags()); // Handling fuer Superinterfaces classfile.addSuperInterfaces(getSuperInterfaces()); @@ -383,7 +386,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit codegenlog.info("Compilierung erfolgreich abgeschlossen, "+ getName() + ".class erstellt."); return classfile; } - + */ public void codegen(ClassFile classfile, Vector paralist) throws JVMCodeException { @@ -459,7 +462,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit // ino.method.get_Superclass_Name.23086.definition - public String get_Superclass_Name() + public JavaClassName get_Superclass_Name() // ino.end // ino.method.get_Superclass_Name.23086.body { @@ -663,6 +666,8 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit // Und los geht's: ////////////////////////////// inferencelog.info("Rufe TRStart()..."); + + typinferenzLog.debug("Erstellte FiniteClosure: "+supportData); ////////////////////////////// // Ab hier ... // @author A10023 - Andreas Stadelmeier: @@ -939,7 +944,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit * @param me * @param V * @return - */ + // ino.end // ino.method.RetType.23119.definition private Type RetType(Method me, CTypeAssumptionSet V) @@ -954,6 +959,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } // ino.end + */ // ino.method.toString.23125.defdescription type=javadoc /** *
Author: Martin Pl�micke @@ -1167,7 +1173,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit // ino.end // ino.method.getSimpleName.23140.body { - return UsedId.createFromQualifiedName(getName(),-1).getSimpleName(); + return UsedId.createFromQualifiedName(getName().toString(),-1).getSimpleName(); } // ino.end @@ -1289,7 +1295,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit parameter.add(((GenericTypeVar)param).getTypePlaceHolder());//(TypePlaceholder.fresh()); //Hier ist kein ReplacementListener notwendig. Der Typ soll nie eingesetzt werden. Der TPH wird nur gebraucht, damit das Unifizieren funktioniert. } */ - return new RefType(this.getName(), this.get_ParaList(), 0); + return new RefType(this.getName().toString(), this.get_ParaList(), 0); } @@ -1342,7 +1348,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } } if(!constructorVorhanden){//Falls kein Konstruktor vorhanden ist, muss noch der Standardkonstruktor angefügt werden: - Constructor standardKonstruktor = new Constructor(Method.createEmptyMethod(this.getName(), this)); + Constructor standardKonstruktor = new Constructor(Method.createEmptyMethod(this.getName().toString(), this)); this.addField(standardKonstruktor); } diff --git a/src/de/dhbwstuttgart/syntaxtree/ClassBody.java b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java index 230b0c352..b987bae41 100755 --- a/src/de/dhbwstuttgart/syntaxtree/ClassBody.java +++ b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java @@ -162,7 +162,7 @@ throws SCClassBodyException SCExcept e = new SCExcept(); e.set_error("unbekannte Klasse "+t.getName()+"."); e.set_function("complete_parahashtable() --> is_declared()"); - e.set_statement(t.getName()); + e.set_statement(t.getName().toString()); ex.addException(e); throw ex; } diff --git a/src/de/dhbwstuttgart/syntaxtree/Constant.java b/src/de/dhbwstuttgart/syntaxtree/Constant.java index e58511975..e07c75b3e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Constant.java +++ b/src/de/dhbwstuttgart/syntaxtree/Constant.java @@ -12,6 +12,7 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import sun.reflect.generics.reflectiveObjects.NotImplementedException; import mycompiler.mybytecode.AttributeInfo; import mycompiler.mybytecode.ClassFile; @@ -118,11 +119,11 @@ public class Constant extends Method // ino.end // ino.method.getTypeName.23243.definition - public String getTypeName() + public JavaClassName getTypeName() // ino.end // ino.method.getTypeName.23243.body { - return name; + return new JavaClassName(name); } // ino.end @@ -169,7 +170,7 @@ public class Constant extends Method { // Zugehoerigen Typ (I, Z, C, Ljava/lang/String;) fuer den Typ ermitteln - String bcgType = JVMCode.get_codegen_Type(typ.getName(), paralist); + String bcgType = JVMCode.get_codegen_Type(typ.getName().toString(), paralist); if (getValue() == null || !(getValue() instanceof Literal) ) { throw new JVMCodeException("Die Generierung der Konstante wird nicht unterstuetzt!"); diff --git a/src/de/dhbwstuttgart/syntaxtree/Constructor.java b/src/de/dhbwstuttgart/syntaxtree/Constructor.java index ac50a5a3e..2c27a2542 100644 --- a/src/de/dhbwstuttgart/syntaxtree/Constructor.java +++ b/src/de/dhbwstuttgart/syntaxtree/Constructor.java @@ -16,6 +16,7 @@ import de.dhbwstuttgart.typeinference.assumptions.ConstructorAssumption; import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import mycompiler.mybytecode.ClassFile; import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; @@ -57,7 +58,7 @@ public class Constructor extends Method { } @Override - public String getTypeName() { + public JavaClassName getTypeName() { return this.getType().getName(); } diff --git a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java index 856aa3b4e..72b316517 100755 --- a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java +++ b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java @@ -142,7 +142,7 @@ public class FormalParameter extends SyntaxTreeNode implements ITypeReplacementL // ino.end // ino.method.getTypeName.23416.body { if(this.getType() == null)return ""; - return this.getType().getName(); + return this.getType().getName().toString(); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/Method.java b/src/de/dhbwstuttgart/syntaxtree/Method.java index 2001a1fa4..dc45aef22 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Method.java +++ b/src/de/dhbwstuttgart/syntaxtree/Method.java @@ -42,6 +42,7 @@ import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; @@ -173,7 +174,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable // ino.end // ino.method.getTypeName.23533.definition - public String getTypeName() + public JavaClassName getTypeName() // ino.end // ino.method.getTypeName.23533.body { diff --git a/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java index c597d2978..b11e6ddcd 100755 --- a/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java @@ -212,7 +212,7 @@ public class DeclId if (type instanceof RefType) codegen_type = ((RefType)type).get_codegen_Type(null); else - codegen_type = JVMCode.get_codegen_Type(type.getName(), paralist); + codegen_type = JVMCode.get_codegen_Type(type.getName().toString(), paralist); // Instanzvariable genenerieren @@ -223,7 +223,7 @@ public class DeclId if(wert instanceof Expr) { classfile.add_field_ref(name, null, codegen_type); Assign assign = new Assign(getOffset(),name.length()); - assign.set_Expr(new InstVar(name, type.getName(),getOffset()), (Expr)wert); + assign.set_Expr(new InstVar(name, type.getName().toString(),getOffset()), (Expr)wert); classfile.add_classblock_Element(assign); } else throw new JVMCodeException("Wertzuweisung der Instanzvariable kann nicht uebersetzt werden!"); diff --git a/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java index c83226744..2ad399eaf 100755 --- a/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java @@ -10,6 +10,7 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import mycompiler.mybytecode.JVMCode; @@ -182,7 +183,7 @@ public class UsedId implements IItemWithOffset // ino.end // ino.method.getSignatureUsedId.23717.body { - String basis = JVMCode.get_codegen_Type(getQualifiedName(),null); + String basis = JVMCode.get_codegen_Type(getQualifiedName().toString(),null); if (paralist == null || paralist.size() ==0) return basis; @@ -241,7 +242,7 @@ public class UsedId implements IItemWithOffset // ino.end // ino.method.getQualifiedName.23726.definition - public String getQualifiedName() + public JavaClassName getQualifiedName() // ino.end // ino.method.getQualifiedName.23726.body { @@ -253,7 +254,7 @@ public class UsedId implements IItemWithOffset sb.append("."); } } - return(sb.toString()); + return new JavaClassName(sb.toString()); } // ino.end @@ -312,7 +313,7 @@ public class UsedId implements IItemWithOffset public JavaCodeResult printJavaCode(ResultSet resultSet) { if(this.name.size()>1)throw new TypeinferenceException("Es kann maximal nur eine Superklasse pro Klasse geben", this); - JavaCodeResult ret = new JavaCodeResult(this.getQualifiedName()); + JavaCodeResult ret = new JavaCodeResult(this.getQualifiedName().toString()); if(this.paralist != null){ ret.attach( "<" ); Iterator it = this.paralist.iterator(); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java index 04c75d2a8..4907a6234 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java @@ -35,6 +35,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -48,6 +49,7 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -138,13 +140,13 @@ public class Assign extends Expr // LocalVar try { - String local_type = code.get_TypeOf_Var(local_name).getName(); - code.add_code(JVMCode.nload_n(local_type, index)); + JavaClassName local_type = code.get_TypeOf_Var(local_name).getName(); + code.add_code(JVMCode.nload_n(local_type.toString(), index)); } catch(JVMCodeException e) { // out of nload_n - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload(local_type)); code.add_code_byte((byte)index); } @@ -166,13 +168,13 @@ public class Assign extends Expr // LocalVar try { - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nstore_n(local_type, index)); } catch(JVMCodeException e) { // out of nstore_n - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nstore(local_type)); code.add_code_byte((byte)index); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java index 75c250076..25b18c216 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java @@ -111,7 +111,7 @@ public class CastExpr extends UnaryExpr // ino.end // ino.method.codegen.25154.body { - int itype = JVMCode.get_nType(type.getName()); + int itype = JVMCode.get_nType(type.getName().toString()); int iexpr = JVMCode.get_nType(expr.getTypeName()); if(itype != iexpr) { @@ -122,7 +122,7 @@ public class CastExpr extends UnaryExpr else { expr.set_Type(type); - code.add_code(JVMCode.n2n(expr.getTypeName(), type.getName())); + code.add_code(JVMCode.n2n(expr.getTypeName(), type.getName().toString())); } } else if(itype == 4) expr.set_Type(type); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java index 76a38c5de..3788e5866 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java @@ -52,7 +52,7 @@ public abstract class ExprStmt extends Statement implements ITypeReplacementList // ino.method.getTypeName.25279.body { if (getType()!=null) - return getType().getName(); + return getType().getName().toString(); else return null; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java index a3a29ef3b..4e7bc907e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java @@ -113,7 +113,7 @@ public class InstanceOf extends BinaryExpr { expr.codegen(classfile, code, paralist); code.add_code(JVMCode.instanceof_); - code.add_code_short(classfile.add_CONSTANT_Class_info(reftype.getName())); + code.add_code_short(classfile.add_CONSTANT_Class_info(reftype.getName().toString())); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java index ece05e0a6..c117d65eb 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java @@ -133,13 +133,13 @@ public class LocalOrFieldVar extends Expr // LocalVar try { - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload_n(local_type, index)); } catch(JVMCodeException e) { // out of nstore_n - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload(local_type)); code.add_code_byte((byte)index); } @@ -162,7 +162,7 @@ public class LocalOrFieldVar extends Expr RefType rt = (RefType) this.getType(); if (! rt.getPrimitiveFlag()) return; - if (rt.getName().equalsIgnoreCase("java.lang.Integer")) { // Int Unboxen + if (rt.getName().toString().equalsIgnoreCase("java.lang.Integer")) { // Int Unboxen code.add_code(JVMCode.invokevirtual); code.add_code_short(classfile.add_method_ref("java/lang/Integer", "intValue", "()I")); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java index d69fa85e0..76b0df25a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java @@ -174,7 +174,7 @@ public class LocalVarDecl extends Statement implements TypeInsertable SCExcept e = new SCExcept(); e.set_error("unbekannte Klasse "+t.getName()+"."); e.set_function("complete_parahashtable() --> is_declared()"); - e.set_statement(t.getName()); + e.set_statement(t.getName().toString()); ex.addException(e); throw ex; } @@ -224,7 +224,7 @@ public class LocalVarDecl extends Statement implements TypeInsertable SCExcept e = new SCExcept(); e.set_error("Klasse "+c.getName()+" ist falsch parametrisiert!"); e.set_function("complete_parahashtable() --> check_anz()"); - e.set_statement(type.getName()); + e.set_statement(type.getName().toString()); ex.addException(e); throw ex; } @@ -234,7 +234,7 @@ public class LocalVarDecl extends Statement implements TypeInsertable SCExcept e = new SCExcept(); e.set_error("Klasse "+c.getName()+" ist nicht parametrisierbar!"); e.set_function("complete_parahashtable() --> check_anz()"); - e.set_statement(type.getName()); + e.set_statement(type.getName().toString()); ex.addException(e); throw ex; } @@ -245,7 +245,7 @@ public class LocalVarDecl extends Statement implements TypeInsertable SCExcept e = new SCExcept(); e.set_error("Klasse "+c.getName()+" �berhaupt garnicht parametrisiert!"); e.set_function("complete_parahashtable() --> check_anz()"); - e.set_statement(type.getName()); + e.set_statement(type.getName().toString()); ex.addException(e); throw ex; @@ -266,7 +266,7 @@ public class LocalVarDecl extends Statement implements TypeInsertable e.set_error("Type " + type.getName()+ " falsche Parameter-Anzahl " + ((RefType)type).get_ParaList().size()); } e.set_function("complete_parahashtable() --> check_anz()"); - e.set_statement(type.getName()); + e.set_statement(type.getName().toString()); ex.addException(e); throw ex; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java index 49b0d48bb..45753b422 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java @@ -45,6 +45,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassBody; @@ -67,6 +68,7 @@ import de.dhbwstuttgart.typeinference.Overloading; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.unify.FC_TTO; import de.dhbwstuttgart.typeinference.unify.Unify; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -290,13 +292,13 @@ public class MethodCall extends Expr if (index != -1 ) { // Lokale Variable try { - String local_type = code.get_TypeOf_Var(local_name) + JavaClassName local_type = code.get_TypeOf_Var(local_name) .getName(); - code.add_code(JVMCode.nload_n(local_type, index)); + code.add_code(JVMCode.nload_n(local_type.toString(), index)); } catch (JVMCodeException e) { // out of nload_n - String local_type = code.get_TypeOf_Var(local_name) + JavaClassName local_type = code.get_TypeOf_Var(local_name) .getName(); - code.add_code(JVMCode.nload(local_type)); + code.add_code(JVMCode.nload(local_type.toString())); code.add_code_byte((byte) index); } } else { // FieldVariable @@ -417,11 +419,11 @@ public class MethodCall extends Expr // Typannahme f�r Methode heraussuchen: // -------------------------- - String className; + String className; if(classType instanceof RefType){ className=((RefType)classType).getTypeName(); }else{ - className=classType.getName(); + className=classType.getName().toString(); } CMethodKey key = new CMethodKey( diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java index eb25c781d..9bd35ec0b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java @@ -137,10 +137,10 @@ public class NewArray extends Expr // ino.end // ino.method.codegen.25818.body { - if(JVMCode.get_nType(this.getType().getName()) == 4) { + if(JVMCode.get_nType(this.getType().getName().toString()) == 4) { for(int i = 0; i < expr.size(); i++) ((Expr)expr.elementAt(i)).codegen(classfile, code, paralist); code.add_code(JVMCode.anewarray); - code.add_code_short(classfile.add_CONSTANT_Class_info(this.getType().getName())); + code.add_code_short(classfile.add_CONSTANT_Class_info(this.getType().getName().toString())); } else { for(int i = 0; i < expr.size(); i++) ((Expr)expr.elementAt(i)).codegen(classfile, code, paralist); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java index c5bbc7177..722392ffb 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java @@ -128,7 +128,7 @@ public class NewClass extends Expr for(Enumeration el = classname.elements(); el.hasMoreElements();) { cl = el.nextElement(); - next = (String)cl.getName(); + next = (String)cl.getName().toString(); if(ext) parserlog.debug("Vergleiche "+usedid+" mit "+next); if(usedid.equals(next)) diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java index 352f11543..91b1cd278 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java @@ -115,11 +115,11 @@ public class PostDecExpr extends UnaryExpr index = code.get_indexOf_Var(local_name); if(index != -1) { // LocalVar try{ - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload_n(local_type, index)); } catch(JVMCodeException e) { // out of nload_n - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload(local_type)); code.add_code_byte((byte)index); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java index 30ba7ee96..d373a178a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java @@ -122,11 +122,11 @@ public class PostIncExpr extends UnaryExpr index = code.get_indexOf_Var(local_name); if(index != -1) { // LocalVar try{ - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload_n(local_type, index)); } catch(JVMCodeException e) { // out of nload_n - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload(local_type)); code.add_code_byte((byte)index); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java index a95f64816..91575ae0a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java @@ -115,11 +115,11 @@ public class PreDecExpr extends UnaryExpr index = code.get_indexOf_Var(local_name); if(index != -1) { // LocalVar try{ - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload_n(local_type, index)); } catch(JVMCodeException e) { // out of nload_n - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload(local_type)); code.add_code_byte((byte)index); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java index 191216e98..7e0bd6401 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java @@ -116,11 +116,11 @@ public class PreIncExpr extends UnaryExpr index = code.get_indexOf_Var(local_name); if(index != -1) { // LocalVar try{ - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload_n(local_type, index)); } catch(JVMCodeException e) { // out of nload_n - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload(local_type)); code.add_code_byte((byte)index); } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java index 7d0f33089..d3674efe1 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java @@ -111,7 +111,7 @@ public class BoundedGenericTypeVar extends GenericTypeVar // ino.end // ino.method.clone.26483.body { - return new BoundedGenericTypeVar(this.getName(), this.getBounds(), getOffset(), this.getEndOffset()); + return new BoundedGenericTypeVar(this.getName().toString(), this.getBounds(), getOffset(), this.getEndOffset()); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/FreshExtendsWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/FreshExtendsWildcardType.java index b79d6c722..2dec8d7b2 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/FreshExtendsWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FreshExtendsWildcardType.java @@ -44,7 +44,7 @@ public class FreshExtendsWildcardType extends FreshWildcardType implements IMatc */ public FreshExtendsWildcardType clone() { - return new FreshExtendsWildcardType(this.extendsBoundType.clone(),getOffset(),this.name); + return new FreshExtendsWildcardType(this.extendsBoundType.clone(),getOffset(),this.name.toString()); } /** diff --git a/src/de/dhbwstuttgart/syntaxtree/type/FreshSuperWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/FreshSuperWildcardType.java index a48cd03e9..f8086c299 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/FreshSuperWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FreshSuperWildcardType.java @@ -44,7 +44,7 @@ public class FreshSuperWildcardType extends FreshWildcardType implements IMatcha */ public FreshSuperWildcardType clone() { - return new FreshSuperWildcardType(this.superBoundType.clone(),getOffset(),this.name); + return new FreshSuperWildcardType(this.superBoundType.clone(),getOffset(),this.name.toString()); } /** diff --git a/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java index cdbba367f..fd24670e6 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java @@ -4,6 +4,7 @@ import java.util.Vector; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import sun.reflect.generics.reflectiveObjects.NotImplementedException; public class FreshWildcardType extends Type { @@ -29,7 +30,7 @@ public class FreshWildcardType extends Type { protected FreshWildcardType(int offset, String name) { super(offset); - this.name = name; + this.name = new JavaClassName(name); } /** @@ -60,7 +61,7 @@ public class FreshWildcardType extends Type { */ public FreshWildcardType clone() { - return new FreshWildcardType(getOffset(),this.name); + return new FreshWildcardType(getOffset(),this.name.toString()); } /** @@ -79,7 +80,7 @@ public class FreshWildcardType extends Type { * Erzeugt einen neuen Namen, und gibt diesen zurück * Methode aus TypePlaceholder kopiert */ - private static String makeNewName() + private static JavaClassName makeNewName() { // luar: Methode aus TypePlaceholder kopiert. String strReturn = strNextName; @@ -87,7 +88,7 @@ public class FreshWildcardType extends Type { // n�chster Name berechnen und in strNextName speichern inc( strNextName.length() - 1 ); - return strReturn; + return new JavaClassName(strReturn); } /** @@ -165,7 +166,7 @@ public class FreshWildcardType extends Type { } @Override -public JavaCodeResult printJavaCode(ResultSet resultSet) { + public JavaCodeResult printJavaCode(ResultSet resultSet) { throw new NotImplementedException(); } } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java index 7c6e47ab4..6d2765e06 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java @@ -23,12 +23,14 @@ import java.util.Vector; + import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; @@ -80,7 +82,7 @@ public class GenericTypeVar extends Type // ino.method.GenericTypeVar.26509.body { super(offset); - this.name = s; + this.name = new JavaClassName(s); } // ino.end @@ -100,7 +102,7 @@ public class GenericTypeVar extends Type // ino.end // ino.method.clone.26512.body { - return new GenericTypeVar(this.getName(),getOffset()); + return new GenericTypeVar(this.getName().toString(),getOffset()); } // ino.end @@ -182,12 +184,12 @@ public class GenericTypeVar extends Type return ret; } */ - return new JavaCodeResult(this.name); + return new JavaCodeResult(this.name.toString()); } public TypePlaceholder getTypePlaceHolder() { if(!GenericTypeVar.tph.containsKey(this)){ - GenericTypeVar.tph.put(this, TypePlaceholder.fresh(this.getName())); + GenericTypeVar.tph.put(this, TypePlaceholder.fresh(this.getName().toString())); } return GenericTypeVar.tph.get(this); //if(this.tph == null)this.tph = TypePlaceholder.fresh(); @@ -196,11 +198,11 @@ public class GenericTypeVar extends Type @Override public String get_Name() { - return this.getName(); + return this.getName().toString(); } @Override - public String getName() { + public JavaClassName getName() { return this.name; } @@ -221,7 +223,7 @@ public class GenericTypeVar extends Type } public int getEndOffset() { - return this.getOffset() + this.name.length(); + return this.getOffset() + this.name.toString().length(); } } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Pair.java b/src/de/dhbwstuttgart/syntaxtree/type/Pair.java index 5e14f3d56..7ba5056cc 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Pair.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Pair.java @@ -6,6 +6,8 @@ import java.util.Hashtable; import java.util.Vector; // ino.end +import de.dhbwstuttgart.typeinference.parser.JavaClassName; + @@ -249,7 +251,7 @@ public class Pair // ino.method.Pair_isEquiv.26582.body { //vergleicht Paare mit Reftype's, bis auf Variablenumbennung - Hashtable ht = new Hashtable(); + Hashtable ht = new Hashtable(); //System.out.println((((RefType)TA1).is_Equiv((RefType)p.TA1, ht))); //System.out.println(((RefType)TA2).is_Equiv((RefType)p.TA2, ht)); diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java index 5c70c5fe0..66ae481cc 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -29,6 +29,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.typeinference.JavaCodeResult; @@ -36,6 +37,7 @@ import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -134,7 +136,7 @@ public class RefType extends Type implements IMatchable */ public RefType( Type baseType ){ super(baseType.getOffset()); - this.setName(baseType.name); + this.setName(baseType.name.toString()); //this.parameter = null; } @@ -145,7 +147,7 @@ public class RefType extends Type implements IMatchable { if(parameter==null) { - return name; + return name.toString(); } else { @@ -169,7 +171,7 @@ public class RefType extends Type implements IMatchable { if(parameter==null) { - return name; + return name.toString(); } else { @@ -276,20 +278,24 @@ public class RefType extends Type implements IMatchable // ino.end // ino.method.setName.26655.body { - this.name = name; + this.name = new JavaClassName(name); } // ino.end + public void setName( JavaClassName name ){ + this.name = name; + } + @Override public String get_Name() { - return getName(); + return getName().toString(); } // ino.method.getName.26658.definition - public String getName() + public JavaClassName getName() // ino.end // ino.method.getName.26658.body { @@ -335,8 +341,8 @@ public class RefType extends Type implements IMatchable else paralist.add(t); }*/ this.parameter = v;//paralist; - parserlog.debug("T->Type.java->set_ParaList->parameter: " + parameter); - parserlog.debug("T->Type.java->get_Type: " + getName()); + //parserlog.debug("T->Type.java->set_ParaList->parameter: " + parameter); + //parserlog.debug("T->Type.java->get_Type: " + getName()); } // ino.end @@ -364,7 +370,7 @@ public class RefType extends Type implements IMatchable // ino.method.getTypeName.26670.body { // otth: Liefert den Namen des Typs, ohne Parameter, z.B. Stapel bei Stapel - return name; + return name.toString(); } // ino.end @@ -383,7 +389,7 @@ public class RefType extends Type implements IMatchable if( n >= parameter.size() ) return ""; - return ((Type)parameter.elementAt(n)).getName(); + return ((Type)parameter.elementAt(n)).getName().toString(); } // ino.end @@ -402,7 +408,7 @@ public class RefType extends Type implements IMatchable // GenericTypeVar ergaenzt PL 06-03-16 // ino.end // ino.method.is_Equiv.26679.definition - public boolean is_Equiv(RefType ty2, Hashtable ht) + public boolean is_Equiv(RefType ty2, Hashtable ht) // ino.end // ino.method.is_Equiv.26679.body { @@ -469,7 +475,7 @@ public class RefType extends Type implements IMatchable // ino.end // ino.method.Equiv2Equal.26682.definition - public boolean Equiv2Equal(RefType ty2, Hashtable ht) + public boolean Equiv2Equal(RefType ty2, Hashtable ht) // ino.end // ino.method.Equiv2Equal.26682.body { @@ -499,7 +505,7 @@ public class RefType extends Type implements IMatchable else { //Typvariablen gleich machen // #JB# 11.04.2005 // ########################################################### - ((TypePlaceholder)pty2).backdoorSetName(((TypePlaceholder)ht.get((((TypePlaceholder)pty1).getName()))).getName()); + ((TypePlaceholder)pty2).backdoorSetName(((TypePlaceholder)ht.get((((TypePlaceholder)pty1).getName()))).getName().toString()); //pty2.setName(((TypePlaceholder)ht.get((((TypePlaceholder)pty1).getName()))).getName()); // ########################################################### } @@ -511,7 +517,7 @@ public class RefType extends Type implements IMatchable ht.put(pty1.getName(), pty2); // #JB# 11.04.2005 // ########################################################### - ((TypePlaceholder)pty2).backdoorSetName(pty1.getName()); + ((TypePlaceholder)pty2).backdoorSetName(pty1.getName().toString()); //pty2.setName(pty1.getName()); // ########################################################### } @@ -631,7 +637,7 @@ public class RefType extends Type implements IMatchable para = para +", "+ t; else para = " " + t; } - String ret = name; + String ret = name.toString(); if(parameter.size()>0)ret += "<"+para + " >"; return ret + primitiveFlagMarker;//name + "<"+para + " >" +primitiveFlagMarker; } @@ -643,7 +649,7 @@ public class RefType extends Type implements IMatchable // ino.end // ino.method.modifyToGenericTypeVar.26694.body { - return new GenericTypeVar(this.name,getOffset()); + return new GenericTypeVar(this.name.toString(),getOffset()); } // ino.end @@ -742,7 +748,7 @@ public class RefType extends Type implements IMatchable @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { - JavaCodeResult ret = new JavaCodeResult(this.name); + JavaCodeResult ret = new JavaCodeResult(this.name.toString()); if(this.get_ParaList()!=null && this.get_ParaList().size()>0){ ret .attach( "<" ); Iterator it = this.get_ParaList().iterator(); diff --git a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java index 3c7d6bcc5..6a4e9d909 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java @@ -42,6 +42,7 @@ public class SuperWildcardType extends WildcardType implements ITypeContainer, I */ public String toString() { + System.out.println("!"); return "? super " + superType.toString(); } @@ -52,7 +53,6 @@ public class SuperWildcardType extends WildcardType implements ITypeContainer, I */ public SuperWildcardType clone() { - //Hier ist unklar, ob der Supertyp auch geklont werden muss. return new SuperWildcardType(getOffset(), superType.clone()); } @@ -126,7 +126,7 @@ public class SuperWildcardType extends WildcardType implements ITypeContainer, I @Override public JavaCodeResult printJavaCode(ResultSet result){ - return new JavaCodeResult(this.toString()); + return new JavaCodeResult("? super " + this.superType.printJavaCode(resultSet)); } } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Type.java b/src/de/dhbwstuttgart/syntaxtree/type/Type.java index 6d0d73c58..7b2ec3eac 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Type.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Type.java @@ -12,6 +12,7 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import mycompiler.mybytecode.JVMCode; @@ -23,7 +24,7 @@ public class Type implements IItemWithOffset // ino.class.Type.26716.body { // ino.attribute.name.26720.declaration - protected String name; + protected JavaClassName name; // ino.end // ino.attribute.used.26723.declaration protected UsedId used; @@ -38,7 +39,7 @@ public class Type implements IItemWithOffset // ino.method.Type.26729.body { this(offset); - this.name = s; + this.name = new JavaClassName(s); } // ino.end @@ -69,7 +70,7 @@ public class Type implements IItemWithOffset // ino.end // ino.method.getVariableLength.26738.body { - if(this.name!=null){return this.name.length();} + if(this.name!=null){return this.name.toString().length();} else{return 1;} } // ino.end @@ -116,7 +117,7 @@ public class Type implements IItemWithOffset // ino.end // ino.method.get_codegen_Type.26750.body { - return JVMCode.get_codegen_Type(name, paralist); + return JVMCode.get_codegen_Type(name.toString(), paralist); } // ino.end @@ -154,7 +155,7 @@ public class Type implements IItemWithOffset // ino.end // ino.method.getName.26762.definition - public String getName() + public JavaClassName getName() // ino.end // ino.method.getName.26762.body { @@ -195,7 +196,7 @@ public class Type implements IItemWithOffset // ino.end // ino.method.clone.26768.body { - return new Type(this.getName(),getOffset()); + return new Type(this.getName().toString(),getOffset()); } // ino.end @@ -210,7 +211,7 @@ public class Type implements IItemWithOffset // ino.end // ino.method.toString.26771.body { - return getName(); + return getName().toString(); } // ino.end @@ -243,12 +244,12 @@ public class Type implements IItemWithOffset // ino.end // ino.method.getSimpleName.26777.body { - return UsedId.createFromQualifiedName(getName(),getOffset()).getSimpleName(); + return UsedId.createFromQualifiedName(getName().toString(),getOffset()).getSimpleName(); } // ino.end public JavaCodeResult printJavaCode(ResultSet resultSet){ - return new JavaCodeResult(this.name); + return new JavaCodeResult(this.name.toString()); } /** diff --git a/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java b/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java index e4d794411..d861b5ba5 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java @@ -12,6 +12,7 @@ import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -38,7 +39,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider private static String strNextName = "A"; // ino.end // ino.attribute.m_TypePlaceholdersRegistry.26788.declaration - private static Hashtable m_TypePlaceholdersRegistry = new Hashtable(); + private static Hashtable m_TypePlaceholdersRegistry = new Hashtable(); // ino.end // ino.attribute.m_ReplacementListeners.26791.declaration @@ -59,7 +60,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider // ino.method.TypePlaceholder.26794.body { super(-1); - this.name = typeName; + this.name = new JavaClassName(typeName); m_ReplacementListeners = new Vector(); } // ino.end @@ -114,7 +115,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider TypePlaceholder typeVar = new TypePlaceholder(name); TypePlaceholder oldTPH = m_TypePlaceholdersRegistry.put(typeVar.getName(), typeVar); if(oldTPH != null){ - oldTPH.name = makeNewName(); + oldTPH.name = new JavaClassName(makeNewName()); m_TypePlaceholdersRegistry.put(oldTPH.getName(), oldTPH); } return typeVar; @@ -398,7 +399,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider // ino.method.deleteRegistry.26839.body { m_TypePlaceholdersRegistry.clear(); - m_TypePlaceholdersRegistry = new Hashtable(); + m_TypePlaceholdersRegistry = new Hashtable(); } // ino.end @@ -419,7 +420,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider // ino.end // ino.method.clone.26842.body { - TypePlaceholder dolly = new TypePlaceholder(name); + TypePlaceholder dolly = new TypePlaceholder(name.toString()); dolly.m_ReplacementListeners = (Vector)m_ReplacementListeners.clone(); return dolly; } @@ -431,7 +432,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider */ @Override public String get_Name(){ - return getName(); + return getName().toString(); } // ino.method.toString.26845.definition @@ -492,7 +493,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider // ino.end // ino.method.backdoorSetName.26851.body { - name = varName; + name = new JavaClassName(varName); } // ino.end @@ -532,7 +533,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider Type equalType = resultSet.getTypeEqualTo(this); if(equalType == null || equalType.equals(this)){ //Für den Fall das der TPH nicht aufgelöst werden konnte. - JavaCodeResult ret = new JavaCodeResult(this.getName()); + JavaCodeResult ret = new JavaCodeResult(this.getName().toString()); //Jetzt muss eine nicht aufgelöste generische Variable dem JavaCodeResult-Set angefügt werden ret.addUnresolvedTPH(this); return ret; diff --git a/src/de/dhbwstuttgart/typeinference/FunN.java b/src/de/dhbwstuttgart/typeinference/FunN.java index ea1616b61..bf1ae84b3 100755 --- a/src/de/dhbwstuttgart/typeinference/FunN.java +++ b/src/de/dhbwstuttgart/typeinference/FunN.java @@ -12,6 +12,7 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; @@ -43,7 +44,7 @@ public class FunN extends RefType implements ITypeReplacementListener{ if(T==null || R == null)throw new NullPointerException(); setT(T); setR(R); - this.name = "Fun"+T.size();//getName(); + this.name = new JavaClassName("Fun"+T.size());//getName(); } /** @@ -62,7 +63,7 @@ public class FunN extends RefType implements ITypeReplacementListener{ setR(TypePlaceholder.fresh(this)); setT(t); - this.name = "Fun"+parameterCount; + this.name = new JavaClassName("Fun"+parameterCount); /* Vector t = new Vector(); for(int i=0;i methodAssumptions = new Vector(); @@ -62,7 +63,7 @@ public class TypeAssumptions { //this.thisClassName = klassenname; } - public TypeAssumptions(String thisClassName){ + public TypeAssumptions(JavaClassName thisClassName){ this(); this.thisClassName = thisClassName; } @@ -188,7 +189,7 @@ public class TypeAssumptions { * @param parameterCount * @return */ - public Vector getMethodAssumptions(String className, String methodName){ + public Vector getMethodAssumptions(JavaClassName className, String methodName){ Vector ret = new Vector(); for(FieldAssumption ass : this.getAssumptionsFor(className)){ //System.out.println(ass.getIdentifier()); @@ -203,7 +204,7 @@ public class TypeAssumptions { * @param className * @return */ - private Vector getAssumptionsFor(String className) { + private Vector getAssumptionsFor(JavaClassName className) { Vector ret = new Vector(); for(Assumption a : this.getAllAssumptions()){ if(a instanceof FieldAssumption){ @@ -299,19 +300,11 @@ public class TypeAssumptions { return t; //Handelt es sich um einen TypePlaceholder kann dieser nicht in den Assumptions vorkommen. //Alle bekannten Klassen nach diesem Typ durchsuchen: - String typName = t.getName(); - String[] names = typName.split("[.]"); + JavaClassName typName = t.getName(); for(ClassAssumption ass : this.classAssumptions){ - String name = ass.getAssumedClass().getName(); //Das kann auch java.util.Vector sein - String[] assNames = name.split("[.]"); + JavaClassName name = ass.getAssumedClass().getName(); //Das kann auch java.util.Vector sein boolean match = true; - if(names.length == 1){ - match = names[0].equals(assNames[assNames.length-1]); - }else if(names.length == 0 || names.length != assNames.length){ - match = false; - }else for(int i = names.length-1; i>-1;i--){ - if(!names[i].equals(assNames[i]))match = false; - } + match = name.equals(typName); if(match && t instanceof RefType){ RefType tr = (RefType)t; RefType ret = ass.getAssumedClass().getType(); //Dadurch erhält der RefType den vollen Namen (bsp. java.lang.Integer) diff --git a/src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java b/src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java index 1dcdb4d09..f37134037 100644 --- a/src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java +++ b/src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java @@ -20,6 +20,6 @@ public class BoundedClassIdentifierList extends Vector{ } public void addOffsetOff(RefType refType) { - this.endOffset = refType.getOffset() + refType.getName().length(); + this.endOffset = refType.getOffset() + refType.getName().toString().length(); } } diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java b/src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java index 12c41520c..0cfd41ab1 100644 --- a/src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java +++ b/src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java @@ -20,7 +20,7 @@ public class JavaClassName { String[] names = name.split("[.]"); boolean match = true; if(names.length == 1){ - packageName = new PackageName(); + //packageName = new PackageName(); this.name = name; }else { name = names[names.length-1]; @@ -39,8 +39,8 @@ public class JavaClassName { final int prime = 31; int result = 1; result = prime * result + ((name == null) ? 0 : name.hashCode()); - result = prime * result - + ((packageName == null) ? 0 : packageName.hashCode()); + //result = prime * result + // + ((packageName == null) ? 0 : packageName.hashCode()); //PackageName does not infect hashCode return result; } @@ -63,17 +63,16 @@ public class JavaClassName { return false; } else if (!name.equals(other.name)) return false; - if (packageName == null) { - if (other.packageName != null) - return false; - } else if (!packageName.equals(other.packageName)) - return false; + if (packageName != null && other.packageName != null) { + if (!packageName.equals(other.packageName)) + return false;//Spezialfall, nicht beide Typen müssen eindeutig mit Packagenamen angegeben werden + } return true; } @Override public String toString() { - return packageName.toString() + name; + return (packageName!=null ? packageName.toString() : "") + name; } } diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java index 8b944a832..3ca8b8a6f 100644 --- a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java +++ b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java @@ -1643,7 +1643,7 @@ case 111: Vector vec=new Vector(); vec.addElement(((RefType)yyVals[0+yyTop])); containedTypes.addElement(((RefType)yyVals[0+yyTop])); - yyVal=new BoundedClassIdentifierList(vec, ((RefType)yyVals[0+yyTop]).getOffset()+((RefType)yyVals[0+yyTop]).getName().length()); + yyVal=new BoundedClassIdentifierList(vec, ((RefType)yyVals[0+yyTop]).getOffset()+((RefType)yyVals[0+yyTop]).getName().toString().length()); } break; case 112: @@ -2023,7 +2023,7 @@ case 155: RefType RT = new RefType(uid.getOffset()); RT.set_ParaList(uid.get_RealParaList()); - RT.setName(uid.getQualifiedName()); + RT.setName(uid.getQualifiedName().toString()); /*PL 05-07-30 eingefuegt containedTypes ANFANG*/ @@ -2043,7 +2043,7 @@ case 156: /*RT.set_UsedId($1); */ /*RT.setName(RT.get_UsedId().get_Name_1Element());*/ RT.set_ParaList(((UsedId)yyVals[0+yyTop]).get_RealParaList()); - RT.setName(((UsedId)yyVals[0+yyTop]).getQualifiedName()); + RT.setName(((UsedId)yyVals[0+yyTop]).getQualifiedName().toString()); /*PL 05-07-30 eingefuegt containedTypes ANFANG*/ diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay index 851e8e656..764a4dd06 100755 --- a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay +++ b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay @@ -1071,7 +1071,7 @@ boundedclassidentifierlist : referencetype Vector vec=new Vector(); vec.addElement($1); containedTypes.addElement($1); - $$=new BoundedClassIdentifierList(vec, $1.getOffset()+$1.getName().length()); + $$=new BoundedClassIdentifierList(vec, $1.getOffset()+$1.getName().toString().length()); } | boundedclassidentifierlist '&' referencetype { diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index 33bf95533..c2319b003 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -32,6 +32,7 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.WildcardType; import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; // ino.end @@ -370,7 +371,7 @@ public class Unify for(Vector pVec : unifyErgs) { // Das Ergebnis in die linke Seite von p_fc einsetzen, und dort Smaller anwenden. - Hashtable ht = VectorPair2SubstHashtableVectorPair(pVec); + Hashtable ht = VectorPair2SubstHashtableVectorPair(pVec); //PL 07-07-04 smallerArg wird auf die linke Seite von p_FC nach subst angewandt RefType p_fc_TA1_new = (RefType)p_fc.TA1.clone(); gtv2tv.applyThisSubstitutionSet(p_fc_TA1_new); //auf der linken Seite @@ -488,7 +489,7 @@ public class Unify for(Vector pVec : unifyErgs) //unifyErgs enthaelt nur einen Unifier STIMMT NIRHT MEHR!!! { //Das Ergebnis in die linke Seite von p_fc einsetzen, und dort Smaller anwenden. - Hashtable ht = VectorPair2SubstHashtableVectorPair(pVec); + Hashtable ht = VectorPair2SubstHashtableVectorPair(pVec); //PL 07-07-04 smallerArg wird auf die linke Seite von p_FC nach subst angewandt RefType p_fc_TA1_new = (RefType)p_fc.TA1.clone(); gtv2tv.applyThisSubstitutionSet(p_fc_TA1_new); //auf der linken Seite @@ -642,7 +643,7 @@ public class Unify for(Vector pVec : unifyErgs) { // Das Ergebnis in die linke Seite von p_fc einsetzen, und dort Smaller anwenden. - Hashtable ht = VectorPair2SubstHashtableVectorPair(pVec); + Hashtable ht = VectorPair2SubstHashtableVectorPair(pVec); //PL 07-07-04 smallerArg wird auf die linke Seite von p_FC nach subst angewandt RefType p_fc_TA1_new = (RefType)p_fc.TA1.clone(); gtv2tv.applyThisSubstitutionSet(p_fc_TA1_new); //auf der linken Seite @@ -996,7 +997,7 @@ public class Unify for (int i = 0; i < gr1.size(); i++) { //gemeinsame obere Schranken suchen for (int j = 0; j < gr2.size(); j++){ - if (gr1.elementAt(i).is_Equiv(gr2.elementAt(j), new Hashtable())) { + if (gr1.elementAt(i).is_Equiv(gr2.elementAt(j), new Hashtable())) { ub.addElement(gr1.elementAt(i)); break; } @@ -1056,7 +1057,7 @@ public class Unify // ino.end // ino.method.match.28064.definition -public static Hashtable match(RefType FCtype, RefType tomatch, Hashtable ht) +public static Hashtable match(RefType FCtype, RefType tomatch, Hashtable ht) throws MatchException // ino.end // ino.method.match.28064.body @@ -1650,7 +1651,7 @@ throws MatchException */ private static void adapt(Vector H, Pair PFC, RefType TA1, RefType TA2,FC_TTO fc_tto) { - Hashtable ht = new Hashtable(); + Hashtable ht = new Hashtable(); RefType TA1neu = (RefType)Pair.copyType((RefType)PFC.TA2); inferencelog.debug("TA1neu " + TA1neu.Type2String()); try @@ -1677,7 +1678,7 @@ throws MatchException */ private static void adaptExt(Vector H, Pair PFC, RefType TA1, RefType TA2, FC_TTO fc_tto) { - Hashtable ht = new Hashtable(); + Hashtable ht = new Hashtable(); RefType TA1neu = (RefType)Pair.copyType((RefType)PFC.TA2); inferencelog.debug("TA1neu " + TA1neu.Type2String()); try @@ -1704,7 +1705,7 @@ throws MatchException */ private static void adaptSup(Vector H, Pair PFC, RefType TA1, RefType TA2, FC_TTO fc_tto) { - Hashtable ht = new Hashtable(); + Hashtable ht = new Hashtable(); RefType TA1neu = (RefType)Pair.copyType((RefType)PFC.TA2); inferencelog.debug("TA1neu " + TA1neu.Type2String()); try @@ -1729,10 +1730,10 @@ throws MatchException /* luar 03-05-2007 * Diese Methode ersetzt alle Typen in der Hashtable durch deren CaptureConversion */ - private static Hashtable CaptureConversionHashtable(Hashtable ht, FC_TTO fc_tto) + private static Hashtable CaptureConversionHashtable(Hashtable ht, FC_TTO fc_tto) { - Hashtable retHT = new Hashtable(); - for(String s : ht.keySet()) + Hashtable retHT = new Hashtable(); + for(JavaClassName s : ht.keySet()) { Type t = ht.get(s); Type ccT = CaptureConversion(t,fc_tto); @@ -1854,14 +1855,14 @@ throws MatchException // ino.end // ino.method.VectorPair2SubstHashtableVectorPair.28079.definition - public static Hashtable VectorPair2SubstHashtableVectorPair (Vector v) + public static Hashtable VectorPair2SubstHashtableVectorPair (Vector v) // ino.end // ino.method.VectorPair2SubstHashtableVectorPair.28079.body { //PL 05-01-23 wandelt einen Vector von Paaren (a, ty) von Substitutionen //in eine Hashtable um. - Hashtable ret = new Hashtable(); + Hashtable ret = new Hashtable(); for(Enumeration e=v.elements();e.hasMoreElements();) { Pair p = e.nextElement(); ret.put(p.TA1.getName(), p.TA2); @@ -1921,7 +1922,7 @@ throws MatchException Hashtable testht = new Hashtable(); for (int i=0; i < FC.size(); i++) { // try { - Hashtable ht = new Hashtable(); + Hashtable ht = new Hashtable(); //HIER MOEGLICHERWEISE sub_unify MIT true IN DEN PAAREN AUFRUFEN //BEI INSTANZIERTEN TYPEN WEREDN KEINE SUBTYPEN GEBILDET //VERGLEICHE pl1.1.1.3.jav @@ -2004,7 +2005,7 @@ throws MatchException inferencelog.debug("New allSmaller " + ty.Type2String()); //doppelte untere Typen von Paaren eleminieren - Hashtable hht = new Hashtable(); + Hashtable hht = new Hashtable(); for (int i=0; i < FC.size(); i++) { if (hht.put(((RefType)(FC.elementAt(i).TA1)).getName(), (RefType)(FC.elementAt(i).TA1)) != null) { } @@ -2036,7 +2037,7 @@ throws MatchException if (P != null) { //System.out.println("ISIN"); RefType smaller = (RefType)Pair.copyType(P.TA1); - Hashtable ht = new Hashtable(); + Hashtable ht = new Hashtable(); try { match((RefType)P.TA2, ty, ht); //Problem koennte sein, dass ein TypePlaceholder mehrere Typterme @@ -2090,7 +2091,7 @@ throws MatchException if (testreftype == null) { inferencelog.debug("ISIN" + ty.Type2String() + P.toString()+" "+(FC.elementAt(i)).toString()); RefType greater = (RefType)Pair.copyType(P.TA2); - Hashtable ht = new Hashtable(); + Hashtable ht = new Hashtable(); try { //Hier muessen GTV durch TLV ersetzt werden. //vgl. searchAndHandleMethod in MethodCall.java @@ -2232,7 +2233,7 @@ throws MatchException // otth: Prueft ob TV in RefType vorkommt, falls ja --> true // Name der Typvariablen - String strTV = TV.getName(); + JavaClassName strTV = TV.getName(); // Parameterliste extrahieren if( RT.get_ParaList() == null ) @@ -2362,7 +2363,7 @@ throws MatchException // ht enthaelt Elemente der (String, Type) // ino.end // ino.method.SubstHashtableGeneric.28109.definition - public static void SubstHashtableGeneric(RefType typterm, Hashtable ht) + public static void SubstHashtableGeneric(RefType typterm, Hashtable ht) // ino.end // ino.method.SubstHashtableGeneric.28109.body { @@ -2389,7 +2390,7 @@ throws MatchException // ht enthaelt Elemente der (String, Type) // ino.end // ino.method.SubstHashtable.28112.definition - public static void SubstHashtable(RefType typterm, Hashtable ht) + public static void SubstHashtable(RefType typterm, Hashtable ht) // ino.end // ino.method.SubstHashtable.28112.body { @@ -2702,7 +2703,7 @@ tempKlasse.get_Superclass_Name() ); System.out.println( "P. S.: // sie durch die selbe Variable ersetzt. // ino.end // ino.method.varSubst.28130.definition - public static void varSubst(RefType typterm, Hashtable ht) + public static void varSubst(RefType typterm, Hashtable ht) // ino.end // ino.method.varSubst.28130.body { @@ -3090,7 +3091,7 @@ tempKlasse.get_Superclass_Name() ); System.out.println( "P. S.: * Für Jeden Typ aus greater1 durch die FC laufen, und auf der Linken seite einen Match versuchen. * Wenn das Funktioniert, dann ist der Typ auf der rechten Seite auch greater. * */ - Hashtable ht = new Hashtable(); + Hashtable ht = new Hashtable(); for(Type t : greater1Erg) { for(Pair p : fc_tto.getFC()) @@ -3294,7 +3295,7 @@ tempKlasse.get_Superclass_Name() ); System.out.println( "P. S.: * Für Jeden Typ aus Smaller12 durch die FC laufen, und auf der Rechten seite einen Match versuchen. * Wenn das Funktioniert, dann ist der Typ auf der linken Seite auch smaller. * */ - Hashtable ht = new Hashtable(); + Hashtable ht = new Hashtable(); for(Type t : smaller12Erg) { for(Pair p : fc_tto.getFC()) diff --git a/src/mycompiler/mytypereconstruction/CSubstitution.java b/src/mycompiler/mytypereconstruction/CSubstitution.java index 13586222a..c5a749e85 100755 --- a/src/mycompiler/mytypereconstruction/CSubstitution.java +++ b/src/mycompiler/mytypereconstruction/CSubstitution.java @@ -191,7 +191,7 @@ public class CSubstitution // ino.end // ino.method.execute.27045.body { - TypePlaceholder uniqueVar = TypePlaceholder.getInstance(m_TypeVar.getName()); + TypePlaceholder uniqueVar = TypePlaceholder.getInstance(m_TypeVar.getName().toString()); if(uniqueVar==null){ throw new CTypeReconstructionException("CSubstitution.execute(): TypePlaceholder \""+m_TypeVar.getName()+"\" wurde nicht in der Registry gefunden!",null); } From 3232201843a8de1332490032f4c55c4a47af1894 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 2 Sep 2014 18:55:54 +0200 Subject: [PATCH 06/46] Fehler in WildcardType.printJavaCode behoben --- .../syntaxtree/type/ExtendsWildcardType.java | 9 +++++++++ .../dhbwstuttgart/syntaxtree/type/SuperWildcardType.java | 2 +- src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java | 6 +----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java index 9ef46ec74..b409a8d63 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java @@ -1,5 +1,8 @@ package de.dhbwstuttgart.syntaxtree.type; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; + /** * Stellt eine Wildcard mit oberer Grenze dar. @@ -121,4 +124,10 @@ public class ExtendsWildcardType extends WildcardType implements ITypeContainer, { return this.get_ExtendsType(); } + + @Override + public JavaCodeResult printJavaCode(ResultSet resultSet) { + return new JavaCodeResult("? extends "+this.extendsType.printJavaCode(resultSet)); + } + } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java index 6a4e9d909..9e7eacf92 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java @@ -126,7 +126,7 @@ public class SuperWildcardType extends WildcardType implements ITypeContainer, I @Override public JavaCodeResult printJavaCode(ResultSet result){ - return new JavaCodeResult("? super " + this.superType.printJavaCode(resultSet)); + return new JavaCodeResult("? super " + this.superType.printJavaCode(result)); } } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java index b3dd66d6a..6d653a33a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java @@ -89,10 +89,6 @@ public class WildcardType extends Type{ @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { - //String ret = "? extends "; - //ret+=this.extendsType; - //TODO hier wird statt "? extends class" nur "class" ausgegeben - return new JavaCodeResult(this.toString()); - + throw new NotImplementedException(); } } From 3d88fb479b3fcfee0f0fb12f69e8786396f76c85 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Wed, 3 Sep 2014 10:42:12 +0200 Subject: [PATCH 07/46] Testfile angepasst --- src/de/dhbwstuttgart/core/SourceFile.java | 2 +- src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java | 1 - test/plugindevelopment/TypeInsertTests/LambdaTest23.jav | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/de/dhbwstuttgart/core/SourceFile.java b/src/de/dhbwstuttgart/core/SourceFile.java index 61170af10..84116c4a2 100755 --- a/src/de/dhbwstuttgart/core/SourceFile.java +++ b/src/de/dhbwstuttgart/core/SourceFile.java @@ -1194,7 +1194,7 @@ public class SourceFile java.lang.reflect.Type genericReturnType=methods[j].getGenericReturnType(); Type returnType=createTypeFromJavaGenericType(genericReturnType,methods[j].getReturnType(),jreSpiderRegistry); - + java.lang.reflect.Type[] gpt=methods[j].getGenericParameterTypes(); java.lang.Class[] pt=methods[j].getParameterTypes(); diff --git a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java index 9e7eacf92..cae2538dd 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java @@ -42,7 +42,6 @@ public class SuperWildcardType extends WildcardType implements ITypeContainer, I */ public String toString() { - System.out.println("!"); return "? super " + superType.toString(); } diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav index 1d4b28d80..30ae2689c 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav @@ -1,6 +1,6 @@ import java.util.Vector; -class Matrix extends Vector> { +class Matrix extends Vector> { Matrix mul(m){ ret; @@ -10,5 +10,4 @@ class Matrix extends Vector> { return ret; } - } \ No newline at end of file From 93a6070bd4801a959331f0e582ec6ed7817eeb98 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Wed, 3 Sep 2014 16:15:04 +0200 Subject: [PATCH 08/46] =?UTF-8?q?=C3=84nderungen=20an=20Testfiles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/de/dhbwstuttgart/core/MyCompiler.java | 8 ++++---- src/de/dhbwstuttgart/core/SourceFile.java | 6 +++++- src/de/dhbwstuttgart/syntaxtree/Class.java | 3 --- src/de/dhbwstuttgart/syntaxtree/type/Type.java | 5 +++-- .../typeinference/unify/FC_TTO.java | 8 ++++++++ .../typeinference/unify/Unify.java | 2 +- .../TypeInsertTests/LambdaTest23.jav | 15 +++++++-------- .../TypeInsertTests/Matrix.java | 2 +- .../TypeInsertTests/OperatorTest.jav | 5 +++++ .../TypeInsertTests/OperatorTest.java | 18 ++++++++++++++++++ 10 files changed, 52 insertions(+), 20 deletions(-) create mode 100644 test/plugindevelopment/TypeInsertTests/OperatorTest.jav create mode 100644 test/plugindevelopment/TypeInsertTests/OperatorTest.java diff --git a/src/de/dhbwstuttgart/core/MyCompiler.java b/src/de/dhbwstuttgart/core/MyCompiler.java index 20e885010..1095a4b0b 100755 --- a/src/de/dhbwstuttgart/core/MyCompiler.java +++ b/src/de/dhbwstuttgart/core/MyCompiler.java @@ -658,7 +658,7 @@ public class MyCompiler implements MyCompilerAPI return OutputDir; } // ino.end - +/* // ino.method.getFullyQualifiedNameFromClassname.21322.definition public static String getFullyQualifiedNameFromClassname(String typ, ImportDeclarations declarations) // ino.end @@ -677,7 +677,7 @@ public class MyCompiler implements MyCompilerAPI return ret; } // ino.end - + */ // ino.method.makeRefTypesFullyQualified.21325.defdescription type=javadoc /** * @author HOTI @@ -686,7 +686,7 @@ public class MyCompiler implements MyCompilerAPI * @param containedTypes Alle Typen, die die Klasse beinhaltet * @param name Alle Klassen, die es in den BasicAssumptions und im * AbstractSyntaxTree gibt @param declarations Alle Import-Declarations - */ + // ino.end // ino.method.makeRefTypesFullyQualified.21325.definition public static void makeRefTypesFullyQualified(Vector containedTypes, ImportDeclarations declarations) @@ -716,7 +716,7 @@ public class MyCompiler implements MyCompilerAPI } } // ino.end - + */ /** * @author Arne Lüdtke * Ersetzt alle GTVs durch TPHs mit gleichem Namen. Arbeitet Rekursiv. diff --git a/src/de/dhbwstuttgart/core/SourceFile.java b/src/de/dhbwstuttgart/core/SourceFile.java index 84116c4a2..201e7ef13 100755 --- a/src/de/dhbwstuttgart/core/SourceFile.java +++ b/src/de/dhbwstuttgart/core/SourceFile.java @@ -690,7 +690,9 @@ public class SourceFile } xConstraints.add(cons); } - typinferenzLog.debug("Karthesisches Produkt der Constraints: "+xConstraints); + //typinferenzLog.debug("Karthesisches Produkt der Constraints: "+xConstraints); + + finiteClosure.generateFullyNamedTypes(globalAssumptions); ////////////////////////////// // Unifizierung der Constraints: @@ -735,6 +737,7 @@ public class SourceFile //Erst die Unifizierung erstellen: Vector constraintsClone = (Vector)constraints.clone(); + /* //Typen kontrollieren: for(Pair p : constraintsClone){ Type t = p.TA1; @@ -754,6 +757,7 @@ public class SourceFile if(!(replaceType == null))p.TA2 = replaceType; } } + */ Vector> unifyResult = Unify.unify(constraintsClone, finiteClosure); //Dann den Ergebnissen anfügen diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index 2dba67201..2bc0e7ad6 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -659,9 +659,6 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit // ino.end // ino.method.TRProg.23110.body { - /* - - */ ////////////////////////////// // Und los geht's: ////////////////////////////// diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Type.java b/src/de/dhbwstuttgart/syntaxtree/type/Type.java index 7b2ec3eac..6dc590142 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Type.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Type.java @@ -176,8 +176,9 @@ public class Type implements IItemWithOffset // ino.method.equals.26765.body { if(obj instanceof Type){ - String name2 = ((Type)obj).printJavaCode(new ResultSet()).toString(); - return printJavaCode(new ResultSet()).toString().equals(name2); + // String name2 = ((Type)obj).printJavaCode(new ResultSet()).toString(); + //return printJavaCode(new ResultSet()).toString().equals(name2); + return ((Type)obj).name.equals(name); } else{ return false; diff --git a/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java b/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java index 9bfd99b32..4adfb430f 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java +++ b/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java @@ -7,6 +7,7 @@ import java.util.Vector; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; // ino.class.FC_TTO.28013.description type=javadoc /** @@ -70,5 +71,12 @@ public class FC_TTO public String toString(){ return "FC: "+getFC()+"\nTTO: "+getTTO()+"\nCLASSVEC: "+getClasses(); } + + public void generateFullyNamedTypes(TypeAssumptions ass) { + for(Pair p : this.FC){ + p.TA1 = ass.getTypeFor(p.TA1, null); + p.TA2 = ass.getTypeFor(p.TA2, null); + } + } } // ino.end diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index c2319b003..0e87ee83f 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -1833,7 +1833,7 @@ throws MatchException // ino.end // ino.method.SubstHashtable2VectorPair.28076.definition - public static Vector SubstHashtable2VectorPair (Hashtable ht) + public static Vector SubstHashtable2VectorPair (Hashtable ht) // ino.end // ino.method.SubstHashtable2VectorPair.28076.body { diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav index 30ae2689c..4bc270c4b 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav @@ -1,13 +1,12 @@ import java.util.Vector; -class Matrix extends Vector> { +class Matrix extends Vector> { - Matrix mul(m){ - ret; - ret = new Matrix(); - i; - i = this.size(); - - return ret; + void mul(m){ + v1; + v1 = this.elementAt(1); + erg; + erg = v1.elementAt(1); } + } \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/Matrix.java b/test/plugindevelopment/TypeInsertTests/Matrix.java index 500f58d30..dbc9ed1c0 100644 --- a/test/plugindevelopment/TypeInsertTests/Matrix.java +++ b/test/plugindevelopment/TypeInsertTests/Matrix.java @@ -11,6 +11,6 @@ public class Matrix { public void run(){ Vector mustContain = new Vector(); //mustContain.add("TestIfStmt var"); - MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + //MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); } } diff --git a/test/plugindevelopment/TypeInsertTests/OperatorTest.jav b/test/plugindevelopment/TypeInsertTests/OperatorTest.jav new file mode 100644 index 000000000..1f97f6dab --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/OperatorTest.jav @@ -0,0 +1,5 @@ +class RelOpTest{ + i = 1 + 1; + j = 1 * 1; + k = 1 / 0; +} \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/OperatorTest.java b/test/plugindevelopment/TypeInsertTests/OperatorTest.java new file mode 100644 index 000000000..48d5c6718 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/OperatorTest.java @@ -0,0 +1,18 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class OperatorTest { + private static final String TEST_FILE = "OperatorTest.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + mustContain.add("Integer i"); + mustContain.add("Integer j"); + mustContain.add("Integer k"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} From c90f1404ab8ab6b3800909efc85b366fe10857ed Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 4 Sep 2014 16:35:44 +0200 Subject: [PATCH 09/46] =?UTF-8?q?Gro=C3=9Fe=20Umstrukturierung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dhbwstuttgart/bytecode}/Attribute.java | 6 +- .../bytecode}/AttributeInfo.java | 5 +- .../bytecode}/CONSTANT_Class_info.java | 2 +- .../bytecode}/CONSTANT_Double_info.java | 2 +- .../bytecode}/CONSTANT_Fieldref_info.java | 2 +- .../bytecode}/CONSTANT_Float_info.java | 2 +- .../bytecode}/CONSTANT_Integer_info.java | 2 +- .../CONSTANT_InterfaceMethodref_info.java | 2 +- .../bytecode}/CONSTANT_Long_info.java | 2 +- .../bytecode}/CONSTANT_Methodref_info.java | 2 +- .../bytecode}/CONSTANT_NameAndType_info.java | 2 +- .../bytecode}/CONSTANT_String_info.java | 2 +- .../bytecode}/CONSTANT_Utf8_info.java | 2 +- .../dhbwstuttgart/bytecode}/CPInfo.java | 2 +- .../dhbwstuttgart/bytecode}/ClassFile.java | 12 +- .../bytecode}/ClassFileMember.java | 4 +- .../bytecode}/CodeAttribute.java | 4 +- .../bytecode}/ExceptionTable.java | 2 +- .../dhbwstuttgart/bytecode}/FieldInfo.java | 6 +- .../dhbwstuttgart/bytecode}/JVMCode.java | 6 +- .../dhbwstuttgart/bytecode}/Key.java | 2 +- .../dhbwstuttgart/bytecode}/MethodInfo.java | 6 +- .../bytecode}/SignatureInfo.java | 6 +- .../dhbwstuttgart/core/AClassOrInterface.java | 3 +- src/de/dhbwstuttgart/core/MyCompiler.java | 8 +- src/de/dhbwstuttgart/core/MyCompilerAPI.java | 7 +- .../CTypeReconstructionException.java | 2 +- .../myexception/JVMCodeException.java | 2 +- .../myexception/MatchException.java | 2 +- .../myexception/SCClassBodyException.java | 2 +- .../myexception/SCClassException.java | 2 +- .../dhbwstuttgart}/myexception/SCExcept.java | 2 +- .../myexception/SCException.java | 2 +- .../myexception/SCMethodException.java | 2 +- .../myexception/SCStatementException.java | 2 +- src/de/dhbwstuttgart/syntaxtree/Class.java | 3 + .../dhbwstuttgart/syntaxtree/ClassBody.java | 13 +- src/de/dhbwstuttgart/syntaxtree/Constant.java | 8 +- .../dhbwstuttgart/syntaxtree/Constructor.java | 5 +- src/de/dhbwstuttgart/syntaxtree/Field.java | 5 +- .../syntaxtree/FieldDeclaration.java | 5 +- .../syntaxtree/FormalParameter.java | 7 +- .../dhbwstuttgart/syntaxtree}/Interface.java | 18 +- .../syntaxtree}/InterfaceBody.java | 9 +- src/de/dhbwstuttgart/syntaxtree/Method.java | 9 +- .../syntaxtree/ParameterList.java | 4 +- .../{core => syntaxtree}/SourceFile.java | 46 +-- .../{core => syntaxtree}/SyntaxTreeNode.java | 4 +- .../dhbwstuttgart/syntaxtree/misc/DeclId.java | 14 +- .../dhbwstuttgart/syntaxtree/misc/UsedId.java | 2 +- .../syntaxtree/operator/AddOp.java | 8 +- .../syntaxtree/operator/DivideOp.java | 8 +- .../syntaxtree/operator/EqualOp.java | 10 +- .../syntaxtree/operator/GreaterEquOp.java | 8 +- .../syntaxtree/operator/GreaterOp.java | 8 +- .../syntaxtree/operator/LessEquOp.java | 8 +- .../syntaxtree/operator/LessOp.java | 8 +- .../syntaxtree/operator/LogOp.java | 10 +- .../syntaxtree/operator/MinusOp.java | 8 +- .../syntaxtree/operator/ModuloOp.java | 8 +- .../syntaxtree/operator/MulOp.java | 2 +- .../syntaxtree/operator/NotEqualOp.java | 10 +- .../syntaxtree/operator/Operator.java | 10 +- .../syntaxtree/operator/PlusOp.java | 8 +- .../syntaxtree/operator/RelOp.java | 8 +- .../syntaxtree/operator/TimesOp.java | 8 +- .../syntaxtree/statement/ArgumentList.java | 9 +- .../syntaxtree/statement/Assign.java | 19 +- .../syntaxtree/statement/Binary.java | 19 +- .../syntaxtree/statement/Block.java | 17 +- .../syntaxtree/statement/BoolLiteral.java | 15 +- .../syntaxtree/statement/CastExpr.java | 19 +- .../syntaxtree/statement/CharLiteral.java | 15 +- .../syntaxtree/statement/DoubleLiteral.java | 12 +- .../syntaxtree/statement/EmptyStmt.java | 13 +- .../syntaxtree/statement/Expr.java | 4 +- .../syntaxtree/statement/FloatLiteral.java | 10 +- .../syntaxtree/statement/ForStmt.java | 16 +- .../syntaxtree/statement/IfStmt.java | 19 +- .../syntaxtree/statement/InstVar.java | 15 +- .../syntaxtree/statement/InstanceOf.java | 17 +- .../syntaxtree/statement/IntLiteral.java | 15 +- .../statement/LambdaExpression.java | 12 +- .../syntaxtree/statement/Literal.java | 4 +- .../syntaxtree/statement/LocalOrFieldVar.java | 19 +- .../syntaxtree/statement/LocalVarDecl.java | 15 +- .../syntaxtree/statement/LongLiteral.java | 12 +- .../syntaxtree/statement/MethodCall.java | 19 +- .../syntaxtree/statement/NegativeExpr.java | 17 +- .../syntaxtree/statement/NewArray.java | 15 +- .../syntaxtree/statement/NewClass.java | 19 +- .../syntaxtree/statement/NotExpr.java | 15 +- .../syntaxtree/statement/Null.java | 15 +- .../syntaxtree/statement/PositivExpr.java | 13 +- .../syntaxtree/statement/PostDecExpr.java | 19 +- .../syntaxtree/statement/PostIncExpr.java | 19 +- .../syntaxtree/statement/PreDecExpr.java | 19 +- .../syntaxtree/statement/PreIncExpr.java | 19 +- .../syntaxtree/statement/Receiver.java | 4 +- .../syntaxtree/statement/Return.java | 19 +- .../syntaxtree/statement/Statement.java | 12 +- .../syntaxtree/statement/StringLiteral.java | 15 +- .../syntaxtree/statement/This.java | 17 +- .../syntaxtree/statement/UnaryExpr.java | 7 +- .../syntaxtree/statement/UnaryMinus.java | 9 +- .../syntaxtree/statement/UnaryNot.java | 9 +- .../syntaxtree/statement/WhileStmt.java | 19 +- .../type/BoundedGenericTypeVar.java | 7 +- .../syntaxtree/type/GenericTypeVar.java | 13 +- .../syntaxtree/type/RefType.java | 8 +- .../dhbwstuttgart/syntaxtree/type/Type.java | 4 +- .../typeinference/ConstraintsSet.java | 4 - .../typeinference/FunNInterface.java | 4 +- .../typeinference/SingleConstraint.java | 11 +- .../assumptions/GenericVarAssumption.java | 2 +- .../assumptions/TypeAssumptions.java | 14 +- .../typeinference/parser/JavaParser.java | 6 +- .../typeinference/parser/JavaParser.jay | 8 +- .../GenericTypeInsertPoint.java | 2 +- .../typedeployment/TypeInsertPoint.java | 2 +- .../typedeployment/TypeInsertSet.java | 2 +- .../typeinference/unify/Unify.java | 6 +- src/mycompiler/mytest/APITest.java | 18 - src/mycompiler/mytest/LambdaTest.java | 206 ----------- .../mytypereconstruction/CHelper.java | 62 ---- .../CIntersectionType.java | 127 ------- .../mytypereconstruction/CMultiplyTuple.java | 218 ----------- .../CReconstructionTuple.java | 133 ------- .../mytypereconstruction/CSubstitution.java | 272 -------------- .../CSubstitutionGenVar.java | 71 ---- .../mytypereconstruction/CSupportData.java | 346 ------------------ .../mytypereconstruction/CTriple.java | 263 ------------- .../CReplaceTypeEvent.java | 55 --- .../IReplaceTypeEventProvider.java | 41 --- .../ITypeReplacementListener.java | 42 --- .../set/CHashtableSet.java | 262 ------------- .../set/CMultiplyTupleSet.java | 52 --- .../set/CReconstructionTupleSet.java | 58 --- .../mytypereconstruction/set/CSet.java | 72 ---- .../set/CSubstitutionSet.java | 134 ------- .../mytypereconstruction/set/CTripleSet.java | 60 --- .../set/CTypeAssumptionSet.java | 67 ---- .../mytypereconstruction/set/CVectorSet.java | 165 --------- .../set/IHashSetElement.java | 24 -- .../mytypereconstruction/set/IHashSetKey.java | 19 - .../CInstVarTypeAssumption.java | 99 ----- .../CLocalVarTypeAssumption.java | 179 --------- .../typeassumption/CMethodTypeAssumption.java | 251 ------------- .../typeassumption/CParaTypeAssumption.java | 153 -------- .../typeassumption/CTypeAssumption.java | 254 ------------- .../typeassumptionkey/CInstVarKey.java | 37 -- .../typeassumptionkey/CLocalVarKey.java | 131 ------- .../typeassumptionkey/CMethodKey.java | 112 ------ .../typeassumptionkey/CMethodParaKey.java | 118 ------ .../typeassumptionkey/CTypeAssumptionKey.java | 94 ----- .../typeassumptionkey/IMethodBoundKey.java | 68 ---- .../unused/ConstantValueAttribute.java | 7 - src/mycompiler/unused/Import.java | 8 - src/mycompiler/unused/JavaCompiler.java | 30 -- src/mycompiler/unused/TestClass.java | 19 - test/bytecode/BytecodeTester.java | 4 +- test/bytecode/EmptyClassTest.java | 2 +- test/bytecode/GeneralTest.java | 2 +- .../typeReconstructionTest/TrMakeFCTest.java | 4 +- .../TrSubUnifyTest.java | 4 +- .../typeReconstructionTest/TrUnifyTest.java | 4 +- test/plugindevelopment/TRMEqualTest.java | 2 +- test/syntaxTree/NodeEqualTest.java | 4 +- 168 files changed, 595 insertions(+), 4848 deletions(-) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/Attribute.java (94%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/AttributeInfo.java (96%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_Class_info.java (97%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_Double_info.java (98%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_Fieldref_info.java (98%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_Float_info.java (97%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_Integer_info.java (97%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_InterfaceMethodref_info.java (98%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_Long_info.java (98%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_Methodref_info.java (98%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_NameAndType_info.java (98%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_String_info.java (97%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_Utf8_info.java (97%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CPInfo.java (97%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/ClassFile.java (99%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/ClassFileMember.java (67%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CodeAttribute.java (99%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/ExceptionTable.java (97%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/FieldInfo.java (98%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/JVMCode.java (99%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/Key.java (98%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/MethodInfo.java (97%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/SignatureInfo.java (99%) rename src/{mycompiler => de/dhbwstuttgart}/myexception/CTypeReconstructionException.java (99%) rename src/{mycompiler => de/dhbwstuttgart}/myexception/JVMCodeException.java (93%) rename src/{mycompiler => de/dhbwstuttgart}/myexception/MatchException.java (93%) rename src/{mycompiler => de/dhbwstuttgart}/myexception/SCClassBodyException.java (96%) rename src/{mycompiler => de/dhbwstuttgart}/myexception/SCClassException.java (97%) rename src/{mycompiler => de/dhbwstuttgart}/myexception/SCExcept.java (98%) rename src/{mycompiler => de/dhbwstuttgart}/myexception/SCException.java (97%) rename src/{mycompiler => de/dhbwstuttgart}/myexception/SCMethodException.java (96%) rename src/{mycompiler => de/dhbwstuttgart}/myexception/SCStatementException.java (96%) rename src/{mycompiler/myinterface => de/dhbwstuttgart/syntaxtree}/Interface.java (89%) rename src/{mycompiler/myinterface => de/dhbwstuttgart/syntaxtree}/InterfaceBody.java (93%) rename src/de/dhbwstuttgart/{core => syntaxtree}/SourceFile.java (98%) rename src/de/dhbwstuttgart/{core => syntaxtree}/SyntaxTreeNode.java (96%) delete mode 100755 src/mycompiler/mytest/APITest.java delete mode 100755 src/mycompiler/mytest/LambdaTest.java delete mode 100755 src/mycompiler/mytypereconstruction/CHelper.java delete mode 100755 src/mycompiler/mytypereconstruction/CIntersectionType.java delete mode 100755 src/mycompiler/mytypereconstruction/CMultiplyTuple.java delete mode 100755 src/mycompiler/mytypereconstruction/CReconstructionTuple.java delete mode 100755 src/mycompiler/mytypereconstruction/CSubstitution.java delete mode 100755 src/mycompiler/mytypereconstruction/CSubstitutionGenVar.java delete mode 100755 src/mycompiler/mytypereconstruction/CSupportData.java delete mode 100755 src/mycompiler/mytypereconstruction/CTriple.java delete mode 100755 src/mycompiler/mytypereconstruction/replacementlistener/CReplaceTypeEvent.java delete mode 100755 src/mycompiler/mytypereconstruction/replacementlistener/IReplaceTypeEventProvider.java delete mode 100755 src/mycompiler/mytypereconstruction/replacementlistener/ITypeReplacementListener.java delete mode 100755 src/mycompiler/mytypereconstruction/set/CHashtableSet.java delete mode 100755 src/mycompiler/mytypereconstruction/set/CMultiplyTupleSet.java delete mode 100755 src/mycompiler/mytypereconstruction/set/CReconstructionTupleSet.java delete mode 100755 src/mycompiler/mytypereconstruction/set/CSet.java delete mode 100755 src/mycompiler/mytypereconstruction/set/CSubstitutionSet.java delete mode 100755 src/mycompiler/mytypereconstruction/set/CTripleSet.java delete mode 100755 src/mycompiler/mytypereconstruction/set/CTypeAssumptionSet.java delete mode 100755 src/mycompiler/mytypereconstruction/set/CVectorSet.java delete mode 100755 src/mycompiler/mytypereconstruction/set/IHashSetElement.java delete mode 100755 src/mycompiler/mytypereconstruction/set/IHashSetKey.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumption/CInstVarTypeAssumption.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumption/CLocalVarTypeAssumption.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumption/CMethodTypeAssumption.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumption/CParaTypeAssumption.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumption/CTypeAssumption.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumptionkey/CInstVarKey.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumptionkey/CLocalVarKey.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumptionkey/CMethodKey.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumptionkey/CMethodParaKey.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumptionkey/CTypeAssumptionKey.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumptionkey/IMethodBoundKey.java delete mode 100755 src/mycompiler/unused/ConstantValueAttribute.java delete mode 100755 src/mycompiler/unused/Import.java delete mode 100755 src/mycompiler/unused/JavaCompiler.java delete mode 100755 src/mycompiler/unused/TestClass.java diff --git a/src/mycompiler/mybytecode/Attribute.java b/src/de/dhbwstuttgart/bytecode/Attribute.java similarity index 94% rename from src/mycompiler/mybytecode/Attribute.java rename to src/de/dhbwstuttgart/bytecode/Attribute.java index 19a21e56d..579987798 100755 --- a/src/mycompiler/mybytecode/Attribute.java +++ b/src/de/dhbwstuttgart/bytecode/Attribute.java @@ -1,5 +1,5 @@ // ino.module.Attribute.8529.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.Attribute.8529.import @@ -7,11 +7,11 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; -import mycompiler.myexception.JVMCodeException; - import org.apache.log4j.Logger; // ino.end +import de.dhbwstuttgart.myexception.JVMCodeException; + // ino.class.Attribute.21446.declaration public abstract class Attribute implements ClassFileMember // ino.end diff --git a/src/mycompiler/mybytecode/AttributeInfo.java b/src/de/dhbwstuttgart/bytecode/AttributeInfo.java similarity index 96% rename from src/mycompiler/mybytecode/AttributeInfo.java rename to src/de/dhbwstuttgart/bytecode/AttributeInfo.java index 0c6eb249a..d43d5de69 100755 --- a/src/mycompiler/mybytecode/AttributeInfo.java +++ b/src/de/dhbwstuttgart/bytecode/AttributeInfo.java @@ -1,5 +1,5 @@ // ino.module.AttributeInfo.8530.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.AttributeInfo.8530.import @@ -8,8 +8,7 @@ import java.io.OutputStream; import java.lang.reflect.Array; import java.util.Vector; -import mycompiler.myexception.JVMCodeException; -// ino.end +import de.dhbwstuttgart.myexception.JVMCodeException; // ino.class.AttributeInfo.21467.declaration public class AttributeInfo extends Attribute diff --git a/src/mycompiler/mybytecode/CONSTANT_Class_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_Class_info.java similarity index 97% rename from src/mycompiler/mybytecode/CONSTANT_Class_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_Class_info.java index 76f61b2cd..046fbe93f 100755 --- a/src/mycompiler/mybytecode/CONSTANT_Class_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_Class_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_Class_info.8533.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_Class_info.8533.import diff --git a/src/mycompiler/mybytecode/CONSTANT_Double_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_Double_info.java similarity index 98% rename from src/mycompiler/mybytecode/CONSTANT_Double_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_Double_info.java index 18c3523c0..af632c3ab 100755 --- a/src/mycompiler/mybytecode/CONSTANT_Double_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_Double_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_Double_info.8534.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_Double_info.8534.import diff --git a/src/mycompiler/mybytecode/CONSTANT_Fieldref_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_Fieldref_info.java similarity index 98% rename from src/mycompiler/mybytecode/CONSTANT_Fieldref_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_Fieldref_info.java index 05dbd5f9c..0f82f3a30 100755 --- a/src/mycompiler/mybytecode/CONSTANT_Fieldref_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_Fieldref_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_Fieldref_info.8535.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_Fieldref_info.8535.import diff --git a/src/mycompiler/mybytecode/CONSTANT_Float_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_Float_info.java similarity index 97% rename from src/mycompiler/mybytecode/CONSTANT_Float_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_Float_info.java index 7a442fdd4..4a7e8582a 100755 --- a/src/mycompiler/mybytecode/CONSTANT_Float_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_Float_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_Float_info.8536.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_Float_info.8536.import import java.io.IOException; diff --git a/src/mycompiler/mybytecode/CONSTANT_Integer_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_Integer_info.java similarity index 97% rename from src/mycompiler/mybytecode/CONSTANT_Integer_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_Integer_info.java index c317bfb4f..1747ab73b 100755 --- a/src/mycompiler/mybytecode/CONSTANT_Integer_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_Integer_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_Integer_info.8537.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_Integer_info.8537.import import java.io.FileOutputStream; diff --git a/src/mycompiler/mybytecode/CONSTANT_InterfaceMethodref_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_InterfaceMethodref_info.java similarity index 98% rename from src/mycompiler/mybytecode/CONSTANT_InterfaceMethodref_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_InterfaceMethodref_info.java index 6701db8a8..70555a58a 100755 --- a/src/mycompiler/mybytecode/CONSTANT_InterfaceMethodref_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_InterfaceMethodref_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_InterfaceMethodref_info.8538.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_InterfaceMethodref_info.8538.import diff --git a/src/mycompiler/mybytecode/CONSTANT_Long_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_Long_info.java similarity index 98% rename from src/mycompiler/mybytecode/CONSTANT_Long_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_Long_info.java index 6aacc7472..493529287 100755 --- a/src/mycompiler/mybytecode/CONSTANT_Long_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_Long_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_Long_info.8539.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_Long_info.8539.import diff --git a/src/mycompiler/mybytecode/CONSTANT_Methodref_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_Methodref_info.java similarity index 98% rename from src/mycompiler/mybytecode/CONSTANT_Methodref_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_Methodref_info.java index 2f9790530..b1b261640 100755 --- a/src/mycompiler/mybytecode/CONSTANT_Methodref_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_Methodref_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_Methodref_info.8540.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_Methodref_info.8540.import diff --git a/src/mycompiler/mybytecode/CONSTANT_NameAndType_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_NameAndType_info.java similarity index 98% rename from src/mycompiler/mybytecode/CONSTANT_NameAndType_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_NameAndType_info.java index d13049be7..d91151670 100755 --- a/src/mycompiler/mybytecode/CONSTANT_NameAndType_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_NameAndType_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_NameAndType_info.8541.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_NameAndType_info.8541.import diff --git a/src/mycompiler/mybytecode/CONSTANT_String_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_String_info.java similarity index 97% rename from src/mycompiler/mybytecode/CONSTANT_String_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_String_info.java index b8ffb5980..4d1c70462 100755 --- a/src/mycompiler/mybytecode/CONSTANT_String_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_String_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_String_info.8542.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_String_info.8542.import diff --git a/src/mycompiler/mybytecode/CONSTANT_Utf8_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_Utf8_info.java similarity index 97% rename from src/mycompiler/mybytecode/CONSTANT_Utf8_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_Utf8_info.java index 58a44c2d9..df9d2ef2b 100755 --- a/src/mycompiler/mybytecode/CONSTANT_Utf8_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_Utf8_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_Utf8_info.8543.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_Utf8_info.8543.import diff --git a/src/mycompiler/mybytecode/CPInfo.java b/src/de/dhbwstuttgart/bytecode/CPInfo.java similarity index 97% rename from src/mycompiler/mybytecode/CPInfo.java rename to src/de/dhbwstuttgart/bytecode/CPInfo.java index 9ee33ba6c..a3591b644 100755 --- a/src/mycompiler/mybytecode/CPInfo.java +++ b/src/de/dhbwstuttgart/bytecode/CPInfo.java @@ -1,5 +1,5 @@ // ino.module.CPInfo.8544.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CPInfo.8544.import diff --git a/src/mycompiler/mybytecode/ClassFile.java b/src/de/dhbwstuttgart/bytecode/ClassFile.java similarity index 99% rename from src/mycompiler/mybytecode/ClassFile.java rename to src/de/dhbwstuttgart/bytecode/ClassFile.java index 2306a10f4..ba7de8e54 100755 --- a/src/mycompiler/mybytecode/ClassFile.java +++ b/src/de/dhbwstuttgart/bytecode/ClassFile.java @@ -3,7 +3,7 @@ // ino.module.ClassFile.8531.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.ClassFile.8531.import import java.io.File; @@ -13,9 +13,6 @@ import java.io.OutputStream; import java.lang.reflect.Array; import java.util.Vector; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myinterface.Interface; - import org.apache.log4j.Logger; // ino.end @@ -23,9 +20,14 @@ import org.apache.log4j.Logger; + + + import de.dhbwstuttgart.core.MyCompiler; -import de.dhbwstuttgart.core.SourceFile; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.syntaxtree.Interface; import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.statement.Assign; import de.dhbwstuttgart.syntaxtree.statement.Block; diff --git a/src/mycompiler/mybytecode/ClassFileMember.java b/src/de/dhbwstuttgart/bytecode/ClassFileMember.java similarity index 67% rename from src/mycompiler/mybytecode/ClassFileMember.java rename to src/de/dhbwstuttgart/bytecode/ClassFileMember.java index 8c54cfb96..85d628b74 100644 --- a/src/mycompiler/mybytecode/ClassFileMember.java +++ b/src/de/dhbwstuttgart/bytecode/ClassFileMember.java @@ -1,9 +1,9 @@ -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; import java.io.IOException; import java.io.OutputStream; -import mycompiler.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.JVMCodeException; public interface ClassFileMember { public void codegen(ClassFile cf, OutputStream out) throws JVMCodeException, IOException; diff --git a/src/mycompiler/mybytecode/CodeAttribute.java b/src/de/dhbwstuttgart/bytecode/CodeAttribute.java similarity index 99% rename from src/mycompiler/mybytecode/CodeAttribute.java rename to src/de/dhbwstuttgart/bytecode/CodeAttribute.java index d8844f206..d8a6dfdf1 100755 --- a/src/mycompiler/mybytecode/CodeAttribute.java +++ b/src/de/dhbwstuttgart/bytecode/CodeAttribute.java @@ -4,7 +4,7 @@ //muss wieder einkommentiert werden // ino.module.CodeAttribute.8532.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CodeAttribute.8532.import @@ -14,9 +14,9 @@ import java.io.OutputStream; import java.lang.reflect.Array; import java.util.Vector; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.type.Type; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.myexception.JVMCodeException; // ino.class.CodeAttribute.21681.declaration public class CodeAttribute extends Attribute diff --git a/src/mycompiler/mybytecode/ExceptionTable.java b/src/de/dhbwstuttgart/bytecode/ExceptionTable.java similarity index 97% rename from src/mycompiler/mybytecode/ExceptionTable.java rename to src/de/dhbwstuttgart/bytecode/ExceptionTable.java index c968ed1a0..8c5dbe48b 100755 --- a/src/mycompiler/mybytecode/ExceptionTable.java +++ b/src/de/dhbwstuttgart/bytecode/ExceptionTable.java @@ -1,5 +1,5 @@ // ino.module.ExceptionTable.8545.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.ExceptionTable.8545.import diff --git a/src/mycompiler/mybytecode/FieldInfo.java b/src/de/dhbwstuttgart/bytecode/FieldInfo.java similarity index 98% rename from src/mycompiler/mybytecode/FieldInfo.java rename to src/de/dhbwstuttgart/bytecode/FieldInfo.java index 8f2febd05..9347bb609 100755 --- a/src/mycompiler/mybytecode/FieldInfo.java +++ b/src/de/dhbwstuttgart/bytecode/FieldInfo.java @@ -1,5 +1,5 @@ // ino.module.FieldInfo.8546.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.FieldInfo.8546.import @@ -8,11 +8,11 @@ import java.io.IOException; import java.io.OutputStream; import java.util.Vector; -import mycompiler.myexception.JVMCodeException; - import org.apache.log4j.Logger; // ino.end +import de.dhbwstuttgart.myexception.JVMCodeException; + // ino.class.FieldInfo.22068.declaration public class FieldInfo implements ClassFileMember // ino.end diff --git a/src/mycompiler/mybytecode/JVMCode.java b/src/de/dhbwstuttgart/bytecode/JVMCode.java similarity index 99% rename from src/mycompiler/mybytecode/JVMCode.java rename to src/de/dhbwstuttgart/bytecode/JVMCode.java index 7e3e5c902..1966ae884 100755 --- a/src/mycompiler/mybytecode/JVMCode.java +++ b/src/de/dhbwstuttgart/bytecode/JVMCode.java @@ -1,14 +1,14 @@ // ino.module.JVMCode.8547.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.JVMCode.8547.import import java.util.Vector; -import mycompiler.myexception.JVMCodeException; - import org.apache.log4j.Logger; // ino.end + +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; // ino.class.JVMCode.22140.description type=javadoc diff --git a/src/mycompiler/mybytecode/Key.java b/src/de/dhbwstuttgart/bytecode/Key.java similarity index 98% rename from src/mycompiler/mybytecode/Key.java rename to src/de/dhbwstuttgart/bytecode/Key.java index 859bb8710..77df160e1 100755 --- a/src/mycompiler/mybytecode/Key.java +++ b/src/de/dhbwstuttgart/bytecode/Key.java @@ -1,5 +1,5 @@ // ino.module.Key.8548.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.Key.8548.import diff --git a/src/mycompiler/mybytecode/MethodInfo.java b/src/de/dhbwstuttgart/bytecode/MethodInfo.java similarity index 97% rename from src/mycompiler/mybytecode/MethodInfo.java rename to src/de/dhbwstuttgart/bytecode/MethodInfo.java index 56eee9b2d..a083b106c 100755 --- a/src/mycompiler/mybytecode/MethodInfo.java +++ b/src/de/dhbwstuttgart/bytecode/MethodInfo.java @@ -1,5 +1,5 @@ // ino.module.MethodInfo.8549.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.MethodInfo.8549.import @@ -8,11 +8,11 @@ import java.io.IOException; import java.io.OutputStream; import java.util.Vector; -import mycompiler.myexception.JVMCodeException; - import org.apache.log4j.Logger; // ino.end +import de.dhbwstuttgart.myexception.JVMCodeException; + // ino.class.MethodInfo.22923.declaration public class MethodInfo implements ClassFileMember // ino.end diff --git a/src/mycompiler/mybytecode/SignatureInfo.java b/src/de/dhbwstuttgart/bytecode/SignatureInfo.java similarity index 99% rename from src/mycompiler/mybytecode/SignatureInfo.java rename to src/de/dhbwstuttgart/bytecode/SignatureInfo.java index 8bb421661..cb4345977 100755 --- a/src/mycompiler/mybytecode/SignatureInfo.java +++ b/src/de/dhbwstuttgart/bytecode/SignatureInfo.java @@ -1,5 +1,5 @@ // ino.module.SignatureInfo.8550.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.SignatureInfo.8550.import @@ -8,14 +8,14 @@ import java.io.IOException; import java.io.OutputStream; import java.util.Vector; -import mycompiler.myexception.JVMCodeException; - import org.apache.log4j.Logger; // ino.end + +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.ParameterList; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; diff --git a/src/de/dhbwstuttgart/core/AClassOrInterface.java b/src/de/dhbwstuttgart/core/AClassOrInterface.java index 39249e677..7b9d3091a 100755 --- a/src/de/dhbwstuttgart/core/AClassOrInterface.java +++ b/src/de/dhbwstuttgart/core/AClassOrInterface.java @@ -6,7 +6,6 @@ package de.dhbwstuttgart.core; // ino.module.AClassOrInterface.8526.import import java.util.Vector; -import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; import org.apache.log4j.Logger; @@ -14,6 +13,8 @@ import org.apache.log4j.Logger; + +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.typeinference.parser.JavaClassName; diff --git a/src/de/dhbwstuttgart/core/MyCompiler.java b/src/de/dhbwstuttgart/core/MyCompiler.java index 1095a4b0b..c8f2d43ba 100755 --- a/src/de/dhbwstuttgart/core/MyCompiler.java +++ b/src/de/dhbwstuttgart/core/MyCompiler.java @@ -13,22 +13,22 @@ import java.io.Reader; import java.io.StringReader; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; - import org.apache.log4j.Logger; import org.apache.log4j.xml.DOMConfigurator; import com.sun.corba.se.spi.orbutil.fsm.Guard.Result; import com.sun.org.apache.xerces.internal.impl.xs.identity.Field; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassBody; import de.dhbwstuttgart.syntaxtree.FormalParameter; import de.dhbwstuttgart.syntaxtree.ImportDeclarations; import de.dhbwstuttgart.syntaxtree.Method; import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; diff --git a/src/de/dhbwstuttgart/core/MyCompilerAPI.java b/src/de/dhbwstuttgart/core/MyCompilerAPI.java index b6a72b36e..fcfb84508 100755 --- a/src/de/dhbwstuttgart/core/MyCompilerAPI.java +++ b/src/de/dhbwstuttgart/core/MyCompilerAPI.java @@ -8,14 +8,15 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.exceptions.ParserError; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.parser.JavaParser; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; // ino.class.MyCompilerAPI.21328.description type=javadoc /** diff --git a/src/mycompiler/myexception/CTypeReconstructionException.java b/src/de/dhbwstuttgart/myexception/CTypeReconstructionException.java similarity index 99% rename from src/mycompiler/myexception/CTypeReconstructionException.java rename to src/de/dhbwstuttgart/myexception/CTypeReconstructionException.java index 132daf7be..babbc6918 100755 --- a/src/mycompiler/myexception/CTypeReconstructionException.java +++ b/src/de/dhbwstuttgart/myexception/CTypeReconstructionException.java @@ -1,5 +1,5 @@ // ino.module.CTypeReconstructionException.8572.package -package mycompiler.myexception; +package de.dhbwstuttgart.myexception; // ino.end // ino.module.CTypeReconstructionException.8572.import diff --git a/src/mycompiler/myexception/JVMCodeException.java b/src/de/dhbwstuttgart/myexception/JVMCodeException.java similarity index 93% rename from src/mycompiler/myexception/JVMCodeException.java rename to src/de/dhbwstuttgart/myexception/JVMCodeException.java index 7eecf3fb1..e767b933a 100755 --- a/src/mycompiler/myexception/JVMCodeException.java +++ b/src/de/dhbwstuttgart/myexception/JVMCodeException.java @@ -1,5 +1,5 @@ // ino.module.JVMCodeException.8573.package -package mycompiler.myexception; +package de.dhbwstuttgart.myexception; // ino.end // ino.class.JVMCodeException.23780.declaration public class JVMCodeException extends Exception diff --git a/src/mycompiler/myexception/MatchException.java b/src/de/dhbwstuttgart/myexception/MatchException.java similarity index 93% rename from src/mycompiler/myexception/MatchException.java rename to src/de/dhbwstuttgart/myexception/MatchException.java index 1235f039f..12008da60 100755 --- a/src/mycompiler/myexception/MatchException.java +++ b/src/de/dhbwstuttgart/myexception/MatchException.java @@ -1,5 +1,5 @@ // ino.module.MatchException.8574.package -package mycompiler.myexception; +package de.dhbwstuttgart.myexception; // ino.end // ino.class.MatchException.23790.declaration diff --git a/src/mycompiler/myexception/SCClassBodyException.java b/src/de/dhbwstuttgart/myexception/SCClassBodyException.java similarity index 96% rename from src/mycompiler/myexception/SCClassBodyException.java rename to src/de/dhbwstuttgart/myexception/SCClassBodyException.java index 490811985..4f493e661 100755 --- a/src/mycompiler/myexception/SCClassBodyException.java +++ b/src/de/dhbwstuttgart/myexception/SCClassBodyException.java @@ -1,5 +1,5 @@ // ino.module.SCClassBodyException.8575.package -package mycompiler.myexception; +package de.dhbwstuttgart.myexception; // ino.end // ino.module.SCClassBodyException.8575.import import java.util.Vector; diff --git a/src/mycompiler/myexception/SCClassException.java b/src/de/dhbwstuttgart/myexception/SCClassException.java similarity index 97% rename from src/mycompiler/myexception/SCClassException.java rename to src/de/dhbwstuttgart/myexception/SCClassException.java index ace83fdc3..03ed35eec 100755 --- a/src/mycompiler/myexception/SCClassException.java +++ b/src/de/dhbwstuttgart/myexception/SCClassException.java @@ -1,5 +1,5 @@ // ino.module.SCClassException.8576.package -package mycompiler.myexception; +package de.dhbwstuttgart.myexception; // ino.end // ino.module.SCClassException.8576.import import java.util.Enumeration; diff --git a/src/mycompiler/myexception/SCExcept.java b/src/de/dhbwstuttgart/myexception/SCExcept.java similarity index 98% rename from src/mycompiler/myexception/SCExcept.java rename to src/de/dhbwstuttgart/myexception/SCExcept.java index 1b39c58a4..fd5d6ba88 100755 --- a/src/mycompiler/myexception/SCExcept.java +++ b/src/de/dhbwstuttgart/myexception/SCExcept.java @@ -1,5 +1,5 @@ // ino.module.SCExcept.8577.package -package mycompiler.myexception; +package de.dhbwstuttgart.myexception; // ino.end // ino.module.SCExcept.8577.import diff --git a/src/mycompiler/myexception/SCException.java b/src/de/dhbwstuttgart/myexception/SCException.java similarity index 97% rename from src/mycompiler/myexception/SCException.java rename to src/de/dhbwstuttgart/myexception/SCException.java index dc9cb5c53..d996cc66d 100755 --- a/src/mycompiler/myexception/SCException.java +++ b/src/de/dhbwstuttgart/myexception/SCException.java @@ -1,5 +1,5 @@ // ino.module.SCException.8578.package -package mycompiler.myexception; +package de.dhbwstuttgart.myexception; // ino.end // ino.module.SCException.8578.import import java.util.Enumeration; diff --git a/src/mycompiler/myexception/SCMethodException.java b/src/de/dhbwstuttgart/myexception/SCMethodException.java similarity index 96% rename from src/mycompiler/myexception/SCMethodException.java rename to src/de/dhbwstuttgart/myexception/SCMethodException.java index 045d79559..e336528f1 100755 --- a/src/mycompiler/myexception/SCMethodException.java +++ b/src/de/dhbwstuttgart/myexception/SCMethodException.java @@ -1,5 +1,5 @@ // ino.module.SCMethodException.8579.package -package mycompiler.myexception; +package de.dhbwstuttgart.myexception; // ino.end // ino.module.SCMethodException.8579.import import java.util.Vector; diff --git a/src/mycompiler/myexception/SCStatementException.java b/src/de/dhbwstuttgart/myexception/SCStatementException.java similarity index 96% rename from src/mycompiler/myexception/SCStatementException.java rename to src/de/dhbwstuttgart/myexception/SCStatementException.java index 8e7f0da35..f477527bc 100755 --- a/src/mycompiler/myexception/SCStatementException.java +++ b/src/de/dhbwstuttgart/myexception/SCStatementException.java @@ -1,5 +1,5 @@ // ino.module.SCStatementException.8580.package -package mycompiler.myexception; +package de.dhbwstuttgart.myexception; // ino.end // ino.module.SCStatementException.8580.import import java.util.Vector; diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index 2bc0e7ad6..2dba67201 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -659,6 +659,9 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit // ino.end // ino.method.TRProg.23110.body { + /* + + */ ////////////////////////////// // Und los geht's: ////////////////////////////// diff --git a/src/de/dhbwstuttgart/syntaxtree/ClassBody.java b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java index b987bae41..3dd79b67b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/ClassBody.java +++ b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java @@ -6,18 +6,19 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCClassBodyException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCMethodException; - import org.apache.log4j.Logger; // ino.end + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCClassBodyException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCMethodException; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.JavaCodeResult; diff --git a/src/de/dhbwstuttgart/syntaxtree/Constant.java b/src/de/dhbwstuttgart/syntaxtree/Constant.java index e07c75b3e..5790a442d 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Constant.java +++ b/src/de/dhbwstuttgart/syntaxtree/Constant.java @@ -5,7 +5,11 @@ package de.dhbwstuttgart.syntaxtree; // ino.module.Constant.8556.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.AttributeInfo; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Literal; import de.dhbwstuttgart.syntaxtree.type.Type; @@ -14,10 +18,6 @@ import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.parser.JavaClassName; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.mybytecode.AttributeInfo; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; // ino.end import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; diff --git a/src/de/dhbwstuttgart/syntaxtree/Constructor.java b/src/de/dhbwstuttgart/syntaxtree/Constructor.java index 2c27a2542..e35a46dec 100644 --- a/src/de/dhbwstuttgart/syntaxtree/Constructor.java +++ b/src/de/dhbwstuttgart/syntaxtree/Constructor.java @@ -2,7 +2,8 @@ package de.dhbwstuttgart.syntaxtree; import java.util.Vector; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.statement.Block; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -17,8 +18,6 @@ import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.parser.JavaClassName; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; diff --git a/src/de/dhbwstuttgart/syntaxtree/Field.java b/src/de/dhbwstuttgart/syntaxtree/Field.java index 04714d3b5..74a1b08e8 100644 --- a/src/de/dhbwstuttgart/syntaxtree/Field.java +++ b/src/de/dhbwstuttgart/syntaxtree/Field.java @@ -2,7 +2,8 @@ package de.dhbwstuttgart.syntaxtree; import java.util.Vector; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; @@ -16,8 +17,6 @@ import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.Typeable; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; public abstract class Field extends SyntaxTreeNode implements TypeInsertable, Typeable, Generic, GenericTypeInsertable{ diff --git a/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java index fc44782f5..02f4d8e8a 100644 --- a/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java +++ b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java @@ -2,7 +2,8 @@ package de.dhbwstuttgart.syntaxtree; import java.util.Vector; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -17,8 +18,6 @@ import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.FieldAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; /** diff --git a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java index 72b316517..4b631265f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java +++ b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java @@ -5,8 +5,6 @@ package de.dhbwstuttgart.syntaxtree; // ino.module.FormalParameter.8561.import import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; @@ -33,7 +31,10 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; diff --git a/src/mycompiler/myinterface/Interface.java b/src/de/dhbwstuttgart/syntaxtree/Interface.java similarity index 89% rename from src/mycompiler/myinterface/Interface.java rename to src/de/dhbwstuttgart/syntaxtree/Interface.java index d19a49b15..1502b881e 100755 --- a/src/mycompiler/myinterface/Interface.java +++ b/src/de/dhbwstuttgart/syntaxtree/Interface.java @@ -1,31 +1,19 @@ // ino.module.Interface.8582.package -package mycompiler.myinterface; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.Interface.8582.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.core.AClassOrInterface; -import de.dhbwstuttgart.core.SourceFile; -import de.dhbwstuttgart.syntaxtree.Class; -import de.dhbwstuttgart.syntaxtree.ClassHelper; -import de.dhbwstuttgart.syntaxtree.Constant; -import de.dhbwstuttgart.syntaxtree.FormalParameter; -import de.dhbwstuttgart.syntaxtree.Method; -import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; -import mycompiler.mytypereconstruction.CIntersectionType; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; /** * Ein Interface ist eine abstrakte Klasse, erbt daher von Class diff --git a/src/mycompiler/myinterface/InterfaceBody.java b/src/de/dhbwstuttgart/syntaxtree/InterfaceBody.java similarity index 93% rename from src/mycompiler/myinterface/InterfaceBody.java rename to src/de/dhbwstuttgart/syntaxtree/InterfaceBody.java index 56135a0a1..12bc5df1d 100755 --- a/src/mycompiler/myinterface/InterfaceBody.java +++ b/src/de/dhbwstuttgart/syntaxtree/InterfaceBody.java @@ -1,15 +1,12 @@ // ino.module.InterfaceBody.8583.package -package mycompiler.myinterface; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.InterfaceBody.8583.import import java.util.Vector; -import de.dhbwstuttgart.syntaxtree.Constant; -import de.dhbwstuttgart.syntaxtree.Field; -import de.dhbwstuttgart.syntaxtree.Method; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.JVMCodeException; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/Method.java b/src/de/dhbwstuttgart/syntaxtree/Method.java index dc45aef22..479791020 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Method.java +++ b/src/de/dhbwstuttgart/syntaxtree/Method.java @@ -7,10 +7,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCMethodException; -import mycompiler.myexception.SCStatementException; import mycompiler.mymodifier.Modifiers; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; @@ -23,9 +19,12 @@ import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; +import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.core.MyCompiler; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCMethodException; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.statement.Block; import de.dhbwstuttgart.syntaxtree.statement.Return; diff --git a/src/de/dhbwstuttgart/syntaxtree/ParameterList.java b/src/de/dhbwstuttgart/syntaxtree/ParameterList.java index a99333f3d..78febc127 100755 --- a/src/de/dhbwstuttgart/syntaxtree/ParameterList.java +++ b/src/de/dhbwstuttgart/syntaxtree/ParameterList.java @@ -4,12 +4,12 @@ package de.dhbwstuttgart.syntaxtree; // ino.module.ParameterList.8565.import import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; import mycompiler.mytype.*; import java.util.Iterator; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.syntaxtree.type.BaseType; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.typeinference.JavaCodeResult; diff --git a/src/de/dhbwstuttgart/core/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java similarity index 98% rename from src/de/dhbwstuttgart/core/SourceFile.java rename to src/de/dhbwstuttgart/syntaxtree/SourceFile.java index 201e7ef13..6ed62634e 100755 --- a/src/de/dhbwstuttgart/core/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -1,5 +1,5 @@ // ino.module.SourceFile.8722.package -package de.dhbwstuttgart.core; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.SourceFile.8722.import @@ -10,12 +10,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCClassException; -import mycompiler.myexception.SCException; -import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; import mycompiler.mymodifier.Public; import mycompiler.mytypereconstruction.CIntersectionType; @@ -27,15 +21,13 @@ import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -import de.dhbwstuttgart.syntaxtree.BasicAssumptionClass; -import de.dhbwstuttgart.syntaxtree.Class; -import de.dhbwstuttgart.syntaxtree.Constructor; -import de.dhbwstuttgart.syntaxtree.Field; -import de.dhbwstuttgart.syntaxtree.FieldDeclaration; -import de.dhbwstuttgart.syntaxtree.FormalParameter; -import de.dhbwstuttgart.syntaxtree.ImportDeclarations; -import de.dhbwstuttgart.syntaxtree.Method; -import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.core.AClassOrInterface; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCClassException; +import de.dhbwstuttgart.myexception.SCException; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.BooleanType; @@ -942,7 +934,7 @@ public class SourceFile /** * Erstellt die Basic Assumptions (siehe MakeBasicAssumptions) als AssumptionSet * @return - */ + @Deprecated //angefügt von Andreas Stadelmeier. Grund: Die Funktion wurde neu als makeBasicAssumptionsFromJRE angelegt private TypeAssumptions getBasicAssumptions() { TypeAssumptions ret = new TypeAssumptions(null); @@ -1085,7 +1077,7 @@ public class SourceFile imports.addAll(doneImports); return ret; - } + }*/ // ino.method.makeBasicAssumptionsFromJRE.21409.definition private TypeAssumptions makeBasicAssumptionsFromJRE(Vector imports) @@ -1124,19 +1116,19 @@ public class SourceFile //String className=x.getSimpleName(); String className=x.getName(); - // Generische Typen erzeugen - + + Class parentClass = new Class(className, mod, 0); + // Generische Typen erzeugen Hashtable jreSpiderRegistry=new Hashtable(); Vector typeGenPara = new Vector(); for(int j=0;j0){ //auskommentiert von Andreas Stadelmeier: @@ -1166,7 +1158,7 @@ public class SourceFile java.lang.reflect.TypeVariable[] superclassTVS=superClass.getTypeParameters(); Vector supertypeGenPara = new Vector(); for(int tvi=0;tvi())); FormalParameter parameter = new FormalParameter(new DeclId(type.get_Name())); @@ -1282,13 +1274,13 @@ public class SourceFile // ino.method.createTypeFromJavaGenericType.21415.definition - private Type createTypeFromJavaGenericType(java.lang.reflect.Type type, java.lang.Class cl, HashtablejreSpiderRegistry) + private Type createTypeFromJavaGenericType(java.lang.reflect.Type type, java.lang.Class cl, HashtablejreSpiderRegistry, Class parentClass) // ino.end // ino.method.createTypeFromJavaGenericType.21415.body { if(type instanceof TypeVariableImpl){ TypeVariableImpl tvi=((TypeVariableImpl)type); - return(new GenericTypeVar(jreSpiderRegistry.get(tvi.getName()).getName().toString(),-1)); + return(new GenericTypeVar(jreSpiderRegistry.get(tvi.getName()).getName().toString(),parentClass,-1)); }else{ //String jccNameForClass=baseTypeTranslationTable.get(cl.getSimpleName()); String jccNameForClass=baseTypeTranslationTable.get(cl.getName()); diff --git a/src/de/dhbwstuttgart/core/SyntaxTreeNode.java b/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java similarity index 96% rename from src/de/dhbwstuttgart/core/SyntaxTreeNode.java rename to src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java index 6a947d5bc..15c8a373a 100644 --- a/src/de/dhbwstuttgart/core/SyntaxTreeNode.java +++ b/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java @@ -1,9 +1,7 @@ -package de.dhbwstuttgart.core; +package de.dhbwstuttgart.syntaxtree; import java.util.Vector; -import de.dhbwstuttgart.syntaxtree.Class; -import de.dhbwstuttgart.syntaxtree.Generic; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; diff --git a/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java index b11e6ddcd..8012781a3 100755 --- a/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java @@ -4,12 +4,6 @@ package de.dhbwstuttgart.syntaxtree.misc; // ino.module.DeclId.8558.import import java.util.Vector; -import mycompiler.mybytecode.Attribute; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.mybytecode.SignatureInfo; -import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Final; import mycompiler.mymodifier.Modifiers; @@ -19,7 +13,15 @@ import org.apache.log4j.Logger; + + +import de.dhbwstuttgart.bytecode.Attribute; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.bytecode.SignatureInfo; import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Constant; import de.dhbwstuttgart.syntaxtree.statement.Assign; import de.dhbwstuttgart.syntaxtree.statement.Expr; diff --git a/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java index 2ad399eaf..937f9a032 100755 --- a/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java @@ -5,13 +5,13 @@ package de.dhbwstuttgart.syntaxtree.misc; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.parser.JavaClassName; -import mycompiler.mybytecode.JVMCode; // ino.class.UsedId.23659.declaration diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java index 85d3b9b26..c5d1e6605 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java @@ -7,6 +7,10 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.type.IntegerType; @@ -18,10 +22,6 @@ import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java index 1c6fc1df4..c09b2b6b4 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java @@ -4,12 +4,12 @@ package de.dhbwstuttgart.syntaxtree.operator; // ino.module.DivideOp.8596.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java index f901f2423..8c5b87bb7 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java @@ -5,17 +5,17 @@ package de.dhbwstuttgart.syntaxtree.operator; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Null; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java index d0b9df89e..2027d865c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java @@ -4,12 +4,12 @@ package de.dhbwstuttgart.syntaxtree.operator; // ino.module.GreaterEquOp.8598.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/GreaterOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterOp.java index aa74d16db..c31210837 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/GreaterOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterOp.java @@ -4,12 +4,12 @@ package de.dhbwstuttgart.syntaxtree.operator; // ino.module.GreaterOp.8599.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/LessEquOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/LessEquOp.java index 7fc886e5e..7af4bdaea 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/LessEquOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/LessEquOp.java @@ -4,12 +4,12 @@ package de.dhbwstuttgart.syntaxtree.operator; // ino.module.LessEquOp.8600.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/LessOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/LessOp.java index 3e43922b3..ddcdcca40 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/LessOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/LessOp.java @@ -4,12 +4,12 @@ package de.dhbwstuttgart.syntaxtree.operator; // ino.module.LessOp.8601.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java index 5b019a080..17c73e237 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java @@ -7,6 +7,11 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.NotExpr; @@ -21,11 +26,6 @@ import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/MinusOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/MinusOp.java index c4c4560b3..1b1a8ecce 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/MinusOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/MinusOp.java @@ -4,12 +4,12 @@ package de.dhbwstuttgart.syntaxtree.operator; // ino.module.MinusOp.8603.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/ModuloOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/ModuloOp.java index 5e92239d4..866c6bd6d 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/ModuloOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/ModuloOp.java @@ -4,12 +4,12 @@ package de.dhbwstuttgart.syntaxtree.operator; // ino.module.ModuloOp.8604.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java index 10a57ee77..1ffa21475 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java @@ -8,6 +8,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; @@ -15,7 +16,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.myexception.CTypeReconstructionException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java index 044e6fb1e..7f8d19cc1 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java @@ -5,17 +5,17 @@ package de.dhbwstuttgart.syntaxtree.operator; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Null; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java index dc6a52a4e..0a588a614 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java @@ -7,7 +7,12 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.type.Pair; @@ -21,11 +26,6 @@ import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/PlusOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/PlusOp.java index 886ea59b8..cfe9cc22a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/PlusOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/PlusOp.java @@ -4,12 +4,12 @@ package de.dhbwstuttgart.syntaxtree.operator; // ino.module.PlusOp.8609.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java index 9e984c2a0..135f0ae44 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java @@ -8,6 +8,10 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; @@ -15,10 +19,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/TimesOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/TimesOp.java index 9e4802b2c..07ca1fe85 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/TimesOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/TimesOp.java @@ -5,12 +5,12 @@ package de.dhbwstuttgart.syntaxtree.operator; // ino.module.TimesOp.8611.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; // ino.class.TimesOp.24312.declaration public class TimesOp extends MulOp diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ArgumentList.java b/src/de/dhbwstuttgart/syntaxtree/statement/ArgumentList.java index 98094f508..08c66c283 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ArgumentList.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ArgumentList.java @@ -5,14 +5,13 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.FormalParameter; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; -// ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java index 4907a6234..224d2f561 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java @@ -7,13 +7,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CMultiplyTuple; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; @@ -36,8 +29,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java index 94fb695cf..ff127df9b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java @@ -7,13 +7,6 @@ import java.util.HashMap; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -37,8 +30,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.operator.AddOp; import de.dhbwstuttgart.syntaxtree.operator.LogOp; import de.dhbwstuttgart.syntaxtree.operator.MulOp; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java index 06e27a029..3ab3a23e7 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java @@ -7,12 +7,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -35,8 +29,17 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java index 75e6e1236..19bc0716d 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java @@ -5,11 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -28,8 +23,16 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.BooleanType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java index 25b18c216..87832a229 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java @@ -6,13 +6,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -32,8 +25,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.ConstraintsSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java index b45b874d1..f150db341 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java @@ -5,11 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -29,8 +24,16 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.CharacterType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java index f62d77ee5..85b0778ac 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java @@ -5,11 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -19,8 +14,13 @@ import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.DoubleType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.IntegerType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java index 2dedecbb5..1967fe044 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java @@ -5,10 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -28,8 +24,15 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.ConstraintsSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java b/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java index 131fa8671..db241201d 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java @@ -6,6 +6,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.Type; @@ -13,8 +15,6 @@ import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CMultiplyTuple; import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.CSupportData; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java index effc2c058..8ce6eb379 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java @@ -5,10 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -17,8 +13,12 @@ import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.FloatType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java index e8a752b2b..1400b35ca 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java @@ -5,13 +5,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -22,8 +15,15 @@ import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.operator.LogOp; import de.dhbwstuttgart.syntaxtree.operator.Operator; import de.dhbwstuttgart.syntaxtree.operator.RelOp; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java index f46f531e6..8822fcb37 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java @@ -7,13 +7,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; @@ -37,8 +30,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.operator.LogOp; import de.dhbwstuttgart.syntaxtree.operator.Operator; import de.dhbwstuttgart.syntaxtree.operator.RelOp; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java index 1082d3d9e..be25f6cf5 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java @@ -7,11 +7,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -39,8 +34,16 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java index 4e7bc907e..5b8baa5f5 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java @@ -6,12 +6,6 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -30,8 +24,17 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.BooleanType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java index ec93cb4ea..7b7a0d399 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java @@ -5,11 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -29,8 +24,16 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.IntegerType; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java index 5ba7b0388..89cbcd81c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java @@ -3,12 +3,17 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassHelper; import de.dhbwstuttgart.syntaxtree.FormalParameter; import de.dhbwstuttgart.syntaxtree.Method; import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.DoubleType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; @@ -24,11 +29,6 @@ import de.dhbwstuttgart.typeinference.Typeable; import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java b/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java index 4b4ae7d2e..a89ef6b5c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java @@ -3,8 +3,8 @@ package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Literal.8636.import -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.JVMCodeException; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java index c117d65eb..bd83ce158 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java @@ -6,13 +6,6 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -37,8 +30,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java index 76b0df25a..eda8deef5 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java @@ -6,11 +6,6 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -43,10 +38,18 @@ import org.apache.log4j.Logger; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.core.MyCompiler; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassHelper; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java index 73d5e9d28..0dca5340a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java @@ -5,11 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -19,8 +14,13 @@ import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.IntegerType; import de.dhbwstuttgart.syntaxtree.type.LongType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java index 45753b422..113fb6933 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java @@ -7,13 +7,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CIntersectionType; import mycompiler.mytypereconstruction.CMultiplyTuple; import mycompiler.mytypereconstruction.CSubstitution; @@ -46,12 +39,22 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassBody; import de.dhbwstuttgart.syntaxtree.FormalParameter; import de.dhbwstuttgart.syntaxtree.Method; import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java index a702fef3b..2efdd2e8b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java @@ -6,12 +6,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -32,8 +26,17 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java index 9bd35ec0b..3a9214832 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java @@ -5,11 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -28,8 +23,16 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.ConstraintsSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java index 722392ffb..3b6733a9b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java @@ -7,13 +7,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CMultiplyTuple; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; @@ -42,8 +35,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java index ba45d57d9..c92bce5ef 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java @@ -6,11 +6,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -33,8 +28,16 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.BooleanType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java index 1743e1361..3f81ed763 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java @@ -5,11 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -29,8 +24,16 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java index f3e8659d2..e67d6a250 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java @@ -5,10 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -27,8 +23,15 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.ConstraintsSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java index 91b1cd278..9e22a4b1e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java @@ -6,13 +6,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -33,8 +26,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java index d373a178a..badcceb16 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java @@ -6,13 +6,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -36,8 +29,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java index 91575ae0a..8ee14021f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java @@ -6,13 +6,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -33,8 +26,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java index 7e0bd6401..546c71713 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java @@ -6,13 +6,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -33,8 +26,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java b/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java index 1b566fc16..bfe41dd71 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java @@ -5,14 +5,14 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.myexception.SCStatementException; - import org.apache.log4j.Logger; // ino.end + +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Return.java b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java index 6a4421d97..6400f0c07 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Return.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java @@ -5,13 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -31,8 +24,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java b/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java index 879bc88ee..685192624 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java @@ -6,9 +6,14 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.core.IItemWithOffset; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; @@ -19,11 +24,6 @@ import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.Typeable; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java index 53fbdc68a..92cea66e0 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java @@ -5,11 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -30,8 +25,16 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.CharacterType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/This.java b/src/de/dhbwstuttgart/syntaxtree/statement/This.java index 3be2dbc1d..d33e59ffc 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/This.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/This.java @@ -5,12 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -31,8 +25,17 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.java index 972ed71db..f4c238e61 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.java @@ -4,16 +4,15 @@ package de.dhbwstuttgart.syntaxtree.statement; // ino.module.UnaryExpr.8655.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.OderConstraint; import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.JVMCodeException; -// ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/UnaryMinus.java b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryMinus.java index d473aa479..4c5fe47f0 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/UnaryMinus.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryMinus.java @@ -3,11 +3,10 @@ package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.UnaryMinus.8656.import -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; -// ino.end +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; // ino.class.UnaryMinus.26308.declaration public class UnaryMinus diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/UnaryNot.java b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryNot.java index f884b9b83..e76cc6239 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/UnaryNot.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryNot.java @@ -3,11 +3,10 @@ package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.UnaryNot.8657.import -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; -// ino.end +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; // ino.class.UnaryNot.26314.declaration public class UnaryNot diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java index 2f5458b96..5176123a1 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java @@ -7,13 +7,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -36,8 +29,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.operator.LogOp; import de.dhbwstuttgart.syntaxtree.operator.Operator; import de.dhbwstuttgart.syntaxtree.operator.RelOp; diff --git a/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java index d3674efe1..ed832cb17 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java @@ -5,6 +5,7 @@ package de.dhbwstuttgart.syntaxtree.type; // ino.module.BoundedGenericTypeVar.8669.import import java.util.Vector; +import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.SingleConstraint; @@ -53,11 +54,11 @@ public class BoundedGenericTypeVar extends GenericTypeVar */ // ino.method.BoundedGenericTypeVar.29409.definition - public BoundedGenericTypeVar(String s, Vector bounds, int offset, int endOffset) + public BoundedGenericTypeVar(String s, Vector bounds, Class parentClass, int offset, int endOffset) // ino.end // ino.method.BoundedGenericTypeVar.29409.body { - super(s, offset); + super(s, parentClass ,offset); if(bounds != null)for(Type t : bounds){ //if(t!=null)this.extendVars.add(t); } @@ -111,7 +112,7 @@ public class BoundedGenericTypeVar extends GenericTypeVar // ino.end // ino.method.clone.26483.body { - return new BoundedGenericTypeVar(this.getName().toString(), this.getBounds(), getOffset(), this.getEndOffset()); + return new BoundedGenericTypeVar(this.getName().toString(), this.getBounds(), this.getParentClass(), getOffset(), this.getEndOffset()); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java index 6d2765e06..4af912ebf 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java @@ -34,8 +34,7 @@ import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; - - +import de.dhbwstuttgart.syntaxtree.Class; // ino.class.GenericTypeVar.26505.description type=javadoc /** * TODO: Diese Klasse überarbeiten. Pair genericTypeVar ist nicht implementiert. @@ -51,6 +50,7 @@ public class GenericTypeVar extends Type //Type genericTypeVar; //Vector extendVars = new Vector(); protected Pair genericConstraint; + private Class parent; /** * Eine Registry f�r alle Generic-Instanzen, die vor der Bytecode-Generierung durch * Ihre Superklasse ersetzt werden m�ssen. Siehe "Type Erasure" in Sun Spezifikation. @@ -77,7 +77,7 @@ public class GenericTypeVar extends Type */ // ino.method.GenericTypeVar.26509.definition - public GenericTypeVar(String s, int offset) + public GenericTypeVar(String s, Class parentClass, int offset) // ino.end // ino.method.GenericTypeVar.26509.body { @@ -102,10 +102,9 @@ public class GenericTypeVar extends Type // ino.end // ino.method.clone.26512.body { - return new GenericTypeVar(this.getName().toString(),getOffset()); + return new GenericTypeVar(this.getName().toString(), this.getParentClass(), getOffset()); } // ino.end - // ino.method.equals.26515.defdescription type=javadoc /** @@ -225,6 +224,10 @@ public class GenericTypeVar extends Type public int getEndOffset() { return this.getOffset() + this.name.toString().length(); } + + public Class getParentClass() { + return this.parent; + } } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java index 66ae481cc..bbf164e9b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -8,8 +8,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.SCException; import mycompiler.mytypereconstruction.CSubstitutionGenVar; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -30,7 +28,11 @@ import org.apache.log4j.Logger; + + +import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.myexception.SCException; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; @@ -644,6 +646,7 @@ public class RefType extends Type implements IMatchable } // ino.end + /* // ino.method.modifyToGenericTypeVar.26694.definition public GenericTypeVar modifyToGenericTypeVar(TypeInsertable parent) // ino.end @@ -652,6 +655,7 @@ public class RefType extends Type implements IMatchable return new GenericTypeVar(this.name.toString(),getOffset()); } // ino.end + */ // ino.method.getSimpleName.26697.defdescription type=javadoc /** diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Type.java b/src/de/dhbwstuttgart/syntaxtree/type/Type.java index 6dc590142..3573d3087 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Type.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Type.java @@ -5,15 +5,15 @@ package de.dhbwstuttgart.syntaxtree.type; import java.util.ArrayList; import java.util.Vector; +import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.parser.JavaClassName; -import mycompiler.mybytecode.JVMCode; diff --git a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java index 6cb026fa8..d07ab2c0f 100755 --- a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java +++ b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java @@ -4,10 +4,6 @@ import java.util.Iterator; import java.util.Vector; import de.dhbwstuttgart.syntaxtree.type.Pair; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CVectorSet; public class ConstraintsSet implements Iterable{ private Vector constraintsSet; diff --git a/src/de/dhbwstuttgart/typeinference/FunNInterface.java b/src/de/dhbwstuttgart/typeinference/FunNInterface.java index d9226f4f4..b19ddc02a 100644 --- a/src/de/dhbwstuttgart/typeinference/FunNInterface.java +++ b/src/de/dhbwstuttgart/typeinference/FunNInterface.java @@ -26,10 +26,10 @@ public class FunNInterface extends Class{ public FunNInterface(int N) { super("Fun"+N, 0); Vector paralist = new Vector(); - paralist.add(new GenericTypeVar("R",0)); + paralist.add(new GenericTypeVar("R",this, 0)); //paralist.add(TypePlaceholder.fresh()); for(int i = 1; i<=N;i++){ - paralist.add(new GenericTypeVar("T"+i,0)); + paralist.add(new GenericTypeVar("T"+i,this, 0)); //paralist.add(TypePlaceholder.fresh()); } this.set_ParaList(paralist); diff --git a/src/de/dhbwstuttgart/typeinference/SingleConstraint.java b/src/de/dhbwstuttgart/typeinference/SingleConstraint.java index b6bf0d2a1..59062d299 100755 --- a/src/de/dhbwstuttgart/typeinference/SingleConstraint.java +++ b/src/de/dhbwstuttgart/typeinference/SingleConstraint.java @@ -9,8 +9,7 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CTripleSet; + /** * Beschreibung von Herrn Plümicke: @@ -52,11 +51,11 @@ public class SingleConstraint extends UndConstraint{ //Hier werden die GTVs zu TPH gewandelt. - if(p1 instanceof RefType)((RefType)p1).GTV2TPH(); - if(p2 instanceof RefType)((RefType)p2).GTV2TPH(); + //if(p1 instanceof RefType)((RefType)p1).GTV2TPH(); + //if(p2 instanceof RefType)((RefType)p2).GTV2TPH(); - if((p1 instanceof GenericTypeVar))p1 = ((GenericTypeVar)p1).getTypePlaceHolder();//throw new DebugException("GenericTypeVar sind in den Constraints nicht erlaubt");// - if((p2 instanceof GenericTypeVar))p2 = ((GenericTypeVar)p2).getTypePlaceHolder();//throw new DebugException("GenericTypeVar sind in den Constraints nicht erlaubt");// + //if((p1 instanceof GenericTypeVar))p1 = ((GenericTypeVar)p1).getTypePlaceHolder();//throw new DebugException("GenericTypeVar sind in den Constraints nicht erlaubt");// + //if((p2 instanceof GenericTypeVar))p2 = ((GenericTypeVar)p2).getTypePlaceHolder();//throw new DebugException("GenericTypeVar sind in den Constraints nicht erlaubt");// // BaseTypes werden in RefTypes umgewandelt. Constraints dürfen nur RefTypes oder TypePlaceholder enthalten, da sonst der Unify-Algorithmus nicht funktioniert. if(!(p1 instanceof RefType) && !(p1 instanceof TypePlaceholder) && !(p1 instanceof GenericTypeVar))p1 = new RefType(p1); diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java index c1ada8898..bd6c1399e 100644 --- a/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java @@ -15,7 +15,7 @@ public class GenericVarAssumption extends Assumption{ this.genericVar = genericVar; } - public Type getAssumedType() { + public GenericTypeVar getAssumedType() { return genericVar;//new RefType(this.getIdentifier(), -1); } diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index e5e429ec1..f76091918 100755 --- a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -315,13 +315,19 @@ public class TypeAssumptions { //Auch die generischen Variablen durchsuchen: for(GenericVarAssumption ass : this.genericVarAssumptions){ //if(ass.inheritsType(t))return t; - if(ass.getIdentifier().equals(t.getName()))return ass.getAssumedType(); + if(ass.getIdentifier().equals(t.getName())){ + if(! ass.getAssumedType().getParentClass().getName().equals(this.thisClassName)){ + //Ist die Generische Variable nicht aus dieser Klasse, so muss sie zu einem TPH umgewandelt werden: + + } + return ass.getAssumedType(); + } } //return null; throw new TypeinferenceException("Der Typ "+t.getName()+" ist nicht korrekt",inNode); } - + /** * Fügt eine TypAssumption an. * Dadurch wird ein Pool von Typen aufgebaut, welche überhaupt erlaubt sind. @@ -347,6 +353,10 @@ public class TypeAssumptions { return null; } + /** + * Fügt eine Generische Typvariablen den Assumptions hinzu + * @param genericTypeVar + */ public void addGenericVarAssumption( GenericTypeVar genericTypeVar) { //TODO: Hier müssen alle Bounds einzeln geaddet werden. Die Bounds müssen hierbei nicht gespeichert werden, deren Constraints generiert die TYPE-Methode der GenericVarDeclarations diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java index 3ca8b8a6f..607328c7a 100644 --- a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java +++ b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java @@ -11,7 +11,6 @@ package de.dhbwstuttgart.typeinference.parser; import java.util.Vector; import de.dhbwstuttgart.core.AClassOrInterface; -import de.dhbwstuttgart.core.SourceFile; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassBody; import de.dhbwstuttgart.syntaxtree.Constant; @@ -22,8 +21,11 @@ import de.dhbwstuttgart.syntaxtree.FieldDeclaration; import de.dhbwstuttgart.syntaxtree.FormalParameter; import de.dhbwstuttgart.syntaxtree.GenericDeclarationList; import de.dhbwstuttgart.syntaxtree.ImportDeclarations; +import de.dhbwstuttgart.syntaxtree.Interface; +import de.dhbwstuttgart.syntaxtree.InterfaceBody; import de.dhbwstuttgart.syntaxtree.Method; import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.operator.AndOp; @@ -96,8 +98,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Void; import de.dhbwstuttgart.syntaxtree.type.WildcardType; -import mycompiler.myinterface.Interface; -import mycompiler.myinterface.InterfaceBody; import mycompiler.mymodifier.Abstract; import mycompiler.mymodifier.Final; import mycompiler.mymodifier.Modifier; diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay index 764a4dd06..703c75050 100755 --- a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay +++ b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay @@ -563,7 +563,7 @@ paralist : IDENTIFIER ParaList pl = new ParaList(); /* #JB# 05.04.2005 */ /* ########################################################### */ - pl.getParalist().addElement(new GenericTypeVar($1.getLexem(), $1.getOffset())); + pl.getParalist().addElement(new GenericTypeVar($1.getLexem(),null, $1.getOffset())); //pl.getParalist().addElement( new TypePlaceholder($1.getLexem()) ); /* ########################################################### */ org.apache.log4j.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + $1.getLexem() + " TV"); @@ -589,7 +589,7 @@ paralist : IDENTIFIER /* #JB# 05.04.2005 */ /* ########################################################### */ - $1.getParalist().addElement(new GenericTypeVar($3.getLexem(),$3.getOffset())); + $1.getParalist().addElement(new GenericTypeVar($3.getLexem(), null,$3.getOffset())); //$1.getParalist().addElement(new TypePlaceholder($3.getLexem())); /* ########################################################### */ org.apache.log4j.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER --> Paralist f�r " + $3.getLexem() + ": TV"); @@ -1057,11 +1057,11 @@ boundedClassParameters : boundedClassParameter // returns GenericTypeVar boundedMethodParameter : IDENTIFIER { - $$=new GenericTypeVar($1.getLexem(),$1.getOffset()); + $$=new GenericTypeVar($1.getLexem(),null,$1.getOffset()); } | IDENTIFIER EXTENDS boundedclassidentifierlist { - BoundedGenericTypeVar gtv=new BoundedGenericTypeVar($1.getLexem(), $3, $1.getOffset() ,$3.getEndOffset()); + BoundedGenericTypeVar gtv=new BoundedGenericTypeVar($1.getLexem(), $3,null, $1.getOffset() ,$3.getEndOffset()); //gtv.setBounds($3); $$=gtv; } diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java b/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java index 5939a91b9..36fef5048 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.Vector; import de.dhbwstuttgart.core.IItemWithOffset; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java index 54ad0c1af..ad6449754 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java @@ -3,9 +3,9 @@ package de.dhbwstuttgart.typeinference.typedeployment; import java.util.Vector; import de.dhbwstuttgart.core.IItemWithOffset; -import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.Field; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.GenericTypeInsertable; import de.dhbwstuttgart.typeinference.JavaCodeResult; diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java index 5d939f3cd..ba32076d4 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java @@ -8,7 +8,7 @@ import java.util.Vector; import org.apache.log4j.Logger; import de.dhbwstuttgart.core.IItemWithOffset; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index 0e87ee83f..5f0ca0481 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -8,14 +8,14 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.MatchException; -import mycompiler.myexception.SCException; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import org.apache.log4j.Logger; import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.MatchException; +import de.dhbwstuttgart.myexception.SCException; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.CRefTypeSet; diff --git a/src/mycompiler/mytest/APITest.java b/src/mycompiler/mytest/APITest.java deleted file mode 100755 index 947e64055..000000000 --- a/src/mycompiler/mytest/APITest.java +++ /dev/null @@ -1,18 +0,0 @@ -package mycompiler.mytest; - -import de.dhbwstuttgart.core.MyCompiler; -import de.dhbwstuttgart.core.MyCompilerAPI; - -public class APITest { - - /** - * @param args - */ - public static void main(String[] args) { - // TODO Auto-generated method stub - - MyCompilerAPI m_compilerApi = MyCompiler.getAPI(); - m_compilerApi.init(); - } - -} diff --git a/src/mycompiler/mytest/LambdaTest.java b/src/mycompiler/mytest/LambdaTest.java deleted file mode 100755 index f1c61f276..000000000 --- a/src/mycompiler/mytest/LambdaTest.java +++ /dev/null @@ -1,206 +0,0 @@ -package mycompiler.mytest; - -import static org.junit.Assert.*; - -import java.io.File; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Vector; - -import org.apache.log4j.Appender; -import org.apache.log4j.ConsoleAppender; -import org.apache.log4j.FileAppender; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; -import org.apache.log4j.PatternLayout; -import org.apache.log4j.SimpleLayout; - -import de.dhbwstuttgart.core.MyCompiler; -import de.dhbwstuttgart.core.MyCompilerAPI; -import de.dhbwstuttgart.syntaxtree.type.Type; -import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; -import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; -import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import mycompiler.mytypereconstruction.CSubstitution; - -public class LambdaTest { - - protected static Logger inferencelog = Logger.getLogger("Typeinference"); - - private static final String directory = System.getProperty("user.dir")+"/test/mycompiler/test/lambda/"; - - // Logfiles werden im Ordner testResults gespeichert - public final String LOG_FILENAME = directory+"testResults/"+ "LambdaTest.log"; - - private Vector filenames; - - public static void main(String[] args){ - try { - new LambdaTest(args[0]).runTest(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private LambdaTest setUp() throws Exception{ - // Setup fuer Log4J - - File f = new File(LOG_FILENAME); // Altes Logfile loeschen - f.delete(); - - // Ausgabeoptionen fuer die Logger - PatternLayout pl = new PatternLayout("%-15C{1} %-5p [%-9c] %m%n"); - FileAppender fa = new FileAppender(pl, LOG_FILENAME); - - // Die Einstellungen jedes Loggers veraendern - //ModifyLogger("parser", Level.ALL, fa); - //ModifyLogger("inference", Level.ALL, fa); - ModifyLogger("Typeinference", Level.ALL, fa); //Alle Messages von inference in die Datei schreiben. - ConsoleAppender logAppender = new ConsoleAppender(new SimpleLayout()); - logAppender.setTarget("System.out"); - logAppender.activateOptions(); - inferencelog.addAppender(logAppender); //Bei den Tests wird der Log auch in System.out geschrieben. - //ModifyLogger("codegen", Level.ALL, fa); - //ModifyLogger("bytecode", Level.ALL, fa); - return this; - } - - public LambdaTest(String testfile){ - this(new Vector()); - filenames.add(directory + testfile); - } - - public LambdaTest(Vector testfiles) { - if(filenames == null)filenames = new Vector(); - for(String filename : testfiles){ - filenames.add(directory + filename); - } - try { - this.setUp(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - - /** - * Führt einen Test aus, bei dem beliebig viele ResultSets entstehen dürfen. - * Anschließend werden die Typen in der Klasse classname nach den in der HashMap variableTypeAssumptions angegebenen Annahmen geprüft. - * Diesen Test muss jedes der ermittelten ResultSets bestehen. - * @param classname - * @param variableTypeAssumptions - */ - public void runTestAndCheckResultSet(String classname, HashMap variableTypeAssumptions){ - Vector result = this.runTest(); - if(result.size()==0)fail("Keine Lösung!"); - for(TypeinferenceResultSet result1 : result){ - TypeAssumptions assumptions = result1.getInterferedClass().getPublicFieldAssumptions();// TypeAssumptions.getAssumptionsFor(classname); - assertTrue("Fehler in Methode TypeAssumptions.getAssumptionsFor", assumptions!=null); - for(String variable : variableTypeAssumptions.keySet()){ - Type assumedType = assumptions.getVarType(variable, result1.getInterferedClass()); - assertTrue("Der Variable muss ein TPH zugewiesen sein.", assumedType!=null && assumedType instanceof TypePlaceholder); - //AssumedType auflösen: - - String assumedTypeString = result1.getTypeOfPlaceholder((TypePlaceholder)assumedType).printJavaCode(result1.getUnifiedConstraints()).toString(); - assertTrue("Die Variable "+variable+" muss vom Typ "+variableTypeAssumptions.get(variable)+" anstatt "+assumedTypeString+" sein", - assumedTypeString.equals(variableTypeAssumptions.get(variable))); - } - } - } - - /** - * Führt den Test aus und geht davon aus, dass es bei der Testdatei nur eine richtige Auflösung für die Typvariablen gibt. - * Diese eine Lösung wird zurückgegeben. - * @return - */ - public TypeinferenceResultSet runTestAndGetSingularResultSet(){ - Vector result = this.runTest(); - assertTrue("ResultSet muss genau 1 Element enthalten", result.size()==1); - TypeinferenceResultSet result1 = result.get(0); - - return result1; - } - - - public Vector runTest() - { - - //String[] arguments = new String[1]; - //arguments[0]="/home/janulrich/workspace/JavaCompilerCore/test/LampdaExpressions/general.java"; - //MyCompiler.main(arguments); - Vector resultSet = new Vector(); - - MyCompilerAPI compiler = MyCompiler.getAPI(); - try{ - ///////////////////////// - // Parsen: - ///////////////////////// - //compiler.parse(new File(filename)); - compiler.parse(filenames); - //SourceFile tree = compiler.getSyntaxTree(); - - ///////////////////////// - // Typrekonstruktion: - ///////////////////////// - try{ - resultSet = compiler.typeReconstruction(); - }catch(TypeinferenceException texc){ - texc.printStackTrace(); - fail("Fehler bei Typinferenzalgorithmus. Message: "+texc.getMessage()); - } - - return resultSet; - //System.out.println(resultSet); - ///////////////////////// - // Ausgabe: - /////////////////////// - // - /* - CTypeReconstructionResult onePossibility = resultSet.firstElement(); - Iterator substIt = onePossibility.getSubstitutions().getIterator(); - while(substIt.hasNext()){ - CSubstitution subst = (CSubstitution)substIt.next(); - Vector lineNumbers = ((TypePlaceholder)subst.getTypeVar()).getLineNumbers(); - String s = new String(); - for(int l=0; l - * Liefert die aktuelle Zeit in Langformat zurück. - * - * @return Zeit in Langformat als String - */ - // ino.end - - // ino.attribute.inferencelog.26874.declaration - protected static Logger inferencelog = Logger.getLogger("inference"); - // ino.end - - // ino.method.time.26877.definition - public static String time() - // ino.end - // ino.method.time.26877.body - { - DateFormat longTime = DateFormat.getTimeInstance(DateFormat.LONG); - return longTime.format(new Date()); - } - // ino.end - - // ino.method.print.26880.defdescription type=javadoc - /** - * Author: Jörg Bäuerle
- * Gibt einen String aus. - * - * @param s Der auszugebende String - */ - // ino.end - // ino.method.print.26880.definition - public static void print(String s) - // ino.end - // ino.method.print.26880.body - { - inferencelog.debug("TypeReconstruction@"+CHelper.time()+"> "+s); - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/CIntersectionType.java b/src/mycompiler/mytypereconstruction/CIntersectionType.java deleted file mode 100755 index 7773f3725..000000000 --- a/src/mycompiler/mytypereconstruction/CIntersectionType.java +++ /dev/null @@ -1,127 +0,0 @@ -// ino.module.CIntersectionType.8682.package -package mycompiler.mytypereconstruction; -// ino.end - -// ino.module.CIntersectionType.8682.import -import java.util.Vector; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; -import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; -// ino.end - -// ino.class.CIntersectionType.26883.description type=javadoc -/** - * Ein CIntersectionType gruppiert alle Typmglichkeiten einer - * bestimmten Methode, die ber den CMethodKey eindeutig definiert - * ist.

Bei der bisherigen Implementierung enthlt IntersectionType jedoch - * nur eine - * einzige Typmglichkeit, d.h. der Vector - * m_MethodTypeAssumptions enthlt stets nur ein einziges Element.
- * Der Grund hierfr ist in der Kopplung der Typannahmen fr die einzelnen Methoden, - * d.h. der Typkombinationen, begrndet. Diese Kopplung von Methoden wird bisher ber - * die getrennten Mengen von CTypeReconstructionResults realisiert. - * @author Jrg Buerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CIntersectionType.26883.declaration -public class CIntersectionType -// ino.end -// ino.class.CIntersectionType.26883.body -{ - // ino.attribute.m_IntersectionTypeKey.26886.declaration - private CMethodKey m_IntersectionTypeKey; - // ino.end - // ino.attribute.m_MethodTypeAssumptions.26889.declaration - private Vector m_MethodTypeAssumptions; - // ino.end - - // ino.method.CIntersectionType.26892.definition - public CIntersectionType(String className, String methodIdentifier, int methodParaCount, int methodOverloadedID) - // ino.end - // ino.method.CIntersectionType.26892.body - { - m_IntersectionTypeKey = new CMethodKey(className, methodIdentifier, methodParaCount, methodOverloadedID); - m_MethodTypeAssumptions = new Vector(); - } - // ino.end - - // ino.method.CIntersectionType.26895.definition - public CIntersectionType(CMethodTypeAssumption assum) - // ino.end - // ino.method.CIntersectionType.26895.body - { - this(assum.getClassName(), assum.getIdentifier(), assum.getParaCount(),assum.getOverloadedMethodID()); - this.addMethodTypeAssumption(assum); - } - // ino.end - - // ino.method.getIntersectionTypeKey.26898.definition - public CMethodKey getIntersectionTypeKey() - // ino.end - // ino.method.getIntersectionTypeKey.26898.body - { - return m_IntersectionTypeKey; - } - // ino.end - - // ino.method.setIntersectionTypeKey.26901.definition - public void setIntersectionTypeKey(CMethodKey intersectionTypeKey) - // ino.end - // ino.method.setIntersectionTypeKey.26901.body - { - m_IntersectionTypeKey = intersectionTypeKey; - } - // ino.end - - // ino.method.getMethodTypeAssumptions.26904.definition - public Vector getMethodTypeAssumptions() - // ino.end - // ino.method.getMethodTypeAssumptions.26904.body - { - return m_MethodTypeAssumptions; - } - // ino.end - - // ino.method.setMethodTypeAssumptions.26907.definition - public void setMethodTypeAssumptions(Vector methodTypeAssumptions) - // ino.end - // ino.method.setMethodTypeAssumptions.26907.body - { - m_MethodTypeAssumptions = methodTypeAssumptions; - } - // ino.end - - // ino.method.addMethodTypeAssumption.26910.definition - public void addMethodTypeAssumption(CMethodTypeAssumption assum) - // ino.end - // ino.method.addMethodTypeAssumption.26910.body - { - m_MethodTypeAssumptions.addElement(assum); - } - // ino.end - - // ino.method.removeMethodTypeAssumption.26913.definition - public void removeMethodTypeAssumption(CMethodTypeAssumption assum) - // ino.end - // ino.method.removeMethodTypeAssumption.26913.body - { - m_MethodTypeAssumptions.removeElement(assum); - } - // ino.end - - // ino.method.toString.26916.defdescription type=javadoc - /** - *
Author: Jrg Buerle - * @return - */ - // ino.end - // ino.method.toString.26916.definition - public String toString() - // ino.end - // ino.method.toString.26916.body - { - return m_MethodTypeAssumptions.toString(); - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/CMultiplyTuple.java b/src/mycompiler/mytypereconstruction/CMultiplyTuple.java deleted file mode 100755 index 1a386ee01..000000000 --- a/src/mycompiler/mytypereconstruction/CMultiplyTuple.java +++ /dev/null @@ -1,218 +0,0 @@ -// ino.module.CMultiplyTuple.8683.package -package mycompiler.mytypereconstruction; -// ino.end - -// ino.module.CMultiplyTuple.8683.import -import java.util.Iterator; -import java.util.Vector; - -import de.dhbwstuttgart.syntaxtree.type.Type; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -// ino.end - -// ino.class.CMultiplyTuple.26919.description type=javadoc -/** - * Container-Klasse für Ergebniswerte der Algorithmen TRTuple und TRMultiply. - * (siehe Algorithmen 5.28 ff, Martin Plümicke) - * @author Jörg Bäuerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CMultiplyTuple.26919.declaration -public class CMultiplyTuple -// ino.end -// ino.class.CMultiplyTuple.26919.body -{ - // ino.attribute.m_Substitutions.26922.declaration - private CSubstitutionSet m_Substitutions = null; - // ino.end - // ino.attribute.m_ResultTypes.26925.declaration - private Vector m_ResultTypes = null; - // ino.end - // ino.attribute.m_AssumptionSet.26928.declaration - private CTypeAssumptionSet m_AssumptionSet = null; - // ino.end - - // ino.method.CMultiplyTuple.26931.defdescription type=javadoc - /** - * Author: Jörg Bäuerle
- * - */ - // ino.end - // ino.method.CMultiplyTuple.26931.definition - public CMultiplyTuple() - // ino.end - // ino.method.CMultiplyTuple.26931.body - { - m_Substitutions = new CSubstitutionSet(); - m_ResultTypes = new Vector(); - m_AssumptionSet = new CTypeAssumptionSet(); - } - // ino.end - - // ino.method.CMultiplyTuple.26934.definition - public CMultiplyTuple(CSubstitutionSet substitutions, Vector resultTypes, CTypeAssumptionSet assumptionSet) - // ino.end - // ino.method.CMultiplyTuple.26934.body - { - m_Substitutions = substitutions; - m_ResultTypes = resultTypes; - m_AssumptionSet = assumptionSet; - } - // ino.end - - - // ino.method.getAssumptionSet.26937.defdescription type=javadoc - /** - * Author: Jörg Bäuerle
- * @return Returns the AssumptionSet. - */ - // ino.end - // ino.method.getAssumptionSet.26937.definition - public CTypeAssumptionSet getAssumptionSet() - // ino.end - // ino.method.getAssumptionSet.26937.body - { - return m_AssumptionSet; - } - // ino.end - - // ino.method.setAssumptionSet.26940.defdescription type=javadoc - /** - * Author: Jörg Bäuerle
- * @param assumptionSet The AssumptionSet to set. - */ - // ino.end - // ino.method.setAssumptionSet.26940.definition - public void setAssumptionSet(CTypeAssumptionSet assumptionSet) - // ino.end - // ino.method.setAssumptionSet.26940.body - { - m_AssumptionSet = assumptionSet; - } - // ino.end - - // ino.method.getResultTypes.26943.defdescription type=javadoc - /** - * Author: Jörg Bäuerle
- * @return Returns the ResultTypes. - */ - // ino.end - // ino.method.getResultTypes.26943.definition - public Vector getResultTypes() - // ino.end - // ino.method.getResultTypes.26943.body - { - return m_ResultTypes; - } - // ino.end - - // ino.method.getResultTypeIterator.26946.definition - public Iterator getResultTypeIterator() - // ino.end - // ino.method.getResultTypeIterator.26946.body - { - return this.getResultTypes().iterator(); - } - // ino.end - - // ino.method.setResultTypes.26949.defdescription type=javadoc - /** - * Author: Jörg Bäuerle
- * @param resultType The ResultType to set. - */ - // ino.end - // ino.method.setResultTypes.26949.definition - public void setResultTypes(Vector resultTypes) - // ino.end - // ino.method.setResultTypes.26949.body - { - m_ResultTypes = resultTypes; - } - // ino.end - - // ino.method.getSubstitutions.26952.defdescription type=javadoc - /** - * Author: Jörg Bäuerle
- * @return Returns the Substitutions. - */ - // ino.end - // ino.method.getSubstitutions.26952.definition - public CSubstitutionSet getSubstitutions() - // ino.end - // ino.method.getSubstitutions.26952.body - { - return m_Substitutions; - } - // ino.end - - // ino.method.setSubstitutions.26955.defdescription type=javadoc - /** - * Author: Jörg Bäuerle
- * @param substitution The Substitutions to set. - */ - // ino.end - // ino.method.setSubstitutions.26955.definition - public void setSubstitutions(CSubstitutionSet substitutions) - // ino.end - // ino.method.setSubstitutions.26955.body - { - m_Substitutions = substitutions; - } - // ino.end - - - // ino.method.equals.26958.definition - public boolean equals(Object obj) - // ino.end - // ino.method.equals.26958.body - { - if(obj instanceof CSubstitution){ - CMultiplyTuple tup = (CMultiplyTuple)obj; - boolean ret = true; - ret &= (m_AssumptionSet.equals(tup.m_AssumptionSet)); - ret &= (m_ResultTypes.equals(tup.m_ResultTypes)); - ret &= (m_Substitutions.equals(tup.m_Substitutions)); - return ret; - } - else{ - return false; - } - } - // ino.end - - // ino.method.toString.26961.definition - public String toString() - // ino.end - // ino.method.toString.26961.body - { - StringBuffer sb = new StringBuffer(); - sb.append("MultiplyTuple (\n"); - sb.append("Substitutions:\n"); - sb.append(m_Substitutions.toString()); - sb.append(m_ResultTypes.toString()); - sb.append("\n"); - sb.append(m_AssumptionSet.toString()); - sb.append(" )"); - return sb.toString(); - } - // ino.end - - // ino.method.clone.26964.definition - public CMultiplyTuple clone() - // ino.end - // ino.method.clone.26964.body - { - CMultiplyTuple copy = new CMultiplyTuple(); - copy.setSubstitutions(m_Substitutions.deepCopy()); - Iterator typeIt = this.getResultTypeIterator(); - while(typeIt.hasNext()){ - copy.getResultTypes().addElement(typeIt.next().clone()); - } - copy.setAssumptionSet(m_AssumptionSet.deepCopy()); - return copy; - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/CReconstructionTuple.java b/src/mycompiler/mytypereconstruction/CReconstructionTuple.java deleted file mode 100755 index 0b5c6fdfc..000000000 --- a/src/mycompiler/mytypereconstruction/CReconstructionTuple.java +++ /dev/null @@ -1,133 +0,0 @@ -// ino.module.CReconstructionTuple.8684.package -package mycompiler.mytypereconstruction; -// ino.end - -// ino.module.CReconstructionTuple.8684.import -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -// ino.end - - -// ino.class.CReconstructionTuple.26967.description type=javadoc -/** - * Container-Klasse für Ergebniswerte des Algorithmus TRStart. - * (siehe Algorithmus 5.18 TRStart, Martin Plümicke) - * @author Jörg Bäuerle - * @version $date - */ -// ino.end -// ino.class.CReconstructionTuple.26967.declaration -public class CReconstructionTuple -// ino.end -// ino.class.CReconstructionTuple.26967.body -{ - // ino.attribute.m_SubSet.26970.declaration - private CSubstitutionSet m_SubSet; - // ino.end - // ino.attribute.m_AssumSet.26973.declaration - private CTypeAssumptionSet m_AssumSet; - // ino.end - - // ino.method.CReconstructionTuple.26976.definition - public CReconstructionTuple() - // ino.end - // ino.method.CReconstructionTuple.26976.body - { - this(new CSubstitutionSet(), new CTypeAssumptionSet()); - } - // ino.end - - // ino.method.CReconstructionTuple.26979.definition - public CReconstructionTuple(CSubstitutionSet subSet, CTypeAssumptionSet assumSet) - // ino.end - // ino.method.CReconstructionTuple.26979.body - { - m_SubSet = subSet; - m_AssumSet = assumSet; - } - // ino.end - - // ino.method.getAssumSet.26982.definition - public CTypeAssumptionSet getAssumSet() - // ino.end - // ino.method.getAssumSet.26982.body - { - return m_AssumSet; - } - // ino.end - - // ino.method.setAssumSet.26985.definition - public void setAssumSet(CTypeAssumptionSet assumSet) - // ino.end - // ino.method.setAssumSet.26985.body - { - m_AssumSet = assumSet; - } - // ino.end - - // ino.method.getSubSet.26988.definition - public CSubstitutionSet getSubSet() - // ino.end - // ino.method.getSubSet.26988.body - { - return m_SubSet; - } - // ino.end - - // ino.method.setSubSet.26991.definition - public void setSubSet(CSubstitutionSet subSet) - // ino.end - // ino.method.setSubSet.26991.body - { - m_SubSet = subSet; - } - // ino.end - - // ino.method.equals.26994.definition - public boolean equals(Object obj) - // ino.end - // ino.method.equals.26994.body - { - if(obj instanceof CReconstructionTuple){ - CReconstructionTuple tuple = (CReconstructionTuple)obj; - boolean ret = true; - ret &= (m_SubSet.equals(tuple.m_SubSet)); - ret &= (m_AssumSet.equals(tuple.m_AssumSet)); - return ret; - } - else{ - return false; - } - } - // ino.end - - // ino.method.toString.26997.definition - public String toString() - // ino.end - // ino.method.toString.26997.body - { - StringBuffer sb = new StringBuffer(); - sb.append("ReconstructionTuple (\n"); - sb.append("Substitutions:\n"); - sb.append(m_SubSet.toString()); - sb.append("\n"); - sb.append("Assumptions:\n"); - sb.append(m_AssumSet.toString()); - sb.append("\n)"); - return sb.toString(); - } - // ino.end - - // ino.method.clone.27000.definition - public CReconstructionTuple clone() - // ino.end - // ino.method.clone.27000.body - { - CReconstructionTuple copy = new CReconstructionTuple(); - copy.setSubSet(m_SubSet.deepCopy()); - copy.setAssumSet(m_AssumSet.deepCopy()); - return copy; - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/CSubstitution.java b/src/mycompiler/mytypereconstruction/CSubstitution.java deleted file mode 100755 index c5a749e85..000000000 --- a/src/mycompiler/mytypereconstruction/CSubstitution.java +++ /dev/null @@ -1,272 +0,0 @@ -// ino.module.CSubstitution.8685.package -package mycompiler.mytypereconstruction; -// ino.end - -// ino.module.CSubstitution.8685.import -import java.util.Iterator; -import java.util.Vector; - -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; - -import org.apache.log4j.Logger; -// ino.end - -import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; -import de.dhbwstuttgart.syntaxtree.type.RefType; -import de.dhbwstuttgart.syntaxtree.type.Type; -import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; - -// ino.class.CSubstitution.27003.description type=javadoc -/** - * Implementierung einer Typsubstitution. Bildet eine zu ersetzende - * TypePlaceholder auf einen Substitutions-Typ ab. Instanzen dieser - * Klasse werden in der Regel aus - * Pair-Objekten erzeugt. - * @author J�rg B�uerle - * @version $Date: 2006/07/10 11:27:04 $ - */ -// ino.end -// ino.class.CSubstitution.27003.declaration -public class CSubstitution -// ino.end -// ino.class.CSubstitution.27003.body -{ - // ino.attribute.m_TypeVar.27006.declaration - private TypePlaceholder m_TypeVar = null; - // ino.end - // ino.attribute.m_Type.27009.declaration - protected Type m_Type = null; - // ino.end - // ino.attribute.inferencelog.27012.declaration - protected static Logger inferencelog = Logger.getLogger("inference"); - // ino.end - // ino.method.CSubstitution.27015.definition - public CSubstitution() - // ino.end - // ino.method.CSubstitution.27015.body - { - this(null, null); - } - // ino.end - - // ino.method.CSubstitution.27018.definition - public CSubstitution(TypePlaceholder typeVar, Type type) - // ino.end - // ino.method.CSubstitution.27018.body - { - m_TypeVar = typeVar; - m_Type = type; - } - // ino.end - - // ino.method.CSubstitution.27021.definition - public CSubstitution(Pair unifier) - throws CTypeReconstructionException - // ino.end - // ino.method.CSubstitution.27021.body - { - if(!(unifier.TA1 instanceof TypePlaceholder)){ - throw new CTypeReconstructionException("Unifier enth�lt keinen Typeplaceholder",unifier.TA1); - } - m_TypeVar = (TypePlaceholder)unifier.TA1; - m_Type = unifier.TA2; - } - // ino.end - - - // ino.method.getType.27024.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @return Returns the Type. - */ - // ino.end - // ino.method.getType.27024.definition - public Type getType() - // ino.end - // ino.method.getType.27024.body - { - return m_Type; - } - // ino.end - - // ino.method.setType.27027.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @param type The Type to set. - */ - // ino.end - // ino.method.setType.27027.definition - public void setType(Type type) - // ino.end - // ino.method.setType.27027.body - { - m_Type = type; - } - // ino.end - - // ino.method.getTypeVar.27030.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @return Returns the TypeVar. - */ - // ino.end - // ino.method.getTypeVar.27030.definition - public Type getTypeVar() - // ino.end - // ino.method.getTypeVar.27030.body - { - return this.m_TypeVar; - } - // ino.end - - // ino.method.setTypeVar.27033.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @param typeVar The TypeVar to set. - */ - // ino.end - // ino.method.setTypeVar.27033.definition - public void setTypeVar(TypePlaceholder typeVar) - // ino.end - // ino.method.setTypeVar.27033.body - { - m_TypeVar = typeVar; - } - // ino.end - - // ino.method.equals.27036.definition - public boolean equals(Object obj) - // ino.end - // ino.method.equals.27036.body - { - if(obj instanceof CSubstitution){ - CSubstitution sub = (CSubstitution)obj; - boolean ret = true; - ret &= (m_TypeVar.equals(sub.m_TypeVar)); - ret &= (m_Type.equals(sub.m_Type)); - return ret; - } - else{ - return false; - } - } - // ino.end - - // ino.method.toString.27039.definition - public String toString() - // ino.end - // ino.method.toString.27039.body - { - //return m_TypeVar.getName() +" --> "+m_Type.getName(); - return m_TypeVar.toString() +" --> "+m_Type.toString(); - } - // ino.end - - // ino.method.clone.27042.definition - public CSubstitution clone() - // ino.end - // ino.method.clone.27042.body - { - CSubstitution copy = new CSubstitution(m_TypeVar.clone(), m_Type.clone()); - return copy; - } - // ino.end - - // ino.method.execute.27045.defdescription type=javadoc - /** - * Sucht die eindeutige Instanz der Typeplaceholders in der Registry der - * Typeplaceholders des Syntaxbaumes und f�hrt die Typsubstitution im - * Syntaxbaum durch. - *
Author: J�rg B�uerle - * wenn die TypePlaceholder nicht in der Registry gefunden wurde. - * @throws CTypeReconstructionException Falls TypePlaceholder nicht in Registry - * gefunden wird. - */ - // ino.end - // ino.method.execute.27045.definition - public void execute() - throws CTypeReconstructionException - // ino.end - // ino.method.execute.27045.body - { - TypePlaceholder uniqueVar = TypePlaceholder.getInstance(m_TypeVar.getName().toString()); - if(uniqueVar==null){ - throw new CTypeReconstructionException("CSubstitution.execute(): TypePlaceholder \""+m_TypeVar.getName()+"\" wurde nicht in der Registry gefunden!",null); - } - inferencelog.debug("F�hre Substitution aus: "+this.toString()); - uniqueVar.replaceWithType(m_Type); - } - // ino.end - - // ino.method.applyUnifier.27048.defdescription type=javadoc - /** - * Wendet den Unifier auf die rechte Seite dieser Substitution an. - *
Author: J�rg B�uerle - * @param unifier - */ - // ino.end - // ino.method.applyUnifier.27048.definition - public void applyUnifier(CSubstitutionSet unifier) - // ino.end - // ino.method.applyUnifier.27048.body - { - Iterator pairIt = unifier.getIterator(); - while(pairIt.hasNext()){ - CSubstitution subst = (CSubstitution)pairIt.next(); - - //korrigiert PL 05-07-31 das erste duerfte doch richtig sein. - //subst.setType(this.applySubstitution(subst.getType(), subst)); - this.setType(this.applySubstitution(this.getType(), subst)); - } - - } - // ino.end - - // ino.method.applySubstitution.27051.defdescription type=javadoc - /** - * Wendet die �bergebene Substitution rekursiv auf den �bergebenen Typ an. - *
Author: J�rg B�uerle - * @param type Der zu untersuchende Typ - * @param unifierSub Die anzuwendende Substitution - * @return Den ermittelnden Typ - */ - // ino.end - // ino.method.applySubstitution.27051.definition - private Type applySubstitution(Type type, CSubstitution unifierSub) - // ino.end - // ino.method.applySubstitution.27051.body - { - if(type instanceof TypePlaceholder){ - if(type.equals(unifierSub.getTypeVar())){ - return unifierSub.getType(); - } - } - else if(type instanceof GenericTypeVar){ - if(type.equals(unifierSub.getTypeVar())){ - return unifierSub.getType(); - } - } - else if(type instanceof RefType){ - Vector paras = ((RefType)type).get_ParaList(); - if(paras != null){ - for(int i=0; iTypePlaceholder auf einen Substitutions-Typ ab. Instanzen dieser - * Klasse werden in der Regel aus - * Pair-Objekten erzeugt. - * @author Martin Pl�micke - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CSubstitutionGenVar.27057.declaration -public class CSubstitutionGenVar extends CSubstitution -// ino.end -// ino.class.CSubstitutionGenVar.27057.body -{ - // ino.attribute.m_TypeVar.27061.declaration - private GenericTypeVar m_TypeVar = null; - // ino.end - - // ino.method.CSubstitutionGenVar.27064.definition - public CSubstitutionGenVar() - // ino.end - // ino.method.CSubstitutionGenVar.27064.body - { - this(null, null); - } - // ino.end - - // ino.method.CSubstitutionGenVar.27067.definition - public CSubstitutionGenVar(GenericTypeVar typeVar, Type type) - // ino.end - // ino.method.CSubstitutionGenVar.27067.body - { - m_TypeVar = typeVar; - m_Type = type; - } - // ino.end - - // ino.method.getTypeVar.27070.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @return Returns the TypeVar. - */ - // ino.end - // ino.method.getTypeVar.27070.definition - public Type getTypeVar() - // ino.end - // ino.method.getTypeVar.27070.body - { - return this.m_TypeVar; - } - // ino.end - - // ino.method.toString.27073.definition - public String toString() - // ino.end - // ino.method.toString.27073.body - { - return this.m_TypeVar.getName() +" --> "+this.m_Type.getName(); - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/CSupportData.java b/src/mycompiler/mytypereconstruction/CSupportData.java deleted file mode 100755 index 7ddb28cc4..000000000 --- a/src/mycompiler/mytypereconstruction/CSupportData.java +++ /dev/null @@ -1,346 +0,0 @@ -// ino.module.CSupportData.8687.package -package mycompiler.mytypereconstruction; -// ino.end - -// ino.module.CSupportData.8687.import -import java.util.Vector; - -import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.RefType; -import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import de.dhbwstuttgart.typeinference.unify.FC_TTO; - -// ino.class.CSupportData.27076.description type=javadoc -/** - * Container-Klasse fr bestimmte Hilfsdaten, die beim - * Typrekonstruktionsalgorithmus bentigt und deshalb - * rekursiv weiter gereicht werden. - * @author Jrg Buerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CSupportData.27076.declaration -public class CSupportData -// ino.end -// ino.class.CSupportData.27076.body -{ - // ino.attribute.NO_METHOD.27079.decldescription type=javadoc - /** - * Gibt Namensstring fr den Classbody auerhalb einer Methode - * fr m_CurrentMethod. - */ - // ino.end - // ino.attribute.NO_METHOD.27079.declaration - public static final String NO_METHOD = "#nomethod#"; - // ino.end - - // ino.attribute.m_FiniteClosure.27082.declaration - private FC_TTO m_FiniteClosure; - // ino.end - // ino.attribute.m_A.27085.declaration - private Vector m_A; - // ino.end - // ino.attribute.m_CurrentClass.27088.declaration - private String m_CurrentClass; - // ino.end - // ino.attribute.m_CurrentClassPara.27091.declaration - private Vector m_CurrentClassPara; - // ino.end - // ino.attribute.m_CurrentMethod.27094.declaration - private String m_CurrentMethod; - // ino.end - // ino.attribute.m_CurrentMethodParaCount.27097.declaration - private int m_CurrentMethodParaCount; - // ino.end - // ino.attribute.m_BlockIdList.27100.declaration - private Vector m_BlockIdList; - // ino.end - // ino.attribute.m_CurrentBlockDepth.27103.declaration - private int m_CurrentBlockDepth; - // ino.end - - // ino.attribute.m_CurrentMethodOverloadedID.27106.declaration - private int m_CurrentMethodOverloadedID; - // ino.end - - // ino.method.CSupportData.27109.definition - public CSupportData(FC_TTO finiteClosure, Vector A, String currentClass, Vector currentClassPara) - // ino.end - // ino.method.CSupportData.27109.body - { - this(finiteClosure, A, currentClass, currentClassPara, NO_METHOD, 0, 0, new Vector(), 0); - } - // ino.end - - // ino.method.CSupportData.27112.definition - public CSupportData(FC_TTO finiteClosure, Vector A, String currentClass, Vector currentClassPara, String currentMethod, int currentMethodParaCount, int currentMethodOverloadedID, Vector blockIdList, int blockDepth) - // ino.end - // ino.method.CSupportData.27112.body - { - m_FiniteClosure = finiteClosure; - m_A = A; - m_CurrentClass = currentClass; - m_CurrentClassPara = currentClassPara; - m_CurrentMethod = currentMethod; - m_CurrentMethodParaCount = currentMethodParaCount; - m_CurrentMethodOverloadedID=currentMethodOverloadedID; - m_BlockIdList = blockIdList; - m_CurrentBlockDepth = blockDepth; - } - // ino.end - - // ino.method.getFiniteClosure.27115.definition - public FC_TTO getFiniteClosure() - // ino.end - // ino.method.getFiniteClosure.27115.body - { - return m_FiniteClosure; - } - // ino.end - - // ino.method.setFiniteClosure.27118.definition - public void setFiniteClosure(FC_TTO finiteClosure) - // ino.end - // ino.method.setFiniteClosure.27118.body - { - m_FiniteClosure = finiteClosure; - } - // ino.end - - // ino.method.getA.27121.definition - public Vector getA() - // ino.end - // ino.method.getA.27121.body - { - return m_A; - } - // ino.end - - // ino.method.setA.27124.definition - public void setA(Vector A) - // ino.end - // ino.method.setA.27124.body - { - m_A = A; - } - // ino.end - - // ino.method.getCurrentClassType.27127.definition - public RefType getCurrentClassType() - // ino.end - // ino.method.getCurrentClassType.27127.body - { - if(m_CurrentClassPara==null || m_CurrentClassPara.size()==0){ - return(new RefType(m_CurrentClass,-1)); - }else{ - return(new RefType(m_CurrentClass,m_CurrentClassPara,-1)); - } - - } - // ino.end - - // ino.method.getCurrentClass.27130.definition - public String getCurrentClass() - // ino.end - // ino.method.getCurrentClass.27130.body - { - return m_CurrentClass; - } - // ino.end - - // ino.method.setCurrentClass.27133.definition - public void setCurrentClass(String currentClass) - // ino.end - // ino.method.setCurrentClass.27133.body - { - m_CurrentClass = currentClass; - } - // ino.end - - // ino.method.getCurrentClassPara.27136.definition - public Vector getCurrentClassPara() - // ino.end - // ino.method.getCurrentClassPara.27136.body - { - return m_CurrentClassPara; - } - // ino.end - - // ino.method.setCurrentClassPara.27139.definition - public void setCurrentClassPara(Vector currentClassPara) - // ino.end - // ino.method.setCurrentClassPara.27139.body - { - m_CurrentClassPara = currentClassPara; - } - // ino.end - - // ino.method.getCurrentMethod.27142.definition - public String getCurrentMethod() - // ino.end - // ino.method.getCurrentMethod.27142.body - { - return m_CurrentMethod; - } - // ino.end - - // ino.method.setCurrentMethod.27145.definition - public void setCurrentMethod(String currentMethod) - // ino.end - // ino.method.setCurrentMethod.27145.body - { - m_CurrentMethod = currentMethod; - } - // ino.end - - // ino.method.getCurrentMethodParaCount.27148.definition - public int getCurrentMethodParaCount() - // ino.end - // ino.method.getCurrentMethodParaCount.27148.body - { - return m_CurrentMethodParaCount; - } - // ino.end - - // ino.method.setCurrentMethodParaCount.27151.definition - public void setCurrentMethodParaCount(int currentMethodParaCount) - // ino.end - // ino.method.setCurrentMethodParaCount.27151.body - { - m_CurrentMethodParaCount = currentMethodParaCount; - } - // ino.end - // ino.method.setCurrentMethodOverloadedID.27154.definition - public void setCurrentMethodOverloadedID(int currentMethodOverloadedID) - // ino.end - // ino.method.setCurrentMethodOverloadedID.27154.body - { - m_CurrentMethodOverloadedID = currentMethodOverloadedID; - } - // ino.end - - // ino.method.getBlockIdList.27157.definition - public Vector getBlockIdList() - // ino.end - // ino.method.getBlockIdList.27157.body - { - return m_BlockIdList; - } - // ino.end - - // ino.method.setBlockIdList.27160.definition - public void setBlockIdList(Vector blockId) - // ino.end - // ino.method.setBlockIdList.27160.body - { - m_BlockIdList = blockId; - } - // ino.end - - // ino.method.resetBlockId.27163.definition - public void resetBlockId() - // ino.end - // ino.method.resetBlockId.27163.body - { - m_BlockIdList = new Vector(); - m_CurrentBlockDepth = 0; - } - // ino.end - - // ino.method.getCurrentBlockDepth.27166.definition - public int getCurrentBlockDepth() - // ino.end - // ino.method.getCurrentBlockDepth.27166.body - { - return m_CurrentBlockDepth; - } - // ino.end - - // ino.method.setCurrentBlockDepth.27169.definition - public void setCurrentBlockDepth(int currentBlockDepth) - // ino.end - // ino.method.setCurrentBlockDepth.27169.body - { - m_CurrentBlockDepth = currentBlockDepth; - } - // ino.end - - // ino.method.incBlockDepth.27172.definition - public int incBlockDepth() - // ino.end - // ino.method.incBlockDepth.27172.body - { - m_CurrentBlockDepth++; - if(m_CurrentBlockDepth>m_BlockIdList.size()){ - m_BlockIdList.addElement(new Integer(0)); - } - int blockCount = m_BlockIdList.elementAt(m_CurrentBlockDepth-1).intValue(); - blockCount++; - m_BlockIdList.setElementAt(blockCount, m_CurrentBlockDepth-1); - return m_CurrentBlockDepth; - } - // ino.end - - // ino.method.decBlockDepth.27175.definition - public int decBlockDepth() - // ino.end - // ino.method.decBlockDepth.27175.body - { - if(m_CurrentBlockDepth>0){ - m_CurrentBlockDepth--; - } - return m_CurrentBlockDepth; - } - // ino.end - - // ino.method.getCurrentBlockId.27178.definition - public String getCurrentBlockId() - // ino.end - // ino.method.getCurrentBlockId.27178.body - { - return this.getBlockId(m_CurrentBlockDepth); - } - // ino.end - - // ino.method.getBlockId.27181.definition - public String getBlockId(int blockDepth) - // ino.end - // ino.method.getBlockId.27181.body - { - StringBuffer sb = new StringBuffer(); - for(int i=0; i)m_A.clone(), - m_CurrentClass, (Vector) m_CurrentClassPara.clone(), m_CurrentMethod, m_CurrentMethodParaCount,m_CurrentMethodOverloadedID, - (Vector)m_BlockIdList.clone(), m_CurrentBlockDepth - ); - return dolly; - } - // ino.end - - // ino.method.getCurrentMethodOverloadedID.27187.definition - public int getCurrentMethodOverloadedID() - // ino.end - // ino.method.getCurrentMethodOverloadedID.27187.body - { - return(m_CurrentMethodOverloadedID); - } - // ino.end - -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/CTriple.java b/src/mycompiler/mytypereconstruction/CTriple.java deleted file mode 100755 index cd525f5d9..000000000 --- a/src/mycompiler/mytypereconstruction/CTriple.java +++ /dev/null @@ -1,263 +0,0 @@ -// ino.module.CTriple.8688.package -package mycompiler.mytypereconstruction; -// ino.end - -// ino.module.CTriple.8688.import -import de.dhbwstuttgart.syntaxtree.type.Type; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -// ino.end - -// ino.class.CTriple.27190.description type=javadoc -/** - * Container-Klasse f�r Ergebniswerte der Algorithmen TRStmt und TRExp. - * (siehe Algorithmus 5.20 ff TRStmt und 5.30 ff TRExp, Martin Pl�micke) - * CTriple steht genau wie CReconstructionTuple für eine mögliche Typkombination mit - * dem einzigen Unterschied, dass sie zusätzlich noch den berechneten ReturnType des aktuell - * betrachteten Blocks enthält. Bei diesem ReturnTyp kann es sich auch nur um eine Vermutung handeln. - * Die Klasse taucht meistens als CTripleSet auf. Der Inferenzalgorithmus kann dann unter den verschiedenen vorgeschlagenen ReturnTypen auswählen. - * @author J�rg B�uerle - * @version $Date: 2013/02/07 05:08:51 $ - */ -// ino.end -// ino.class.CTriple.27190.declaration -public class CTriple -// ino.end -// ino.class.CTriple.27190.body -{ - // ino.attribute.m_Substitutions.27193.declaration - private CSubstitutionSet m_Substitutions = null; - // ino.end - // ino.attribute.m_ResultType.27196.declaration - private Type m_ResultType = null; - // ino.end - // ino.attribute.m_AssumptionSet.27199.declaration - private CTypeAssumptionSet m_AssumptionSet = null; - // ino.end - - // ino.method.CTriple.27202.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * - */ - // ino.end - // ino.method.CTriple.27202.definition - public CTriple() - // ino.end - // ino.method.CTriple.27202.body - { - m_Substitutions = new CSubstitutionSet(); - m_ResultType = null; - m_AssumptionSet = new CTypeAssumptionSet(); - } - // ino.end - - /** - * - * @param substitutions - * @param resultType - * @param assumptionSet - */ - // ino.method.CTriple.27205.definition - public CTriple(CSubstitutionSet substitutions, Type resultType, CTypeAssumptionSet assumptionSet) - // ino.end - // ino.method.CTriple.27205.body - { - m_Substitutions = substitutions; - m_ResultType = resultType; - m_AssumptionSet = assumptionSet; - } - // ino.end - - - // ino.method.getAssumptionSet.27208.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @return Returns the AssumptionSet. - */ - // ino.end - // ino.method.getAssumptionSet.27208.definition - public CTypeAssumptionSet getAssumptionSet() - // ino.end - // ino.method.getAssumptionSet.27208.body - { - return m_AssumptionSet; - } - // ino.end - - // ino.method.setAssumptionSet.27211.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @param assumptionSet The AssumptionSet to set. - */ - // ino.end - // ino.method.setAssumptionSet.27211.definition - public void setAssumptionSet(CTypeAssumptionSet assumptionSet) - // ino.end - // ino.method.setAssumptionSet.27211.body - { - m_AssumptionSet = assumptionSet; - } - // ino.end - - // ino.method.getResultType.27214.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @return Returns the ResultType. - */ - // ino.end - // ino.method.getResultType.27214.definition - public Type getResultType() - // ino.end - // ino.method.getResultType.27214.body - { - return m_ResultType; - } - // ino.end - - // ino.method.setResultType.27217.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @param resultType The ResultType to set. - */ - // ino.end - // ino.method.setResultType.27217.definition - public void setResultType(Type resultType) - // ino.end - // ino.method.setResultType.27217.body - { - m_ResultType = resultType; - } - // ino.end - - // ino.method.getSubstitutions.27220.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @return Returns the Substitutions. - */ - // ino.end - // ino.method.getSubstitutions.27220.definition - public CSubstitutionSet getSubstitutions() - // ino.end - // ino.method.getSubstitutions.27220.body - { - return m_Substitutions; - } - // ino.end - - // ino.method.setSubstitutions.27223.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @param substitution The Substitutions to set. - */ - // ino.end - // ino.method.setSubstitutions.27223.definition - public void setSubstitutions(CSubstitutionSet substitutions) - // ino.end - // ino.method.setSubstitutions.27223.body - { - m_Substitutions = substitutions; - } - // ino.end - - - // ino.method.equals.27226.definition - public boolean equals(Object obj) - // ino.end - // ino.method.equals.27226.body - { - if(obj instanceof CTriple){ - CTriple trip = (CTriple)obj; - boolean ret = true; - ret &= (m_AssumptionSet.equals(trip.m_AssumptionSet)); - ret &= (m_ResultType.equals(trip.m_ResultType)); - ret &= (m_Substitutions.equals(trip.m_Substitutions)); - return ret; - } - else{ - return false; - } - } - // ino.end - - // ino.method.toString.27229.definition - public String toString() - // ino.end - // ino.method.toString.27229.body - { - StringBuffer sb = new StringBuffer(); - sb.append("Triple (\n"); - sb.append("Substitutions:\n"); - sb.append(m_Substitutions.toString()); - sb.append("\n"); - sb.append("ResultType: "+m_ResultType.getName()); - sb.append("\n"); - sb.append("Assumptions:\n"); - sb.append(m_AssumptionSet.toString()); - sb.append(" )"); - return sb.toString(); - } - // ino.end - - // ino.method.clone.27232.definition - public CTriple clone() - // ino.end - // ino.method.clone.27232.body - { - CTriple copy = new CTriple(); - copy.setSubstitutions(m_Substitutions.deepCopy()); - copy.setResultType(m_ResultType.clone()); - copy.setAssumptionSet(m_AssumptionSet.deepCopy()); - return copy; - } - // ino.end - - // ino.method.cloneAndApplyUnify.27235.defdescription type=javadoc - /** - * Kopiert dieses Triple und wendet alle Substitutionen eines Unifiers auf - * die Kopie an. - *
Author: J�rg B�uerle - * @param unifier - * @return Die Kopie nach Anwendung des Unifiers - */ - // ino.end - // ino.method.cloneAndApplyUnify.27235.definition - public CTriple cloneAndApplyUnify(CSubstitutionSet unifier) - // ino.end - // ino.method.cloneAndApplyUnify.27235.body - { - // -------------------------- - // Typannahmen bauen: - // -------------------------- - CTypeAssumptionSet V_substituted = this.getAssumptionSet().deepCopy(); - V_substituted.sub(unifier); - // -------------------------- - // Substitutionen bauen: - // -------------------------- - CSubstitutionSet substitutionSet = this.getSubstitutions().deepCopy(); - substitutionSet.applyUnifier(unifier); - substitutionSet.unite(unifier); - // -------------------------- - // R�ckgabetyp bauen: - // -------------------------- - Type ty = substitutionSet.applyThisSubstitutionSet(this.getResultType().clone()); - //PL 05-08-25 hier muessen TypePlaceholders-Variablen auch erstezt werden, - //wenn sie als Subvariablen in typen vorkommen.if(ty instanceof TypePlaceholder){ - // Iterator pairIt = unifier.getIterator(); - // while(pairIt.hasNext()){ - // CSubstitution pair = pairIt.next(); - // if(pair.getTypeVar().getName().equals(ty.getName())){ - // ty = pair.getType(); - // break; - // } - // } - //} - // -------------------------- - // Triple zusammensetzen: - // -------------------------- - CTriple triple = new CTriple(substitutionSet, ty, V_substituted); - return triple; - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/replacementlistener/CReplaceTypeEvent.java b/src/mycompiler/mytypereconstruction/replacementlistener/CReplaceTypeEvent.java deleted file mode 100755 index b39868a9d..000000000 --- a/src/mycompiler/mytypereconstruction/replacementlistener/CReplaceTypeEvent.java +++ /dev/null @@ -1,55 +0,0 @@ -// ino.module.CReplaceTypeEvent.8691.package -package mycompiler.mytypereconstruction.replacementlistener; -// ino.end - -// ino.module.CReplaceTypeEvent.8691.import -import de.dhbwstuttgart.syntaxtree.type.Type; - -// ino.class.CReplaceTypeEvent.27311.description type=javadoc -/** - * - * @author Jörg Bäuerle - * @version $date - */ -// ino.end -// ino.class.CReplaceTypeEvent.27311.declaration -public class CReplaceTypeEvent -// ino.end -// ino.class.CReplaceTypeEvent.27311.body -{ - // ino.attribute.m_OldType.27314.declaration - private Type m_OldType; - // ino.end - // ino.attribute.m_NewType.27317.declaration - private Type m_NewType; - // ino.end - - // ino.method.CReplaceTypeEvent.27320.definition - public CReplaceTypeEvent(Type oldType, Type newType) - // ino.end - // ino.method.CReplaceTypeEvent.27320.body - { - m_OldType = oldType; - m_NewType = newType; - } - // ino.end - - // ino.method.getNewType.27323.definition - public Type getNewType() - // ino.end - // ino.method.getNewType.27323.body - { - return m_NewType; - } - // ino.end - - // ino.method.getOldType.27326.definition - public Type getOldType() - // ino.end - // ino.method.getOldType.27326.body - { - return m_OldType; - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/replacementlistener/IReplaceTypeEventProvider.java b/src/mycompiler/mytypereconstruction/replacementlistener/IReplaceTypeEventProvider.java deleted file mode 100755 index 32789888d..000000000 --- a/src/mycompiler/mytypereconstruction/replacementlistener/IReplaceTypeEventProvider.java +++ /dev/null @@ -1,41 +0,0 @@ -// ino.module.IReplaceTypeEventProvider.8692.package -package mycompiler.mytypereconstruction.replacementlistener; -// ino.end - -// ino.module.IReplaceTypeEventProvider.8692.import -import java.util.Iterator; -// ino.end - -// ino.class.IReplaceTypeEventProvider.27329.description type=javadoc -/** - * Interface für ein Objekt, das ReplaceTypeEvents zur Verfügung stellt und - * es TypeReplacementListenern erlaubt, sich zu registrieren. - * @author Jörg Bäuerle - * @version $date - */ -// ino.end -// ino.class.IReplaceTypeEventProvider.27329.declaration -public interface IReplaceTypeEventProvider -// ino.end -// ino.class.IReplaceTypeEventProvider.27329.body -{ - // ino.method.addReplacementListener.27332.declaration - public void addReplacementListener(ITypeReplacementListener listener); - // ino.end - // ino.method.removeReplacementListener.27335.declaration - public void removeReplacementListener(ITypeReplacementListener listener); - // ino.end - // ino.method.removeAllReplacementListeners.27338.declaration - public void removeAllReplacementListeners(); - // ino.end - // ino.method.getReplacementListeners.27341.declaration - public Iterator getReplacementListeners(); - // ino.end - // ino.method.containsListener.27344.declaration - public boolean containsListener(ITypeReplacementListener listener); - // ino.end - // ino.method.fireReplaceTypeEvent.27347.declaration - public void fireReplaceTypeEvent(CReplaceTypeEvent e); - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/replacementlistener/ITypeReplacementListener.java b/src/mycompiler/mytypereconstruction/replacementlistener/ITypeReplacementListener.java deleted file mode 100755 index 12728490d..000000000 --- a/src/mycompiler/mytypereconstruction/replacementlistener/ITypeReplacementListener.java +++ /dev/null @@ -1,42 +0,0 @@ -// ino.module.ITypeReplacementListener.8693.package -package mycompiler.mytypereconstruction.replacementlistener; -// ino.end - - -// ino.class.ITypeReplacementListener.27350.description type=javadoc -/** - * Interface f�r einen TypeReplacementListener, der es erm�glicht, - * einen Typ gegen einen anderen auszutauschen. - * @author J�rg B�uerle - * @version $date - */ -// ino.end -// ino.class.ITypeReplacementListener.27350.declaration -public interface ITypeReplacementListener -// ino.end -// ino.class.ITypeReplacementListener.27350.body -{ - // ino.method.replaceType.27353.decldescription type=javadoc - /** - * Tauscht einen Typ gegen einen anderen aus. - *
Author: J�rg B�uerle - * @param e Das Event mit dem neuen Typ - */ - // ino.end - // ino.method.replaceType.27353.declaration - public void replaceType(CReplaceTypeEvent e); - // ino.end - - // ino.method.getTypeLineNumber.27356.decldescription type=javadoc - /** - * Gibt die Zeilennummer zur�ck, in der eine TypePlaceholder - * angelegt worden ist. - *
Author: J�rg B�uerle - * @return Die Zeilennummer - */ - // ino.end - // ino.method.getTypeLineNumber.27356.declaration - public int getTypeLineNumber(); - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/CHashtableSet.java b/src/mycompiler/mytypereconstruction/set/CHashtableSet.java deleted file mode 100755 index 38606cf8b..000000000 --- a/src/mycompiler/mytypereconstruction/set/CHashtableSet.java +++ /dev/null @@ -1,262 +0,0 @@ -// ino.module.CHashtableSet.8695.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.module.CHashtableSet.8695.import -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.Iterator; -import java.util.Vector; -import mycompiler.mytypereconstruction.typeassumptionkey.IMethodBoundKey; -import org.apache.log4j.Logger; -// ino.end - -// ino.class.CHashtableSet.27360.description type=javadoc -/** - * @author Jrg Buerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CHashtableSet.27360.declaration -public abstract class CHashtableSet extends CSet -// ino.end -// ino.class.CHashtableSet.27360.body -{ - - // ino.attribute.inferencelog.27364.declaration - protected static Logger inferencelog = Logger.getLogger("inference"); - // ino.end - - // ino.attribute.m_Elements.27367.declaration - private Hashtable m_Elements = null; - // ino.end - - // ino.method.CHashtableSet.27370.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * - */ - // ino.end - // ino.method.CHashtableSet.27370.definition - public CHashtableSet() - // ino.end - // ino.method.CHashtableSet.27370.body - { - m_Elements = new Hashtable(); - } - // ino.end - - // ino.method.addElement.27373.defdescription type=javadoc - /** - * Diese Methode fügt das Element element unter dem Key des Elements - * in der HashMap ab, falls diese Position schon belegt ist (überladene - * Methode mit gleicher Parameteranzahl), wird ein neuer Key generiert - * mit einer um 1 höheren overloadedMethodID - * - * @return Liefert die overloadedMethodID zurück - */ - // ino.end - // ino.method.addElement.27373.definition - public void addElement(E element) - // ino.end - // ino.method.addElement.27373.body - { - this.addElement(element.getHashSetKey(), element); - } - // ino.end - - // ino.method.addElement.27376.defdescription type=javadoc - /** - * Diese Methode fügt das Element element unter dem Key elementKey - * in der HashMap ab, falls diese Position schon belegt ist (überladene - * Methode mit gleicher Parameteranzahl), wird ein neuer Key generiert - * mit einer um 1 höheren overloadedMethodID - * - * @return Liefert die overloadedMethodID zurück - */ - // ino.end - // ino.method.addElement.27376.definition - public void addElement(IHashSetKey elementKey, E element) - // ino.end - // ino.method.addElement.27376.body - { - if(elementKey instanceof IMethodBoundKey){ - IMethodBoundKey key=(IMethodBoundKey)elementKey; - while(m_Elements.get((IHashSetKey)key)!=null){ - key=key.getNextMethodKey(); - } - element.updateHashSetKey((IHashSetKey)key); - // fixme Key in element storen - m_Elements.put((IHashSetKey)key, element); - }else{ - m_Elements.put(elementKey, element); - } - } - // ino.end - - - // ino.method.getElement.27379.definition - public E getElement(IHashSetKey key) - // ino.end - // ino.method.getElement.27379.body - { - if(key instanceof IMethodBoundKey){ - if(!((IMethodBoundKey)key).isOverloadedIDSet()){ - inferencelog.warn("Es wurde ein nicht-initialisierter MethodKey verwendet! Kann zu Problemen fürhren: " + key); - } - } - return m_Elements.get(key); - } - // ino.end - - // ino.method.getElements.27382.defdescription type=javadoc - /** - * Liefert alle Elemente in der HashTable, die zu der Methoden-Signatur-Klass - * gehören d.h. - * liefert - overloaded(String a) - * - overloaded(int a) - * - ... - * - */ - // ino.end - // ino.method.getElements.27382.definition - public Vector getElements(IHashSetKey key) - // ino.end - // ino.method.getElements.27382.body - { - Vector elements=new Vector(); - if(key instanceof IMethodBoundKey){ - IMethodBoundKey keyToIterate=((IMethodBoundKey)key).getFirstMethodKey(); - E elem; - while((elem=getElement((IHashSetKey)keyToIterate))!=null){ - elements.add(elem); - keyToIterate=keyToIterate.getNextMethodKey(); - } - - }else{ - elements.add(getElement(key)); - } - return elements; - } - // ino.end - - // ino.method.removeElement.27385.definition - public void removeElement(E element) - // ino.end - // ino.method.removeElement.27385.body - { - this.removeElement(element.getHashSetKey()); - } - // ino.end - - // ino.method.removeElement.27388.definition - public void removeElement(IHashSetKey key) - // ino.end - // ino.method.removeElement.27388.body - { - m_Elements.remove(key); - } - // ino.end - - // ino.method.getCardinality.27391.definition - public int getCardinality() - // ino.end - // ino.method.getCardinality.27391.body - { - return m_Elements.size(); - } - // ino.end - - // ino.method.getHashtable.27394.definition - public Hashtable getHashtable() - // ino.end - // ino.method.getHashtable.27394.body - { - return m_Elements; - } - // ino.end - - // ino.method.setHashtable.27397.definition - public void setHashtable(Hashtable hash) - // ino.end - // ino.method.setHashtable.27397.body - { - m_Elements = hash; - } - // ino.end - - // ino.method.getIterator.27400.definition - public Iterator getIterator() - // ino.end - // ino.method.getIterator.27400.body - { - return m_Elements.values().iterator(); - } - // ino.end - - // ino.method.unite.27403.definition - public void unite(CSet anotherSet) - // ino.end - // ino.method.unite.27403.body - { - if(!(anotherSet instanceof CHashtableSet)){ - return; - } - CHashtableSet assumSet = (CHashtableSet)anotherSet; - - // Elemente der anderen Menge hinzufgen: - Enumeration enumer = assumSet.getHashtable().keys(); - while(enumer.hasMoreElements()){ - this.addElement(assumSet.getElement(enumer.nextElement())); - } - } - // ino.end - - // ino.method.subtract.27406.definition - public void subtract(CSet anotherSet) - // ino.end - // ino.method.subtract.27406.body - { - if(!(anotherSet instanceof CHashtableSet)){ - return; - } - CHashtableSet assumSet = (CHashtableSet)anotherSet; - - // Elemente der anderen Menge entfernen: - Enumeration enumer = assumSet.getHashtable().keys(); - while(enumer.hasMoreElements()){ - this.removeElement(assumSet.getElement(enumer.nextElement())); - } - } - // ino.end - - // ino.method.contains.27409.definition - public boolean contains(E element) - // ino.end - // ino.method.contains.27409.body - { - return m_Elements.contains(element); - } - // ino.end - - // ino.method.equals.27412.definition - public boolean equals(Object obj) - // ino.end - // ino.method.equals.27412.body - { - if(obj instanceof CHashtableSet){ - CHashtableSet hashSet = (CHashtableSet)obj; - boolean ret = true; - ret &= m_Elements.size() == hashSet.getHashtable().size(); - if(ret){ - m_Elements.equals(hashSet.m_Elements); - } - return ret; - } - else{ - return false; - } - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/CMultiplyTupleSet.java b/src/mycompiler/mytypereconstruction/set/CMultiplyTupleSet.java deleted file mode 100755 index 32eea6c83..000000000 --- a/src/mycompiler/mytypereconstruction/set/CMultiplyTupleSet.java +++ /dev/null @@ -1,52 +0,0 @@ -// ino.module.CMultiplyTupleSet.8696.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.module.CMultiplyTupleSet.8696.import -import java.util.Iterator; -import java.util.Vector; -import mycompiler.mytypereconstruction.CMultiplyTuple; -// ino.end - -// ino.class.CMultiplyTupleSet.27415.description type=javadoc -/** - * @author J�rg B�uerle - * @version $Date: 2013/03/27 18:29:34 $ - */ -// ino.end -// ino.class.CMultiplyTupleSet.27415.declaration -public class CMultiplyTupleSet extends CVectorSet -// ino.end -// ino.class.CMultiplyTupleSet.27415.body -{ - - // ino.method.shallowCopy.27419.definition - public CMultiplyTupleSet shallowCopy() - // ino.end - // ino.method.shallowCopy.27419.body - { - CMultiplyTupleSet copy = new CMultiplyTupleSet(); - copy.setVector((Vector)this.getVector().clone()); - return copy; - } - // ino.end - - // ino.method.deepCopy.27422.definition - public CMultiplyTupleSet deepCopy() - // ino.end - // ino.method.deepCopy.27422.body - { - CMultiplyTupleSet copy = new CMultiplyTupleSet(); - Iterator it = this.getIterator(); - while(it.hasNext()){ - copy.addElement(it.next().clone()); - } - return copy; - } - // ino.end - - public Iterator iterator() { - return this.getIterator(); - } -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/CReconstructionTupleSet.java b/src/mycompiler/mytypereconstruction/set/CReconstructionTupleSet.java deleted file mode 100755 index a4903032e..000000000 --- a/src/mycompiler/mytypereconstruction/set/CReconstructionTupleSet.java +++ /dev/null @@ -1,58 +0,0 @@ -// ino.module.CReconstructionTupleSet.8697.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.module.CReconstructionTupleSet.8697.import -import java.util.Iterator; -import java.util.Vector; -import mycompiler.mytypereconstruction.CReconstructionTuple; -// ino.end - -// ino.class.CReconstructionTupleSet.27425.description type=javadoc -/** - * @author J�rg B�uerle - * @version $Date: 2013/03/27 18:29:34 $ - */ -// ino.end -// ino.class.CReconstructionTupleSet.27425.declaration -public class CReconstructionTupleSet extends CVectorSet -// ino.end -// ino.class.CReconstructionTupleSet.27425.body -{ - - // ino.method.shallowCopy.27429.definition - public CReconstructionTupleSet shallowCopy() - // ino.end - // ino.method.shallowCopy.27429.body - { - CReconstructionTupleSet copy = new CReconstructionTupleSet(); - copy.setVector((Vector)this.getVector().clone()); - return copy; - } - // ino.end - - // ino.method.deepCopy.27432.defdescription type=javadoc - /** - *
Author: J�rg B�uerle - * @return - */ - // ino.end - // ino.method.deepCopy.27432.definition - public CReconstructionTupleSet deepCopy() - // ino.end - // ino.method.deepCopy.27432.body - { - CReconstructionTupleSet copy = new CReconstructionTupleSet(); - Iterator it = this.getIterator(); - while(it.hasNext()){ - copy.addElement(it.next().clone()); - } - return copy; - } - // ino.end - - public Iterator iterator() { - return this.getIterator(); - } -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/CSet.java b/src/mycompiler/mytypereconstruction/set/CSet.java deleted file mode 100755 index 088afb99e..000000000 --- a/src/mycompiler/mytypereconstruction/set/CSet.java +++ /dev/null @@ -1,72 +0,0 @@ -// ino.module.CSet.8698.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.module.CSet.8698.import -import java.util.Iterator; -// ino.end - -// ino.class.CSet.27435.description type=javadoc -/** - * - * @author Jrg Buerle - * @version $date - */ -// ino.end -// ino.class.CSet.27435.declaration -public abstract class CSet implements Iterable -// ino.end -// ino.class.CSet.27435.body -{ - // ino.method.addElement.27438.declaration - public abstract void addElement(E element); - // ino.end - // ino.method.removeElement.27441.declaration - public abstract void removeElement(E element); - // ino.end - // ino.method.unite.27444.declaration - public abstract void unite(CSet anotherSet); - // ino.end - // ino.method.subtract.27447.declaration - public abstract void subtract(CSet anotherSet); - // ino.end - // ino.method.shallowCopy.27450.declaration - public abstract CSet shallowCopy(); - // ino.end - // ino.method.deepCopy.27453.declaration - public abstract CSet deepCopy(); - // ino.end - // ino.method.contains.27456.declaration - public abstract boolean contains(E element); - // ino.end - // ino.method.getCardinality.27459.declaration - public abstract int getCardinality(); - // ino.end - // ino.method.getIterator.27462.declaration - public abstract Iterator getIterator(); - // ino.end - // ino.method.equals.27465.declaration - public abstract boolean equals(Object obj); - // ino.end - - // ino.method.toString.27468.definition - public String toString() - // ino.end - // ino.method.toString.27468.body - { - StringBuffer sb = new StringBuffer(); - sb.append("Set {\n"); - Iterator it = this.getIterator(); - while(it.hasNext()){ - sb.append(it.next().toString()); - sb.append(",\n"); - } - if(this.getCardinality()>0){ - sb.delete(sb.length()-2, sb.length()-1); - } - sb.append("}"); - return sb.toString(); - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/CSubstitutionSet.java b/src/mycompiler/mytypereconstruction/set/CSubstitutionSet.java deleted file mode 100755 index 6a98c4067..000000000 --- a/src/mycompiler/mytypereconstruction/set/CSubstitutionSet.java +++ /dev/null @@ -1,134 +0,0 @@ -// ino.module.CSubstitutionSet.8699.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.module.CSubstitutionSet.8699.import -import java.util.Iterator; -import java.util.Vector; - -import de.dhbwstuttgart.syntaxtree.type.Pair; -import de.dhbwstuttgart.syntaxtree.type.Type; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.mytypereconstruction.CSubstitution; -// ino.end - -// ino.class.CSubstitutionSet.27471.description type=javadoc -/** - * @author J�rg B�uerle - * @version $Date: 2013/03/27 18:29:34 $ - */ -// ino.end -// ino.class.CSubstitutionSet.27471.declaration -public class CSubstitutionSet extends CVectorSet -// ino.end -// ino.class.CSubstitutionSet.27471.body -{ - // ino.method.CSubstitutionSet.27475.definition - public CSubstitutionSet() - // ino.end - // ino.method.CSubstitutionSet.27475.body - { - super(); - } - // ino.end - - // ino.method.CSubstitutionSet.27478.definition - public CSubstitutionSet(Vector unifiers) - throws CTypeReconstructionException - // ino.end - // ino.method.CSubstitutionSet.27478.body - { - super(); - for(int i=0; i substIter = this.getIterator(); - while(substIter.hasNext()){ - copy.addElement(substIter.next().clone()); - } - return copy; - } - // ino.end - - // ino.method.applyUnifier.27487.defdescription type=javadoc - /** - * Wendet den Unifier auf die rechten Seiten alle Substitutionen an. - *
Author: J�rg B�uerle - * @param unifier - */ - // ino.end - // ino.method.applyUnifier.27487.definition - public void applyUnifier(CSubstitutionSet unifier) - // ino.end - // ino.method.applyUnifier.27487.body - { - Iterator substIt = this.getIterator(); - - while(substIt.hasNext()){ - substIt.next().applyUnifier(unifier); - } - } - // ino.end - - // ino.method.applyThisSubstitutionSet.27490.definition - public Type applyThisSubstitutionSet(Type type) - // ino.end - // ino.method.applyThisSubstitutionSet.27490.body - { - Iterator substIt = this.getIterator(); - Type ty = type; - - while(substIt.hasNext()) { - ty = substIt.next().applyThisSubstitution(ty); - } - return ty; - } - // ino.end - - // ino.method.execute.27493.defdescription type=javadoc - /** - * F�hrt jede einzelne CSubstitution aus. - *
Author: J�rg B�uerle - * @throws CTypeReconstructionException Falls TypePlaceholder nicht in Registry - * gefunden wird. - */ - // ino.end - // ino.method.execute.27493.definition - public void execute() - throws CTypeReconstructionException - // ino.end - // ino.method.execute.27493.body - { - Iterator substIt = this.getIterator(); - - while(substIt.hasNext()){ - substIt.next().execute(); - } - } - // ino.end - - public Iterator iterator() { - return this.getIterator(); - } -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/CTripleSet.java b/src/mycompiler/mytypereconstruction/set/CTripleSet.java deleted file mode 100755 index 6bc86b403..000000000 --- a/src/mycompiler/mytypereconstruction/set/CTripleSet.java +++ /dev/null @@ -1,60 +0,0 @@ -// ino.module.CTripleSet.8700.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.module.CTripleSet.8700.import -import java.util.Iterator; -import java.util.Vector; -import mycompiler.mytypereconstruction.CTriple; -// ino.end - -// ino.class.CTripleSet.27496.description type=javadoc -/** - * Enthält Objekte vom Typ CTriple - * (Ist im Grunde ein CVectorSet) - * Es enthält alle Typannahmen in Form von CTriple s - * @see CTriple - * @author J�rg B�uerle - * @version $Date: 2013/03/27 18:29:34 $ - */ -// ino.end -// ino.class.CTripleSet.27496.declaration -public class CTripleSet extends CVectorSet -// ino.end -// ino.class.CTripleSet.27496.body -{ - - // ino.method.shallowCopy.27500.definition - public CTripleSet shallowCopy() - // ino.end - // ino.method.shallowCopy.27500.body - { - CTripleSet copy = new CTripleSet(); - copy.setVector((Vector)this.getVector().clone()); - return copy; - } - // ino.end - - /** - * Diese Funktion kopiert nicht nur das VectorSet, sondern auch alle enthaltenen CTriple-Sets. - * Dadurch wirken sich Modifizierungen an den enthaltenen Elementen nicht auf die Kopie aus. - */ - // ino.method.deepCopy.27503.definition - public CTripleSet deepCopy() - // ino.end - // ino.method.deepCopy.27503.body - { - CTripleSet copy = new CTripleSet(); - Iterator it = this.getIterator(); - while(it.hasNext()){ - copy.addElement(it.next().clone()); - } - return copy; - } - // ino.end - - public Iterator iterator() { - return this.getIterator(); - } -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/CTypeAssumptionSet.java b/src/mycompiler/mytypereconstruction/set/CTypeAssumptionSet.java deleted file mode 100755 index af930103e..000000000 --- a/src/mycompiler/mytypereconstruction/set/CTypeAssumptionSet.java +++ /dev/null @@ -1,67 +0,0 @@ -// ino.module.CTypeAssumptionSet.8701.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.module.CTypeAssumptionSet.8701.import -import java.util.Hashtable; -import java.util.Iterator; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -// ino.end - -// ino.class.CTypeAssumptionSet.27506.description type=javadoc -/** - * @author Jrg Buerle - * @version $Date: 2013/06/18 05:18:59 $ - */ -// ino.end -// ino.class.CTypeAssumptionSet.27506.declaration -public class CTypeAssumptionSet extends CHashtableSet -// ino.end -// ino.class.CTypeAssumptionSet.27506.body -{ - - // ino.method.sub.27510.definition - public void sub(CSubstitutionSet subtitutions) - // ino.end - // ino.method.sub.27510.body - { - Iterator it = this.getIterator(); - while(it.hasNext()){ - it.next().sub(subtitutions); - } - } - // ino.end - - // ino.method.shallowCopy.27513.definition - public CTypeAssumptionSet shallowCopy() - // ino.end - // ino.method.shallowCopy.27513.body - { - CTypeAssumptionSet copy = new CTypeAssumptionSet(); - copy.setHashtable((Hashtable)this.getHashtable().clone()); - return copy; - } - // ino.end - - // ino.method.deepCopy.27516.definition - public CTypeAssumptionSet deepCopy() - // ino.end - // ino.method.deepCopy.27516.body - { - CTypeAssumptionSet copy = new CTypeAssumptionSet(); - Iterator assumIter = this.getHashtable().values().iterator(); - while(assumIter.hasNext()){ - CTypeAssumption actualAssum=assumIter.next(); - CTypeAssumption clonedObject=actualAssum.clone(); - copy.addElement(clonedObject); - } - return copy; - } - // ino.end - - public Iterator iterator() { - return this.getIterator(); - } - -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/CVectorSet.java b/src/mycompiler/mytypereconstruction/set/CVectorSet.java deleted file mode 100755 index c9bf78d01..000000000 --- a/src/mycompiler/mytypereconstruction/set/CVectorSet.java +++ /dev/null @@ -1,165 +0,0 @@ -// ino.module.CVectorSet.8702.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.module.CVectorSet.8702.import -import java.util.Iterator; -import java.util.Vector; -// ino.end - -// ino.class.CVectorSet.27519.description type=javadoc -/** - * @author J�rg B�uerle - * @version $Date: 2013/02/07 05:08:51 $ - */ -// ino.end -// ino.class.CVectorSet.27519.declaration -public abstract class CVectorSet extends CSet -// ino.end -// ino.class.CVectorSet.27519.body -{ - // ino.attribute.m_Elements.27523.declaration - private Vector m_Elements = null; - // ino.end - - // ino.method.CVectorSet.27526.definition - public CVectorSet() - // ino.end - // ino.method.CVectorSet.27526.body - { - m_Elements = new Vector(); - } - // ino.end - - // ino.method.addElement.27529.definition - public void addElement(E element) - // ino.end - // ino.method.addElement.27529.body - { - m_Elements.addElement(element); - } - // ino.end - - // ino.method.removeElement.27532.definition - public void removeElement(E element) - // ino.end - // ino.method.removeElement.27532.body - { - m_Elements.addElement(element); - } - // ino.end - - public void addAll( CVectorSet set ) - { - for( int i=0;i getIterator() - // ino.end - // ino.method.getIterator.27535.body - { - return m_Elements.iterator(); - } - // ino.end - - // ino.method.getVector.27538.definition - public Vector getVector() - // ino.end - // ino.method.getVector.27538.body - { - return m_Elements; - } - // ino.end - - // ino.method.setVector.27541.definition - public void setVector(Vector elements) - // ino.end - // ino.method.setVector.27541.body - { - m_Elements = elements; - } - // ino.end - - /** - * Fügt ein CVectorSet an! - * Es handelt sich um eine Vereinigung (es werden keine bereits vorhandenen Elemente übernommen) - * @param anotherSet Das hinzuzufügende CVectorSet (CSet wird ignoriert) - */ - // ino.method.unite.27544.definition - public void unite(CSet anotherSet) - // ino.end - // ino.method.unite.27544.body - { - if(!(anotherSet instanceof CVectorSet)){ - return; - } - CVectorSet vectorSet = (CVectorSet)anotherSet; - - // Elemente der anderen Menge hinzuf�gen: - Iterator it = vectorSet.getIterator(); - while(it.hasNext()){ - E elem = it.next(); - if(!m_Elements.contains(elem)){ - m_Elements.addElement(elem); - } - } - //m_Elements.addAll(vectorSet.m_Elements); - } - // ino.end - - // ino.method.subtract.27547.definition - public void subtract(CSet anotherSet) - // ino.end - // ino.method.subtract.27547.body - { - if(!(anotherSet instanceof CVectorSet)){ - return; - } - CVectorSet vectorSet = (CVectorSet)anotherSet; - - // Elemente der anderen Menge entfernen: - m_Elements.removeAll(vectorSet.m_Elements); - } - // ino.end - - // ino.method.contains.27550.definition - public boolean contains(E element) - // ino.end - // ino.method.contains.27550.body - { - return m_Elements.contains(element); - } - // ino.end - - // ino.method.equals.27553.definition - public boolean equals(Object obj) - // ino.end - // ino.method.equals.27553.body - { - if(obj instanceof CVectorSet){ - CVectorSet tripSet= (CVectorSet)obj; - boolean ret = true; - ret &= (m_Elements.containsAll(tripSet.m_Elements)); - ret &= (tripSet.m_Elements.containsAll(m_Elements)); - return ret; - } - else{ - return false; - } - } - // ino.end - - // ino.method.getCardinality.27556.definition - public int getCardinality() - // ino.end - // ino.method.getCardinality.27556.body - { - return m_Elements.size(); - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/IHashSetElement.java b/src/mycompiler/mytypereconstruction/set/IHashSetElement.java deleted file mode 100755 index c37140c66..000000000 --- a/src/mycompiler/mytypereconstruction/set/IHashSetElement.java +++ /dev/null @@ -1,24 +0,0 @@ -// ino.module.IHashSetElement.8703.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.class.IHashSetElement.27559.description type=javadoc -/** - * - * @author Jrg Buerle - * @version $date - */ -// ino.end -// ino.class.IHashSetElement.27559.declaration -public interface IHashSetElement -// ino.end -// ino.class.IHashSetElement.27559.body -{ - // ino.method.getHashSetKey.27562.declaration - public IHashSetKey getHashSetKey(); - // ino.end - // ino.method.updateHashSetKey.27565.declaration - public void updateHashSetKey(IHashSetKey key); - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/IHashSetKey.java b/src/mycompiler/mytypereconstruction/set/IHashSetKey.java deleted file mode 100755 index b1990b8e4..000000000 --- a/src/mycompiler/mytypereconstruction/set/IHashSetKey.java +++ /dev/null @@ -1,19 +0,0 @@ -// ino.module.IHashSetKey.8704.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.class.IHashSetKey.27568.description type=javadoc -/** - * - * @author Jörg Bäuerle - * @version $date - */ -// ino.end -// ino.class.IHashSetKey.27568.declaration -public interface IHashSetKey -// ino.end -// ino.class.IHashSetKey.27568.body -{ - -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumption/CInstVarTypeAssumption.java b/src/mycompiler/mytypereconstruction/typeassumption/CInstVarTypeAssumption.java deleted file mode 100755 index 408b4049a..000000000 --- a/src/mycompiler/mytypereconstruction/typeassumption/CInstVarTypeAssumption.java +++ /dev/null @@ -1,99 +0,0 @@ -// ino.module.CInstVarTypeAssumption.8706.package -package mycompiler.mytypereconstruction.typeassumption; -// ino.end - -// ino.module.CInstVarTypeAssumption.8706.import -import java.util.Vector; - -import de.dhbwstuttgart.syntaxtree.type.Type; -import mycompiler.mytypereconstruction.set.IHashSetKey; -import mycompiler.mytypereconstruction.typeassumptionkey.CInstVarKey; -// ino.end - -// ino.class.CInstVarTypeAssumption.27572.description type=javadoc -/** - * @author Jrg Buerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CInstVarTypeAssumption.27572.declaration -public class CInstVarTypeAssumption extends CTypeAssumption -// ino.end -// ino.class.CInstVarTypeAssumption.27572.body -{ - - // ino.attribute.hashSetKey.27576.declaration - private CInstVarKey hashSetKey; - // ino.end - - - // ino.method.CInstVarTypeAssumption.27579.definition - public CInstVarTypeAssumption(String className, String identifier, Type type, int lineNumber,int offset, Vector Offsetvektor) - // ino.end - // ino.method.CInstVarTypeAssumption.27579.body - { - super(className, identifier, type, lineNumber,offset,Offsetvektor); - } - // ino.end - - // ino.method.getHashSetKey.27582.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * @return - */ - // ino.end - // ino.method.getHashSetKey.27582.definition - public CInstVarKey getHashSetKey() - // ino.end - // ino.method.getHashSetKey.27582.body - { - if(hashSetKey==null){ - this.hashSetKey=new CInstVarKey(m_ClassName, m_Identifier); - } - return hashSetKey; - } - // ino.end - - // ino.method.equalsAssumption.27585.defdescription type=javadoc - /** - *
Author: Jrg Buerle - * @param assumption - * @return - */ - // ino.end - // ino.method.equalsAssumption.27585.definition - public boolean equalsAssumption(CTypeAssumption assumption) - // ino.end - // ino.method.equalsAssumption.27585.body - { - if(assumption instanceof CInstVarTypeAssumption){ - return true; - } - else{ - return false; - } - } - // ino.end - - // ino.method.clone.27588.definition - public CInstVarTypeAssumption clone() - // ino.end - // ino.method.clone.27588.body - { - CInstVarTypeAssumption copy = new CInstVarTypeAssumption(m_ClassName, m_Identifier, m_AssumedType.clone(), m_LineNumber,m_Offset,m_OffsetVector); - return copy; - } - // ino.end - - // ino.method.updateHashSetKey.27591.definition - public void updateHashSetKey(IHashSetKey key) - // ino.end - // ino.method.updateHashSetKey.27591.body - { - this.hashSetKey=(CInstVarKey)key; - - } - // ino.end - -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumption/CLocalVarTypeAssumption.java b/src/mycompiler/mytypereconstruction/typeassumption/CLocalVarTypeAssumption.java deleted file mode 100755 index a24086392..000000000 --- a/src/mycompiler/mytypereconstruction/typeassumption/CLocalVarTypeAssumption.java +++ /dev/null @@ -1,179 +0,0 @@ -// ino.module.CLocalVarTypeAssumption.8707.package -package mycompiler.mytypereconstruction.typeassumption; -// ino.end - -// ino.module.CLocalVarTypeAssumption.8707.import -import java.util.Vector; - -import de.dhbwstuttgart.syntaxtree.type.Type; -import mycompiler.mytypereconstruction.set.IHashSetKey; -import mycompiler.mytypereconstruction.typeassumptionkey.CLocalVarKey; -// ino.end - -// ino.class.CLocalVarTypeAssumption.27594.description type=javadoc -/** - * @author Jrg Buerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CLocalVarTypeAssumption.27594.declaration -public class CLocalVarTypeAssumption extends CTypeAssumption -// ino.end -// ino.class.CLocalVarTypeAssumption.27594.body -{ - // ino.attribute.m_MethodName.27598.declaration - protected String m_MethodName; - // ino.end - // ino.attribute.m_MethodParaCount.27601.declaration - protected int m_MethodParaCount; - // ino.end - // ino.attribute.m_BlockId.27604.declaration - protected String m_BlockId; - // ino.end - // ino.attribute.hashSetKey.27607.declaration - private CLocalVarKey hashSetKey; - // ino.end - // ino.attribute.m_methodOverloadedID.27610.declaration - private int m_methodOverloadedID; - // ino.end - - // ino.method.CLocalVarTypeAssumption.27613.definition - public CLocalVarTypeAssumption(String className, String methodName, int methodParaCount, int methodOverloadedID, String blockId, String identifier, Type assumedType, int lineNumber,int offset, Vector Offsetvektor) - // ino.end - // ino.method.CLocalVarTypeAssumption.27613.body - { - super(className, identifier, assumedType, lineNumber,offset,Offsetvektor); - m_MethodName = methodName; - m_MethodParaCount = methodParaCount; - m_BlockId = blockId; - m_methodOverloadedID=methodOverloadedID; - - } - // ino.end - - // ino.method.getMethodOverloadedID.27616.definition - public int getMethodOverloadedID() - // ino.end - // ino.method.getMethodOverloadedID.27616.body - { - return m_methodOverloadedID; - } - // ino.end - - // ino.method.getMethodName.27619.definition - public String getMethodName() - // ino.end - // ino.method.getMethodName.27619.body - { - return m_MethodName; - } - // ino.end - - // ino.method.setMethodName.27622.definition - public void setMethodName(String methodName) - // ino.end - // ino.method.setMethodName.27622.body - { - m_MethodName = methodName; - } - // ino.end - - // ino.method.getMethodParaCount.27625.definition - public int getMethodParaCount() - // ino.end - // ino.method.getMethodParaCount.27625.body - { - return m_MethodParaCount; - } - // ino.end - - // ino.method.setMethodParaCount.27628.definition - public void setMethodParaCount(int methodParaCount) - // ino.end - // ino.method.setMethodParaCount.27628.body - { - m_MethodParaCount = methodParaCount; - } - // ino.end - - // ino.method.getBlockId.27631.definition - public String getBlockId() - // ino.end - // ino.method.getBlockId.27631.body - { - return m_BlockId; - } - // ino.end - - // ino.method.setBlockId.27634.definition - public void setBlockId(String blockId) - // ino.end - // ino.method.setBlockId.27634.body - { - m_BlockId = blockId; - } - // ino.end - - // ino.method.getHashSetKey.27637.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * @return - */ - // ino.end - // ino.method.getHashSetKey.27637.definition - public CLocalVarKey getHashSetKey() - // ino.end - // ino.method.getHashSetKey.27637.body - { - if(hashSetKey==null){ - hashSetKey=new CLocalVarKey(m_ClassName, m_MethodName, m_MethodParaCount, m_methodOverloadedID, m_BlockId, m_Identifier); - } - return hashSetKey; - } - // ino.end - - // ino.method.equalsAssumption.27640.defdescription type=javadoc - /** - *
Author: Jrg Buerle - * @param assumption - * @return - */ - // ino.end - // ino.method.equalsAssumption.27640.definition - public boolean equalsAssumption(CTypeAssumption assumption) - // ino.end - // ino.method.equalsAssumption.27640.body - { - if(assumption instanceof CLocalVarTypeAssumption){ - CLocalVarTypeAssumption assum = (CLocalVarTypeAssumption)assumption; - boolean ret = true; - ret &= m_MethodName.equals(assum.getMethodName()); - ret &= m_MethodParaCount == assum.getMethodParaCount(); - ret &= m_BlockId == assum.getBlockId(); - return ret; - } - else{ - return false; - } - } - // ino.end - - // ino.method.clone.27643.definition - public CLocalVarTypeAssumption clone() - // ino.end - // ino.method.clone.27643.body - { - CLocalVarTypeAssumption copy = new CLocalVarTypeAssumption(m_ClassName, m_MethodName, m_MethodParaCount, m_methodOverloadedID, m_BlockId, m_Identifier, m_AssumedType.clone(), m_LineNumber,m_Offset,m_OffsetVector); - return copy; - } - // ino.end - // ino.method.updateHashSetKey.27646.definition - public void updateHashSetKey(IHashSetKey key) - // ino.end - // ino.method.updateHashSetKey.27646.body - { - this.hashSetKey=(CLocalVarKey)key; - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumption/CMethodTypeAssumption.java b/src/mycompiler/mytypereconstruction/typeassumption/CMethodTypeAssumption.java deleted file mode 100755 index 189c00e21..000000000 --- a/src/mycompiler/mytypereconstruction/typeassumption/CMethodTypeAssumption.java +++ /dev/null @@ -1,251 +0,0 @@ -// ino.module.CMethodTypeAssumption.8708.package -package mycompiler.mytypereconstruction.typeassumption; -// ino.end - -// ino.module.CMethodTypeAssumption.8708.import -import java.util.Iterator; -import java.util.Vector; - -import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Type; -import mycompiler.mytypereconstruction.CSubstitution; -import mycompiler.mytypereconstruction.set.IHashSetKey; -import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; -// ino.end - -// ino.class.CMethodTypeAssumption.27649.description type=javadoc -/** - * @author Jrg Buerle - * @version $Date: 2013/07/28 17:05:44 $ - */ -// ino.end -// ino.class.CMethodTypeAssumption.27649.declaration -public class CMethodTypeAssumption extends CTypeAssumption -// ino.end -// ino.class.CMethodTypeAssumption.27649.body -{ - /** - * classType enthält den Typ der Klasse, zu welcher die Methode gehört - */ - private Type classType; - - // ino.attribute.m_ParaAssumptions.27653.declaration - protected Vector m_ParaAssumptions = null; - // ino.end - // ino.attribute.hashSetKey.27656.declaration - private CMethodKey hashSetKey; - // ino.end - // ino.attribute.m_overloadedMethodID.27659.declaration - private int m_overloadedMethodID; - // ino.end - // ino.attribute.parameterCount.27662.declaration - private int parameterCount; - // ino.end - // ino.attribute.genericMethodParameters.27665.declaration - private Vector genericMethodParameters=new Vector(); - // ino.end - - // ino.method.CMethodTypeAssumption.27668.definition - public CMethodTypeAssumption(Type classType, String identifier, Type assumedType, int parameterCount, int lineNumber,int offset, Vector Offsetvektor, Vector genericMethodParameters) - // ino.end - // ino.method.CMethodTypeAssumption.27668.body - { - super(classType.get_Name(), identifier, assumedType, lineNumber,offset,Offsetvektor); - if(genericMethodParameters!=null) - this.genericMethodParameters=genericMethodParameters; - this.parameterCount=parameterCount; - m_ParaAssumptions = new Vector(); - this.classType = classType; - } - // ino.end - - // ino.method.getParaCount.27671.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * @return Returns the ParaCount. - */ - // ino.end - // ino.method.getParaCount.27671.definition - public int getParaCount() - // ino.end - // ino.method.getParaCount.27671.body - { - return parameterCount; - } - // ino.end - - // ino.method.getGenericMethodParameters.27674.definition - public Vector getGenericMethodParameters() - // ino.end - // ino.method.getGenericMethodParameters.27674.body - { - return genericMethodParameters; - } - // ino.end - - // ino.method.addParaAssumption.27677.definition - public void addParaAssumption(CParaTypeAssumption paraAssumption) - // ino.end - // ino.method.addParaAssumption.27677.body - { - m_ParaAssumptions.addElement(paraAssumption); - parameterCount=m_ParaAssumptions.size(); - } - // ino.end - - // ino.method.getParaAssumption.27680.definition - public CParaTypeAssumption getParaAssumption(int index) - // ino.end - // ino.method.getParaAssumption.27680.body - { - return m_ParaAssumptions.elementAt(index); - } - // ino.end - - // ino.method.getParaAssumptions.27683.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * @return Returns the m_ParaAssumptions. - */ - // ino.end - // ino.method.getParaAssumptions.27683.definition - public Vector getParaAssumptions() - // ino.end - // ino.method.getParaAssumptions.27683.body - { - return m_ParaAssumptions; - } - // ino.end - - // ino.method.sub.27686.definition - public void sub(CSubstitution substitution) - // ino.end - // ino.method.sub.27686.body - { - super.sub(substitution); - for(int i=0; iAuthor: Jrg Buerle - * @param assumption - * @return - */ - // ino.end - // ino.method.equalsAssumption.27689.definition - public boolean equalsAssumption(CTypeAssumption assumption) - // ino.end - // ino.method.equalsAssumption.27689.body - { - if(assumption instanceof CMethodTypeAssumption){ - CMethodTypeAssumption assum = (CMethodTypeAssumption)assumption; - boolean ret = true; - ret &= (this.getParaCount() == assum.getParaCount()); - for(int i=0; i it = m_ParaAssumptions.iterator(); - while(it.hasNext()){ - sb.append(it.next().getAssumedType().getName()); - sb.append(" * "); - } - sb.delete(sb.length()-3,sb.length()); - } - else { - sb.append("NOPARAS"); - } - sb.append(" --> "); - if(this.getAssumedType()!=null)sb.append(this.getAssumedType().toString()); - return sb.toString(); - } - // ino.end - - // ino.method.getHashSetKey.27695.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * @return - */ - // ino.end - // ino.method.getHashSetKey.27695.definition - public CMethodKey getHashSetKey() - // ino.end - // ino.method.getHashSetKey.27695.body - { - if(hashSetKey==null){ - this.hashSetKey=new CMethodKey(m_ClassName, m_Identifier, this.getParaCount(),this.getOverloadedMethodID()); - } - return(hashSetKey); - } - // ino.end - - // ino.method.getOverloadedMethodID.27698.definition - public int getOverloadedMethodID() - // ino.end - // ino.method.getOverloadedMethodID.27698.body - { - return(m_overloadedMethodID); - } - // ino.end - - // ino.method.clone.27701.defdescription type=javadoc - /** - *
Author: Jrg Buerle - * @return - */ - // ino.end - // ino.method.clone.27701.definition - public CMethodTypeAssumption clone() - // ino.end - // ino.method.clone.27701.body - { - CMethodTypeAssumption copy = new CMethodTypeAssumption(this.classType, m_Identifier, m_AssumedType.clone(), parameterCount,m_LineNumber,m_Offset,m_OffsetVector,genericMethodParameters); - for(int i=0; i Offsetvektor) - // ino.end - // ino.method.CParaTypeAssumption.27723.body - { - super(className, identifier, assumedType, lineNumber,offset,Offsetvektor); - m_MethodName = methodName; - m_MethodParaCount = methodParaCount; - m_methodOverloadedID=methodOverloadedID; - } - // ino.end - - // ino.method.getMethodName.27726.definition - public String getMethodName() - // ino.end - // ino.method.getMethodName.27726.body - { - return m_MethodName; - } - // ino.end - - // ino.method.setMethodName.27729.definition - public void setMethodName(String methodName) - // ino.end - // ino.method.setMethodName.27729.body - { - m_MethodName = methodName; - } - // ino.end - - // ino.method.getMethodParaCount.27732.definition - public int getMethodParaCount() - // ino.end - // ino.method.getMethodParaCount.27732.body - { - return m_MethodParaCount; - } - // ino.end - - // ino.method.setMethodParaCount.27735.definition - public void setMethodParaCount(int methodParaCount) - // ino.end - // ino.method.setMethodParaCount.27735.body - { - m_MethodParaCount = methodParaCount; - } - // ino.end - - // ino.method.getHashSetKey.27738.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * @return - */ - // ino.end - // ino.method.getHashSetKey.27738.definition - public CMethodParaKey getHashSetKey() - // ino.end - // ino.method.getHashSetKey.27738.body - { - if(hashSetKey==null){ - this.hashSetKey=new CMethodParaKey(m_ClassName, m_MethodName, m_MethodParaCount,m_methodOverloadedID, m_Identifier); - } - return(hashSetKey); - } - // ino.end - - // ino.method.equalsAssumption.27741.defdescription type=javadoc - /** - *
Author: Jrg Buerle - * @param assumption - * @return - */ - // ino.end - // ino.method.equalsAssumption.27741.definition - public boolean equalsAssumption(CTypeAssumption assumption) - // ino.end - // ino.method.equalsAssumption.27741.body - { - if(assumption instanceof CParaTypeAssumption){ - CParaTypeAssumption assum = (CParaTypeAssumption)assumption; - boolean ret = true; - ret &= m_MethodName.equals(assum.getMethodName()); - ret &= m_MethodParaCount == assum.getMethodParaCount(); - return ret; - } - else{ - return false; - } - } - // ino.end - - // ino.method.clone.27744.defdescription type=javadoc - /** - *
Author: Jrg Buerle - * @return - */ - // ino.end - // ino.method.clone.27744.definition - public CParaTypeAssumption clone() - // ino.end - // ino.method.clone.27744.body - { - CParaTypeAssumption copy = new CParaTypeAssumption(m_ClassName, m_MethodName, m_MethodParaCount, m_methodOverloadedID, m_Identifier, m_AssumedType.clone(), m_LineNumber, m_Offset,m_OffsetVector); - return copy; - } - // ino.end - - // ino.method.updateHashSetKey.27747.definition - public void updateHashSetKey(IHashSetKey key) - // ino.end - // ino.method.updateHashSetKey.27747.body - { - hashSetKey=(CMethodParaKey)key; - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumption/CTypeAssumption.java b/src/mycompiler/mytypereconstruction/typeassumption/CTypeAssumption.java deleted file mode 100755 index d9e0436be..000000000 --- a/src/mycompiler/mytypereconstruction/typeassumption/CTypeAssumption.java +++ /dev/null @@ -1,254 +0,0 @@ -// ino.module.CTypeAssumption.8710.package -package mycompiler.mytypereconstruction.typeassumption; -// ino.end - -// ino.module.CTypeAssumption.8710.import -import java.util.Iterator; -import java.util.Vector; - -import de.dhbwstuttgart.syntaxtree.type.Type; -import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; -import mycompiler.mytypereconstruction.CSubstitution; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.IHashSetElement; -import mycompiler.mytypereconstruction.typeassumptionkey.CTypeAssumptionKey; -// ino.end - -// ino.class.CTypeAssumption.27750.description type=javadoc -/** - * Diese Klasse repr�sentiert eine Typannahme und bildet einen - * Bezeichner innerhalb einer bestimmten Klasse auf einen angenommenen - * Typ ab.
- * Die von dieser Klasse abgeleiteten Subklassen stehen f�r bestimmte - * Typannahmen des abstrakten Syntaxbaumes, wie z.B. f�r Felder, Methoden, - * lokale Variablen, etc. - * @author J�rg B�uerle - * @version $Date: 2006/07/10 11:27:04 $ - */ -// ino.end -// ino.class.CTypeAssumption.27750.declaration -public abstract class CTypeAssumption implements IHashSetElement -// ino.end -// ino.class.CTypeAssumption.27750.body -{ - // ino.attribute.m_ClassName.27754.declaration - protected String m_ClassName; - // ino.end - // ino.attribute.m_Identifier.27757.declaration - protected String m_Identifier; - // ino.end - // ino.attribute.m_AssumedType.27760.declaration - protected Type m_AssumedType; - // ino.end - // ino.attribute.m_LineNumber.27763.declaration - protected int m_LineNumber; - // ino.end - // ino.attribute.m_Offset.27766.declaration - protected int m_Offset; - // ino.end - // ino.attribute.m_OffsetVector.27769.declaration - protected Vector m_OffsetVector; - // ino.end - - // ino.method.CTypeAssumption.27772.definition - public CTypeAssumption(String className, String identifier, Type assumedType, int lineNumber, int offset, Vector OffsetVektor) - // ino.end - // ino.method.CTypeAssumption.27772.body - { - m_ClassName = className; - m_Identifier = identifier; - m_AssumedType = assumedType; - m_LineNumber = lineNumber; - m_Offset = offset; - m_OffsetVector = OffsetVektor; - } - // ino.end - - // ino.method.getClassName.27775.definition - public String getClassName() - // ino.end - // ino.method.getClassName.27775.body - { - return m_ClassName; - } - // ino.end - - // ino.method.setClassName.27778.definition - public void setClassName(String className) - // ino.end - // ino.method.setClassName.27778.body - { - m_ClassName = className; - } - // ino.end - - // ino.method.getIdentifier.27781.definition - public String getIdentifier() - // ino.end - // ino.method.getIdentifier.27781.body - { - return m_Identifier; - } - // ino.end - - // ino.method.setIdentifier.27784.definition - public void setIdentifier(String identifier) - // ino.end - // ino.method.setIdentifier.27784.body - { - m_Identifier = identifier; - } - // ino.end - - // ino.method.getAssumedType.27787.definition - public Type getAssumedType() - // ino.end - // ino.method.getAssumedType.27787.body - { - return m_AssumedType; - } - // ino.end - - // ino.method.setAssumedType.27790.definition - public void setAssumedType(Type assumedType) - // ino.end - // ino.method.setAssumedType.27790.body - { - m_AssumedType = assumedType; - } - // ino.end - - // ino.method.getLineNumber.27793.definition - public int getLineNumber() - // ino.end - // ino.method.getLineNumber.27793.body - { - return m_LineNumber; - } - // ino.end - - // ino.method.setLineNumber.27796.definition - public void setLineNumber(int lineNumber) - // ino.end - // ino.method.setLineNumber.27796.body - { - m_LineNumber = lineNumber; - } - // ino.end - - // ino.method.getOffset.27799.definition - public int getOffset() - // ino.end - // ino.method.getOffset.27799.body - { - return m_Offset; - } - // ino.end - - // ino.method.addOffset.27802.definition - public void addOffset(int i) - // ino.end - // ino.method.addOffset.27802.body - { - m_OffsetVector.addElement(new Integer(i)); - } - // ino.end - - // ino.method.getOffsetVector.27805.definition - public Vector getOffsetVector() - // ino.end - // ino.method.getOffsetVector.27805.body - { - return m_OffsetVector; - } - // ino.end - - // ino.method.setOffset.27808.definition - public void setOffset(int Offset) - // ino.end - // ino.method.setOffset.27808.body - { - m_Offset = Offset; - } - // ino.end - - - // ino.method.sub.27811.definition - public void sub(CSubstitutionSet substitutionSet) - // ino.end - // ino.method.sub.27811.body - { - Iterator it = substitutionSet.getIterator(); - while(it.hasNext()){ - this.sub(it.next()); - } - } - // ino.end - - // ino.method.sub.27814.definition - public void sub(CSubstitution substitution) - // ino.end - // ino.method.sub.27814.body - { - //PL 05-08-25 hier muessen TypePlaceholder-Variablen auch erstezt werden, - //wenn sie als Subvariablen in typen vorkommen. - //if(m_AssumedType.equals(substitution.getTypeVar())){ - // m_AssumedType = substitution.getType(); - // System.out.println(); - m_AssumedType = substitution.applyThisSubstitution(m_AssumedType); - - } - // ino.end - - // ino.method.toString.27817.definition - public String toString() - // ino.end - // ino.method.toString.27817.body - { - return m_Identifier +": "+m_AssumedType.toString(); - //return m_Identifier +": "+m_AssumedType.getName(); - } - // ino.end - - // ino.method.equals.27820.definition - public final boolean equals(Object obj) - // ino.end - // ino.method.equals.27820.body - { - if(obj instanceof CTypeAssumption){ - CTypeAssumption assum = (CTypeAssumption)obj; - boolean ret = true; - ret &= m_ClassName.equals(assum.getClassName()); - ret &= m_Identifier.equals(assum.getIdentifier()); - ret &= m_AssumedType.equals(assum.getAssumedType()); - ret &= m_LineNumber==assum.getLineNumber(); - ret &= this.equalsAssumption(assum); - return ret; - } - else{ - return false; - } - } - // ino.end - - // ino.method.isPlaceholderVariable.27823.definition - public boolean isPlaceholderVariable() - // ino.end - // ino.method.isPlaceholderVariable.27823.body - { - return (m_AssumedType instanceof TypePlaceholder); - } - // ino.end - - // ino.method.equalsAssumption.27826.declaration - public abstract boolean equalsAssumption(CTypeAssumption assumption); - // ino.end - // ino.method.clone.27829.declaration - public abstract CTypeAssumption clone(); - // ino.end - // ino.method.getHashSetKey.27832.declaration - public abstract CTypeAssumptionKey getHashSetKey(); - // ino.end - -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumptionkey/CInstVarKey.java b/src/mycompiler/mytypereconstruction/typeassumptionkey/CInstVarKey.java deleted file mode 100755 index e9794c3c7..000000000 --- a/src/mycompiler/mytypereconstruction/typeassumptionkey/CInstVarKey.java +++ /dev/null @@ -1,37 +0,0 @@ -// ino.module.CInstVarKey.8712.package -package mycompiler.mytypereconstruction.typeassumptionkey; -// ino.end - -// ino.class.CInstVarKey.27836.description type=javadoc -/** - * @author Jörg Bäuerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CInstVarKey.27836.declaration -public class CInstVarKey extends CTypeAssumptionKey -// ino.end -// ino.class.CInstVarKey.27836.body -{ - // ino.attribute.KEYPREFIX.27840.declaration - public static String KEYPREFIX = "InstVar"; - // ino.end - - // ino.method.CInstVarKey.27843.definition - public CInstVarKey(String className, String identifier) - // ino.end - // ino.method.CInstVarKey.27843.body - { - StringBuffer key = new StringBuffer(); - - key.append(KEYPREFIX); - key.append("#"); - key.append(className); - key.append("."); - key.append(identifier); - - m_KeyString = key.toString(); - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumptionkey/CLocalVarKey.java b/src/mycompiler/mytypereconstruction/typeassumptionkey/CLocalVarKey.java deleted file mode 100755 index 7b0f7e4a8..000000000 --- a/src/mycompiler/mytypereconstruction/typeassumptionkey/CLocalVarKey.java +++ /dev/null @@ -1,131 +0,0 @@ -// ino.module.CLocalVarKey.8713.package -package mycompiler.mytypereconstruction.typeassumptionkey; -// ino.end - - -// ino.class.CLocalVarKey.27846.description type=javadoc -/** - * @author Jrg Buerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CLocalVarKey.27846.declaration -public class CLocalVarKey extends CTypeAssumptionKey implements IMethodBoundKey -// ino.end -// ino.class.CLocalVarKey.27846.body -{ - // ino.attribute.KEYPREFIX.27851.declaration - public static String KEYPREFIX = "LocalVar"; - // ino.end - - // ino.attribute.className.27854.declaration - String className; - // ino.end - // ino.attribute.methodName.27857.declaration - String methodName; - // ino.end - // ino.attribute.methodParaCount.27860.declaration - int methodParaCount; - // ino.end - // ino.attribute.blockId.27863.declaration - String blockId; - // ino.end - // ino.attribute.identifier.27866.declaration - String identifier; - // ino.end - // ino.attribute.overloadedMethodID.27869.declaration - int overloadedMethodID; - // ino.end - - // ino.attribute.isOverloadedInitialized.27872.declaration - private boolean isOverloadedInitialized=true; - // ino.end - - - // ino.method.CLocalVarKey.27875.definition - public CLocalVarKey(String className, String methodName, int methodParaCount, String blockId, String identifier) - // ino.end - // ino.method.CLocalVarKey.27875.body - { - this(className,methodName,methodParaCount,0,blockId,identifier); - isOverloadedInitialized=false; - } - // ino.end - - - // ino.method.CLocalVarKey.27878.definition - public CLocalVarKey(String className, String methodName, int methodParaCount, int overloadedMethodID, String blockId, String identifier) - // ino.end - // ino.method.CLocalVarKey.27878.body - { - - this.className=className; - this.methodName=methodName; - this.methodParaCount=methodParaCount; - this.blockId=blockId; - this.identifier=identifier; - this.overloadedMethodID=overloadedMethodID; - - StringBuffer key = new StringBuffer(); - - key.append(KEYPREFIX); - key.append("#"); - key.append(className); - key.append("."); - key.append(methodName); - key.append("("); - key.append(methodParaCount); - key.append(";"); - key.append(overloadedMethodID); - key.append(")"); - key.append("."); - key.append("Block_"); - key.append(blockId); - key.append("."); - key.append(identifier); - - m_KeyString = key.toString(); - } - // ino.end - - - // ino.method.getNextMethodKey.27881.definition - public CLocalVarKey getNextMethodKey() - // ino.end - // ino.method.getNextMethodKey.27881.body - { - return(new CLocalVarKey(className,methodName,methodParaCount,overloadedMethodID+1,blockId,identifier)); - } - // ino.end - - - // ino.method.getFirstMethodKey.27884.definition - public CLocalVarKey getFirstMethodKey() - // ino.end - // ino.method.getFirstMethodKey.27884.body - { - return(new CLocalVarKey(className,methodName,methodParaCount,blockId,identifier)); - } - // ino.end - - - // ino.method.getOverloadedMethodID.27887.definition - public int getOverloadedMethodID() - // ino.end - // ino.method.getOverloadedMethodID.27887.body - { - return overloadedMethodID; - } - // ino.end - - - // ino.method.isOverloadedIDSet.27890.definition - public boolean isOverloadedIDSet() - // ino.end - // ino.method.isOverloadedIDSet.27890.body - { - return isOverloadedInitialized; - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumptionkey/CMethodKey.java b/src/mycompiler/mytypereconstruction/typeassumptionkey/CMethodKey.java deleted file mode 100755 index cedd57b67..000000000 --- a/src/mycompiler/mytypereconstruction/typeassumptionkey/CMethodKey.java +++ /dev/null @@ -1,112 +0,0 @@ -// ino.module.CMethodKey.8714.package -package mycompiler.mytypereconstruction.typeassumptionkey; -// ino.end - -// ino.class.CMethodKey.27893.description type=javadoc -/** - * @author Jrg Buerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CMethodKey.27893.declaration -public class CMethodKey extends CTypeAssumptionKey implements IMethodBoundKey -// ino.end -// ino.class.CMethodKey.27893.body -{ - // ino.attribute.KEYPREFIX.27898.declaration - public static String KEYPREFIX = "Method"; - // ino.end - - - // ino.attribute.identifier.27901.declaration - private String identifier; - // ino.end - // ino.attribute.paraCount.27904.declaration - private int paraCount; - // ino.end - // ino.attribute.overloadedMethodID.27907.declaration - private int overloadedMethodID; - // ino.end - // ino.attribute.className.27910.declaration - private String className; - // ino.end - // ino.attribute.isOverloadedInitialized.27913.declaration - private boolean isOverloadedInitialized=true; - // ino.end - - // ino.method.CMethodKey.27916.definition - public CMethodKey(String className, String identifier, int paraCount) - // ino.end - // ino.method.CMethodKey.27916.body - { - this(className,identifier,paraCount,0); - isOverloadedInitialized=false; - } - // ino.end - - - // ino.method.CMethodKey.27919.definition - public CMethodKey(String className, String identifier, int paraCount, int overloadedMethodID) - // ino.end - // ino.method.CMethodKey.27919.body - { - - this.className=className; - this.identifier=identifier; - this.paraCount=paraCount; - this.overloadedMethodID=overloadedMethodID; - - StringBuffer key = new StringBuffer(); - - key.append(KEYPREFIX); - key.append("#"); - key.append(className); - key.append("."); - key.append(identifier); - key.append("("); - key.append(paraCount); - key.append(";"); - key.append(overloadedMethodID); - key.append(")"); - - m_KeyString = key.toString(); - } - // ino.end - - // ino.method.getNextMethodKey.27922.definition - public CMethodKey getNextMethodKey() - // ino.end - // ino.method.getNextMethodKey.27922.body - { - return(new CMethodKey(className,identifier, paraCount, overloadedMethodID+1)); - } - // ino.end - - // ino.method.getFirstMethodKey.27925.definition - public CMethodKey getFirstMethodKey() - // ino.end - // ino.method.getFirstMethodKey.27925.body - { - return(new CMethodKey(className,identifier, paraCount, 0)); - } - // ino.end - - // ino.method.getOverloadedMethodID.27928.definition - public int getOverloadedMethodID() - // ino.end - // ino.method.getOverloadedMethodID.27928.body - { - return overloadedMethodID; - } - // ino.end - - // ino.method.isOverloadedIDSet.27931.definition - public boolean isOverloadedIDSet() - // ino.end - // ino.method.isOverloadedIDSet.27931.body - { - return isOverloadedInitialized; - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumptionkey/CMethodParaKey.java b/src/mycompiler/mytypereconstruction/typeassumptionkey/CMethodParaKey.java deleted file mode 100755 index ebc4cb436..000000000 --- a/src/mycompiler/mytypereconstruction/typeassumptionkey/CMethodParaKey.java +++ /dev/null @@ -1,118 +0,0 @@ -// ino.module.CMethodParaKey.8715.package -package mycompiler.mytypereconstruction.typeassumptionkey; -// ino.end - -// ino.class.CMethodParaKey.27934.description type=javadoc -/** - * @author Jrg Buerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CMethodParaKey.27934.declaration -public class CMethodParaKey extends CTypeAssumptionKey implements IMethodBoundKey -// ino.end -// ino.class.CMethodParaKey.27934.body -{ - // ino.attribute.KEYPREFIX.27939.declaration - public static String KEYPREFIX = "MethodPara"; - // ino.end - - - // ino.attribute.className.27942.declaration - private String className; - // ino.end - // ino.attribute.methodName.27945.declaration - private String methodName; - // ino.end - // ino.attribute.overloadedMethodID.27948.declaration - private int overloadedMethodID; - // ino.end - // ino.attribute.identifier.27951.declaration - private String identifier; - // ino.end - // ino.attribute.methodParaCount.27954.declaration - private int methodParaCount; - // ino.end - - - // ino.attribute.isOverloadedInitialized.27957.declaration - private boolean isOverloadedInitialized=true; - // ino.end - - // ino.method.CMethodParaKey.27960.definition - public CMethodParaKey(String className, String methodName, int methodParaCount, String identifier) - // ino.end - // ino.method.CMethodParaKey.27960.body - { - this(className,methodName,methodParaCount,0,identifier); - isOverloadedInitialized=false; - } - // ino.end - - // ino.method.CMethodParaKey.27963.definition - public CMethodParaKey(String className, String methodName, int methodParaCount,int overloadedMethodID, String identifier) - // ino.end - // ino.method.CMethodParaKey.27963.body - { - - this.className=className; - this.methodName=methodName; - this.overloadedMethodID=overloadedMethodID; - this.identifier=identifier; - this.methodParaCount=methodParaCount; - - - StringBuffer key = new StringBuffer(); - - key.append(KEYPREFIX); - key.append("#"); - key.append(className); - key.append("."); - key.append(methodName); - key.append("("); - key.append(methodParaCount); - key.append(";"); - key.append(overloadedMethodID); - key.append(")"); - key.append("."); - key.append(identifier); - - m_KeyString = key.toString(); - } - // ino.end - // ino.method.getNextMethodKey.27966.definition - public CMethodParaKey getNextMethodKey() - // ino.end - // ino.method.getNextMethodKey.27966.body - { - return(new CMethodParaKey(className,methodName, methodParaCount, overloadedMethodID+1,identifier)); - - } - // ino.end - // ino.method.getFirstMethodKey.27969.definition - public CMethodParaKey getFirstMethodKey() - // ino.end - // ino.method.getFirstMethodKey.27969.body - { - return(new CMethodParaKey(className,methodName, methodParaCount,identifier)); - } - // ino.end - // ino.method.getOverloadedMethodID.27972.definition - public int getOverloadedMethodID() - // ino.end - // ino.method.getOverloadedMethodID.27972.body - { - return overloadedMethodID; - } - // ino.end - - // ino.method.isOverloadedIDSet.27975.definition - public boolean isOverloadedIDSet() - // ino.end - // ino.method.isOverloadedIDSet.27975.body - { - return isOverloadedInitialized; - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumptionkey/CTypeAssumptionKey.java b/src/mycompiler/mytypereconstruction/typeassumptionkey/CTypeAssumptionKey.java deleted file mode 100755 index 5e60a1173..000000000 --- a/src/mycompiler/mytypereconstruction/typeassumptionkey/CTypeAssumptionKey.java +++ /dev/null @@ -1,94 +0,0 @@ -// ino.module.CTypeAssumptionKey.8716.package -package mycompiler.mytypereconstruction.typeassumptionkey; -// ino.end - -// ino.module.CTypeAssumptionKey.8716.import -import mycompiler.mytypereconstruction.set.IHashSetKey; -// ino.end - - -// ino.class.CTypeAssumptionKey.27978.description type=javadoc -/** - * Diese Klasse modelliert einen eindeutigen Schlssel fr eine Typannahme, - * die in einem CTypeAssumptionSet abgelegt wird. - * @author Jrg Buerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CTypeAssumptionKey.27978.declaration -public abstract class CTypeAssumptionKey implements IHashSetKey -// ino.end -// ino.class.CTypeAssumptionKey.27978.body -{ - - // ino.attribute.m_KeyString.27982.declaration - protected String m_KeyString = null; - // ino.end - - // ino.method.getKeyString.27985.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * @return Returns the KeyString. - */ - // ino.end - // ino.method.getKeyString.27985.definition - public String getKeyString() - // ino.end - // ino.method.getKeyString.27985.body - { - return m_KeyString; - } - // ino.end - - // ino.method.equals.27988.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * @param obj - * @return - */ - // ino.end - // ino.method.equals.27988.definition - public boolean equals(Object obj) - // ino.end - // ino.method.equals.27988.body - { - if(obj instanceof CTypeAssumptionKey){ - return m_KeyString.equals(((CTypeAssumptionKey)obj).getKeyString()); - } - else{ - return false; - } - } - // ino.end - - // ino.method.hashCode.27991.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * @return - */ - // ino.end - // ino.method.hashCode.27991.definition - public int hashCode() - // ino.end - // ino.method.hashCode.27991.body - { - return m_KeyString.hashCode(); - } - // ino.end - - // ino.method.toString.27994.defdescription type=javadoc - /** - *
Author: Jrg Buerle - * @return - */ - // ino.end - // ino.method.toString.27994.definition - public String toString() - // ino.end - // ino.method.toString.27994.body - { - return this.getKeyString(); - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumptionkey/IMethodBoundKey.java b/src/mycompiler/mytypereconstruction/typeassumptionkey/IMethodBoundKey.java deleted file mode 100755 index 928529373..000000000 --- a/src/mycompiler/mytypereconstruction/typeassumptionkey/IMethodBoundKey.java +++ /dev/null @@ -1,68 +0,0 @@ -// ino.module.IMethodBoundKey.8717.package -package mycompiler.mytypereconstruction.typeassumptionkey; -// ino.end - -// ino.class.IMethodBoundKey.27997.declaration -public interface IMethodBoundKey -// ino.end -// ino.class.IMethodBoundKey.27997.body -{ - - - // ino.method.getNextMethodKey.28000.decldescription type=javadoc - /** - * Berechnet anhand des aktuellen Schluessels den Schluessel - * fuer die naechste Ueberlandene Methode - * - * Bsp: - * - * Es gibt 2 Methoden - * - * -overloaded(int a) - * -overloaded(char a) - * - * Wenn ich den MethodKey der 1. Methode (je nach reihenfolge - * der Methodendeklaration) habe, kann ich durch den Aufruf - * von getNextMethodKey() den Key der 2. Methode berechnen - * lassen ohne dass der Key neu erstellt werden muss - */ - // ino.end - // ino.method.getNextMethodKey.28000.declaration - public IMethodBoundKey getNextMethodKey(); - // ino.end - - // ino.method.getFirstMethodKey.28003.decldescription type=javadoc - /** - * Liefert immer den Key der 1. Methode - * - */ - // ino.end - // ino.method.getFirstMethodKey.28003.declaration - public IMethodBoundKey getFirstMethodKey(); - // ino.end - - - // ino.method.getOverloadedMethodID.28006.decldescription type=javadoc - /** - * Liefert die Überladen-ID der Methode - * @return overloaded-ID - */ - // ino.end - // ino.method.getOverloadedMethodID.28006.declaration - public int getOverloadedMethodID(); - // ino.end - - - // ino.method.isOverloadedIDSet.28009.decldescription type=javadoc - /** - * Gibt an, ob die overloaded-id initialisiert wurde, - * oder ob das Objekt mit dem "lazy"-konstruktor initialisiert wurde - * @return true/false - */ - // ino.end - // ino.method.isOverloadedIDSet.28009.declaration - public boolean isOverloadedIDSet(); - // ino.end - -} -// ino.end diff --git a/src/mycompiler/unused/ConstantValueAttribute.java b/src/mycompiler/unused/ConstantValueAttribute.java deleted file mode 100755 index 32b256765..000000000 --- a/src/mycompiler/unused/ConstantValueAttribute.java +++ /dev/null @@ -1,7 +0,0 @@ -package mycompiler.unused; -public class ConstantValueAttribute -{ - /*private short attribute_name_index; - private int attribute_length; - private short constantvalue_index;*/ -} \ No newline at end of file diff --git a/src/mycompiler/unused/Import.java b/src/mycompiler/unused/Import.java deleted file mode 100755 index 65b9432ba..000000000 --- a/src/mycompiler/unused/Import.java +++ /dev/null @@ -1,8 +0,0 @@ -package mycompiler.unused; - -import de.dhbwstuttgart.syntaxtree.misc.Status; - -public class Import extends Status -{ - -} \ No newline at end of file diff --git a/src/mycompiler/unused/JavaCompiler.java b/src/mycompiler/unused/JavaCompiler.java deleted file mode 100755 index b8a1063ef..000000000 --- a/src/mycompiler/unused/JavaCompiler.java +++ /dev/null @@ -1,30 +0,0 @@ -package mycompiler.unused; - -import de.dhbwstuttgart.typeinference.parser.JavaParser; -import de.dhbwstuttgart.typeinference.parser.Scanner; - -public class JavaCompiler extends JavaParser -{ - public static void main(String[] args) - { - JavaParser Parser = new JavaParser(); - Scanner JScanner = new Scanner(new java.io.InputStreamReader(System.in)); - try - { - //Parser.path.toString(); - /*SourceFile SCfile =(SourceFile)*/ Parser.yyparse(JScanner); - } - catch(java.io.IOException ie) - { - ie.printStackTrace(); - } - catch(JavaParser.yyException ye) - { - System.err.println(ye); - } - //Parser.path.toString(); - } - - - -} diff --git a/src/mycompiler/unused/TestClass.java b/src/mycompiler/unused/TestClass.java deleted file mode 100755 index d71fb5655..000000000 --- a/src/mycompiler/unused/TestClass.java +++ /dev/null @@ -1,19 +0,0 @@ -package mycompiler.unused; - -import mycompiler.mytypereconstruction.set.CSet; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - -/** - * - * @author Jörg Bäuerle - * @version $Date: 2005/03/29 09:28:51 $ - */ -public class TestClass { - public static void main(String[] args){ - CSubstitutionSet substSet = new CSubstitutionSet(); - CSet set = new CTypeAssumptionSet(); - set.unite((CSet)substSet); - } -} diff --git a/test/bytecode/BytecodeTester.java b/test/bytecode/BytecodeTester.java index 47096d0aa..806deb387 100644 --- a/test/bytecode/BytecodeTester.java +++ b/test/bytecode/BytecodeTester.java @@ -7,11 +7,11 @@ import java.nio.file.Files; import java.nio.file.Paths; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.myexception.JVMCodeException; import junit.framework.TestCase; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.JVMCodeException; public class BytecodeTester{ diff --git a/test/bytecode/EmptyClassTest.java b/test/bytecode/EmptyClassTest.java index 601bb28c0..56c3c848d 100644 --- a/test/bytecode/EmptyClassTest.java +++ b/test/bytecode/EmptyClassTest.java @@ -3,12 +3,12 @@ package bytecode; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.myexception.JVMCodeException; import org.junit.Test; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; public class EmptyClassTest extends TestCase { diff --git a/test/bytecode/GeneralTest.java b/test/bytecode/GeneralTest.java index 816ecfbf6..bf379b24b 100644 --- a/test/bytecode/GeneralTest.java +++ b/test/bytecode/GeneralTest.java @@ -9,8 +9,8 @@ import junit.framework.TestCase; import org.junit.Test; +import de.dhbwstuttgart.bytecode.ClassFile; import sun.misc.IOUtils; -import mycompiler.mybytecode.ClassFile; public class GeneralTest extends TestCase{ @Test diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java index 54f6a05b6..f4a62459a 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java @@ -3,15 +3,15 @@ package mycompiler.test.unittest.typeReconstructionTest; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; import org.apache.log4j.Logger; import org.apache.log4j.xml.DOMConfigurator; -import de.dhbwstuttgart.core.SourceFile; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassBody; +import de.dhbwstuttgart.syntaxtree.Interface; +import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java index c24539c15..761541405 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java @@ -4,7 +4,6 @@ package mycompiler.test.unittest.typeReconstructionTest; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; import org.apache.log4j.Logger; @@ -13,9 +12,10 @@ import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; -import de.dhbwstuttgart.core.SourceFile; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassBody; +import de.dhbwstuttgart.syntaxtree.Interface; +import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java index fc76f76d8..c6fc55381 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java @@ -3,7 +3,6 @@ package mycompiler.test.unittest.typeReconstructionTest; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; import org.apache.log4j.xml.DOMConfigurator; @@ -11,9 +10,10 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import de.dhbwstuttgart.core.SourceFile; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassBody; +import de.dhbwstuttgart.syntaxtree.Interface; +import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; diff --git a/test/plugindevelopment/TRMEqualTest.java b/test/plugindevelopment/TRMEqualTest.java index 01fa86985..65475cec3 100644 --- a/test/plugindevelopment/TRMEqualTest.java +++ b/test/plugindevelopment/TRMEqualTest.java @@ -11,7 +11,7 @@ import org.junit.Test; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; diff --git a/test/syntaxTree/NodeEqualTest.java b/test/syntaxTree/NodeEqualTest.java index daaaf534c..0b4c20731 100644 --- a/test/syntaxTree/NodeEqualTest.java +++ b/test/syntaxTree/NodeEqualTest.java @@ -8,8 +8,8 @@ import org.junit.Test; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; -import de.dhbwstuttgart.core.SourceFile; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.SourceFile; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import junit.framework.TestCase; From 9f97bef6cdb43019cdabf9ae7f1f1558da1932fd Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Fri, 5 Sep 2014 11:49:31 +0200 Subject: [PATCH 10/46] Umstrukturierung zu de.dhbwstuttgart-Packagenamen --- bin/.gitignore | 7 +- bin/bytecode/FieldTest.jav | 6 + bin/parser/BoundedParameter.jav | 3 + bin/parser/FieldInitializationTest.jav | 3 + bin/parser/GenericFieldVarTest.jav | 3 + bin/parser/ImportTest.jav | 4 + .../dhbwstuttgart/JvmDisassembler}/.cvsignore | 0 .../JvmDisassembler}/GenericsTest.java | 2 +- .../JvmDisassembler}/jvmDisassembler.java | 2 +- .../dhbwstuttgart/core/AClassOrInterface.java | 7 +- .../dhbwstuttgart/core}/ConsoleInterface.java | 5 +- src/de/dhbwstuttgart/core/MyCompiler.java | 6 +- src/de/dhbwstuttgart/core/MyCompilerAPI.java | 2 +- .../{typeinference => }/parser/.cvsignore | 0 .../parser/BoundedClassIdentifierList.java | 2 +- .../parser/ClassAndParameter.java | 2 +- .../parser/GenericVarDeclarationList.java | 2 +- .../parser/InterfaceAndParameter.java | 2 +- .../parser/InterfaceList.java | 2 +- .../parser/JavaClassName.java | 2 +- .../{typeinference => }/parser/JavaLexer.java | 2 +- .../{typeinference => }/parser/JavaLexer.lex | 0 .../parser/JavaParser.java | 18 +- .../{typeinference => }/parser/JavaParser.jay | 0 .../parser/JavaParser_old.jay | 0 .../{typeinference => }/parser/Scanner.java | 2 +- .../{typeinference => }/parser/Token.java | 2 +- .../syntaxtree/BasicAssumptionClass.java | 3 +- src/de/dhbwstuttgart/syntaxtree/Class.java | 232 +------- src/de/dhbwstuttgart/syntaxtree/Constant.java | 11 +- .../dhbwstuttgart/syntaxtree/Constructor.java | 11 +- src/de/dhbwstuttgart/syntaxtree/Field.java | 1 - .../syntaxtree/FieldDeclaration.java | 12 - .../syntaxtree/FormalParameter.java | 54 +- .../syntaxtree/GenericDeclarationList.java | 2 +- .../dhbwstuttgart/syntaxtree/Interface.java | 2 +- .../syntaxtree/InterfaceBody.java | 3 +- src/de/dhbwstuttgart/syntaxtree/Method.java | 39 +- .../syntaxtree/ParameterList.java | 1 - .../dhbwstuttgart/syntaxtree/SourceFile.java | 22 +- .../dhbwstuttgart/syntaxtree/misc/DeclId.java | 6 +- .../dhbwstuttgart/syntaxtree/misc/Status.java | 15 +- .../dhbwstuttgart/syntaxtree/misc/UsedId.java | 2 +- .../syntaxtree/modifier}/Abstract.java | 2 +- .../syntaxtree/modifier}/Final.java | 2 +- .../modifier}/InterfaceModifier.java | 2 +- .../syntaxtree/modifier}/Modifier.java | 2 +- .../syntaxtree/modifier}/Modifiers.java | 2 +- .../syntaxtree/modifier}/Private.java | 2 +- .../syntaxtree/modifier}/Protected.java | 2 +- .../syntaxtree/modifier}/Public.java | 2 +- .../syntaxtree/modifier}/Static.java | 2 +- .../syntaxtree/modifier}/Super.java | 2 +- .../syntaxtree/operator/AddOp.java | 5 - .../syntaxtree/operator/EqualOp.java | 5 - .../syntaxtree/operator/LogOp.java | 5 - .../syntaxtree/operator/MulOp.java | 5 - .../syntaxtree/operator/NotEqualOp.java | 8 - .../syntaxtree/operator/Operator.java | 6 - .../syntaxtree/operator/RelOp.java | 6 - .../syntaxtree/statement/Assign.java | 30 +- .../syntaxtree/statement/Binary.java | 31 +- .../syntaxtree/statement/Block.java | 69 +-- .../syntaxtree/statement/BoolLiteral.java | 76 +-- .../syntaxtree/statement/CastExpr.java | 27 +- .../syntaxtree/statement/CharLiteral.java | 79 +-- .../syntaxtree/statement/DoubleLiteral.java | 43 +- .../syntaxtree/statement/EmptyStmt.java | 39 +- .../syntaxtree/statement/Expr.java | 20 - .../syntaxtree/statement/ExprStmt.java | 13 +- .../syntaxtree/statement/FloatLiteral.java | 43 +- .../syntaxtree/statement/ForStmt.java | 19 - .../syntaxtree/statement/IfStmt.java | 148 ----- .../syntaxtree/statement/InstVar.java | 91 +--- .../syntaxtree/statement/InstanceOf.java | 42 +- .../syntaxtree/statement/IntLiteral.java | 58 +- .../statement/LambdaExpression.java | 22 +- .../syntaxtree/statement/Literal.java | 33 +- .../syntaxtree/statement/LocalOrFieldVar.java | 45 +- .../syntaxtree/statement/LocalVarDecl.java | 106 +--- .../syntaxtree/statement/LongLiteral.java | 44 +- .../syntaxtree/statement/MethodCall.java | 512 +----------------- .../syntaxtree/statement/NegativeExpr.java | 27 +- .../syntaxtree/statement/NewArray.java | 60 +- .../syntaxtree/statement/NewClass.java | 44 +- .../syntaxtree/statement/NotExpr.java | 30 +- .../syntaxtree/statement/Null.java | 39 +- .../syntaxtree/statement/PositivExpr.java | 41 +- .../syntaxtree/statement/PostDecExpr.java | 27 +- .../syntaxtree/statement/PostIncExpr.java | 31 +- .../syntaxtree/statement/PreDecExpr.java | 28 +- .../syntaxtree/statement/PreIncExpr.java | 28 +- .../syntaxtree/statement/Return.java | 34 +- .../syntaxtree/statement/Statement.java | 27 +- .../syntaxtree/statement/StringLiteral.java | 31 +- .../syntaxtree/statement/This.java | 69 +-- .../syntaxtree/statement/WhileStmt.java | 36 +- .../syntaxtree/type/CRefTypeSet.java | 2 +- .../syntaxtree/type/FreshWildcardType.java | 2 +- .../syntaxtree/type/GenericTypeVar.java | 24 +- .../dhbwstuttgart/syntaxtree/type/Pair.java | 3 +- .../syntaxtree/type/RefType.java | 26 +- .../dhbwstuttgart/syntaxtree/type/Type.java | 9 +- .../syntaxtree/type/TypePlaceholder.java | 194 +------ src/de/dhbwstuttgart/typeinference/FunN.java | 23 +- .../typeinference/FunNInterface.java | 1 - .../typeinference/FunNMethod.java | 2 - .../typeinference/Overloading.java | 2 - .../typeinference/TypeInsertable.java | 3 +- .../dhbwstuttgart/typeinference/Typeable.java | 1 - .../typeinference/TypeinferenceResultSet.java | 8 +- .../typeinference/assumptions/Assumption.java | 3 +- .../assumptions/ClassAssumption.java | 3 - .../assumptions/FieldAssumption.java | 2 +- .../assumptions/GenericVarAssumption.java | 2 +- .../assumptions/MethodAssumption.java | 2 - .../assumptions/TypeAssumptions.java | 8 +- .../typeinference/exceptions/ParserError.java | 2 +- .../typedeployment/TypeInsertPoint.java | 3 - .../typeinference/unify/CSet.java | 72 +++ .../typeinference/unify/CSubstitution.java | 252 +++++++++ .../unify/CSubstitutionGenVar.java | 70 +++ .../typeinference/unify/CSubstitutionSet.java | 111 ++++ .../typeinference/unify/CVectorSet.java | 165 ++++++ .../typeinference/unify/Unify.java | 4 +- src/myJvmDisassembler/.cvsignore | 3 - .../AbstractInferenceTestOLD_2.java | 2 +- .../AbstractInferenceTestOld.java | 2 +- .../typeReconstructionTest/TrMakeFCTest.java | 2 +- .../TrSubUnifyTest.java | 2 +- .../typeReconstructionTest/TrUnifyTest.java | 2 +- .../InsertSingleTypeTest.java | 2 +- .../MartinTestCases/Tester.java | 2 +- test/plugindevelopment/TRMEqualTest.java | 2 +- .../TypeInsertSetEqualTest.java | 2 +- test/plugindevelopment/TypeInsertTester.java | 2 +- .../MultipleTypesInsertTester.java | 2 +- .../OverloadingInsertTest.java | 2 +- test/syntaxTree/NodeEqualTest.java | 2 +- 139 files changed, 878 insertions(+), 2854 deletions(-) create mode 100644 bin/bytecode/FieldTest.jav create mode 100644 bin/parser/BoundedParameter.jav create mode 100644 bin/parser/FieldInitializationTest.jav create mode 100644 bin/parser/GenericFieldVarTest.jav create mode 100644 bin/parser/ImportTest.jav rename {bin/myJvmDisassembler => src/de/dhbwstuttgart/JvmDisassembler}/.cvsignore (100%) rename src/{myJvmDisassembler => de/dhbwstuttgart/JvmDisassembler}/GenericsTest.java (83%) rename src/{myJvmDisassembler => de/dhbwstuttgart/JvmDisassembler}/jvmDisassembler.java (99%) rename src/{userinterface => de/dhbwstuttgart/core}/ConsoleInterface.java (94%) rename src/de/dhbwstuttgart/{typeinference => }/parser/.cvsignore (100%) rename src/de/dhbwstuttgart/{typeinference => }/parser/BoundedClassIdentifierList.java (92%) rename src/de/dhbwstuttgart/{typeinference => }/parser/ClassAndParameter.java (98%) rename src/de/dhbwstuttgart/{typeinference => }/parser/GenericVarDeclarationList.java (92%) rename src/de/dhbwstuttgart/{typeinference => }/parser/InterfaceAndParameter.java (98%) rename src/de/dhbwstuttgart/{typeinference => }/parser/InterfaceList.java (95%) rename src/de/dhbwstuttgart/{typeinference => }/parser/JavaClassName.java (98%) rename src/de/dhbwstuttgart/{typeinference => }/parser/JavaLexer.java (99%) rename src/de/dhbwstuttgart/{typeinference => }/parser/JavaLexer.lex (100%) rename src/de/dhbwstuttgart/{typeinference => }/parser/JavaParser.java (99%) rename src/de/dhbwstuttgart/{typeinference => }/parser/JavaParser.jay (100%) rename src/de/dhbwstuttgart/{typeinference => }/parser/JavaParser_old.jay (100%) rename src/de/dhbwstuttgart/{typeinference => }/parser/Scanner.java (96%) rename src/de/dhbwstuttgart/{typeinference => }/parser/Token.java (98%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/Abstract.java (93%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/Final.java (93%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/InterfaceModifier.java (88%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/Modifier.java (93%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/Modifiers.java (98%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/Private.java (92%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/Protected.java (92%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/Public.java (92%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/Static.java (92%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/Super.java (88%) create mode 100755 src/de/dhbwstuttgart/typeinference/unify/CSet.java create mode 100755 src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java create mode 100755 src/de/dhbwstuttgart/typeinference/unify/CSubstitutionGenVar.java create mode 100755 src/de/dhbwstuttgart/typeinference/unify/CSubstitutionSet.java create mode 100755 src/de/dhbwstuttgart/typeinference/unify/CVectorSet.java delete mode 100755 src/myJvmDisassembler/.cvsignore diff --git a/bin/.gitignore b/bin/.gitignore index 79da6df78..4ce50fc91 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,7 +1,6 @@ -/bytecode /de -/myJvmDisassembler -/mycompiler -/parser /plugindevelopment +/mycompiler +/mytypereconstruction /syntaxTree +/userinterface diff --git a/bin/bytecode/FieldTest.jav b/bin/bytecode/FieldTest.jav new file mode 100644 index 000000000..57f1614ab --- /dev/null +++ b/bin/bytecode/FieldTest.jav @@ -0,0 +1,6 @@ +class FieldTest{ + String var; + String methode(String para1){ + return var; + } +} \ No newline at end of file diff --git a/bin/parser/BoundedParameter.jav b/bin/parser/BoundedParameter.jav new file mode 100644 index 000000000..6d7518a9c --- /dev/null +++ b/bin/parser/BoundedParameter.jav @@ -0,0 +1,3 @@ +class Matrix{ + String op = "String"; +} diff --git a/bin/parser/FieldInitializationTest.jav b/bin/parser/FieldInitializationTest.jav new file mode 100644 index 000000000..302667b97 --- /dev/null +++ b/bin/parser/FieldInitializationTest.jav @@ -0,0 +1,3 @@ +class FieldInitializationTest{ + String var = "hallo"; +} \ No newline at end of file diff --git a/bin/parser/GenericFieldVarTest.jav b/bin/parser/GenericFieldVarTest.jav new file mode 100644 index 000000000..a47b41eb0 --- /dev/null +++ b/bin/parser/GenericFieldVarTest.jav @@ -0,0 +1,3 @@ +class Test{ + A var; +} diff --git a/bin/parser/ImportTest.jav b/bin/parser/ImportTest.jav new file mode 100644 index 000000000..2de55cee8 --- /dev/null +++ b/bin/parser/ImportTest.jav @@ -0,0 +1,4 @@ +import java.util.*; + +class ImportTest{ +} \ No newline at end of file diff --git a/bin/myJvmDisassembler/.cvsignore b/src/de/dhbwstuttgart/JvmDisassembler/.cvsignore similarity index 100% rename from bin/myJvmDisassembler/.cvsignore rename to src/de/dhbwstuttgart/JvmDisassembler/.cvsignore diff --git a/src/myJvmDisassembler/GenericsTest.java b/src/de/dhbwstuttgart/JvmDisassembler/GenericsTest.java similarity index 83% rename from src/myJvmDisassembler/GenericsTest.java rename to src/de/dhbwstuttgart/JvmDisassembler/GenericsTest.java index 954fad1f7..5185f0562 100755 --- a/src/myJvmDisassembler/GenericsTest.java +++ b/src/de/dhbwstuttgart/JvmDisassembler/GenericsTest.java @@ -1,4 +1,4 @@ -package myJvmDisassembler; +package de.dhbwstuttgart.JvmDisassembler; diff --git a/src/myJvmDisassembler/jvmDisassembler.java b/src/de/dhbwstuttgart/JvmDisassembler/jvmDisassembler.java similarity index 99% rename from src/myJvmDisassembler/jvmDisassembler.java rename to src/de/dhbwstuttgart/JvmDisassembler/jvmDisassembler.java index 19bb41ba3..6988d70a6 100755 --- a/src/myJvmDisassembler/jvmDisassembler.java +++ b/src/de/dhbwstuttgart/JvmDisassembler/jvmDisassembler.java @@ -1,4 +1,4 @@ -package myJvmDisassembler; +package de.dhbwstuttgart.JvmDisassembler; import java.util.*; import java.io.*; diff --git a/src/de/dhbwstuttgart/core/AClassOrInterface.java b/src/de/dhbwstuttgart/core/AClassOrInterface.java index 7b9d3091a..93323e790 100755 --- a/src/de/dhbwstuttgart/core/AClassOrInterface.java +++ b/src/de/dhbwstuttgart/core/AClassOrInterface.java @@ -6,17 +6,18 @@ package de.dhbwstuttgart.core; // ino.module.AClassOrInterface.8526.import import java.util.Vector; -import mycompiler.mymodifier.Modifiers; - import org.apache.log4j.Logger; // ino.end + + import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.misc.UsedId; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; // ino.class.AClassOrInterface.21186.description type=javadoc /** diff --git a/src/userinterface/ConsoleInterface.java b/src/de/dhbwstuttgart/core/ConsoleInterface.java similarity index 94% rename from src/userinterface/ConsoleInterface.java rename to src/de/dhbwstuttgart/core/ConsoleInterface.java index 8bd5e0280..576077d7d 100755 --- a/src/userinterface/ConsoleInterface.java +++ b/src/de/dhbwstuttgart/core/ConsoleInterface.java @@ -1,16 +1,13 @@ -package userinterface; +package de.dhbwstuttgart.core; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; -import java.util.Vector; import java.util.*; import org.apache.log4j.Logger; import org.apache.log4j.varia.NullAppender; -import de.dhbwstuttgart.core.MyCompiler; -import de.dhbwstuttgart.core.MyCompilerAPI; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; public class ConsoleInterface { diff --git a/src/de/dhbwstuttgart/core/MyCompiler.java b/src/de/dhbwstuttgart/core/MyCompiler.java index c8f2d43ba..2eb043b03 100755 --- a/src/de/dhbwstuttgart/core/MyCompiler.java +++ b/src/de/dhbwstuttgart/core/MyCompiler.java @@ -22,6 +22,9 @@ import com.sun.org.apache.xerces.internal.impl.xs.identity.Field; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.parser.JavaParser; +import de.dhbwstuttgart.parser.Scanner; +import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassBody; import de.dhbwstuttgart.syntaxtree.FormalParameter; @@ -45,9 +48,6 @@ import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.exceptions.ParserError; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaParser; -import de.dhbwstuttgart.typeinference.parser.Scanner; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; diff --git a/src/de/dhbwstuttgart/core/MyCompilerAPI.java b/src/de/dhbwstuttgart/core/MyCompilerAPI.java index fcfb84508..e774618f8 100755 --- a/src/de/dhbwstuttgart/core/MyCompilerAPI.java +++ b/src/de/dhbwstuttgart/core/MyCompilerAPI.java @@ -11,12 +11,12 @@ import java.util.Vector; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.parser.JavaParser; import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.exceptions.ParserError; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaParser; // ino.class.MyCompilerAPI.21328.description type=javadoc /** diff --git a/src/de/dhbwstuttgart/typeinference/parser/.cvsignore b/src/de/dhbwstuttgart/parser/.cvsignore similarity index 100% rename from src/de/dhbwstuttgart/typeinference/parser/.cvsignore rename to src/de/dhbwstuttgart/parser/.cvsignore diff --git a/src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java b/src/de/dhbwstuttgart/parser/BoundedClassIdentifierList.java similarity index 92% rename from src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java rename to src/de/dhbwstuttgart/parser/BoundedClassIdentifierList.java index f37134037..6a41d80d5 100644 --- a/src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java +++ b/src/de/dhbwstuttgart/parser/BoundedClassIdentifierList.java @@ -1,4 +1,4 @@ -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; import java.util.Vector; diff --git a/src/de/dhbwstuttgart/typeinference/parser/ClassAndParameter.java b/src/de/dhbwstuttgart/parser/ClassAndParameter.java similarity index 98% rename from src/de/dhbwstuttgart/typeinference/parser/ClassAndParameter.java rename to src/de/dhbwstuttgart/parser/ClassAndParameter.java index ef928aeeb..87441788b 100755 --- a/src/de/dhbwstuttgart/typeinference/parser/ClassAndParameter.java +++ b/src/de/dhbwstuttgart/parser/ClassAndParameter.java @@ -1,5 +1,5 @@ // ino.module.ClassAndParameter.8613.package -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; // ino.end // ino.module.ClassAndParameter.8613.import diff --git a/src/de/dhbwstuttgart/typeinference/parser/GenericVarDeclarationList.java b/src/de/dhbwstuttgart/parser/GenericVarDeclarationList.java similarity index 92% rename from src/de/dhbwstuttgart/typeinference/parser/GenericVarDeclarationList.java rename to src/de/dhbwstuttgart/parser/GenericVarDeclarationList.java index 0833d3707..ef1ad7c80 100644 --- a/src/de/dhbwstuttgart/typeinference/parser/GenericVarDeclarationList.java +++ b/src/de/dhbwstuttgart/parser/GenericVarDeclarationList.java @@ -1,4 +1,4 @@ -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; import java.util.Vector; diff --git a/src/de/dhbwstuttgart/typeinference/parser/InterfaceAndParameter.java b/src/de/dhbwstuttgart/parser/InterfaceAndParameter.java similarity index 98% rename from src/de/dhbwstuttgart/typeinference/parser/InterfaceAndParameter.java rename to src/de/dhbwstuttgart/parser/InterfaceAndParameter.java index b13858d99..1aa50b6f5 100755 --- a/src/de/dhbwstuttgart/typeinference/parser/InterfaceAndParameter.java +++ b/src/de/dhbwstuttgart/parser/InterfaceAndParameter.java @@ -1,5 +1,5 @@ // ino.module.InterfaceAndParameter.8614.package -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; // ino.end // ino.module.InterfaceAndParameter.8614.import diff --git a/src/de/dhbwstuttgart/typeinference/parser/InterfaceList.java b/src/de/dhbwstuttgart/parser/InterfaceList.java similarity index 95% rename from src/de/dhbwstuttgart/typeinference/parser/InterfaceList.java rename to src/de/dhbwstuttgart/parser/InterfaceList.java index 3e20555f9..3277b359f 100755 --- a/src/de/dhbwstuttgart/typeinference/parser/InterfaceList.java +++ b/src/de/dhbwstuttgart/parser/InterfaceList.java @@ -1,5 +1,5 @@ // ino.module.InterfaceList.8615.package -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; // ino.end // ino.module.InterfaceList.8615.import diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java b/src/de/dhbwstuttgart/parser/JavaClassName.java similarity index 98% rename from src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java rename to src/de/dhbwstuttgart/parser/JavaClassName.java index 0cfd41ab1..1f99511a1 100644 --- a/src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java +++ b/src/de/dhbwstuttgart/parser/JavaClassName.java @@ -1,4 +1,4 @@ -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; import java.util.Vector; diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaLexer.java b/src/de/dhbwstuttgart/parser/JavaLexer.java similarity index 99% rename from src/de/dhbwstuttgart/typeinference/parser/JavaLexer.java rename to src/de/dhbwstuttgart/parser/JavaLexer.java index 92f09f6af..4c5ccab14 100644 --- a/src/de/dhbwstuttgart/typeinference/parser/JavaLexer.java +++ b/src/de/dhbwstuttgart/parser/JavaLexer.java @@ -6,7 +6,7 @@ * * ********************************************/ // user code: -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; public class JavaLexer { diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaLexer.lex b/src/de/dhbwstuttgart/parser/JavaLexer.lex similarity index 100% rename from src/de/dhbwstuttgart/typeinference/parser/JavaLexer.lex rename to src/de/dhbwstuttgart/parser/JavaLexer.lex diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java b/src/de/dhbwstuttgart/parser/JavaParser.java similarity index 99% rename from src/de/dhbwstuttgart/typeinference/parser/JavaParser.java rename to src/de/dhbwstuttgart/parser/JavaParser.java index 607328c7a..188af6022 100644 --- a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java +++ b/src/de/dhbwstuttgart/parser/JavaParser.java @@ -6,7 +6,7 @@ Backup von JavaParser.jay 10.April 17 Uhr */ -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; import java.util.Vector; @@ -28,6 +28,14 @@ import de.dhbwstuttgart.syntaxtree.ParameterList; import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.modifier.Abstract; +import de.dhbwstuttgart.syntaxtree.modifier.Final; +import de.dhbwstuttgart.syntaxtree.modifier.Modifier; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; +import de.dhbwstuttgart.syntaxtree.modifier.Private; +import de.dhbwstuttgart.syntaxtree.modifier.Protected; +import de.dhbwstuttgart.syntaxtree.modifier.Public; +import de.dhbwstuttgart.syntaxtree.modifier.Static; import de.dhbwstuttgart.syntaxtree.operator.AndOp; import de.dhbwstuttgart.syntaxtree.operator.DivideOp; import de.dhbwstuttgart.syntaxtree.operator.EqualOp; @@ -98,14 +106,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Void; import de.dhbwstuttgart.syntaxtree.type.WildcardType; -import mycompiler.mymodifier.Abstract; -import mycompiler.mymodifier.Final; -import mycompiler.mymodifier.Modifier; -import mycompiler.mymodifier.Modifiers; -import mycompiler.mymodifier.Private; -import mycompiler.mymodifier.Protected; -import mycompiler.mymodifier.Public; -import mycompiler.mymodifier.Static; public class JavaParser{ public Vector path = new Vector(); diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay b/src/de/dhbwstuttgart/parser/JavaParser.jay similarity index 100% rename from src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay rename to src/de/dhbwstuttgart/parser/JavaParser.jay diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaParser_old.jay b/src/de/dhbwstuttgart/parser/JavaParser_old.jay similarity index 100% rename from src/de/dhbwstuttgart/typeinference/parser/JavaParser_old.jay rename to src/de/dhbwstuttgart/parser/JavaParser_old.jay diff --git a/src/de/dhbwstuttgart/typeinference/parser/Scanner.java b/src/de/dhbwstuttgart/parser/Scanner.java similarity index 96% rename from src/de/dhbwstuttgart/typeinference/parser/Scanner.java rename to src/de/dhbwstuttgart/parser/Scanner.java index e8a0f9b9d..d8eef5c0f 100755 --- a/src/de/dhbwstuttgart/typeinference/parser/Scanner.java +++ b/src/de/dhbwstuttgart/parser/Scanner.java @@ -1,5 +1,5 @@ // ino.module.Scanner.8618.package -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; // ino.end // ino.class.Scanner.24842.declaration public class Scanner extends JavaLexer implements JavaParser.yyInput diff --git a/src/de/dhbwstuttgart/typeinference/parser/Token.java b/src/de/dhbwstuttgart/parser/Token.java similarity index 98% rename from src/de/dhbwstuttgart/typeinference/parser/Token.java rename to src/de/dhbwstuttgart/parser/Token.java index 4c433d089..a371818e8 100755 --- a/src/de/dhbwstuttgart/typeinference/parser/Token.java +++ b/src/de/dhbwstuttgart/parser/Token.java @@ -1,5 +1,5 @@ // ino.module.Token.8619.package -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; // ino.end // ino.class.Token.24859.declaration public class Token diff --git a/src/de/dhbwstuttgart/syntaxtree/BasicAssumptionClass.java b/src/de/dhbwstuttgart/syntaxtree/BasicAssumptionClass.java index 81c082efa..e6a319b7f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/BasicAssumptionClass.java +++ b/src/de/dhbwstuttgart/syntaxtree/BasicAssumptionClass.java @@ -3,8 +3,7 @@ package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.BasicAssumptionClass.8552.import -import mycompiler.mymodifier.Modifiers; -// ino.end +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; // ino.class.BasicAssumptionClass.23000.declaration public class BasicAssumptionClass extends Class diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index 2dba67201..9a7b8ffc1 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -9,72 +9,13 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCClassBodyException; -import mycompiler.myexception.SCClassException; -import mycompiler.myexception.SCExcept; -import mycompiler.mymodifier.Modifiers; -import mycompiler.mystatement.*; -import mycompiler.mytypereconstruction.CReconstructionTuple; -import mycompiler.mytypereconstruction.CSubstitution; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.set.CReconstructionTupleSet; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.set.IHashSetKey; -import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - import de.dhbwstuttgart.core.AClassOrInterface; import de.dhbwstuttgart.core.IItemWithOffset; -import de.dhbwstuttgart.core.SourceFile; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.statement.Block; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Statement; @@ -90,7 +31,6 @@ import de.dhbwstuttgart.typeinference.assumptions.ClassAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.unify.FC_TTO; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -387,24 +327,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit return classfile; } */ - public void codegen(ClassFile classfile, Vector paralist) - throws JVMCodeException - { - for(int i=0 ; i < this.getFields().size() ; i++) - { - /* - * if(this.fielddecl.elementAt(i) instanceof InstVarDecl) - { - ((InstVarDecl)this.fielddecl.elementAt(i)).codegen(classfile, paralist); - } - else - */ - { - this.fielddecl.elementAt(i).codegen(classfile, paralist); - } - } - } - + public void set_UsedId (UsedId uid) // ino.end // ino.method.set_UsedId.23074.body @@ -655,7 +578,6 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit // ino.end // ino.method.TRProg.23110.definition public ConstraintsSet typeReconstruction(FC_TTO supportData, TypeAssumptions globalAssumptions) - throws CTypeReconstructionException // ino.end // ino.method.TRProg.23110.body { @@ -911,30 +833,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit return ret; } */ - // ino.method.clear.23113.defdescription type=javadoc - /** - * Entfernt Annahmen f�r lokale Variablen, die f�r Methodenparameter erzeugt - * worden sind. (siehe Algorithmus 5.17 TRProg, Martin Pl�micke) - *
Author: J�rg B�uerle - * @param V - * @param locals - */ - // ino.end - // ino.method.clear.23113.definition - void clear(CTypeAssumptionSet V, Vector locals) - // ino.end - // ino.method.clear.23113.body - { - Iterator localsIt = locals.iterator(); - while(localsIt.hasNext()){ - CTypeAssumption local = localsIt.next(); - CTypeAssumption assum = V.getElement(local.getHashSetKey()); - if(assum!=null){ - V.removeElement(local.getHashSetKey()); - } - } - } - // ino.end + // ino.method.RetType.23119.defdescription type=javadoc /** @@ -1037,128 +936,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit // // } - // ino.method.addOffsetsToAssumption.23131.defdescription type=javadoc - /** - * Methode f�gt zu einer CTypeAssumption alle - * Offsets hinzu, wo die Variable benutzt wird. - *
Author: Thomas Hornberger 07.04.2006 - *
Author: Arne Lüdtke 20.01.2007, Auf Polymorphie erweitert. - * Wird nicht mehr verwendet. In Block ausgelagert. - * @return - */ - // ino.end - // ino.method.addOffsetsToAssumption.23131.definition - public static void addOffsetsToAssumption(CTypeAssumption localAssumption, Block localBlock,String NameVariable,boolean isMemberVariable) - // ino.end - // ino.method.addOffsetsToAssumption.23131.body - { - /*if(localBlock!=null){ - for(Object vectorObjekt : localBlock.statements) //durchlaufe alle Statements dieses Blocks - { - if(vectorObjekt instanceof Block) //Bei Block - { - Block b = (Block)vectorObjekt; - addOffsetsToAssumption(localAssumption,b,NameVariable,isMemberVariable);//rekursiver Aufruf - } - else - { - String Name_Superklasse = vectorObjekt.getClass().getSuperclass().getSimpleName(); - if(Name_Superklasse.equals("Statement")) //Bei Statement - { - Statement s = (Statement)vectorObjekt; - try{ - if(addOffsetsToStatement(localAssumption,s,NameVariable,isMemberVariable)==false) - {break;}} - catch(NullPointerException NPE){} - } - else if(Name_Superklasse.equals("Expr") || Name_Superklasse.equals("BinaryExpr") || Name_Superklasse.equals("UnaryExpr")) //Bei Expression - { - Expr e = (Expr)vectorObjekt; - try{ - addOffsetsToExpression(localAssumption,e,NameVariable,isMemberVariable);} - catch(NullPointerException NPE){} - } - } - - }}*/ - } - // ino.end - - // ino.method.addOffsetsToStatement.23134.defdescription type=javadoc - /** - * Hilfs-Methode f�r die Offset-Zuweisung - * durchsucht ein Statement rekursiv - *
Author: Thomas Hornberger 08.04.2006 - *
Author: Arne Lüdtke 20.10.2007, Auf Polymorphie umgebaut. - * @return - */ - // ino.end - // ino.method.addOffsetsToStatement.23134.definition - public static boolean addOffsetsToStatement(CTypeAssumption localAssumption,Statement statement, String NameVariable, boolean isMemberVariable) - // ino.end - // ino.method.addOffsetsToStatement.23134.body - { - return statement.addOffsetsToStatement(localAssumption,NameVariable,isMemberVariable); - /*if(statement instanceof Block) //Wenn Block - { - Block b = (Block)statement; - addOffsetsToAssumption(localAssumption,b,NameVariable,isMemberVariable); - } - else if(statement instanceof IfStmt)//Wenn if - { - IfStmt i = (IfStmt)statement; - addOffsetsToExpression(localAssumption,i.expr,NameVariable,isMemberVariable); - addOffsetsToStatement(localAssumption,i.else_block,NameVariable,isMemberVariable); - addOffsetsToStatement(localAssumption,i.then_block,NameVariable,isMemberVariable); - } - else if(statement instanceof Return)//Wenn Return - { - Return r = (Return)statement; - addOffsetsToExpression(localAssumption,r.retexpr,NameVariable,isMemberVariable); - } - else if(statement instanceof WhileStmt)//Wenn While - { - WhileStmt w = (WhileStmt)statement; - addOffsetsToExpression(localAssumption,w.expr,NameVariable,isMemberVariable); - addOffsetsToStatement(localAssumption,w.loop_block,NameVariable,isMemberVariable); - } - else if(statement instanceof LocalVarDecl)//Wenn Lokale-Variable-Deklaration - { - isMemberVariable=true;//hoth 02.05.06 - if(isMemberVariable)//Wenn Objektvariable - { - LocalVarDecl l = (LocalVarDecl)statement; - if(l.get_Name().equals(NameVariable)) - { - if(isFirstLocalVarDecl==false) - {return false;}//Wenn jetzt lokale Variable kommt, dann springe raus - else - {isFirstLocalVarDecl=false;} - } - } - } - return true;*/ - } - // ino.end - - // ino.method.addOffsetsToExpression.23137.defdescription type=javadoc - /** - * Hilfs-Methode f�r die Offset-Zuweisung - * durchsucht eine Expression rekursiv - *
Author: Thomas Hornberger 07.04.2006 - *
Authos: Arne Lüdtke 20.01.2007, Auf Polymorphie umgebaut. - * @return - */ - // ino.end - // ino.method.addOffsetsToExpression.23137.definition - public static void addOffsetsToExpression(CTypeAssumption localAssumption,Expr expression, String NameVariable,boolean isMemberVariable) - // ino.end - // ino.method.addOffsetsToExpression.23137.body - { - expression.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } - // ino.end - + // ino.method.getSimpleName.23140.defdescription type=javadoc /** * HOTI diff --git a/src/de/dhbwstuttgart/syntaxtree/Constant.java b/src/de/dhbwstuttgart/syntaxtree/Constant.java index 5790a442d..b9e5dcc71 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Constant.java +++ b/src/de/dhbwstuttgart/syntaxtree/Constant.java @@ -10,17 +10,15 @@ import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.parser.JavaClassName; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Literal; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.mymodifier.Modifiers; -// ino.end -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; // ino.class.Constant.23212.description type=javadoc /** @@ -225,11 +223,6 @@ public class Constant extends Method //return null; } - @Override - public void replaceType(CReplaceTypeEvent e) { - // TODO Auto-generated method stub - - } @Override public int getTypeLineNumber() { diff --git a/src/de/dhbwstuttgart/syntaxtree/Constructor.java b/src/de/dhbwstuttgart/syntaxtree/Constructor.java index e35a46dec..bc301e51e 100644 --- a/src/de/dhbwstuttgart/syntaxtree/Constructor.java +++ b/src/de/dhbwstuttgart/syntaxtree/Constructor.java @@ -4,7 +4,9 @@ import java.util.Vector; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.statement.Block; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; @@ -17,9 +19,6 @@ import de.dhbwstuttgart.typeinference.assumptions.ConstructorAssumption; import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; -import mycompiler.mymodifier.Modifiers; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; public class Constructor extends Method { private Method methode; @@ -179,12 +178,6 @@ public class Constructor extends Method { this.methode.setOffset(Offset); } - @Override - public void replaceType(CReplaceTypeEvent e) { - - this.methode.replaceType(e); - } - @Override public int getTypeLineNumber() { diff --git a/src/de/dhbwstuttgart/syntaxtree/Field.java b/src/de/dhbwstuttgart/syntaxtree/Field.java index 74a1b08e8..51930b346 100644 --- a/src/de/dhbwstuttgart/syntaxtree/Field.java +++ b/src/de/dhbwstuttgart/syntaxtree/Field.java @@ -17,7 +17,6 @@ import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.Typeable; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; public abstract class Field extends SyntaxTreeNode implements TypeInsertable, Typeable, Generic, GenericTypeInsertable{ diff --git a/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java index 02f4d8e8a..087689c90 100644 --- a/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java +++ b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java @@ -18,7 +18,6 @@ import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.FieldAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; /** * Eine Feldinitialisation steht für eine Felddeklaration mit gleichzeitiger Wertzuweisung @@ -111,17 +110,6 @@ public class FieldDeclaration extends Field{ return ret; } - @Override - public void replaceType(CReplaceTypeEvent e) { - // TODO Auto-generated method stub - - } - @Override - public int getTypeLineNumber() { - // TODO Auto-generated method stub - return 0; - } - public int getVariableLength() { return declid.elementAt(0).get_Name().length(); diff --git a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java index 4b631265f..cb726848d 100755 --- a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java +++ b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java @@ -5,34 +5,7 @@ package de.dhbwstuttgart.syntaxtree; // ino.module.FormalParameter.8561.import import java.util.Vector; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.syntaxtree.misc.DeclId; @@ -48,7 +21,7 @@ import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; // ino.class.FormalParameter.23391.declaration -public class FormalParameter extends SyntaxTreeNode implements ITypeReplacementListener, Typeable, TypeInsertable +public class FormalParameter extends SyntaxTreeNode implements Typeable, TypeInsertable // ino.end // ino.class.FormalParameter.23391.body { @@ -91,13 +64,6 @@ public class FormalParameter extends SyntaxTreeNode implements ITypeReplacementL // ino.end // ino.method.setType.23404.body { - if(this.type instanceof TypePlaceholder){ - ((TypePlaceholder)this.type).removeReplacementListener(this); - } - - if(t instanceof TypePlaceholder){ - ((TypePlaceholder)t).addReplacementListener(this); - } this.type = t; } // ino.end @@ -188,24 +154,6 @@ public class FormalParameter extends SyntaxTreeNode implements ITypeReplacementL } // ino.end - // ino.method.replaceType.23428.defdescription type=javadoc - /** - *
Author: J�rg B�uerle - * @param e - */ - // ino.end - // ino.method.replaceType.23428.definition - public void replaceType(CReplaceTypeEvent e) - // ino.end - // ino.method.replaceType.23428.body - { - inferencelog.debug("Ersetze Typ in FormalParameter \""+this.getIdentifier()+"\""); - if(type instanceof TypePlaceholder){ - ((TypePlaceholder)type).removeReplacementListener(this); - } - this.setType(e.getNewType()); - } - // ino.end // ino.method.getTypeLineNumber.23431.defdescription type=javadoc /** diff --git a/src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java b/src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java index 45f23959d..115e60e33 100644 --- a/src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java +++ b/src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java @@ -2,8 +2,8 @@ package de.dhbwstuttgart.syntaxtree; import java.util.Vector; +import de.dhbwstuttgart.parser.GenericVarDeclarationList; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.typeinference.parser.GenericVarDeclarationList; /** diff --git a/src/de/dhbwstuttgart/syntaxtree/Interface.java b/src/de/dhbwstuttgart/syntaxtree/Interface.java index 1502b881e..2d98f3c55 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Interface.java +++ b/src/de/dhbwstuttgart/syntaxtree/Interface.java @@ -9,11 +9,11 @@ import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.core.AClassOrInterface; import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import mycompiler.mymodifier.Modifiers; /** * Ein Interface ist eine abstrakte Klasse, erbt daher von Class diff --git a/src/de/dhbwstuttgart/syntaxtree/InterfaceBody.java b/src/de/dhbwstuttgart/syntaxtree/InterfaceBody.java index 12bc5df1d..69b9d6f4d 100755 --- a/src/de/dhbwstuttgart/syntaxtree/InterfaceBody.java +++ b/src/de/dhbwstuttgart/syntaxtree/InterfaceBody.java @@ -7,8 +7,7 @@ import java.util.Vector; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.myexception.JVMCodeException; -import mycompiler.mymodifier.Modifiers; -// ino.end +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; // ino.class.InterfaceBody.23984.description type=javadoc /** diff --git a/src/de/dhbwstuttgart/syntaxtree/Method.java b/src/de/dhbwstuttgart/syntaxtree/Method.java index 479791020..a1044daf8 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Method.java +++ b/src/de/dhbwstuttgart/syntaxtree/Method.java @@ -7,16 +7,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mymodifier.Modifiers; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; import de.dhbwstuttgart.bytecode.ClassFile; @@ -25,7 +15,9 @@ import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.myexception.SCMethodException; import de.dhbwstuttgart.myexception.SCStatementException; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.statement.Block; import de.dhbwstuttgart.syntaxtree.statement.Return; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -41,7 +33,6 @@ import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; @@ -204,14 +195,6 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable // ino.end // ino.method.setReturnType.23539.body { - if(this.returntype instanceof TypePlaceholder){ - ((TypePlaceholder)this.returntype).removeReplacementListener(this); - } - - if(type instanceof TypePlaceholder){ - ((TypePlaceholder)type).addReplacementListener(this); - } - // this.returntype = type; //auskommentiert von Andreas Stadelmeier (a10023) this.returntype = type; } // ino.end @@ -423,24 +406,6 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable } // ino.end - // ino.method.replaceType.23599.defdescription type=javadoc - /** - *
Author: Jrg Buerle - * @param e - */ - // ino.end - // ino.method.replaceType.23599.definition - public void replaceType(CReplaceTypeEvent e) - // ino.end - // ino.method.replaceType.23599.body - { - inferencelog.debug("Ersetze Typ in Method \""+this.get_Method_Name()+"()\"\n"); - if(returntype instanceof TypePlaceholder){ - ((TypePlaceholder)returntype).removeReplacementListener(this); - } - this.setReturnType(e.getNewType()); - } - // ino.end // ino.method.getTypeLineNumber.23602.defdescription type=javadoc /** diff --git a/src/de/dhbwstuttgart/syntaxtree/ParameterList.java b/src/de/dhbwstuttgart/syntaxtree/ParameterList.java index 78febc127..7db364cd3 100755 --- a/src/de/dhbwstuttgart/syntaxtree/ParameterList.java +++ b/src/de/dhbwstuttgart/syntaxtree/ParameterList.java @@ -4,7 +4,6 @@ package de.dhbwstuttgart.syntaxtree; // ino.module.ParameterList.8565.import import java.util.Vector; -import mycompiler.mytype.*; import java.util.Iterator; diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index 6ed62634e..c2fb4b18c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -10,15 +10,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mymodifier.Modifiers; -import mycompiler.mymodifier.Public; -import mycompiler.mytypereconstruction.CIntersectionType; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; import de.dhbwstuttgart.bytecode.ClassFile; @@ -28,8 +19,11 @@ import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.myexception.SCClassException; import de.dhbwstuttgart.myexception.SCException; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; +import de.dhbwstuttgart.syntaxtree.modifier.Public; import de.dhbwstuttgart.syntaxtree.type.BooleanType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; @@ -50,11 +44,8 @@ import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.unify.FC_TTO; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.myclass.*; -import mycompiler.*; import sun.reflect.generics.reflectiveObjects.NotImplementedException; import sun.reflect.generics.reflectiveObjects.TypeVariableImpl; @@ -1177,10 +1168,7 @@ public class SourceFile for(int j=0;j()); - CInstVarTypeAssumption instVar = new CInstVarTypeAssumption(className, fields[j].getName(), new RefType(fields[j].getType().getName(),-1), MyCompiler.NO_LINENUMBER,MyCompiler.NO_LINENUMBER,new Vector()); - //basicAssumptions.addFieldOrLocalVarAssumption(instVar); - parentClass.addField(new FieldDeclaration(fields[j].getName(),new RefType(fields[j].getType().getName(),-1))); + parentClass.addField(new FieldDeclaration(fields[j].getName(),new RefType(fields[j].getType().getName(),-1))); } } for(int j=0;j(),null); ParameterList paraList = new ParameterList(); for(int k=0;k())); } //basicAssumptions.addMethodIntersectionType(new CIntersectionType(constructor)); Method constructorMethod = de.dhbwstuttgart.syntaxtree.Method.createEmptyMethod(methodName, parentClass); diff --git a/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java index 8012781a3..7142823ca 100755 --- a/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java @@ -4,9 +4,6 @@ package de.dhbwstuttgart.syntaxtree.misc; // ino.module.DeclId.8558.import import java.util.Vector; -import mycompiler.mymodifier.Final; -import mycompiler.mymodifier.Modifiers; - import org.apache.log4j.Logger; // ino.end @@ -15,6 +12,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.bytecode.Attribute; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; @@ -23,6 +21,8 @@ import de.dhbwstuttgart.bytecode.SignatureInfo; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Constant; +import de.dhbwstuttgart.syntaxtree.modifier.Final; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.statement.Assign; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.ExprStmt; diff --git a/src/de/dhbwstuttgart/syntaxtree/misc/Status.java b/src/de/dhbwstuttgart/syntaxtree/misc/Status.java index ea598693c..e68b7d324 100755 --- a/src/de/dhbwstuttgart/syntaxtree/misc/Status.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/Status.java @@ -2,9 +2,6 @@ package de.dhbwstuttgart.syntaxtree.misc; // ino.end -// ino.module.Status.8566.import -import mycompiler.unused.Import; -// ino.end // ino.class.Status.23644.declaration public abstract class Status @@ -14,9 +11,6 @@ public abstract class Status // ino.attribute.userdef.23647.declaration protected UserDef userdef; // ino.end - // ino.attribute.imp.23650.declaration - protected Import imp; - // ino.end // ino.method.set_UserDef.23653.definition public void set_UserDef( UserDef userdef) @@ -26,13 +20,6 @@ public abstract class Status this.userdef = userdef; } // ino.end - // ino.method.set_Import.23656.definition - public void set_Import(Import imp) - // ino.end - // ino.method.set_Import.23656.body - { - this.imp = imp; - } - // ino.end + } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java index 937f9a032..78b68fb4d 100755 --- a/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java @@ -7,11 +7,11 @@ import java.util.Vector; import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; // ino.class.UsedId.23659.declaration diff --git a/src/mycompiler/mymodifier/Abstract.java b/src/de/dhbwstuttgart/syntaxtree/modifier/Abstract.java similarity index 93% rename from src/mycompiler/mymodifier/Abstract.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/Abstract.java index 69027ed72..0fbc63fd4 100755 --- a/src/mycompiler/mymodifier/Abstract.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/Abstract.java @@ -1,5 +1,5 @@ // ino.module.Abstract.8585.package -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/mymodifier/Final.java b/src/de/dhbwstuttgart/syntaxtree/modifier/Final.java similarity index 93% rename from src/mycompiler/mymodifier/Final.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/Final.java index 8330eba5e..03be2767c 100755 --- a/src/mycompiler/mymodifier/Final.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/Final.java @@ -1,5 +1,5 @@ // ino.module.Final.8586.package -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/mymodifier/InterfaceModifier.java b/src/de/dhbwstuttgart/syntaxtree/modifier/InterfaceModifier.java similarity index 88% rename from src/mycompiler/mymodifier/InterfaceModifier.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/InterfaceModifier.java index 8de2bee13..b6fd3ece1 100755 --- a/src/mycompiler/mymodifier/InterfaceModifier.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/InterfaceModifier.java @@ -1,7 +1,7 @@ /** * */ -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/mymodifier/Modifier.java b/src/de/dhbwstuttgart/syntaxtree/modifier/Modifier.java similarity index 93% rename from src/mycompiler/mymodifier/Modifier.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/Modifier.java index 1d72d4e72..22bcda47d 100755 --- a/src/mycompiler/mymodifier/Modifier.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/Modifier.java @@ -1,5 +1,5 @@ // ino.module.Modifier.8587.package -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/mymodifier/Modifiers.java b/src/de/dhbwstuttgart/syntaxtree/modifier/Modifiers.java similarity index 98% rename from src/mycompiler/mymodifier/Modifiers.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/Modifiers.java index c51a0ccde..759f59cce 100755 --- a/src/mycompiler/mymodifier/Modifiers.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/Modifiers.java @@ -1,5 +1,5 @@ // ino.module.Modifiers.8588.package -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; // ino.end // ino.module.Modifiers.8588.import diff --git a/src/mycompiler/mymodifier/Private.java b/src/de/dhbwstuttgart/syntaxtree/modifier/Private.java similarity index 92% rename from src/mycompiler/mymodifier/Private.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/Private.java index 4b36125ca..913b5dadf 100755 --- a/src/mycompiler/mymodifier/Private.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/Private.java @@ -1,5 +1,5 @@ // ino.module.Private.8589.package -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/mymodifier/Protected.java b/src/de/dhbwstuttgart/syntaxtree/modifier/Protected.java similarity index 92% rename from src/mycompiler/mymodifier/Protected.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/Protected.java index c732b00ff..bc6b6f238 100755 --- a/src/mycompiler/mymodifier/Protected.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/Protected.java @@ -1,5 +1,5 @@ // ino.module.Protected.8590.package -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/mymodifier/Public.java b/src/de/dhbwstuttgart/syntaxtree/modifier/Public.java similarity index 92% rename from src/mycompiler/mymodifier/Public.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/Public.java index 0236b80e2..52ca21ff1 100755 --- a/src/mycompiler/mymodifier/Public.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/Public.java @@ -1,5 +1,5 @@ // ino.module.Public.8591.package -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/mymodifier/Static.java b/src/de/dhbwstuttgart/syntaxtree/modifier/Static.java similarity index 92% rename from src/mycompiler/mymodifier/Static.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/Static.java index c5de6ead0..18402b76c 100755 --- a/src/mycompiler/mymodifier/Static.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/Static.java @@ -1,5 +1,5 @@ // ino.module.Static.8592.package -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/mymodifier/Super.java b/src/de/dhbwstuttgart/syntaxtree/modifier/Super.java similarity index 88% rename from src/mycompiler/mymodifier/Super.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/Super.java index c12de8263..3baa9d4e3 100755 --- a/src/mycompiler/mymodifier/Super.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/Super.java @@ -1,7 +1,7 @@ /** * */ -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java index c5d1e6605..5dae26d7a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java @@ -22,11 +22,6 @@ import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java index 8c5b87bb7..c8f58be3f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java @@ -16,11 +16,6 @@ import de.dhbwstuttgart.syntaxtree.statement.Null; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java index 17c73e237..33472b5b6 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java @@ -26,11 +26,6 @@ import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java index 1ffa21475..47c8d887a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java @@ -16,11 +16,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; // ino.class.MulOp.24231.declaration public abstract class MulOp extends Operator diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java index 7f8d19cc1..91b229247 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java @@ -16,14 +16,6 @@ import de.dhbwstuttgart.syntaxtree.statement.Null; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; - - - // ino.class.NotEqualOp.24241.declaration public class NotEqualOp extends RelOp diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java index 0a588a614..29304f017 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java @@ -26,12 +26,6 @@ import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; - diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java index 135f0ae44..ec22a5e2b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java @@ -19,12 +19,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; - // ino.class.RelOp.24299.declaration public abstract class RelOp extends Operator // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java index 224d2f561..941734b31 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java @@ -7,31 +7,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CMultiplyTuple; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CMultiplyTupleSet; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; - -// ino.end - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -39,6 +16,7 @@ import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.myexception.SCExcept; import de.dhbwstuttgart.myexception.SCStatementException; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -52,7 +30,6 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -257,11 +234,6 @@ public class Assign extends Expr } // ino.end - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr1.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - expr2.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } @Override public String getTypeInformation(){ diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java index ff127df9b..53f8886db 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java @@ -7,32 +7,8 @@ import java.util.HashMap; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -59,6 +35,7 @@ import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -265,12 +242,6 @@ public class Binary extends BinaryExpr { } // ino.end - - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr1.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - expr2.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java index 3ab3a23e7..0a5796aeb 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java @@ -7,31 +7,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; @@ -51,6 +28,7 @@ import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -185,43 +163,6 @@ public class Block extends Statement } // ino.end - - public void addOffsetsToAssumption(CTypeAssumption localAssumption, String NameVariable,boolean isMemberVariable) - { - for(Object vectorObjekt : this.statements) //durchlaufe alle Statements dieses Blocks - { - if(vectorObjekt instanceof Block) //Bei Block - { - Block b = (Block)vectorObjekt; - b.addOffsetsToAssumption(localAssumption,NameVariable,isMemberVariable);//rekursiver Aufruf - } - else - { - String Name_Superklasse = vectorObjekt.getClass().getSuperclass().getSimpleName(); - if(Name_Superklasse.equals("Statement")) //Bei Statement - { - Statement s = (Statement)vectorObjekt; - try{ - if(s.addOffsetsToStatement(localAssumption,NameVariable,isMemberVariable)==false) - {break;}} - catch(NullPointerException NPE){} - } - else if(Name_Superklasse.equals("Expr") || Name_Superklasse.equals("BinaryExpr") || Name_Superklasse.equals("UnaryExpr")) //Bei Expression - { - Expr e = (Expr)vectorObjekt; - try{ - e.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable);} - catch(NullPointerException NPE){} - } - } - } - } - - public boolean addOffsetsToStatement(CTypeAssumption localAssumption, String NameVariable, boolean isMemberVariable) - { - addOffsetsToAssumption(localAssumption,NameVariable,isMemberVariable); - return true; - } @Override @@ -256,9 +197,6 @@ public class Block extends Statement this.setType(tph); } } - if (this.type instanceof TypePlaceholder) { - ((TypePlaceholder)this.type).addReplacementListener(this); - } }else{ this.setType(new Void(0)); } @@ -281,11 +219,6 @@ public class Block extends Statement } */ - - public void replaceType(CReplaceTypeEvent e) { - super.replaceType(e); - } - @Override public String getTypeInformation(){ String ret = "\n"; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java index 19bc0716d..b1b39e808 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java @@ -5,27 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -41,6 +21,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -141,51 +122,6 @@ public class BoolLiteral extends Literal // ino.end - // ino.method.TRStatement.25117.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25117.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - - // ino.method.TRExp.25120.defdescription type=javadoc - /** - * Workaround: �berschreibt Methode TRExp aus der Super-Klasse - * Literal, weil die Implementierung von Unify (noch) nicht mit - * Basetypes umgehen kann.
- * Anstatt den Basetype BooleanType zur�ckzugeben, wird ein - * RefType zur�ckgegeben.
- * Diese Methode kann sp�ter entfernt werden, sodass automatisch die Methode der - * Super-Klasse verwendet wird. - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRExp.25120.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25120.body - { - CTripleSet tripleSet = new CTripleSet(); - tripleSet.addElement(new CTriple(sigma, new RefType("java.lang.Boolean",getOffset()),V)); - return tripleSet; - } - // ino.end - - // ino.method.wandleRefTypeAttributes2GenericAttributes.25123.definition - public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) - // ino.end - // ino.method.wandleRefTypeAttributes2GenericAttributes.25123.body - { - } - // ino.end - @Override @@ -210,6 +146,16 @@ public class BoolLiteral extends Literal return ret; } + + + @Override + public void wandleRefTypeAttributes2GenericAttributes( + Vector paralist, + Vector genericMethodParameters) { + // TODO Auto-generated method stub + + } + } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java index 87832a229..681a03547 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java @@ -6,28 +6,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -43,6 +22,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -141,11 +121,6 @@ public class CastExpr extends UnaryExpr } // ino.end - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } - @Override diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java index f150db341..b8163af1f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java @@ -4,29 +4,7 @@ package de.dhbwstuttgart.syntaxtree.statement; // ino.module.CharLiteral.8628.import import java.util.Hashtable; import java.util.Vector; - -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -42,6 +20,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -133,54 +112,6 @@ public class CharLiteral extends Literal } // ino.end - - // ino.method.TRStatement.25194.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25194.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - - // ino.method.TRExp.25197.defdescription type=javadoc - /** - * Workaround: �berschreibt Methode TRExp aus der Super-Klasse - * Literal, weil die Implementierung von Unify (noch) nicht mit - * Basetypes umgehen kann.
- * Anstatt den Basetype CharacterType zur�ckzugeben, wird ein - * RefType zur�ckgegeben.
- * Diese Methode kann sp�ter entfernt werden, sodass automatisch die Methode der - * Super-Klasse verwendet wird. - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRExp.25197.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25197.body - { - CTripleSet tripleSet = new CTripleSet(); - tripleSet.addElement(new CTriple(sigma, new RefType("java.lang.Character",getOffset()),V)); - return tripleSet; - } - // ino.end - - // ino.method.wandleRefTypeAttributes2GenericAttributes.25200.definition - public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) - // ino.end - // ino.method.wandleRefTypeAttributes2GenericAttributes.25200.body - { - } - // ino.end - - - @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { // TODO Auto-generated method stub @@ -198,5 +129,13 @@ public class CharLiteral extends Literal Vector ret = new Vector(); return ret; } + + + + @Override + public void wandleRefTypeAttributes2GenericAttributes( + Vector paralist, + Vector genericMethodParameters) { + } } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java index 85b0778ac..903ee739f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java @@ -5,12 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; @@ -31,6 +25,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; // ino.end @@ -144,42 +139,6 @@ public class DoubleLiteral extends Literal } // ino.end - - // ino.method.TRStatement.25478.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25478.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - // ino.method.TRExp.25481.defdescription type=javadoc - /** - * Workaround: �berschreibt Methode TRExp aus der Super-Klasse - * Literal, weil die Implementierung von Unify (noch) nicht mit - * Basetypes umgehen kann.
- * Anstatt den Basetype IntegerType zur�ckzugeben, wird ein - * RefType zur�ckgegeben.
- * Diese Methode kann sp�ter entfernt werden, sodass automatisch die Methode der - * Super-Klasse verwendet wird. - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRExp.25481.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25481.body - { - CTripleSet tripleSet = new CTripleSet(); - tripleSet.addElement(new CTriple(sigma, new RefType("java.lang.Double",getOffset()),V)); - return tripleSet; - } - // ino.end // ino.method.toString.25484.defdescription type=javadoc /** diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java index 1967fe044..68d04cd75 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java @@ -5,28 +5,8 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; @@ -39,6 +19,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -80,14 +61,6 @@ public class EmptyStmt extends Statement { } // ino.end - // ino.method.TRStatement.25219.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25219.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end // ino.method.wandleRefTypeAttributes2GenericAttributes.25222.definition public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) @@ -97,10 +70,6 @@ public class EmptyStmt extends Statement } // ino.end - public boolean addOffsetsToStatement(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - return true; - } @Override public ConstraintsSet TYPEStmt(TypeAssumptions assumptions) { @@ -108,12 +77,6 @@ public class EmptyStmt extends Statement return null; } - public void replaceType(CReplaceTypeEvent e) { - // TODO Auto-generated method stub - throw new NotImplementedException(); - } - - public int getTypeLineNumber() { throw new NotImplementedException(); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java b/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java index db241201d..ba3d9563a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java @@ -15,17 +15,6 @@ import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.mytypereconstruction.CMultiplyTuple; -import mycompiler.mytypereconstruction.CSubstitution; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CMultiplyTupleSet; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -// ino.end - @@ -120,14 +109,5 @@ public abstract class Expr extends ExprStmt public ConstraintsSet TYPEStmt(TypeAssumptions assumptions){ throw new NotImplementedException(); //wird die TYPEStmt-Methode innerhalb einer Expr aufgerufen, dann ist etwas schief gelaufen. } - - - public abstract void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable); - - public boolean addOffsetsToStatement(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - return true; - } - } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java index 3788e5866..370af3480 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java @@ -6,18 +6,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; - import org.apache.log4j.Logger; -// ino.end - - - import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; @@ -25,7 +14,7 @@ import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.unify.Unify; // ino.class.ExprStmt.25265.declaration -public abstract class ExprStmt extends Statement implements ITypeReplacementListener +public abstract class ExprStmt extends Statement // ino.end // ino.class.ExprStmt.25265.body { diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java index 8ce6eb379..80bd8526e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java @@ -5,12 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; - import org.apache.log4j.Logger; import de.dhbwstuttgart.bytecode.ClassFile; @@ -138,42 +132,7 @@ public class FloatLiteral extends Literal } // ino.end - - // ino.method.TRStatement.25478.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25478.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - // ino.method.TRExp.25481.defdescription type=javadoc - /** - * Workaround: �berschreibt Methode TRExp aus der Super-Klasse - * Literal, weil die Implementierung von Unify (noch) nicht mit - * Basetypes umgehen kann.
- * Anstatt den Basetype IntegerType zur�ckzugeben, wird ein - * RefType zur�ckgegeben.
- * Diese Methode kann sp�ter entfernt werden, sodass automatisch die Methode der - * Super-Klasse verwendet wird. - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRExp.25481.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25481.body - { - CTripleSet tripleSet = new CTripleSet(); - tripleSet.addElement(new CTriple(sigma, new RefType("java.lang.Float",getOffset()),V)); - return tripleSet; - } - // ino.end + // ino.method.toString.25484.defdescription type=javadoc /** diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java index 1400b35ca..bd78a1fdb 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java @@ -5,13 +5,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; @@ -104,24 +97,12 @@ public class ForStmt extends Statement body_Loop_block = statement; } - - public boolean addOffsetsToStatement(CTypeAssumption localAssumption, String NameVariable, boolean isMemberVariable) - { - head_Initializer_1.addOffsetsToStatement(localAssumption,NameVariable,isMemberVariable); - body_Loop_block.addOffsetsToStatement(localAssumption,NameVariable,isMemberVariable); - return true; - } @Override public ConstraintsSet TYPEStmt(TypeAssumptions assumptions) { // TODO Auto-generated method stub return null; } - - public void replaceType(CReplaceTypeEvent e) { - // TODO Auto-generated method stub - throw new NotImplementedException(); - } public int getTypeLineNumber() { throw new NotImplementedException(); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java index 8822fcb37..0cae62ade 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java @@ -7,32 +7,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSubstitution; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -255,116 +230,7 @@ public class IfStmt extends Statement - // ino.method.makeNewResult.25343.definition - private void makeNewResult(MUB Mub, CTriple triple, CTypeAssumptionSet V, CTripleSet returnSet) - throws CTypeReconstructionException - // ino.end - // ino.method.makeNewResult.25343.body - { - CSubstitutionSet unifier = new CSubstitutionSet(Mub.getUnifier()); - // -------------------------- - // Typannahmen bauen: - // -------------------------- - CTypeAssumptionSet V_substituted = V.deepCopy(); - V_substituted.sub(unifier); - // -------------------------- - // Substitutionen bauen: - // -------------------------- - CSubstitutionSet substSet = triple.getSubstitutions().deepCopy(); - substSet.applyUnifier(unifier); - substSet.unite(unifier); - // -------------------------- - // R�ckgabetyp bauen: - // -------------------------- - Iterator setMubIt = Mub.getMub().iterator(); - - while(setMubIt.hasNext()) { - Type retType = setMubIt.next(); - Type retType2 = substSet.applyThisSubstitutionSet(retType.clone()); - // Muesste eigentlich cloneAndApplyUnify machen PL 06-03-18 - // If(Rettype Instanceof TypePlaceholders){ - // Iterator Pairit = Unifier.Getiterator(); - // While(Pairit.Hasnext()){ - // Csubstitution Pair = Pairit.Next(); - // If(Pair.Gettypevar().Getname().Equals(Rettype.Getname())){ - // Rettype = Pair.Gettype(); - // Break; - // } - // } - // } - // -------------------------- - CTriple resultTriple = new CTriple(substSet, retType2, V_substituted); - //CSubstitutionSet CSubstUnifier = new CSubstitutionSet(unifier); - //CTriple resultTriple2 = retTriple.cloneAndApplyUnify(CSubstUnifier); - // -------------------------- - // Triple zu R�ckgabemenge hinzuf�gen - // -------------------------- - if(!returnSet.contains(resultTriple)){ - returnSet.addElement(resultTriple); - } - } - } - // ino.end - - // ino.method.applyUnifier.25346.definition - private void applyUnifier(Vector> unifierPossibilities, CTriple triple, CTypeAssumptionSet V, CTripleSet returnSet) - throws CTypeReconstructionException - // ino.end - // ino.method.applyUnifier.25346.body - { - // -------------------------- - // Wenn Unifier vorhanden, dann anwenden: - // -------------------------- - if(unifierPossibilities.size()!=0){ - // -------------------------- - // Alle m�glichen Unifier auf V_i,j anwenden: - // -------------------------- - for(int k=0; k pairIt = unifier.getIterator(); - while(pairIt.hasNext()){ - CSubstitution pair = pairIt.next(); - if(pair.getTypeVar().getName().equals(retType.getName())){ - retType = pair.getType(); - break; - } - } - } - // -------------------------- - CTriple resultTriple = new CTriple(substSet, retType, V_substituted); - // -------------------------- - // Triple zu R�ckgabemenge hinzuf�gen - // -------------------------- - if(!returnSet.contains(resultTriple)){ - returnSet.addElement(resultTriple); - } - } - } - // -------------------------- - // Ansonsten Fehlermeldung: - // -------------------------- - else { - throw new CTypeReconstructionException("IfStmt.TRStatement(): Block-Typen lassen sich nicht unifizieren.",this); - } - } - // ino.end // ino.method.wandleRefTypeAttributes2GenericAttributes.25349.definition public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) // ino.end @@ -379,15 +245,6 @@ public class IfStmt extends Statement } // ino.end - - public boolean addOffsetsToStatement(CTypeAssumption localAssumption, String NameVariable, boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - else_block.addOffsetsToStatement(localAssumption,NameVariable,isMemberVariable); - then_block.addOffsetsToStatement(localAssumption,NameVariable,isMemberVariable); - return true; - } - @Override @@ -408,11 +265,6 @@ public class IfStmt extends Statement return ret; } - public void replaceType(CReplaceTypeEvent e) { - // TODO Auto-generated method stub - throw new NotImplementedException(); - } - public int getTypeLineNumber() { throw new NotImplementedException(); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java index be25f6cf5..f149e94e9 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java @@ -6,36 +6,7 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; - -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.typeassumptionkey.CInstVarKey; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; @@ -202,60 +173,9 @@ public class InstVar extends Expr } // ino.end - // ino.method.TRStatement.25429.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25429.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - // ino.method.handleInstVarAssum.25438.defdescription type=javadoc - /** - * Unifiziert den R�ckgabetyp des Receivers mit dem der gefundenen Klasse - *
Author: J�rg B�uerle - * @param triple Triple des Receivers - * @param thetaZero Typ der gefundenen Klasse - * @param thetaC Typ der InstanzVariable - * @param resultSet - * @param supportData - */ - // ino.end - // ino.method.handleInstVarAssum.25438.definition - private void handleInstVarAssum(CTriple triple, Type thetaZero, Type thetaC, CTripleSet resultSet, CSupportData supportData) - // ino.end - // ino.method.handleInstVarAssum.25438.body - { - // -------------------------- - // ReturnType mit Integer unifizieren: - // -------------------------- - Vector> unifierPossibilities = Unify.unify(triple.getResultType(), thetaZero, supportData.getFiniteClosure()); - // -------------------------- - // Wenn Unifier vorhanden, dann - // anwenden und Triple hinzuf�gen: - // -------------------------- - if(unifierPossibilities.size()!=0){ - // -------------------------- - // Subset bauen: - // -------------------------- - CTripleSet subSet = new CTripleSet(); - // -------------------------- - // Alle m�glichen Unifier anwenden: - // -------------------------- - for(int i=0; ischreibe Offset - localAssumption.addOffset(this.get_UsedId().getOffset()); - } - } - @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { ConstraintsSet ret = new ConstraintsSet(); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java index 5b8baa5f5..2178ba464 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java @@ -6,25 +6,7 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; @@ -120,24 +102,6 @@ public class InstanceOf extends BinaryExpr } // ino.end - // ino.method.TRExp.25383.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25383.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - // ino.method.TRStatement.25386.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25386.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - // ino.method.wandleRefTypeAttributes2GenericAttributes.25389.definition public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) // ino.end @@ -145,11 +109,7 @@ public class InstanceOf extends BinaryExpr { } // ino.end - - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } + @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java index 7b7a0d399..f90970c48 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java @@ -5,28 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -42,6 +21,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -154,42 +134,6 @@ public class IntLiteral extends Literal } // ino.end - - // ino.method.TRStatement.25478.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25478.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - // ino.method.TRExp.25481.defdescription type=javadoc - /** - * Workaround: �berschreibt Methode TRExp aus der Super-Klasse - * Literal, weil die Implementierung von Unify (noch) nicht mit - * Basetypes umgehen kann.
- * Anstatt den Basetype IntegerType zur�ckzugeben, wird ein - * RefType zur�ckgegeben.
- * Diese Methode kann sp�ter entfernt werden, sodass automatisch die Methode der - * Super-Klasse verwendet wird. - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRExp.25481.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25481.body - { - CTripleSet tripleSet = new CTripleSet(); - tripleSet.addElement(new CTriple(sigma, new RefType("java.lang.Integer",getOffset()),V)); - return tripleSet; - } - // ino.end // ino.method.toString.25484.defdescription type=javadoc /** diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java index 89cbcd81c..64891b302 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java @@ -29,13 +29,7 @@ import de.dhbwstuttgart.typeinference.Typeable; import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; /** * @author A10023 - Andreas Stadelmeier @@ -117,13 +111,6 @@ public class LambdaExpression extends Expr{ } } - @Override - public boolean addOffsetsToStatement(CTypeAssumption localAssumption, - String NameVariable, boolean isMemberVariable) { - // TODO Auto-generated method stub - return false; - } - @Override public String get_Name() { // TODO Auto-generated method stub @@ -131,13 +118,6 @@ public class LambdaExpression extends Expr{ } - @Override - public void addOffsetsToExpression(CTypeAssumption localAssumption, - String NameVariable, boolean isMemberVariable) { - // TODO Auto-generated method stub - - } - /** * Spezifikation: diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java b/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java index a89ef6b5c..f83c1c369 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java @@ -5,13 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement; // ino.module.Literal.8636.import import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.myexception.JVMCodeException; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -// ino.end +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; // ino.class.Literal.25490.declaration public abstract class Literal extends Expr @@ -55,26 +49,6 @@ public abstract class Literal extends Expr } // ino.end - // ino.method.TRExp.25497.defdescription type=javadoc - /** - * Implementierung des Algorithmus 5.40 von Martin Pl�micke - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRExp.25497.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25497.body - { - CTripleSet tripleSet = new CTripleSet(); - tripleSet.addElement(new CTriple(sigma, this.getType(),V)); - return tripleSet; - } - // ino.end // ino.method.ConstantCodegen.25500.defdescription type=javadoc /** @@ -92,9 +66,6 @@ public abstract class Literal extends Expr + " wurde nicht implementiert!"); } // ino.end - - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - } + } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java index bd83ce158..4f03ddae7 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java @@ -6,33 +6,7 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.typeassumptionkey.CInstVarKey; -import mycompiler.mytypereconstruction.typeassumptionkey.CLocalVarKey; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -54,6 +28,7 @@ import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -173,16 +148,6 @@ public class LocalOrFieldVar extends Expr } // ino.end - // ino.end - // ino.method.TRStatement.25531.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25531.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - // ino.method.toString.25534.defdescription type=javadoc /** *
Author: Martin Pl�micke @@ -207,14 +172,6 @@ public class LocalOrFieldVar extends Expr } // ino.end - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - if(this.get_UsedId().get_Name_1Element().equals(NameVariable)) - { - //wenn Variable mit gleichem Namen gefunden->schreibe Offset - localAssumption.addOffset(this.get_UsedId().getOffset()); - } - } @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java index eda8deef5..946812366 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java @@ -6,41 +6,8 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.core.MyCompiler; @@ -66,6 +33,7 @@ import de.dhbwstuttgart.typeinference.assumptions.LocalVarAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -348,33 +316,6 @@ public class LocalVarDecl extends Statement implements TypeInsertable // ino.end - // ino.method.replaceType.25608.defdescription type=javadoc - /** - *
Author: J�rg B�uerle - * @param e - */ - // ino.end - // ino.method.replaceType.25608.definition - public void replaceType(CReplaceTypeEvent e) - // ino.end - // ino.method.replaceType.25608.body - { - if(e.getOldType().equals(this.getType())){ - inferencelog.debug("Ersetze Typ in LocalVarDecl \""+this.get_Name()+"\"\n"); - if(getType() instanceof TypePlaceholder){ - ((TypePlaceholder)getType()).removeReplacementListener(this); - } - this.setType(e.getNewType()); - } - if(e.getOldType().equals(this.getType())){ - inferencelog.debug("Ersetze Typ in LocalVarDecl \""+this.get_Name()+"\"\n"); - if(this.getType() instanceof TypePlaceholder){ - ((TypePlaceholder)this.getType()).removeReplacementListener(this); - } - this.setType(e.getNewType()); - } - } - // ino.end // ino.method.getTypeLineNumber.25611.defdescription type=javadoc /** @@ -391,36 +332,6 @@ public class LocalVarDecl extends Statement implements TypeInsertable } // ino.end - // ino.method.TRStatement.25614.defdescription type=javadoc - /** - * Implementierung des Algorithmus 5.24 von Martin Pl�micke - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRStatement.25614.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25614.body - { - CTripleSet resultSet = new CTripleSet(); - V = V.shallowCopy(); - CTypeAssumptionSet localSet = new CTypeAssumptionSet(); - CLocalVarTypeAssumption varAssum = new CLocalVarTypeAssumption(supportData.getCurrentClass(), supportData.getCurrentMethod(), supportData.getCurrentMethodParaCount(), supportData.getCurrentMethodOverloadedID(), supportData.getCurrentBlockId(), this.get_Name() ,this.getType(), this.getLineNumber(),this.getOffset(),new Vector()); - Class.isFirstLocalVarDecl=true; - - if(this.block != null) - this.block.addOffsetsToAssumption(varAssum,this.get_Name(),false);//hinzugef�gt hoth: 07.04.2006 - - localSet.addElement(varAssum); - V.unite(localSet); - resultSet.addElement(new CTriple(sigma, new Void(getOffset()), V)); - return resultSet; - } - // ino.end // ino.method.toString.25617.defdescription type=javadoc /** @@ -457,21 +368,6 @@ public class LocalVarDecl extends Statement implements TypeInsertable } // ino.end - public boolean addOffsetsToStatement(CTypeAssumption localAssumption, String NameVariable, boolean isMemberVariable) - { - isMemberVariable=true;//hoth 02.05.06 - if(isMemberVariable)//Wenn Objektvariable - { - if(this.get_Name().equals(NameVariable)) - { - if(Class.isFirstLocalVarDecl==false) - {return false;}//Wenn jetzt lokale Variable kommt, dann springe raus - else - {Class.isFirstLocalVarDecl=false;} - } - } - return true; - } /** * @author Andreas Stadelmeier, a10023 diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java index 0dca5340a..ed134118b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java @@ -5,12 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; @@ -30,6 +24,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; // ino.end @@ -143,43 +138,6 @@ public class LongLiteral extends Literal } // ino.end - - // ino.method.TRStatement.25478.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25478.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - // ino.method.TRExp.25481.defdescription type=javadoc - /** - * Workaround: �berschreibt Methode TRExp aus der Super-Klasse - * Literal, weil die Implementierung von Unify (noch) nicht mit - * Basetypes umgehen kann.
- * Anstatt den Basetype IntegerType zur�ckzugeben, wird ein - * RefType zur�ckgegeben.
- * Diese Methode kann sp�ter entfernt werden, sodass automatisch die Methode der - * Super-Klasse verwendet wird. - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRExp.25481.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25481.body - { - CTripleSet tripleSet = new CTripleSet(); - tripleSet.addElement(new CTriple(sigma, new RefType("java.lang.Long",getOffset()),V)); - return tripleSet; - } - // ino.end - // ino.method.toString.25484.defdescription type=javadoc /** *
Author: Martin Pl�micke diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java index 113fb6933..e635fdf42 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java @@ -2,79 +2,26 @@ package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.MethodCall.8639.import -import java.util.Enumeration; import java.util.Hashtable; -import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CIntersectionType; -import mycompiler.mytypereconstruction.CMultiplyTuple; -import mycompiler.mytypereconstruction.CSubstitution; -import mycompiler.mytypereconstruction.CSubstitutionGenVar; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CMultiplyTupleSet; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; -import de.dhbwstuttgart.bytecode.JVMCode; -import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.JVMCodeException; -import de.dhbwstuttgart.myexception.SCExcept; -import de.dhbwstuttgart.myexception.SCStatementException; -import de.dhbwstuttgart.syntaxtree.Class; -import de.dhbwstuttgart.syntaxtree.ClassBody; -import de.dhbwstuttgart.syntaxtree.FormalParameter; import de.dhbwstuttgart.syntaxtree.Method; -import de.dhbwstuttgart.syntaxtree.ParameterList; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; -import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.misc.UsedId; -import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; -import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Void; import de.dhbwstuttgart.typeinference.ConstraintsSet; -import de.dhbwstuttgart.typeinference.FreshTypeVariable; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.Overloading; import de.dhbwstuttgart.typeinference.ResultSet; -import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; -import de.dhbwstuttgart.typeinference.unify.FC_TTO; -import de.dhbwstuttgart.typeinference.unify.Unify; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -93,16 +40,6 @@ public class MethodCall extends Expr } // ino.end - // ino.attribute.OK.25630.declaration - private static final int OK = 0; - // ino.end - // ino.attribute.UNIFY_ERROR.25633.declaration - private static final int UNIFY_ERROR = 1; - // ino.end - // ino.attribute.METHOD_NOT_FOUND_ERROR.25636.declaration - private static final int METHOD_NOT_FOUND_ERROR = 2; - // ino.end - // ino.attribute.receiver.25639.declaration /** @@ -112,34 +49,7 @@ public class MethodCall extends Expr // ino.end // ino.attribute.arglist.25642.declaration private ArgumentList arglist=new ArgumentList(); - // ino.end - private Vector exprtypes=new Vector(); //hier werden die Typen der �bergabewerten von sc_check eingetragen. - // ino.attribute.class_name.25645.declaration - private String class_name; //hier steht in welcher Klasse die Methode deklariert ist. - // ino.end - // ino.attribute.uebernachdurch.25651.declaration - private Hashtable uebernachdurch; - // ino.end - // ino.attribute.finde_method.25654.declaration - private Vector> finde_method=new Vector>(); - // ino.end - // ino.attribute.counter.25657.declaration - private int counter; - // ino.end - - // ino.attribute.methodsFittingMethodCall.25660.decldescription type=javadoc - /** - * Da der SemanticCheck nicht mehr ausgeführt wird, werden hier die bei der - * Typrekonstruktion gefundenen Methoden abgespeichert. Problem ist hier jedoch, - * dass der receiver in diesem Moment noch nicht fest steht. Deshalb wird je - * Receiver ein Methodcall abgelegt. Dieser kann dann mit bspw. - * methodsFittingMethodCAll.get("Vector") abgerufen werden. - */ - // ino.end - // ino.attribute.methodsFittingMethodCall.25660.declaration - private Hashtable methodsFittingMethodCall=new Hashtable(); - // ino.end // ino.attribute.parserlog.25663.declaration protected static Logger parserlog = Logger.getLogger("parser"); // ino.end @@ -223,408 +133,10 @@ public class MethodCall extends Expr } // ino.end - // ino.method.getMethodFittingMethodCallAndClassname.25705.defdescription type=javadoc - /** - * hoti 4.5.06 - * Diese Methode lädt die Methodeninfos einer Methode aus der Hashtable - * methodsfittingmethodcall in ein Method-Objekt - * anhand der angegeben klasse - * @see methodsFittingMethodCall - * @param className - * @return - * @throws JVMCodeException - */ - // ino.end - // ino.method.getMethodFittingMethodCallAndClassname.25705.definition - public Method getMethodFittingMethodCallAndClassname(String className) - throws JVMCodeException - // ino.end - // ino.method.getMethodFittingMethodCallAndClassname.25705.body - { - CMethodTypeAssumption assumption=methodsFittingMethodCall.get(className); - if(assumption==null){ - throw new JVMCodeException("Codegen: Fuer die Klasse "+className+" wurde die Methode "+usedid.get_Name_1Element()+" nicht gefunden"); - } - Vector paraAssumptions=assumption.getParaAssumptions(); - Type returnType=assumption.getAssumedType(); - Method meth=new Method(0); - Vector parameterVector=new Vector(); - ParameterList pl=new ParameterList(); - for(int i=0;i nichterkannte) kann kein Methodenaufruf ausgeführt werden - // Es muss sich also um einen RefType handeln. Ansonsten gibt es einen Fehler - - if(!(receiver.get_Expr().getType() instanceof RefType)){ - throw new JVMCodeException("Es kann nur auf ein RefType ein Methodenaufruf ausgeführt werden ("+receiver+"["+receiver.get_Expr().getType()+"])"); - } - - // HOTI 4.5.06 - // Es handelt sich also um einen RefType. Der Klassenname wird nun bezogen - String receiverClassName=((RefType)receiver.get_Expr().getType()).getTypeName(); - - // Die richtige Methode wird gesucht und gesetzt - Method called_method=getMethodFittingMethodCallAndClassname(receiverClassName); - - - Vector name_vector = get_Name_Vector(); - String local_name = receiver.get_Expr().get_Name(); - - // Richtiges Objekt auf den Stack legen - int index = code.get_indexOf_Var(local_name); - - if (index != -1 ) { // Lokale Variable - try { - JavaClassName local_type = code.get_TypeOf_Var(local_name) - .getName(); - code.add_code(JVMCode.nload_n(local_type.toString(), index)); - } catch (JVMCodeException e) { // out of nload_n - JavaClassName local_type = code.get_TypeOf_Var(local_name) - .getName(); - code.add_code(JVMCode.nload(local_type.toString())); - code.add_code_byte((byte) index); - } - } else { // FieldVariable - code.add_code(JVMCode.aload_0); - code.add_code(JVMCode.getfield); - code.add_code_short(classfile.add_field_ref(local_name, - class_name, JVMCode.get_codegen_Type(receiver.get_Type(), null))); - } - - String called_method_name = called_method.get_Method_Name(); - if (called_method_name == null) - called_method_name = (String) name_vector.lastElement(); - // feda 04.07.07 an dieser Stelle muss geschaut werden ob - // die Methode eine Static Methode ist. - // Wenn Static dann aload_0 weg und anstellen von - // code.add_code(JVMCode.invokevirtual); muss - // code.add_code(JVMCode.invokestatic); stehen. - - - if (arglist != null) - arglist.codegen(classfile, code, paralist); - code.add_code(JVMCode.invokevirtual); - code.add_code_short(classfile.add_method_ref(receiverClassName, - called_method_name, called_method - .get_codegen_Param_Type(paralist))); - } -// ino.end + - // ino.method.makeReceiver.25714.definition - private void makeReceiver() - // ino.end - // ino.method.makeReceiver.25714.body - { - usedid.get_Name().remove(usedid.get_Name().size()-1); //Methodenname loeschen - Iterator namen = usedid.get_Name().iterator(); - LocalOrFieldVar LOFV = new LocalOrFieldVar((String)namen.next(),getOffset()); - LOFV.setType(TypePlaceholder.fresh(this)); - receiver = new Receiver(LOFV); - while(namen.hasNext()) { - InstVar INSTVA = new InstVar(receiver.get_Expr(), (String)namen.next(),getOffset()); - INSTVA.setType(TypePlaceholder.fresh(this)); - receiver = new Receiver(INSTVA); - } - } - // ino.end - - - - - // ino.method.addMethodAndSuperclassMethodsToFittings.25726.defdescription type=javadoc - /** - * HOTI 4.5.06-15.5.06 - * Fügt diese Klasse mit deren Typannahme in den Vektor ein. - * Da aber auch die Subklassen alle die Methodenproperties haben - * können müssen die mit rein... - * @param classToAdd - * @param methodAssumCopy - * @param fc - */ - // ino.end - // ino.method.addMethodAndSuperclassMethodsToFittings.25726.definition - private void addMethodAndSuperclassMethodsToFittings(RefType classToAdd, CMethodTypeAssumption methodAssumCopy, FC_TTO fctto) - // ino.end - // ino.method.addMethodAndSuperclassMethodsToFittings.25726.body - { - methodsFittingMethodCall.put(classToAdd.getTypeName(),methodAssumCopy); - // Input: Klasse Vector - // Output: Alle Klassen <= Vector ... ohne Parameter - RefType cloneRT=classToAdd.clone(); - CSubstitutionSet sub=cloneRT.GenericTypeVar2TypePlaceholder(); - sub.applyThisSubstitutionSet(cloneRT); - Vector vec=sub.getVector(); - for(int i=0;i> test=Unify.instanceSmaller(pair,fctto); - for(int j=0;jhandleMethodAssum().
Author: J�rg B�uerle - * @param multiTuple - * @param possibleTypeComb - * @param returnSet - * @param className - * @param methodName - * @param paraCount - * @param methodsFittingMethodCall Hashtable in der jede erfolgreiche Methode - * abgelegt wird @param supportData - * @return Einen Error-Code: OK, UNIFY_ERROR oder - * METHOD_NOT_FOUND_ERROR - */ - // ino.end - // ino.method.searchAndHandleMethod.25729.definition - private int searchAndHandleMethod(CMultiplyTuple multiTuple, CTypeAssumptionSet V, CTripleSet returnSet, RefType classType, String methodName, int paraCount, CSupportData supportData, Hashtable methodsFittingMethodCall) - // ino.end - // ino.method.searchAndHandleMethod.25729.body - { - // -------------------------- - // Typannahme f�r Methode heraussuchen: - // -------------------------- - - String className; - if(classType instanceof RefType){ - className=((RefType)classType).getTypeName(); - }else{ - className=classType.getName().toString(); - } - - CMethodKey key = new CMethodKey( - className, - methodName, - paraCount - ); - - Vector methodAssums = V.getElements(key); - - - // Wenn die Methode nicht fuendig war: - - if(methodAssums.size()==0){ - return METHOD_NOT_FOUND_ERROR; - } - - // Fuendig: Alle Methoden, die "xxx" heißen und y Parameter haben sind nun in dem Vector drin - // Für alle soll jetzt geschaut werden - - int wellDoneFunctionCount=0; - - for(int item=0;item typeGenPara = supportData.getCurrentClassPara(); - - // Generics der Methode holen - // p.ex. E test(){...} - // ___________________ - Vector genericMethodParameters=methodAssum.getGenericMethodParameters(); - - // Klassengenerics verarbeiten - Vector typePara = null; - if (typeGenPara != null) { - typePara = new Vector(); - for( int i = 0; i < typeGenPara.size(); i++ ) - { - typePara.addElement(typeGenPara.elementAt(i)); - } - } - - // Methodengenerics verarbeiten - Vector additionalPairsToUnify=new Vector(); - - if (genericMethodParameters != null && genericMethodParameters.size()>0) { - - CSubstitutionSet sub = new CSubstitutionSet(); - - for( int i = 0; i < genericMethodParameters.size(); i++ ){ - - - if(genericMethodParameters.elementAt(i) instanceof BoundedGenericTypeVar){ - // Jede Bound als Paar zum Unifizieren vormerken - TypePlaceholder newTLV=TypePlaceholder.fresh(this); - BoundedGenericTypeVar bgtv=(BoundedGenericTypeVar)genericMethodParameters.elementAt(i); - for(int j=0;jAuthor: J�rg B�uerle - * @param multiTuple - * @param returnSet - * @param methodAssum - * @param className - * @param supportData - * @param additionalPairsToUnify - * @return Einen Error-Code: OK, UNIFY_ERROR oder - * METHOD_NOT_FOUND_ERROR - */ - // ino.end - // ino.method.handleMethodAssum.25732.definition - private static int handleMethodAssum(CMultiplyTuple multiTuple, Vector typePara, CTripleSet returnSet, CMethodTypeAssumption methodAssum, Type classType, CSupportData supportData, Vector additionalPairsToUnify) - // ino.end - // ino.method.handleMethodAssum.25732.body - { - // -------------------------- - // Typen unifizieren: - // -------------------------- - - // Vorerst Paare zum Unifizieren bilden - Vector pairsToUnify = createPairsToUnify(multiTuple, typePara, classType, methodAssum); - - // Vorgemerkte Paare - if(pairsToUnify!=null && additionalPairsToUnify!=null) - pairsToUnify.addAll(additionalPairsToUnify); - - // Die Paare endlich unifizieren - Vector> unifierPossibilities = Unify.unify(pairsToUnify, supportData.getFiniteClosure()); - // -------------------------- - // Wenn Unifier vorhanden, dann anwenden: - // -------------------------- - if(unifierPossibilities.size()!=0){ - // -------------------------- - // Subset bauen: - // -------------------------- - CTripleSet subSet = new CTripleSet(); - // -------------------------- - // Alle Unifer durchgehen: - // -------------------------- - for(int j=0; jAuthor: J�rg B�uerle - * @param multiTuple - * @param receiverClass - * @param methodAssum - * @return - */ - // ino.end - // ino.method.createPairsToUnify.25735.definition - private static Vector createPairsToUnify(CMultiplyTuple multiTuple, Vector typePara, Type receiverClass, CMethodTypeAssumption methodAssum) - // ino.end - // ino.method.createPairsToUnify.25735.body - { - Vector pairList = new Vector(); - Pair p = new Pair(multiTuple.getResultTypes().firstElement(), receiverClass); - pairList.addElement(p); - for(int i=1; iAuthor: Martin Pl�micke @@ -648,20 +160,7 @@ public class MethodCall extends Expr { } // ino.end - - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - if(this.get_Receiver()!=null) - { - this.get_Receiver().get_Expr().addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } - if(this.getArgumentList()!=null){ - for(Expr n : this.getArgumentList().expr) - { - n.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - }} - } - + /** * @author Andreas Stadelmeier, a10023 * @return der Name der Methode, welcher dieser MethodCall aufruft. @@ -738,6 +237,13 @@ public class MethodCall extends Expr public void parserPostProcessing(SyntaxTreeNode parent) { super.parserPostProcessing(parent); } + + @Override + public void codegen(ClassFile classfile, CodeAttribute code, Vector paralist) + throws JVMCodeException { + // TODO Auto-generated method stub + + } } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java index 2efdd2e8b..6d9aa6f46 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java @@ -6,29 +6,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; @@ -46,6 +25,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -140,11 +120,6 @@ public class NegativeExpr extends UnaryExpr } // ino.end - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } - @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { // TODO Auto-generated method stub diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java index 3a9214832..94e9af5c9 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java @@ -5,27 +5,8 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -39,6 +20,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -153,33 +135,7 @@ public class NewArray extends Expr } // ino.end - // ino.method.TRExp.25821.defdescription type=javadoc - /** - * Implementierung des Algorithmus 5.32 von Martin Pl�micke - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRExp.25821.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25821.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - // ino.method.TRStatement.25824.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25824.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end // ino.method.wandleRefTypeAttributes2GenericAttributes.25827.definition public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) // ino.end @@ -187,20 +143,6 @@ public class NewArray extends Expr { } // ino.end - - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - if(this.get_UsedId().get_Name_1Element().equals(NameVariable)) - { - //wenn Variable mit gleichem Namen gefunden->schreibe Offset - localAssumption.addOffset(this.get_UsedId().getOffset()); - } - if(this.expr!=null){ - for(Expr n : this.expr) - { - n.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - }} - } @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java index 3b6733a9b..9e562ef0e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java @@ -7,37 +7,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CMultiplyTuple; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CMultiplyTupleSet; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -64,6 +35,7 @@ import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.ConstructorAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -226,20 +198,6 @@ public class NewClass extends Expr } // ino.end - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - if(this.get_UsedId().get_Name_1Element().equals(NameVariable)) - { - //wenn Variable mit gleichem Namen gefunden->schreibe Offset - localAssumption.addOffset(this.get_UsedId().getOffset()); - } - if(this.getArgumentList()!=null){ - for(Expr n : this.getArgumentList().expr) - { - n.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - }} - } - @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { //TODO: Das hier noch vervollständigen diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java index c92bce5ef..26a546599 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java @@ -6,31 +6,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; @@ -49,6 +25,7 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.OderConstraint; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -163,11 +140,6 @@ public class NotExpr extends UnaryExpr } // ino.end - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } - @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { ConstraintsSet ret = new ConstraintsSet(); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java index 3f81ed763..53e739172 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java @@ -5,28 +5,8 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -41,6 +21,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -94,24 +75,6 @@ public class Null extends Literal } // ino.end - // ino.method.TRStatement.25938.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25938.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - // ino.method.TRExp.25941.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25941.body - { - CTripleSet tripleSet = new CTripleSet(); - tripleSet.addElement(new CTriple(sigma, TypePlaceholder.fresh(this) ,V)); - return tripleSet; - } // ino.end // ino.method.wandleRefTypeAttributes2GenericAttributes.25944.definition public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java index e67d6a250..bea0c19dd 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java @@ -5,27 +5,8 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; @@ -38,6 +19,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -113,23 +95,6 @@ public class PositivExpr extends UnaryExpr {} // ino.end - // ino.method.TRExp.25978.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25978.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - // ino.method.TRStatement.25981.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25981.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end // ino.method.wandleRefTypeAttributes2GenericAttributes.25984.definition public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) // ino.end @@ -138,10 +103,6 @@ public class PositivExpr extends UnaryExpr } // ino.end - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java index 9e22a4b1e..0b97d2e76 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java @@ -6,29 +6,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -47,6 +26,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -174,11 +154,6 @@ public class PostDecExpr extends UnaryExpr { } // ino.end - - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java index badcceb16..5c96c4c68 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java @@ -6,32 +6,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -53,6 +28,7 @@ import de.dhbwstuttgart.typeinference.OderConstraint; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -181,11 +157,6 @@ public class PostIncExpr extends UnaryExpr { } // ino.end - - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java index 8ee14021f..aeae83ae7 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java @@ -6,29 +6,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -47,6 +25,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -175,11 +154,6 @@ public class PreDecExpr extends UnaryExpr } // ino.end - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } - @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { // TODO Auto-generated method stub diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java index 546c71713..56d2f92c2 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java @@ -6,29 +6,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -47,6 +25,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -176,11 +155,6 @@ public class PreIncExpr extends UnaryExpr } // ino.end - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } - @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { // TODO Auto-generated method stub diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Return.java b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java index 6400f0c07..d101cecd1 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Return.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java @@ -5,28 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -45,6 +24,7 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -117,12 +97,6 @@ public class Return extends Statement { } // ino.end - - public boolean addOffsetsToStatement(CTypeAssumption localAssumption, String NameVariable, boolean isMemberVariable) - { - retexpr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - return true; - } @Override public ConstraintsSet TYPEStmt(TypeAssumptions assumptions) { @@ -133,11 +107,7 @@ public class Return extends Statement ret.add(new SingleConstraint(retexpr.getType(), this.getType())); return ret; } - - public void replaceType(CReplaceTypeEvent e) { - super.replaceType(e); - } - + public int getTypeLineNumber() { return 0; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java b/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java index 685192624..1d03d840f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java @@ -24,20 +24,11 @@ import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.Typeable; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -// ino.end - // ino.class.Statement.26184.declaration -public abstract class Statement extends SyntaxTreeNode implements IItemWithOffset, Typeable, ITypeReplacementListener +public abstract class Statement extends SyntaxTreeNode implements IItemWithOffset, Typeable // ino.end // ino.class.Statement.26184.body { @@ -91,8 +82,6 @@ public abstract class Statement extends SyntaxTreeNode implements IItemWithOffse public abstract void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters); // ino.end - public abstract boolean addOffsetsToStatement(CTypeAssumption localAssumption, String NameVariable, boolean isMemberVariable); - /** * @author AI10023 - Andreas Stadelmeier * Implementierung des Java 8 - Typinferenzalgorithmus von Martin Plümicke @@ -124,22 +113,8 @@ public abstract class Statement extends SyntaxTreeNode implements IItemWithOffse */ public void setType(Type t) { - if(this.getType() instanceof TypePlaceholder){ - ((TypePlaceholder)this.getType()).removeReplacementListener(this); - } - if(t instanceof TypePlaceholder){ - ((TypePlaceholder)t).addReplacementListener(this); - } this.type=t; } - - public void replaceType(CReplaceTypeEvent e) - { - if(getType() instanceof TypePlaceholder){ - ((TypePlaceholder)getType()).removeReplacementListener(this); - } - this.setType(e.getNewType()); - } public abstract JavaCodeResult printJavaCode(ResultSet resultSet); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java index 92cea66e0..36df626d6 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java @@ -5,29 +5,8 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -44,6 +23,7 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -131,15 +111,6 @@ public class StringLiteral extends Literal } // ino.end - - // ino.method.TRStatement.26255.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.26255.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end // ino.method.wandleRefTypeAttributes2GenericAttributes.26258.definition public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/This.java b/src/de/dhbwstuttgart/syntaxtree/statement/This.java index d33e59ffc..7733b5aac 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/This.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/This.java @@ -5,29 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -44,6 +22,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -127,43 +106,6 @@ public class This extends Expr { return null; } // ino.end - // ino.method.TRExp.26289.defdescription type=javadoc - /** - * Implementierung des Algorithmus 5.35 von Martin Pl�micke - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRExp.26289.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.26289.body - { - CTripleSet ret = new CTripleSet(); - RefType newType; - Type supportDataType=supportData.getCurrentClassType(); - if(supportDataType instanceof RefType){ - newType=(RefType)supportDataType; - }else{ - newType=new RefType(supportData.getCurrentClass(),getOffset()); - } - this.type=newType; - ret.addElement(new CTriple(sigma, newType,V)); - return ret; - } - // ino.end - - // ino.method.TRStatement.26292.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.26292.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end // ino.method.wandleRefTypeAttributes2GenericAttributes.26295.definition public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) @@ -172,15 +114,6 @@ public class This extends Expr { } // ino.end - - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - if(this.arglist.expr!=null){ - for(Expr n : this.arglist.expr) - { - n.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - }} - } @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java index 5176123a1..2911adb36 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java @@ -7,31 +7,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -54,6 +31,7 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import de.dhbwstuttgart.typeinference.unify.Unify; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -183,13 +161,6 @@ public class WhileStmt extends Statement } // ino.end - public boolean addOffsetsToStatement(CTypeAssumption localAssumption, String NameVariable, boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - loop_block.addOffsetsToStatement(localAssumption,NameVariable,isMemberVariable); - return true; - } - @Override public ConstraintsSet TYPEStmt(TypeAssumptions assumptions) { ConstraintsSet ret = new ConstraintsSet(); @@ -201,11 +172,6 @@ public class WhileStmt extends Statement return ret; } - public void replaceType(CReplaceTypeEvent e) { - // TODO Auto-generated method stub - throw new NotImplementedException(); - } - public int getTypeLineNumber() { throw new NotImplementedException(); } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/CRefTypeSet.java b/src/de/dhbwstuttgart/syntaxtree/type/CRefTypeSet.java index 9c909450b..80c6d3cac 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/CRefTypeSet.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/CRefTypeSet.java @@ -3,7 +3,7 @@ package de.dhbwstuttgart.syntaxtree.type; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.set.CVectorSet; +import de.dhbwstuttgart.typeinference.unify.CVectorSet; public class CRefTypeSet extends CVectorSet { diff --git a/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java index fd24670e6..d3bd6f3fa 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java @@ -2,9 +2,9 @@ package de.dhbwstuttgart.syntaxtree.type; import java.util.Vector; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; import sun.reflect.generics.reflectiveObjects.NotImplementedException; public class FreshWildcardType extends Type { diff --git a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java index 4af912ebf..4560edd81 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java @@ -6,34 +6,14 @@ package de.dhbwstuttgart.syntaxtree.type; import java.util.HashMap; import java.util.Iterator; import java.util.Vector; -// ino.end - - - - - - - - - - - - - - - - - import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; // ino.class.GenericTypeVar.26505.description type=javadoc /** @@ -188,7 +168,7 @@ public class GenericTypeVar extends Type public TypePlaceholder getTypePlaceHolder() { if(!GenericTypeVar.tph.containsKey(this)){ - GenericTypeVar.tph.put(this, TypePlaceholder.fresh(this.getName().toString())); + GenericTypeVar.tph.put(this, TypePlaceholder.fresh(this.getName().toString(),this)); } return GenericTypeVar.tph.get(this); //if(this.tph == null)this.tph = TypePlaceholder.fresh(); diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Pair.java b/src/de/dhbwstuttgart/syntaxtree/type/Pair.java index 7ba5056cc..81f84404f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Pair.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Pair.java @@ -6,7 +6,8 @@ import java.util.Hashtable; import java.util.Vector; // ino.end -import de.dhbwstuttgart.typeinference.parser.JavaClassName; + +import de.dhbwstuttgart.parser.JavaClassName; diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java index bbf164e9b..9bac8e697 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -8,38 +8,20 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSubstitutionGenVar; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.myexception.SCException; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionGenVar; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -208,7 +190,7 @@ public class RefType extends Type implements IMatchable { if (parameter.elementAt(i) instanceof GenericTypeVar) { - TypePlaceholder tlv = TypePlaceholder.fresh(); + TypePlaceholder tlv = TypePlaceholder.fresh(null); sub.addElement(new CSubstitutionGenVar((GenericTypeVar)parameter.elementAt(i), tlv)); parameter.set(i, tlv); } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Type.java b/src/de/dhbwstuttgart/syntaxtree/type/Type.java index 3573d3087..8fab0c18b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Type.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Type.java @@ -7,19 +7,19 @@ import java.util.Vector; import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; // ino.class.Type.26716.declaration -public class Type implements IItemWithOffset +public class Type extends SyntaxTreeNode implements IItemWithOffset // ino.end // ino.class.Type.26716.body { @@ -301,6 +301,11 @@ public class Type implements IItemWithOffset Vector ret = new Vector<>(); return ret; } + + @Override + public Vector getChildren() { + return new Vector<>(); + } } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java b/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java index d861b5ba5..2e65d172b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java @@ -9,17 +9,13 @@ import java.util.Vector; import java.util.logging.Logger; import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.parser.JavaClassName; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.replacementlistener.IReplaceTypeEventProvider; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; -// ino.end - // ino.class.TypePlaceholder.26780.description type=javadoc /** * Repr�sentiert einen Typparameter f�r einen vom Programmierer nicht angegeben @@ -31,7 +27,7 @@ import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListe */ // ino.end // ino.class.TypePlaceholder.26780.declaration -public class TypePlaceholder extends Type implements IReplaceTypeEventProvider +public class TypePlaceholder extends Type // ino.end // ino.class.TypePlaceholder.26780.body { @@ -41,10 +37,8 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider // ino.attribute.m_TypePlaceholdersRegistry.26788.declaration private static Hashtable m_TypePlaceholdersRegistry = new Hashtable(); // ino.end - - // ino.attribute.m_ReplacementListeners.26791.declaration - private Vector m_ReplacementListeners; - // ino.end + private SyntaxTreeNode parent; + // ino.method.TypePlaceholder.26794.defdescription type=javadoc /** @@ -55,13 +49,13 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider */ // ino.end // ino.method.TypePlaceholder.26794.definition - private TypePlaceholder(String typeName) + private TypePlaceholder(String typeName, SyntaxTreeNode parent) // ino.end // ino.method.TypePlaceholder.26794.body { super(-1); this.name = new JavaClassName(typeName); - m_ReplacementListeners = new Vector(); + this.parent = parent; } // ino.end @@ -83,36 +77,17 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider } // ino.end - // ino.method.fresh.26800.defdescription type=javadoc - /** - * Erzeugt eine neue TypePlaceholder mit einem eindeutigen Namen. Die - * erzeugte Instanz ist die einzig im Syntaxbaum existierende Instanz dieser - * Variablen.
Author: J�rg B�uerle - * @return Die TypePlaceholder - */ - // ino.end - // ino.method.fresh.26800.definition - public static TypePlaceholder fresh() - // ino.end - // ino.method.fresh.26800.body - { - TypePlaceholder typeVar = new TypePlaceholder(makeNewName()); - m_TypePlaceholdersRegistry.put(typeVar.getName(), typeVar); - return typeVar; - } - // ino.end - /** * Generiert einen neuen TPH mit einem bestimmten Namen. * Wird benötigt, wenn aus Generischen Variablen TPH generiert werden. * @param name * @return */ - public static TypePlaceholder fresh(String name) + public static TypePlaceholder fresh(String name, SyntaxTreeNode parent) // ino.end // ino.method.fresh.26800.body { - TypePlaceholder typeVar = new TypePlaceholder(name); + TypePlaceholder typeVar = new TypePlaceholder(name, parent); TypePlaceholder oldTPH = m_TypePlaceholdersRegistry.put(typeVar.getName(), typeVar); if(oldTPH != null){ oldTPH.name = new JavaClassName(makeNewName()); @@ -130,10 +105,9 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider * @param listener * @return */ - public static TypePlaceholder fresh(ITypeReplacementListener listener){ - TypePlaceholder ret = fresh(); - //System.out.println(""+ret+" -> "+listener); - ret.addReplacementListener(listener); + public static TypePlaceholder fresh(SyntaxTreeNode parent){ + TypePlaceholder ret= new TypePlaceholder(makeNewName(), parent); + m_TypePlaceholdersRegistry.put(ret.getName(), ret); return ret; } @@ -258,134 +232,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider } // ino.end - // ino.method.addReplacementListener.26815.defdescription type=javadoc - /** - *
Author: J�rg B�uerle - * @param listener - */ - // ino.end - // ino.method.addReplacementListener.26815.definition - public void addReplacementListener(ITypeReplacementListener listener) - // ino.end - // ino.method.addReplacementListener.26815.body - { - if(!this.containsListener(listener)){ - m_ReplacementListeners.addElement(listener); - } - } - // ino.end - // ino.method.containsListener.26818.defdescription type=javadoc - /** - *
Author: J�rg B�uerle - * @param listener - * @return - */ - // ino.end - // ino.method.containsListener.26818.definition - public boolean containsListener(ITypeReplacementListener listener) - // ino.end - // ino.method.containsListener.26818.body - { - return m_ReplacementListeners.contains(listener); - } - // ino.end - - // ino.method.removeReplacementListener.26821.defdescription type=javadoc - /** - *
Author: J�rg B�uerle - * @param listener - */ - // ino.end - // ino.method.removeReplacementListener.26821.definition - public void removeReplacementListener(ITypeReplacementListener listener) - // ino.end - // ino.method.removeReplacementListener.26821.body - { - m_ReplacementListeners.removeElement(listener); - } - // ino.end - - // ino.method.removeAllReplacementListeners.26824.defdescription type=javadoc - /** - *
Author: J�rg B�uerle - */ - // ino.end - // ino.method.removeAllReplacementListeners.26824.definition - public void removeAllReplacementListeners() - // ino.end - // ino.method.removeAllReplacementListeners.26824.body - { - m_ReplacementListeners.removeAllElements(); - } - // ino.end - - // ino.method.fireReplaceTypeEvent.26827.defdescription type=javadoc - /** - *
Author: J�rg B�uerle - * @param e - */ - // ino.end - // ino.method.fireReplaceTypeEvent.26827.definition - public void fireReplaceTypeEvent(CReplaceTypeEvent e) - // ino.end - // ino.method.fireReplaceTypeEvent.26827.body - { - for(int i=0; iAuthor: J�rg B�uerle - * @return - */ - // ino.end - // ino.method.getReplacementListeners.26830.definition - public Iterator getReplacementListeners() - // ino.end - // ino.method.getReplacementListeners.26830.body - { - return m_ReplacementListeners.iterator(); - } - // ino.end - - // ino.method.replaceWithType.26833.defdescription type=javadoc - /** - * Diese Methode geht alle TypeReplacmentListener durch und tauscht �ber deren - * Callback-Methode diesen Typ gegen den neuen aus. - *
Author: J�rg B�uerle - * @param newType - */ - // ino.end - // ino.method.replaceWithType.26833.definition - public void replaceWithType(Type newType) - // ino.end - // ino.method.replaceWithType.26833.body - { - this.fireReplaceTypeEvent(new CReplaceTypeEvent(this, newType)); - } - // ino.end - - // ino.method.getLineNumbers.26836.definition - public Vector getLineNumbers() - // ino.end - // ino.method.getLineNumbers.26836.body - { - Vector lineNumbers = new Vector(); - for(int i=0; i)m_ReplacementListeners.clone(); + TypePlaceholder dolly = new TypePlaceholder(name.toString(), this.parent); return dolly; } // ino.end @@ -467,7 +313,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider //backdoorvars werden registiert, weil am Ende beim execute //auf den CSubstitution nicht registrierte Variablen zu //Exceptions fuehrt - TypePlaceholder typeVar = new TypePlaceholder(makeNewName()); + TypePlaceholder typeVar = new TypePlaceholder(makeNewName(), null); m_TypePlaceholdersRegistry.put(typeVar.getName(), typeVar); return typeVar; @@ -517,7 +363,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider //backdoorvars werden registiert, weil am Ende beim execute //auf den CSubstitution nicht registrierte Variablen zu //Exceptions fuehrt - TypePlaceholder typeVar = new TypePlaceholder(name); + TypePlaceholder typeVar = new TypePlaceholder(name, null); m_TypePlaceholdersRegistry.put(typeVar.getName(), typeVar); return typeVar; @@ -554,12 +400,10 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider */ public Vector getTypeInsertPoints(ResultSet result) { Vector ret = new Vector(); - for(ITypeReplacementListener ti : this.m_ReplacementListeners){ - if(ti instanceof TypeInsertable){ - TypeInsertPoint toAdd = ((TypeInsertable) ti).createTypeInsertPoint(this, result); - if(toAdd != null)ret.add(toAdd); - //ret.add(new TypeInsertPoint(this, (TypeInsertable)ti, result.getTypeEqualTo(this), result)); - } + if(this.parent instanceof TypeInsertable){ + TypeInsertPoint toAdd = ((TypeInsertable) parent).createTypeInsertPoint(this, result); + if(toAdd != null)ret.add(toAdd); + //ret.add(new TypeInsertPoint(this, (TypeInsertable)ti, result.getTypeEqualTo(this), result)); } return ret; } diff --git a/src/de/dhbwstuttgart/typeinference/FunN.java b/src/de/dhbwstuttgart/typeinference/FunN.java index bf1ae84b3..5a21d03d5 100755 --- a/src/de/dhbwstuttgart/typeinference/FunN.java +++ b/src/de/dhbwstuttgart/typeinference/FunN.java @@ -4,6 +4,7 @@ package de.dhbwstuttgart.typeinference; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Method; import de.dhbwstuttgart.syntaxtree.ParameterList; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -12,10 +13,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; /** * @see Spezifikation "Complete Typeinference in Java 8" von Martin Plümicke @@ -26,7 +23,7 @@ import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; * FunN ist ein RefType. Der RefType ist nicht mit einem FunNInterface verbunden. * */ -public class FunN extends RefType implements ITypeReplacementListener{ +public class FunN extends RefType { private Type R; private Vector T; @@ -89,16 +86,10 @@ public class FunN extends RefType implements ITypeReplacementListener{ protected void setT(Vector T){ this.T = T; calculateNewParalist(); - //ReplacementListener registrieren: - for(Type t : T)if(t instanceof TypePlaceholder)((TypePlaceholder)t).addReplacementListener(this); } protected void setR(Type R){ this.R = R; calculateNewParalist(); - //Sind die übergebenen Typen TypePlaceholder, so soll die FunN über TypReplacements informiert werden. - if(R instanceof TypePlaceholder){ - ((TypePlaceholder)R).addReplacementListener(this); - } } /* @@ -112,15 +103,7 @@ public class FunN extends RefType implements ITypeReplacementListener{ return ret; } */ - public void replaceType(CReplaceTypeEvent e) { - if(R.equals(e.getOldType()))this.setR(e.getNewType()); - for(Type t : T){ - if(t.equals(e.getOldType())){ - T.setElementAt(e.getNewType(),T.indexOf(t)); - this.setT(T); - } - } - } + public int getTypeLineNumber() { // TODO Auto-generated method stub diff --git a/src/de/dhbwstuttgart/typeinference/FunNInterface.java b/src/de/dhbwstuttgart/typeinference/FunNInterface.java index b19ddc02a..ac64a8a33 100644 --- a/src/de/dhbwstuttgart/typeinference/FunNInterface.java +++ b/src/de/dhbwstuttgart/typeinference/FunNInterface.java @@ -9,7 +9,6 @@ import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.assumptions.ClassAssumption; import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; -import mycompiler.mytype.*; /** * Stellt das Interface FunN dar. diff --git a/src/de/dhbwstuttgart/typeinference/FunNMethod.java b/src/de/dhbwstuttgart/typeinference/FunNMethod.java index bb61be65c..07b8acf81 100644 --- a/src/de/dhbwstuttgart/typeinference/FunNMethod.java +++ b/src/de/dhbwstuttgart/typeinference/FunNMethod.java @@ -9,8 +9,6 @@ import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; -import mycompiler.mytype.*; -import mycompiler.myclass.*; public class FunNMethod extends Method{ /** diff --git a/src/de/dhbwstuttgart/typeinference/Overloading.java b/src/de/dhbwstuttgart/typeinference/Overloading.java index c06421ec8..b2d7dfae6 100755 --- a/src/de/dhbwstuttgart/typeinference/Overloading.java +++ b/src/de/dhbwstuttgart/typeinference/Overloading.java @@ -10,8 +10,6 @@ import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; /** * diff --git a/src/de/dhbwstuttgart/typeinference/TypeInsertable.java b/src/de/dhbwstuttgart/typeinference/TypeInsertable.java index bd283a5e6..39411208e 100644 --- a/src/de/dhbwstuttgart/typeinference/TypeInsertable.java +++ b/src/de/dhbwstuttgart/typeinference/TypeInsertable.java @@ -3,9 +3,8 @@ package de.dhbwstuttgart.typeinference; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; -public interface TypeInsertable extends ITypeReplacementListener, Typeable, IItemWithOffset { +public interface TypeInsertable extends Typeable, IItemWithOffset { public int getOffset(); public void setOffset(int offset); diff --git a/src/de/dhbwstuttgart/typeinference/Typeable.java b/src/de/dhbwstuttgart/typeinference/Typeable.java index bfcc35597..72c902d3f 100755 --- a/src/de/dhbwstuttgart/typeinference/Typeable.java +++ b/src/de/dhbwstuttgart/typeinference/Typeable.java @@ -1,7 +1,6 @@ package de.dhbwstuttgart.typeinference; import de.dhbwstuttgart.syntaxtree.type.Type; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; public interface Typeable { /** diff --git a/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java b/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java index 77eee7599..fe0e79ea3 100755 --- a/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java +++ b/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java @@ -16,13 +16,7 @@ import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; -import mycompiler.mytypereconstruction.typeassumptionkey.CTypeAssumptionKey; -// ino.end +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; // ino.class.CTypeReconstructionResult.27238.description type=javadoc /** diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/Assumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/Assumption.java index d95089ca3..837dcfa4e 100644 --- a/src/de/dhbwstuttgart/typeinference/assumptions/Assumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/Assumption.java @@ -1,11 +1,10 @@ package de.dhbwstuttgart.typeinference.assumptions; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.Typeable; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; -import mycompiler.mytype.*; public class Assumption { diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/ClassAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/ClassAssumption.java index 9327c6d57..785a049f9 100644 --- a/src/de/dhbwstuttgart/typeinference/assumptions/ClassAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/ClassAssumption.java @@ -1,9 +1,6 @@ package de.dhbwstuttgart.typeinference.assumptions; import de.dhbwstuttgart.syntaxtree.Class; -import mycompiler.myclass.*; -import mycompiler.mytype.*; - /** * Nicht wirklich eine Assumption. * Wird benutzt um Typen von Variablen zu verifizieren. diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/FieldAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/FieldAssumption.java index 79b60d5c9..11f7caa1b 100644 --- a/src/de/dhbwstuttgart/typeinference/assumptions/FieldAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/FieldAssumption.java @@ -1,9 +1,9 @@ package de.dhbwstuttgart.typeinference.assumptions; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.Field; import de.dhbwstuttgart.syntaxtree.type.RefType; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; public class FieldAssumption extends Assumption { diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java index bd6c1399e..3460bed97 100644 --- a/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java @@ -1,10 +1,10 @@ package de.dhbwstuttgart.typeinference.assumptions; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.statement.LocalVarDecl; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; public class GenericVarAssumption extends Assumption{ diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java index 98c8a5642..30645adb5 100644 --- a/src/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java @@ -6,8 +6,6 @@ import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.FormalParameter; import de.dhbwstuttgart.syntaxtree.Method; import de.dhbwstuttgart.syntaxtree.type.Type; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; -import mycompiler.mytype.*; public class MethodAssumption extends FieldAssumption { diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index f76091918..c2f4382ab 100755 --- a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -4,6 +4,7 @@ import java.util.Iterator; import java.util.Vector; import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; @@ -13,14 +14,7 @@ import de.dhbwstuttgart.typeinference.FunN; import de.dhbwstuttgart.typeinference.FunNInterface; import de.dhbwstuttgart.typeinference.FunNMethod; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; /** * Eine Sammlung von TypeAssumptions. diff --git a/src/de/dhbwstuttgart/typeinference/exceptions/ParserError.java b/src/de/dhbwstuttgart/typeinference/exceptions/ParserError.java index 7d1d51ef9..535c576af 100644 --- a/src/de/dhbwstuttgart/typeinference/exceptions/ParserError.java +++ b/src/de/dhbwstuttgart/typeinference/exceptions/ParserError.java @@ -1,6 +1,6 @@ package de.dhbwstuttgart.typeinference.exceptions; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; +import de.dhbwstuttgart.parser.JavaParser.yyException; public class ParserError extends TypeinferenceException{ diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java index ad6449754..33593014c 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java @@ -12,9 +12,6 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.exceptions.DebugException; -import mycompiler.myclass.*; -import mycompiler.mytype.*; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; /** * Stellt eine Einsetzungsmöglichkeit für einen Typ an einem (Typeable)Punkt im Syntaxbaum dar. diff --git a/src/de/dhbwstuttgart/typeinference/unify/CSet.java b/src/de/dhbwstuttgart/typeinference/unify/CSet.java new file mode 100755 index 000000000..08af741d0 --- /dev/null +++ b/src/de/dhbwstuttgart/typeinference/unify/CSet.java @@ -0,0 +1,72 @@ +// ino.module.CSet.8698.package +package de.dhbwstuttgart.typeinference.unify; +// ino.end + +// ino.module.CSet.8698.import +import java.util.Iterator; +// ino.end + +// ino.class.CSet.27435.description type=javadoc +/** + * + * @author Jrg Buerle + * @version $date + */ +// ino.end +// ino.class.CSet.27435.declaration +public abstract class CSet implements Iterable +// ino.end +// ino.class.CSet.27435.body +{ + // ino.method.addElement.27438.declaration + public abstract void addElement(E element); + // ino.end + // ino.method.removeElement.27441.declaration + public abstract void removeElement(E element); + // ino.end + // ino.method.unite.27444.declaration + public abstract void unite(CSet anotherSet); + // ino.end + // ino.method.subtract.27447.declaration + public abstract void subtract(CSet anotherSet); + // ino.end + // ino.method.shallowCopy.27450.declaration + public abstract CSet shallowCopy(); + // ino.end + // ino.method.deepCopy.27453.declaration + public abstract CSet deepCopy(); + // ino.end + // ino.method.contains.27456.declaration + public abstract boolean contains(E element); + // ino.end + // ino.method.getCardinality.27459.declaration + public abstract int getCardinality(); + // ino.end + // ino.method.getIterator.27462.declaration + public abstract Iterator getIterator(); + // ino.end + // ino.method.equals.27465.declaration + public abstract boolean equals(Object obj); + // ino.end + + // ino.method.toString.27468.definition + public String toString() + // ino.end + // ino.method.toString.27468.body + { + StringBuffer sb = new StringBuffer(); + sb.append("Set {\n"); + Iterator it = this.getIterator(); + while(it.hasNext()){ + sb.append(it.next().toString()); + sb.append(",\n"); + } + if(this.getCardinality()>0){ + sb.delete(sb.length()-2, sb.length()-1); + } + sb.append("}"); + return sb.toString(); + } + // ino.end +} +// ino.end diff --git a/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java b/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java new file mode 100755 index 000000000..f0cca4e8b --- /dev/null +++ b/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java @@ -0,0 +1,252 @@ +// ino.module.CSubstitution.8685.package +package de.dhbwstuttgart.typeinference.unify; +// ino.end + +// ino.module.CSubstitution.8685.import +import java.util.Iterator; +import java.util.Vector; + +import org.apache.log4j.Logger; +// ino.end + + + + + + + + +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; + +// ino.class.CSubstitution.27003.description type=javadoc +/** + * Implementierung einer Typsubstitution. Bildet eine zu ersetzende + * TypePlaceholder auf einen Substitutions-Typ ab. Instanzen dieser + * Klasse werden in der Regel aus + * Pair-Objekten erzeugt. + * @author J�rg B�uerle + * @version $Date: 2006/07/10 11:27:04 $ + */ +// ino.end +// ino.class.CSubstitution.27003.declaration +public class CSubstitution +// ino.end +// ino.class.CSubstitution.27003.body +{ + // ino.attribute.m_TypeVar.27006.declaration + private TypePlaceholder m_TypeVar = null; + // ino.end + // ino.attribute.m_Type.27009.declaration + protected Type m_Type = null; + // ino.end + // ino.attribute.inferencelog.27012.declaration + protected static Logger inferencelog = Logger.getLogger("inference"); + // ino.end + // ino.method.CSubstitution.27015.definition + public CSubstitution() + // ino.end + // ino.method.CSubstitution.27015.body + { + this(null, null); + } + // ino.end + + // ino.method.CSubstitution.27018.definition + public CSubstitution(TypePlaceholder typeVar, Type type) + // ino.end + // ino.method.CSubstitution.27018.body + { + m_TypeVar = typeVar; + m_Type = type; + } + // ino.end + + // ino.method.CSubstitution.27021.definition + public CSubstitution(Pair unifier) + throws CTypeReconstructionException + // ino.end + // ino.method.CSubstitution.27021.body + { + if(!(unifier.TA1 instanceof TypePlaceholder)){ + throw new CTypeReconstructionException("Unifier enth�lt keinen Typeplaceholder",unifier.TA1); + } + m_TypeVar = (TypePlaceholder)unifier.TA1; + m_Type = unifier.TA2; + } + // ino.end + + + // ino.method.getType.27024.defdescription type=javadoc + /** + * Author: J�rg B�uerle
+ * @return Returns the Type. + */ + // ino.end + // ino.method.getType.27024.definition + public Type getType() + // ino.end + // ino.method.getType.27024.body + { + return m_Type; + } + // ino.end + + // ino.method.setType.27027.defdescription type=javadoc + /** + * Author: J�rg B�uerle
+ * @param type The Type to set. + */ + // ino.end + // ino.method.setType.27027.definition + public void setType(Type type) + // ino.end + // ino.method.setType.27027.body + { + m_Type = type; + } + // ino.end + + // ino.method.getTypeVar.27030.defdescription type=javadoc + /** + * Author: J�rg B�uerle
+ * @return Returns the TypeVar. + */ + // ino.end + // ino.method.getTypeVar.27030.definition + public Type getTypeVar() + // ino.end + // ino.method.getTypeVar.27030.body + { + return this.m_TypeVar; + } + // ino.end + + // ino.method.setTypeVar.27033.defdescription type=javadoc + /** + * Author: J�rg B�uerle
+ * @param typeVar The TypeVar to set. + */ + // ino.end + // ino.method.setTypeVar.27033.definition + public void setTypeVar(TypePlaceholder typeVar) + // ino.end + // ino.method.setTypeVar.27033.body + { + m_TypeVar = typeVar; + } + // ino.end + + // ino.method.equals.27036.definition + public boolean equals(Object obj) + // ino.end + // ino.method.equals.27036.body + { + if(obj instanceof CSubstitution){ + CSubstitution sub = (CSubstitution)obj; + boolean ret = true; + ret &= (m_TypeVar.equals(sub.m_TypeVar)); + ret &= (m_Type.equals(sub.m_Type)); + return ret; + } + else{ + return false; + } + } + // ino.end + + // ino.method.toString.27039.definition + public String toString() + // ino.end + // ino.method.toString.27039.body + { + //return m_TypeVar.getName() +" --> "+m_Type.getName(); + return m_TypeVar.toString() +" --> "+m_Type.toString(); + } + // ino.end + + // ino.method.clone.27042.definition + public CSubstitution clone() + // ino.end + // ino.method.clone.27042.body + { + CSubstitution copy = new CSubstitution(m_TypeVar.clone(), m_Type.clone()); + return copy; + } + // ino.end + + + // ino.method.applyUnifier.27048.defdescription type=javadoc + /** + * Wendet den Unifier auf die rechte Seite dieser Substitution an. + *
Author: J�rg B�uerle + * @param unifier + */ + // ino.end + // ino.method.applyUnifier.27048.definition + public void applyUnifier(CSubstitutionSet unifier) + // ino.end + // ino.method.applyUnifier.27048.body + { + Iterator pairIt = unifier.getIterator(); + while(pairIt.hasNext()){ + CSubstitution subst = (CSubstitution)pairIt.next(); + + //korrigiert PL 05-07-31 das erste duerfte doch richtig sein. + //subst.setType(this.applySubstitution(subst.getType(), subst)); + this.setType(this.applySubstitution(this.getType(), subst)); + } + + } + // ino.end + + // ino.method.applySubstitution.27051.defdescription type=javadoc + /** + * Wendet die �bergebene Substitution rekursiv auf den �bergebenen Typ an. + *
Author: J�rg B�uerle + * @param type Der zu untersuchende Typ + * @param unifierSub Die anzuwendende Substitution + * @return Den ermittelnden Typ + */ + // ino.end + // ino.method.applySubstitution.27051.definition + private Type applySubstitution(Type type, CSubstitution unifierSub) + // ino.end + // ino.method.applySubstitution.27051.body + { + if(type instanceof TypePlaceholder){ + if(type.equals(unifierSub.getTypeVar())){ + return unifierSub.getType(); + } + } + else if(type instanceof GenericTypeVar){ + if(type.equals(unifierSub.getTypeVar())){ + return unifierSub.getType(); + } + } + else if(type instanceof RefType){ + Vector paras = ((RefType)type).get_ParaList(); + if(paras != null){ + for(int i=0; iTypePlaceholder auf einen Substitutions-Typ ab. Instanzen dieser + * Klasse werden in der Regel aus + * Pair-Objekten erzeugt. + * @author Martin Pl�micke + * @version $Date: 2006/06/13 10:37:32 $ + */ +// ino.end +// ino.class.CSubstitutionGenVar.27057.declaration +public class CSubstitutionGenVar extends CSubstitution +// ino.end +// ino.class.CSubstitutionGenVar.27057.body +{ + // ino.attribute.m_TypeVar.27061.declaration + private GenericTypeVar m_TypeVar = null; + // ino.end + + // ino.method.CSubstitutionGenVar.27064.definition + public CSubstitutionGenVar() + // ino.end + // ino.method.CSubstitutionGenVar.27064.body + { + this(null, null); + } + // ino.end + + // ino.method.CSubstitutionGenVar.27067.definition + public CSubstitutionGenVar(GenericTypeVar typeVar, Type type) + // ino.end + // ino.method.CSubstitutionGenVar.27067.body + { + m_TypeVar = typeVar; + m_Type = type; + } + // ino.end + + // ino.method.getTypeVar.27070.defdescription type=javadoc + /** + * Author: J�rg B�uerle
+ * @return Returns the TypeVar. + */ + // ino.end + // ino.method.getTypeVar.27070.definition + public Type getTypeVar() + // ino.end + // ino.method.getTypeVar.27070.body + { + return this.m_TypeVar; + } + // ino.end + + // ino.method.toString.27073.definition + public String toString() + // ino.end + // ino.method.toString.27073.body + { + return this.m_TypeVar.getName() +" --> "+this.m_Type.getName(); + } + // ino.end +} +// ino.end diff --git a/src/de/dhbwstuttgart/typeinference/unify/CSubstitutionSet.java b/src/de/dhbwstuttgart/typeinference/unify/CSubstitutionSet.java new file mode 100755 index 000000000..889d080bb --- /dev/null +++ b/src/de/dhbwstuttgart/typeinference/unify/CSubstitutionSet.java @@ -0,0 +1,111 @@ +// ino.module.CSubstitutionSet.8699.package +package de.dhbwstuttgart.typeinference.unify; +// ino.end + +// ino.module.CSubstitutionSet.8699.import +import java.util.Iterator; +import java.util.Vector; + +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; + +// ino.class.CSubstitutionSet.27471.description type=javadoc +/** + * @author J�rg B�uerle + * @version $Date: 2013/03/27 18:29:34 $ + */ +// ino.end +// ino.class.CSubstitutionSet.27471.declaration +public class CSubstitutionSet extends CVectorSet +// ino.end +// ino.class.CSubstitutionSet.27471.body +{ + // ino.method.CSubstitutionSet.27475.definition + public CSubstitutionSet() + // ino.end + // ino.method.CSubstitutionSet.27475.body + { + super(); + } + // ino.end + + // ino.method.CSubstitutionSet.27478.definition + public CSubstitutionSet(Vector unifiers) + throws CTypeReconstructionException + // ino.end + // ino.method.CSubstitutionSet.27478.body + { + super(); + for(int i=0; i substIter = this.getIterator(); + while(substIter.hasNext()){ + copy.addElement(substIter.next().clone()); + } + return copy; + } + // ino.end + + // ino.method.applyUnifier.27487.defdescription type=javadoc + /** + * Wendet den Unifier auf die rechten Seiten alle Substitutionen an. + *
Author: J�rg B�uerle + * @param unifier + */ + // ino.end + // ino.method.applyUnifier.27487.definition + public void applyUnifier(CSubstitutionSet unifier) + // ino.end + // ino.method.applyUnifier.27487.body + { + Iterator substIt = this.getIterator(); + + while(substIt.hasNext()){ + substIt.next().applyUnifier(unifier); + } + } + // ino.end + + // ino.method.applyThisSubstitutionSet.27490.definition + public Type applyThisSubstitutionSet(Type type) + // ino.end + // ino.method.applyThisSubstitutionSet.27490.body + { + Iterator substIt = this.getIterator(); + Type ty = type; + + while(substIt.hasNext()) { + ty = substIt.next().applyThisSubstitution(ty); + } + return ty; + } + // ino.end + + + public Iterator iterator() { + return this.getIterator(); + } +} +// ino.end diff --git a/src/de/dhbwstuttgart/typeinference/unify/CVectorSet.java b/src/de/dhbwstuttgart/typeinference/unify/CVectorSet.java new file mode 100755 index 000000000..ed35951a7 --- /dev/null +++ b/src/de/dhbwstuttgart/typeinference/unify/CVectorSet.java @@ -0,0 +1,165 @@ +// ino.module.CVectorSet.8702.package +package de.dhbwstuttgart.typeinference.unify; +// ino.end + +// ino.module.CVectorSet.8702.import +import java.util.Iterator; +import java.util.Vector; +// ino.end + +// ino.class.CVectorSet.27519.description type=javadoc +/** + * @author J�rg B�uerle + * @version $Date: 2013/02/07 05:08:51 $ + */ +// ino.end +// ino.class.CVectorSet.27519.declaration +public abstract class CVectorSet extends CSet +// ino.end +// ino.class.CVectorSet.27519.body +{ + // ino.attribute.m_Elements.27523.declaration + private Vector m_Elements = null; + // ino.end + + // ino.method.CVectorSet.27526.definition + public CVectorSet() + // ino.end + // ino.method.CVectorSet.27526.body + { + m_Elements = new Vector(); + } + // ino.end + + // ino.method.addElement.27529.definition + public void addElement(E element) + // ino.end + // ino.method.addElement.27529.body + { + m_Elements.addElement(element); + } + // ino.end + + // ino.method.removeElement.27532.definition + public void removeElement(E element) + // ino.end + // ino.method.removeElement.27532.body + { + m_Elements.addElement(element); + } + // ino.end + + public void addAll( CVectorSet set ) + { + for( int i=0;i getIterator() + // ino.end + // ino.method.getIterator.27535.body + { + return m_Elements.iterator(); + } + // ino.end + + // ino.method.getVector.27538.definition + public Vector getVector() + // ino.end + // ino.method.getVector.27538.body + { + return m_Elements; + } + // ino.end + + // ino.method.setVector.27541.definition + public void setVector(Vector elements) + // ino.end + // ino.method.setVector.27541.body + { + m_Elements = elements; + } + // ino.end + + /** + * Fügt ein CVectorSet an! + * Es handelt sich um eine Vereinigung (es werden keine bereits vorhandenen Elemente übernommen) + * @param anotherSet Das hinzuzufügende CVectorSet (CSet wird ignoriert) + */ + // ino.method.unite.27544.definition + public void unite(CSet anotherSet) + // ino.end + // ino.method.unite.27544.body + { + if(!(anotherSet instanceof CVectorSet)){ + return; + } + CVectorSet vectorSet = (CVectorSet)anotherSet; + + // Elemente der anderen Menge hinzuf�gen: + Iterator it = vectorSet.getIterator(); + while(it.hasNext()){ + E elem = it.next(); + if(!m_Elements.contains(elem)){ + m_Elements.addElement(elem); + } + } + //m_Elements.addAll(vectorSet.m_Elements); + } + // ino.end + + // ino.method.subtract.27547.definition + public void subtract(CSet anotherSet) + // ino.end + // ino.method.subtract.27547.body + { + if(!(anotherSet instanceof CVectorSet)){ + return; + } + CVectorSet vectorSet = (CVectorSet)anotherSet; + + // Elemente der anderen Menge entfernen: + m_Elements.removeAll(vectorSet.m_Elements); + } + // ino.end + + // ino.method.contains.27550.definition + public boolean contains(E element) + // ino.end + // ino.method.contains.27550.body + { + return m_Elements.contains(element); + } + // ino.end + + // ino.method.equals.27553.definition + public boolean equals(Object obj) + // ino.end + // ino.method.equals.27553.body + { + if(obj instanceof CVectorSet){ + CVectorSet tripSet= (CVectorSet)obj; + boolean ret = true; + ret &= (m_Elements.containsAll(tripSet.m_Elements)); + ret &= (tripSet.m_Elements.containsAll(m_Elements)); + return ret; + } + else{ + return false; + } + } + // ino.end + + // ino.method.getCardinality.27556.definition + public int getCardinality() + // ino.end + // ino.method.getCardinality.27556.body + { + return m_Elements.size(); + } + // ino.end +} +// ino.end diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index 5f0ca0481..6ac564135 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -8,14 +8,13 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; - import org.apache.log4j.Logger; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.MatchException; import de.dhbwstuttgart.myexception.SCException; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.CRefTypeSet; @@ -32,7 +31,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.WildcardType; import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; // ino.end diff --git a/src/myJvmDisassembler/.cvsignore b/src/myJvmDisassembler/.cvsignore deleted file mode 100755 index 246022761..000000000 --- a/src/myJvmDisassembler/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -jvmDisassebler.class -*~* -*.class diff --git a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOLD_2.java b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOLD_2.java index c5dc6b913..a5a5417fa 100755 --- a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOLD_2.java +++ b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOLD_2.java @@ -9,9 +9,9 @@ import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.unify.CSubstitution; import junit.framework.TestCase; import mycompiler.mytypereconstruction.CIntersectionType; -import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; diff --git a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOld.java b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOld.java index 59ca47f72..72876e78c 100755 --- a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOld.java +++ b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOld.java @@ -12,9 +12,9 @@ import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.unify.CSubstitution; import junit.framework.TestCase; import mycompiler.mytypereconstruction.CIntersectionType; -import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java index f4a62459a..adc2c858e 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java @@ -3,7 +3,6 @@ package mycompiler.test.unittest.typeReconstructionTest; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.mymodifier.Modifiers; import org.apache.log4j.Logger; import org.apache.log4j.xml.DOMConfigurator; @@ -13,6 +12,7 @@ import de.dhbwstuttgart.syntaxtree.ClassBody; import de.dhbwstuttgart.syntaxtree.Interface; import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java index 761541405..850ac75d1 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java @@ -4,7 +4,6 @@ package mycompiler.test.unittest.typeReconstructionTest; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.mymodifier.Modifiers; import org.apache.log4j.Logger; import org.apache.log4j.xml.DOMConfigurator; @@ -17,6 +16,7 @@ import de.dhbwstuttgart.syntaxtree.ClassBody; import de.dhbwstuttgart.syntaxtree.Interface; import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java index c6fc55381..93a78a82d 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java @@ -3,7 +3,6 @@ package mycompiler.test.unittest.typeReconstructionTest; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.mymodifier.Modifiers; import org.apache.log4j.xml.DOMConfigurator; import org.junit.After; @@ -15,6 +14,7 @@ import de.dhbwstuttgart.syntaxtree.ClassBody; import de.dhbwstuttgart.syntaxtree.Interface; import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/test/plugindevelopment/InsertSingleTypeTest.java b/test/plugindevelopment/InsertSingleTypeTest.java index ce73fefc2..56c735f61 100644 --- a/test/plugindevelopment/InsertSingleTypeTest.java +++ b/test/plugindevelopment/InsertSingleTypeTest.java @@ -12,8 +12,8 @@ import org.junit.Test; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import junit.framework.TestCase; diff --git a/test/plugindevelopment/MartinTestCases/Tester.java b/test/plugindevelopment/MartinTestCases/Tester.java index cd5cbebb9..a63eeaf73 100644 --- a/test/plugindevelopment/MartinTestCases/Tester.java +++ b/test/plugindevelopment/MartinTestCases/Tester.java @@ -8,8 +8,8 @@ import org.junit.Test; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import plugindevelopment.TypeInsertTester; import plugindevelopment.TypeInsertTests.MultipleTypesInsertTester; diff --git a/test/plugindevelopment/TRMEqualTest.java b/test/plugindevelopment/TRMEqualTest.java index 65475cec3..1c6699115 100644 --- a/test/plugindevelopment/TRMEqualTest.java +++ b/test/plugindevelopment/TRMEqualTest.java @@ -11,6 +11,7 @@ import org.junit.Test; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; @@ -20,7 +21,6 @@ import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import junit.framework.TestCase; diff --git a/test/plugindevelopment/TypeInsertSetEqualTest.java b/test/plugindevelopment/TypeInsertSetEqualTest.java index ade51473e..0f993a54f 100644 --- a/test/plugindevelopment/TypeInsertSetEqualTest.java +++ b/test/plugindevelopment/TypeInsertSetEqualTest.java @@ -10,8 +10,8 @@ import org.junit.Test; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; public class TypeInsertSetEqualTest { diff --git a/test/plugindevelopment/TypeInsertTester.java b/test/plugindevelopment/TypeInsertTester.java index a0e79f993..34c35bf62 100644 --- a/test/plugindevelopment/TypeInsertTester.java +++ b/test/plugindevelopment/TypeInsertTester.java @@ -19,8 +19,8 @@ import org.apache.log4j.SimpleLayout; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import junit.framework.TestCase; diff --git a/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java b/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java index 64233edd0..20c32a917 100644 --- a/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java +++ b/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java @@ -6,8 +6,8 @@ import java.util.Vector; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import plugindevelopment.TypeInsertTester; diff --git a/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.java b/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.java index 18cb01a73..7e4cd1eb6 100644 --- a/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.java +++ b/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.java @@ -10,8 +10,8 @@ import org.junit.Test; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; public class OverloadingInsertTest { diff --git a/test/syntaxTree/NodeEqualTest.java b/test/syntaxTree/NodeEqualTest.java index 0b4c20731..010cdf8ca 100644 --- a/test/syntaxTree/NodeEqualTest.java +++ b/test/syntaxTree/NodeEqualTest.java @@ -8,9 +8,9 @@ import org.junit.Test; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import junit.framework.TestCase; public class NodeEqualTest extends TestCase{ From 6858092ef1c4b5926f936fc60c5882e5be7e1c5b Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Mon, 8 Sep 2014 15:12:47 +0200 Subject: [PATCH 11/46] =?UTF-8?q?Einf=C3=BChrung=20von=20ConstraintType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/de/dhbwstuttgart/core/MyCompiler.java | 2 +- src/de/dhbwstuttgart/parser/JavaLexer.lex | 2 +- src/de/dhbwstuttgart/parser/JavaParser.java | 691 ++++++++---------- src/de/dhbwstuttgart/parser/JavaParser.jay | 114 +-- src/de/dhbwstuttgart/syntaxtree/Class.java | 1 - .../syntaxtree/FieldDeclaration.java | 7 +- src/de/dhbwstuttgart/syntaxtree/Method.java | 6 +- .../dhbwstuttgart/syntaxtree/SourceFile.java | 18 +- .../syntaxtree/SyntaxTreeNode.java | 5 +- .../dhbwstuttgart/syntaxtree/misc/UsedId.java | 2 +- .../syntaxtree/operator/AddOp.java | 7 +- .../syntaxtree/operator/AndOp.java | 3 + .../syntaxtree/operator/DivideOp.java | 3 +- .../syntaxtree/operator/EqualOp.java | 5 +- .../syntaxtree/operator/GreaterEquOp.java | 1 + .../syntaxtree/operator/LogOp.java | 7 +- .../syntaxtree/operator/MulOp.java | 7 +- .../syntaxtree/operator/NotEqualOp.java | 2 +- .../syntaxtree/operator/Operator.java | 13 +- .../syntaxtree/operator/RelOp.java | 7 +- .../syntaxtree/statement/Assign.java | 6 +- .../syntaxtree/statement/Binary.java | 15 +- .../syntaxtree/statement/Block.java | 7 +- .../syntaxtree/statement/BoolLiteral.java | 4 +- .../syntaxtree/statement/DoubleLiteral.java | 2 +- .../syntaxtree/statement/ExprStmt.java | 3 +- .../syntaxtree/statement/ForStmt.java | 3 +- .../syntaxtree/statement/IfStmt.java | 9 +- .../syntaxtree/statement/InstVar.java | 7 +- .../syntaxtree/statement/IntLiteral.java | 2 +- .../statement/LambdaExpression.java | 2 +- .../syntaxtree/statement/LocalVarDecl.java | 6 +- .../syntaxtree/statement/NegativeExpr.java | 4 +- .../syntaxtree/statement/NewClass.java | 4 +- .../syntaxtree/statement/NotExpr.java | 5 +- .../syntaxtree/statement/PostDecExpr.java | 4 +- .../syntaxtree/statement/PostIncExpr.java | 3 +- .../syntaxtree/statement/PreDecExpr.java | 3 +- .../syntaxtree/statement/PreIncExpr.java | 3 +- .../syntaxtree/statement/Return.java | 2 +- .../syntaxtree/statement/Statement.java | 2 +- .../syntaxtree/statement/StringLiteral.java | 3 +- .../syntaxtree/statement/UnaryExpr.java | 4 +- .../syntaxtree/statement/WhileStmt.java | 6 +- .../syntaxtree/type/BaseType.java | 6 +- .../type/BoundedGenericTypeVar.java | 5 +- .../syntaxtree/type/GenericTypeVar.java | 5 + .../syntaxtree/type/RefType.java | 15 +- .../dhbwstuttgart/syntaxtree/type/Type.java | 16 +- .../dhbwstuttgart/syntaxtree/type/Void.java | 6 +- .../typeinference/ConstraintPair.java | 15 + .../typeinference/ConstraintType.java | 22 + .../typeinference/ConstraintsSet.java | 2 - .../typeinference/FunNInterface.java | 18 +- .../typeinference/OderConstraint.java | 13 +- .../typeinference/Overloading.java | 9 +- .../type => typeinference}/Pair.java | 9 +- .../typeinference/ResultSet.java | 1 - .../typeinference/SingleConstraint.java | 23 +- .../typeinference/TypeinferenceResultSet.java | 1 - .../typeinference/UndConstraint.java | 3 +- .../assumptions/TypeAssumptions.java | 13 +- .../exceptions/TypeinferenceException.java | 3 +- .../GenericTypeInsertPoint.java | 2 +- .../typedeployment/TypeInsertSet.java | 2 +- .../typeinference/unify/CSubstitution.java | 3 +- .../typeinference/unify/CSubstitutionSet.java | 2 +- .../typeinference/unify/FC_TTO.java | 6 +- .../typeinference/unify/MUB.java | 2 +- .../typeinference/unify/Unify.java | 4 +- .../typeReconstructionTest/TrMakeFCTest.java | 2 +- .../TrSubUnifyTest.java | 4 +- .../typeReconstructionTest/TrUnifyTest.java | 4 +- test/plugindevelopment/TRMEqualTest.java | 4 +- test/plugindevelopment/TypeInsertTester.java | 1 - .../TypeInsertTests/OverloadingInMethod.jav | 10 + .../TypeInsertTests/OverloadingInMethod.java | 19 + tools/AntParserBuilderWindows.xml | 2 +- tools/RunJay.sh | 2 +- 79 files changed, 628 insertions(+), 638 deletions(-) create mode 100644 src/de/dhbwstuttgart/typeinference/ConstraintPair.java create mode 100644 src/de/dhbwstuttgart/typeinference/ConstraintType.java rename src/de/dhbwstuttgart/{syntaxtree/type => typeinference}/Pair.java (96%) create mode 100644 test/plugindevelopment/TypeInsertTests/OverloadingInMethod.jav create mode 100644 test/plugindevelopment/TypeInsertTests/OverloadingInMethod.java diff --git a/src/de/dhbwstuttgart/core/MyCompiler.java b/src/de/dhbwstuttgart/core/MyCompiler.java index 2eb043b03..dd384b93e 100755 --- a/src/de/dhbwstuttgart/core/MyCompiler.java +++ b/src/de/dhbwstuttgart/core/MyCompiler.java @@ -37,11 +37,11 @@ import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.IMatchable; import de.dhbwstuttgart.syntaxtree.type.ITypeContainer; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.FunNInterface; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/de/dhbwstuttgart/parser/JavaLexer.lex b/src/de/dhbwstuttgart/parser/JavaLexer.lex index cae5b2ce4..60f3806ed 100755 --- a/src/de/dhbwstuttgart/parser/JavaLexer.lex +++ b/src/de/dhbwstuttgart/parser/JavaLexer.lex @@ -7,7 +7,7 @@ ********************************************/ // user code: -package mycompiler.myparser; +package de.dhbwstuttgart.parser; %% diff --git a/src/de/dhbwstuttgart/parser/JavaParser.java b/src/de/dhbwstuttgart/parser/JavaParser.java index 188af6022..82e4457c3 100644 --- a/src/de/dhbwstuttgart/parser/JavaParser.java +++ b/src/de/dhbwstuttgart/parser/JavaParser.java @@ -1,6 +1,6 @@ // created by jay 0.7 (c) 1998 Axel.Schreiner@informatik.uni-osnabrueck.de - // line 2 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" /* Backup von JavaParser.jay 10.April 17 Uhr @@ -8,104 +8,23 @@ Backup von JavaParser.jay 10.April 17 Uhr package de.dhbwstuttgart.parser; -import java.util.Vector; - import de.dhbwstuttgart.core.AClassOrInterface; import de.dhbwstuttgart.syntaxtree.Class; -import de.dhbwstuttgart.syntaxtree.ClassBody; -import de.dhbwstuttgart.syntaxtree.Constant; -import de.dhbwstuttgart.syntaxtree.Constructor; -import de.dhbwstuttgart.syntaxtree.ExceptionList; -import de.dhbwstuttgart.syntaxtree.Field; -import de.dhbwstuttgart.syntaxtree.FieldDeclaration; -import de.dhbwstuttgart.syntaxtree.FormalParameter; -import de.dhbwstuttgart.syntaxtree.GenericDeclarationList; import de.dhbwstuttgart.syntaxtree.ImportDeclarations; import de.dhbwstuttgart.syntaxtree.Interface; -import de.dhbwstuttgart.syntaxtree.InterfaceBody; -import de.dhbwstuttgart.syntaxtree.Method; -import de.dhbwstuttgart.syntaxtree.ParameterList; import de.dhbwstuttgart.syntaxtree.SourceFile; -import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.misc.UsedId; -import de.dhbwstuttgart.syntaxtree.modifier.Abstract; -import de.dhbwstuttgart.syntaxtree.modifier.Final; -import de.dhbwstuttgart.syntaxtree.modifier.Modifier; -import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; -import de.dhbwstuttgart.syntaxtree.modifier.Private; -import de.dhbwstuttgart.syntaxtree.modifier.Protected; -import de.dhbwstuttgart.syntaxtree.modifier.Public; -import de.dhbwstuttgart.syntaxtree.modifier.Static; -import de.dhbwstuttgart.syntaxtree.operator.AndOp; -import de.dhbwstuttgart.syntaxtree.operator.DivideOp; -import de.dhbwstuttgart.syntaxtree.operator.EqualOp; -import de.dhbwstuttgart.syntaxtree.operator.GreaterEquOp; -import de.dhbwstuttgart.syntaxtree.operator.GreaterOp; -import de.dhbwstuttgart.syntaxtree.operator.LessEquOp; -import de.dhbwstuttgart.syntaxtree.operator.LessOp; -import de.dhbwstuttgart.syntaxtree.operator.MinusOp; -import de.dhbwstuttgart.syntaxtree.operator.ModuloOp; -import de.dhbwstuttgart.syntaxtree.operator.NotEqualOp; -import de.dhbwstuttgart.syntaxtree.operator.Operator; -import de.dhbwstuttgart.syntaxtree.operator.OrOp; -import de.dhbwstuttgart.syntaxtree.operator.PlusOp; -import de.dhbwstuttgart.syntaxtree.operator.TimesOp; -import de.dhbwstuttgart.syntaxtree.statement.ArgumentList; -import de.dhbwstuttgart.syntaxtree.statement.Assign; -import de.dhbwstuttgart.syntaxtree.statement.Binary; -import de.dhbwstuttgart.syntaxtree.statement.Block; -import de.dhbwstuttgart.syntaxtree.statement.BoolLiteral; -import de.dhbwstuttgart.syntaxtree.statement.CastExpr; -import de.dhbwstuttgart.syntaxtree.statement.CharLiteral; -import de.dhbwstuttgart.syntaxtree.statement.DoubleLiteral; -import de.dhbwstuttgart.syntaxtree.statement.EmptyStmt; -import de.dhbwstuttgart.syntaxtree.statement.Expr; -import de.dhbwstuttgart.syntaxtree.statement.ExprStmt; -import de.dhbwstuttgart.syntaxtree.statement.FloatLiteral; -import de.dhbwstuttgart.syntaxtree.statement.ForStmt; -import de.dhbwstuttgart.syntaxtree.statement.IfStmt; -import de.dhbwstuttgart.syntaxtree.statement.InstVar; -import de.dhbwstuttgart.syntaxtree.statement.InstanceOf; -import de.dhbwstuttgart.syntaxtree.statement.IntLiteral; -import de.dhbwstuttgart.syntaxtree.statement.LambdaExpression; -import de.dhbwstuttgart.syntaxtree.statement.Literal; -import de.dhbwstuttgart.syntaxtree.statement.LocalOrFieldVar; -import de.dhbwstuttgart.syntaxtree.statement.LocalVarDecl; -import de.dhbwstuttgart.syntaxtree.statement.LongLiteral; -import de.dhbwstuttgart.syntaxtree.statement.MethodCall; -import de.dhbwstuttgart.syntaxtree.statement.NegativeExpr; -import de.dhbwstuttgart.syntaxtree.statement.NewClass; -import de.dhbwstuttgart.syntaxtree.statement.NotExpr; -import de.dhbwstuttgart.syntaxtree.statement.Null; -import de.dhbwstuttgart.syntaxtree.statement.PositivExpr; -import de.dhbwstuttgart.syntaxtree.statement.PostDecExpr; -import de.dhbwstuttgart.syntaxtree.statement.PostIncExpr; -import de.dhbwstuttgart.syntaxtree.statement.PreDecExpr; -import de.dhbwstuttgart.syntaxtree.statement.PreIncExpr; -import de.dhbwstuttgart.syntaxtree.statement.Receiver; -import de.dhbwstuttgart.syntaxtree.statement.Return; -import de.dhbwstuttgart.syntaxtree.statement.Statement; -import de.dhbwstuttgart.syntaxtree.statement.StringLiteral; -import de.dhbwstuttgart.syntaxtree.statement.This; -import de.dhbwstuttgart.syntaxtree.statement.UnaryMinus; -import de.dhbwstuttgart.syntaxtree.statement.UnaryNot; -import de.dhbwstuttgart.syntaxtree.statement.UnaryPlus; -import de.dhbwstuttgart.syntaxtree.statement.WhileStmt; -import de.dhbwstuttgart.syntaxtree.type.BaseType; -import de.dhbwstuttgart.syntaxtree.type.BooleanType; -import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.CharacterType; -import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; -import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.IntegerType; -import de.dhbwstuttgart.syntaxtree.type.Pair; -import de.dhbwstuttgart.syntaxtree.type.ParaList; -import de.dhbwstuttgart.syntaxtree.type.RefType; -import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; -import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Void; -import de.dhbwstuttgart.syntaxtree.type.WildcardType; +import de.dhbwstuttgart.*; +import de.dhbwstuttgart.syntaxtree.*; +import de.dhbwstuttgart.syntaxtree.misc.*; +import de.dhbwstuttgart.syntaxtree.modifier.*; +import de.dhbwstuttgart.syntaxtree.operator.*; +import de.dhbwstuttgart.syntaxtree.type.*; +import de.dhbwstuttgart.syntaxtree.statement.*; +import java.util.Vector; public class JavaParser{ public Vector path = new Vector(); @@ -129,7 +48,7 @@ void initUsedIdsToCheck() { //LUAR 07-05-29 Anfang für Wildcard Test public Vector testPair = new Vector(); //LUAR 07-05-29 Ende - // line 132 "-" + // line 52 "-" // %token constants //{ //ergaenzt PL 23.01.01 wieder entfernt 21.12.01 public static final int ABSTRACT = 257; @@ -763,20 +682,20 @@ public Vector testPair = new Vector(); yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]); switch (yyN) { case 1: - // line 327 "./../src/mycompiler/myparser/JavaParser.jay" + // line 247 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((SourceFile)yyVals[0+yyTop]); } break; case 2: - // line 331 "./../src/mycompiler/myparser/JavaParser.jay" + // line 251 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((SourceFile)yyVals[0+yyTop]).addImports(((ImportDeclarations)yyVals[-1+yyTop])); yyVal=((SourceFile)yyVals[0+yyTop]); } break; case 3: - // line 336 "./../src/mycompiler/myparser/JavaParser.jay" + // line 256 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Package*/ ((SourceFile)yyVals[0+yyTop]).setPackageName(((UsedId)yyVals[-2+yyTop])); @@ -785,7 +704,7 @@ case 3: } break; case 4: - // line 343 "./../src/mycompiler/myparser/JavaParser.jay" + // line 263 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Package*/ ((SourceFile)yyVals[0+yyTop]).setPackageName(((UsedId)yyVals[-1+yyTop])); @@ -793,21 +712,21 @@ case 4: } break; case 5: - // line 349 "./../src/mycompiler/myparser/JavaParser.jay" + // line 269 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { this.testPair.add(new Pair(((Type)yyVals[-2+yyTop]),((Type)yyVals[-1+yyTop]))); yyVal=((SourceFile)yyVals[0+yyTop]); } break; case 6: - // line 355 "./../src/mycompiler/myparser/JavaParser.jay" + // line 275 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Package*/ yyVal = ((UsedId)yyVals[-1+yyTop]); } break; case 7: - // line 361 "./../src/mycompiler/myparser/JavaParser.jay" + // line 281 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ImportDeclarations declarations=new ImportDeclarations(); declarations.addElement(((UsedId)yyVals[0+yyTop])); @@ -815,20 +734,20 @@ case 7: } break; case 8: - // line 367 "./../src/mycompiler/myparser/JavaParser.jay" + // line 287 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ImportDeclarations)yyVals[-1+yyTop]).addElement(((UsedId)yyVals[0+yyTop])); yyVal=((ImportDeclarations)yyVals[-1+yyTop]); } break; case 9: - // line 373 "./../src/mycompiler/myparser/JavaParser.jay" + // line 293 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((UsedId)yyVals[-1+yyTop]); } break; case 10: - // line 378 "./../src/mycompiler/myparser/JavaParser.jay" + // line 298 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { SourceFile Scfile = new SourceFile(); Scfile.addElement(((AClassOrInterface)yyVals[0+yyTop])); @@ -836,39 +755,39 @@ case 10: } break; case 11: - // line 384 "./../src/mycompiler/myparser/JavaParser.jay" + // line 304 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((SourceFile)yyVals[-1+yyTop]).addElement(((AClassOrInterface)yyVals[0+yyTop])); yyVal=((SourceFile)yyVals[-1+yyTop]); } break; case 12: - // line 390 "./../src/mycompiler/myparser/JavaParser.jay" + // line 310 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((UsedId)yyVals[0+yyTop]); } break; case 13: - // line 394 "./../src/mycompiler/myparser/JavaParser.jay" + // line 314 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((UsedId)yyVals[0+yyTop]); } break; case 14: - // line 399 "./../src/mycompiler/myparser/JavaParser.jay" + // line 319 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Class)yyVals[0+yyTop]); } break; case 15: - // line 403 "./../src/mycompiler/myparser/JavaParser.jay" + // line 323 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ yyVal=((Interface)yyVals[0+yyTop]); } break; case 16: - // line 410 "./../src/mycompiler/myparser/JavaParser.jay" + // line 330 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((UsedId)yyVals[-2+yyTop]).set_Name(((Token)yyVals[0+yyTop]).getLexem()); ((UsedId)yyVals[-2+yyTop]).setOffset(((UsedId)yyVals[-2+yyTop]).getOffset()); @@ -876,7 +795,7 @@ case 16: } break; case 17: - // line 417 "./../src/mycompiler/myparser/JavaParser.jay" + // line 337 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((UsedId)yyVals[-2+yyTop]).set_Name(((Token)yyVals[0+yyTop]).getLexem()); ((UsedId)yyVals[-2+yyTop]).setOffset(((UsedId)yyVals[-2+yyTop]).getOffset()); @@ -884,7 +803,7 @@ case 17: } break; case 18: - // line 423 "./../src/mycompiler/myparser/JavaParser.jay" + // line 343 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((UsedId)yyVals[-2+yyTop]).set_Name("*"); ((UsedId)yyVals[-2+yyTop]).setOffset(((UsedId)yyVals[-2+yyTop]).getOffset()); @@ -892,7 +811,7 @@ case 18: } break; case 19: - // line 431 "./../src/mycompiler/myparser/JavaParser.jay" + // line 351 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { UsedId UI = new UsedId(((Token)yyVals[0+yyTop]).getOffset()); UI.set_Name( ((Token)yyVals[0+yyTop]).getLexem() ); @@ -901,7 +820,7 @@ case 19: } break; case 20: - // line 439 "./../src/mycompiler/myparser/JavaParser.jay" + // line 359 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Um das hier uebersichtlicher zu halten,*/ /* gibt es einen allumfassenden Konstruktor fuer Class*/ @@ -920,7 +839,7 @@ case 20: } break; case 21: - // line 456 "./../src/mycompiler/myparser/JavaParser.jay" + // line 376 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-1+yyTop]).getName(), ((Modifiers)yyVals[-3+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes,usedIdsToCheck, null, null, ((ClassAndParameter)yyVals[-1+yyTop]).getParaVector(), ((Token)yyVals[-2+yyTop]).getOffset()); this.initContainedTypes(); @@ -928,7 +847,7 @@ case 21: } break; case 22: - // line 462 "./../src/mycompiler/myparser/JavaParser.jay" + // line 382 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes,usedIdsToCheck, ((UsedId)yyVals[-1+yyTop]), null, ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -936,7 +855,7 @@ case 22: } break; case 23: - // line 468 "./../src/mycompiler/myparser/JavaParser.jay" + // line 388 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, usedIdsToCheck, ((UsedId)yyVals[-1+yyTop]), null, ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -944,7 +863,7 @@ case 23: } break; case 24: - // line 475 "./../src/mycompiler/myparser/JavaParser.jay" + // line 395 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes, usedIdsToCheck, null, ((InterfaceList)yyVals[-1+yyTop]).getVector(), ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -952,7 +871,7 @@ case 24: } break; case 25: - // line 481 "./../src/mycompiler/myparser/JavaParser.jay" + // line 401 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, usedIdsToCheck, null, ((InterfaceList)yyVals[-1+yyTop]).getVector(), ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -960,7 +879,7 @@ case 25: } break; case 26: - // line 487 "./../src/mycompiler/myparser/JavaParser.jay" + // line 407 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-3+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes,usedIdsToCheck, ((UsedId)yyVals[-2+yyTop]), ((InterfaceList)yyVals[-1+yyTop]).getVector(), ((ClassAndParameter)yyVals[-3+yyTop]).getParaVector(), ((Token)yyVals[-4+yyTop]).getOffset()); this.initContainedTypes(); @@ -968,7 +887,7 @@ case 26: } break; case 27: - // line 493 "./../src/mycompiler/myparser/JavaParser.jay" + // line 413 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-3+yyTop]).getName(), ((Modifiers)yyVals[-5+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, usedIdsToCheck, ((UsedId)yyVals[-2+yyTop]), ((InterfaceList)yyVals[-1+yyTop]).getVector(), ((ClassAndParameter)yyVals[-3+yyTop]).getParaVector(), ((Token)yyVals[-4+yyTop]).getOffset()); this.initContainedTypes(); @@ -976,7 +895,7 @@ case 27: } break; case 28: - // line 500 "./../src/mycompiler/myparser/JavaParser.jay" + // line 420 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* HOTI*/ /* Verbindet den Namen eines Interfaces mit einer optionalen Parameterliste*/ @@ -984,13 +903,13 @@ case 28: } break; case 29: - // line 506 "./../src/mycompiler/myparser/JavaParser.jay" + // line 426 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new InterfaceAndParameter(((Token)yyVals[-3+yyTop]).getLexem(), ((ParaList)yyVals[-1+yyTop])); } break; case 30: - // line 511 "./../src/mycompiler/myparser/JavaParser.jay" + // line 431 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Hilfskonstrukt, um die Grammatik ueberschaubar zu halten*/ /* Verbindet den Namen einer Klasse mit einer optionalen Parameterliste*/ @@ -998,13 +917,13 @@ case 30: } break; case 31: - // line 517 "./../src/mycompiler/myparser/JavaParser.jay" + // line 437 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new ClassAndParameter(((Token)yyVals[-3+yyTop]).getLexem(), ((ParaList)yyVals[-1+yyTop])); } break; case 32: - // line 522 "./../src/mycompiler/myparser/JavaParser.jay" + // line 442 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ Interface ic = new Interface(((InterfaceAndParameter)yyVals[-1+yyTop]).getName(), ((Token)yyVals[-2+yyTop]).getOffset()); @@ -1016,7 +935,7 @@ case 32: } break; case 33: - // line 532 "./../src/mycompiler/myparser/JavaParser.jay" + // line 452 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Interface ic = new Interface(((InterfaceAndParameter)yyVals[-1+yyTop]).getName(), ((Modifiers)yyVals[-3+yyTop]), ((Token)yyVals[-2+yyTop]).getOffset()); ic.setInterfaceBody(((InterfaceBody)yyVals[0+yyTop])); @@ -1027,7 +946,7 @@ case 33: } break; case 34: - // line 541 "./../src/mycompiler/myparser/JavaParser.jay" + // line 461 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Interface ic = new Interface(((InterfaceAndParameter)yyVals[-2+yyTop]).getName(), ((Token)yyVals[-3+yyTop]).getOffset()); ic.setParaList(((InterfaceAndParameter)yyVals[-2+yyTop]).getParaVector()); @@ -1039,7 +958,7 @@ case 34: } break; case 35: - // line 551 "./../src/mycompiler/myparser/JavaParser.jay" + // line 471 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Interface ic = new Interface(((InterfaceAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((Token)yyVals[-3+yyTop]).getOffset()); ic.setParaList(((InterfaceAndParameter)yyVals[-2+yyTop]).getParaVector()); @@ -1051,12 +970,12 @@ case 35: } break; case 36: - // line 562 "./../src/mycompiler/myparser/JavaParser.jay" + // line 482 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParaList pl = new ParaList(); /* #JB# 05.04.2005 */ /* ########################################################### */ - pl.getParalist().addElement(new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(), ((Token)yyVals[0+yyTop]).getOffset())); + pl.getParalist().addElement(new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(),null, ((Token)yyVals[0+yyTop]).getOffset())); /*pl.getParalist().addElement( new TypePlaceholder($1.getLexem()) );*/ /* ########################################################### */ org.apache.log4j.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + ((Token)yyVals[0+yyTop]).getLexem() + " TV"); @@ -1064,7 +983,7 @@ case 36: } break; case 37: - // line 573 "./../src/mycompiler/myparser/JavaParser.jay" + // line 493 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParaList pl = new ParaList(); RefType t = new RefType( ((Token)yyVals[-3+yyTop]).getLexem(),((Token)yyVals[-3+yyTop]).getOffset() ); @@ -1075,7 +994,7 @@ case 37: } break; case 38: - // line 582 "./../src/mycompiler/myparser/JavaParser.jay" + // line 502 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParaList pl = new ParaList(); pl.getParalist().addElement(((WildcardType)yyVals[0+yyTop])); @@ -1083,12 +1002,12 @@ case 38: } break; case 39: - // line 588 "./../src/mycompiler/myparser/JavaParser.jay" + // line 508 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* #JB# 05.04.2005 */ /* ########################################################### */ - ((ParaList)yyVals[-2+yyTop]).getParalist().addElement(new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(),((Token)yyVals[0+yyTop]).getOffset())); + ((ParaList)yyVals[-2+yyTop]).getParalist().addElement(new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(), null,((Token)yyVals[0+yyTop]).getOffset())); /*$1.getParalist().addElement(new TypePlaceholder($3.getLexem()));*/ /* ########################################################### */ org.apache.log4j.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER --> Paralist f�r " + ((Token)yyVals[0+yyTop]).getLexem() + ": TV"); @@ -1097,7 +1016,7 @@ case 39: } break; case 40: - // line 601 "./../src/mycompiler/myparser/JavaParser.jay" + // line 521 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { RefType t = new RefType( ((Token)yyVals[-3+yyTop]).getLexem() ,((Token)yyVals[-3+yyTop]).getOffset() ); t.set_ParaList( ((ParaList)yyVals[-1+yyTop]).get_ParaList() ); @@ -1107,14 +1026,14 @@ case 40: } break; case 41: - // line 609 "./../src/mycompiler/myparser/JavaParser.jay" + // line 529 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ParaList)yyVals[-2+yyTop]).getParalist().addElement(((WildcardType)yyVals[0+yyTop])); yyVal=((ParaList)yyVals[-2+yyTop]); } break; case 42: - // line 615 "./../src/mycompiler/myparser/JavaParser.jay" + // line 535 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*Luar 29.11.06 Offset auf -1, da keine Angabe vorhanden*/ WildcardType wc = new WildcardType(-1); @@ -1122,34 +1041,34 @@ case 42: } break; case 43: - // line 621 "./../src/mycompiler/myparser/JavaParser.jay" + // line 541 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ExtendsWildcardType ewc = new ExtendsWildcardType(((Token)yyVals[-1+yyTop]).getOffset(),((RefType)yyVals[0+yyTop])); yyVal = ewc; } break; case 44: - // line 626 "./../src/mycompiler/myparser/JavaParser.jay" + // line 546 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { SuperWildcardType swc = new SuperWildcardType(((Token)yyVals[-1+yyTop]).getOffset(),((RefType)yyVals[0+yyTop])); yyVal = swc; } break; case 45: - // line 632 "./../src/mycompiler/myparser/JavaParser.jay" + // line 552 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ClassBody CB = new ClassBody(); yyVal = CB; } break; case 46: - // line 638 "./../src/mycompiler/myparser/JavaParser.jay" + // line 558 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((ClassBody)yyVals[-1+yyTop]); } break; case 47: - // line 643 "./../src/mycompiler/myparser/JavaParser.jay" + // line 563 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Modifiers Mod = new Modifiers(); Mod.addModifier(((Modifier)yyVals[0+yyTop])); @@ -1157,20 +1076,20 @@ case 47: } break; case 48: - // line 649 "./../src/mycompiler/myparser/JavaParser.jay" + // line 569 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Modifiers)yyVals[-1+yyTop]).addModifier(((Modifier)yyVals[0+yyTop])); yyVal = ((Modifiers)yyVals[-1+yyTop]); } break; case 49: - // line 655 "./../src/mycompiler/myparser/JavaParser.jay" + // line 575 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((UsedId)yyVals[0+yyTop]); } break; case 50: - // line 660 "./../src/mycompiler/myparser/JavaParser.jay" + // line 580 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ InterfaceList il = new InterfaceList(); @@ -1179,27 +1098,27 @@ case 50: } break; case 51: - // line 667 "./../src/mycompiler/myparser/JavaParser.jay" + // line 587 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((InterfaceList)yyVals[-2+yyTop]).addInterface(((UsedId)yyVals[0+yyTop])); yyVal = ((InterfaceList)yyVals[-2+yyTop]); } break; case 52: - // line 673 "./../src/mycompiler/myparser/JavaParser.jay" + // line 593 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ yyVal = new InterfaceBody(); } break; case 53: - // line 678 "./../src/mycompiler/myparser/JavaParser.jay" + // line 598 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((InterfaceBody)yyVals[-1+yyTop]); } break; case 54: - // line 685 "./../src/mycompiler/myparser/JavaParser.jay" + // line 605 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ InterfaceList il = new InterfaceList(); @@ -1208,14 +1127,14 @@ case 54: } break; case 55: - // line 692 "./../src/mycompiler/myparser/JavaParser.jay" + // line 612 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((InterfaceList)yyVals[-2+yyTop]).addInterface(((UsedId)yyVals[0+yyTop])); yyVal = ((InterfaceList)yyVals[-2+yyTop]); } break; case 56: - // line 699 "./../src/mycompiler/myparser/JavaParser.jay" + // line 619 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ClassBody CB = new ClassBody(); CB.addField( ((Field)yyVals[0+yyTop]) ); @@ -1223,55 +1142,55 @@ case 56: } break; case 57: - // line 705 "./../src/mycompiler/myparser/JavaParser.jay" + // line 625 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ClassBody)yyVals[-1+yyTop]).addField(((Field)yyVals[0+yyTop])); yyVal = ((ClassBody)yyVals[-1+yyTop]); } break; case 58: - // line 712 "./../src/mycompiler/myparser/JavaParser.jay" + // line 632 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Public Pub = new Public(); yyVal=Pub; } break; case 59: - // line 717 "./../src/mycompiler/myparser/JavaParser.jay" + // line 637 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Protected Pro = new Protected(); yyVal=Pro; } break; case 60: - // line 722 "./../src/mycompiler/myparser/JavaParser.jay" + // line 642 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Private Pri = new Private(); yyVal=Pri; } break; case 61: - // line 727 "./../src/mycompiler/myparser/JavaParser.jay" + // line 647 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Static Sta = new Static(); yyVal=Sta; } break; case 62: - // line 732 "./../src/mycompiler/myparser/JavaParser.jay" + // line 652 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Abstract Abs = new Abstract(); yyVal=Abs; } break; case 63: - // line 737 "./../src/mycompiler/myparser/JavaParser.jay" + // line 657 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Final fin = new Final(); yyVal = fin; } break; case 64: - // line 743 "./../src/mycompiler/myparser/JavaParser.jay" + // line 663 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*PL 05-07-30 eingefuegt containedTypes ANFANG*/ RefType RT = new RefType(-1); @@ -1286,7 +1205,7 @@ case 64: } break; case 65: - // line 758 "./../src/mycompiler/myparser/JavaParser.jay" + // line 678 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ InterfaceBody ib = new InterfaceBody(); @@ -1295,39 +1214,39 @@ case 65: } break; case 66: - // line 765 "./../src/mycompiler/myparser/JavaParser.jay" + // line 685 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((InterfaceBody)yyVals[-1+yyTop]).addElement(((Field)yyVals[0+yyTop])); yyVal = ((InterfaceBody)yyVals[-1+yyTop]); } break; case 67: - // line 771 "./../src/mycompiler/myparser/JavaParser.jay" + // line 691 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interfaces*/ yyVal = ((UsedId)yyVals[0+yyTop]); } break; case 68: - // line 777 "./../src/mycompiler/myparser/JavaParser.jay" + // line 697 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Field)yyVals[0+yyTop]); } break; case 69: - // line 782 "./../src/mycompiler/myparser/JavaParser.jay" + // line 702 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Method)yyVals[0+yyTop]); } break; case 70: - // line 786 "./../src/mycompiler/myparser/JavaParser.jay" + // line 706 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Field)yyVals[0+yyTop]); } break; case 71: - // line 792 "./../src/mycompiler/myparser/JavaParser.jay" + // line 712 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { if (((Vector)yyVals[0+yyTop]) != null) { /*$1.set_ParaList($2.get_ParaList());*/ @@ -1339,7 +1258,7 @@ case 71: } break; case 72: - // line 803 "./../src/mycompiler/myparser/JavaParser.jay" + // line 723 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Vector tl = new Vector(); tl.add(((Type)yyVals[0+yyTop])); @@ -1347,21 +1266,21 @@ case 72: } break; case 73: - // line 809 "./../src/mycompiler/myparser/JavaParser.jay" + // line 729 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Vector)yyVals[-2+yyTop]).add(((Type)yyVals[0+yyTop])); yyVal=((Vector)yyVals[-2+yyTop]); } break; case 74: - // line 814 "./../src/mycompiler/myparser/JavaParser.jay" + // line 734 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Vector)yyVals[-2+yyTop]).add(((WildcardType)yyVals[0+yyTop])); yyVal=((Vector)yyVals[-2+yyTop]); } break; case 75: - // line 819 "./../src/mycompiler/myparser/JavaParser.jay" + // line 739 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Vector tl = new Vector(); tl.add(((WildcardType)yyVals[0+yyTop])); @@ -1369,42 +1288,42 @@ case 75: } break; case 76: - // line 827 "./../src/mycompiler/myparser/JavaParser.jay" + // line 747 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = null; } break; case 77: - // line 829 "./../src/mycompiler/myparser/JavaParser.jay" + // line 749 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((Vector)yyVals[-1+yyTop]); } break; case 78: - // line 834 "./../src/mycompiler/myparser/JavaParser.jay" + // line 754 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interfaces, Spezialform Konstantendef.*/ yyVal = ((Constant)yyVals[0+yyTop]); } break; case 79: - // line 839 "./../src/mycompiler/myparser/JavaParser.jay" + // line 759 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((Method)yyVals[0+yyTop]); } break; case 80: - // line 844 "./../src/mycompiler/myparser/JavaParser.jay" + // line 764 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Field)yyVals[0+yyTop]); } break; case 81: - // line 848 "./../src/mycompiler/myparser/JavaParser.jay" + // line 768 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Method)yyVals[0+yyTop]); } break; case 82: - // line 853 "./../src/mycompiler/myparser/JavaParser.jay" + // line 773 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Method STAT = new Method(((Token)yyVals[-1+yyTop]).getOffset()); DeclId DST = new DeclId(); @@ -1419,14 +1338,14 @@ case 82: } break; case 83: - // line 867 "./../src/mycompiler/myparser/JavaParser.jay" + // line 787 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Constructor)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); yyVal = ((Constructor)yyVals[-1+yyTop]); } break; case 84: - // line 872 "./../src/mycompiler/myparser/JavaParser.jay" + // line 792 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Constructor)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); ((Constructor)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); @@ -1434,7 +1353,7 @@ case 84: } break; case 85: - // line 879 "./../src/mycompiler/myparser/JavaParser.jay" + // line 799 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ Constant c = new Constant(((Token)yyVals[-3+yyTop]).getLexem(), ((Modifiers)yyVals[-5+yyTop])); @@ -1444,14 +1363,14 @@ case 85: } break; case 86: - // line 888 "./../src/mycompiler/myparser/JavaParser.jay" + // line 808 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ yyVal = ((Method)yyVals[-1+yyTop]); } break; case 87: - // line 913 "./../src/mycompiler/myparser/JavaParser.jay" + // line 833 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FieldDeclaration ret = new FieldDeclaration(((DeclId)yyVals[-2+yyTop]).getOffset()); ret.set_DeclId(((DeclId)yyVals[-2+yyTop])); @@ -1460,7 +1379,7 @@ case 87: } break; case 88: - // line 920 "./../src/mycompiler/myparser/JavaParser.jay" + // line 840 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FieldDeclaration ret = new FieldDeclaration(((DeclId)yyVals[0+yyTop]).getOffset()); ret.set_DeclId(((DeclId)yyVals[0+yyTop])); @@ -1468,27 +1387,27 @@ case 88: } break; case 89: - // line 927 "./../src/mycompiler/myparser/JavaParser.jay" + // line 847 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { GenericDeclarationList ret = new GenericDeclarationList(((GenericVarDeclarationList)yyVals[-1+yyTop]).getElements(),((GenericVarDeclarationList)yyVals[-1+yyTop]).getEndOffset()); yyVal = ret; } break; case 90: - // line 934 "./../src/mycompiler/myparser/JavaParser.jay" + // line 854 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; case 91: - // line 938 "./../src/mycompiler/myparser/JavaParser.jay" + // line 858 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; case 92: - // line 943 "./../src/mycompiler/myparser/JavaParser.jay" + // line 863 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {/*angefügt von Andreas Stadelmeier*/ ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); ((FieldDeclaration)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); @@ -1496,13 +1415,13 @@ case 92: } break; case 93: - // line 950 "./../src/mycompiler/myparser/JavaParser.jay" + // line 870 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; case 94: - // line 955 "./../src/mycompiler/myparser/JavaParser.jay" + // line 875 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + ((Type)yyVals[-2+yyTop])); ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); @@ -1510,7 +1429,7 @@ case 94: } break; case 95: - // line 962 "./../src/mycompiler/myparser/JavaParser.jay" + // line 882 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); for(int i=0;i<(((FieldDeclaration)yyVals[-1+yyTop]).getDeclIdVector().size());i++) @@ -1521,27 +1440,27 @@ case 95: } break; case 96: - // line 972 "./../src/mycompiler/myparser/JavaParser.jay" + // line 892 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); yyVal=((Method)yyVals[-1+yyTop]); } break; case 97: - // line 979 "./../src/mycompiler/myparser/JavaParser.jay" + // line 899 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block Bl = new Block(); yyVal=Bl; } break; case 98: - // line 985 "./../src/mycompiler/myparser/JavaParser.jay" + // line 905 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[-1+yyTop]); } break; case 99: - // line 990 "./../src/mycompiler/myparser/JavaParser.jay" + // line 910 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Constructor CON = new Constructor(null); /*TODO: Der Parser kann sowieso nicht zwischen einem Konstruktor und einer Methode unterscheiden. Das hier kann wegfallen...*/ DeclId DIDCon = new DeclId(); @@ -1551,7 +1470,7 @@ case 99: } break; case 100: - // line 998 "./../src/mycompiler/myparser/JavaParser.jay" + // line 918 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Constructor CONpara = new Constructor(null); DeclId DIconpara = new DeclId(); @@ -1562,14 +1481,14 @@ case 100: } break; case 101: - // line 1008 "./../src/mycompiler/myparser/JavaParser.jay" + // line 928 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block CBL = new Block(); yyVal=CBL; } break; case 102: - // line 1013 "./../src/mycompiler/myparser/JavaParser.jay" + // line 933 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block CBLexpl = new Block(); CBLexpl.set_Statement(((Statement)yyVals[-1+yyTop])); @@ -1577,13 +1496,13 @@ case 102: } break; case 103: - // line 1019 "./../src/mycompiler/myparser/JavaParser.jay" + // line 939 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[-1+yyTop]); } break; case 104: - // line 1023 "./../src/mycompiler/myparser/JavaParser.jay" + // line 943 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block CBes = new Block(); CBes.set_Statement(((Statement)yyVals[-2+yyTop])); @@ -1595,7 +1514,7 @@ case 104: } break; case 105: - // line 1034 "./../src/mycompiler/myparser/JavaParser.jay" + // line 954 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ExceptionList EL = new ExceptionList(); EL.set_addElem(((RefType)yyVals[0+yyTop])); @@ -1603,13 +1522,13 @@ case 105: } break; case 106: - // line 1041 "./../src/mycompiler/myparser/JavaParser.jay" + // line 961 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((GenericTypeVar)yyVals[0+yyTop]); } break; case 107: - // line 1046 "./../src/mycompiler/myparser/JavaParser.jay" + // line 966 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParaList p = new ParaList(); p.add_ParaList(((GenericTypeVar)yyVals[0+yyTop])); @@ -1617,28 +1536,28 @@ case 107: } break; case 108: - // line 1052 "./../src/mycompiler/myparser/JavaParser.jay" + // line 972 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ParaList)yyVals[-2+yyTop]).add_ParaList(((GenericTypeVar)yyVals[0+yyTop])); yyVal=((ParaList)yyVals[-2+yyTop]); } break; case 109: - // line 1059 "./../src/mycompiler/myparser/JavaParser.jay" + // line 979 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - yyVal=new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(),((Token)yyVals[0+yyTop]).getOffset()); + yyVal=new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(),null,((Token)yyVals[0+yyTop]).getOffset()); } break; case 110: - // line 1063 "./../src/mycompiler/myparser/JavaParser.jay" + // line 983 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - BoundedGenericTypeVar gtv=new BoundedGenericTypeVar(((Token)yyVals[-2+yyTop]).getLexem(), ((BoundedClassIdentifierList)yyVals[0+yyTop]), ((Token)yyVals[-2+yyTop]).getOffset() ,((BoundedClassIdentifierList)yyVals[0+yyTop]).getEndOffset()); + BoundedGenericTypeVar gtv=new BoundedGenericTypeVar(((Token)yyVals[-2+yyTop]).getLexem(), ((BoundedClassIdentifierList)yyVals[0+yyTop]),null, ((Token)yyVals[-2+yyTop]).getOffset() ,((BoundedClassIdentifierList)yyVals[0+yyTop]).getEndOffset()); /*gtv.setBounds($3);*/ yyVal=gtv; } break; case 111: - // line 1070 "./../src/mycompiler/myparser/JavaParser.jay" + // line 990 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Vector vec=new Vector(); vec.addElement(((RefType)yyVals[0+yyTop])); @@ -1647,7 +1566,7 @@ case 111: } break; case 112: - // line 1077 "./../src/mycompiler/myparser/JavaParser.jay" + // line 997 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((BoundedClassIdentifierList)yyVals[-2+yyTop]).addElement(((RefType)yyVals[0+yyTop])); ((BoundedClassIdentifierList)yyVals[-2+yyTop]).addOffsetOff(((RefType)yyVals[0+yyTop])); @@ -1656,7 +1575,7 @@ case 112: } break; case 113: - // line 1085 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1005 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { GenericVarDeclarationList vec=new GenericVarDeclarationList(); vec.addElement(((GenericTypeVar)yyVals[0+yyTop])); @@ -1664,14 +1583,14 @@ case 113: } break; case 114: - // line 1091 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1011 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((GenericVarDeclarationList)yyVals[-2+yyTop]).addElement(((GenericTypeVar)yyVals[0+yyTop])); yyVal=((GenericVarDeclarationList)yyVals[-2+yyTop]); } break; case 115: - // line 1099 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1019 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-2+yyTop])); @@ -1679,14 +1598,14 @@ case 115: } break; case 116: - // line 1105 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1025 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); yyVal=((Method)yyVals[0+yyTop]); } break; case 117: - // line 1110 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1030 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); @@ -1694,7 +1613,7 @@ case 117: } break; case 118: - // line 1116 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1036 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-2+yyTop])); @@ -1703,7 +1622,7 @@ case 118: } break; case 119: - // line 1123 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1043 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); @@ -1711,7 +1630,7 @@ case 119: } break; case 120: - // line 1129 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1049 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); @@ -1720,7 +1639,7 @@ case 120: } break; case 121: - // line 1136 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1056 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); @@ -1729,7 +1648,7 @@ case 121: } break; case 122: - // line 1143 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1063 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-4+yyTop])); ((Method)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); @@ -1739,7 +1658,7 @@ case 122: } break; case 123: - // line 1151 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1071 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void Voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).setType(Voit); @@ -1747,7 +1666,7 @@ case 123: } break; case 124: - // line 1157 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1077 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); @@ -1756,7 +1675,7 @@ case 124: } break; case 125: - // line 1164 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1084 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voyt = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).setType(voyt); @@ -1765,7 +1684,7 @@ case 125: } break; case 126: - // line 1171 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1091 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voyd = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); @@ -1775,7 +1694,7 @@ case 126: } break; case 127: - // line 1179 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1099 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void Voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).setType(Voit); @@ -1784,7 +1703,7 @@ case 127: } break; case 128: - // line 1186 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1106 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); @@ -1794,7 +1713,7 @@ case 128: } break; case 129: - // line 1194 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1114 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voyt = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).setType(voyt); @@ -1804,7 +1723,7 @@ case 129: } break; case 130: - // line 1202 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1122 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voyd = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-4+yyTop])); @@ -1815,14 +1734,14 @@ case 130: } break; case 131: - // line 1212 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1132 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $1.setType(TypePlaceholder.fresh()); */ yyVal=((Method)yyVals[0+yyTop]); } break; case 132: - // line 1217 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1137 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $4.setType(TypePlaceholder.fresh());*/ ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-1+yyTop])); @@ -1830,7 +1749,7 @@ case 132: } break; case 133: - // line 1224 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1144 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-1+yyTop])); /*auskommentiert von Andreas Stadelmeier (a10023) $2.setType(TypePlaceholder.fresh());*/ @@ -1838,7 +1757,7 @@ case 133: } break; case 134: - // line 1230 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1150 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $1.setType(TypePlaceholder.fresh());*/ ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); @@ -1846,7 +1765,7 @@ case 134: } break; case 135: - // line 1236 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1156 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); /*auskommentiert von Andreas Stadelmeier (a10023) $2.setType(TypePlaceholder.fresh());*/ @@ -1855,31 +1774,31 @@ case 135: } break; case 136: - // line 1245 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1165 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; case 137: - // line 1249 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1169 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((BaseType)yyVals[-2+yyTop]).setArray(true); } break; case 138: - // line 1253 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1173 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((RefType)yyVals[0+yyTop]); } break; case 139: - // line 1257 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1177 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((RefType)yyVals[-2+yyTop]).setArray(true); } break; case 140: - // line 1261 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1181 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FieldDeclaration IVD = new FieldDeclaration(((DeclId)yyVals[0+yyTop]).getOffset()); IVD.getDeclIdVector().addElement( ((DeclId)yyVals[0+yyTop]) ); @@ -1888,20 +1807,20 @@ case 140: } break; case 141: - // line 1268 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1188 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((FieldDeclaration)yyVals[-2+yyTop]).getDeclIdVector().addElement(((DeclId)yyVals[0+yyTop])); yyVal=((FieldDeclaration)yyVals[-2+yyTop]); } break; case 142: - // line 1274 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1194 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; case 143: - // line 1279 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1199 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block Blstat = new Block(); Blstat.set_Statement(((Statement)yyVals[0+yyTop])); @@ -1909,14 +1828,14 @@ case 143: } break; case 144: - // line 1286 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1206 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Block)yyVals[-1+yyTop]).set_Statement(((Statement)yyVals[0+yyTop])); yyVal=((Block)yyVals[-1+yyTop]); } break; case 145: - // line 1292 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1212 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParameterList PL = new ParameterList(); PL.set_AddParameter(((FormalParameter)yyVals[0+yyTop])); @@ -1924,21 +1843,21 @@ case 145: } break; case 146: - // line 1298 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1218 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ParameterList)yyVals[-2+yyTop]).set_AddParameter(((FormalParameter)yyVals[0+yyTop])); yyVal = ((ParameterList)yyVals[-2+yyTop]); } break; case 147: - // line 1304 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1224 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { This THCON = new This(((Token)yyVals[-3+yyTop]).getOffset(),((Token)yyVals[-3+yyTop]).getLexem().length()); yyVal=THCON; } break; case 148: - // line 1309 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1229 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { This THCONargl = new This(((Token)yyVals[-4+yyTop]).getOffset(),((Token)yyVals[-4+yyTop]).getLexem().length()); THCONargl.set_ArgumentList(((ArgumentList)yyVals[-2+yyTop])); @@ -1946,7 +1865,7 @@ case 148: } break; case 149: - // line 1318 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1238 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { RefType RT = new RefType(-1); RT.set_UsedId(((UsedId)yyVals[0+yyTop])); @@ -1955,7 +1874,7 @@ case 149: } break; case 150: - // line 1325 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1245 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((RefType)yyVals[-2+yyTop]).set_UsedId(((UsedId)yyVals[0+yyTop])); ((RefType)yyVals[-2+yyTop]).setName(((RefType)yyVals[-2+yyTop]).get_UsedId().get_Name_1Element()); @@ -1963,7 +1882,7 @@ case 150: } break; case 151: - // line 1332 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1252 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Method met = new Method(((Token)yyVals[-2+yyTop]).getOffset()); /* #JB# 10.04.2005 */ @@ -1978,7 +1897,7 @@ case 151: } break; case 152: - // line 1345 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1265 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Method met_para = new Method(((Token)yyVals[-3+yyTop]).getOffset()); /* #JB# 10.04.2005 */ @@ -1994,7 +1913,7 @@ case 152: } break; case 153: - // line 1360 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1280 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { BooleanType BT = new BooleanType(); /* #JB# 05.04.2005 */ @@ -2005,13 +1924,13 @@ case 153: } break; case 154: - // line 1369 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1289 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; case 155: - // line 1374 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1294 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { if (((Vector)yyVals[0+yyTop]) != null) { /*$1.set_ParaList($2.get_ParaList());*/ @@ -2023,7 +1942,7 @@ case 155: RefType RT = new RefType(uid.getOffset()); RT.set_ParaList(uid.get_RealParaList()); - RT.setName(uid.getQualifiedName().toString()); + RT.setName(uid.getQualifiedName()); /*PL 05-07-30 eingefuegt containedTypes ANFANG*/ @@ -2034,7 +1953,7 @@ case 155: } break; case 156: - // line 1396 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1316 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->referenctype: " + ((UsedId)yyVals[0+yyTop])); RefType RT = new RefType(((UsedId)yyVals[0+yyTop]).getOffset()); @@ -2043,7 +1962,7 @@ case 156: /*RT.set_UsedId($1); */ /*RT.setName(RT.get_UsedId().get_Name_1Element());*/ RT.set_ParaList(((UsedId)yyVals[0+yyTop]).get_RealParaList()); - RT.setName(((UsedId)yyVals[0+yyTop]).getQualifiedName().toString()); + RT.setName(((UsedId)yyVals[0+yyTop]).getQualifiedName()); /*PL 05-07-30 eingefuegt containedTypes ANFANG*/ @@ -2054,25 +1973,25 @@ case 156: } break; case 157: - // line 1418 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1338 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((DeclId)yyVals[0+yyTop]); } break; case 158: - // line 1439 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1359 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((LocalVarDecl)yyVals[0+yyTop]); } break; case 159: - // line 1443 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1363 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; case 160: - // line 1448 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1368 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FormalParameter FP = new FormalParameter(((DeclId)yyVals[0+yyTop])); FP.setType(((Type)yyVals[-1+yyTop])); @@ -2081,7 +2000,7 @@ case 160: } break; case 161: - // line 1473 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1393 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + ((DeclId)yyVals[0+yyTop]).name); @@ -2101,7 +2020,7 @@ case 161: } break; case 162: - // line 1492 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1412 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ArgumentList AL = new ArgumentList(); AL.expr.addElement(((Expr)yyVals[0+yyTop])); @@ -2109,20 +2028,20 @@ case 162: } break; case 163: - // line 1498 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1418 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ArgumentList)yyVals[-2+yyTop]).expr.addElement(((Expr)yyVals[0+yyTop])); yyVal=((ArgumentList)yyVals[-2+yyTop]); } break; case 164: - // line 1504 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1424 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; case 165: - // line 1509 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1429 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { DeclId DI = new DeclId(); /* #JB# 10.04.2005 */ @@ -2135,61 +2054,61 @@ case 165: } break; case 166: - // line 1521 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1441 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 167: - // line 1526 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1446 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((LocalVarDecl)yyVals[-1+yyTop]); } break; case 168: - // line 1531 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1451 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; case 169: - // line 1535 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1455 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((IfStmt)yyVals[0+yyTop]); } break; case 170: - // line 1539 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1459 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((IfStmt)yyVals[0+yyTop]); } break; case 171: - // line 1543 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1463 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((WhileStmt)yyVals[0+yyTop]); } break; case 172: - // line 1547 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1467 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((ForStmt)yyVals[0+yyTop]); } break; case 173: - // line 1552 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1472 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 174: - // line 1556 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1476 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((NewClass)yyVals[0+yyTop]); } break; case 175: - // line 1561 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1481 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { IntegerType IT = new IntegerType(); /* #JB# 05.04.2005 */ @@ -2200,7 +2119,7 @@ case 175: } break; case 176: - // line 1570 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1490 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { CharacterType CT = new CharacterType(); /* #JB# 05.04.2005 */ @@ -2211,7 +2130,7 @@ case 176: } break; case 177: - // line 1580 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1500 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); LocalVarDecl LVD = new LocalVarDecl(((Type)yyVals[-1+yyTop]).getOffset(),((Type)yyVals[-1+yyTop]).getVariableLength()); @@ -2221,7 +2140,7 @@ case 177: } break; case 178: - // line 1591 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1511 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); LocalVarDecl LVD = new LocalVarDecl(((FieldDeclaration)yyVals[0+yyTop]).getOffset(),((FieldDeclaration)yyVals[0+yyTop]).getVariableLength()); @@ -2231,31 +2150,31 @@ case 178: } break; case 179: - // line 1601 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1521 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; case 180: - // line 1605 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1525 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((EmptyStmt)yyVals[0+yyTop]); } break; case 181: - // line 1609 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1529 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((ExprStmt)yyVals[0+yyTop]); } break; case 182: - // line 1613 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1533 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Return)yyVals[0+yyTop]); } break; case 183: - // line 1618 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1538 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { IfStmt Ifst = new IfStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Ifst.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2264,7 +2183,7 @@ case 183: } break; case 184: - // line 1626 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1546 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { IfStmt IfstElst = new IfStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); IfstElst.set_Expr(((Expr)yyVals[-4+yyTop])); @@ -2274,7 +2193,7 @@ case 184: } break; case 185: - // line 1635 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1555 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { WhileStmt Whlst = new WhileStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Whlst.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2283,7 +2202,7 @@ case 185: } break; case 186: - // line 1646 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1566 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-6+yyTop]).getOffset(),((Expr)yyVals[-6+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-6+yyTop])); @@ -2296,7 +2215,7 @@ case 186: } break; case 187: - // line 1658 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1578 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-5+yyTop])); @@ -2308,7 +2227,7 @@ case 187: } break; case 188: - // line 1669 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1589 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-5+yyTop])); @@ -2320,7 +2239,7 @@ case 188: } break; case 189: - // line 1680 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1600 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); Fst.set_head_Condition(((Expr)yyVals[-4+yyTop])); @@ -2332,7 +2251,7 @@ case 189: } break; case 190: - // line 1691 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1611 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-4+yyTop])); @@ -2343,7 +2262,7 @@ case 190: } break; case 191: - // line 1701 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1621 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-3+yyTop]).getOffset(),((Expr)yyVals[-3+yyTop]).getVariableLength()); Fst.set_head_Condition(((Expr)yyVals[-3+yyTop])); @@ -2354,7 +2273,7 @@ case 191: } break; case 192: - // line 1711 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1631 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Fst.set_head_Loop_expr(((Expr)yyVals[-2+yyTop])); @@ -2365,7 +2284,7 @@ case 192: } break; case 193: - // line 1721 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1641 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Statement)yyVals[0+yyTop]).getOffset(),((Statement)yyVals[0+yyTop]).getVariableLength()); Fst.set_body_Loop_block(((Statement)yyVals[0+yyTop])); @@ -2375,40 +2294,40 @@ case 193: } break; case 194: - // line 1730 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1650 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("conditionalexpression"); yyVal=((Expr)yyVals[0+yyTop]); } break; case 195: - // line 1735 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1655 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Assign)yyVals[0+yyTop]); } break; case 196: - // line 1741 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1661 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { EmptyStmt Empst = new EmptyStmt(); yyVal=Empst; } break; case 197: - // line 1747 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1667 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[-1+yyTop]); } break; case 198: - // line 1752 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1672 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Return ret = new Return(-1,-1); yyVal= ret; } break; case 199: - // line 1757 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1677 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Return retexp = new Return(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); retexp.set_ReturnExpr(((Expr)yyVals[-1+yyTop])); @@ -2416,31 +2335,31 @@ case 199: } break; case 200: - // line 1764 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1684 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; case 201: - // line 1768 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1688 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((IfStmt)yyVals[0+yyTop]); } break; case 202: - // line 1772 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1692 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((WhileStmt)yyVals[0+yyTop]); } break; case 203: - // line 1777 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1697 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 204: - // line 1783 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1703 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n"); Assign Ass = new Assign(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2467,7 +2386,7 @@ case 204: } break; case 205: - // line 1808 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1728 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Assign Ass =new Assign(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); LocalOrFieldVar LOFV = new LocalOrFieldVar(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2491,43 +2410,43 @@ case 205: } break; case 206: - // line 1831 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1751 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Assign)yyVals[0+yyTop]); } break; case 207: - // line 1835 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1755 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 208: - // line 1839 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1759 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 209: - // line 1843 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1763 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 210: - // line 1847 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1767 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 211: - // line 1851 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1771 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((MethodCall)yyVals[0+yyTop]); } break; case 212: - // line 1862 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1782 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { IfStmt IfElno = new IfStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); IfElno.set_Expr(((Expr)yyVals[-4+yyTop])); @@ -2537,7 +2456,7 @@ case 212: } break; case 213: - // line 1871 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1791 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { WhileStmt Whstno = new WhileStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Whstno.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2546,13 +2465,13 @@ case 213: } break; case 214: - // line 1879 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1799 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 215: - // line 1883 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1803 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary LogOr = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); OrOp OrO = new OrOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2564,19 +2483,19 @@ case 215: } break; case 216: - // line 1896 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1816 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=null; } break; case 217: - // line 1901 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1821 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; case 218: - // line 1905 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1825 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*Lambdabody kann auch nur aus einer Expression bestehen. In diesem Fall wird ein Block erstellt, welcher als einziges Statement ein return statment mit der expression hat.*/ /*Bsp.: Aus der Expression |var=="hallo"| wird: |{return var=="hallo";}|*/ @@ -2587,19 +2506,19 @@ case 218: } break; case 219: - // line 1915 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1835 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=null; } break; case 220: - // line 1919 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1839 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((ParameterList)yyVals[-1+yyTop]); } break; case 221: - // line 1924 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1844 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { LambdaExpression lambda = new LambdaExpression(/*((ParameSterList)$2).getOffset(),((ParameterList)$2).getVariableLength()*/0,0); if(((ParameterList)yyVals[-2+yyTop])!=null)lambda.setParameterList(((ParameterList)yyVals[-2+yyTop])); @@ -2608,54 +2527,54 @@ case 221: } break; case 222: - // line 1943 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1863 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((UsedId)yyVals[0+yyTop]); } break; case 223: - // line 1948 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1868 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=null; } break; case 224: - // line 1952 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1872 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { TimesOp TEO = new TimesOp(-1,-1); yyVal=TEO; } break; case 225: - // line 1957 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1877 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { DivideOp DEO = new DivideOp(-1,-1); yyVal=DEO; } break; case 226: - // line 1962 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1882 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ModuloOp MEO = new ModuloOp(-1,-1); yyVal=MEO; } break; case 227: - // line 1967 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1887 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PlusOp PEO = new PlusOp(-1,-1); yyVal=PEO; } break; case 228: - // line 1972 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1892 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { MinusOp MEO = new MinusOp(-1,-1); yyVal=MEO; } break; case 229: - // line 1984 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1904 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PreIncExpr PRINC = new PreIncExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); PRINC.set_Expr(((Expr)yyVals[0+yyTop])); @@ -2663,7 +2582,7 @@ case 229: } break; case 230: - // line 1991 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1911 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PreDecExpr PRDEC = new PreDecExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); PRDEC.set_Expr(((Expr)yyVals[0+yyTop])); @@ -2671,7 +2590,7 @@ case 230: } break; case 231: - // line 1998 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1918 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PostIncExpr PIE = new PostIncExpr(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); PIE.set_Expr(((Expr)yyVals[-1+yyTop])); @@ -2679,7 +2598,7 @@ case 231: } break; case 232: - // line 2005 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1925 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PostDecExpr PDE = new PostDecExpr(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); PDE.set_Expr(((Expr)yyVals[-1+yyTop])); @@ -2687,7 +2606,7 @@ case 232: } break; case 233: - // line 2013 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1933 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M1"); MethodCall MC = new MethodCall(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2719,7 +2638,7 @@ case 233: } break; case 234: - // line 2043 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1963 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M2"); MethodCall MCarg = new MethodCall(((UsedId)yyVals[-3+yyTop]).getOffset(),((UsedId)yyVals[-3+yyTop]).getVariableLength()); @@ -2752,7 +2671,7 @@ case 234: } break; case 235: - // line 2074 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1994 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M3"); MethodCall MCpr = new MethodCall(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); @@ -2773,7 +2692,7 @@ case 235: } break; case 236: - // line 2093 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2013 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M4"); MethodCall MCPA = new MethodCall(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); @@ -2795,7 +2714,7 @@ case 236: } break; case 237: - // line 2116 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2036 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { NewClass NC = new NewClass(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); NC.set_UsedId(((UsedId)yyVals[-2+yyTop])); @@ -2805,7 +2724,7 @@ case 237: } break; case 238: - // line 2124 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2044 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { NewClass NCarg = new NewClass(((UsedId)yyVals[-3+yyTop]).getOffset(),((UsedId)yyVals[-3+yyTop]).getVariableLength()); NCarg.set_UsedId(((UsedId)yyVals[-3+yyTop])); @@ -2816,13 +2735,13 @@ case 238: } break; case 239: - // line 2134 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2054 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 240: - // line 2138 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2058 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary And = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); AndOp AndO = new AndOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2834,19 +2753,19 @@ case 240: } break; case 241: - // line 2154 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2074 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 242: - // line 2158 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2078 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 243: - // line 2162 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2082 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PositivExpr POSEX=new PositivExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryPlus UP= new UnaryPlus(); @@ -2856,7 +2775,7 @@ case 243: } break; case 244: - // line 2170 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2090 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { NegativeExpr NEGEX=new NegativeExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryMinus UM=new UnaryMinus(); @@ -2866,19 +2785,19 @@ case 244: } break; case 245: - // line 2178 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2098 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 246: - // line 2183 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2103 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 247: - // line 2187 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2107 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { if (((UsedId)yyVals[0+yyTop]).get_Name().size() > 1) { @@ -2898,37 +2817,37 @@ case 247: } break; case 248: - // line 2205 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2125 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 249: - // line 2209 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2129 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 250: - // line 2214 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2134 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 251: - // line 2219 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2139 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 253: - // line 2225 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2145 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Literal)yyVals[0+yyTop]); } break; case 254: - // line 2229 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2149 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { This T = new This(((Token)yyVals[0+yyTop]).getOffset(),((Token)yyVals[0+yyTop]).getLexem().length()); UsedId UT = new UsedId(((Token)yyVals[0+yyTop]).getOffset()); @@ -2938,23 +2857,23 @@ case 254: } break; case 255: - // line 2250 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2170 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((MethodCall)yyVals[0+yyTop]); } break; case 256: - // line 2254 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2174 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 257: - // line 2259 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2179 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {yyVal=((Expr)yyVals[0+yyTop]);} break; case 258: - // line 2261 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2181 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {NotExpr NE=new NotExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryNot UN=new UnaryNot(); NE.set_UnaryNot(UN); @@ -2963,36 +2882,36 @@ case 258: } break; case 259: - // line 2267 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2187 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {yyVal=((CastExpr)yyVals[0+yyTop]);} break; case 260: - // line 2269 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2189 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {yyVal=((Expr)yyVals[0+yyTop]);} break; case 262: - // line 2274 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2194 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {IntLiteral IL = new IntLiteral(); IL.set_Int(((Token)yyVals[0+yyTop]).String2Int()); yyVal = IL; } break; case 263: - // line 2279 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2199 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {BoolLiteral BL = new BoolLiteral(); BL.set_Bool(((Token)yyVals[0+yyTop]).String2Bool()); yyVal = BL; } break; case 264: - // line 2283 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2203 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {CharLiteral CL = new CharLiteral(); CL.set_Char(((Token)yyVals[0+yyTop]).CharInString()); yyVal=CL; } break; case 265: - // line 2288 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2208 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { StringLiteral ST = new StringLiteral(); ST.set_String(((Token)yyVals[0+yyTop]).get_String()); @@ -3000,14 +2919,14 @@ case 265: } break; case 266: - // line 2293 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2213 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { LongLiteral LL = new LongLiteral(); LL.set_Long(((Token)yyVals[0+yyTop]).String2Long()); yyVal = LL; } break; case 267: - // line 2297 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2217 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FloatLiteral FL = new FloatLiteral(); FL.set_Float(((Token)yyVals[0+yyTop]).String2Float()); @@ -3015,7 +2934,7 @@ case 267: } break; case 268: - // line 2302 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2222 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { DoubleLiteral DL = new DoubleLiteral(); DL.set_Double(((Token)yyVals[0+yyTop]).String2Double()); @@ -3023,14 +2942,14 @@ case 268: } break; case 269: - // line 2308 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2228 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Null NN = new Null(); yyVal=NN; } break; case 270: - // line 2314 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2234 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { CastExpr CaEx=new CastExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); CaEx.set_Type(((BaseType)yyVals[-2+yyTop])); @@ -3039,24 +2958,24 @@ case 270: } break; case 271: - // line 2323 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2243 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 272: - // line 2327 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2247 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { } break; case 273: - // line 2331 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2251 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 274: - // line 2335 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2255 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary EQ = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); EqualOp EO = new EqualOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3068,7 +2987,7 @@ case 274: } break; case 275: - // line 2345 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2265 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary NEQ = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); NotEqualOp NEO = new NotEqualOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3080,13 +2999,13 @@ case 275: } break; case 276: - // line 2356 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2276 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 277: - // line 2360 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2280 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary LO = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); LessOp LOO = new LessOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3098,7 +3017,7 @@ case 277: } break; case 278: - // line 2370 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2290 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary GO = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); GreaterOp GOO = new GreaterOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3110,7 +3029,7 @@ case 278: } break; case 279: - // line 2380 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2300 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary LE = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); LessEquOp LEO = new LessEquOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3122,7 +3041,7 @@ case 279: } break; case 280: - // line 2390 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2310 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary GE = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); GreaterEquOp GEO = new GreaterEquOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3134,7 +3053,7 @@ case 280: } break; case 281: - // line 2400 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2320 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { InstanceOf ISO=new InstanceOf(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); ISO.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -3143,19 +3062,19 @@ case 281: } break; case 282: - // line 2408 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2328 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 283: - // line 2413 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2333 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 284: - // line 2417 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2337 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary AD = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); PlusOp PO = new PlusOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3167,7 +3086,7 @@ case 284: } break; case 285: - // line 2427 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2347 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary MI = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); MinusOp MO = new MinusOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3179,13 +3098,13 @@ case 285: } break; case 286: - // line 2438 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2358 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 287: - // line 2442 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2362 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary ML = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); TimesOp TO = new TimesOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3197,7 +3116,7 @@ case 287: } break; case 288: - // line 2452 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2372 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary DV = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); DivideOp DO = new DivideOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3209,7 +3128,7 @@ case 288: } break; case 289: - // line 2462 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2382 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary MD = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); ModuloOp MO = new ModuloOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3220,7 +3139,7 @@ case 289: yyVal =MD; } break; - // line 3223 "-" + // line 3143 "-" } yyTop -= yyLen[yyN]; yyState = yyStates[yyTop]; diff --git a/src/de/dhbwstuttgart/parser/JavaParser.jay b/src/de/dhbwstuttgart/parser/JavaParser.jay index 703c75050..f4490d4fc 100755 --- a/src/de/dhbwstuttgart/parser/JavaParser.jay +++ b/src/de/dhbwstuttgart/parser/JavaParser.jay @@ -4,105 +4,25 @@ Backup von JavaParser.jay 10.April 17 Uhr */ -package mycompiler.myparser; +package de.dhbwstuttgart.parser; -import mycompiler.myclass.FieldDeclaration; -import mycompiler.myclass.GenericDeclarationList; -import mycompiler.myclass.Field; +import de.dhbwstuttgart.core.AClassOrInterface; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ImportDeclarations; +import de.dhbwstuttgart.syntaxtree.Interface; +import de.dhbwstuttgart.syntaxtree.SourceFile; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.typeinference.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.*; +import de.dhbwstuttgart.syntaxtree.*; +import de.dhbwstuttgart.syntaxtree.misc.*; +import de.dhbwstuttgart.syntaxtree.modifier.*; +import de.dhbwstuttgart.syntaxtree.operator.*; +import de.dhbwstuttgart.syntaxtree.type.*; +import de.dhbwstuttgart.syntaxtree.statement.*; import java.util.Vector; -import mycompiler.SourceFile; -import mycompiler.AClassOrInterface; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassBody; -import mycompiler.myclass.Constructor; -import mycompiler.myclass.Constant; -import mycompiler.myclass.ImportDeclarations; -import mycompiler.myclass.DeclId; -import mycompiler.myclass.ExceptionList; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.Method; -import mycompiler.myclass.ParameterList; -import mycompiler.myclass.UsedId; -import mycompiler.myinterface.Interface; -import mycompiler.myinterface.InterfaceBody; -import mycompiler.mymodifier.Abstract; -import mycompiler.mymodifier.Final; -import mycompiler.mymodifier.Modifier; -import mycompiler.mymodifier.Modifiers; -import mycompiler.mymodifier.Private; -import mycompiler.mymodifier.Protected; -import mycompiler.mymodifier.Public; -import mycompiler.mymodifier.Static; -import mycompiler.myoperator.AndOp; -import mycompiler.myoperator.DivideOp; -import mycompiler.myoperator.EqualOp; -import mycompiler.myoperator.GreaterEquOp; -import mycompiler.myoperator.GreaterOp; -import mycompiler.myoperator.LessEquOp; -import mycompiler.myoperator.LessOp; -import mycompiler.myoperator.MinusOp; -import mycompiler.myoperator.ModuloOp; -import mycompiler.myoperator.NotEqualOp; -import mycompiler.myoperator.Operator; -import mycompiler.myoperator.OrOp; -import mycompiler.myoperator.PlusOp; -import mycompiler.myoperator.TimesOp; -import mycompiler.mystatement.ArgumentList; -import mycompiler.mystatement.Assign; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Block; -import mycompiler.mystatement.BoolLiteral; -import mycompiler.mystatement.FloatLiteral; -import mycompiler.mystatement.DoubleLiteral; -import mycompiler.mystatement.LongLiteral; -import mycompiler.mystatement.CastExpr; -import mycompiler.mystatement.CharLiteral; -import mycompiler.mystatement.EmptyStmt; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.ExprStmt; -import mycompiler.mystatement.IfStmt; -import mycompiler.mystatement.InstanceOf; -import mycompiler.mystatement.IntLiteral; -import mycompiler.mystatement.Literal; -import mycompiler.mystatement.InstVar; -import mycompiler.mystatement.LocalOrFieldVar; -import mycompiler.mystatement.LocalVarDecl; -import mycompiler.mystatement.MethodCall; -import mycompiler.mystatement.NegativeExpr; -import mycompiler.mystatement.NewClass; -import mycompiler.mystatement.NotExpr; -import mycompiler.mystatement.Null; -import mycompiler.mystatement.PositivExpr; -import mycompiler.mystatement.PostDecExpr; -import mycompiler.mystatement.PostIncExpr; -import mycompiler.mystatement.PreDecExpr; -import mycompiler.mystatement.PreIncExpr; -import mycompiler.mystatement.Receiver; -import mycompiler.mystatement.Return; -import mycompiler.mystatement.Statement; -import mycompiler.mystatement.StringLiteral; -import mycompiler.mystatement.This; -import mycompiler.mystatement.UnaryMinus; -import mycompiler.mystatement.UnaryNot; -import mycompiler.mystatement.UnaryPlus; -import mycompiler.mystatement.WhileStmt; -import mycompiler.mystatement.ForStmt; -import mycompiler.mystatement.LambdaExpression; -import mycompiler.mytype.BaseType; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.CharacterType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.ParaList; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; -import mycompiler.mytype.WildcardType; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Pair; public class JavaParser{ public Vector path = new Vector(); diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index 9a7b8ffc1..d8a66302c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -20,7 +20,6 @@ import de.dhbwstuttgart.syntaxtree.statement.Block; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Statement; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; import de.dhbwstuttgart.syntaxtree.type.Type; diff --git a/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java index 087689c90..4f2e5a4d5 100644 --- a/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java +++ b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java @@ -10,6 +10,7 @@ import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.OderConstraint; @@ -136,7 +137,7 @@ public class FieldDeclaration extends Field{ */ //TypeCheck, falls es sich um einen RefType handelt: - this.getType().checkType(localAssumptions, this); + ConstraintType thisType = this.getType().TYPE(localAssumptions, this); /* if(this.getType()!=null && (this.getType() instanceof RefType)){ Type replaceType = null; @@ -146,13 +147,13 @@ public class FieldDeclaration extends Field{ } */ - SingleConstraint c1 = new SingleConstraint(this.getType(), this.getType()); + SingleConstraint c1 = new SingleConstraint(thisType, thisType); ret.add(c1); //Damit die TypVariable des Felds in den Constraints auftaucht if(this.wert!=null){ //Falls bei der Deklaration ein Wert zugewiesen wird, verhält sich das Constraintserzeugen wie bei dem Assign-Statement: ret.add(this.wert.TYPEExpr(localAssumptions)); - ret.add(new SingleConstraint(this.wert.getType(), this.getType())); + ret.add(new SingleConstraint(this.wert.getType().TYPE(localAssumptions,this), thisType)); } return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/Method.java b/src/de/dhbwstuttgart/syntaxtree/Method.java index a1044daf8..777b8be4b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Method.java +++ b/src/de/dhbwstuttgart/syntaxtree/Method.java @@ -527,7 +527,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable } //TypeCheck, falls es sich um einen RefType handelt: - this.returntype = this.returntype.checkType(localAss, this); + this.returntype = this.returntype.TYPE(localAss, this).getType(); /* if(this.returntype!=null && (this.returntype instanceof RefType)&& !(this.returntype instanceof mycompiler.mytype.Void)){//Sonderfall der Methode: Ihr Typ darf Void definiert werden. @@ -540,7 +540,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable //Die Parameter zu den Assumptions hinzufügen: if(this.parameterlist!=null)for(FormalParameter param : this.parameterlist){ - param.setType(param.getType().checkType(localAss, this)); + param.setType(param.getType().TYPE(localAss, this).getType()); /* if(param.getType() instanceof RefType) { @@ -556,7 +556,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable } ret.add(this.block.TYPEStmt(localAss)); //eine Verknüpfung mit der Type Assumption aus dem Assumption Set und dem ermittelten Typ der Methode: - ret.add(new SingleConstraint(this.block.getType(), this.returntype)); + ret.add(new SingleConstraint(this.block.getType().TYPE(localAss, this), this.returntype.TYPE(localAss, this))); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index c2fb4b18c..69ede18c2 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -26,7 +26,6 @@ import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.modifier.Public; import de.dhbwstuttgart.syntaxtree.type.BooleanType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; @@ -35,6 +34,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.FunN; import de.dhbwstuttgart.typeinference.FunNInterface; import de.dhbwstuttgart.typeinference.FunNMethod; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.UndConstraint; @@ -1631,5 +1631,21 @@ public class SourceFile //this.filename = filename; } + + + @Override + public int getOffset() { + // TODO Auto-generated method stub + return 0; + } + + + + @Override + public int getVariableLength() { + // TODO Auto-generated method stub + return 0; + } + } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java b/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java index 15c8a373a..7e621eebe 100644 --- a/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java +++ b/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java @@ -2,10 +2,11 @@ package de.dhbwstuttgart.syntaxtree; import java.util.Vector; +import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.exceptions.DebugException; @@ -14,7 +15,7 @@ import de.dhbwstuttgart.typeinference.typedeployment.GenericTypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; -public abstract class SyntaxTreeNode{ +public abstract class SyntaxTreeNode implements IItemWithOffset{ protected SyntaxTreeNode parent; diff --git a/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java index 78b68fb4d..4670605de 100755 --- a/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java @@ -312,7 +312,7 @@ public class UsedId implements IItemWithOffset // ino.end public JavaCodeResult printJavaCode(ResultSet resultSet) { - if(this.name.size()>1)throw new TypeinferenceException("Es kann maximal nur eine Superklasse pro Klasse geben", this); + if(this.name.size()>1)throw new TypeinferenceException("Es kann maximal nur eine Superklasse pro Klasse geben", null); JavaCodeResult ret = new JavaCodeResult(this.getQualifiedName().toString()); if(this.paralist != null){ ret.attach( "<" ); diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java index 5dae26d7a..2769dd909 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java @@ -14,10 +14,11 @@ import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.type.IntegerType; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; @@ -59,8 +60,8 @@ public abstract class AddOp extends Operator } @Override - public HashMap getReturnTypes(TypeAssumptions ass) { - HashMap ret = new HashMap(); + public HashMap getReturnTypes(TypeAssumptions ass) { + HashMap ret = new HashMap(); ret.put(ass.getTypeFor(new RefType("java.lang.Integer",-1), this), ass.getTypeFor(new RefType("java.lang.Integer",-1),this)); ret.put(ass.getTypeFor(new RefType("java.lang.Double",-1), this), ass.getTypeFor(new RefType("java.lang.Double",-1),this)); ret.put(ass.getTypeFor(new RefType("java.lang.Float",-1), this), ass.getTypeFor(new RefType("java.lang.Float",-1),this)); diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/AndOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/AndOp.java index 85081d7a4..9afe711cf 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/AndOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/AndOp.java @@ -1,6 +1,9 @@ // ino.module.AndOp.8595.package package de.dhbwstuttgart.syntaxtree.operator; +import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.type.BooleanType; import de.dhbwstuttgart.syntaxtree.type.IntegerType; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java index c09b2b6b4..e5ebac5e8 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java @@ -8,6 +8,7 @@ import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; @@ -41,7 +42,7 @@ public class DivideOp extends MulOp code.add_code(JVMCode.ndiv(expr1.getTypeName())); } // ino.end - + } diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java index c8f58be3f..99198400f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java @@ -10,11 +10,12 @@ import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Null; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -75,6 +76,8 @@ public class EqualOp extends RelOp else code.add_code(JVMCode.if_ncmpeq(type)); } // ino.end + + } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java index 2027d865c..1577b463a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java @@ -8,6 +8,7 @@ import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java index 33472b5b6..511cc9b79 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java @@ -18,10 +18,11 @@ import de.dhbwstuttgart.syntaxtree.statement.NotExpr; import de.dhbwstuttgart.syntaxtree.statement.Null; import de.dhbwstuttgart.syntaxtree.statement.Statement; import de.dhbwstuttgart.syntaxtree.type.BooleanType; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; @@ -229,8 +230,8 @@ public abstract class LogOp extends Operator } @Override - public HashMap getReturnTypes(TypeAssumptions ass) { - HashMap ret = new HashMap(); + public HashMap getReturnTypes(TypeAssumptions ass) { + HashMap ret = new HashMap<>(); ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Boolean",-1), this)); return ret; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java index 47c8d887a..f28819ade 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java @@ -10,9 +10,10 @@ import java.util.Vector; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.syntaxtree.statement.Binary; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintType; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -40,8 +41,8 @@ public abstract class MulOp extends Operator } @Override - public HashMap getReturnTypes(TypeAssumptions ass) { - HashMap ret = new HashMap(); + public HashMap getReturnTypes(TypeAssumptions ass) { + HashMap ret = new HashMap<>(); ret.put(ass.getTypeFor(new RefType("java.lang.Integer",-1), this), ass.getTypeFor(new RefType("java.lang.Integer",-1), this)); ret.put(ass.getTypeFor(new RefType("java.lang.Double",-1), this), ass.getTypeFor(new RefType("java.lang.Double",-1), this)); ret.put(ass.getTypeFor(new RefType("java.lang.Float",-1), this), ass.getTypeFor(new RefType("java.lang.Float",-1), this)); diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java index 91b229247..c95f341a0 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java @@ -13,8 +13,8 @@ import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Null; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.unify.Unify; // ino.class.NotEqualOp.24241.declaration diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java index 29304f017..5f8aef61b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java @@ -13,14 +13,16 @@ import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; @@ -30,7 +32,7 @@ import de.dhbwstuttgart.typeinference.unify.Unify; // ino.class.Operator.24257.declaration -public abstract class Operator implements IItemWithOffset +public abstract class Operator extends SyntaxTreeNode // ino.end // ino.class.Operator.24257.body { @@ -120,7 +122,12 @@ public abstract class Operator implements IItemWithOffset * @param ass * @return */ - public abstract HashMap getReturnTypes(TypeAssumptions ass); + public abstract HashMap getReturnTypes(TypeAssumptions ass); + + @Override + public Vector getChildren() { + return new Vector<>(); + } } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java index ec22a5e2b..0c75a3592 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java @@ -13,9 +13,10 @@ import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintType; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -51,8 +52,8 @@ public abstract class RelOp extends Operator } @Override - public HashMap getReturnTypes(TypeAssumptions ass) { - HashMap ret = new HashMap(); + public HashMap getReturnTypes(TypeAssumptions ass) { + HashMap ret = new HashMap<>(); ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Integer",-1), this)); ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Double",-1), this)); ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Float",-1), this)); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java index 941734b31..e10cded54 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java @@ -20,13 +20,13 @@ import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Void; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.FreshTypeVariable; import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; @@ -189,8 +189,8 @@ public class Assign extends Expr ret.add(expr2.TYPEExpr(assumptions)); //this.setTypeVariable( TypePlaceholder.fresh(this)); this.setType(TypePlaceholder.fresh(this)); - ret.add(new SingleConstraint(expr2.getType(), expr1.getType())); //expr2.type <. expr1.type - ret.add(new SingleConstraint(expr1.getType(), this.getType())); + ret.add(new SingleConstraint(expr2.getType().TYPE(assumptions, this), expr1.getType().TYPE(assumptions, this))); //expr2.type <. expr1.type + ret.add(new SingleConstraint(expr1.getType().TYPE(assumptions, this), this.getType().TYPE(assumptions, this))); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java index 53f8886db..3e4785efd 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java @@ -7,8 +7,8 @@ import java.util.HashMap; import java.util.Hashtable; import java.util.Vector; - import org.apache.log4j.Logger; + import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -24,13 +24,14 @@ import de.dhbwstuttgart.syntaxtree.operator.MulOp; import de.dhbwstuttgart.syntaxtree.operator.Operator; import de.dhbwstuttgart.syntaxtree.operator.RelOp; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.UndConstraint; @@ -259,12 +260,12 @@ public class Binary extends BinaryExpr */ if(this.getType()==null)this.set_Type(TypePlaceholder.fresh(this)); OderConstraint oderCons = new OderConstraint(); - HashMap rMap = this.op.getReturnTypes(assumptions); - for(Type rT : rMap.keySet()){ + HashMap rMap = this.op.getReturnTypes(assumptions); + for(ConstraintType rT : rMap.keySet()){ UndConstraint c = new UndConstraint(); - c.addConstraint(this.getType(),rT); - c.addConstraint(this.expr1.getType(), rMap.get(rT)); - c.addConstraint(this.expr2.getType(), rMap.get(rT)); + c.addConstraint(this.getType().TYPE(assumptions, this),rT); + c.addConstraint(this.expr1.getType().TYPE(assumptions, this), rMap.get(rT)); + c.addConstraint(this.expr2.getType().TYPE(assumptions, this), rMap.get(rT)); oderCons.addConstraint(c); } ret.add(oderCons); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java index 0a5796aeb..5ae6bba8e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java @@ -7,8 +7,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; - import org.apache.log4j.Logger; + import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; @@ -21,6 +21,7 @@ import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.FreshTypeVariable; import de.dhbwstuttgart.typeinference.JavaCodeResult; @@ -192,8 +193,8 @@ public class Block extends Statement } else { TypePlaceholder tph = TypePlaceholder.fresh(this); - ret.add(new SingleConstraint(this.getType(), tph)); - ret.add(new SingleConstraint(stmt.getType(), tph)); + ret.add(new SingleConstraint(this.getType().TYPE(assumptions, this), new ConstraintType(tph))); + ret.add(new SingleConstraint(stmt.getType().TYPE(assumptions, this), new ConstraintType(tph))); this.setType(tph); } } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java index b1b39e808..39c4b6fa4 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java @@ -126,12 +126,10 @@ public class BoolLiteral extends Literal @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { - this.type = assumptions.getTypeFor(new RefType("java.lang.Boolean",-1), this); + this.type = assumptions.getTypeFor(new RefType("java.lang.Boolean",-1), this).getType(); return new ConstraintsSet(); } - - @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { if(Bool)return new JavaCodeResult("true"); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java index 903ee739f..97fc74067 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java @@ -164,7 +164,7 @@ public class DoubleLiteral extends Literal @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { - this.setType(assumptions.getTypeFor(new RefType("Double",this.getOffset()), this)); + this.setType(assumptions.getTypeFor(new RefType("Double",this.getOffset()), this).getType()); return new ConstraintsSet(); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java index 370af3480..14451efd0 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java @@ -7,10 +7,11 @@ import java.util.Iterator; import java.util.Vector; import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.MyCompiler; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.unify.Unify; // ino.class.ExprStmt.25265.declaration diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java index bd78a1fdb..3f02f4012 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java @@ -5,7 +5,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; - import org.apache.log4j.Logger; import de.dhbwstuttgart.bytecode.ClassFile; @@ -21,11 +20,11 @@ import de.dhbwstuttgart.syntaxtree.operator.LogOp; import de.dhbwstuttgart.syntaxtree.operator.Operator; import de.dhbwstuttgart.syntaxtree.operator.RelOp; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java index 0cae62ade..fe0a14362 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java @@ -8,6 +8,7 @@ import java.util.Iterator; import java.util.Vector; import org.apache.log4j.Logger; + import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -22,7 +23,6 @@ import de.dhbwstuttgart.syntaxtree.operator.Operator; import de.dhbwstuttgart.syntaxtree.operator.RelOp; import de.dhbwstuttgart.syntaxtree.type.BooleanType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; @@ -30,6 +30,7 @@ import de.dhbwstuttgart.syntaxtree.type.Void; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.FreshTypeVariable; import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; @@ -256,10 +257,10 @@ public class IfStmt extends Statement ret.add(this.then_block.TYPEStmt(assumptions)); if(else_block!=null){ ret.add(this.else_block.TYPEStmt(assumptions)); - if(!(else_block.getType() instanceof Void))ret.add(new SingleConstraint(else_block.getType(),this.getType())); + if(!(else_block.getType() instanceof Void))ret.add(new SingleConstraint(else_block.getType().TYPE(assumptions, this),this.getType().TYPE(assumptions, this))); } - ret.add(new SingleConstraint(expr.getType(),assumptions.getTypeFor(new RefType("Boolean",0), this))); //(expressionDesIfStmt)<.boolean - if(!(then_block.getType() instanceof Void))ret.add(new SingleConstraint(then_block.getType(),this.getType())); + ret.add(new SingleConstraint(expr.getType().TYPE(assumptions, this),assumptions.getTypeFor(new RefType("Boolean",0), this))); //(expressionDesIfStmt)<.boolean + if(!(then_block.getType() instanceof Void))ret.add(new SingleConstraint(then_block.getType().TYPE(assumptions, this),this.getType().TYPE(assumptions, this))); if(then_block.getType() instanceof Void && (else_block == null || else_block.getType() instanceof Void))this.setType(new Void(this.getOffset())); return ret; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java index f149e94e9..c78108bac 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java @@ -6,6 +6,7 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; + import org.apache.log4j.Logger; import de.dhbwstuttgart.bytecode.ClassFile; @@ -17,7 +18,6 @@ import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; @@ -25,6 +25,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.FreshTypeVariable; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.UndConstraint; @@ -211,8 +212,8 @@ public class InstVar extends Expr OderConstraint oderConstraint = new OderConstraint(); for(FieldAssumption fa : assumptions.getFieldVars(this.get_Name())){ UndConstraint undConstraint = new UndConstraint(); - undConstraint.addConstraint(fa.getAssumedType(),this.getType()); - undConstraint.addConstraint(this.expr.getType(),fa.getParentClass().getType()); + undConstraint.addConstraint(fa.getAssumedType().TYPE(assumptions, this),this.getType().TYPE(assumptions, this)); + undConstraint.addConstraint(this.expr.getType().TYPE(assumptions, this),fa.getParentClass().getType().TYPE(assumptions, this)); oderConstraint.addConstraint(undConstraint); } ret.add(oderConstraint); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java index f90970c48..c06c6d679 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java @@ -161,7 +161,7 @@ public class IntLiteral extends Literal public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { ConstraintsSet ret = new ConstraintsSet(); //this.setType(new IntegerType()); - this.set_Type(assumptions.getTypeFor(new RefType("java.lang.Integer",-1), this)); + this.set_Type(assumptions.getTypeFor(new RefType("java.lang.Integer",-1), this).getType()); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java index 64891b302..b65fad8ef 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java @@ -149,7 +149,7 @@ public class LambdaExpression extends Expr{ this.setType(TypePlaceholder.fresh(this)); //ArgumentAssumptions + assumptions ergeben die Assumptions für die Statements innerhalb des Lambda-Bodys: ret.add(method_body.TYPEStmt(ArgumentAssumptions.add(assumptions))); //Es gibt die LambdaExpression nur mit einem Block als Method Body, nicht mit einer einzelnen Expression - ret.add(new SingleConstraint(new FunN(method_body.getType(), paramTypes),this.getType())); + ret.add(new SingleConstraint(new FunN(method_body.getType(), paramTypes).TYPE(assumptions, this),this.getType().TYPE(assumptions, this))); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java index 946812366..048cab24a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java @@ -379,13 +379,11 @@ public class LocalVarDecl extends Statement implements TypeInsertable ConstraintsSet ret = new ConstraintsSet(); if((this.getType() instanceof RefType)){ Type replaceType = null; - replaceType = assumptions.getTypeFor((RefType)this.getType(), this); - if(replaceType == null) - throw new TypeinferenceException("Der Typ "+this.getType().getName()+" ist nicht korrekt",this); + replaceType = assumptions.getTypeFor((RefType)this.getType(), this).getType(); this.setType(replaceType); } assumptions.addAssumption(new LocalVarAssumption(this, this.getType())); //Bevor der Typ auf Void gesetzt wird. - ret.add(new SingleConstraint(this.getType(), this.getType())); + ret.add(new SingleConstraint(this.getType().TYPE(assumptions, this), this.getType().TYPE(assumptions, this))); //assumptions.remove(null); // falls Variable mit diesem Namen bereits vorhanden. this.setReturnType(new Void(0)); //Return typ einer Variablendeklaration ist Void return ret; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java index 6d9aa6f46..c83cfe5a0 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java @@ -6,8 +6,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; - import org.apache.log4j.Logger; + import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; @@ -17,12 +17,12 @@ import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.Void; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java index 9e562ef0e..4269bc312 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java @@ -219,13 +219,13 @@ public class NewClass extends Expr for(int i=0; i parameterList = new Vector<>(); + Vector parameterList = new Vector<>(); + Vector parameterList2 = new Vector<>(); if(this.parameter!=null)for(Type param : this.parameter){ - parameterList.add(param.checkType(ass, parent)); + ConstraintType ct = param.TYPE(ass, parent); + parameterList.add(ct); + parameterList2.add(ct.getType()); } - this.parameter = parameterList; - Type t = super.checkType(ass,parent); + this.parameter = parameterList2; + ConstraintType t = super.TYPE(ass,parent); return t; } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Type.java b/src/de/dhbwstuttgart/syntaxtree/type/Type.java index 8fab0c18b..b4ff52908 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Type.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Type.java @@ -5,11 +5,13 @@ package de.dhbwstuttgart.syntaxtree.type; import java.util.ArrayList; import java.util.Vector; +import sun.reflect.generics.reflectiveObjects.NotImplementedException; import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; @@ -285,9 +287,17 @@ public class Type extends SyntaxTreeNode implements IItemWithOffset * Prüft ob der Typ in den Assumptions ass vorhanden ist. * Dabei kann eine neue Instanz eines Typs entstehen, welche von der Methode zurückgegeben wird. * @param ass - Die Assumptions für den jeweiligen Kontext in dem sich der Typ befindet. - */ - public Type checkType(TypeAssumptions ass, IItemWithOffset parent){ - Type t = ass.getTypeFor(this, this); + + public ConstraintType checkType(TypeAssumptions ass, SyntaxTreeNode parent){ + ConstraintType t = ass.getTypeFor(this, this); + if(t==null) + throw new TypeinferenceException("Der Typ "+this.getName()+" ist nicht korrekt", parent); + return t; + } + */ + //TODO: checkType wird nicht mehr gebraucht. TYPE übernimmt dessen Aufgabe. Es muss nur sichergestellt werden, dass jeder Typ in den Constraints landet, dadurch wird für jeden Typ die Methode TYPE aufgerufen. + public ConstraintType TYPE(TypeAssumptions ass, SyntaxTreeNode parent){ + ConstraintType t = ass.getTypeFor(this, this); if(t==null) throw new TypeinferenceException("Der Typ "+this.getName()+" ist nicht korrekt", parent); return t; diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Void.java b/src/de/dhbwstuttgart/syntaxtree/type/Void.java index 4a07a13a5..54d732771 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Void.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Void.java @@ -3,6 +3,8 @@ package de.dhbwstuttgart.syntaxtree.type; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; @@ -69,8 +71,8 @@ public class Void extends RefType // ino.end @Override - public Type checkType(TypeAssumptions ass, IItemWithOffset parent){ - return this; + public ConstraintType TYPE(TypeAssumptions ass, SyntaxTreeNode parent){ + return new ConstraintType(this); } } // ino.end diff --git a/src/de/dhbwstuttgart/typeinference/ConstraintPair.java b/src/de/dhbwstuttgart/typeinference/ConstraintPair.java new file mode 100644 index 000000000..f49151395 --- /dev/null +++ b/src/de/dhbwstuttgart/typeinference/ConstraintPair.java @@ -0,0 +1,15 @@ +package de.dhbwstuttgart.typeinference; + +public class ConstraintPair { + + private Pair p; + + public ConstraintPair(ConstraintType t1, ConstraintType t2){ + p = new Pair(t1.getType(), t2.getType()); + } + + public Pair getPair(){ + return p; + } + +} diff --git a/src/de/dhbwstuttgart/typeinference/ConstraintType.java b/src/de/dhbwstuttgart/typeinference/ConstraintType.java new file mode 100644 index 000000000..f4ff991aa --- /dev/null +++ b/src/de/dhbwstuttgart/typeinference/ConstraintType.java @@ -0,0 +1,22 @@ +package de.dhbwstuttgart.typeinference; + +import de.dhbwstuttgart.syntaxtree.type.*; + +public class ConstraintType{ + + private Type t; + + public ConstraintType(TypePlaceholder t){ + this.t = t; + } + public ConstraintType(GenericTypeVar t){ + this.t = t; + } + public ConstraintType(RefType t){ + this.t = t; + } + public Type getType() { + return t; + } + +} diff --git a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java index d07ab2c0f..889cf0a6e 100755 --- a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java +++ b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java @@ -3,8 +3,6 @@ package de.dhbwstuttgart.typeinference; import java.util.Iterator; import java.util.Vector; -import de.dhbwstuttgart.syntaxtree.type.Pair; - public class ConstraintsSet implements Iterable{ private Vector constraintsSet; diff --git a/src/de/dhbwstuttgart/typeinference/FunNInterface.java b/src/de/dhbwstuttgart/typeinference/FunNInterface.java index ac64a8a33..c41c228c5 100644 --- a/src/de/dhbwstuttgart/typeinference/FunNInterface.java +++ b/src/de/dhbwstuttgart/typeinference/FunNInterface.java @@ -2,6 +2,7 @@ package de.dhbwstuttgart.typeinference; import java.util.Vector; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; @@ -18,17 +19,27 @@ import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; public class FunNInterface extends Class{ //TODO: Diese Klasse sollte eigentlich von Interface erben //TODO: getType muss einen Typ mit der ParameterListe zurückliefern. + + + private Vector gtvparalist; + /** * Ein FunN-Interface enthält nur eine Methode (namens apply). Ist also ein Funktionales Interface. * @param N - Die Anzahl der Parameter der apply-Methode. Beispiel N = 1 ergibt R apply(T1 par1); */ public FunNInterface(int N) { super("Fun"+N, 0); - Vector paralist = new Vector(); - paralist.add(new GenericTypeVar("R",this, 0)); + GenericTypeVar gtv; + Vector paralist = new Vector<>(); + gtv = new GenericTypeVar("R",this, 0); + this.gtvparalist = new Vector(); + paralist.add(gtv); + this.gtvparalist.add(gtv); //paralist.add(TypePlaceholder.fresh()); for(int i = 1; i<=N;i++){ - paralist.add(new GenericTypeVar("T"+i,this, 0)); + gtv=new GenericTypeVar("T"+i,this, 0); + paralist.add(gtv); + this.gtvparalist.add(gtv); //paralist.add(TypePlaceholder.fresh()); } this.set_ParaList(paralist); @@ -43,6 +54,7 @@ public class FunNInterface extends Class{ TypeAssumptions ret = new TypeAssumptions(); ret.addAssumption(new MethodAssumption(this.getApplyFunction(), this)); ret.addClassAssumption(new ClassAssumption(this)); + for(GenericTypeVar gtv : this.gtvparalist)ret.addGenericVarAssumption(gtv); return ret; } diff --git a/src/de/dhbwstuttgart/typeinference/OderConstraint.java b/src/de/dhbwstuttgart/typeinference/OderConstraint.java index 92aa327ac..62eb2096e 100755 --- a/src/de/dhbwstuttgart/typeinference/OderConstraint.java +++ b/src/de/dhbwstuttgart/typeinference/OderConstraint.java @@ -2,7 +2,6 @@ package de.dhbwstuttgart.typeinference; import java.util.Vector; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; @@ -15,9 +14,9 @@ public class OderConstraint{ * @param p1 * @param p2 */ - public OderConstraint(Type p1, Type p2){ + public OderConstraint(ConstraintType p1, ConstraintType p2){ if(p1 == null || p2 == null)throw new NullPointerException(); - Pair constraintPair = new Pair(p1,p2); + ConstraintPair constraintPair = new ConstraintPair(p1,p2); oderConstraintPairs = new Vector(); this.addConstraint(constraintPair); } @@ -44,16 +43,16 @@ public class OderConstraint{ * @param p1 * @param p2 */ - public void addConstraint(Type p1, Type p2){ - addConstraint(new Pair(p1,p2)); + public void addConstraint(ConstraintType p1, ConstraintType p2){ + addConstraint(new ConstraintPair(p1,p2)); } /** * Falls die Type des toAdd-Pairs nicht vom Typ RefType bzw. TypePlaceholder sind, so werden sie in einen RefType umgewandelt. * @param toAdd */ - public void addConstraint(Pair toAdd){ - oderConstraintPairs.add(new SingleConstraint(toAdd.TA1, toAdd.TA2)); + public void addConstraint(ConstraintPair toAdd){ + oderConstraintPairs.add(new SingleConstraint(toAdd)); } @Override diff --git a/src/de/dhbwstuttgart/typeinference/Overloading.java b/src/de/dhbwstuttgart/typeinference/Overloading.java index b2d7dfae6..3db305e90 100755 --- a/src/de/dhbwstuttgart/typeinference/Overloading.java +++ b/src/de/dhbwstuttgart/typeinference/Overloading.java @@ -2,6 +2,7 @@ package de.dhbwstuttgart.typeinference; import java.util.Vector; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.MethodCall; import de.dhbwstuttgart.syntaxtree.type.RefType; @@ -65,12 +66,14 @@ public class Overloading{ if(!(this.type instanceof TypePlaceholder) && !this.type.equals(methodAssumption.getAssumedType()))break; UndConstraint methodConstraint = new UndConstraint(); //Ein Constraint für den ReturnType der Methode... - methodConstraint.addConstraint(methodAssumption.getAssumedType(), type); + methodConstraint.addConstraint(methodAssumption.getAssumedType().TYPE(assumptions, methodCall), type.TYPE(assumptions, methodCall)); //Ein Constraint für die Parameter der Methode... for(int i=0; i parameterAssumptions = new Vector(); @@ -83,7 +86,7 @@ public class Overloading{ //ret.add(new Constraint(methodCall.get_Receiver().get_Expr().getTypeVariable(), new RefType(assumption.getClassName(), null, 0))); if(methodCall.get_Receiver() != null && methodCall.get_Receiver().get_Expr() != null) //TODO: FunN-MethodAssumption darf keine Klasse (Class) als ParentClass besitzen. Denn der Typ der Klasse steht noch nicht fest (bisher ist es immer "FunN"). - methodConstraint.addConstraint(methodCall.get_Receiver().get_Expr().getType(), methodAssumption.getParentClassType()); + methodConstraint.addConstraint(methodCall.get_Receiver().get_Expr().getType().TYPE(assumptions, methodCall), methodAssumption.getParentClassType().TYPE(assumptions, methodCall)); //ret.add(new Constraint(methodCall.get_Receiver().get_Expr().getTypeVariable(), new RefType(assumption.getClassName(), parameterAssumptions, 0))); //return ret; //Bereits nach der ersten Assumption abbrechen... diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Pair.java b/src/de/dhbwstuttgart/typeinference/Pair.java similarity index 96% rename from src/de/dhbwstuttgart/syntaxtree/type/Pair.java rename to src/de/dhbwstuttgart/typeinference/Pair.java index 81f84404f..e76fdba21 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Pair.java +++ b/src/de/dhbwstuttgart/typeinference/Pair.java @@ -1,5 +1,5 @@ // ino.module.Pair.8673.package -package de.dhbwstuttgart.syntaxtree.type; +package de.dhbwstuttgart.typeinference; // ino.end // ino.module.Pair.8673.import import java.util.Hashtable; @@ -7,7 +7,14 @@ import java.util.Vector; // ino.end + import de.dhbwstuttgart.parser.JavaClassName; +import de.dhbwstuttgart.syntaxtree.type.FreshWildcardType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.WildcardType; diff --git a/src/de/dhbwstuttgart/typeinference/ResultSet.java b/src/de/dhbwstuttgart/typeinference/ResultSet.java index 0a124ca23..e86335f02 100755 --- a/src/de/dhbwstuttgart/typeinference/ResultSet.java +++ b/src/de/dhbwstuttgart/typeinference/ResultSet.java @@ -3,7 +3,6 @@ package de.dhbwstuttgart.typeinference; import java.util.Iterator; import java.util.Vector; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; diff --git a/src/de/dhbwstuttgart/typeinference/SingleConstraint.java b/src/de/dhbwstuttgart/typeinference/SingleConstraint.java index 59062d299..2ab2e624d 100755 --- a/src/de/dhbwstuttgart/typeinference/SingleConstraint.java +++ b/src/de/dhbwstuttgart/typeinference/SingleConstraint.java @@ -3,7 +3,6 @@ package de.dhbwstuttgart.typeinference; import java.util.Vector; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; @@ -25,12 +24,16 @@ public class SingleConstraint extends UndConstraint{ private Pair constraintPair; //entspricht θ condition θ' //private R condition; //entspricht der condition (R) - public SingleConstraint(Type p1, Type p2){ + public SingleConstraint(ConstraintType p1, ConstraintType p2){ //super(p1,p2); - Pair constraintPair = new Pair(p1,p2);//super.getConstraintPairs().firstElement(); + ConstraintPair constraintPair = new ConstraintPair(p1,p2);//super.getConstraintPairs().firstElement(); this.addConstraint(constraintPair); } + public SingleConstraint(ConstraintPair toAdd) { + this.addConstraint(toAdd); + } + public Pair getPair(){ return constraintPair; } @@ -42,11 +45,11 @@ public class SingleConstraint extends UndConstraint{ return ret; } - public void addConstraint(Pair toAdd){ + public void addConstraint(ConstraintPair toAdd){ if(constraintPair != null)throw new DebugException("Ein Constraint darf nur aus einem ConstraintPair bestehen. Das hinzufügen von "+ toAdd + " ist nicht möglich."); - Type p1 = toAdd.TA1; - Type p2 = toAdd.TA2; + Type p1 = toAdd.getPair().TA1; + Type p2 = toAdd.getPair().TA2; if(p1==null || p2 == null)throw new NullPointerException(); @@ -58,15 +61,15 @@ public class SingleConstraint extends UndConstraint{ //if((p2 instanceof GenericTypeVar))p2 = ((GenericTypeVar)p2).getTypePlaceHolder();//throw new DebugException("GenericTypeVar sind in den Constraints nicht erlaubt");// // BaseTypes werden in RefTypes umgewandelt. Constraints dürfen nur RefTypes oder TypePlaceholder enthalten, da sonst der Unify-Algorithmus nicht funktioniert. - if(!(p1 instanceof RefType) && !(p1 instanceof TypePlaceholder) && !(p1 instanceof GenericTypeVar))p1 = new RefType(p1); - if(!(p2 instanceof RefType) && !(p2 instanceof TypePlaceholder) && !(p2 instanceof GenericTypeVar))p2 = new RefType(p2); + //if(!(p1 instanceof RefType) && !(p1 instanceof TypePlaceholder) && !(p1 instanceof GenericTypeVar))p1 = new RefType(p1); + //if(!(p2 instanceof RefType) && !(p2 instanceof TypePlaceholder) && !(p2 instanceof GenericTypeVar))p2 = new RefType(p2); //if(!(TypePlaceholder.class.isInstance(p1)) || !(RefType.class.isInstance(p1)) || !(TypePlaceholder.class.isInstance(p2)) || !(RefType.class.isInstance(p2))) //{//Wenn die beiden übergebenen Typen weder RefTypes noch TypePlaceholder sind: // throw new TypinferenzException("Ein Constraint darf nur aus TypePlaceholdern und Reftypes bestehen"); //} - if(!(p1 instanceof RefType) && !(p1 instanceof TypePlaceholder))throw new DebugException("Fehler: "+p2+" kann nicht in TPH oder RefType umgewandelt werden"); - if(!(p2 instanceof RefType) && !(p2 instanceof TypePlaceholder))throw new DebugException("Fehler: "+p2+" kann nicht in TPH oder RefType umgewandelt werden"); + //if(!(p1 instanceof RefType) && !(p1 instanceof TypePlaceholder))throw new DebugException("Fehler: "+p2+" kann nicht in TPH oder RefType umgewandelt werden"); + //if(!(p2 instanceof RefType) && !(p2 instanceof TypePlaceholder))throw new DebugException("Fehler: "+p2+" kann nicht in TPH oder RefType umgewandelt werden"); constraintPair = new Pair(p1,p2); } diff --git a/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java b/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java index fe0e79ea3..45096fdce 100755 --- a/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java +++ b/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java @@ -8,7 +8,6 @@ import java.util.Iterator; import java.util.Vector; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; diff --git a/src/de/dhbwstuttgart/typeinference/UndConstraint.java b/src/de/dhbwstuttgart/typeinference/UndConstraint.java index 96a0f2173..b8f6b9ccb 100755 --- a/src/de/dhbwstuttgart/typeinference/UndConstraint.java +++ b/src/de/dhbwstuttgart/typeinference/UndConstraint.java @@ -2,7 +2,6 @@ package de.dhbwstuttgart.typeinference; import java.util.Vector; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; /** @@ -12,7 +11,7 @@ import de.dhbwstuttgart.syntaxtree.type.Type; */ public class UndConstraint extends OderConstraint { - public UndConstraint(Type p1, Type p2) { + public UndConstraint(ConstraintType p1, ConstraintType p2) { super(p1, p2); } diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index c2f4382ab..0a67ec5fc 100755 --- a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -6,10 +6,12 @@ import java.util.Vector; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.FunN; import de.dhbwstuttgart.typeinference.FunNInterface; import de.dhbwstuttgart.typeinference.FunNMethod; @@ -288,10 +290,10 @@ public class TypeAssumptions { * @param t * @return null, falls der Typ nicht vorhanden ist. */ - public Type getTypeFor(Type t, IItemWithOffset inNode){ + public ConstraintType getTypeFor(Type t, SyntaxTreeNode inNode){ if(t instanceof TypePlaceholder) - return t; //Handelt es sich um einen TypePlaceholder kann dieser nicht in den Assumptions vorkommen. + return new ConstraintType((TypePlaceholder)t); //Handelt es sich um einen TypePlaceholder kann dieser nicht in den Assumptions vorkommen. //Alle bekannten Klassen nach diesem Typ durchsuchen: JavaClassName typName = t.getName(); @@ -303,7 +305,7 @@ public class TypeAssumptions { RefType tr = (RefType)t; RefType ret = ass.getAssumedClass().getType(); //Dadurch erhält der RefType den vollen Namen (bsp. java.lang.Integer) ret.set_ParaList(tr.get_ParaList()); - return ret; + return new ConstraintType(ret); } } //Auch die generischen Variablen durchsuchen: @@ -312,12 +314,11 @@ public class TypeAssumptions { if(ass.getIdentifier().equals(t.getName())){ if(! ass.getAssumedType().getParentClass().getName().equals(this.thisClassName)){ //Ist die Generische Variable nicht aus dieser Klasse, so muss sie zu einem TPH umgewandelt werden: - + return new ConstraintType(ass.getAssumedType().getTypePlaceHolder()); } - return ass.getAssumedType(); + return new ConstraintType(ass.getAssumedType()); } } - //return null; throw new TypeinferenceException("Der Typ "+t.getName()+" ist nicht korrekt",inNode); } diff --git a/src/de/dhbwstuttgart/typeinference/exceptions/TypeinferenceException.java b/src/de/dhbwstuttgart/typeinference/exceptions/TypeinferenceException.java index 7a72266ca..69db2739b 100755 --- a/src/de/dhbwstuttgart/typeinference/exceptions/TypeinferenceException.java +++ b/src/de/dhbwstuttgart/typeinference/exceptions/TypeinferenceException.java @@ -1,6 +1,7 @@ package de.dhbwstuttgart.typeinference.exceptions; import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; /** * Eine RuntimeException, welche bei einem Fehler während des Typinferenzalgorithmus ausgelöst wird. @@ -17,7 +18,7 @@ public class TypeinferenceException extends RuntimeException { private int offset; private String message; - public TypeinferenceException(String message, IItemWithOffset problemSource) + public TypeinferenceException(String message, SyntaxTreeNode problemSource) { super(message); this.message=message; diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java b/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java index 36fef5048..15db16923 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java @@ -6,12 +6,12 @@ import java.util.Vector; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.GenericTypeInsertable; import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.exceptions.DebugException; diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java index ba32076d4..671a560d1 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java @@ -10,10 +10,10 @@ import org.apache.log4j.Logger; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; diff --git a/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java b/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java index f0cca4e8b..05cac78ec 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java +++ b/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java @@ -16,12 +16,13 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.Pair; // ino.class.CSubstitution.27003.description type=javadoc /** diff --git a/src/de/dhbwstuttgart/typeinference/unify/CSubstitutionSet.java b/src/de/dhbwstuttgart/typeinference/unify/CSubstitutionSet.java index 889d080bb..5a96aeac4 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/CSubstitutionSet.java +++ b/src/de/dhbwstuttgart/typeinference/unify/CSubstitutionSet.java @@ -7,8 +7,8 @@ import java.util.Iterator; import java.util.Vector; import de.dhbwstuttgart.myexception.CTypeReconstructionException; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.Pair; // ino.class.CSubstitutionSet.27471.description type=javadoc /** diff --git a/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java b/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java index 4adfb430f..b1e8fe696 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java +++ b/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java @@ -6,7 +6,7 @@ package de.dhbwstuttgart.typeinference.unify; import java.util.Vector; import de.dhbwstuttgart.syntaxtree.Class; -import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; // ino.class.FC_TTO.28013.description type=javadoc @@ -74,8 +74,8 @@ public class FC_TTO public void generateFullyNamedTypes(TypeAssumptions ass) { for(Pair p : this.FC){ - p.TA1 = ass.getTypeFor(p.TA1, null); - p.TA2 = ass.getTypeFor(p.TA2, null); + p.TA1 = ass.getTypeFor(p.TA1, null).getType(); + p.TA2 = ass.getTypeFor(p.TA2, null).getType(); } } } diff --git a/src/de/dhbwstuttgart/typeinference/unify/MUB.java b/src/de/dhbwstuttgart/typeinference/unify/MUB.java index 7fd2213f7..30539ea9e 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/MUB.java +++ b/src/de/dhbwstuttgart/typeinference/unify/MUB.java @@ -5,8 +5,8 @@ package de.dhbwstuttgart.typeinference.unify; // ino.module.MUB.8720.import import java.util.Vector; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.Pair; // ino.class.MUB.28031.declaration public class MUB diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index 6ac564135..36b0c158c 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -24,13 +24,13 @@ import de.dhbwstuttgart.syntaxtree.type.FreshSuperWildcardType; import de.dhbwstuttgart.syntaxtree.type.FreshWildcardType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.IMatchable; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.WildcardType; -import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; +import de.dhbwstuttgart.typeinference.Pair; +import de.dhbwstuttgart.typeinference.Pair.PairOperator; // ino.end diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java index adc2c858e..2863bf1c3 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java @@ -14,9 +14,9 @@ import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.unify.FC_TTO; public class TrMakeFCTest extends TestCase{ diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java index 850ac75d1..537464c61 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java @@ -19,12 +19,12 @@ import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; -import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; +import de.dhbwstuttgart.typeinference.Pair; +import de.dhbwstuttgart.typeinference.Pair.PairOperator; import de.dhbwstuttgart.typeinference.unify.FC_TTO; import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java index 93a78a82d..757655097 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java @@ -16,12 +16,12 @@ import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; -import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; +import de.dhbwstuttgart.typeinference.Pair; +import de.dhbwstuttgart.typeinference.Pair.PairOperator; import de.dhbwstuttgart.typeinference.unify.FC_TTO; import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/test/plugindevelopment/TRMEqualTest.java b/test/plugindevelopment/TRMEqualTest.java index 1c6699115..a9a2549a8 100644 --- a/test/plugindevelopment/TRMEqualTest.java +++ b/test/plugindevelopment/TRMEqualTest.java @@ -13,14 +13,14 @@ import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; -import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.Pair.PairOperator; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import junit.framework.TestCase; diff --git a/test/plugindevelopment/TypeInsertTester.java b/test/plugindevelopment/TypeInsertTester.java index 34c35bf62..aba7e5b85 100644 --- a/test/plugindevelopment/TypeInsertTester.java +++ b/test/plugindevelopment/TypeInsertTester.java @@ -24,7 +24,6 @@ import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import junit.framework.TestCase; -import mycompiler.mytest.LambdaTest; public class TypeInsertTester{ diff --git a/test/plugindevelopment/TypeInsertTests/OverloadingInMethod.jav b/test/plugindevelopment/TypeInsertTests/OverloadingInMethod.jav new file mode 100644 index 000000000..e66e1a7c7 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/OverloadingInMethod.jav @@ -0,0 +1,10 @@ +class OverloadingInMethod{ + + m () { + op; + op = (m) -> (f) -> f.apply(m); + return op; + } + +} + diff --git a/test/plugindevelopment/TypeInsertTests/OverloadingInMethod.java b/test/plugindevelopment/TypeInsertTests/OverloadingInMethod.java new file mode 100644 index 000000000..6a7a97f55 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/OverloadingInMethod.java @@ -0,0 +1,19 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class OverloadingInMethod { + + private static final String TEST_FILE = "OverloadingInMethod.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + + //mustContain.add("Fun0>> op"); + MultipleTypesInsertTester.test(this.TEST_FILE, mustContain); + } + +} diff --git a/tools/AntParserBuilderWindows.xml b/tools/AntParserBuilderWindows.xml index 6556cbb21..e867e27c4 100755 --- a/tools/AntParserBuilderWindows.xml +++ b/tools/AntParserBuilderWindows.xml @@ -1,7 +1,7 @@ - + diff --git a/tools/RunJay.sh b/tools/RunJay.sh index cb9db24ec..26ce50790 100755 --- a/tools/RunJay.sh +++ b/tools/RunJay.sh @@ -1 +1 @@ -./../tools/jay -v ./../src/mycompiler/myparser/JavaParser.jay < skeleton > ./../src/mycompiler/myparser/JavaParser.java \ No newline at end of file +./../tools/jay -v ./../src/de/dhbwstuttgart/parser/JavaParser.jay < skeleton > ./../src/de/dhbwstuttgart/parser/JavaParser.java From 583dfb23e354dbd97a6fcece388ffe65880ad127 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 9 Sep 2014 11:15:10 +0200 Subject: [PATCH 12/46] Probleme mit GenericTypeVar behoben --- src/de/dhbwstuttgart/syntaxtree/Class.java | 12 +++++++++++- src/de/dhbwstuttgart/syntaxtree/Field.java | 12 +++++++++--- .../syntaxtree/FieldDeclaration.java | 2 +- src/de/dhbwstuttgart/syntaxtree/Method.java | 1 + .../syntaxtree/SyntaxTreeNode.java | 3 ++- .../syntaxtree/statement/LocalVarDecl.java | 1 + .../syntaxtree/statement/MethodCall.java | 2 +- .../syntaxtree/type/GenericTypeVar.java | 18 +++++++++++++++++- .../typeinference/Overloading.java | 18 ++++-------------- .../assumptions/TypeAssumptions.java | 3 --- .../TypeInsertTests/LambdaTest24.jav | 10 ++++++++++ .../TypeInsertTests/LambdaTest24.java | 16 ++++++++++++++++ 12 files changed, 73 insertions(+), 25 deletions(-) create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest24.jav create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest24.java diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index d8a66302c..275666ddd 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -1129,6 +1129,15 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit this.addField(standardKonstruktor); } + if(this.genericClassParameters == null)this.setGenericParameter(new GenericDeclarationList(new Vector(), 0)); + for(Type t : this.get_ParaList()){ + if(t instanceof GenericTypeVar)this.genericClassParameters.add((GenericTypeVar)t); + else this.genericClassParameters.add(new GenericTypeVar(t.get_Name(),this,-1)); + } + for(GenericTypeVar gtv : this.getGenericParameter()){ + gtv.setParentClass(this);; + } + //TODO: Umwandlung zu RefTypes funktioniert noch nicht richtig. (siehe LambdaTest2) //Als RefType geparste Generische Variablen umwandeln: this.wandleRefTypeAttributes2GenericAttributes(); @@ -1144,6 +1153,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit Vector ret = new Vector(); for(Field f : this.getFields()){ ret.add(f); + ret.addAll(this.getGenericParameter()); } return ret; } @@ -1158,7 +1168,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } @Override - public Iterable getGenericParameter() { + public Vector getGenericParameter() { if(this.genericClassParameters == null)return new Vector(); return this.genericClassParameters; } diff --git a/src/de/dhbwstuttgart/syntaxtree/Field.java b/src/de/dhbwstuttgart/syntaxtree/Field.java index 51930b346..baefadddb 100644 --- a/src/de/dhbwstuttgart/syntaxtree/Field.java +++ b/src/de/dhbwstuttgart/syntaxtree/Field.java @@ -54,7 +54,7 @@ public abstract class Field extends SyntaxTreeNode implements TypeInsertable, Ty throws JVMCodeException; @Override - public Iterable getGenericParameter() { + public Vector getGenericParameter() { Vector ret = new Vector<>(); if(this.genericParameters == null)return ret; ret.addAll(this.genericParameters); @@ -153,10 +153,16 @@ public abstract class Field extends SyntaxTreeNode implements TypeInsertable, Ty return this.offset; } } - + + @Override + public Vector getChildren() { + Vector ret = new Vector<>(); + if(this.getType()!=null)ret.add(this.getType()); + return ret; + } + @Override public void setGenericParameter(GenericDeclarationList params) { this.genericParameters = params; } - } diff --git a/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java index 4f2e5a4d5..ebf61dd93 100644 --- a/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java +++ b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java @@ -106,7 +106,7 @@ public class FieldDeclaration extends Field{ @Override public Vector getChildren() { - Vector ret = new Vector(); + Vector ret = super.getChildren(); if(this.wert!=null)ret.add(this.wert); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/Method.java b/src/de/dhbwstuttgart/syntaxtree/Method.java index 777b8be4b..db84fb99e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Method.java +++ b/src/de/dhbwstuttgart/syntaxtree/Method.java @@ -683,6 +683,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable for(FormalParameter param : this.parameterlist){ ret.add(param); } + ret.addAll(this.getGenericParameter()); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java b/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java index 7e621eebe..addee2d73 100644 --- a/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java +++ b/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java @@ -30,7 +30,8 @@ public abstract class SyntaxTreeNode implements IItemWithOffset{ */ public void parserPostProcessing(SyntaxTreeNode parent) { this.parent = parent; - for(SyntaxTreeNode node : this.getChildren())node.parserPostProcessing(this); + for(SyntaxTreeNode node : this.getChildren()) + if(node!=null)node.parserPostProcessing(this); } public SyntaxTreeNode getParent() { diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java index 048cab24a..fe5a0244e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java @@ -423,6 +423,7 @@ public class LocalVarDecl extends Statement implements TypeInsertable @Override public Vector getChildren() { Vector ret = new Vector(); + if(this.getType()!=null)ret.add(this.getType()); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java index e635fdf42..ff1f891e2 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java @@ -175,7 +175,7 @@ public class MethodCall extends Expr * Mögliche Probleme: * Wenn die Methode ohne Angabe eines Receivers im Quelltext steht: * methodCall(param); -> (bedeutet:) this.methodCall(param); - * Der Parser macht hier aber komische Faxen (siehe JavaParser.jay Zeile 1858 ff) + * Parser möglicherweise anpassen (siehe JavaParser.jay Zeile 1858 ff) */ @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { diff --git a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java index eb77fa2e8..c153ebd31 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java @@ -15,6 +15,8 @@ import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; @@ -203,14 +205,28 @@ public class GenericTypeVar extends Type */ public ConstraintsSet TYPE(TypeAssumptions ass){ ConstraintsSet ret = new ConstraintsSet(); + ass.addGenericVarAssumption(this); return ret; } + @Override + public ConstraintType TYPE(TypeAssumptions ass, SyntaxTreeNode parent) { + ass.addGenericVarAssumption(this); //Eine GenericTypeVar kann nur an Stellen vorkommen, an denen sie auch gültig ist. Daher kann sie den Assumptions hinzugefügt werden. + return super.TYPE(ass, parent); + } + public int getEndOffset() { return this.getOffset() + this.name.toString().length(); } - + + public void setParentClass(Class parent){ + //TODO: Die Methode sollte mit neuem Parser raus und dafür nur noch im Konstruktor gesetzt werden. + this.parent = parent; + } + public Class getParentClass() { + if(this.parent == null) + throw new DebugException("GenericTypeVar ohne Elternelement"); return this.parent; } diff --git a/src/de/dhbwstuttgart/typeinference/Overloading.java b/src/de/dhbwstuttgart/typeinference/Overloading.java index 3db305e90..e3a48f24f 100755 --- a/src/de/dhbwstuttgart/typeinference/Overloading.java +++ b/src/de/dhbwstuttgart/typeinference/Overloading.java @@ -27,7 +27,7 @@ public class Overloading{ * methodCall : type * @param ass * @param method - * @param type - eine Type-Assumption/oder Type für den Rückgabetyp des MethodCall + * @param type - eine Typ-Assumption/oder Typ für den Rückgabetyp des MethodCall */ public Overloading(TypeAssumptions ass, MethodCall method, Type type){ assumptions = ass.clone(); @@ -62,6 +62,7 @@ public class Overloading{ } Vector methodAssumptions = assumptions.getMethodAssumptions(methodCall.getName(), parameterList); if(methodAssumptions.size()==0)throw new TypeinferenceException("Eine Methode "+methodCall.get_Name()+" ist in den Assumptions nicht vorhanden", methodCall); + //Alle möglichen Methoden durchgehen: for(MethodAssumption methodAssumption : methodAssumptions){ if(!(this.type instanceof TypePlaceholder) && !this.type.equals(methodAssumption.getAssumedType()))break; UndConstraint methodConstraint = new UndConstraint(); @@ -69,27 +70,16 @@ public class Overloading{ methodConstraint.addConstraint(methodAssumption.getAssumedType().TYPE(assumptions, methodCall), type.TYPE(assumptions, methodCall)); //Ein Constraint für die Parameter der Methode... for(int i=0; i parameterAssumptions = new Vector(); - parameterAssumptions.add(methodAssumption.getAssumedType()); - for(CParaTypeAssumption pAss : methodAssumption.getParaAssumptions() ){ - parameterAssumptions.add(pAss.getAssumedType()); - } - */ //Ein Constraint für den Receiver der Methode (falls vorhanden)... - //ret.add(new Constraint(methodCall.get_Receiver().get_Expr().getTypeVariable(), new RefType(assumption.getClassName(), null, 0))); - if(methodCall.get_Receiver() != null && methodCall.get_Receiver().get_Expr() != null) + if(methodCall.get_Receiver() != null && methodCall.get_Receiver().get_Expr() != null){ //TODO: FunN-MethodAssumption darf keine Klasse (Class) als ParentClass besitzen. Denn der Typ der Klasse steht noch nicht fest (bisher ist es immer "FunN"). methodConstraint.addConstraint(methodCall.get_Receiver().get_Expr().getType().TYPE(assumptions, methodCall), methodAssumption.getParentClassType().TYPE(assumptions, methodCall)); - //ret.add(new Constraint(methodCall.get_Receiver().get_Expr().getTypeVariable(), new RefType(assumption.getClassName(), parameterAssumptions, 0))); - - //return ret; //Bereits nach der ersten Assumption abbrechen... + } ret.addConstraint(methodConstraint); } return ret; diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index 0a67ec5fc..ae128ffd2 100755 --- a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -267,8 +267,6 @@ public class TypeAssumptions { return ret; } - - @Override public String toString(){ String ret = "this: "+this.thisClassName+"\n"; @@ -283,7 +281,6 @@ public class TypeAssumptions { return ret; } - /** * Kontrolliert den vom Parser gesetzten Typ. * Erweitert dessen Bezeichnung, wenn nötig. diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest24.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest24.jav new file mode 100644 index 000000000..ede3dbe6f --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest24.jav @@ -0,0 +1,10 @@ +class Overloading_in_Method { + + ff (x) { + op; + op = (m) -> (f) -> f.apply(m); + return op; + } + + +} \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest24.java b/test/plugindevelopment/TypeInsertTests/LambdaTest24.java new file mode 100644 index 000000000..59de42e50 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest24.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class LambdaTest24 { + private static final String TEST_FILE = "LambdaTest24.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + //mustContain.add("Matrix ret"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} From 330451271eac52ff56514285f2611f9ba85cd8c4 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 9 Sep 2014 14:32:53 +0200 Subject: [PATCH 13/46] =?UTF-8?q?Kleine=20=C3=84nderungen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/de/dhbwstuttgart/parser/JavaClassName.java | 2 +- .../dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java | 9 ++++++++- src/de/dhbwstuttgart/typeinference/unify/Unify.java | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/de/dhbwstuttgart/parser/JavaClassName.java b/src/de/dhbwstuttgart/parser/JavaClassName.java index 1f99511a1..dbb879435 100644 --- a/src/de/dhbwstuttgart/parser/JavaClassName.java +++ b/src/de/dhbwstuttgart/parser/JavaClassName.java @@ -54,7 +54,7 @@ public class JavaClassName { if (obj == null) return false; if(obj instanceof String) - return this.toString().equals(obj) || this.name != null && this.name.equals(obj); //Auch mit Strings als Klassennamen kompatibel TODO: sollte bald obsolet sein + return this.toString().equals(obj) || (this.name != null && this.name.equals(obj)); //Auch mit Strings als Klassennamen kompatibel TODO: sollte bald obsolet sein if (getClass() != obj.getClass()) return false; JavaClassName other = (JavaClassName) obj; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java index fe5a0244e..0f4ff5b1f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java @@ -6,8 +6,8 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; - import org.apache.log4j.Logger; + import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.core.MyCompiler; @@ -389,6 +389,13 @@ public class LocalVarDecl extends Statement implements TypeInsertable return ret; } + @Override + public String getDescription() { + if(this.getType() == null)return "no type " + declid.toString(); + if(this.getType() instanceof TypePlaceholder)return declid.toString(); + return this.getType().toString() + " " + declid.toString(); + } + @Override public void parserPostProcessing(SyntaxTreeNode parent) { super.parserPostProcessing(parent); diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index 36b0c158c..6bae8d6ab 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -1443,7 +1443,7 @@ throws MatchException } // end if P.OperatorSmaller() } // end if: RefType - + // Swap if( (P.TA1 instanceof RefType || P.TA1 instanceof GenericTypeVar || P.TA1 instanceof WildcardType) && P.TA2 instanceof TypePlaceholder && P.OperatorEqual()) //PL 06-05-16 GenericTypeVar eingefuegt @@ -1840,8 +1840,8 @@ throws MatchException //in ein Vector von Paaren um. Vector ret = new Vector(); - for(Enumeration e=ht.keys();e.hasMoreElements();) { - String k = (String)e.nextElement(); + for(Enumeration e=ht.keys();e.hasMoreElements();) { + String k = e.nextElement().toString(); // #JB# 11.04.2005 // ########################################################### ret.addElement(new Pair(TypePlaceholder.backdoorCreate(k), (Type)ht.get(k), PairOperator.Equal)); From 81d9d3ab64ceff2abc1e756daaefa9ef13c052ff Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 9 Sep 2014 15:30:32 +0200 Subject: [PATCH 14/46] Ant_build angepasst --- src/de/dhbwstuttgart/syntaxtree/SourceFile.java | 2 +- test/plugindevelopment/TypeInsertTests/LambdaTest18.jav | 4 +++- tools/RunJayDarwin.sh | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index 69ede18c2..69ce984a8 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -673,7 +673,7 @@ public class SourceFile } xConstraints.add(cons); } - //typinferenzLog.debug("Karthesisches Produkt der Constraints: "+xConstraints); + typinferenzLog.debug("Karthesisches Produkt der Constraints: "+xConstraints); finiteClosure.generateFullyNamedTypes(globalAssumptions); diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest18.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest18.jav index 161680c70..142aa2918 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest18.jav +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest18.jav @@ -2,5 +2,7 @@ class Test{ java.lang.Integer var; var2 = var; - +void methode(){ +var = 1; +} } \ No newline at end of file diff --git a/tools/RunJayDarwin.sh b/tools/RunJayDarwin.sh index e61744832..12bccc1da 100755 --- a/tools/RunJayDarwin.sh +++ b/tools/RunJayDarwin.sh @@ -1 +1 @@ -./../tools/jay.darwin -v ./../src/mycompiler/myparser/JavaParser.jay < skeleton > ./../src/mycompiler/myparser/JavaParser.java +./../tools/jay.darwin -v ./../src/de/dhbwstuttgart/parser/JavaParser.jay < skeleton > ./../src/de/dhbwstuttgart/parser/JavaParser.java From 45ea59e7adab14b81971a56866a82ffd043e9492 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 9 Sep 2014 17:47:57 +0200 Subject: [PATCH 15/46] Fehler in get_ParaList behoben --- .../dhbwstuttgart/syntaxtree/type/RefType.java | 16 ++++++++++++---- .../assumptions/TypeAssumptions.java | 2 +- .../dhbwstuttgart/typeinference/unify/Unify.java | 2 -- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java index aaef7adad..a25994b4f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -111,7 +111,7 @@ public class RefType extends Type implements IMatchable super(offset); // otth: Copy-Konstruktor this.setName(R.getTypeName()); - this.set_ParaList(R.get_ParaList()); + this.set_ParaList(R.getParaList()); } // ino.end @@ -332,14 +332,22 @@ public class RefType extends Type implements IMatchable } // ino.end + /** + * @return gibt bei leere Parameterliste null zurück. Ist entscheidend für unify-Algorithmus + */ // ino.method.get_ParaList.26664.definition public Vector get_ParaList() // ino.end // ino.method.get_ParaList.26664.body { - return this.parameter; + if(this.parameter == null || this.parameter.size()==0)return null; + return this.parameter; } // ino.end + + public Vector getParaList(){ + return this.parameter; + } // ino.method.add_Parameter.26667.definition public void add_Parameter(Type o) @@ -737,9 +745,9 @@ public class RefType extends Type implements IMatchable @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { JavaCodeResult ret = new JavaCodeResult(this.name.toString()); - if(this.get_ParaList()!=null && this.get_ParaList().size()>0){ + if(this.getParaList()!=null && this.getParaList().size()>0){ ret .attach( "<" ); - Iterator it = this.get_ParaList().iterator(); + Iterator it = this.getParaList().iterator(); while(it.hasNext()){ Type t = it.next(); ret .attach( t.printJavaCode(resultSet)); diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index ae128ffd2..befd80002 100755 --- a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -301,7 +301,7 @@ public class TypeAssumptions { if(match && t instanceof RefType){ RefType tr = (RefType)t; RefType ret = ass.getAssumedClass().getType(); //Dadurch erhält der RefType den vollen Namen (bsp. java.lang.Integer) - ret.set_ParaList(tr.get_ParaList()); + ret.set_ParaList(tr.getParaList()); return new ConstraintType(ret); } } diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index 6bae8d6ab..3317cbeac 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -7,9 +7,7 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; - import org.apache.log4j.Logger; - import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.MatchException; From ca8145e4a22dd07f8dd1c9f48e368ef36dcf57f8 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Wed, 10 Sep 2014 23:32:36 +0200 Subject: [PATCH 16/46] GenericTypeVar setParentClass entfernt --- bin/.gitignore | 13 +++++++------ src/de/dhbwstuttgart/syntaxtree/Class.java | 5 +++-- src/de/dhbwstuttgart/syntaxtree/Field.java | 1 + .../syntaxtree/FieldDeclaration.java | 1 - .../dhbwstuttgart/syntaxtree/SyntaxTreeNode.java | 2 +- .../syntaxtree/type/BoundedGenericTypeVar.java | 10 +++++++++- .../syntaxtree/type/GenericTypeVar.java | 15 +-------------- src/de/dhbwstuttgart/syntaxtree/type/Type.java | 6 +++--- 8 files changed, 25 insertions(+), 28 deletions(-) diff --git a/bin/.gitignore b/bin/.gitignore index 4ce50fc91..5b035d518 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,6 +1,7 @@ -/de -/plugindevelopment -/mycompiler -/mytypereconstruction -/syntaxTree -/userinterface +/bytecode/ +/de/ +/log4jTesting.xml +/mycompiler/ +/parser/ +/plugindevelopment/ +/syntaxTree/ diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index 275666ddd..2b2804418 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -1134,10 +1134,11 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit if(t instanceof GenericTypeVar)this.genericClassParameters.add((GenericTypeVar)t); else this.genericClassParameters.add(new GenericTypeVar(t.get_Name(),this,-1)); } + /* for(GenericTypeVar gtv : this.getGenericParameter()){ gtv.setParentClass(this);; } - + */ //TODO: Umwandlung zu RefTypes funktioniert noch nicht richtig. (siehe LambdaTest2) //Als RefType geparste Generische Variablen umwandeln: this.wandleRefTypeAttributes2GenericAttributes(); @@ -1153,8 +1154,8 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit Vector ret = new Vector(); for(Field f : this.getFields()){ ret.add(f); - ret.addAll(this.getGenericParameter()); } + ret.addAll(this.getGenericParameter()); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/Field.java b/src/de/dhbwstuttgart/syntaxtree/Field.java index baefadddb..51766f7a0 100644 --- a/src/de/dhbwstuttgart/syntaxtree/Field.java +++ b/src/de/dhbwstuttgart/syntaxtree/Field.java @@ -158,6 +158,7 @@ public abstract class Field extends SyntaxTreeNode implements TypeInsertable, Ty public Vector getChildren() { Vector ret = new Vector<>(); if(this.getType()!=null)ret.add(this.getType()); + ret.addAll(this.getGenericParameter()); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java index ebf61dd93..3fb4cf61a 100644 --- a/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java +++ b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java @@ -101,7 +101,6 @@ public class FieldDeclaration extends Field{ public void parserPostProcessing(SyntaxTreeNode parent){ super.parserPostProcessing(parent); if(this.getType() == null)this.setType(TypePlaceholder.fresh(this)); - } @Override diff --git a/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java b/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java index addee2d73..3eed701bb 100644 --- a/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java +++ b/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java @@ -103,7 +103,7 @@ public abstract class SyntaxTreeNode implements IItemWithOffset{ */ } - + } public boolean seesType(Type tA2) { diff --git a/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java index aad481a7a..d75715dfa 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java @@ -7,6 +7,7 @@ package de.dhbwstuttgart.syntaxtree.type; import java.util.Vector; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.SingleConstraint; @@ -55,7 +56,7 @@ public class BoundedGenericTypeVar extends GenericTypeVar */ // ino.method.BoundedGenericTypeVar.29409.definition - public BoundedGenericTypeVar(String s, Vector bounds, Class parentClass, int offset, int endOffset) + public BoundedGenericTypeVar(String s, Vector bounds, SyntaxTreeNode parentClass, int offset, int endOffset) // ino.end // ino.method.BoundedGenericTypeVar.29409.body { @@ -147,5 +148,12 @@ public class BoundedGenericTypeVar extends GenericTypeVar } // ino.end + @Override + public Vector getChildren() { + Vector ret = super.getChildren(); + ret.addAll(this.bounds); + return ret; + } + } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java index c153ebd31..7a7d00510 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java @@ -36,7 +36,6 @@ public class GenericTypeVar extends Type //Type genericTypeVar; //Vector extendVars = new Vector(); protected Pair genericConstraint; - private Class parent; /** * Eine Registry f�r alle Generic-Instanzen, die vor der Bytecode-Generierung durch * Ihre Superklasse ersetzt werden m�ssen. Siehe "Type Erasure" in Sun Spezifikation. @@ -63,7 +62,7 @@ public class GenericTypeVar extends Type */ // ino.method.GenericTypeVar.26509.definition - public GenericTypeVar(String s, Class parentClass, int offset) + public GenericTypeVar(String s, SyntaxTreeNode parentClass, int offset) // ino.end // ino.method.GenericTypeVar.26509.body { @@ -218,18 +217,6 @@ public class GenericTypeVar extends Type public int getEndOffset() { return this.getOffset() + this.name.toString().length(); } - - public void setParentClass(Class parent){ - //TODO: Die Methode sollte mit neuem Parser raus und dafür nur noch im Konstruktor gesetzt werden. - this.parent = parent; - } - - public Class getParentClass() { - if(this.parent == null) - throw new DebugException("GenericTypeVar ohne Elternelement"); - return this.parent; - } - } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Type.java b/src/de/dhbwstuttgart/syntaxtree/type/Type.java index b4ff52908..c2029e2b6 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Type.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Type.java @@ -36,17 +36,17 @@ public class Type extends SyntaxTreeNode implements IItemWithOffset // ino.end // ino.method.Type.26729.definition - public Type(String s, int offset) + public Type(String s, SyntaxTreeNode parent, int offset) // ino.end // ino.method.Type.26729.body { - this(offset); + this(parent, offset); this.name = new JavaClassName(s); } // ino.end // ino.method.Type.26732.definition - public Type(int offset) + public Type(SyntaxTreeNode parent,int offset) // ino.end // ino.method.Type.26732.body { From 6505c985e045f29a85bed63e8aa727cb87f4f0fb Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Sun, 14 Sep 2014 18:38:43 +0200 Subject: [PATCH 17/46] Konstruktor von Type muss mit Elternelement im Syntaxbaum aufgerufen werden --- .../dhbwstuttgart/core/AClassOrInterface.java | 6 ++- src/de/dhbwstuttgart/syntaxtree/Class.java | 28 +++++++++++--- .../dhbwstuttgart/syntaxtree/SourceFile.java | 38 ++++++++++--------- .../syntaxtree/operator/AddOp.java | 20 +++++----- .../syntaxtree/operator/LogOp.java | 4 +- .../syntaxtree/operator/MulOp.java | 8 ++-- .../syntaxtree/operator/RelOp.java | 16 ++++---- .../syntaxtree/statement/Assign.java | 3 +- .../syntaxtree/statement/Block.java | 5 +-- .../syntaxtree/statement/BoolLiteral.java | 4 +- .../syntaxtree/statement/CharLiteral.java | 2 +- .../syntaxtree/statement/DoubleLiteral.java | 4 +- .../syntaxtree/statement/FloatLiteral.java | 2 +- .../syntaxtree/statement/IfStmt.java | 5 +-- .../syntaxtree/statement/InstVar.java | 1 - .../syntaxtree/statement/InstanceOf.java | 2 +- .../syntaxtree/statement/IntLiteral.java | 4 +- .../statement/LambdaExpression.java | 1 - .../syntaxtree/statement/LocalOrFieldVar.java | 1 - .../syntaxtree/statement/LocalVarDecl.java | 3 +- .../syntaxtree/statement/LongLiteral.java | 2 +- .../syntaxtree/statement/MethodCall.java | 2 +- .../syntaxtree/statement/NewClass.java | 7 ++-- .../syntaxtree/statement/NotExpr.java | 2 +- .../syntaxtree/statement/Null.java | 2 +- .../syntaxtree/statement/Return.java | 1 - .../syntaxtree/statement/Statement.java | 2 +- .../syntaxtree/statement/StringLiteral.java | 4 +- .../syntaxtree/statement/UnaryExpr.java | 6 +-- .../syntaxtree/statement/WhileStmt.java | 2 +- .../syntaxtree/type/BaseType.java | 8 ++-- .../syntaxtree/type/BooleanType.java | 7 ++-- .../syntaxtree/type/CharacterType.java | 7 ++-- .../syntaxtree/type/DoubleType.java | 7 ++-- .../syntaxtree/type/ExtendsWildcardType.java | 5 ++- .../syntaxtree/type/FloatType.java | 7 ++-- .../type/FreshExtendsWildcardType.java | 12 +++--- .../type/FreshSuperWildcardType.java | 12 +++--- .../syntaxtree/type/FreshWildcardType.java | 13 ++++--- .../syntaxtree/type/GenericTypeVar.java | 3 +- .../syntaxtree/type/IntegerType.java | 7 ++-- .../syntaxtree/type/LongType.java | 7 ++-- .../syntaxtree/type/RefType.java | 22 +++++------ .../syntaxtree/type/ReturnType.java | 2 +- .../syntaxtree/type/SuperWildcardType.java | 5 ++- .../dhbwstuttgart/syntaxtree/type/Type.java | 3 +- .../syntaxtree/type/TypePlaceholder.java | 3 +- .../dhbwstuttgart/syntaxtree/type/Void.java | 6 +-- .../syntaxtree/type/WildcardType.java | 9 +++-- .../typeinference/FreshTypeVariable.java | 38 ------------------- src/de/dhbwstuttgart/typeinference/Pair.java | 4 +- 51 files changed, 180 insertions(+), 194 deletions(-) delete mode 100755 src/de/dhbwstuttgart/typeinference/FreshTypeVariable.java diff --git a/src/de/dhbwstuttgart/core/AClassOrInterface.java b/src/de/dhbwstuttgart/core/AClassOrInterface.java index 93323e790..16a6f16f3 100755 --- a/src/de/dhbwstuttgart/core/AClassOrInterface.java +++ b/src/de/dhbwstuttgart/core/AClassOrInterface.java @@ -14,8 +14,10 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.parser.JavaClassName; +import de.dhbwstuttgart.syntaxtree.Interface; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; @@ -35,8 +37,8 @@ public interface AClassOrInterface { public JavaClassName getName(); - public Vector getSuperInterfaces(); - public void setSuperInterfaces(Vector vector); + public Vector getSuperInterfaces(); + public void setSuperInterfaces(Vector vector); /* // ino.attribute.inferencelog.21189.decldescription type=javadoc diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index 2b2804418..60163eff9 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -51,7 +51,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit protected Modifiers modifiers; protected String name; - private Vector superif = new Vector(); + private Vector superif = new Vector(); public UsedId getPackageName() { @@ -88,11 +88,13 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } return ret; } - public Vector getSuperInterfaces() + + public Vector getSuperInterfaces() { return superif; } - public void setSuperInterfaces(Vector superif) + + public void setSuperInterfaces(Vector superif) { this.superif = superif; } @@ -142,6 +144,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit private Vector fielddecl = new Vector(); private GenericDeclarationList genericClassParameters; private int offset; + private Class superClass; // ino.method.Class.23041.definition @@ -154,9 +157,16 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit superclassid=null; } this.offset = offset; + if(!name.equals("Object"))//Alle Klassen außer Object erben von Object: + this.superClass = new Class("Object", -1); } // ino.end + public Class(String name, Class superClass, int offset){ + this(name,offset); + this.superClass = superClass; + } + // ino.method.Class.23044.definition public Class(String name, Modifiers mod, int offset) // ino.end @@ -179,7 +189,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit // ino.end // ino.method.Class.23047.definition public Class(String name, Modifiers mod, ClassBody cb, Vector ct, Vector usedIdsToCheck, - UsedId superclass, Vector superif, Vector paralist, int offset) + UsedId superclass, Vector superif, Vector paralist, int offset) // ino.end // ino.method.Class.23047.body { @@ -1072,7 +1082,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit parameter.add(((GenericTypeVar)param).getTypePlaceHolder());//(TypePlaceholder.fresh()); //Hier ist kein ReplacementListener notwendig. Der Typ soll nie eingesetzt werden. Der TPH wird nur gebraucht, damit das Unifizieren funktioniert. } */ - return new RefType(this.getName().toString(), this.get_ParaList(), 0); + return new RefType(this.getName().toString(), this.get_ParaList(),this, 0); } @@ -1208,6 +1218,12 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } } - + /** + * Die Super Klasse dieser Klasse. + * @return null für Klasse Object + */ + public Class getSuperClass(){ + return this.superClass; + } } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index 69ce984a8..241e3cd56 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -248,7 +248,7 @@ public class SourceFile */ // ino.end // ino.method.createPairFromClassAndSuperclass.21400.definition - private Pair createPairFromClassAndSuperclass(JavaClassName className, JavaClassName superclassName, Vector classParaOrg, Vector superclassParaOrg) + private Pair createPairFromClassAndSuperclass(Class baseClass, Class superclass, Vector classParaOrg, Vector superclassParaOrg) // ino.end // ino.method.createPairFromClassAndSuperclass.21400.body { @@ -259,10 +259,13 @@ public class SourceFile if(superclassParaOrg!=null && superclassParaOrg.size()==0){ superclassParaOrg=null; } + /* Pair P = new Pair( new RefType( className.toString(), classParaOrg,-1), new RefType( superclassName.toString(), superclassParaOrg,-1) ); + */ + Pair P = new Pair(baseClass.getType(), superclass.getType()); //PL 04-12-29 freshe Variablen ANFANG RefType r1 = (RefType)P.getTA1Copy(); RefType r2 = (RefType)P.getTA2Copy(); @@ -305,17 +308,16 @@ public class SourceFile { Class tempKlasse = KlassenVektor.elementAt(i); inferencelog.debug("Verarbeite "+tempKlasse.getName()); - + //TODO: SuperKlasse erstellen, dies sollte am besten beim Konstruktoraufruf von Class geschehen. Diese kann dann mit getSuperClass abgefragt werden. if( tempKlasse.superclassid != null ) { // Klasse hat Superklasse - Pair P=createPairFromClassAndSuperclass(tempKlasse.getName(),tempKlasse.get_Superclass_Name(),tempKlasse.get_ParaList(),tempKlasse.superclassid.get_ParaList()); + Pair P=createPairFromClassAndSuperclass(tempKlasse,tempKlasse.getSuperClass(),tempKlasse.get_ParaList(),tempKlasse.superclassid.get_ParaList()); vFC.add( P ); } if(tempKlasse.getSuperInterfaces()!=null){ - Iterator interfaceIterator=tempKlasse.getSuperInterfaces().iterator(); + Iterator interfaceIterator=tempKlasse.getSuperInterfaces().iterator(); while(interfaceIterator.hasNext()){ - UsedId intf=interfaceIterator.next(); - JavaClassName interfaceName=intf.getQualifiedName(); - Pair P=createPairFromClassAndSuperclass(tempKlasse.getName(),interfaceName,tempKlasse.get_ParaList(),intf.get_ParaList()); + Interface intf=interfaceIterator.next(); + Pair P=createPairFromClassAndSuperclass(tempKlasse,intf,tempKlasse.get_ParaList(),intf.get_ParaList()); vFC.add( P ); } @@ -324,11 +326,10 @@ public class SourceFile for(int i=0; i interfaceIterator=intf.getSuperInterfaces().iterator(); + Iterator interfaceIterator=intf.getSuperInterfaces().iterator(); while(interfaceIterator.hasNext()){ - UsedId superintf=interfaceIterator.next(); - JavaClassName superinterfaceName=superintf.getQualifiedName(); - Pair P=createPairFromClassAndSuperclass(intf.getName(),superinterfaceName,intf.getParaList(), superintf.get_ParaList()); + Interface superintf=interfaceIterator.next(); + Pair P=createPairFromClassAndSuperclass(intf,superintf,intf.getParaList(), superintf.get_ParaList()); vFC.add( P ); } @@ -1168,7 +1169,7 @@ public class SourceFile for(int j=0;j getOperatorTypes() { Hashtable types = new Hashtable(); - types.put(new RefType("java.lang.Integer",-1),new RefType("java.lang.Integer",-1)); - types.put(new RefType("java.lang.Double",-1),new RefType("java.lang.Double",-1)); - types.put(new RefType("java.lang.Float",-1), new RefType("java.lang.Float",-1)); - types.put(new RefType("java.lang.Long",-1), new RefType("java.lang.Long",-1)); - types.put(new RefType("java.lang.String",-1), new RefType("java.lang.String",-1)); + types.put(new RefType("java.lang.Integer",this,-1),new RefType("java.lang.Integer",this,-1)); + types.put(new RefType("java.lang.Double",this,-1),new RefType("java.lang.Double",this,-1)); + types.put(new RefType("java.lang.Float",this,-1), new RefType("java.lang.Float",this,-1)); + types.put(new RefType("java.lang.Long",this,-1), new RefType("java.lang.Long",this,-1)); + types.put(new RefType("java.lang.String",this,-1), new RefType("java.lang.String",this,-1)); return types; } @@ -62,11 +62,11 @@ public abstract class AddOp extends Operator @Override public HashMap getReturnTypes(TypeAssumptions ass) { HashMap ret = new HashMap(); - ret.put(ass.getTypeFor(new RefType("java.lang.Integer",-1), this), ass.getTypeFor(new RefType("java.lang.Integer",-1),this)); - ret.put(ass.getTypeFor(new RefType("java.lang.Double",-1), this), ass.getTypeFor(new RefType("java.lang.Double",-1),this)); - ret.put(ass.getTypeFor(new RefType("java.lang.Float",-1), this), ass.getTypeFor(new RefType("java.lang.Float",-1),this)); - ret.put(ass.getTypeFor(new RefType("java.lang.Long",-1), this), ass.getTypeFor(new RefType("java.lang.Long",-1),this)); - ret.put(ass.getTypeFor(new RefType("java.lang.String",-1),this), ass.getTypeFor(new RefType("java.lang.String",-1),this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Integer",this,-1), this), ass.getTypeFor(new RefType("java.lang.Integer",this,-1),this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Double",this,-1), this), ass.getTypeFor(new RefType("java.lang.Double",this,-1),this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Float",this,-1), this), ass.getTypeFor(new RefType("java.lang.Float",this,-1),this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Long",this,-1), this), ass.getTypeFor(new RefType("java.lang.Long",this,-1),this)); + ret.put(ass.getTypeFor(new RefType("java.lang.String",this,-1),this), ass.getTypeFor(new RefType("java.lang.String",this,-1),this)); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java index 511cc9b79..ce80cd9b1 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java @@ -224,7 +224,7 @@ public abstract class LogOp extends Operator protected Hashtable getOperatorTypes() { Hashtable types = new Hashtable(); - types.put(new RefType("java.lang.Boolean",-1), new RefType("java.lang.Boolean",-1)); + types.put(new RefType("java.lang.Boolean",this,-1), new RefType("java.lang.Boolean",this,-1)); return types; } @@ -232,7 +232,7 @@ public abstract class LogOp extends Operator @Override public HashMap getReturnTypes(TypeAssumptions ass) { HashMap ret = new HashMap<>(); - ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Boolean",-1), this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",this,-1), this), ass.getTypeFor(new RefType("java.lang.Boolean",this,-1), this)); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java index f28819ade..e3b37f082 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java @@ -43,10 +43,10 @@ public abstract class MulOp extends Operator @Override public HashMap getReturnTypes(TypeAssumptions ass) { HashMap ret = new HashMap<>(); - ret.put(ass.getTypeFor(new RefType("java.lang.Integer",-1), this), ass.getTypeFor(new RefType("java.lang.Integer",-1), this)); - ret.put(ass.getTypeFor(new RefType("java.lang.Double",-1), this), ass.getTypeFor(new RefType("java.lang.Double",-1), this)); - ret.put(ass.getTypeFor(new RefType("java.lang.Float",-1), this), ass.getTypeFor(new RefType("java.lang.Float",-1), this)); - ret.put(ass.getTypeFor(new RefType("java.lang.Long",-1), this), ass.getTypeFor(new RefType("java.lang.Long",-1), this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Integer",this,-1), this), ass.getTypeFor(new RefType("java.lang.Integer",this,-1), this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Double",this,-1), this), ass.getTypeFor(new RefType("java.lang.Double",this,-1), this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Float",this,-1), this), ass.getTypeFor(new RefType("java.lang.Float",this,-1), this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Long",this,-1), this), ass.getTypeFor(new RefType("java.lang.Long",this,-1), this)); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java index 0c75a3592..c07187745 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java @@ -43,10 +43,10 @@ public abstract class RelOp extends Operator protected Hashtable getOperatorTypes() { Hashtable types = new Hashtable(); - types.put(new RefType("java.lang.Integer",-1), new RefType("java.lang.Boolean",-1)); - types.put(new RefType("java.lang.Double",-1), new RefType("java.lang.Boolean",-1)); - types.put(new RefType("java.lang.Float",-1), new RefType("java.lang.Boolean",-1)); - types.put(new RefType("java.lang.Long",-1), new RefType("java.lang.Boolean",-1)); + types.put(new RefType("java.lang.Integer",this,-1), new RefType("java.lang.Boolean",this,-1)); + types.put(new RefType("java.lang.Double",this,-1), new RefType("java.lang.Boolean",this,-1)); + types.put(new RefType("java.lang.Float",this,-1), new RefType("java.lang.Boolean",this,-1)); + types.put(new RefType("java.lang.Long",this,-1), new RefType("java.lang.Boolean",this,-1)); return types; } @@ -54,10 +54,10 @@ public abstract class RelOp extends Operator @Override public HashMap getReturnTypes(TypeAssumptions ass) { HashMap ret = new HashMap<>(); - ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Integer",-1), this)); - ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Double",-1), this)); - ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Float",-1), this)); - ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Long",-1), this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",this,-1), this), ass.getTypeFor(new RefType("java.lang.Integer",this,-1), this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",this,-1), this), ass.getTypeFor(new RefType("java.lang.Double",this,-1), this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",this,-1), this), ass.getTypeFor(new RefType("java.lang.Float",this,-1), this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",this,-1), this), ass.getTypeFor(new RefType("java.lang.Long",this,-1), this)); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java index e10cded54..04bffdb17 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java @@ -24,7 +24,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Void; import de.dhbwstuttgart.typeinference.ConstraintsSet; -import de.dhbwstuttgart.typeinference.FreshTypeVariable; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; @@ -203,7 +202,7 @@ public class Assign extends Expr @Override public ConstraintsSet TYPEStmt(TypeAssumptions assumptions){ ConstraintsSet ret = this.TYPEExpr(assumptions); //TypeExpr aufrufen - this.setType(new Void(0)); //Typ des Statments auf Void setzen. + this.setType(new Void(this,0)); //Typ des Statments auf Void setzen. return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java index 5ae6bba8e..87a16aa66 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java @@ -23,7 +23,6 @@ import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Void; import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.ConstraintsSet; -import de.dhbwstuttgart.typeinference.FreshTypeVariable; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; @@ -169,7 +168,7 @@ public class Block extends Statement @Override public ConstraintsSet TYPEStmt(TypeAssumptions assumptions) { ConstraintsSet ret = new ConstraintsSet(); - if(statements.size()==0)this.setType(new Void(0)); + if(statements.size()==0)this.setType(new Void(this,0)); /* this.setTypeVariable(TypePlaceholder.fresh(this)); */ for(Statement stmt : statements){ typinferenceLog.debug("Prozessing statement: "+stmt); @@ -199,7 +198,7 @@ public class Block extends Statement } } }else{ - this.setType(new Void(0)); + this.setType(new Void(this,0)); } return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java index 39c4b6fa4..7516e1f22 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java @@ -47,7 +47,7 @@ public class BoolLiteral extends Literal super(-1,-1); // #JB# 20.04.2005 // ########################################################### - this.setType(new BooleanType()); + this.setType(new BooleanType(this)); //this.setType(new Type("boolean")); // ########################################################### } @@ -126,7 +126,7 @@ public class BoolLiteral extends Literal @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { - this.type = assumptions.getTypeFor(new RefType("java.lang.Boolean",-1), this).getType(); + this.type = assumptions.getTypeFor(new RefType("java.lang.Boolean",this,-1), this).getType(); return new ConstraintsSet(); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java index b8163af1f..a8b3e8f6d 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java @@ -46,7 +46,7 @@ public class CharLiteral extends Literal super(-1,-1); // #JB# 20.04.2005 // ########################################################### - this.setType(new CharacterType()); + this.setType(new CharacterType(this)); //this.setType(new Type("char")); // ########################################################### } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java index 97fc74067..aedce5931 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java @@ -52,7 +52,7 @@ public class DoubleLiteral extends Literal { super(-1,-1); - this.setType(new DoubleType()); + this.setType(new DoubleType(this)); } // ino.end @@ -164,7 +164,7 @@ public class DoubleLiteral extends Literal @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { - this.setType(assumptions.getTypeFor(new RefType("Double",this.getOffset()), this).getType()); + this.setType(assumptions.getTypeFor(new RefType("Double",this,this.getOffset()), this).getType()); return new ConstraintsSet(); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java index 80bd8526e..b1e1bb2b1 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java @@ -45,7 +45,7 @@ public class FloatLiteral extends Literal { super(-1,-1); - this.setType(new FloatType()); + this.setType(new FloatType(this)); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java index fe0a14362..e57cd48f5 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java @@ -28,7 +28,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Void; import de.dhbwstuttgart.typeinference.ConstraintsSet; -import de.dhbwstuttgart.typeinference.FreshTypeVariable; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; @@ -259,10 +258,10 @@ public class IfStmt extends Statement ret.add(this.else_block.TYPEStmt(assumptions)); if(!(else_block.getType() instanceof Void))ret.add(new SingleConstraint(else_block.getType().TYPE(assumptions, this),this.getType().TYPE(assumptions, this))); } - ret.add(new SingleConstraint(expr.getType().TYPE(assumptions, this),assumptions.getTypeFor(new RefType("Boolean",0), this))); //(expressionDesIfStmt)<.boolean + ret.add(new SingleConstraint(expr.getType().TYPE(assumptions, this),assumptions.getTypeFor(new RefType("Boolean",this,0), this))); //(expressionDesIfStmt)<.boolean if(!(then_block.getType() instanceof Void))ret.add(new SingleConstraint(then_block.getType().TYPE(assumptions, this),this.getType().TYPE(assumptions, this))); if(then_block.getType() instanceof Void && - (else_block == null || else_block.getType() instanceof Void))this.setType(new Void(this.getOffset())); + (else_block == null || else_block.getType() instanceof Void))this.setType(new Void(this,this.getOffset())); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java index c78108bac..28fa843b3 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java @@ -22,7 +22,6 @@ import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.ConstraintsSet; -import de.dhbwstuttgart.typeinference.FreshTypeVariable; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.OderConstraint; import de.dhbwstuttgart.typeinference.Pair; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java index 2178ba464..79276d895 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java @@ -56,7 +56,7 @@ public class InstanceOf extends BinaryExpr super(offset,variableLength); // #JB# 20.04.2005 // ########################################################### - this.setType(new BooleanType()); + this.setType(new BooleanType(this)); //this.setType(new Type("boolean")); // ########################################################### } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java index c06c6d679..212cc0eb7 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java @@ -48,7 +48,7 @@ public class IntLiteral extends Literal super(-1,-1); // #JB# 20.04.2005 // ########################################################### - this.setType(new IntegerType()); + this.setType(new IntegerType(this)); //this.setType(new Type("int")); // ########################################################### } @@ -161,7 +161,7 @@ public class IntLiteral extends Literal public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { ConstraintsSet ret = new ConstraintsSet(); //this.setType(new IntegerType()); - this.set_Type(assumptions.getTypeFor(new RefType("java.lang.Integer",-1), this).getType()); + this.set_Type(assumptions.getTypeFor(new RefType("java.lang.Integer",this,-1), this).getType()); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java index b65fad8ef..f20a6161c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java @@ -20,7 +20,6 @@ import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.ConstraintsSet; -import de.dhbwstuttgart.typeinference.FreshTypeVariable; import de.dhbwstuttgart.typeinference.FunN; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java index 4f03ddae7..1fb623b3c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java @@ -22,7 +22,6 @@ import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.ConstraintsSet; -import de.dhbwstuttgart.typeinference.FreshTypeVariable; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java index 0f4ff5b1f..3da735a15 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java @@ -24,7 +24,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Void; import de.dhbwstuttgart.typeinference.ConstraintsSet; -import de.dhbwstuttgart.typeinference.FreshTypeVariable; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; @@ -385,7 +384,7 @@ public class LocalVarDecl extends Statement implements TypeInsertable assumptions.addAssumption(new LocalVarAssumption(this, this.getType())); //Bevor der Typ auf Void gesetzt wird. ret.add(new SingleConstraint(this.getType().TYPE(assumptions, this), this.getType().TYPE(assumptions, this))); //assumptions.remove(null); // falls Variable mit diesem Namen bereits vorhanden. - this.setReturnType(new Void(0)); //Return typ einer Variablendeklaration ist Void + this.setReturnType(new Void(this,0)); //Return typ einer Variablendeklaration ist Void return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java index ed134118b..b4e0da4ec 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java @@ -51,7 +51,7 @@ public class LongLiteral extends Literal { super(-1,-1); - this.setType(new LongType()); + this.setType(new LongType(this)); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java index ff1f891e2..a2c418d04 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java @@ -209,7 +209,7 @@ public class MethodCall extends Expr @Override public ConstraintsSet TYPEStmt(TypeAssumptions assumptions){ ConstraintsSet ret = this.TYPEExpr(assumptions); //TypeExpr aufrufen - this.setType(new Void(0)); //Typ des Statments auf Void setzen, da als alleinstehendes Statement + this.setType(new Void(this,0)); //Typ des Statments auf Void setzen, da als alleinstehendes Statement return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java index 4269bc312..8270ab74c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java @@ -25,7 +25,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Void; import de.dhbwstuttgart.typeinference.ConstraintsSet; -import de.dhbwstuttgart.typeinference.FreshTypeVariable; import de.dhbwstuttgart.typeinference.FunN; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.Overloading; @@ -108,7 +107,7 @@ public class NewClass extends Expr parserlog.debug("Vergleiche "+usedid+" mit "+next); if(usedid.equals(next)) { - this.set_Type(new Type(next,getOffset())); + this.set_Type(new Type(next,this,getOffset())); break; } else next = null; @@ -225,7 +224,7 @@ public class NewClass extends Expr // ret.add(arg.TYPEExpr(assumptions)); //} - this.setType(assumptions.getTypeFor(new RefType(this.get_Name(),0), this).getType()); + this.setType(assumptions.getTypeFor(new RefType(this.get_Name(),this,0), this).getType()); /* @@ -249,7 +248,7 @@ public class NewClass extends Expr @Override public ConstraintsSet TYPEStmt(TypeAssumptions assumptions){ ConstraintsSet ret = this.TYPEExpr(assumptions); //TypeExpr aufrufen - this.setType(new Void(0)); //Typ des Statments auf Void setzen. + this.setType(new Void(this,0)); //Typ des Statments auf Void setzen. return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java index f08cae562..0b7a2a55d 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java @@ -145,7 +145,7 @@ public class NotExpr extends UnaryExpr public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { ConstraintsSet ret = new ConstraintsSet(); OderConstraint constraint = new OderConstraint(); - constraint.addConstraint(this.getType().TYPE(assumptions, this), assumptions.getTypeFor(new RefType("Boolean",-1),this)); + constraint.addConstraint(this.getType().TYPE(assumptions, this), assumptions.getTypeFor(new RefType("Boolean",this,-1),this)); ret.add(constraint); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java index 53e739172..66bc356c8 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java @@ -42,7 +42,7 @@ public class Null extends Literal // ino.method.Null.25926.body { super(-1,-1); - this.setType(new Type("__NULL__",getOffset())); + this.setType(new Type("__NULL__",this,getOffset())); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Return.java b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java index 9e606d6a7..407133fd8 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Return.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java @@ -19,7 +19,6 @@ import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.ConstraintsSet; -import de.dhbwstuttgart.typeinference.FreshTypeVariable; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java b/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java index c93de1a95..b4b9b8ae0 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java @@ -128,7 +128,7 @@ public abstract class Statement extends SyntaxTreeNode implements IItemWithOffse } public Type getReturnType(){ - return new de.dhbwstuttgart.syntaxtree.type.Void(-1); + return new de.dhbwstuttgart.syntaxtree.type.Void(this,-1); } } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java index 948755858..56fbe6acc 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java @@ -49,7 +49,7 @@ public class StringLiteral extends Literal super(-1,-1); // #JB# 20.04.2005 // ########################################################### - this.setType(new RefType("java.lang.String",getOffset())); + this.setType(new RefType("java.lang.String",this,getOffset())); //this.setType(new Type("String")); // ########################################################### } @@ -121,7 +121,7 @@ public class StringLiteral extends Literal @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { - this.set_Type(assumptions.getTypeFor(new RefType("String",0), this).getType()); + this.set_Type(assumptions.getTypeFor(new RefType("String",this,0), this).getType()); return new ConstraintsSet(); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.java index 9b73b842e..19a2ff5d1 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.java @@ -40,9 +40,9 @@ public abstract class UnaryExpr extends Expr private Vector getNumericTypes(){ Vector ret = new Vector<>(); - ret.add(new RefType("Integer",-1)); - ret.add(new RefType("Long",-1)); - ret.add(new RefType("Double",-1)); + ret.add(new RefType("Integer",this,-1)); + ret.add(new RefType("Long",this,-1)); + ret.add(new RefType("Double",this,-1)); return ret ; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java index 4a4bf8952..9cef41940 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java @@ -165,7 +165,7 @@ public class WhileStmt extends Statement public ConstraintsSet TYPEStmt(TypeAssumptions assumptions) { ConstraintsSet ret = new ConstraintsSet(); ret.add(expr.TYPEExpr(assumptions)); - SingleConstraint exprMustBeBool = new SingleConstraint(expr.getType().TYPE(assumptions, this), assumptions.getTypeFor(new RefType("Boolean", 0), this)); // while(expr){}; expr <. boolean + SingleConstraint exprMustBeBool = new SingleConstraint(expr.getType().TYPE(assumptions, this), assumptions.getTypeFor(new RefType("Boolean",this, 0), this)); // while(expr){}; expr <. boolean ret.add(exprMustBeBool); ret.add(this.loop_block.TYPEStmt(assumptions)); this.setType(loop_block.getType()); diff --git a/src/de/dhbwstuttgart/syntaxtree/type/BaseType.java b/src/de/dhbwstuttgart/syntaxtree/type/BaseType.java index 3730ca917..3c4899fc8 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/BaseType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/BaseType.java @@ -21,20 +21,20 @@ public abstract class BaseType extends Type private boolean IsArray = false; // ino.method.BaseType.26439.definition - public BaseType(int offset) + public BaseType(SyntaxTreeNode parent, int offset) // ino.end // ino.method.BaseType.26439.body { - super(offset); + super(parent, offset); } // ino.end // ino.method.BaseType.26442.definition - public BaseType(String name,int offset) + public BaseType(String name,SyntaxTreeNode parent,int offset) // ino.end // ino.method.BaseType.26442.body { - super(name, offset); + super(name,parent, offset); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/BooleanType.java b/src/de/dhbwstuttgart/syntaxtree/type/BooleanType.java index 2b8dce528..cd912907f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/BooleanType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/BooleanType.java @@ -1,6 +1,7 @@ // ino.module.BooleanType.8668.package package de.dhbwstuttgart.syntaxtree.type; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; @@ -11,11 +12,11 @@ public class BooleanType extends BaseType // ino.class.BooleanType.26451.body { // ino.method.BooleanType.26455.definition - public BooleanType() + public BooleanType(SyntaxTreeNode parent) // ino.end // ino.method.BooleanType.26455.body { - super("boolean",-1); + super("boolean",parent, -1); } // ino.end @@ -51,7 +52,7 @@ public class BooleanType extends BaseType // ino.end // ino.method.clone.26461.body { - return new BooleanType(); + return new BooleanType(this.getParent()); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/CharacterType.java b/src/de/dhbwstuttgart/syntaxtree/type/CharacterType.java index 0b7d61bee..7f36e0381 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/CharacterType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/CharacterType.java @@ -1,6 +1,7 @@ // ino.module.CharacterType.8670.package package de.dhbwstuttgart.syntaxtree.type; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; @@ -11,11 +12,11 @@ public class CharacterType extends BaseType // ino.class.CharacterType.26492.body { // ino.method.CharacterType.26496.definition - public CharacterType() + public CharacterType(SyntaxTreeNode parent) // ino.end // ino.method.CharacterType.26496.body { - super("char",-1); + super("char",parent,-1); } // ino.end @@ -51,7 +52,7 @@ public class CharacterType extends BaseType // ino.end // ino.method.clone.26502.body { - return new CharacterType(); + return new CharacterType(this.getParent()); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/DoubleType.java b/src/de/dhbwstuttgart/syntaxtree/type/DoubleType.java index 975afd927..83e2c803b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/DoubleType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/DoubleType.java @@ -1,6 +1,7 @@ // ino.module.IntegerType.8672.package package de.dhbwstuttgart.syntaxtree.type; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; @@ -11,11 +12,11 @@ public class DoubleType extends BaseType // ino.class.IntegerType.26527.body { // ino.method.IntegerType.26531.definition - public DoubleType() + public DoubleType(SyntaxTreeNode parent) // ino.end // ino.method.IntegerType.26531.body { - super("double",-1); + super("double",parent,-1); } // ino.end @@ -51,7 +52,7 @@ public class DoubleType extends BaseType // ino.end // ino.method.clone.26537.body { - return new DoubleType(); + return new DoubleType(this.getParent()); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java index b409a8d63..ed154e205 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java @@ -1,5 +1,6 @@ package de.dhbwstuttgart.syntaxtree.type; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; @@ -22,7 +23,7 @@ public class ExtendsWildcardType extends WildcardType implements ITypeContainer, */ public ExtendsWildcardType (int offset, Type extendsType) { - super(offset); + super(extendsType.getParent(), offset); this.extendsType = extendsType; } @@ -81,7 +82,7 @@ public class ExtendsWildcardType extends WildcardType implements ITypeContainer, */ public FreshExtendsWildcardType GetFreshWildcardType() { - return new FreshExtendsWildcardType(this.extendsType,-1); + return new FreshExtendsWildcardType(this.extendsType,this.getParent(),-1); } /** diff --git a/src/de/dhbwstuttgart/syntaxtree/type/FloatType.java b/src/de/dhbwstuttgart/syntaxtree/type/FloatType.java index fa5e7a9ca..32cfc5df0 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/FloatType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FloatType.java @@ -1,6 +1,7 @@ // ino.module.IntegerType.8672.package package de.dhbwstuttgart.syntaxtree.type; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; @@ -11,11 +12,11 @@ public class FloatType extends BaseType // ino.class.IntegerType.26527.body { // ino.method.IntegerType.26531.definition - public FloatType() + public FloatType(SyntaxTreeNode parent) // ino.end // ino.method.IntegerType.26531.body { - super("float",-1); + super("float", parent,-1); } // ino.end @@ -51,7 +52,7 @@ public class FloatType extends BaseType // ino.end // ino.method.clone.26537.body { - return new FloatType(); + return new FloatType(this.getParent()); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/FreshExtendsWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/FreshExtendsWildcardType.java index 2dec8d7b2..eda214ece 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/FreshExtendsWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FreshExtendsWildcardType.java @@ -1,5 +1,7 @@ package de.dhbwstuttgart.syntaxtree.type; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; + public class FreshExtendsWildcardType extends FreshWildcardType implements IMatchable { private Type extendsBoundType; @@ -8,9 +10,9 @@ public class FreshExtendsWildcardType extends FreshWildcardType implements IMatc * Author: Arne Lüdtke
* Standard Konstruktor für eine FreshExtendsWildcard */ - public FreshExtendsWildcardType(Type extendsBound ,int offset) + public FreshExtendsWildcardType(Type extendsBound,SyntaxTreeNode parent ,int offset) { - super(offset); + super(parent,offset); this.extendsBoundType = extendsBound; } @@ -18,9 +20,9 @@ public class FreshExtendsWildcardType extends FreshWildcardType implements IMatc * Author: Arne Lüdtke
* Privater Konstruktor für clone */ - private FreshExtendsWildcardType(Type extendsBound ,int offset, String name) + private FreshExtendsWildcardType(Type extendsBound ,SyntaxTreeNode parent,int offset, String name) { - super(offset,name); + super(parent,offset,name); this.extendsBoundType = extendsBound; } @@ -44,7 +46,7 @@ public class FreshExtendsWildcardType extends FreshWildcardType implements IMatc */ public FreshExtendsWildcardType clone() { - return new FreshExtendsWildcardType(this.extendsBoundType.clone(),getOffset(),this.name.toString()); + return new FreshExtendsWildcardType(this.extendsBoundType.clone(),this.getParent(),getOffset(),this.name.toString()); } /** diff --git a/src/de/dhbwstuttgart/syntaxtree/type/FreshSuperWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/FreshSuperWildcardType.java index f8086c299..411cd1a81 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/FreshSuperWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FreshSuperWildcardType.java @@ -1,5 +1,7 @@ package de.dhbwstuttgart.syntaxtree.type; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; + public class FreshSuperWildcardType extends FreshWildcardType implements IMatchable { private Type superBoundType; @@ -8,9 +10,9 @@ public class FreshSuperWildcardType extends FreshWildcardType implements IMatcha * Author: Arne Lüdtke
* Standard Konstruktor für eine FreshSuperWildcard */ - public FreshSuperWildcardType(Type superBound ,int offset) + public FreshSuperWildcardType(Type superBound ,SyntaxTreeNode parent, int offset) { - super(offset); + super(parent,offset); this.superBoundType = superBound; } @@ -18,9 +20,9 @@ public class FreshSuperWildcardType extends FreshWildcardType implements IMatcha * Author: Arne Lüdtke
* Privater Konstruktor für clone */ - private FreshSuperWildcardType(Type superBound,int offset, String name) + private FreshSuperWildcardType(Type superBound,SyntaxTreeNode parent,int offset, String name) { - super(offset,name); + super(parent,offset,name); this.superBoundType = superBound; } @@ -44,7 +46,7 @@ public class FreshSuperWildcardType extends FreshWildcardType implements IMatcha */ public FreshSuperWildcardType clone() { - return new FreshSuperWildcardType(this.superBoundType.clone(),getOffset(),this.name.toString()); + return new FreshSuperWildcardType(this.superBoundType.clone(),this.getParent(),getOffset(),this.name.toString()); } /** diff --git a/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java index d3bd6f3fa..364681db4 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java @@ -3,6 +3,7 @@ package de.dhbwstuttgart.syntaxtree.type; import java.util.Vector; import de.dhbwstuttgart.parser.JavaClassName; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -16,9 +17,9 @@ public class FreshWildcardType extends Type { * Author: Arne Lüdtke
* Standard Konstruktor für eine FreshWildcard */ - public FreshWildcardType(int offset) + public FreshWildcardType(SyntaxTreeNode parent, int offset) { - super(offset); + super(parent, offset); this.name = makeNewName(); } @@ -27,9 +28,9 @@ public class FreshWildcardType extends Type { * Protected Konstruktor für clone. * Protected, da vererbte Klassen ihn verwenden müssen. */ - protected FreshWildcardType(int offset, String name) + protected FreshWildcardType(SyntaxTreeNode parent, int offset, String name) { - super(offset); + super(parent, offset); this.name = new JavaClassName(name); } @@ -61,7 +62,7 @@ public class FreshWildcardType extends Type { */ public FreshWildcardType clone() { - return new FreshWildcardType(getOffset(),this.name.toString()); + return new FreshWildcardType(this.getParent(),getOffset(),this.name.toString()); } /** @@ -146,7 +147,7 @@ public class FreshWildcardType extends Type { */ public WildcardType get_WildcardType() { - return new WildcardType(this.getOffset()); + return new WildcardType(this.getParent(),this.getOffset()); } /** * Author: Arne Lüdtke
diff --git a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java index 7a7d00510..405f84b56 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java @@ -66,9 +66,8 @@ public class GenericTypeVar extends Type // ino.end // ino.method.GenericTypeVar.26509.body { - super(offset); + super(parentClass,offset); this.name = new JavaClassName(s); - this.parent = parentClass; } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/IntegerType.java b/src/de/dhbwstuttgart/syntaxtree/type/IntegerType.java index 1bd61acf4..e94dc34e0 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/IntegerType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/IntegerType.java @@ -1,6 +1,7 @@ // ino.module.IntegerType.8672.package package de.dhbwstuttgart.syntaxtree.type; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; @@ -11,11 +12,11 @@ public class IntegerType extends BaseType // ino.class.IntegerType.26527.body { // ino.method.IntegerType.26531.definition - public IntegerType() + public IntegerType(SyntaxTreeNode parent) // ino.end // ino.method.IntegerType.26531.body { - super("int",-1); + super("int",parent,-1); } // ino.end @@ -51,7 +52,7 @@ public class IntegerType extends BaseType // ino.end // ino.method.clone.26537.body { - return new IntegerType(); + return new IntegerType(this.getParent()); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/LongType.java b/src/de/dhbwstuttgart/syntaxtree/type/LongType.java index 53612cb3c..a465dcd89 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/LongType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/LongType.java @@ -1,6 +1,7 @@ // ino.module.IntegerType.8672.package package de.dhbwstuttgart.syntaxtree.type; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; @@ -11,11 +12,11 @@ public class LongType extends BaseType // ino.class.IntegerType.26527.body { // ino.method.IntegerType.26531.definition - public LongType() + public LongType(SyntaxTreeNode parent) // ino.end // ino.method.IntegerType.26531.body { - super("long",-1); + super("long", parent,-1); } // ino.end @@ -51,7 +52,7 @@ public class LongType extends BaseType // ino.end // ino.method.clone.26537.body { - return new LongType(); + return new LongType(this.getParent()); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java index a25994b4f..801eb60f7 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -66,20 +66,20 @@ public class RefType extends Type implements IMatchable // ino.method.RefType.26634.definition - public RefType(int offset) + public RefType(SyntaxTreeNode parent, int offset) // ino.end // ino.method.RefType.26634.body { - super(offset); + super(parent,offset); } // ino.end // ino.method.RefType.26637.definition - public RefType(String fullyQualifiedName, int offset) + public RefType(String fullyQualifiedName,SyntaxTreeNode parent, int offset) // ino.end // ino.method.RefType.26637.body { - super(offset); + super(parent,offset); this.setName(fullyQualifiedName); } // ino.end @@ -93,22 +93,22 @@ public class RefType extends Type implements IMatchable } // ino.method.RefType.26640.definition - public RefType(String fullyQualifiedName, Vector parameter, int offset) + public RefType(String fullyQualifiedName, Vector parameter,SyntaxTreeNode parent, int offset) // ino.end // ino.method.RefType.26640.body { - super(offset); + super(parent,offset); this.setName(fullyQualifiedName); if(parameter != null && parameter.size()>0)this.set_ParaList(parameter); } // ino.end // ino.method.RefType.26643.definition - public RefType( RefType R, int offset ) + public RefType( RefType R, SyntaxTreeNode parent,int offset ) // ino.end // ino.method.RefType.26643.body { - super(offset); + super(parent,offset); // otth: Copy-Konstruktor this.setName(R.getTypeName()); this.set_ParaList(R.getParaList()); @@ -120,8 +120,8 @@ public class RefType extends Type implements IMatchable * Dabei wird der Name und der Offset des baseType's übernommen. * @param baseType */ - public RefType( Type baseType ){ - super(baseType.getOffset()); + public RefType( Type baseType){ + super(baseType.getParent(),baseType.getOffset()); this.setName(baseType.name.toString()); //this.parameter = null; } @@ -596,7 +596,7 @@ public class RefType extends Type implements IMatchable { clonepara.addElement(((Type)para.elementAt(i)).clone()); } - RefType newRefType=new RefType(this.getTypeName(), clonepara,getOffset()); + RefType newRefType=new RefType(this.getTypeName(), clonepara,this.getParent(),getOffset()); newRefType.setPrimitiveFlag(this.getPrimitiveFlag()); return newRefType; } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/ReturnType.java b/src/de/dhbwstuttgart/syntaxtree/type/ReturnType.java index 0d93f65fa..9426f88fa 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/ReturnType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/ReturnType.java @@ -15,7 +15,7 @@ public class ReturnType extends Type // ino.end // ino.method.ReturnType.26707.body { - super(offset); + super(null,offset); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java index cae2538dd..289154cc3 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java @@ -1,5 +1,6 @@ package de.dhbwstuttgart.syntaxtree.type; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; @@ -21,7 +22,7 @@ public class SuperWildcardType extends WildcardType implements ITypeContainer, I */ public SuperWildcardType(int offset, Type superType) { - super(offset); + super(superType.getParent(),offset); this.superType = superType; } @@ -79,7 +80,7 @@ public class SuperWildcardType extends WildcardType implements ITypeContainer, I */ public FreshSuperWildcardType GetFreshWildcardType() { - return new FreshSuperWildcardType(this.superType,-1); + return new FreshSuperWildcardType(this.superType,this.getParent(),-1); } /** diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Type.java b/src/de/dhbwstuttgart/syntaxtree/type/Type.java index c2029e2b6..13f22fd79 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Type.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Type.java @@ -50,6 +50,7 @@ public class Type extends SyntaxTreeNode implements IItemWithOffset // ino.end // ino.method.Type.26732.body { + this.parent = parent; this.offset=offset; } // ino.end @@ -199,7 +200,7 @@ public class Type extends SyntaxTreeNode implements IItemWithOffset // ino.end // ino.method.clone.26768.body { - return new Type(this.getName().toString(),getOffset()); + return new Type(this.getName().toString(), this.getParent(),getOffset()); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java b/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java index 2e65d172b..b8b20c44b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java @@ -53,9 +53,8 @@ public class TypePlaceholder extends Type // ino.end // ino.method.TypePlaceholder.26794.body { - super(-1); + super(parent, -1); this.name = new JavaClassName(typeName); - this.parent = parent; } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Void.java b/src/de/dhbwstuttgart/syntaxtree/type/Void.java index 54d732771..2ef1cd1c3 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Void.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Void.java @@ -15,11 +15,11 @@ public class Void extends RefType // ino.class.Void.26857.body { // ino.method.Void.26861.definition - public Void(int offset) + public Void(SyntaxTreeNode parent,int offset) // ino.end // ino.method.Void.26861.body { - super(offset); + super(parent,offset); super.setName("void"); } // ino.end @@ -66,7 +66,7 @@ public class Void extends RefType // ino.end // ino.method.clone.26867.body { - return new Void(getOffset()); + return new Void(this.getParent(),getOffset()); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java index 6d653a33a..0a28db061 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java @@ -1,5 +1,6 @@ package de.dhbwstuttgart.syntaxtree.type; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -17,9 +18,9 @@ public class WildcardType extends Type{ * Author: Arne Lüdtke
* Standard Konstruktor für eine Wildcard */ - public WildcardType(int offset) + public WildcardType(SyntaxTreeNode parent, int offset) { - super(offset); + super(parent, offset); } /** @@ -37,7 +38,7 @@ public class WildcardType extends Type{ */ public WildcardType clone() { - return new WildcardType(getOffset()); + return new WildcardType(this.getParent(), getOffset()); } /** @@ -65,7 +66,7 @@ public class WildcardType extends Type{ */ public FreshWildcardType GetFreshWildcardType() { - return new FreshWildcardType(-1); + return new FreshWildcardType(this.getParent(),-1); } /** diff --git a/src/de/dhbwstuttgart/typeinference/FreshTypeVariable.java b/src/de/dhbwstuttgart/typeinference/FreshTypeVariable.java deleted file mode 100755 index 1d3394fcf..000000000 --- a/src/de/dhbwstuttgart/typeinference/FreshTypeVariable.java +++ /dev/null @@ -1,38 +0,0 @@ -package de.dhbwstuttgart.typeinference; - -import de.dhbwstuttgart.syntaxtree.type.Type; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; - -public class FreshTypeVariable extends Type{ - - private String hint = ""; - - public FreshTypeVariable(int offset) { - super(offset); - } - - /** - * Aufruf für Debug-Zwecke. - * @param hint - Eine Message die von der toString - Methode ausgegeben wird. - */ - public FreshTypeVariable(String hint){ - this(0); - this.hint = hint; - } - - public FreshTypeVariable(){ - this(0); - } - - @Override - public String toString(){ - if(hint.length()>0)return hint+" : a"; - return "FreshTypeVariable"; - } - - @Override - - public JavaCodeResult printJavaCode(ResultSet resultSet) { - throw new NotImplementedException(); - } -} diff --git a/src/de/dhbwstuttgart/typeinference/Pair.java b/src/de/dhbwstuttgart/typeinference/Pair.java index e76fdba21..b3126aa46 100755 --- a/src/de/dhbwstuttgart/typeinference/Pair.java +++ b/src/de/dhbwstuttgart/typeinference/Pair.java @@ -273,8 +273,8 @@ public class Pair hilfsvector3.addElement(p.TA1); hilfsvector4.addElement(p.TA2); //return (((RefType)TA1).is_Equiv((RefType)p.TA1, ht) && ((RefType)TA2).is_Equiv((RefType)p.TA2, ht)); - return (new RefType("dummy", hilfsvector3,-1)).is_Equiv(new RefType("dummy", hilfsvector1,-1), ht) && - (new RefType("dummy", hilfsvector4,-1)).is_Equiv(new RefType("dummy", hilfsvector2,-1), ht); + return (new RefType("dummy", hilfsvector3,null,-1)).is_Equiv(new RefType("dummy", hilfsvector1,null,-1), ht) && + (new RefType("dummy", hilfsvector4,null,-1)).is_Equiv(new RefType("dummy", hilfsvector2,null,-1), ht); } // ino.end From 88a6559401d7e23888323bfbc531972dcc734703 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Sun, 14 Sep 2014 18:39:24 +0200 Subject: [PATCH 18/46] =?UTF-8?q?Antlr=20anf=C3=BCgen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- antlr/.classpath | 7 + antlr/.gitignore | 107 + antlr/.idea/.name | 1 + antlr/.idea/antlr.iml | 11 + antlr/.idea/compiler.xml | 23 + antlr/.idea/copyright/profiles_settings.xml | 3 + antlr/.idea/encodings.xml | 5 + antlr/.idea/libraries/antlr_4_4_complete.xml | 9 + antlr/.idea/misc.xml | 5 + antlr/.idea/modules.xml | 9 + antlr/.idea/scopes/scope_settings.xml | 5 + antlr/.idea/vcs.xml | 7 + antlr/.idea/workspace.xml | 572 ++ antlr/.project | 17 + antlr/Java8.g4 | 1028 +++ antlr/Java8.tokens | 201 + antlr/Java8BaseListener.java | 1251 +++ antlr/Java8BaseVisitor.java | 721 ++ antlr/Java8Lexer.java | 515 ++ antlr/Java8Lexer.tokens | 201 + antlr/Java8Listener.java | 1020 +++ antlr/Java8Parser.java | 7392 +++++++++++++++++ antlr/Java8Visitor.java | 619 ++ antlr/makefile | 4 + antlr/src/.gitignore | 107 + antlr/src/Java8BaseListener.java | 1252 +++ antlr/src/Java8Lexer.java | 516 ++ antlr/src/Java8Listener.java | 1021 +++ antlr/src/Java8Parser.java | 7696 ++++++++++++++++++ antlr/src/Test.java | 37 + 30 files changed, 24362 insertions(+) create mode 100644 antlr/.classpath create mode 100644 antlr/.gitignore create mode 100644 antlr/.idea/.name create mode 100644 antlr/.idea/antlr.iml create mode 100644 antlr/.idea/compiler.xml create mode 100644 antlr/.idea/copyright/profiles_settings.xml create mode 100644 antlr/.idea/encodings.xml create mode 100644 antlr/.idea/libraries/antlr_4_4_complete.xml create mode 100644 antlr/.idea/misc.xml create mode 100644 antlr/.idea/modules.xml create mode 100644 antlr/.idea/scopes/scope_settings.xml create mode 100644 antlr/.idea/vcs.xml create mode 100644 antlr/.idea/workspace.xml create mode 100644 antlr/.project create mode 100644 antlr/Java8.g4 create mode 100644 antlr/Java8.tokens create mode 100644 antlr/Java8BaseListener.java create mode 100644 antlr/Java8BaseVisitor.java create mode 100644 antlr/Java8Lexer.java create mode 100644 antlr/Java8Lexer.tokens create mode 100644 antlr/Java8Listener.java create mode 100644 antlr/Java8Parser.java create mode 100644 antlr/Java8Visitor.java create mode 100644 antlr/makefile create mode 100644 antlr/src/.gitignore create mode 100644 antlr/src/Java8BaseListener.java create mode 100644 antlr/src/Java8Lexer.java create mode 100644 antlr/src/Java8Listener.java create mode 100644 antlr/src/Java8Parser.java create mode 100644 antlr/src/Test.java diff --git a/antlr/.classpath b/antlr/.classpath new file mode 100644 index 000000000..27af59ee5 --- /dev/null +++ b/antlr/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/antlr/.gitignore b/antlr/.gitignore new file mode 100644 index 000000000..2561ed578 --- /dev/null +++ b/antlr/.gitignore @@ -0,0 +1,107 @@ +/Java8Parser$AnnotationConstantRestContext.class +/Java8Parser$AnnotationContext.class +/Java8Parser$AnnotationMethodRestContext.class +/Java8Parser$CatchClauseContext.class +/Java8Parser$CatchTypeContext.class +/Java8Parser$ClassBodyContext.class +/Java8Parser$ClassCreatorRestContext.class +/Java8Parser$ClassDeclarationContext.class +/Java8Parser$CompilationUnitContext.class +/Java8Parser$ConstantDeclaratorContext.class +/Java8Parser$ConstantExpressionContext.class +/Java8Parser$ConstructorDeclarationContext.class +/Java8Parser$ElementValuePairsContext.class +/Java8Parser$EnumDeclarationContext.class +/Java8Parser$ExpressionContext.class +/Java8Parser$ExpressionListContext.class +/Java8Parser$FieldDeclarationContext.class +/Java8Parser$ForControlContext.class +/Java8Parser$ForUpdateContext.class +/Java8Parser$FormalParameterListContext.class +/Java8Parser$GenericConstructorDeclarationContext.class +/Java8Parser$InnerCreatorContext.class +/Java8Parser$InterfaceBodyContext.class +/Java8Parser$InterfaceMemberDeclarationContext.class +/Java8Parser$InterfaceMethodDeclarationContext.class +/Java8Parser$LastFormalParameterContext.class +/Java8Parser$LiteralContext.class +/Java8Parser$LocalVariableDeclarationStatementContext.class +/Java8Parser$MethodDeclarationContext.class +/Java8Parser$ModifierContext.class +/Java8Parser$NonWildcardTypeArgumentsContext.class +/Java8Parser$PrimitiveTypeContext.class +/Java8Parser$ResourceSpecificationContext.class +/Java8Parser$ResourcesContext.class +/Java8Parser$SwitchBlockStatementGroupContext.class +/Java8Parser$TypeArgumentsOrDiamondContext.class +/Java8Parser$TypeBoundContext.class +/Java8Parser$TypeDeclarationContext.class +/Java8Parser$TypeListContext.class +/Java8Parser$TypeParametersContext.class +/Java8Parser$VariableDeclaratorIdContext.class +/Java8Parser$VariableInitializerContext.class +/Java8Parser$VariableModifierContext.class +/SyntaxTreeBuilder.class +/Test.class +/Java8BaseListener.class +/Java8Lexer.class +/Java8Listener.class +/Java8Parser$AnnotationMethodOrConstantRestContext.class +/Java8Parser$AnnotationNameContext.class +/Java8Parser$AnnotationTypeBodyContext.class +/Java8Parser$AnnotationTypeDeclarationContext.class +/Java8Parser$AnnotationTypeElementDeclarationContext.class +/Java8Parser$AnnotationTypeElementRestContext.class +/Java8Parser$ArgumentsContext.class +/Java8Parser$ArrayCreatorRestContext.class +/Java8Parser$ArrayInitializerContext.class +/Java8Parser$BlockContext.class +/Java8Parser$BlockStatementContext.class +/Java8Parser$ClassBodyDeclarationContext.class +/Java8Parser$ClassOrInterfaceModifierContext.class +/Java8Parser$ClassOrInterfaceTypeContext.class +/Java8Parser$ConstDeclarationContext.class +/Java8Parser$ConstructorBodyContext.class +/Java8Parser$CreatedNameContext.class +/Java8Parser$CreatorContext.class +/Java8Parser$DefaultValueContext.class +/Java8Parser$ElementValueArrayInitializerContext.class +/Java8Parser$ElementValueContext.class +/Java8Parser$ElementValuePairContext.class +/Java8Parser$EnhancedForControlContext.class +/Java8Parser$EnumBodyDeclarationsContext.class +/Java8Parser$EnumConstantContext.class +/Java8Parser$EnumConstantNameContext.class +/Java8Parser$EnumConstantsContext.class +/Java8Parser$ExplicitGenericInvocationContext.class +/Java8Parser$ExplicitGenericInvocationSuffixContext.class +/Java8Parser$FinallyBlockContext.class +/Java8Parser$ForInitContext.class +/Java8Parser$FormalParameterContext.class +/Java8Parser$FormalParametersContext.class +/Java8Parser$GenericInterfaceMethodDeclarationContext.class +/Java8Parser$GenericMethodDeclarationContext.class +/Java8Parser$ImportDeclarationContext.class +/Java8Parser$InterfaceBodyDeclarationContext.class +/Java8Parser$InterfaceDeclarationContext.class +/Java8Parser$LocalVariableDeclarationContext.class +/Java8Parser$MemberDeclarationContext.class +/Java8Parser$MethodBodyContext.class +/Java8Parser$NonWildcardTypeArgumentsOrDiamondContext.class +/Java8Parser$PackageDeclarationContext.class +/Java8Parser$ParExpressionContext.class +/Java8Parser$PrimaryContext.class +/Java8Parser$QualifiedNameContext.class +/Java8Parser$QualifiedNameListContext.class +/Java8Parser$ResourceContext.class +/Java8Parser$StatementContext.class +/Java8Parser$StatementExpressionContext.class +/Java8Parser$SuperSuffixContext.class +/Java8Parser$SwitchLabelContext.class +/Java8Parser$TypeArgumentContext.class +/Java8Parser$TypeArgumentsContext.class +/Java8Parser$TypeContext.class +/Java8Parser$TypeParameterContext.class +/Java8Parser$VariableDeclaratorContext.class +/Java8Parser$VariableDeclaratorsContext.class +/Java8Parser.class diff --git a/antlr/.idea/.name b/antlr/.idea/.name new file mode 100644 index 000000000..b14313281 --- /dev/null +++ b/antlr/.idea/.name @@ -0,0 +1 @@ +antlr \ No newline at end of file diff --git a/antlr/.idea/antlr.iml b/antlr/.idea/antlr.iml new file mode 100644 index 000000000..b3a364e2e --- /dev/null +++ b/antlr/.idea/antlr.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/antlr/.idea/compiler.xml b/antlr/.idea/compiler.xml new file mode 100644 index 000000000..217af471a --- /dev/null +++ b/antlr/.idea/compiler.xml @@ -0,0 +1,23 @@ + + + + + + diff --git a/antlr/.idea/copyright/profiles_settings.xml b/antlr/.idea/copyright/profiles_settings.xml new file mode 100644 index 000000000..e7bedf337 --- /dev/null +++ b/antlr/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/antlr/.idea/encodings.xml b/antlr/.idea/encodings.xml new file mode 100644 index 000000000..e206d70d8 --- /dev/null +++ b/antlr/.idea/encodings.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/antlr/.idea/libraries/antlr_4_4_complete.xml b/antlr/.idea/libraries/antlr_4_4_complete.xml new file mode 100644 index 000000000..698589c2f --- /dev/null +++ b/antlr/.idea/libraries/antlr_4_4_complete.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/antlr/.idea/misc.xml b/antlr/.idea/misc.xml new file mode 100644 index 000000000..308776f16 --- /dev/null +++ b/antlr/.idea/misc.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/antlr/.idea/modules.xml b/antlr/.idea/modules.xml new file mode 100644 index 000000000..240806a45 --- /dev/null +++ b/antlr/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/antlr/.idea/scopes/scope_settings.xml b/antlr/.idea/scopes/scope_settings.xml new file mode 100644 index 000000000..922003b84 --- /dev/null +++ b/antlr/.idea/scopes/scope_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/antlr/.idea/vcs.xml b/antlr/.idea/vcs.xml new file mode 100644 index 000000000..275077f82 --- /dev/null +++ b/antlr/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/antlr/.idea/workspace.xml b/antlr/.idea/workspace.xml new file mode 100644 index 000000000..aa55e5810 --- /dev/null +++ b/antlr/.idea/workspace.xml @@ -0,0 +1,572 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + localhost + 5050 + + + + + + + + + + 1409770188585 + 1409770188585 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No facets are configured + + + + + + + + + + + + + + + 1.8 + + + + + + + + antlr + + + + + + + + 1.8 + + + + + + + + antlr-4.4-complete + + + + + + + + + diff --git a/antlr/.project b/antlr/.project new file mode 100644 index 000000000..44689db85 --- /dev/null +++ b/antlr/.project @@ -0,0 +1,17 @@ + + + AntlrTest + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/antlr/Java8.g4 b/antlr/Java8.g4 new file mode 100644 index 000000000..6810eb44b --- /dev/null +++ b/antlr/Java8.g4 @@ -0,0 +1,1028 @@ +/* + [The "BSD licence"] + Copyright (c) 2014 Terence Parr, Sam Harwell + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/** A Java 8 grammar for ANTLR v4 derived from ANTLR v3 Java grammar. + * Follows syntax from spec: + * http://docs.oracle.com/javase/specs/jls/se8/html/jls-19.html + * Uses ANTLR v4's left-recursive expression notation. + * + * You can test with + * + * $ antlr4 Java.g4 + * $ javac *.java + * $ grun Java compilationUnit *.java + * + * Or, +~/antlr/code/grammars-v4/java8 $ j Test . +/Users/parrt/antlr/code/grammars-v4/java8/./Java8BaseListener.java +/Users/parrt/antlr/code/grammars-v4/java8/./Java8Lexer.java +/Users/parrt/antlr/code/grammars-v4/java8/./Java8Listener.java +/Users/parrt/antlr/code/grammars-v4/java8/./Java8Parser.java +/Users/parrt/antlr/code/grammars-v4/java8/./Test.java +Total lexer+parser time 384ms. + */ +grammar Java8; + +// starting point for parsing a java file +compilationUnit + : packageDeclaration? importDeclaration* typeDeclaration* EOF + ; + +packageDeclaration + : annotation* 'package' qualifiedName ';' + ; + +importDeclaration + : 'import' 'static'? qualifiedName ('.' '*')? ';' + ; + +typeDeclaration + : classOrInterfaceModifier* classDeclaration + | classOrInterfaceModifier* enumDeclaration + | classOrInterfaceModifier* interfaceDeclaration + | classOrInterfaceModifier* annotationTypeDeclaration + | ';' + ; + +modifier + : classOrInterfaceModifier + | ( 'native' + | 'synchronized' + | 'transient' + | 'volatile' + ) + ; + +classOrInterfaceModifier + : annotation // class or interface + | ( 'public' // class or interface + | 'protected' // class or interface + | 'private' // class or interface + | 'static' // class or interface + | 'abstract' // class or interface + | 'final' // class only -- does not apply to interfaces + | 'strictfp' // class or interface + ) + ; + +variableModifier + : 'final' + | annotation + ; + +classDeclaration + : 'class' Identifier typeParameters? + ('extends' type)? + ('implements' typeList)? + classBody + ; + +typeParameters + : '<' typeParameter (',' typeParameter)* '>' + ; + +typeParameter + : Identifier ('extends' typeBound)? + ; + +typeBound + : type ('&' type)* + ; + +enumDeclaration + : ENUM Identifier ('implements' typeList)? + '{' enumConstants? ','? enumBodyDeclarations? '}' + ; + +enumConstants + : enumConstant (',' enumConstant)* + ; + +enumConstant + : annotation* Identifier arguments? classBody? + ; + +enumBodyDeclarations + : ';' classBodyDeclaration* + ; + +interfaceDeclaration + : 'interface' Identifier typeParameters? ('extends' typeList)? interfaceBody + ; + +typeList + : type (',' type)* + ; + +classBody + : '{' classBodyDeclaration* '}' + ; + +interfaceBody + : '{' interfaceBodyDeclaration* '}' + ; + +classBodyDeclaration + : ';' + | 'static'? block + | modifier* memberDeclaration + ; + +memberDeclaration + : methodDeclaration + | genericMethodDeclaration + | fieldDeclaration + | constructorDeclaration + | genericConstructorDeclaration + | interfaceDeclaration + | annotationTypeDeclaration + | classDeclaration + | enumDeclaration + ; + +/* We use rule this even for void methods which cannot have [] after parameters. + This simplifies grammar and we can consider void to be a type, which + renders the [] matching as a context-sensitive issue or a semantic check + for invalid return type after parsing. + */ +methodDeclaration + : (type|'void') Identifier formalParameters ('[' ']')* + ('throws' qualifiedNameList)? + ( methodBody + | ';' + ) + ; + +genericMethodDeclaration + : typeParameters methodDeclaration + ; + +constructorDeclaration + : Identifier formalParameters ('throws' qualifiedNameList)? + constructorBody + ; + +genericConstructorDeclaration + : typeParameters constructorDeclaration + ; + +fieldDeclaration + : type variableDeclarators ';' + ; + +interfaceBodyDeclaration + : modifier* interfaceMemberDeclaration + | ';' + ; + +interfaceMemberDeclaration + : constDeclaration + | interfaceMethodDeclaration + | genericInterfaceMethodDeclaration + | interfaceDeclaration + | annotationTypeDeclaration + | classDeclaration + | enumDeclaration + ; + +constDeclaration + : type constantDeclarator (',' constantDeclarator)* ';' + ; + +constantDeclarator + : Identifier ('[' ']')* '=' variableInitializer + ; + +// see matching of [] comment in methodDeclaratorRest +interfaceMethodDeclaration + : (type|'void') Identifier formalParameters ('[' ']')* + ('throws' qualifiedNameList)? + ';' + ; + +genericInterfaceMethodDeclaration + : typeParameters interfaceMethodDeclaration + ; + +variableDeclarators + : variableDeclarator (',' variableDeclarator)* + ; + +variableDeclarator + : variableDeclaratorId ('=' variableInitializer)? + ; + +variableDeclaratorId + : Identifier ('[' ']')* + ; + +variableInitializer + : arrayInitializer + | expression + ; + +arrayInitializer + : '{' (variableInitializer (',' variableInitializer)* (',')? )? '}' + ; + +enumConstantName + : Identifier + ; + +type + : classOrInterfaceType ('[' ']')* + | primitiveType ('[' ']')* + ; + +classOrInterfaceType + : Identifier typeArguments? ('.' Identifier typeArguments? )* + ; + +primitiveType + : 'boolean' + | 'char' + | 'byte' + | 'short' + | 'int' + | 'long' + | 'float' + | 'double' + ; + +typeArguments + : '<' typeArgument (',' typeArgument)* '>' + ; + +typeArgument + : type + | '?' (('extends' | 'super') type)? + ; + +qualifiedNameList + : qualifiedName (',' qualifiedName)* + ; + +formalParameters + : '(' formalParameterList? ')' + ; + +formalParameterList + : formalParameter (',' formalParameter)* (',' lastFormalParameter)? + | lastFormalParameter + ; + +formalParameter + : variableModifier* type variableDeclaratorId + ; + +lastFormalParameter + : variableModifier* type '...' variableDeclaratorId + ; + +methodBody + : block + ; + +constructorBody + : block + ; + +qualifiedName + : Identifier ('.' Identifier)* + ; + +literal + : IntegerLiteral + | FloatingPointLiteral + | CharacterLiteral + | StringLiteral + | BooleanLiteral + | 'null' + ; + +// ANNOTATIONS + +annotation + : '@' annotationName ( '(' ( elementValuePairs | elementValue )? ')' )? + ; + +annotationName : qualifiedName ; + +elementValuePairs + : elementValuePair (',' elementValuePair)* + ; + +elementValuePair + : Identifier '=' elementValue + ; + +elementValue + : expression + | annotation + | elementValueArrayInitializer + ; + +elementValueArrayInitializer + : '{' (elementValue (',' elementValue)*)? (',')? '}' + ; + +annotationTypeDeclaration + : '@' 'interface' Identifier annotationTypeBody + ; + +annotationTypeBody + : '{' (annotationTypeElementDeclaration)* '}' + ; + +annotationTypeElementDeclaration + : modifier* annotationTypeElementRest + | ';' // this is not allowed by the grammar, but apparently allowed by the actual compiler + ; + +annotationTypeElementRest + : type annotationMethodOrConstantRest ';' + | classDeclaration ';'? + | interfaceDeclaration ';'? + | enumDeclaration ';'? + | annotationTypeDeclaration ';'? + ; + +annotationMethodOrConstantRest + : annotationMethodRest + | annotationConstantRest + ; + +annotationMethodRest + : Identifier '(' ')' defaultValue? + ; + +annotationConstantRest + : variableDeclarators + ; + +defaultValue + : 'default' elementValue + ; + +// STATEMENTS / BLOCKS + +block + : '{' blockStatement* '}' + ; + +blockStatement + : localVariableDeclarationStatement + | statement + | typeDeclaration + ; + +localVariableDeclarationStatement + : localVariableDeclaration ';' + ; + +localVariableDeclaration + : variableModifier* type variableDeclarators + ; + +statement + : block + | ASSERT expression (':' expression)? ';' + | 'if' parExpression statement ('else' statement)? + | 'for' '(' forControl ')' statement + | 'while' parExpression statement + | 'do' statement 'while' parExpression ';' + | 'try' block (catchClause+ finallyBlock? | finallyBlock) + | 'try' resourceSpecification block catchClause* finallyBlock? + | 'switch' parExpression '{' switchBlockStatementGroup* switchLabel* '}' + | 'synchronized' parExpression block + | 'return' expression? ';' + | 'throw' expression ';' + | 'break' Identifier? ';' + | 'continue' Identifier? ';' + | ';' + | statementExpression ';' + | Identifier ':' statement + ; + +catchClause + : 'catch' '(' variableModifier* catchType Identifier ')' block + ; + +catchType + : qualifiedName ('|' qualifiedName)* + ; + +finallyBlock + : 'finally' block + ; + +resourceSpecification + : '(' resources ';'? ')' + ; + +resources + : resource (';' resource)* + ; + +resource + : variableModifier* classOrInterfaceType variableDeclaratorId '=' expression + ; + +/** Matches cases then statements, both of which are mandatory. + * To handle empty cases at the end, we add switchLabel* to statement. + */ +switchBlockStatementGroup + : switchLabel+ blockStatement+ + ; + +switchLabel + : 'case' constantExpression ':' + | 'case' enumConstantName ':' + | 'default' ':' + ; + +forControl + : enhancedForControl + | forInit? ';' expression? ';' forUpdate? + ; + +forInit + : localVariableDeclaration + | expressionList + ; + +enhancedForControl + : variableModifier* type Identifier ':' expression + ; + +forUpdate + : expressionList + ; + +// EXPRESSIONS + +parExpression + : '(' expression ')' + ; + +expressionList + : expression (',' expression)* + ; + +statementExpression + : expression + ; + +constantExpression + : expression + ; + +expression + : primary + | expression '.' Identifier + | expression '.' 'this' + | expression '.' 'new' nonWildcardTypeArguments? innerCreator + | expression '.' 'super' superSuffix + | expression '.' explicitGenericInvocation + | expression '[' expression ']' + | expression '(' expressionList? ')' + | 'new' creator + | '(' type ')' expression + | expression ('++' | '--') + | ('+'|'-'|'++'|'--') expression + | ('~'|'!') expression + | expression ('*'|'/'|'%') expression + | expression ('+'|'-') expression + | expression ('<' '<' | '>' '>' '>' | '>' '>') expression + | expression ('<=' | '>=' | '>' | '<') expression + | expression 'instanceof' type + | expression ('==' | '!=') expression + | expression '&' expression + | expression '^' expression + | expression '|' expression + | expression '&&' expression + | expression '||' expression + | expression '?' expression ':' expression + | expression + ( '=' + | '+=' + | '-=' + | '*=' + | '/=' + | '&=' + | '|=' + | '^=' + | '>>=' + | '>>>=' + | '<<=' + | '%=' + ) + expression + ; + +primary + : '(' expression ')' + | 'this' + | 'super' + | literal + | Identifier + | type '.' 'class' + | 'void' '.' 'class' + | nonWildcardTypeArguments (explicitGenericInvocationSuffix | 'this' arguments) + ; + +creator + : nonWildcardTypeArguments createdName classCreatorRest + | createdName (arrayCreatorRest | classCreatorRest) + ; + +createdName + : Identifier typeArgumentsOrDiamond? ('.' Identifier typeArgumentsOrDiamond?)* + | primitiveType + ; + +innerCreator + : Identifier nonWildcardTypeArgumentsOrDiamond? classCreatorRest + ; + +arrayCreatorRest + : '[' + ( ']' ('[' ']')* arrayInitializer + | expression ']' ('[' expression ']')* ('[' ']')* + ) + ; + +classCreatorRest + : arguments classBody? + ; + +explicitGenericInvocation + : nonWildcardTypeArguments explicitGenericInvocationSuffix + ; + +nonWildcardTypeArguments + : '<' typeList '>' + ; + +typeArgumentsOrDiamond + : '<' '>' + | typeArguments + ; + +nonWildcardTypeArgumentsOrDiamond + : '<' '>' + | nonWildcardTypeArguments + ; + +superSuffix + : arguments + | '.' Identifier arguments? + ; + +explicitGenericInvocationSuffix + : 'super' superSuffix + | Identifier arguments + ; + +arguments + : '(' expressionList? ')' + ; + +// LEXER + +// §3.9 Keywords + +ABSTRACT : 'abstract'; +ASSERT : 'assert'; +BOOLEAN : 'boolean'; +BREAK : 'break'; +BYTE : 'byte'; +CASE : 'case'; +CATCH : 'catch'; +CHAR : 'char'; +CLASS : 'class'; +CONST : 'const'; +CONTINUE : 'continue'; +DEFAULT : 'default'; +DO : 'do'; +DOUBLE : 'double'; +ELSE : 'else'; +ENUM : 'enum'; +EXTENDS : 'extends'; +FINAL : 'final'; +FINALLY : 'finally'; +FLOAT : 'float'; +FOR : 'for'; +IF : 'if'; +GOTO : 'goto'; +IMPLEMENTS : 'implements'; +IMPORT : 'import'; +INSTANCEOF : 'instanceof'; +INT : 'int'; +INTERFACE : 'interface'; +LONG : 'long'; +NATIVE : 'native'; +NEW : 'new'; +PACKAGE : 'package'; +PRIVATE : 'private'; +PROTECTED : 'protected'; +PUBLIC : 'public'; +RETURN : 'return'; +SHORT : 'short'; +STATIC : 'static'; +STRICTFP : 'strictfp'; +SUPER : 'super'; +SWITCH : 'switch'; +SYNCHRONIZED : 'synchronized'; +THIS : 'this'; +THROW : 'throw'; +THROWS : 'throws'; +TRANSIENT : 'transient'; +TRY : 'try'; +VOID : 'void'; +VOLATILE : 'volatile'; +WHILE : 'while'; + +// §3.10.1 Integer Literals + +IntegerLiteral + : DecimalIntegerLiteral + | HexIntegerLiteral + | OctalIntegerLiteral + | BinaryIntegerLiteral + ; + +fragment +DecimalIntegerLiteral + : DecimalNumeral IntegerTypeSuffix? + ; + +fragment +HexIntegerLiteral + : HexNumeral IntegerTypeSuffix? + ; + +fragment +OctalIntegerLiteral + : OctalNumeral IntegerTypeSuffix? + ; + +fragment +BinaryIntegerLiteral + : BinaryNumeral IntegerTypeSuffix? + ; + +fragment +IntegerTypeSuffix + : [lL] + ; + +fragment +DecimalNumeral + : '0' + | NonZeroDigit (Digits? | Underscores Digits) + ; + +fragment +Digits + : Digit (DigitOrUnderscore* Digit)? + ; + +fragment +Digit + : '0' + | NonZeroDigit + ; + +fragment +NonZeroDigit + : [1-9] + ; + +fragment +DigitOrUnderscore + : Digit + | '_' + ; + +fragment +Underscores + : '_'+ + ; + +fragment +HexNumeral + : '0' [xX] HexDigits + ; + +fragment +HexDigits + : HexDigit (HexDigitOrUnderscore* HexDigit)? + ; + +fragment +HexDigit + : [0-9a-fA-F] + ; + +fragment +HexDigitOrUnderscore + : HexDigit + | '_' + ; + +fragment +OctalNumeral + : '0' Underscores? OctalDigits + ; + +fragment +OctalDigits + : OctalDigit (OctalDigitOrUnderscore* OctalDigit)? + ; + +fragment +OctalDigit + : [0-7] + ; + +fragment +OctalDigitOrUnderscore + : OctalDigit + | '_' + ; + +fragment +BinaryNumeral + : '0' [bB] BinaryDigits + ; + +fragment +BinaryDigits + : BinaryDigit (BinaryDigitOrUnderscore* BinaryDigit)? + ; + +fragment +BinaryDigit + : [01] + ; + +fragment +BinaryDigitOrUnderscore + : BinaryDigit + | '_' + ; + +// §3.10.2 Floating-Point Literals + +FloatingPointLiteral + : DecimalFloatingPointLiteral + | HexadecimalFloatingPointLiteral + ; + +fragment +DecimalFloatingPointLiteral + : Digits '.' Digits? ExponentPart? FloatTypeSuffix? + | '.' Digits ExponentPart? FloatTypeSuffix? + | Digits ExponentPart FloatTypeSuffix? + | Digits FloatTypeSuffix + ; + +fragment +ExponentPart + : ExponentIndicator SignedInteger + ; + +fragment +ExponentIndicator + : [eE] + ; + +fragment +SignedInteger + : Sign? Digits + ; + +fragment +Sign + : [+-] + ; + +fragment +FloatTypeSuffix + : [fFdD] + ; + +fragment +HexadecimalFloatingPointLiteral + : HexSignificand BinaryExponent FloatTypeSuffix? + ; + +fragment +HexSignificand + : HexNumeral '.'? + | '0' [xX] HexDigits? '.' HexDigits + ; + +fragment +BinaryExponent + : BinaryExponentIndicator SignedInteger + ; + +fragment +BinaryExponentIndicator + : [pP] + ; + +// §3.10.3 Boolean Literals + +BooleanLiteral + : 'true' + | 'false' + ; + +// §3.10.4 Character Literals + +CharacterLiteral + : '\'' SingleCharacter '\'' + | '\'' EscapeSequence '\'' + ; + +fragment +SingleCharacter + : ~['\\] + ; + +// §3.10.5 String Literals + +StringLiteral + : '"' StringCharacters? '"' + ; + +fragment +StringCharacters + : StringCharacter+ + ; + +fragment +StringCharacter + : ~["\\] + | EscapeSequence + ; + +// §3.10.6 Escape Sequences for Character and String Literals + +fragment +EscapeSequence + : '\\' [btnfr"'\\] + | OctalEscape + | UnicodeEscape + ; + +fragment +OctalEscape + : '\\' OctalDigit + | '\\' OctalDigit OctalDigit + | '\\' ZeroToThree OctalDigit OctalDigit + ; + +fragment +UnicodeEscape + : '\\' 'u' HexDigit HexDigit HexDigit HexDigit + ; + +fragment +ZeroToThree + : [0-3] + ; + +// §3.10.7 The Null Literal + +NullLiteral + : 'null' + ; + +// §3.11 Separators + +LPAREN : '('; +RPAREN : ')'; +LBRACE : '{'; +RBRACE : '}'; +LBRACK : '['; +RBRACK : ']'; +SEMI : ';'; +COMMA : ','; +DOT : '.'; + +// §3.12 Operators + +ASSIGN : '='; +GT : '>'; +LT : '<'; +BANG : '!'; +TILDE : '~'; +QUESTION : '?'; +COLON : ':'; +EQUAL : '=='; +LE : '<='; +GE : '>='; +NOTEQUAL : '!='; +AND : '&&'; +OR : '||'; +INC : '++'; +DEC : '--'; +ADD : '+'; +SUB : '-'; +MUL : '*'; +DIV : '/'; +BITAND : '&'; +BITOR : '|'; +CARET : '^'; +MOD : '%'; + +ADD_ASSIGN : '+='; +SUB_ASSIGN : '-='; +MUL_ASSIGN : '*='; +DIV_ASSIGN : '/='; +AND_ASSIGN : '&='; +OR_ASSIGN : '|='; +XOR_ASSIGN : '^='; +MOD_ASSIGN : '%='; +LSHIFT_ASSIGN : '<<='; +RSHIFT_ASSIGN : '>>='; +URSHIFT_ASSIGN : '>>>='; + +// §3.8 Identifiers (must appear after all keywords in the grammar) + +Identifier + : JavaLetter JavaLetterOrDigit* + ; + +fragment +JavaLetter + : [a-zA-Z$_] // these are the "java letters" below 0xFF + | // covers all characters above 0xFF which are not a surrogate + ~[\u0000-\u00FF\uD800-\uDBFF] + {Character.isJavaIdentifierStart(_input.LA(-1))}? + | // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF + [\uD800-\uDBFF] [\uDC00-\uDFFF] + {Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}? + ; + +fragment +JavaLetterOrDigit + : [a-zA-Z0-9$_] // these are the "java letters or digits" below 0xFF + | // covers all characters above 0xFF which are not a surrogate + ~[\u0000-\u00FF\uD800-\uDBFF] + {Character.isJavaIdentifierPart(_input.LA(-1))}? + | // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF + [\uD800-\uDBFF] [\uDC00-\uDFFF] + {Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}? + ; + +// +// Additional symbols not defined in the lexical specification +// + +AT : '@'; +ELLIPSIS : '...'; + +// +// Whitespace and comments +// + +WS : [ \t\r\n\u000C]+ -> skip + ; + +COMMENT + : '/*' .*? '*/' -> skip + ; + +LINE_COMMENT + : '//' ~[\r\n]* -> skip + ; diff --git a/antlr/Java8.tokens b/antlr/Java8.tokens new file mode 100644 index 000000000..3f62bddf3 --- /dev/null +++ b/antlr/Java8.tokens @@ -0,0 +1,201 @@ +THROW=44 +STATIC=38 +INTERFACE=28 +AND_ASSIGN=93 +BREAK=4 +BYTE=5 +ELSE=15 +IF=22 +ENUM=16 +SUB=82 +BANG=69 +LPAREN=57 +DOT=65 +CASE=6 +AT=101 +LINE_COMMENT=105 +StringLiteral=55 +ELLIPSIS=102 +LBRACK=61 +PUBLIC=35 +THROWS=45 +NullLiteral=56 +RSHIFT_ASSIGN=98 +LBRACE=59 +GOTO=23 +SUB_ASSIGN=90 +SEMI=63 +CHAR=8 +ASSIGN=66 +COMMENT=104 +IMPORT=25 +BITOR=86 +CATCH=7 +MUL_ASSIGN=91 +DOUBLE=14 +PROTECTED=34 +LONG=29 +COMMA=64 +BITAND=85 +PRIVATE=33 +CONTINUE=11 +DIV=84 +FloatingPointLiteral=52 +LE=74 +CharacterLiteral=54 +VOLATILE=49 +EXTENDS=17 +INSTANCEOF=26 +NEW=31 +ADD=81 +LT=68 +CLASS=9 +DO=13 +FINALLY=19 +Identifier=100 +CONST=10 +PACKAGE=32 +OR_ASSIGN=94 +TRY=47 +IntegerLiteral=51 +SYNCHRONIZED=42 +MUL=83 +FOR=21 +FINAL=18 +RPAREN=58 +CARET=87 +URSHIFT_ASSIGN=99 +BOOLEAN=3 +NOTEQUAL=76 +RBRACK=62 +RBRACE=60 +AND=77 +THIS=43 +SWITCH=41 +VOID=48 +TRANSIENT=46 +INC=79 +FLOAT=20 +NATIVE=30 +DIV_ASSIGN=92 +BooleanLiteral=53 +ABSTRACT=1 +STRICTFP=39 +INT=27 +QUESTION=71 +RETURN=36 +LSHIFT_ASSIGN=97 +ADD_ASSIGN=89 +WS=103 +GE=75 +SUPER=40 +OR=78 +DEC=80 +MOD=88 +XOR_ASSIGN=95 +ASSERT=2 +EQUAL=73 +IMPLEMENTS=24 +COLON=72 +GT=67 +SHORT=37 +MOD_ASSIGN=96 +WHILE=50 +TILDE=70 +DEFAULT=12 +'import'=25 +'-'=82 +')'=58 +'super'=40 +'else'=15 +'%'=88 +'!'=69 +'>'=67 +'public'=35 +'=='=73 +'--'=80 +'|'=86 +'['=61 +':'=72 +'...'=102 +'throw'=44 +'case'=6 +'.'=65 +'this'=43 +'*'=83 +'switch'=41 +'synchronized'=42 +'&'=85 +'double'=14 +'break'=4 +'short'=37 +'<='=74 +'enum'=16 +'try'=47 +'?'=71 +'if'=22 +'extends'=17 +'goto'=23 +'}'=60 +'instanceof'=26 +';'=63 +'||'=78 +'>>='=98 +'class'=9 +'return'=36 +'&='=93 +'catch'=7 +'native'=30 +'continue'=11 +'strictfp'=39 +'/'=84 +'*='=91 +'+'=81 +'final'=18 +'protected'=34 +'static'=38 +'@'=101 +'transient'=46 +'~'=70 +'assert'=2 +']'=62 +'<'=68 +'++'=79 +'>>>='=99 +'>='=75 +'long'=29 +'boolean'=3 +'const'=10 +'abstract'=1 +'implements'=24 +'volatile'=49 +'throws'=45 +'/='=92 +','=64 +'-='=90 +'do'=13 +'package'=32 +'('=57 +'null'=56 +'int'=27 +'|='=94 +'for'=21 +'^'=87 +'<<='=97 +'='=66 +'byte'=5 +'&&'=77 +'^='=95 +'void'=48 +'while'=50 +'{'=59 +'float'=20 +'!='=76 +'new'=31 +'char'=8 +'finally'=19 +'interface'=28 +'%='=96 +'private'=33 +'+='=89 +'default'=12 diff --git a/antlr/Java8BaseListener.java b/antlr/Java8BaseListener.java new file mode 100644 index 000000000..ba69f6df5 --- /dev/null +++ b/antlr/Java8BaseListener.java @@ -0,0 +1,1251 @@ +// Generated from Java8.g4 by ANTLR 4.4 + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ErrorNode; +import org.antlr.v4.runtime.tree.TerminalNode; + +/** + * This class provides an empty implementation of {@link Java8Listener}, + * which can be extended to create a listener which only needs to handle a subset + * of the available methods. + */ +public class Java8BaseListener implements Java8Listener { + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterType(@NotNull Java8Parser.TypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitType(@NotNull Java8Parser.TypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBlock(@NotNull Java8Parser.BlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBlock(@NotNull Java8Parser.BlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterForUpdate(@NotNull Java8Parser.ForUpdateContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitForUpdate(@NotNull Java8Parser.ForUpdateContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExpressionList(@NotNull Java8Parser.ExpressionListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExpressionList(@NotNull Java8Parser.ExpressionListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeBound(@NotNull Java8Parser.TypeBoundContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeBound(@NotNull Java8Parser.TypeBoundContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPrimary(@NotNull Java8Parser.PrimaryContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPrimary(@NotNull Java8Parser.PrimaryContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLiteral(@NotNull Java8Parser.LiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLiteral(@NotNull Java8Parser.LiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCatchClause(@NotNull Java8Parser.CatchClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCatchClause(@NotNull Java8Parser.CatchClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeList(@NotNull Java8Parser.TypeListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeList(@NotNull Java8Parser.TypeListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassBody(@NotNull Java8Parser.ClassBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassBody(@NotNull Java8Parser.ClassBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCreatedName(@NotNull Java8Parser.CreatedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCreatedName(@NotNull Java8Parser.CreatedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterParExpression(@NotNull Java8Parser.ParExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitParExpression(@NotNull Java8Parser.ParExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotation(@NotNull Java8Parser.AnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotation(@NotNull Java8Parser.AnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCreator(@NotNull Java8Parser.CreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCreator(@NotNull Java8Parser.CreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExpression(@NotNull Java8Parser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExpression(@NotNull Java8Parser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterForControl(@NotNull Java8Parser.ForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitForControl(@NotNull Java8Parser.ForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCatchType(@NotNull Java8Parser.CatchTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCatchType(@NotNull Java8Parser.CatchTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterModifier(@NotNull Java8Parser.ModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitModifier(@NotNull Java8Parser.ModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterElementValue(@NotNull Java8Parser.ElementValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitElementValue(@NotNull Java8Parser.ElementValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterResource(@NotNull Java8Parser.ResourceContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitResource(@NotNull Java8Parser.ResourceContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMethodBody(@NotNull Java8Parser.MethodBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMethodBody(@NotNull Java8Parser.MethodBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStatement(@NotNull Java8Parser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStatement(@NotNull Java8Parser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterResources(@NotNull Java8Parser.ResourcesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitResources(@NotNull Java8Parser.ResourcesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterForInit(@NotNull Java8Parser.ForInitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitForInit(@NotNull Java8Parser.ForInitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArguments(@NotNull Java8Parser.ArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArguments(@NotNull Java8Parser.ArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx) { } + + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEveryRule(@NotNull ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEveryRule(@NotNull ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitTerminal(@NotNull TerminalNode node) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitErrorNode(@NotNull ErrorNode node) { } +} \ No newline at end of file diff --git a/antlr/Java8BaseVisitor.java b/antlr/Java8BaseVisitor.java new file mode 100644 index 000000000..b474ea368 --- /dev/null +++ b/antlr/Java8BaseVisitor.java @@ -0,0 +1,721 @@ +// Generated from Java8.g4 by ANTLR 4.4 +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; + +/** + * This class provides an empty implementation of {@link Java8Visitor}, + * which can be extended to create a visitor which only needs to handle a subset + * of the available methods. + * + * @param The return type of the visit operation. Use {@link Void} for + * operations with no return type. + */ +public class Java8BaseVisitor extends AbstractParseTreeVisitor implements Java8Visitor { + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitType(@NotNull Java8Parser.TypeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitBlock(@NotNull Java8Parser.BlockContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitForUpdate(@NotNull Java8Parser.ForUpdateContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExpressionList(@NotNull Java8Parser.ExpressionListContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitTypeBound(@NotNull Java8Parser.TypeBoundContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitPrimary(@NotNull Java8Parser.PrimaryContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLiteral(@NotNull Java8Parser.LiteralContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitCatchClause(@NotNull Java8Parser.CatchClauseContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitTypeList(@NotNull Java8Parser.TypeListContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitClassBody(@NotNull Java8Parser.ClassBodyContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitCreatedName(@NotNull Java8Parser.CreatedNameContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitParExpression(@NotNull Java8Parser.ParExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAnnotation(@NotNull Java8Parser.AnnotationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitCreator(@NotNull Java8Parser.CreatorContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExpression(@NotNull Java8Parser.ExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitForControl(@NotNull Java8Parser.ForControlContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitCatchType(@NotNull Java8Parser.CatchTypeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitModifier(@NotNull Java8Parser.ModifierContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitElementValue(@NotNull Java8Parser.ElementValueContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitResource(@NotNull Java8Parser.ResourceContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitMethodBody(@NotNull Java8Parser.MethodBodyContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitStatement(@NotNull Java8Parser.StatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitResources(@NotNull Java8Parser.ResourcesContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitForInit(@NotNull Java8Parser.ForInitContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitArguments(@NotNull Java8Parser.ArgumentsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx) { return visitChildren(ctx); } +} \ No newline at end of file diff --git a/antlr/Java8Lexer.java b/antlr/Java8Lexer.java new file mode 100644 index 000000000..91a2c30ed --- /dev/null +++ b/antlr/Java8Lexer.java @@ -0,0 +1,515 @@ +// Generated from Java8.g4 by ANTLR 4.4 +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class Java8Lexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.4", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + ABSTRACT=1, ASSERT=2, BOOLEAN=3, BREAK=4, BYTE=5, CASE=6, CATCH=7, CHAR=8, + CLASS=9, CONST=10, CONTINUE=11, DEFAULT=12, DO=13, DOUBLE=14, ELSE=15, + ENUM=16, EXTENDS=17, FINAL=18, FINALLY=19, FLOAT=20, FOR=21, IF=22, GOTO=23, + IMPLEMENTS=24, IMPORT=25, INSTANCEOF=26, INT=27, INTERFACE=28, LONG=29, + NATIVE=30, NEW=31, PACKAGE=32, PRIVATE=33, PROTECTED=34, PUBLIC=35, RETURN=36, + SHORT=37, STATIC=38, STRICTFP=39, SUPER=40, SWITCH=41, SYNCHRONIZED=42, + THIS=43, THROW=44, THROWS=45, TRANSIENT=46, TRY=47, VOID=48, VOLATILE=49, + WHILE=50, IntegerLiteral=51, FloatingPointLiteral=52, BooleanLiteral=53, + CharacterLiteral=54, StringLiteral=55, NullLiteral=56, LPAREN=57, RPAREN=58, + LBRACE=59, RBRACE=60, LBRACK=61, RBRACK=62, SEMI=63, COMMA=64, DOT=65, + ASSIGN=66, GT=67, LT=68, BANG=69, TILDE=70, QUESTION=71, COLON=72, EQUAL=73, + LE=74, GE=75, NOTEQUAL=76, AND=77, OR=78, INC=79, DEC=80, ADD=81, SUB=82, + MUL=83, DIV=84, BITAND=85, BITOR=86, CARET=87, MOD=88, ADD_ASSIGN=89, + SUB_ASSIGN=90, MUL_ASSIGN=91, DIV_ASSIGN=92, AND_ASSIGN=93, OR_ASSIGN=94, + XOR_ASSIGN=95, MOD_ASSIGN=96, LSHIFT_ASSIGN=97, RSHIFT_ASSIGN=98, URSHIFT_ASSIGN=99, + Identifier=100, AT=101, ELLIPSIS=102, WS=103, COMMENT=104, LINE_COMMENT=105; + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + public static final String[] tokenNames = { + "'\\u0000'", "'\\u0001'", "'\\u0002'", "'\\u0003'", "'\\u0004'", "'\\u0005'", + "'\\u0006'", "'\\u0007'", "'\b'", "'\t'", "'\n'", "'\\u000B'", "'\f'", + "'\r'", "'\\u000E'", "'\\u000F'", "'\\u0010'", "'\\u0011'", "'\\u0012'", + "'\\u0013'", "'\\u0014'", "'\\u0015'", "'\\u0016'", "'\\u0017'", "'\\u0018'", + "'\\u0019'", "'\\u001A'", "'\\u001B'", "'\\u001C'", "'\\u001D'", "'\\u001E'", + "'\\u001F'", "' '", "'!'", "'\"'", "'#'", "'$'", "'%'", "'&'", "'''", + "'('", "')'", "'*'", "'+'", "','", "'-'", "'.'", "'/'", "'0'", "'1'", + "'2'", "'3'", "'4'", "'5'", "'6'", "'7'", "'8'", "'9'", "':'", "';'", + "'<'", "'='", "'>'", "'?'", "'@'", "'A'", "'B'", "'C'", "'D'", "'E'", + "'F'", "'G'", "'H'", "'I'", "'J'", "'K'", "'L'", "'M'", "'N'", "'O'", + "'P'", "'Q'", "'R'", "'S'", "'T'", "'U'", "'V'", "'W'", "'X'", "'Y'", + "'Z'", "'['", "'\\'", "']'", "'^'", "'_'", "'`'", "'a'", "'b'", "'c'", + "'d'", "'e'", "'f'", "'g'", "'h'", "'i'" + }; + public static final String[] ruleNames = { + "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH", "CHAR", + "CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE", "ENUM", + "EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "IF", "GOTO", "IMPLEMENTS", + "IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG", "NATIVE", "NEW", "PACKAGE", + "PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "SHORT", "STATIC", "STRICTFP", + "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", "TRANSIENT", + "TRY", "VOID", "VOLATILE", "WHILE", "IntegerLiteral", "DecimalIntegerLiteral", + "HexIntegerLiteral", "OctalIntegerLiteral", "BinaryIntegerLiteral", "IntegerTypeSuffix", + "DecimalNumeral", "Digits", "Digit", "NonZeroDigit", "DigitOrUnderscore", + "Underscores", "HexNumeral", "HexDigits", "HexDigit", "HexDigitOrUnderscore", + "OctalNumeral", "OctalDigits", "OctalDigit", "OctalDigitOrUnderscore", + "BinaryNumeral", "BinaryDigits", "BinaryDigit", "BinaryDigitOrUnderscore", + "FloatingPointLiteral", "DecimalFloatingPointLiteral", "ExponentPart", + "ExponentIndicator", "SignedInteger", "Sign", "FloatTypeSuffix", "HexadecimalFloatingPointLiteral", + "HexSignificand", "BinaryExponent", "BinaryExponentIndicator", "BooleanLiteral", + "CharacterLiteral", "SingleCharacter", "StringLiteral", "StringCharacters", + "StringCharacter", "EscapeSequence", "OctalEscape", "UnicodeEscape", "ZeroToThree", + "NullLiteral", "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", + "SEMI", "COMMA", "DOT", "ASSIGN", "GT", "LT", "BANG", "TILDE", "QUESTION", + "COLON", "EQUAL", "LE", "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", "ADD", + "SUB", "MUL", "DIV", "BITAND", "BITOR", "CARET", "MOD", "ADD_ASSIGN", + "SUB_ASSIGN", "MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", + "MOD_ASSIGN", "LSHIFT_ASSIGN", "RSHIFT_ASSIGN", "URSHIFT_ASSIGN", "Identifier", + "JavaLetter", "JavaLetterOrDigit", "AT", "ELLIPSIS", "WS", "COMMENT", + "LINE_COMMENT" + }; + + + public Java8Lexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "Java8.g4"; } + + @Override + public String[] getTokenNames() { return tokenNames; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + @Override + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 140: return JavaLetter_sempred((RuleContext)_localctx, predIndex); + case 141: return JavaLetterOrDigit_sempred((RuleContext)_localctx, predIndex); + } + return true; + } + private boolean JavaLetterOrDigit_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 2: return Character.isJavaIdentifierPart(_input.LA(-1)); + case 3: return Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1))); + } + return true; + } + private boolean JavaLetter_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 0: return Character.isJavaIdentifierStart(_input.LA(-1)); + case 1: return Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1))); + } + return true; + } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2k\u042e\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"+ + "\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\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ + "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ + "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ + "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\t"+ + "k\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv\4"+ + "w\tw\4x\tx\4y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t\u0080"+ + "\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083\4\u0084\t\u0084\4\u0085"+ + "\t\u0085\4\u0086\t\u0086\4\u0087\t\u0087\4\u0088\t\u0088\4\u0089\t\u0089"+ + "\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"+ + "\4\u0093\t\u0093\4\u0094\t\u0094\3\2\3\2\3\2\3\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\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\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\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\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\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\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\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\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\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\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\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\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!\3!\3!\3!\3!\3\"\3\"\3"+ + "\"\3\"\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3$\3$\3$\3$\3$\3"+ + "$\3$\3%\3%\3%\3%\3%\3%\3%\3&\3&\3&\3&\3&\3&\3\'\3\'\3\'\3\'\3\'\3\'\3"+ + "\'\3(\3(\3(\3(\3(\3(\3(\3(\3(\3)\3)\3)\3)\3)\3)\3*\3*\3*\3*\3*\3*\3*\3"+ + "+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3,\3,\3,\3,\3,\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\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\64\3\64\5\64\u0281\n\64"+ + "\3\65\3\65\5\65\u0285\n\65\3\66\3\66\5\66\u0289\n\66\3\67\3\67\5\67\u028d"+ + "\n\67\38\38\58\u0291\n8\39\39\3:\3:\3:\5:\u0298\n:\3:\3:\3:\5:\u029d\n"+ + ":\5:\u029f\n:\3;\3;\7;\u02a3\n;\f;\16;\u02a6\13;\3;\5;\u02a9\n;\3<\3<"+ + "\5<\u02ad\n<\3=\3=\3>\3>\5>\u02b3\n>\3?\6?\u02b6\n?\r?\16?\u02b7\3@\3"+ + "@\3@\3@\3A\3A\7A\u02c0\nA\fA\16A\u02c3\13A\3A\5A\u02c6\nA\3B\3B\3C\3C"+ + "\5C\u02cc\nC\3D\3D\5D\u02d0\nD\3D\3D\3E\3E\7E\u02d6\nE\fE\16E\u02d9\13"+ + "E\3E\5E\u02dc\nE\3F\3F\3G\3G\5G\u02e2\nG\3H\3H\3H\3H\3I\3I\7I\u02ea\n"+ + "I\fI\16I\u02ed\13I\3I\5I\u02f0\nI\3J\3J\3K\3K\5K\u02f6\nK\3L\3L\5L\u02fa"+ + "\nL\3M\3M\3M\5M\u02ff\nM\3M\5M\u0302\nM\3M\5M\u0305\nM\3M\3M\3M\5M\u030a"+ + "\nM\3M\5M\u030d\nM\3M\3M\3M\5M\u0312\nM\3M\3M\3M\5M\u0317\nM\3N\3N\3N"+ + "\3O\3O\3P\5P\u031f\nP\3P\3P\3Q\3Q\3R\3R\3S\3S\3S\5S\u032a\nS\3T\3T\5T"+ + "\u032e\nT\3T\3T\3T\5T\u0333\nT\3T\3T\5T\u0337\nT\3U\3U\3U\3V\3V\3W\3W"+ + "\3W\3W\3W\3W\3W\3W\3W\5W\u0347\nW\3X\3X\3X\3X\3X\3X\3X\3X\5X\u0351\nX"+ + "\3Y\3Y\3Z\3Z\5Z\u0357\nZ\3Z\3Z\3[\6[\u035c\n[\r[\16[\u035d\3\\\3\\\5\\"+ + "\u0362\n\\\3]\3]\3]\3]\5]\u0368\n]\3^\3^\3^\3^\3^\3^\3^\3^\3^\3^\3^\5"+ + "^\u0375\n^\3_\3_\3_\3_\3_\3_\3_\3`\3`\3a\3a\3a\3a\3a\3b\3b\3c\3c\3d\3"+ + "d\3e\3e\3f\3f\3g\3g\3h\3h\3i\3i\3j\3j\3k\3k\3l\3l\3m\3m\3n\3n\3o\3o\3"+ + "p\3p\3q\3q\3r\3r\3r\3s\3s\3s\3t\3t\3t\3u\3u\3u\3v\3v\3v\3w\3w\3w\3x\3"+ + "x\3x\3y\3y\3y\3z\3z\3{\3{\3|\3|\3}\3}\3~\3~\3\177\3\177\3\u0080\3\u0080"+ + "\3\u0081\3\u0081\3\u0082\3\u0082\3\u0082\3\u0083\3\u0083\3\u0083\3\u0084"+ + "\3\u0084\3\u0084\3\u0085\3\u0085\3\u0085\3\u0086\3\u0086\3\u0086\3\u0087"+ + "\3\u0087\3\u0087\3\u0088\3\u0088\3\u0088\3\u0089\3\u0089\3\u0089\3\u008a"+ + "\3\u008a\3\u008a\3\u008a\3\u008b\3\u008b\3\u008b\3\u008b\3\u008c\3\u008c"+ + "\3\u008c\3\u008c\3\u008c\3\u008d\3\u008d\7\u008d\u03f4\n\u008d\f\u008d"+ + "\16\u008d\u03f7\13\u008d\3\u008e\3\u008e\3\u008e\3\u008e\3\u008e\3\u008e"+ + "\5\u008e\u03ff\n\u008e\3\u008f\3\u008f\3\u008f\3\u008f\3\u008f\3\u008f"+ + "\5\u008f\u0407\n\u008f\3\u0090\3\u0090\3\u0091\3\u0091\3\u0091\3\u0091"+ + "\3\u0092\6\u0092\u0410\n\u0092\r\u0092\16\u0092\u0411\3\u0092\3\u0092"+ + "\3\u0093\3\u0093\3\u0093\3\u0093\7\u0093\u041a\n\u0093\f\u0093\16\u0093"+ + "\u041d\13\u0093\3\u0093\3\u0093\3\u0093\3\u0093\3\u0093\3\u0094\3\u0094"+ + "\3\u0094\3\u0094\7\u0094\u0428\n\u0094\f\u0094\16\u0094\u042b\13\u0094"+ + "\3\u0094\3\u0094\3\u041b\2\u0095\3\3\5\4\7\5\t\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%\24\'\25)\26+\27-\30/\31"+ + "\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'M(O)Q*S+U,W-Y.[/]\60"+ + "_\61a\62c\63e\64g\65i\2k\2m\2o\2q\2s\2u\2w\2y\2{\2}\2\177\2\u0081\2\u0083"+ + "\2\u0085\2\u0087\2\u0089\2\u008b\2\u008d\2\u008f\2\u0091\2\u0093\2\u0095"+ + "\2\u0097\66\u0099\2\u009b\2\u009d\2\u009f\2\u00a1\2\u00a3\2\u00a5\2\u00a7"+ + "\2\u00a9\2\u00ab\2\u00ad\67\u00af8\u00b1\2\u00b39\u00b5\2\u00b7\2\u00b9"+ + "\2\u00bb\2\u00bd\2\u00bf\2\u00c1:\u00c3;\u00c5<\u00c7=\u00c9>\u00cb?\u00cd"+ + "@\u00cfA\u00d1B\u00d3C\u00d5D\u00d7E\u00d9F\u00dbG\u00ddH\u00dfI\u00e1"+ + "J\u00e3K\u00e5L\u00e7M\u00e9N\u00ebO\u00edP\u00efQ\u00f1R\u00f3S\u00f5"+ + "T\u00f7U\u00f9V\u00fbW\u00fdX\u00ffY\u0101Z\u0103[\u0105\\\u0107]\u0109"+ + "^\u010b_\u010d`\u010fa\u0111b\u0113c\u0115d\u0117e\u0119f\u011b\2\u011d"+ + "\2\u011fg\u0121h\u0123i\u0125j\u0127k\3\2\30\4\2NNnn\3\2\63;\4\2ZZzz\5"+ + "\2\62;CHch\3\2\629\4\2DDdd\3\2\62\63\4\2GGgg\4\2--//\6\2FFHHffhh\4\2R"+ + "Rrr\4\2))^^\4\2$$^^\n\2$$))^^ddhhppttvv\3\2\62\65\6\2&&C\\aac|\4\2\2\u0101"+ + "\ud802\udc01\3\2\ud802\udc01\3\2\udc02\ue001\7\2&&\62;C\\aac|\5\2\13\f"+ + "\16\17\"\"\4\2\f\f\17\17\u043c\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t"+ + "\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2"+ + "\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2"+ + "\37\3\2\2\2\2!\3\2\2\2\2#\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\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2"+ + "\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2"+ + "C\3\2\2\2\2E\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\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_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2"+ + "\u0097\3\2\2\2\2\u00ad\3\2\2\2\2\u00af\3\2\2\2\2\u00b3\3\2\2\2\2\u00c1"+ + "\3\2\2\2\2\u00c3\3\2\2\2\2\u00c5\3\2\2\2\2\u00c7\3\2\2\2\2\u00c9\3\2\2"+ + "\2\2\u00cb\3\2\2\2\2\u00cd\3\2\2\2\2\u00cf\3\2\2\2\2\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\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\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\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\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\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\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\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\2\2\u0119\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\u0127\3\2\2"+ + "\2\3\u0129\3\2\2\2\5\u0132\3\2\2\2\7\u0139\3\2\2\2\t\u0141\3\2\2\2\13"+ + "\u0147\3\2\2\2\r\u014c\3\2\2\2\17\u0151\3\2\2\2\21\u0157\3\2\2\2\23\u015c"+ + "\3\2\2\2\25\u0162\3\2\2\2\27\u0168\3\2\2\2\31\u0171\3\2\2\2\33\u0179\3"+ + "\2\2\2\35\u017c\3\2\2\2\37\u0183\3\2\2\2!\u0188\3\2\2\2#\u018d\3\2\2\2"+ + "%\u0195\3\2\2\2\'\u019b\3\2\2\2)\u01a3\3\2\2\2+\u01a9\3\2\2\2-\u01ad\3"+ + "\2\2\2/\u01b0\3\2\2\2\61\u01b5\3\2\2\2\63\u01c0\3\2\2\2\65\u01c7\3\2\2"+ + "\2\67\u01d2\3\2\2\29\u01d6\3\2\2\2;\u01e0\3\2\2\2=\u01e5\3\2\2\2?\u01ec"+ + "\3\2\2\2A\u01f0\3\2\2\2C\u01f8\3\2\2\2E\u0200\3\2\2\2G\u020a\3\2\2\2I"+ + "\u0211\3\2\2\2K\u0218\3\2\2\2M\u021e\3\2\2\2O\u0225\3\2\2\2Q\u022e\3\2"+ + "\2\2S\u0234\3\2\2\2U\u023b\3\2\2\2W\u0248\3\2\2\2Y\u024d\3\2\2\2[\u0253"+ + "\3\2\2\2]\u025a\3\2\2\2_\u0264\3\2\2\2a\u0268\3\2\2\2c\u026d\3\2\2\2e"+ + "\u0276\3\2\2\2g\u0280\3\2\2\2i\u0282\3\2\2\2k\u0286\3\2\2\2m\u028a\3\2"+ + "\2\2o\u028e\3\2\2\2q\u0292\3\2\2\2s\u029e\3\2\2\2u\u02a0\3\2\2\2w\u02ac"+ + "\3\2\2\2y\u02ae\3\2\2\2{\u02b2\3\2\2\2}\u02b5\3\2\2\2\177\u02b9\3\2\2"+ + "\2\u0081\u02bd\3\2\2\2\u0083\u02c7\3\2\2\2\u0085\u02cb\3\2\2\2\u0087\u02cd"+ + "\3\2\2\2\u0089\u02d3\3\2\2\2\u008b\u02dd\3\2\2\2\u008d\u02e1\3\2\2\2\u008f"+ + "\u02e3\3\2\2\2\u0091\u02e7\3\2\2\2\u0093\u02f1\3\2\2\2\u0095\u02f5\3\2"+ + "\2\2\u0097\u02f9\3\2\2\2\u0099\u0316\3\2\2\2\u009b\u0318\3\2\2\2\u009d"+ + "\u031b\3\2\2\2\u009f\u031e\3\2\2\2\u00a1\u0322\3\2\2\2\u00a3\u0324\3\2"+ + "\2\2\u00a5\u0326\3\2\2\2\u00a7\u0336\3\2\2\2\u00a9\u0338\3\2\2\2\u00ab"+ + "\u033b\3\2\2\2\u00ad\u0346\3\2\2\2\u00af\u0350\3\2\2\2\u00b1\u0352\3\2"+ + "\2\2\u00b3\u0354\3\2\2\2\u00b5\u035b\3\2\2\2\u00b7\u0361\3\2\2\2\u00b9"+ + "\u0367\3\2\2\2\u00bb\u0374\3\2\2\2\u00bd\u0376\3\2\2\2\u00bf\u037d\3\2"+ + "\2\2\u00c1\u037f\3\2\2\2\u00c3\u0384\3\2\2\2\u00c5\u0386\3\2\2\2\u00c7"+ + "\u0388\3\2\2\2\u00c9\u038a\3\2\2\2\u00cb\u038c\3\2\2\2\u00cd\u038e\3\2"+ + "\2\2\u00cf\u0390\3\2\2\2\u00d1\u0392\3\2\2\2\u00d3\u0394\3\2\2\2\u00d5"+ + "\u0396\3\2\2\2\u00d7\u0398\3\2\2\2\u00d9\u039a\3\2\2\2\u00db\u039c\3\2"+ + "\2\2\u00dd\u039e\3\2\2\2\u00df\u03a0\3\2\2\2\u00e1\u03a2\3\2\2\2\u00e3"+ + "\u03a4\3\2\2\2\u00e5\u03a7\3\2\2\2\u00e7\u03aa\3\2\2\2\u00e9\u03ad\3\2"+ + "\2\2\u00eb\u03b0\3\2\2\2\u00ed\u03b3\3\2\2\2\u00ef\u03b6\3\2\2\2\u00f1"+ + "\u03b9\3\2\2\2\u00f3\u03bc\3\2\2\2\u00f5\u03be\3\2\2\2\u00f7\u03c0\3\2"+ + "\2\2\u00f9\u03c2\3\2\2\2\u00fb\u03c4\3\2\2\2\u00fd\u03c6\3\2\2\2\u00ff"+ + "\u03c8\3\2\2\2\u0101\u03ca\3\2\2\2\u0103\u03cc\3\2\2\2\u0105\u03cf\3\2"+ + "\2\2\u0107\u03d2\3\2\2\2\u0109\u03d5\3\2\2\2\u010b\u03d8\3\2\2\2\u010d"+ + "\u03db\3\2\2\2\u010f\u03de\3\2\2\2\u0111\u03e1\3\2\2\2\u0113\u03e4\3\2"+ + "\2\2\u0115\u03e8\3\2\2\2\u0117\u03ec\3\2\2\2\u0119\u03f1\3\2\2\2\u011b"+ + "\u03fe\3\2\2\2\u011d\u0406\3\2\2\2\u011f\u0408\3\2\2\2\u0121\u040a\3\2"+ + "\2\2\u0123\u040f\3\2\2\2\u0125\u0415\3\2\2\2\u0127\u0423\3\2\2\2\u0129"+ + "\u012a\7c\2\2\u012a\u012b\7d\2\2\u012b\u012c\7u\2\2\u012c\u012d\7v\2\2"+ + "\u012d\u012e\7t\2\2\u012e\u012f\7c\2\2\u012f\u0130\7e\2\2\u0130\u0131"+ + "\7v\2\2\u0131\4\3\2\2\2\u0132\u0133\7c\2\2\u0133\u0134\7u\2\2\u0134\u0135"+ + "\7u\2\2\u0135\u0136\7g\2\2\u0136\u0137\7t\2\2\u0137\u0138\7v\2\2\u0138"+ + "\6\3\2\2\2\u0139\u013a\7d\2\2\u013a\u013b\7q\2\2\u013b\u013c\7q\2\2\u013c"+ + "\u013d\7n\2\2\u013d\u013e\7g\2\2\u013e\u013f\7c\2\2\u013f\u0140\7p\2\2"+ + "\u0140\b\3\2\2\2\u0141\u0142\7d\2\2\u0142\u0143\7t\2\2\u0143\u0144\7g"+ + "\2\2\u0144\u0145\7c\2\2\u0145\u0146\7m\2\2\u0146\n\3\2\2\2\u0147\u0148"+ + "\7d\2\2\u0148\u0149\7{\2\2\u0149\u014a\7v\2\2\u014a\u014b\7g\2\2\u014b"+ + "\f\3\2\2\2\u014c\u014d\7e\2\2\u014d\u014e\7c\2\2\u014e\u014f\7u\2\2\u014f"+ + "\u0150\7g\2\2\u0150\16\3\2\2\2\u0151\u0152\7e\2\2\u0152\u0153\7c\2\2\u0153"+ + "\u0154\7v\2\2\u0154\u0155\7e\2\2\u0155\u0156\7j\2\2\u0156\20\3\2\2\2\u0157"+ + "\u0158\7e\2\2\u0158\u0159\7j\2\2\u0159\u015a\7c\2\2\u015a\u015b\7t\2\2"+ + "\u015b\22\3\2\2\2\u015c\u015d\7e\2\2\u015d\u015e\7n\2\2\u015e\u015f\7"+ + "c\2\2\u015f\u0160\7u\2\2\u0160\u0161\7u\2\2\u0161\24\3\2\2\2\u0162\u0163"+ + "\7e\2\2\u0163\u0164\7q\2\2\u0164\u0165\7p\2\2\u0165\u0166\7u\2\2\u0166"+ + "\u0167\7v\2\2\u0167\26\3\2\2\2\u0168\u0169\7e\2\2\u0169\u016a\7q\2\2\u016a"+ + "\u016b\7p\2\2\u016b\u016c\7v\2\2\u016c\u016d\7k\2\2\u016d\u016e\7p\2\2"+ + "\u016e\u016f\7w\2\2\u016f\u0170\7g\2\2\u0170\30\3\2\2\2\u0171\u0172\7"+ + "f\2\2\u0172\u0173\7g\2\2\u0173\u0174\7h\2\2\u0174\u0175\7c\2\2\u0175\u0176"+ + "\7w\2\2\u0176\u0177\7n\2\2\u0177\u0178\7v\2\2\u0178\32\3\2\2\2\u0179\u017a"+ + "\7f\2\2\u017a\u017b\7q\2\2\u017b\34\3\2\2\2\u017c\u017d\7f\2\2\u017d\u017e"+ + "\7q\2\2\u017e\u017f\7w\2\2\u017f\u0180\7d\2\2\u0180\u0181\7n\2\2\u0181"+ + "\u0182\7g\2\2\u0182\36\3\2\2\2\u0183\u0184\7g\2\2\u0184\u0185\7n\2\2\u0185"+ + "\u0186\7u\2\2\u0186\u0187\7g\2\2\u0187 \3\2\2\2\u0188\u0189\7g\2\2\u0189"+ + "\u018a\7p\2\2\u018a\u018b\7w\2\2\u018b\u018c\7o\2\2\u018c\"\3\2\2\2\u018d"+ + "\u018e\7g\2\2\u018e\u018f\7z\2\2\u018f\u0190\7v\2\2\u0190\u0191\7g\2\2"+ + "\u0191\u0192\7p\2\2\u0192\u0193\7f\2\2\u0193\u0194\7u\2\2\u0194$\3\2\2"+ + "\2\u0195\u0196\7h\2\2\u0196\u0197\7k\2\2\u0197\u0198\7p\2\2\u0198\u0199"+ + "\7c\2\2\u0199\u019a\7n\2\2\u019a&\3\2\2\2\u019b\u019c\7h\2\2\u019c\u019d"+ + "\7k\2\2\u019d\u019e\7p\2\2\u019e\u019f\7c\2\2\u019f\u01a0\7n\2\2\u01a0"+ + "\u01a1\7n\2\2\u01a1\u01a2\7{\2\2\u01a2(\3\2\2\2\u01a3\u01a4\7h\2\2\u01a4"+ + "\u01a5\7n\2\2\u01a5\u01a6\7q\2\2\u01a6\u01a7\7c\2\2\u01a7\u01a8\7v\2\2"+ + "\u01a8*\3\2\2\2\u01a9\u01aa\7h\2\2\u01aa\u01ab\7q\2\2\u01ab\u01ac\7t\2"+ + "\2\u01ac,\3\2\2\2\u01ad\u01ae\7k\2\2\u01ae\u01af\7h\2\2\u01af.\3\2\2\2"+ + "\u01b0\u01b1\7i\2\2\u01b1\u01b2\7q\2\2\u01b2\u01b3\7v\2\2\u01b3\u01b4"+ + "\7q\2\2\u01b4\60\3\2\2\2\u01b5\u01b6\7k\2\2\u01b6\u01b7\7o\2\2\u01b7\u01b8"+ + "\7r\2\2\u01b8\u01b9\7n\2\2\u01b9\u01ba\7g\2\2\u01ba\u01bb\7o\2\2\u01bb"+ + "\u01bc\7g\2\2\u01bc\u01bd\7p\2\2\u01bd\u01be\7v\2\2\u01be\u01bf\7u\2\2"+ + "\u01bf\62\3\2\2\2\u01c0\u01c1\7k\2\2\u01c1\u01c2\7o\2\2\u01c2\u01c3\7"+ + "r\2\2\u01c3\u01c4\7q\2\2\u01c4\u01c5\7t\2\2\u01c5\u01c6\7v\2\2\u01c6\64"+ + "\3\2\2\2\u01c7\u01c8\7k\2\2\u01c8\u01c9\7p\2\2\u01c9\u01ca\7u\2\2\u01ca"+ + "\u01cb\7v\2\2\u01cb\u01cc\7c\2\2\u01cc\u01cd\7p\2\2\u01cd\u01ce\7e\2\2"+ + "\u01ce\u01cf\7g\2\2\u01cf\u01d0\7q\2\2\u01d0\u01d1\7h\2\2\u01d1\66\3\2"+ + "\2\2\u01d2\u01d3\7k\2\2\u01d3\u01d4\7p\2\2\u01d4\u01d5\7v\2\2\u01d58\3"+ + "\2\2\2\u01d6\u01d7\7k\2\2\u01d7\u01d8\7p\2\2\u01d8\u01d9\7v\2\2\u01d9"+ + "\u01da\7g\2\2\u01da\u01db\7t\2\2\u01db\u01dc\7h\2\2\u01dc\u01dd\7c\2\2"+ + "\u01dd\u01de\7e\2\2\u01de\u01df\7g\2\2\u01df:\3\2\2\2\u01e0\u01e1\7n\2"+ + "\2\u01e1\u01e2\7q\2\2\u01e2\u01e3\7p\2\2\u01e3\u01e4\7i\2\2\u01e4<\3\2"+ + "\2\2\u01e5\u01e6\7p\2\2\u01e6\u01e7\7c\2\2\u01e7\u01e8\7v\2\2\u01e8\u01e9"+ + "\7k\2\2\u01e9\u01ea\7x\2\2\u01ea\u01eb\7g\2\2\u01eb>\3\2\2\2\u01ec\u01ed"+ + "\7p\2\2\u01ed\u01ee\7g\2\2\u01ee\u01ef\7y\2\2\u01ef@\3\2\2\2\u01f0\u01f1"+ + "\7r\2\2\u01f1\u01f2\7c\2\2\u01f2\u01f3\7e\2\2\u01f3\u01f4\7m\2\2\u01f4"+ + "\u01f5\7c\2\2\u01f5\u01f6\7i\2\2\u01f6\u01f7\7g\2\2\u01f7B\3\2\2\2\u01f8"+ + "\u01f9\7r\2\2\u01f9\u01fa\7t\2\2\u01fa\u01fb\7k\2\2\u01fb\u01fc\7x\2\2"+ + "\u01fc\u01fd\7c\2\2\u01fd\u01fe\7v\2\2\u01fe\u01ff\7g\2\2\u01ffD\3\2\2"+ + "\2\u0200\u0201\7r\2\2\u0201\u0202\7t\2\2\u0202\u0203\7q\2\2\u0203\u0204"+ + "\7v\2\2\u0204\u0205\7g\2\2\u0205\u0206\7e\2\2\u0206\u0207\7v\2\2\u0207"+ + "\u0208\7g\2\2\u0208\u0209\7f\2\2\u0209F\3\2\2\2\u020a\u020b\7r\2\2\u020b"+ + "\u020c\7w\2\2\u020c\u020d\7d\2\2\u020d\u020e\7n\2\2\u020e\u020f\7k\2\2"+ + "\u020f\u0210\7e\2\2\u0210H\3\2\2\2\u0211\u0212\7t\2\2\u0212\u0213\7g\2"+ + "\2\u0213\u0214\7v\2\2\u0214\u0215\7w\2\2\u0215\u0216\7t\2\2\u0216\u0217"+ + "\7p\2\2\u0217J\3\2\2\2\u0218\u0219\7u\2\2\u0219\u021a\7j\2\2\u021a\u021b"+ + "\7q\2\2\u021b\u021c\7t\2\2\u021c\u021d\7v\2\2\u021dL\3\2\2\2\u021e\u021f"+ + "\7u\2\2\u021f\u0220\7v\2\2\u0220\u0221\7c\2\2\u0221\u0222\7v\2\2\u0222"+ + "\u0223\7k\2\2\u0223\u0224\7e\2\2\u0224N\3\2\2\2\u0225\u0226\7u\2\2\u0226"+ + "\u0227\7v\2\2\u0227\u0228\7t\2\2\u0228\u0229\7k\2\2\u0229\u022a\7e\2\2"+ + "\u022a\u022b\7v\2\2\u022b\u022c\7h\2\2\u022c\u022d\7r\2\2\u022dP\3\2\2"+ + "\2\u022e\u022f\7u\2\2\u022f\u0230\7w\2\2\u0230\u0231\7r\2\2\u0231\u0232"+ + "\7g\2\2\u0232\u0233\7t\2\2\u0233R\3\2\2\2\u0234\u0235\7u\2\2\u0235\u0236"+ + "\7y\2\2\u0236\u0237\7k\2\2\u0237\u0238\7v\2\2\u0238\u0239\7e\2\2\u0239"+ + "\u023a\7j\2\2\u023aT\3\2\2\2\u023b\u023c\7u\2\2\u023c\u023d\7{\2\2\u023d"+ + "\u023e\7p\2\2\u023e\u023f\7e\2\2\u023f\u0240\7j\2\2\u0240\u0241\7t\2\2"+ + "\u0241\u0242\7q\2\2\u0242\u0243\7p\2\2\u0243\u0244\7k\2\2\u0244\u0245"+ + "\7|\2\2\u0245\u0246\7g\2\2\u0246\u0247\7f\2\2\u0247V\3\2\2\2\u0248\u0249"+ + "\7v\2\2\u0249\u024a\7j\2\2\u024a\u024b\7k\2\2\u024b\u024c\7u\2\2\u024c"+ + "X\3\2\2\2\u024d\u024e\7v\2\2\u024e\u024f\7j\2\2\u024f\u0250\7t\2\2\u0250"+ + "\u0251\7q\2\2\u0251\u0252\7y\2\2\u0252Z\3\2\2\2\u0253\u0254\7v\2\2\u0254"+ + "\u0255\7j\2\2\u0255\u0256\7t\2\2\u0256\u0257\7q\2\2\u0257\u0258\7y\2\2"+ + "\u0258\u0259\7u\2\2\u0259\\\3\2\2\2\u025a\u025b\7v\2\2\u025b\u025c\7t"+ + "\2\2\u025c\u025d\7c\2\2\u025d\u025e\7p\2\2\u025e\u025f\7u\2\2\u025f\u0260"+ + "\7k\2\2\u0260\u0261\7g\2\2\u0261\u0262\7p\2\2\u0262\u0263\7v\2\2\u0263"+ + "^\3\2\2\2\u0264\u0265\7v\2\2\u0265\u0266\7t\2\2\u0266\u0267\7{\2\2\u0267"+ + "`\3\2\2\2\u0268\u0269\7x\2\2\u0269\u026a\7q\2\2\u026a\u026b\7k\2\2\u026b"+ + "\u026c\7f\2\2\u026cb\3\2\2\2\u026d\u026e\7x\2\2\u026e\u026f\7q\2\2\u026f"+ + "\u0270\7n\2\2\u0270\u0271\7c\2\2\u0271\u0272\7v\2\2\u0272\u0273\7k\2\2"+ + "\u0273\u0274\7n\2\2\u0274\u0275\7g\2\2\u0275d\3\2\2\2\u0276\u0277\7y\2"+ + "\2\u0277\u0278\7j\2\2\u0278\u0279\7k\2\2\u0279\u027a\7n\2\2\u027a\u027b"+ + "\7g\2\2\u027bf\3\2\2\2\u027c\u0281\5i\65\2\u027d\u0281\5k\66\2\u027e\u0281"+ + "\5m\67\2\u027f\u0281\5o8\2\u0280\u027c\3\2\2\2\u0280\u027d\3\2\2\2\u0280"+ + "\u027e\3\2\2\2\u0280\u027f\3\2\2\2\u0281h\3\2\2\2\u0282\u0284\5s:\2\u0283"+ + "\u0285\5q9\2\u0284\u0283\3\2\2\2\u0284\u0285\3\2\2\2\u0285j\3\2\2\2\u0286"+ + "\u0288\5\177@\2\u0287\u0289\5q9\2\u0288\u0287\3\2\2\2\u0288\u0289\3\2"+ + "\2\2\u0289l\3\2\2\2\u028a\u028c\5\u0087D\2\u028b\u028d\5q9\2\u028c\u028b"+ + "\3\2\2\2\u028c\u028d\3\2\2\2\u028dn\3\2\2\2\u028e\u0290\5\u008fH\2\u028f"+ + "\u0291\5q9\2\u0290\u028f\3\2\2\2\u0290\u0291\3\2\2\2\u0291p\3\2\2\2\u0292"+ + "\u0293\t\2\2\2\u0293r\3\2\2\2\u0294\u029f\7\62\2\2\u0295\u029c\5y=\2\u0296"+ + "\u0298\5u;\2\u0297\u0296\3\2\2\2\u0297\u0298\3\2\2\2\u0298\u029d\3\2\2"+ + "\2\u0299\u029a\5}?\2\u029a\u029b\5u;\2\u029b\u029d\3\2\2\2\u029c\u0297"+ + "\3\2\2\2\u029c\u0299\3\2\2\2\u029d\u029f\3\2\2\2\u029e\u0294\3\2\2\2\u029e"+ + "\u0295\3\2\2\2\u029ft\3\2\2\2\u02a0\u02a8\5w<\2\u02a1\u02a3\5{>\2\u02a2"+ + "\u02a1\3\2\2\2\u02a3\u02a6\3\2\2\2\u02a4\u02a2\3\2\2\2\u02a4\u02a5\3\2"+ + "\2\2\u02a5\u02a7\3\2\2\2\u02a6\u02a4\3\2\2\2\u02a7\u02a9\5w<\2\u02a8\u02a4"+ + "\3\2\2\2\u02a8\u02a9\3\2\2\2\u02a9v\3\2\2\2\u02aa\u02ad\7\62\2\2\u02ab"+ + "\u02ad\5y=\2\u02ac\u02aa\3\2\2\2\u02ac\u02ab\3\2\2\2\u02adx\3\2\2\2\u02ae"+ + "\u02af\t\3\2\2\u02afz\3\2\2\2\u02b0\u02b3\5w<\2\u02b1\u02b3\7a\2\2\u02b2"+ + "\u02b0\3\2\2\2\u02b2\u02b1\3\2\2\2\u02b3|\3\2\2\2\u02b4\u02b6\7a\2\2\u02b5"+ + "\u02b4\3\2\2\2\u02b6\u02b7\3\2\2\2\u02b7\u02b5\3\2\2\2\u02b7\u02b8\3\2"+ + "\2\2\u02b8~\3\2\2\2\u02b9\u02ba\7\62\2\2\u02ba\u02bb\t\4\2\2\u02bb\u02bc"+ + "\5\u0081A\2\u02bc\u0080\3\2\2\2\u02bd\u02c5\5\u0083B\2\u02be\u02c0\5\u0085"+ + "C\2\u02bf\u02be\3\2\2\2\u02c0\u02c3\3\2\2\2\u02c1\u02bf\3\2\2\2\u02c1"+ + "\u02c2\3\2\2\2\u02c2\u02c4\3\2\2\2\u02c3\u02c1\3\2\2\2\u02c4\u02c6\5\u0083"+ + "B\2\u02c5\u02c1\3\2\2\2\u02c5\u02c6\3\2\2\2\u02c6\u0082\3\2\2\2\u02c7"+ + "\u02c8\t\5\2\2\u02c8\u0084\3\2\2\2\u02c9\u02cc\5\u0083B\2\u02ca\u02cc"+ + "\7a\2\2\u02cb\u02c9\3\2\2\2\u02cb\u02ca\3\2\2\2\u02cc\u0086\3\2\2\2\u02cd"+ + "\u02cf\7\62\2\2\u02ce\u02d0\5}?\2\u02cf\u02ce\3\2\2\2\u02cf\u02d0\3\2"+ + "\2\2\u02d0\u02d1\3\2\2\2\u02d1\u02d2\5\u0089E\2\u02d2\u0088\3\2\2\2\u02d3"+ + "\u02db\5\u008bF\2\u02d4\u02d6\5\u008dG\2\u02d5\u02d4\3\2\2\2\u02d6\u02d9"+ + "\3\2\2\2\u02d7\u02d5\3\2\2\2\u02d7\u02d8\3\2\2\2\u02d8\u02da\3\2\2\2\u02d9"+ + "\u02d7\3\2\2\2\u02da\u02dc\5\u008bF\2\u02db\u02d7\3\2\2\2\u02db\u02dc"+ + "\3\2\2\2\u02dc\u008a\3\2\2\2\u02dd\u02de\t\6\2\2\u02de\u008c\3\2\2\2\u02df"+ + "\u02e2\5\u008bF\2\u02e0\u02e2\7a\2\2\u02e1\u02df\3\2\2\2\u02e1\u02e0\3"+ + "\2\2\2\u02e2\u008e\3\2\2\2\u02e3\u02e4\7\62\2\2\u02e4\u02e5\t\7\2\2\u02e5"+ + "\u02e6\5\u0091I\2\u02e6\u0090\3\2\2\2\u02e7\u02ef\5\u0093J\2\u02e8\u02ea"+ + "\5\u0095K\2\u02e9\u02e8\3\2\2\2\u02ea\u02ed\3\2\2\2\u02eb\u02e9\3\2\2"+ + "\2\u02eb\u02ec\3\2\2\2\u02ec\u02ee\3\2\2\2\u02ed\u02eb\3\2\2\2\u02ee\u02f0"+ + "\5\u0093J\2\u02ef\u02eb\3\2\2\2\u02ef\u02f0\3\2\2\2\u02f0\u0092\3\2\2"+ + "\2\u02f1\u02f2\t\b\2\2\u02f2\u0094\3\2\2\2\u02f3\u02f6\5\u0093J\2\u02f4"+ + "\u02f6\7a\2\2\u02f5\u02f3\3\2\2\2\u02f5\u02f4\3\2\2\2\u02f6\u0096\3\2"+ + "\2\2\u02f7\u02fa\5\u0099M\2\u02f8\u02fa\5\u00a5S\2\u02f9\u02f7\3\2\2\2"+ + "\u02f9\u02f8\3\2\2\2\u02fa\u0098\3\2\2\2\u02fb\u02fc\5u;\2\u02fc\u02fe"+ + "\7\60\2\2\u02fd\u02ff\5u;\2\u02fe\u02fd\3\2\2\2\u02fe\u02ff\3\2\2\2\u02ff"+ + "\u0301\3\2\2\2\u0300\u0302\5\u009bN\2\u0301\u0300\3\2\2\2\u0301\u0302"+ + "\3\2\2\2\u0302\u0304\3\2\2\2\u0303\u0305\5\u00a3R\2\u0304\u0303\3\2\2"+ + "\2\u0304\u0305\3\2\2\2\u0305\u0317\3\2\2\2\u0306\u0307\7\60\2\2\u0307"+ + "\u0309\5u;\2\u0308\u030a\5\u009bN\2\u0309\u0308\3\2\2\2\u0309\u030a\3"+ + "\2\2\2\u030a\u030c\3\2\2\2\u030b\u030d\5\u00a3R\2\u030c\u030b\3\2\2\2"+ + "\u030c\u030d\3\2\2\2\u030d\u0317\3\2\2\2\u030e\u030f\5u;\2\u030f\u0311"+ + "\5\u009bN\2\u0310\u0312\5\u00a3R\2\u0311\u0310\3\2\2\2\u0311\u0312\3\2"+ + "\2\2\u0312\u0317\3\2\2\2\u0313\u0314\5u;\2\u0314\u0315\5\u00a3R\2\u0315"+ + "\u0317\3\2\2\2\u0316\u02fb\3\2\2\2\u0316\u0306\3\2\2\2\u0316\u030e\3\2"+ + "\2\2\u0316\u0313\3\2\2\2\u0317\u009a\3\2\2\2\u0318\u0319\5\u009dO\2\u0319"+ + "\u031a\5\u009fP\2\u031a\u009c\3\2\2\2\u031b\u031c\t\t\2\2\u031c\u009e"+ + "\3\2\2\2\u031d\u031f\5\u00a1Q\2\u031e\u031d\3\2\2\2\u031e\u031f\3\2\2"+ + "\2\u031f\u0320\3\2\2\2\u0320\u0321\5u;\2\u0321\u00a0\3\2\2\2\u0322\u0323"+ + "\t\n\2\2\u0323\u00a2\3\2\2\2\u0324\u0325\t\13\2\2\u0325\u00a4\3\2\2\2"+ + "\u0326\u0327\5\u00a7T\2\u0327\u0329\5\u00a9U\2\u0328\u032a\5\u00a3R\2"+ + "\u0329\u0328\3\2\2\2\u0329\u032a\3\2\2\2\u032a\u00a6\3\2\2\2\u032b\u032d"+ + "\5\177@\2\u032c\u032e\7\60\2\2\u032d\u032c\3\2\2\2\u032d\u032e\3\2\2\2"+ + "\u032e\u0337\3\2\2\2\u032f\u0330\7\62\2\2\u0330\u0332\t\4\2\2\u0331\u0333"+ + "\5\u0081A\2\u0332\u0331\3\2\2\2\u0332\u0333\3\2\2\2\u0333\u0334\3\2\2"+ + "\2\u0334\u0335\7\60\2\2\u0335\u0337\5\u0081A\2\u0336\u032b\3\2\2\2\u0336"+ + "\u032f\3\2\2\2\u0337\u00a8\3\2\2\2\u0338\u0339\5\u00abV\2\u0339\u033a"+ + "\5\u009fP\2\u033a\u00aa\3\2\2\2\u033b\u033c\t\f\2\2\u033c\u00ac\3\2\2"+ + "\2\u033d\u033e\7v\2\2\u033e\u033f\7t\2\2\u033f\u0340\7w\2\2\u0340\u0347"+ + "\7g\2\2\u0341\u0342\7h\2\2\u0342\u0343\7c\2\2\u0343\u0344\7n\2\2\u0344"+ + "\u0345\7u\2\2\u0345\u0347\7g\2\2\u0346\u033d\3\2\2\2\u0346\u0341\3\2\2"+ + "\2\u0347\u00ae\3\2\2\2\u0348\u0349\7)\2\2\u0349\u034a\5\u00b1Y\2\u034a"+ + "\u034b\7)\2\2\u034b\u0351\3\2\2\2\u034c\u034d\7)\2\2\u034d\u034e\5\u00b9"+ + "]\2\u034e\u034f\7)\2\2\u034f\u0351\3\2\2\2\u0350\u0348\3\2\2\2\u0350\u034c"+ + "\3\2\2\2\u0351\u00b0\3\2\2\2\u0352\u0353\n\r\2\2\u0353\u00b2\3\2\2\2\u0354"+ + "\u0356\7$\2\2\u0355\u0357\5\u00b5[\2\u0356\u0355\3\2\2\2\u0356\u0357\3"+ + "\2\2\2\u0357\u0358\3\2\2\2\u0358\u0359\7$\2\2\u0359\u00b4\3\2\2\2\u035a"+ + "\u035c\5\u00b7\\\2\u035b\u035a\3\2\2\2\u035c\u035d\3\2\2\2\u035d\u035b"+ + "\3\2\2\2\u035d\u035e\3\2\2\2\u035e\u00b6\3\2\2\2\u035f\u0362\n\16\2\2"+ + "\u0360\u0362\5\u00b9]\2\u0361\u035f\3\2\2\2\u0361\u0360\3\2\2\2\u0362"+ + "\u00b8\3\2\2\2\u0363\u0364\7^\2\2\u0364\u0368\t\17\2\2\u0365\u0368\5\u00bb"+ + "^\2\u0366\u0368\5\u00bd_\2\u0367\u0363\3\2\2\2\u0367\u0365\3\2\2\2\u0367"+ + "\u0366\3\2\2\2\u0368\u00ba\3\2\2\2\u0369\u036a\7^\2\2\u036a\u0375\5\u008b"+ + "F\2\u036b\u036c\7^\2\2\u036c\u036d\5\u008bF\2\u036d\u036e\5\u008bF\2\u036e"+ + "\u0375\3\2\2\2\u036f\u0370\7^\2\2\u0370\u0371\5\u00bf`\2\u0371\u0372\5"+ + "\u008bF\2\u0372\u0373\5\u008bF\2\u0373\u0375\3\2\2\2\u0374\u0369\3\2\2"+ + "\2\u0374\u036b\3\2\2\2\u0374\u036f\3\2\2\2\u0375\u00bc\3\2\2\2\u0376\u0377"+ + "\7^\2\2\u0377\u0378\7w\2\2\u0378\u0379\5\u0083B\2\u0379\u037a\5\u0083"+ + "B\2\u037a\u037b\5\u0083B\2\u037b\u037c\5\u0083B\2\u037c\u00be\3\2\2\2"+ + "\u037d\u037e\t\20\2\2\u037e\u00c0\3\2\2\2\u037f\u0380\7p\2\2\u0380\u0381"+ + "\7w\2\2\u0381\u0382\7n\2\2\u0382\u0383\7n\2\2\u0383\u00c2\3\2\2\2\u0384"+ + "\u0385\7*\2\2\u0385\u00c4\3\2\2\2\u0386\u0387\7+\2\2\u0387\u00c6\3\2\2"+ + "\2\u0388\u0389\7}\2\2\u0389\u00c8\3\2\2\2\u038a\u038b\7\177\2\2\u038b"+ + "\u00ca\3\2\2\2\u038c\u038d\7]\2\2\u038d\u00cc\3\2\2\2\u038e\u038f\7_\2"+ + "\2\u038f\u00ce\3\2\2\2\u0390\u0391\7=\2\2\u0391\u00d0\3\2\2\2\u0392\u0393"+ + "\7.\2\2\u0393\u00d2\3\2\2\2\u0394\u0395\7\60\2\2\u0395\u00d4\3\2\2\2\u0396"+ + "\u0397\7?\2\2\u0397\u00d6\3\2\2\2\u0398\u0399\7@\2\2\u0399\u00d8\3\2\2"+ + "\2\u039a\u039b\7>\2\2\u039b\u00da\3\2\2\2\u039c\u039d\7#\2\2\u039d\u00dc"+ + "\3\2\2\2\u039e\u039f\7\u0080\2\2\u039f\u00de\3\2\2\2\u03a0\u03a1\7A\2"+ + "\2\u03a1\u00e0\3\2\2\2\u03a2\u03a3\7<\2\2\u03a3\u00e2\3\2\2\2\u03a4\u03a5"+ + "\7?\2\2\u03a5\u03a6\7?\2\2\u03a6\u00e4\3\2\2\2\u03a7\u03a8\7>\2\2\u03a8"+ + "\u03a9\7?\2\2\u03a9\u00e6\3\2\2\2\u03aa\u03ab\7@\2\2\u03ab\u03ac\7?\2"+ + "\2\u03ac\u00e8\3\2\2\2\u03ad\u03ae\7#\2\2\u03ae\u03af\7?\2\2\u03af\u00ea"+ + "\3\2\2\2\u03b0\u03b1\7(\2\2\u03b1\u03b2\7(\2\2\u03b2\u00ec\3\2\2\2\u03b3"+ + "\u03b4\7~\2\2\u03b4\u03b5\7~\2\2\u03b5\u00ee\3\2\2\2\u03b6\u03b7\7-\2"+ + "\2\u03b7\u03b8\7-\2\2\u03b8\u00f0\3\2\2\2\u03b9\u03ba\7/\2\2\u03ba\u03bb"+ + "\7/\2\2\u03bb\u00f2\3\2\2\2\u03bc\u03bd\7-\2\2\u03bd\u00f4\3\2\2\2\u03be"+ + "\u03bf\7/\2\2\u03bf\u00f6\3\2\2\2\u03c0\u03c1\7,\2\2\u03c1\u00f8\3\2\2"+ + "\2\u03c2\u03c3\7\61\2\2\u03c3\u00fa\3\2\2\2\u03c4\u03c5\7(\2\2\u03c5\u00fc"+ + "\3\2\2\2\u03c6\u03c7\7~\2\2\u03c7\u00fe\3\2\2\2\u03c8\u03c9\7`\2\2\u03c9"+ + "\u0100\3\2\2\2\u03ca\u03cb\7\'\2\2\u03cb\u0102\3\2\2\2\u03cc\u03cd\7-"+ + "\2\2\u03cd\u03ce\7?\2\2\u03ce\u0104\3\2\2\2\u03cf\u03d0\7/\2\2\u03d0\u03d1"+ + "\7?\2\2\u03d1\u0106\3\2\2\2\u03d2\u03d3\7,\2\2\u03d3\u03d4\7?\2\2\u03d4"+ + "\u0108\3\2\2\2\u03d5\u03d6\7\61\2\2\u03d6\u03d7\7?\2\2\u03d7\u010a\3\2"+ + "\2\2\u03d8\u03d9\7(\2\2\u03d9\u03da\7?\2\2\u03da\u010c\3\2\2\2\u03db\u03dc"+ + "\7~\2\2\u03dc\u03dd\7?\2\2\u03dd\u010e\3\2\2\2\u03de\u03df\7`\2\2\u03df"+ + "\u03e0\7?\2\2\u03e0\u0110\3\2\2\2\u03e1\u03e2\7\'\2\2\u03e2\u03e3\7?\2"+ + "\2\u03e3\u0112\3\2\2\2\u03e4\u03e5\7>\2\2\u03e5\u03e6\7>\2\2\u03e6\u03e7"+ + "\7?\2\2\u03e7\u0114\3\2\2\2\u03e8\u03e9\7@\2\2\u03e9\u03ea\7@\2\2\u03ea"+ + "\u03eb\7?\2\2\u03eb\u0116\3\2\2\2\u03ec\u03ed\7@\2\2\u03ed\u03ee\7@\2"+ + "\2\u03ee\u03ef\7@\2\2\u03ef\u03f0\7?\2\2\u03f0\u0118\3\2\2\2\u03f1\u03f5"+ + "\5\u011b\u008e\2\u03f2\u03f4\5\u011d\u008f\2\u03f3\u03f2\3\2\2\2\u03f4"+ + "\u03f7\3\2\2\2\u03f5\u03f3\3\2\2\2\u03f5\u03f6\3\2\2\2\u03f6\u011a\3\2"+ + "\2\2\u03f7\u03f5\3\2\2\2\u03f8\u03ff\t\21\2\2\u03f9\u03fa\n\22\2\2\u03fa"+ + "\u03ff\6\u008e\2\2\u03fb\u03fc\t\23\2\2\u03fc\u03fd\t\24\2\2\u03fd\u03ff"+ + "\6\u008e\3\2\u03fe\u03f8\3\2\2\2\u03fe\u03f9\3\2\2\2\u03fe\u03fb\3\2\2"+ + "\2\u03ff\u011c\3\2\2\2\u0400\u0407\t\25\2\2\u0401\u0402\n\22\2\2\u0402"+ + "\u0407\6\u008f\4\2\u0403\u0404\t\23\2\2\u0404\u0405\t\24\2\2\u0405\u0407"+ + "\6\u008f\5\2\u0406\u0400\3\2\2\2\u0406\u0401\3\2\2\2\u0406\u0403\3\2\2"+ + "\2\u0407\u011e\3\2\2\2\u0408\u0409\7B\2\2\u0409\u0120\3\2\2\2\u040a\u040b"+ + "\7\60\2\2\u040b\u040c\7\60\2\2\u040c\u040d\7\60\2\2\u040d\u0122\3\2\2"+ + "\2\u040e\u0410\t\26\2\2\u040f\u040e\3\2\2\2\u0410\u0411\3\2\2\2\u0411"+ + "\u040f\3\2\2\2\u0411\u0412\3\2\2\2\u0412\u0413\3\2\2\2\u0413\u0414\b\u0092"+ + "\2\2\u0414\u0124\3\2\2\2\u0415\u0416\7\61\2\2\u0416\u0417\7,\2\2\u0417"+ + "\u041b\3\2\2\2\u0418\u041a\13\2\2\2\u0419\u0418\3\2\2\2\u041a\u041d\3"+ + "\2\2\2\u041b\u041c\3\2\2\2\u041b\u0419\3\2\2\2\u041c\u041e\3\2\2\2\u041d"+ + "\u041b\3\2\2\2\u041e\u041f\7,\2\2\u041f\u0420\7\61\2\2\u0420\u0421\3\2"+ + "\2\2\u0421\u0422\b\u0093\2\2\u0422\u0126\3\2\2\2\u0423\u0424\7\61\2\2"+ + "\u0424\u0425\7\61\2\2\u0425\u0429\3\2\2\2\u0426\u0428\n\27\2\2\u0427\u0426"+ + "\3\2\2\2\u0428\u042b\3\2\2\2\u0429\u0427\3\2\2\2\u0429\u042a\3\2\2\2\u042a"+ + "\u042c\3\2\2\2\u042b\u0429\3\2\2\2\u042c\u042d\b\u0094\2\2\u042d\u0128"+ + "\3\2\2\2\64\2\u0280\u0284\u0288\u028c\u0290\u0297\u029c\u029e\u02a4\u02a8"+ + "\u02ac\u02b2\u02b7\u02c1\u02c5\u02cb\u02cf\u02d7\u02db\u02e1\u02eb\u02ef"+ + "\u02f5\u02f9\u02fe\u0301\u0304\u0309\u030c\u0311\u0316\u031e\u0329\u032d"+ + "\u0332\u0336\u0346\u0350\u0356\u035d\u0361\u0367\u0374\u03f5\u03fe\u0406"+ + "\u0411\u041b\u0429\3\b\2\2"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/antlr/Java8Lexer.tokens b/antlr/Java8Lexer.tokens new file mode 100644 index 000000000..3f62bddf3 --- /dev/null +++ b/antlr/Java8Lexer.tokens @@ -0,0 +1,201 @@ +THROW=44 +STATIC=38 +INTERFACE=28 +AND_ASSIGN=93 +BREAK=4 +BYTE=5 +ELSE=15 +IF=22 +ENUM=16 +SUB=82 +BANG=69 +LPAREN=57 +DOT=65 +CASE=6 +AT=101 +LINE_COMMENT=105 +StringLiteral=55 +ELLIPSIS=102 +LBRACK=61 +PUBLIC=35 +THROWS=45 +NullLiteral=56 +RSHIFT_ASSIGN=98 +LBRACE=59 +GOTO=23 +SUB_ASSIGN=90 +SEMI=63 +CHAR=8 +ASSIGN=66 +COMMENT=104 +IMPORT=25 +BITOR=86 +CATCH=7 +MUL_ASSIGN=91 +DOUBLE=14 +PROTECTED=34 +LONG=29 +COMMA=64 +BITAND=85 +PRIVATE=33 +CONTINUE=11 +DIV=84 +FloatingPointLiteral=52 +LE=74 +CharacterLiteral=54 +VOLATILE=49 +EXTENDS=17 +INSTANCEOF=26 +NEW=31 +ADD=81 +LT=68 +CLASS=9 +DO=13 +FINALLY=19 +Identifier=100 +CONST=10 +PACKAGE=32 +OR_ASSIGN=94 +TRY=47 +IntegerLiteral=51 +SYNCHRONIZED=42 +MUL=83 +FOR=21 +FINAL=18 +RPAREN=58 +CARET=87 +URSHIFT_ASSIGN=99 +BOOLEAN=3 +NOTEQUAL=76 +RBRACK=62 +RBRACE=60 +AND=77 +THIS=43 +SWITCH=41 +VOID=48 +TRANSIENT=46 +INC=79 +FLOAT=20 +NATIVE=30 +DIV_ASSIGN=92 +BooleanLiteral=53 +ABSTRACT=1 +STRICTFP=39 +INT=27 +QUESTION=71 +RETURN=36 +LSHIFT_ASSIGN=97 +ADD_ASSIGN=89 +WS=103 +GE=75 +SUPER=40 +OR=78 +DEC=80 +MOD=88 +XOR_ASSIGN=95 +ASSERT=2 +EQUAL=73 +IMPLEMENTS=24 +COLON=72 +GT=67 +SHORT=37 +MOD_ASSIGN=96 +WHILE=50 +TILDE=70 +DEFAULT=12 +'import'=25 +'-'=82 +')'=58 +'super'=40 +'else'=15 +'%'=88 +'!'=69 +'>'=67 +'public'=35 +'=='=73 +'--'=80 +'|'=86 +'['=61 +':'=72 +'...'=102 +'throw'=44 +'case'=6 +'.'=65 +'this'=43 +'*'=83 +'switch'=41 +'synchronized'=42 +'&'=85 +'double'=14 +'break'=4 +'short'=37 +'<='=74 +'enum'=16 +'try'=47 +'?'=71 +'if'=22 +'extends'=17 +'goto'=23 +'}'=60 +'instanceof'=26 +';'=63 +'||'=78 +'>>='=98 +'class'=9 +'return'=36 +'&='=93 +'catch'=7 +'native'=30 +'continue'=11 +'strictfp'=39 +'/'=84 +'*='=91 +'+'=81 +'final'=18 +'protected'=34 +'static'=38 +'@'=101 +'transient'=46 +'~'=70 +'assert'=2 +']'=62 +'<'=68 +'++'=79 +'>>>='=99 +'>='=75 +'long'=29 +'boolean'=3 +'const'=10 +'abstract'=1 +'implements'=24 +'volatile'=49 +'throws'=45 +'/='=92 +','=64 +'-='=90 +'do'=13 +'package'=32 +'('=57 +'null'=56 +'int'=27 +'|='=94 +'for'=21 +'^'=87 +'<<='=97 +'='=66 +'byte'=5 +'&&'=77 +'^='=95 +'void'=48 +'while'=50 +'{'=59 +'float'=20 +'!='=76 +'new'=31 +'char'=8 +'finally'=19 +'interface'=28 +'%='=96 +'private'=33 +'+='=89 +'default'=12 diff --git a/antlr/Java8Listener.java b/antlr/Java8Listener.java new file mode 100644 index 000000000..5b49ebda2 --- /dev/null +++ b/antlr/Java8Listener.java @@ -0,0 +1,1020 @@ +// Generated from Java8.g4 by ANTLR 4.4 +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link Java8Parser}. + */ +public interface Java8Listener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link Java8Parser#memberDeclaration}. + * @param ctx the parse tree + */ + void enterMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#memberDeclaration}. + * @param ctx the parse tree + */ + void exitMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#defaultValue}. + * @param ctx the parse tree + */ + void enterDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#defaultValue}. + * @param ctx the parse tree + */ + void exitDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationTypeElementDeclaration}. + * @param ctx the parse tree + */ + void enterAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationTypeElementDeclaration}. + * @param ctx the parse tree + */ + void exitAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#type}. + * @param ctx the parse tree + */ + void enterType(@NotNull Java8Parser.TypeContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#type}. + * @param ctx the parse tree + */ + void exitType(@NotNull Java8Parser.TypeContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationTypeBody}. + * @param ctx the parse tree + */ + void enterAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationTypeBody}. + * @param ctx the parse tree + */ + void exitAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#genericInterfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void enterGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#genericInterfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void exitGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#classBodyDeclaration}. + * @param ctx the parse tree + */ + void enterClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#classBodyDeclaration}. + * @param ctx the parse tree + */ + void exitClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#block}. + * @param ctx the parse tree + */ + void enterBlock(@NotNull Java8Parser.BlockContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#block}. + * @param ctx the parse tree + */ + void exitBlock(@NotNull Java8Parser.BlockContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#enumBodyDeclarations}. + * @param ctx the parse tree + */ + void enterEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#enumBodyDeclarations}. + * @param ctx the parse tree + */ + void exitEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#forUpdate}. + * @param ctx the parse tree + */ + void enterForUpdate(@NotNull Java8Parser.ForUpdateContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#forUpdate}. + * @param ctx the parse tree + */ + void exitForUpdate(@NotNull Java8Parser.ForUpdateContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#enhancedForControl}. + * @param ctx the parse tree + */ + void enterEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#enhancedForControl}. + * @param ctx the parse tree + */ + void exitEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationConstantRest}. + * @param ctx the parse tree + */ + void enterAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationConstantRest}. + * @param ctx the parse tree + */ + void exitAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#explicitGenericInvocation}. + * @param ctx the parse tree + */ + void enterExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#explicitGenericInvocation}. + * @param ctx the parse tree + */ + void exitExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#nonWildcardTypeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void enterNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#nonWildcardTypeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void exitNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#expressionList}. + * @param ctx the parse tree + */ + void enterExpressionList(@NotNull Java8Parser.ExpressionListContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#expressionList}. + * @param ctx the parse tree + */ + void exitExpressionList(@NotNull Java8Parser.ExpressionListContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationTypeElementRest}. + * @param ctx the parse tree + */ + void enterAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationTypeElementRest}. + * @param ctx the parse tree + */ + void exitAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#classOrInterfaceType}. + * @param ctx the parse tree + */ + void enterClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#classOrInterfaceType}. + * @param ctx the parse tree + */ + void exitClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeBound}. + * @param ctx the parse tree + */ + void enterTypeBound(@NotNull Java8Parser.TypeBoundContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeBound}. + * @param ctx the parse tree + */ + void exitTypeBound(@NotNull Java8Parser.TypeBoundContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#variableDeclaratorId}. + * @param ctx the parse tree + */ + void enterVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#variableDeclaratorId}. + * @param ctx the parse tree + */ + void exitVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#primary}. + * @param ctx the parse tree + */ + void enterPrimary(@NotNull Java8Parser.PrimaryContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#primary}. + * @param ctx the parse tree + */ + void exitPrimary(@NotNull Java8Parser.PrimaryContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#classCreatorRest}. + * @param ctx the parse tree + */ + void enterClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#classCreatorRest}. + * @param ctx the parse tree + */ + void exitClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#interfaceBodyDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#interfaceBodyDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeArguments}. + * @param ctx the parse tree + */ + void enterTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeArguments}. + * @param ctx the parse tree + */ + void exitTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationName}. + * @param ctx the parse tree + */ + void enterAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationName}. + * @param ctx the parse tree + */ + void exitAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#finallyBlock}. + * @param ctx the parse tree + */ + void enterFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#finallyBlock}. + * @param ctx the parse tree + */ + void exitFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeParameters}. + * @param ctx the parse tree + */ + void enterTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeParameters}. + * @param ctx the parse tree + */ + void exitTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#lastFormalParameter}. + * @param ctx the parse tree + */ + void enterLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#lastFormalParameter}. + * @param ctx the parse tree + */ + void exitLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#constructorBody}. + * @param ctx the parse tree + */ + void enterConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#constructorBody}. + * @param ctx the parse tree + */ + void exitConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#literal}. + * @param ctx the parse tree + */ + void enterLiteral(@NotNull Java8Parser.LiteralContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#literal}. + * @param ctx the parse tree + */ + void exitLiteral(@NotNull Java8Parser.LiteralContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationMethodOrConstantRest}. + * @param ctx the parse tree + */ + void enterAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationMethodOrConstantRest}. + * @param ctx the parse tree + */ + void exitAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#catchClause}. + * @param ctx the parse tree + */ + void enterCatchClause(@NotNull Java8Parser.CatchClauseContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#catchClause}. + * @param ctx the parse tree + */ + void exitCatchClause(@NotNull Java8Parser.CatchClauseContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#variableDeclarator}. + * @param ctx the parse tree + */ + void enterVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#variableDeclarator}. + * @param ctx the parse tree + */ + void exitVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeList}. + * @param ctx the parse tree + */ + void enterTypeList(@NotNull Java8Parser.TypeListContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeList}. + * @param ctx the parse tree + */ + void exitTypeList(@NotNull Java8Parser.TypeListContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#enumConstants}. + * @param ctx the parse tree + */ + void enterEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#enumConstants}. + * @param ctx the parse tree + */ + void exitEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#classBody}. + * @param ctx the parse tree + */ + void enterClassBody(@NotNull Java8Parser.ClassBodyContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#classBody}. + * @param ctx the parse tree + */ + void exitClassBody(@NotNull Java8Parser.ClassBodyContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#createdName}. + * @param ctx the parse tree + */ + void enterCreatedName(@NotNull Java8Parser.CreatedNameContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#createdName}. + * @param ctx the parse tree + */ + void exitCreatedName(@NotNull Java8Parser.CreatedNameContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#enumDeclaration}. + * @param ctx the parse tree + */ + void enterEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#enumDeclaration}. + * @param ctx the parse tree + */ + void exitEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#formalParameter}. + * @param ctx the parse tree + */ + void enterFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#formalParameter}. + * @param ctx the parse tree + */ + void exitFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#parExpression}. + * @param ctx the parse tree + */ + void enterParExpression(@NotNull Java8Parser.ParExpressionContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#parExpression}. + * @param ctx the parse tree + */ + void exitParExpression(@NotNull Java8Parser.ParExpressionContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotation}. + * @param ctx the parse tree + */ + void enterAnnotation(@NotNull Java8Parser.AnnotationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotation}. + * @param ctx the parse tree + */ + void exitAnnotation(@NotNull Java8Parser.AnnotationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#variableInitializer}. + * @param ctx the parse tree + */ + void enterVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#variableInitializer}. + * @param ctx the parse tree + */ + void exitVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#elementValueArrayInitializer}. + * @param ctx the parse tree + */ + void enterElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#elementValueArrayInitializer}. + * @param ctx the parse tree + */ + void exitElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#creator}. + * @param ctx the parse tree + */ + void enterCreator(@NotNull Java8Parser.CreatorContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#creator}. + * @param ctx the parse tree + */ + void exitCreator(@NotNull Java8Parser.CreatorContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#arrayCreatorRest}. + * @param ctx the parse tree + */ + void enterArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#arrayCreatorRest}. + * @param ctx the parse tree + */ + void exitArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#expression}. + * @param ctx the parse tree + */ + void enterExpression(@NotNull Java8Parser.ExpressionContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#expression}. + * @param ctx the parse tree + */ + void exitExpression(@NotNull Java8Parser.ExpressionContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#constantExpression}. + * @param ctx the parse tree + */ + void enterConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#constantExpression}. + * @param ctx the parse tree + */ + void exitConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#qualifiedNameList}. + * @param ctx the parse tree + */ + void enterQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#qualifiedNameList}. + * @param ctx the parse tree + */ + void exitQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#constructorDeclaration}. + * @param ctx the parse tree + */ + void enterConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#constructorDeclaration}. + * @param ctx the parse tree + */ + void exitConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#forControl}. + * @param ctx the parse tree + */ + void enterForControl(@NotNull Java8Parser.ForControlContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#forControl}. + * @param ctx the parse tree + */ + void exitForControl(@NotNull Java8Parser.ForControlContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#superSuffix}. + * @param ctx the parse tree + */ + void enterSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#superSuffix}. + * @param ctx the parse tree + */ + void exitSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#variableDeclarators}. + * @param ctx the parse tree + */ + void enterVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#variableDeclarators}. + * @param ctx the parse tree + */ + void exitVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#catchType}. + * @param ctx the parse tree + */ + void enterCatchType(@NotNull Java8Parser.CatchTypeContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#catchType}. + * @param ctx the parse tree + */ + void exitCatchType(@NotNull Java8Parser.CatchTypeContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#classOrInterfaceModifier}. + * @param ctx the parse tree + */ + void enterClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#classOrInterfaceModifier}. + * @param ctx the parse tree + */ + void exitClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#enumConstantName}. + * @param ctx the parse tree + */ + void enterEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#enumConstantName}. + * @param ctx the parse tree + */ + void exitEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#modifier}. + * @param ctx the parse tree + */ + void enterModifier(@NotNull Java8Parser.ModifierContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#modifier}. + * @param ctx the parse tree + */ + void exitModifier(@NotNull Java8Parser.ModifierContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#innerCreator}. + * @param ctx the parse tree + */ + void enterInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#innerCreator}. + * @param ctx the parse tree + */ + void exitInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#explicitGenericInvocationSuffix}. + * @param ctx the parse tree + */ + void enterExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#explicitGenericInvocationSuffix}. + * @param ctx the parse tree + */ + void exitExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#variableModifier}. + * @param ctx the parse tree + */ + void enterVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#variableModifier}. + * @param ctx the parse tree + */ + void exitVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#elementValuePair}. + * @param ctx the parse tree + */ + void enterElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#elementValuePair}. + * @param ctx the parse tree + */ + void exitElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#arrayInitializer}. + * @param ctx the parse tree + */ + void enterArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#arrayInitializer}. + * @param ctx the parse tree + */ + void exitArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#elementValue}. + * @param ctx the parse tree + */ + void enterElementValue(@NotNull Java8Parser.ElementValueContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#elementValue}. + * @param ctx the parse tree + */ + void exitElementValue(@NotNull Java8Parser.ElementValueContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#constDeclaration}. + * @param ctx the parse tree + */ + void enterConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#constDeclaration}. + * @param ctx the parse tree + */ + void exitConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#resource}. + * @param ctx the parse tree + */ + void enterResource(@NotNull Java8Parser.ResourceContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#resource}. + * @param ctx the parse tree + */ + void exitResource(@NotNull Java8Parser.ResourceContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#qualifiedName}. + * @param ctx the parse tree + */ + void enterQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#qualifiedName}. + * @param ctx the parse tree + */ + void exitQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#resourceSpecification}. + * @param ctx the parse tree + */ + void enterResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#resourceSpecification}. + * @param ctx the parse tree + */ + void exitResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#formalParameterList}. + * @param ctx the parse tree + */ + void enterFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#formalParameterList}. + * @param ctx the parse tree + */ + void exitFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationTypeDeclaration}. + * @param ctx the parse tree + */ + void enterAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationTypeDeclaration}. + * @param ctx the parse tree + */ + void exitAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#compilationUnit}. + * @param ctx the parse tree + */ + void enterCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#compilationUnit}. + * @param ctx the parse tree + */ + void exitCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationMethodRest}. + * @param ctx the parse tree + */ + void enterAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationMethodRest}. + * @param ctx the parse tree + */ + void exitAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#switchBlockStatementGroup}. + * @param ctx the parse tree + */ + void enterSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#switchBlockStatementGroup}. + * @param ctx the parse tree + */ + void exitSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeParameter}. + * @param ctx the parse tree + */ + void enterTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeParameter}. + * @param ctx the parse tree + */ + void exitTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#interfaceBody}. + * @param ctx the parse tree + */ + void enterInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#interfaceBody}. + * @param ctx the parse tree + */ + void exitInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#methodDeclaration}. + * @param ctx the parse tree + */ + void enterMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#methodDeclaration}. + * @param ctx the parse tree + */ + void exitMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#methodBody}. + * @param ctx the parse tree + */ + void enterMethodBody(@NotNull Java8Parser.MethodBodyContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#methodBody}. + * @param ctx the parse tree + */ + void exitMethodBody(@NotNull Java8Parser.MethodBodyContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeArgument}. + * @param ctx the parse tree + */ + void enterTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeArgument}. + * @param ctx the parse tree + */ + void exitTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeDeclaration}. + * @param ctx the parse tree + */ + void enterTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeDeclaration}. + * @param ctx the parse tree + */ + void exitTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#genericConstructorDeclaration}. + * @param ctx the parse tree + */ + void enterGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#genericConstructorDeclaration}. + * @param ctx the parse tree + */ + void exitGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#classDeclaration}. + * @param ctx the parse tree + */ + void enterClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#classDeclaration}. + * @param ctx the parse tree + */ + void exitClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#enumConstant}. + * @param ctx the parse tree + */ + void enterEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#enumConstant}. + * @param ctx the parse tree + */ + void exitEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#statement}. + * @param ctx the parse tree + */ + void enterStatement(@NotNull Java8Parser.StatementContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#statement}. + * @param ctx the parse tree + */ + void exitStatement(@NotNull Java8Parser.StatementContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#importDeclaration}. + * @param ctx the parse tree + */ + void enterImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#importDeclaration}. + * @param ctx the parse tree + */ + void exitImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#primitiveType}. + * @param ctx the parse tree + */ + void enterPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#primitiveType}. + * @param ctx the parse tree + */ + void exitPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#interfaceDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#interfaceDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#localVariableDeclarationStatement}. + * @param ctx the parse tree + */ + void enterLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#localVariableDeclarationStatement}. + * @param ctx the parse tree + */ + void exitLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#blockStatement}. + * @param ctx the parse tree + */ + void enterBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#blockStatement}. + * @param ctx the parse tree + */ + void exitBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#fieldDeclaration}. + * @param ctx the parse tree + */ + void enterFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#fieldDeclaration}. + * @param ctx the parse tree + */ + void exitFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#constantDeclarator}. + * @param ctx the parse tree + */ + void enterConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#constantDeclarator}. + * @param ctx the parse tree + */ + void exitConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#resources}. + * @param ctx the parse tree + */ + void enterResources(@NotNull Java8Parser.ResourcesContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#resources}. + * @param ctx the parse tree + */ + void exitResources(@NotNull Java8Parser.ResourcesContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#statementExpression}. + * @param ctx the parse tree + */ + void enterStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#statementExpression}. + * @param ctx the parse tree + */ + void exitStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#interfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#interfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#packageDeclaration}. + * @param ctx the parse tree + */ + void enterPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#packageDeclaration}. + * @param ctx the parse tree + */ + void exitPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#elementValuePairs}. + * @param ctx the parse tree + */ + void enterElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#elementValuePairs}. + * @param ctx the parse tree + */ + void exitElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#localVariableDeclaration}. + * @param ctx the parse tree + */ + void enterLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#localVariableDeclaration}. + * @param ctx the parse tree + */ + void exitLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#nonWildcardTypeArguments}. + * @param ctx the parse tree + */ + void enterNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#nonWildcardTypeArguments}. + * @param ctx the parse tree + */ + void exitNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#interfaceMemberDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#interfaceMemberDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#switchLabel}. + * @param ctx the parse tree + */ + void enterSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#switchLabel}. + * @param ctx the parse tree + */ + void exitSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#forInit}. + * @param ctx the parse tree + */ + void enterForInit(@NotNull Java8Parser.ForInitContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#forInit}. + * @param ctx the parse tree + */ + void exitForInit(@NotNull Java8Parser.ForInitContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#formalParameters}. + * @param ctx the parse tree + */ + void enterFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#formalParameters}. + * @param ctx the parse tree + */ + void exitFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#arguments}. + * @param ctx the parse tree + */ + void enterArguments(@NotNull Java8Parser.ArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#arguments}. + * @param ctx the parse tree + */ + void exitArguments(@NotNull Java8Parser.ArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#genericMethodDeclaration}. + * @param ctx the parse tree + */ + void enterGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#genericMethodDeclaration}. + * @param ctx the parse tree + */ + void exitGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void enterTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void exitTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx); +} \ No newline at end of file diff --git a/antlr/Java8Parser.java b/antlr/Java8Parser.java new file mode 100644 index 000000000..05d33ff9b --- /dev/null +++ b/antlr/Java8Parser.java @@ -0,0 +1,7392 @@ +// Generated from Java8.g4 by ANTLR 4.4 +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.misc.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; +import java.util.Iterator; +import java.util.ArrayList; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class Java8Parser extends Parser { + static { RuntimeMetaData.checkVersion("4.4", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + ABSTRACT=1, ASSERT=2, BOOLEAN=3, BREAK=4, BYTE=5, CASE=6, CATCH=7, CHAR=8, + CLASS=9, CONST=10, CONTINUE=11, DEFAULT=12, DO=13, DOUBLE=14, ELSE=15, + ENUM=16, EXTENDS=17, FINAL=18, FINALLY=19, FLOAT=20, FOR=21, IF=22, GOTO=23, + IMPLEMENTS=24, IMPORT=25, INSTANCEOF=26, INT=27, INTERFACE=28, LONG=29, + NATIVE=30, NEW=31, PACKAGE=32, PRIVATE=33, PROTECTED=34, PUBLIC=35, RETURN=36, + SHORT=37, STATIC=38, STRICTFP=39, SUPER=40, SWITCH=41, SYNCHRONIZED=42, + THIS=43, THROW=44, THROWS=45, TRANSIENT=46, TRY=47, VOID=48, VOLATILE=49, + WHILE=50, IntegerLiteral=51, FloatingPointLiteral=52, BooleanLiteral=53, + CharacterLiteral=54, StringLiteral=55, NullLiteral=56, LPAREN=57, RPAREN=58, + LBRACE=59, RBRACE=60, LBRACK=61, RBRACK=62, SEMI=63, COMMA=64, DOT=65, + ASSIGN=66, GT=67, LT=68, BANG=69, TILDE=70, QUESTION=71, COLON=72, EQUAL=73, + LE=74, GE=75, NOTEQUAL=76, AND=77, OR=78, INC=79, DEC=80, ADD=81, SUB=82, + MUL=83, DIV=84, BITAND=85, BITOR=86, CARET=87, MOD=88, ADD_ASSIGN=89, + SUB_ASSIGN=90, MUL_ASSIGN=91, DIV_ASSIGN=92, AND_ASSIGN=93, OR_ASSIGN=94, + XOR_ASSIGN=95, MOD_ASSIGN=96, LSHIFT_ASSIGN=97, RSHIFT_ASSIGN=98, URSHIFT_ASSIGN=99, + Identifier=100, AT=101, ELLIPSIS=102, WS=103, COMMENT=104, LINE_COMMENT=105; + public static final String[] tokenNames = { + "", "'abstract'", "'assert'", "'boolean'", "'break'", "'byte'", + "'case'", "'catch'", "'char'", "'class'", "'const'", "'continue'", "'default'", + "'do'", "'double'", "'else'", "'enum'", "'extends'", "'final'", "'finally'", + "'float'", "'for'", "'if'", "'goto'", "'implements'", "'import'", "'instanceof'", + "'int'", "'interface'", "'long'", "'native'", "'new'", "'package'", "'private'", + "'protected'", "'public'", "'return'", "'short'", "'static'", "'strictfp'", + "'super'", "'switch'", "'synchronized'", "'this'", "'throw'", "'throws'", + "'transient'", "'try'", "'void'", "'volatile'", "'while'", "IntegerLiteral", + "FloatingPointLiteral", "BooleanLiteral", "CharacterLiteral", "StringLiteral", + "'null'", "'('", "')'", "'{'", "'}'", "'['", "']'", "';'", "','", "'.'", + "'='", "'>'", "'<'", "'!'", "'~'", "'?'", "':'", "'=='", "'<='", "'>='", + "'!='", "'&&'", "'||'", "'++'", "'--'", "'+'", "'-'", "'*'", "'/'", "'&'", + "'|'", "'^'", "'%'", "'+='", "'-='", "'*='", "'/='", "'&='", "'|='", "'^='", + "'%='", "'<<='", "'>>='", "'>>>='", "Identifier", "'@'", "'...'", "WS", + "COMMENT", "LINE_COMMENT" + }; + public static final int + RULE_compilationUnit = 0, RULE_packageDeclaration = 1, RULE_importDeclaration = 2, + RULE_typeDeclaration = 3, RULE_modifier = 4, RULE_classOrInterfaceModifier = 5, + RULE_variableModifier = 6, RULE_classDeclaration = 7, RULE_typeParameters = 8, + RULE_typeParameter = 9, RULE_typeBound = 10, RULE_enumDeclaration = 11, + RULE_enumConstants = 12, RULE_enumConstant = 13, RULE_enumBodyDeclarations = 14, + RULE_interfaceDeclaration = 15, RULE_typeList = 16, RULE_classBody = 17, + RULE_interfaceBody = 18, RULE_classBodyDeclaration = 19, RULE_memberDeclaration = 20, + RULE_methodDeclaration = 21, RULE_genericMethodDeclaration = 22, RULE_constructorDeclaration = 23, + RULE_genericConstructorDeclaration = 24, RULE_fieldDeclaration = 25, RULE_interfaceBodyDeclaration = 26, + RULE_interfaceMemberDeclaration = 27, RULE_constDeclaration = 28, RULE_constantDeclarator = 29, + RULE_interfaceMethodDeclaration = 30, RULE_genericInterfaceMethodDeclaration = 31, + RULE_variableDeclarators = 32, RULE_variableDeclarator = 33, RULE_variableDeclaratorId = 34, + RULE_variableInitializer = 35, RULE_arrayInitializer = 36, RULE_enumConstantName = 37, + RULE_type = 38, RULE_classOrInterfaceType = 39, RULE_primitiveType = 40, + RULE_typeArguments = 41, RULE_typeArgument = 42, RULE_qualifiedNameList = 43, + RULE_formalParameters = 44, RULE_formalParameterList = 45, RULE_formalParameter = 46, + RULE_lastFormalParameter = 47, RULE_methodBody = 48, RULE_constructorBody = 49, + RULE_qualifiedName = 50, RULE_literal = 51, RULE_annotation = 52, RULE_annotationName = 53, + RULE_elementValuePairs = 54, RULE_elementValuePair = 55, RULE_elementValue = 56, + RULE_elementValueArrayInitializer = 57, RULE_annotationTypeDeclaration = 58, + RULE_annotationTypeBody = 59, RULE_annotationTypeElementDeclaration = 60, + RULE_annotationTypeElementRest = 61, RULE_annotationMethodOrConstantRest = 62, + RULE_annotationMethodRest = 63, RULE_annotationConstantRest = 64, RULE_defaultValue = 65, + RULE_block = 66, RULE_blockStatement = 67, RULE_localVariableDeclarationStatement = 68, + RULE_localVariableDeclaration = 69, RULE_statement = 70, RULE_catchClause = 71, + RULE_catchType = 72, RULE_finallyBlock = 73, RULE_resourceSpecification = 74, + RULE_resources = 75, RULE_resource = 76, RULE_switchBlockStatementGroup = 77, + RULE_switchLabel = 78, RULE_forControl = 79, RULE_forInit = 80, RULE_enhancedForControl = 81, + RULE_forUpdate = 82, RULE_parExpression = 83, RULE_expressionList = 84, + RULE_statementExpression = 85, RULE_constantExpression = 86, RULE_expression = 87, + RULE_primary = 88, RULE_creator = 89, RULE_createdName = 90, RULE_innerCreator = 91, + RULE_arrayCreatorRest = 92, RULE_classCreatorRest = 93, RULE_explicitGenericInvocation = 94, + RULE_nonWildcardTypeArguments = 95, RULE_typeArgumentsOrDiamond = 96, + RULE_nonWildcardTypeArgumentsOrDiamond = 97, RULE_superSuffix = 98, RULE_explicitGenericInvocationSuffix = 99, + RULE_arguments = 100; + public static final String[] ruleNames = { + "compilationUnit", "packageDeclaration", "importDeclaration", "typeDeclaration", + "modifier", "classOrInterfaceModifier", "variableModifier", "classDeclaration", + "typeParameters", "typeParameter", "typeBound", "enumDeclaration", "enumConstants", + "enumConstant", "enumBodyDeclarations", "interfaceDeclaration", "typeList", + "classBody", "interfaceBody", "classBodyDeclaration", "memberDeclaration", + "methodDeclaration", "genericMethodDeclaration", "constructorDeclaration", + "genericConstructorDeclaration", "fieldDeclaration", "interfaceBodyDeclaration", + "interfaceMemberDeclaration", "constDeclaration", "constantDeclarator", + "interfaceMethodDeclaration", "genericInterfaceMethodDeclaration", "variableDeclarators", + "variableDeclarator", "variableDeclaratorId", "variableInitializer", "arrayInitializer", + "enumConstantName", "type", "classOrInterfaceType", "primitiveType", "typeArguments", + "typeArgument", "qualifiedNameList", "formalParameters", "formalParameterList", + "formalParameter", "lastFormalParameter", "methodBody", "constructorBody", + "qualifiedName", "literal", "annotation", "annotationName", "elementValuePairs", + "elementValuePair", "elementValue", "elementValueArrayInitializer", "annotationTypeDeclaration", + "annotationTypeBody", "annotationTypeElementDeclaration", "annotationTypeElementRest", + "annotationMethodOrConstantRest", "annotationMethodRest", "annotationConstantRest", + "defaultValue", "block", "blockStatement", "localVariableDeclarationStatement", + "localVariableDeclaration", "statement", "catchClause", "catchType", "finallyBlock", + "resourceSpecification", "resources", "resource", "switchBlockStatementGroup", + "switchLabel", "forControl", "forInit", "enhancedForControl", "forUpdate", + "parExpression", "expressionList", "statementExpression", "constantExpression", + "expression", "primary", "creator", "createdName", "innerCreator", "arrayCreatorRest", + "classCreatorRest", "explicitGenericInvocation", "nonWildcardTypeArguments", + "typeArgumentsOrDiamond", "nonWildcardTypeArgumentsOrDiamond", "superSuffix", + "explicitGenericInvocationSuffix", "arguments" + }; + + @Override + public String getGrammarFileName() { return "Java8.g4"; } + + @Override + public String[] getTokenNames() { return tokenNames; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public Java8Parser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + public static class CompilationUnitContext extends ParserRuleContext { + public TypeDeclarationContext typeDeclaration(int i) { + return getRuleContext(TypeDeclarationContext.class,i); + } + public ImportDeclarationContext importDeclaration(int i) { + return getRuleContext(ImportDeclarationContext.class,i); + } + public List importDeclaration() { + return getRuleContexts(ImportDeclarationContext.class); + } + public TerminalNode EOF() { return getToken(Java8Parser.EOF, 0); } + public PackageDeclarationContext packageDeclaration() { + return getRuleContext(PackageDeclarationContext.class,0); + } + public List typeDeclaration() { + return getRuleContexts(TypeDeclarationContext.class); + } + public CompilationUnitContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_compilationUnit; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitCompilationUnit(this); + else return visitor.visitChildren(this); + } + } + + public final CompilationUnitContext compilationUnit() throws RecognitionException { + CompilationUnitContext _localctx = new CompilationUnitContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_compilationUnit); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(203); + switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) { + case 1: + { + setState(202); packageDeclaration(); + } + break; + } + setState(208); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==IMPORT) { + { + { + setState(205); importDeclaration(); + } + } + setState(210); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(214); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << CLASS) | (1L << ENUM) | (1L << FINAL) | (1L << INTERFACE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP) | (1L << SEMI))) != 0) || _la==AT) { + { + { + setState(211); typeDeclaration(); + } + } + setState(216); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(217); match(EOF); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PackageDeclarationContext extends ParserRuleContext { + public List annotation() { + return getRuleContexts(AnnotationContext.class); + } + public QualifiedNameContext qualifiedName() { + return getRuleContext(QualifiedNameContext.class,0); + } + public AnnotationContext annotation(int i) { + return getRuleContext(AnnotationContext.class,i); + } + public PackageDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_packageDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitPackageDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final PackageDeclarationContext packageDeclaration() throws RecognitionException { + PackageDeclarationContext _localctx = new PackageDeclarationContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_packageDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(222); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==AT) { + { + { + setState(219); annotation(); + } + } + setState(224); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(225); match(PACKAGE); + setState(226); qualifiedName(); + setState(227); match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImportDeclarationContext extends ParserRuleContext { + public QualifiedNameContext qualifiedName() { + return getRuleContext(QualifiedNameContext.class,0); + } + public ImportDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_importDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitImportDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final ImportDeclarationContext importDeclaration() throws RecognitionException { + ImportDeclarationContext _localctx = new ImportDeclarationContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_importDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(229); match(IMPORT); + setState(231); + _la = _input.LA(1); + if (_la==STATIC) { + { + setState(230); match(STATIC); + } + } + + setState(233); qualifiedName(); + setState(236); + _la = _input.LA(1); + if (_la==DOT) { + { + setState(234); match(DOT); + setState(235); match(MUL); + } + } + + setState(238); match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeDeclarationContext extends ParserRuleContext { + public ClassOrInterfaceModifierContext classOrInterfaceModifier(int i) { + return getRuleContext(ClassOrInterfaceModifierContext.class,i); + } + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public List classOrInterfaceModifier() { + return getRuleContexts(ClassOrInterfaceModifierContext.class); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public TypeDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitTypeDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final TypeDeclarationContext typeDeclaration() throws RecognitionException { + TypeDeclarationContext _localctx = new TypeDeclarationContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_typeDeclaration); + int _la; + try { + int _alt; + setState(269); + switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(243); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==AT) { + { + { + setState(240); classOrInterfaceModifier(); + } + } + setState(245); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(246); classDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(250); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==AT) { + { + { + setState(247); classOrInterfaceModifier(); + } + } + setState(252); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(253); enumDeclaration(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(257); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==AT) { + { + { + setState(254); classOrInterfaceModifier(); + } + } + setState(259); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(260); interfaceDeclaration(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(264); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,9,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(261); classOrInterfaceModifier(); + } + } + } + setState(266); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,9,_ctx); + } + setState(267); annotationTypeDeclaration(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(268); match(SEMI); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ModifierContext extends ParserRuleContext { + public ClassOrInterfaceModifierContext classOrInterfaceModifier() { + return getRuleContext(ClassOrInterfaceModifierContext.class,0); + } + public ModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_modifier; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitModifier(this); + else return visitor.visitChildren(this); + } + } + + public final ModifierContext modifier() throws RecognitionException { + ModifierContext _localctx = new ModifierContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_modifier); + int _la; + try { + setState(273); + switch (_input.LA(1)) { + case ABSTRACT: + case FINAL: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case STATIC: + case STRICTFP: + case AT: + enterOuterAlt(_localctx, 1); + { + setState(271); classOrInterfaceModifier(); + } + break; + case NATIVE: + case SYNCHRONIZED: + case TRANSIENT: + case VOLATILE: + enterOuterAlt(_localctx, 2); + { + setState(272); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NATIVE) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOLATILE))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassOrInterfaceModifierContext extends ParserRuleContext { + public AnnotationContext annotation() { + return getRuleContext(AnnotationContext.class,0); + } + public ClassOrInterfaceModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classOrInterfaceModifier; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitClassOrInterfaceModifier(this); + else return visitor.visitChildren(this); + } + } + + public final ClassOrInterfaceModifierContext classOrInterfaceModifier() throws RecognitionException { + ClassOrInterfaceModifierContext _localctx = new ClassOrInterfaceModifierContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_classOrInterfaceModifier); + int _la; + try { + setState(277); + switch (_input.LA(1)) { + case AT: + enterOuterAlt(_localctx, 1); + { + setState(275); annotation(); + } + break; + case ABSTRACT: + case FINAL: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case STATIC: + case STRICTFP: + enterOuterAlt(_localctx, 2); + { + setState(276); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableModifierContext extends ParserRuleContext { + public AnnotationContext annotation() { + return getRuleContext(AnnotationContext.class,0); + } + public VariableModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableModifier; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitVariableModifier(this); + else return visitor.visitChildren(this); + } + } + + public final VariableModifierContext variableModifier() throws RecognitionException { + VariableModifierContext _localctx = new VariableModifierContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_variableModifier); + try { + setState(281); + switch (_input.LA(1)) { + case FINAL: + enterOuterAlt(_localctx, 1); + { + setState(279); match(FINAL); + } + break; + case AT: + enterOuterAlt(_localctx, 2); + { + setState(280); annotation(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public TypeListContext typeList() { + return getRuleContext(TypeListContext.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public ClassDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitClassDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final ClassDeclarationContext classDeclaration() throws RecognitionException { + ClassDeclarationContext _localctx = new ClassDeclarationContext(_ctx, getState()); + enterRule(_localctx, 14, RULE_classDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(283); match(CLASS); + setState(284); match(Identifier); + setState(286); + _la = _input.LA(1); + if (_la==LT) { + { + setState(285); typeParameters(); + } + } + + setState(290); + _la = _input.LA(1); + if (_la==EXTENDS) { + { + setState(288); match(EXTENDS); + setState(289); type(); + } + } + + setState(294); + _la = _input.LA(1); + if (_la==IMPLEMENTS) { + { + setState(292); match(IMPLEMENTS); + setState(293); typeList(); + } + } + + setState(296); classBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeParametersContext extends ParserRuleContext { + public List typeParameter() { + return getRuleContexts(TypeParameterContext.class); + } + public TypeParameterContext typeParameter(int i) { + return getRuleContext(TypeParameterContext.class,i); + } + public TypeParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeParameters; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitTypeParameters(this); + else return visitor.visitChildren(this); + } + } + + public final TypeParametersContext typeParameters() throws RecognitionException { + TypeParametersContext _localctx = new TypeParametersContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_typeParameters); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(298); match(LT); + setState(299); typeParameter(); + setState(304); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(300); match(COMMA); + setState(301); typeParameter(); + } + } + setState(306); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(307); match(GT); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeParameterContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public TypeBoundContext typeBound() { + return getRuleContext(TypeBoundContext.class,0); + } + public TypeParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeParameter; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitTypeParameter(this); + else return visitor.visitChildren(this); + } + } + + public final TypeParameterContext typeParameter() throws RecognitionException { + TypeParameterContext _localctx = new TypeParameterContext(_ctx, getState()); + enterRule(_localctx, 18, RULE_typeParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(309); match(Identifier); + setState(312); + _la = _input.LA(1); + if (_la==EXTENDS) { + { + setState(310); match(EXTENDS); + setState(311); typeBound(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeBoundContext extends ParserRuleContext { + public TypeContext type(int i) { + return getRuleContext(TypeContext.class,i); + } + public List type() { + return getRuleContexts(TypeContext.class); + } + public TypeBoundContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeBound; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitTypeBound(this); + else return visitor.visitChildren(this); + } + } + + public final TypeBoundContext typeBound() throws RecognitionException { + TypeBoundContext _localctx = new TypeBoundContext(_ctx, getState()); + enterRule(_localctx, 20, RULE_typeBound); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(314); type(); + setState(319); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==BITAND) { + { + { + setState(315); match(BITAND); + setState(316); type(); + } + } + setState(321); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumDeclarationContext extends ParserRuleContext { + public EnumBodyDeclarationsContext enumBodyDeclarations() { + return getRuleContext(EnumBodyDeclarationsContext.class,0); + } + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public TypeListContext typeList() { + return getRuleContext(TypeListContext.class,0); + } + public TerminalNode ENUM() { return getToken(Java8Parser.ENUM, 0); } + public EnumConstantsContext enumConstants() { + return getRuleContext(EnumConstantsContext.class,0); + } + public EnumDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitEnumDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final EnumDeclarationContext enumDeclaration() throws RecognitionException { + EnumDeclarationContext _localctx = new EnumDeclarationContext(_ctx, getState()); + enterRule(_localctx, 22, RULE_enumDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(322); match(ENUM); + setState(323); match(Identifier); + setState(326); + _la = _input.LA(1); + if (_la==IMPLEMENTS) { + { + setState(324); match(IMPLEMENTS); + setState(325); typeList(); + } + } + + setState(328); match(LBRACE); + setState(330); + _la = _input.LA(1); + if (_la==Identifier || _la==AT) { + { + setState(329); enumConstants(); + } + } + + setState(333); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(332); match(COMMA); + } + } + + setState(336); + _la = _input.LA(1); + if (_la==SEMI) { + { + setState(335); enumBodyDeclarations(); + } + } + + setState(338); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumConstantsContext extends ParserRuleContext { + public List enumConstant() { + return getRuleContexts(EnumConstantContext.class); + } + public EnumConstantContext enumConstant(int i) { + return getRuleContext(EnumConstantContext.class,i); + } + public EnumConstantsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumConstants; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitEnumConstants(this); + else return visitor.visitChildren(this); + } + } + + public final EnumConstantsContext enumConstants() throws RecognitionException { + EnumConstantsContext _localctx = new EnumConstantsContext(_ctx, getState()); + enterRule(_localctx, 24, RULE_enumConstants); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(340); enumConstant(); + setState(345); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,24,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(341); match(COMMA); + setState(342); enumConstant(); + } + } + } + setState(347); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,24,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumConstantContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public List annotation() { + return getRuleContexts(AnnotationContext.class); + } + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public AnnotationContext annotation(int i) { + return getRuleContext(AnnotationContext.class,i); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public EnumConstantContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumConstant; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitEnumConstant(this); + else return visitor.visitChildren(this); + } + } + + public final EnumConstantContext enumConstant() throws RecognitionException { + EnumConstantContext _localctx = new EnumConstantContext(_ctx, getState()); + enterRule(_localctx, 26, RULE_enumConstant); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(351); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==AT) { + { + { + setState(348); annotation(); + } + } + setState(353); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(354); match(Identifier); + setState(356); + _la = _input.LA(1); + if (_la==LPAREN) { + { + setState(355); arguments(); + } + } + + setState(359); + _la = _input.LA(1); + if (_la==LBRACE) { + { + setState(358); classBody(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumBodyDeclarationsContext extends ParserRuleContext { + public List classBodyDeclaration() { + return getRuleContexts(ClassBodyDeclarationContext.class); + } + public ClassBodyDeclarationContext classBodyDeclaration(int i) { + return getRuleContext(ClassBodyDeclarationContext.class,i); + } + public EnumBodyDeclarationsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumBodyDeclarations; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitEnumBodyDeclarations(this); + else return visitor.visitChildren(this); + } + } + + public final EnumBodyDeclarationsContext enumBodyDeclarations() throws RecognitionException { + EnumBodyDeclarationsContext _localctx = new EnumBodyDeclarationsContext(_ctx, getState()); + enterRule(_localctx, 28, RULE_enumBodyDeclarations); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(361); match(SEMI); + setState(365); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOID) | (1L << VOLATILE) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + { + setState(362); classBodyDeclaration(); + } + } + setState(367); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public InterfaceBodyContext interfaceBody() { + return getRuleContext(InterfaceBodyContext.class,0); + } + public TypeListContext typeList() { + return getRuleContext(TypeListContext.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public InterfaceDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitInterfaceDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final InterfaceDeclarationContext interfaceDeclaration() throws RecognitionException { + InterfaceDeclarationContext _localctx = new InterfaceDeclarationContext(_ctx, getState()); + enterRule(_localctx, 30, RULE_interfaceDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(368); match(INTERFACE); + setState(369); match(Identifier); + setState(371); + _la = _input.LA(1); + if (_la==LT) { + { + setState(370); typeParameters(); + } + } + + setState(375); + _la = _input.LA(1); + if (_la==EXTENDS) { + { + setState(373); match(EXTENDS); + setState(374); typeList(); + } + } + + setState(377); interfaceBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeListContext extends ParserRuleContext { + public TypeContext type(int i) { + return getRuleContext(TypeContext.class,i); + } + public List type() { + return getRuleContexts(TypeContext.class); + } + public TypeListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeList; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitTypeList(this); + else return visitor.visitChildren(this); + } + } + + public final TypeListContext typeList() throws RecognitionException { + TypeListContext _localctx = new TypeListContext(_ctx, getState()); + enterRule(_localctx, 32, RULE_typeList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(379); type(); + setState(384); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(380); match(COMMA); + setState(381); type(); + } + } + setState(386); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassBodyContext extends ParserRuleContext { + public List classBodyDeclaration() { + return getRuleContexts(ClassBodyDeclarationContext.class); + } + public ClassBodyDeclarationContext classBodyDeclaration(int i) { + return getRuleContext(ClassBodyDeclarationContext.class,i); + } + public ClassBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classBody; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitClassBody(this); + else return visitor.visitChildren(this); + } + } + + public final ClassBodyContext classBody() throws RecognitionException { + ClassBodyContext _localctx = new ClassBodyContext(_ctx, getState()); + enterRule(_localctx, 34, RULE_classBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(387); match(LBRACE); + setState(391); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOID) | (1L << VOLATILE) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + { + setState(388); classBodyDeclaration(); + } + } + setState(393); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(394); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceBodyContext extends ParserRuleContext { + public List interfaceBodyDeclaration() { + return getRuleContexts(InterfaceBodyDeclarationContext.class); + } + public InterfaceBodyDeclarationContext interfaceBodyDeclaration(int i) { + return getRuleContext(InterfaceBodyDeclarationContext.class,i); + } + public InterfaceBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceBody; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitInterfaceBody(this); + else return visitor.visitChildren(this); + } + } + + public final InterfaceBodyContext interfaceBody() throws RecognitionException { + InterfaceBodyContext _localctx = new InterfaceBodyContext(_ctx, getState()); + enterRule(_localctx, 36, RULE_interfaceBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(396); match(LBRACE); + setState(400); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOID) | (1L << VOLATILE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + { + setState(397); interfaceBodyDeclaration(); + } + } + setState(402); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(403); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassBodyDeclarationContext extends ParserRuleContext { + public List modifier() { + return getRuleContexts(ModifierContext.class); + } + public MemberDeclarationContext memberDeclaration() { + return getRuleContext(MemberDeclarationContext.class,0); + } + public ModifierContext modifier(int i) { + return getRuleContext(ModifierContext.class,i); + } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public ClassBodyDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classBodyDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitClassBodyDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final ClassBodyDeclarationContext classBodyDeclaration() throws RecognitionException { + ClassBodyDeclarationContext _localctx = new ClassBodyDeclarationContext(_ctx, getState()); + enterRule(_localctx, 38, RULE_classBodyDeclaration); + int _la; + try { + int _alt; + setState(417); + switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(405); match(SEMI); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(407); + _la = _input.LA(1); + if (_la==STATIC) { + { + setState(406); match(STATIC); + } + } + + setState(409); block(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(413); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(410); modifier(); + } + } + } + setState(415); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); + } + setState(416); memberDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MemberDeclarationContext extends ParserRuleContext { + public GenericMethodDeclarationContext genericMethodDeclaration() { + return getRuleContext(GenericMethodDeclarationContext.class,0); + } + public MethodDeclarationContext methodDeclaration() { + return getRuleContext(MethodDeclarationContext.class,0); + } + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public GenericConstructorDeclarationContext genericConstructorDeclaration() { + return getRuleContext(GenericConstructorDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public ConstructorDeclarationContext constructorDeclaration() { + return getRuleContext(ConstructorDeclarationContext.class,0); + } + public FieldDeclarationContext fieldDeclaration() { + return getRuleContext(FieldDeclarationContext.class,0); + } + public MemberDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_memberDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitMemberDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final MemberDeclarationContext memberDeclaration() throws RecognitionException { + MemberDeclarationContext _localctx = new MemberDeclarationContext(_ctx, getState()); + enterRule(_localctx, 40, RULE_memberDeclaration); + try { + setState(428); + switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(419); methodDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(420); genericMethodDeclaration(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(421); fieldDeclaration(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(422); constructorDeclaration(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(423); genericConstructorDeclaration(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(424); interfaceDeclaration(); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(425); annotationTypeDeclaration(); + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(426); classDeclaration(); + } + break; + case 9: + enterOuterAlt(_localctx, 9); + { + setState(427); enumDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MethodDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public MethodBodyContext methodBody() { + return getRuleContext(MethodBodyContext.class,0); + } + public QualifiedNameListContext qualifiedNameList() { + return getRuleContext(QualifiedNameListContext.class,0); + } + public FormalParametersContext formalParameters() { + return getRuleContext(FormalParametersContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public MethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_methodDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitMethodDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final MethodDeclarationContext methodDeclaration() throws RecognitionException { + MethodDeclarationContext _localctx = new MethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 42, RULE_methodDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(432); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + { + setState(430); type(); + } + break; + case VOID: + { + setState(431); match(VOID); + } + break; + default: + throw new NoViableAltException(this); + } + setState(434); match(Identifier); + setState(435); formalParameters(); + setState(440); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(436); match(LBRACK); + setState(437); match(RBRACK); + } + } + setState(442); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(445); + _la = _input.LA(1); + if (_la==THROWS) { + { + setState(443); match(THROWS); + setState(444); qualifiedNameList(); + } + } + + setState(449); + switch (_input.LA(1)) { + case LBRACE: + { + setState(447); methodBody(); + } + break; + case SEMI: + { + setState(448); match(SEMI); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GenericMethodDeclarationContext extends ParserRuleContext { + public MethodDeclarationContext methodDeclaration() { + return getRuleContext(MethodDeclarationContext.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public GenericMethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_genericMethodDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitGenericMethodDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final GenericMethodDeclarationContext genericMethodDeclaration() throws RecognitionException { + GenericMethodDeclarationContext _localctx = new GenericMethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 44, RULE_genericMethodDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(451); typeParameters(); + setState(452); methodDeclaration(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstructorDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public ConstructorBodyContext constructorBody() { + return getRuleContext(ConstructorBodyContext.class,0); + } + public QualifiedNameListContext qualifiedNameList() { + return getRuleContext(QualifiedNameListContext.class,0); + } + public FormalParametersContext formalParameters() { + return getRuleContext(FormalParametersContext.class,0); + } + public ConstructorDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constructorDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitConstructorDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final ConstructorDeclarationContext constructorDeclaration() throws RecognitionException { + ConstructorDeclarationContext _localctx = new ConstructorDeclarationContext(_ctx, getState()); + enterRule(_localctx, 46, RULE_constructorDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(454); match(Identifier); + setState(455); formalParameters(); + setState(458); + _la = _input.LA(1); + if (_la==THROWS) { + { + setState(456); match(THROWS); + setState(457); qualifiedNameList(); + } + } + + setState(460); constructorBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GenericConstructorDeclarationContext extends ParserRuleContext { + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public ConstructorDeclarationContext constructorDeclaration() { + return getRuleContext(ConstructorDeclarationContext.class,0); + } + public GenericConstructorDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_genericConstructorDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitGenericConstructorDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final GenericConstructorDeclarationContext genericConstructorDeclaration() throws RecognitionException { + GenericConstructorDeclarationContext _localctx = new GenericConstructorDeclarationContext(_ctx, getState()); + enterRule(_localctx, 48, RULE_genericConstructorDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(462); typeParameters(); + setState(463); constructorDeclaration(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FieldDeclarationContext extends ParserRuleContext { + public VariableDeclaratorsContext variableDeclarators() { + return getRuleContext(VariableDeclaratorsContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public FieldDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_fieldDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitFieldDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final FieldDeclarationContext fieldDeclaration() throws RecognitionException { + FieldDeclarationContext _localctx = new FieldDeclarationContext(_ctx, getState()); + enterRule(_localctx, 50, RULE_fieldDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(465); type(); + setState(466); variableDeclarators(); + setState(467); match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceBodyDeclarationContext extends ParserRuleContext { + public List modifier() { + return getRuleContexts(ModifierContext.class); + } + public ModifierContext modifier(int i) { + return getRuleContext(ModifierContext.class,i); + } + public InterfaceMemberDeclarationContext interfaceMemberDeclaration() { + return getRuleContext(InterfaceMemberDeclarationContext.class,0); + } + public InterfaceBodyDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceBodyDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitInterfaceBodyDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final InterfaceBodyDeclarationContext interfaceBodyDeclaration() throws RecognitionException { + InterfaceBodyDeclarationContext _localctx = new InterfaceBodyDeclarationContext(_ctx, getState()); + enterRule(_localctx, 52, RULE_interfaceBodyDeclaration); + try { + int _alt; + setState(477); + switch (_input.LA(1)) { + case ABSTRACT: + case BOOLEAN: + case BYTE: + case CHAR: + case CLASS: + case DOUBLE: + case ENUM: + case FINAL: + case FLOAT: + case INT: + case INTERFACE: + case LONG: + case NATIVE: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case SHORT: + case STATIC: + case STRICTFP: + case SYNCHRONIZED: + case TRANSIENT: + case VOID: + case VOLATILE: + case LT: + case Identifier: + case AT: + enterOuterAlt(_localctx, 1); + { + setState(472); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,43,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(469); modifier(); + } + } + } + setState(474); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,43,_ctx); + } + setState(475); interfaceMemberDeclaration(); + } + break; + case SEMI: + enterOuterAlt(_localctx, 2); + { + setState(476); match(SEMI); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceMemberDeclarationContext extends ParserRuleContext { + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public GenericInterfaceMethodDeclarationContext genericInterfaceMethodDeclaration() { + return getRuleContext(GenericInterfaceMethodDeclarationContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public ConstDeclarationContext constDeclaration() { + return getRuleContext(ConstDeclarationContext.class,0); + } + public InterfaceMethodDeclarationContext interfaceMethodDeclaration() { + return getRuleContext(InterfaceMethodDeclarationContext.class,0); + } + public InterfaceMemberDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceMemberDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitInterfaceMemberDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final InterfaceMemberDeclarationContext interfaceMemberDeclaration() throws RecognitionException { + InterfaceMemberDeclarationContext _localctx = new InterfaceMemberDeclarationContext(_ctx, getState()); + enterRule(_localctx, 54, RULE_interfaceMemberDeclaration); + try { + setState(486); + switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(479); constDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(480); interfaceMethodDeclaration(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(481); genericInterfaceMethodDeclaration(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(482); interfaceDeclaration(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(483); annotationTypeDeclaration(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(484); classDeclaration(); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(485); enumDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstDeclarationContext extends ParserRuleContext { + public ConstantDeclaratorContext constantDeclarator(int i) { + return getRuleContext(ConstantDeclaratorContext.class,i); + } + public List constantDeclarator() { + return getRuleContexts(ConstantDeclaratorContext.class); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public ConstDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitConstDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final ConstDeclarationContext constDeclaration() throws RecognitionException { + ConstDeclarationContext _localctx = new ConstDeclarationContext(_ctx, getState()); + enterRule(_localctx, 56, RULE_constDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(488); type(); + setState(489); constantDeclarator(); + setState(494); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(490); match(COMMA); + setState(491); constantDeclarator(); + } + } + setState(496); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(497); match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstantDeclaratorContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public VariableInitializerContext variableInitializer() { + return getRuleContext(VariableInitializerContext.class,0); + } + public ConstantDeclaratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constantDeclarator; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitConstantDeclarator(this); + else return visitor.visitChildren(this); + } + } + + public final ConstantDeclaratorContext constantDeclarator() throws RecognitionException { + ConstantDeclaratorContext _localctx = new ConstantDeclaratorContext(_ctx, getState()); + enterRule(_localctx, 58, RULE_constantDeclarator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(499); match(Identifier); + setState(504); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(500); match(LBRACK); + setState(501); match(RBRACK); + } + } + setState(506); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(507); match(ASSIGN); + setState(508); variableInitializer(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceMethodDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public QualifiedNameListContext qualifiedNameList() { + return getRuleContext(QualifiedNameListContext.class,0); + } + public FormalParametersContext formalParameters() { + return getRuleContext(FormalParametersContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public InterfaceMethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceMethodDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitInterfaceMethodDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final InterfaceMethodDeclarationContext interfaceMethodDeclaration() throws RecognitionException { + InterfaceMethodDeclarationContext _localctx = new InterfaceMethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 60, RULE_interfaceMethodDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(512); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + { + setState(510); type(); + } + break; + case VOID: + { + setState(511); match(VOID); + } + break; + default: + throw new NoViableAltException(this); + } + setState(514); match(Identifier); + setState(515); formalParameters(); + setState(520); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(516); match(LBRACK); + setState(517); match(RBRACK); + } + } + setState(522); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(525); + _la = _input.LA(1); + if (_la==THROWS) { + { + setState(523); match(THROWS); + setState(524); qualifiedNameList(); + } + } + + setState(527); match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GenericInterfaceMethodDeclarationContext extends ParserRuleContext { + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public InterfaceMethodDeclarationContext interfaceMethodDeclaration() { + return getRuleContext(InterfaceMethodDeclarationContext.class,0); + } + public GenericInterfaceMethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_genericInterfaceMethodDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitGenericInterfaceMethodDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final GenericInterfaceMethodDeclarationContext genericInterfaceMethodDeclaration() throws RecognitionException { + GenericInterfaceMethodDeclarationContext _localctx = new GenericInterfaceMethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 62, RULE_genericInterfaceMethodDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(529); typeParameters(); + setState(530); interfaceMethodDeclaration(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclaratorsContext extends ParserRuleContext { + public List variableDeclarator() { + return getRuleContexts(VariableDeclaratorContext.class); + } + public VariableDeclaratorContext variableDeclarator(int i) { + return getRuleContext(VariableDeclaratorContext.class,i); + } + public VariableDeclaratorsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclarators; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitVariableDeclarators(this); + else return visitor.visitChildren(this); + } + } + + public final VariableDeclaratorsContext variableDeclarators() throws RecognitionException { + VariableDeclaratorsContext _localctx = new VariableDeclaratorsContext(_ctx, getState()); + enterRule(_localctx, 64, RULE_variableDeclarators); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(532); variableDeclarator(); + setState(537); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(533); match(COMMA); + setState(534); variableDeclarator(); + } + } + setState(539); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclaratorContext extends ParserRuleContext { + public VariableInitializerContext variableInitializer() { + return getRuleContext(VariableInitializerContext.class,0); + } + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public VariableDeclaratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclarator; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitVariableDeclarator(this); + else return visitor.visitChildren(this); + } + } + + public final VariableDeclaratorContext variableDeclarator() throws RecognitionException { + VariableDeclaratorContext _localctx = new VariableDeclaratorContext(_ctx, getState()); + enterRule(_localctx, 66, RULE_variableDeclarator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(540); variableDeclaratorId(); + setState(543); + _la = _input.LA(1); + if (_la==ASSIGN) { + { + setState(541); match(ASSIGN); + setState(542); variableInitializer(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclaratorIdContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public VariableDeclaratorIdContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclaratorId; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitVariableDeclaratorId(this); + else return visitor.visitChildren(this); + } + } + + public final VariableDeclaratorIdContext variableDeclaratorId() throws RecognitionException { + VariableDeclaratorIdContext _localctx = new VariableDeclaratorIdContext(_ctx, getState()); + enterRule(_localctx, 68, RULE_variableDeclaratorId); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(545); match(Identifier); + setState(550); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(546); match(LBRACK); + setState(547); match(RBRACK); + } + } + setState(552); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableInitializerContext extends ParserRuleContext { + public ArrayInitializerContext arrayInitializer() { + return getRuleContext(ArrayInitializerContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public VariableInitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableInitializer; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitVariableInitializer(this); + else return visitor.visitChildren(this); + } + } + + public final VariableInitializerContext variableInitializer() throws RecognitionException { + VariableInitializerContext _localctx = new VariableInitializerContext(_ctx, getState()); + enterRule(_localctx, 70, RULE_variableInitializer); + try { + setState(555); + switch (_input.LA(1)) { + case LBRACE: + enterOuterAlt(_localctx, 1); + { + setState(553); arrayInitializer(); + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case NEW: + case SHORT: + case SUPER: + case THIS: + case VOID: + case IntegerLiteral: + case FloatingPointLiteral: + case BooleanLiteral: + case CharacterLiteral: + case StringLiteral: + case NullLiteral: + case LPAREN: + case LT: + case BANG: + case TILDE: + case INC: + case DEC: + case ADD: + case SUB: + case Identifier: + enterOuterAlt(_localctx, 2); + { + setState(554); expression(0); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrayInitializerContext extends ParserRuleContext { + public List variableInitializer() { + return getRuleContexts(VariableInitializerContext.class); + } + public VariableInitializerContext variableInitializer(int i) { + return getRuleContext(VariableInitializerContext.class,i); + } + public ArrayInitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayInitializer; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitArrayInitializer(this); + else return visitor.visitChildren(this); + } + } + + public final ArrayInitializerContext arrayInitializer() throws RecognitionException { + ArrayInitializerContext _localctx = new ArrayInitializerContext(_ctx, getState()); + enterRule(_localctx, 72, RULE_arrayInitializer); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(557); match(LBRACE); + setState(569); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(558); variableInitializer(); + setState(563); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,55,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(559); match(COMMA); + setState(560); variableInitializer(); + } + } + } + setState(565); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,55,_ctx); + } + setState(567); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(566); match(COMMA); + } + } + + } + } + + setState(571); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumConstantNameContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public EnumConstantNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumConstantName; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitEnumConstantName(this); + else return visitor.visitChildren(this); + } + } + + public final EnumConstantNameContext enumConstantName() throws RecognitionException { + EnumConstantNameContext _localctx = new EnumConstantNameContext(_ctx, getState()); + enterRule(_localctx, 74, RULE_enumConstantName); + try { + enterOuterAlt(_localctx, 1); + { + setState(573); match(Identifier); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeContext extends ParserRuleContext { + public PrimitiveTypeContext primitiveType() { + return getRuleContext(PrimitiveTypeContext.class,0); + } + public ClassOrInterfaceTypeContext classOrInterfaceType() { + return getRuleContext(ClassOrInterfaceTypeContext.class,0); + } + public TypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_type; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitType(this); + else return visitor.visitChildren(this); + } + } + + public final TypeContext type() throws RecognitionException { + TypeContext _localctx = new TypeContext(_ctx, getState()); + enterRule(_localctx, 76, RULE_type); + try { + int _alt; + setState(591); + switch (_input.LA(1)) { + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(575); classOrInterfaceType(); + setState(580); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,58,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(576); match(LBRACK); + setState(577); match(RBRACK); + } + } + } + setState(582); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,58,_ctx); + } + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + enterOuterAlt(_localctx, 2); + { + setState(583); primitiveType(); + setState(588); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,59,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(584); match(LBRACK); + setState(585); match(RBRACK); + } + } + } + setState(590); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,59,_ctx); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassOrInterfaceTypeContext extends ParserRuleContext { + public List typeArguments() { + return getRuleContexts(TypeArgumentsContext.class); + } + public List Identifier() { return getTokens(Java8Parser.Identifier); } + public TerminalNode Identifier(int i) { + return getToken(Java8Parser.Identifier, i); + } + public TypeArgumentsContext typeArguments(int i) { + return getRuleContext(TypeArgumentsContext.class,i); + } + public ClassOrInterfaceTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classOrInterfaceType; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitClassOrInterfaceType(this); + else return visitor.visitChildren(this); + } + } + + public final ClassOrInterfaceTypeContext classOrInterfaceType() throws RecognitionException { + ClassOrInterfaceTypeContext _localctx = new ClassOrInterfaceTypeContext(_ctx, getState()); + enterRule(_localctx, 78, RULE_classOrInterfaceType); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(593); match(Identifier); + setState(595); + switch ( getInterpreter().adaptivePredict(_input,61,_ctx) ) { + case 1: + { + setState(594); typeArguments(); + } + break; + } + setState(604); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,63,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(597); match(DOT); + setState(598); match(Identifier); + setState(600); + switch ( getInterpreter().adaptivePredict(_input,62,_ctx) ) { + case 1: + { + setState(599); typeArguments(); + } + break; + } + } + } + } + setState(606); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,63,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PrimitiveTypeContext extends ParserRuleContext { + public PrimitiveTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_primitiveType; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitPrimitiveType(this); + else return visitor.visitChildren(this); + } + } + + public final PrimitiveTypeContext primitiveType() throws RecognitionException { + PrimitiveTypeContext _localctx = new PrimitiveTypeContext(_ctx, getState()); + enterRule(_localctx, 80, RULE_primitiveType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(607); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << SHORT))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentsContext extends ParserRuleContext { + public List typeArgument() { + return getRuleContexts(TypeArgumentContext.class); + } + public TypeArgumentContext typeArgument(int i) { + return getRuleContext(TypeArgumentContext.class,i); + } + public TypeArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArguments; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitTypeArguments(this); + else return visitor.visitChildren(this); + } + } + + public final TypeArgumentsContext typeArguments() throws RecognitionException { + TypeArgumentsContext _localctx = new TypeArgumentsContext(_ctx, getState()); + enterRule(_localctx, 82, RULE_typeArguments); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(609); match(LT); + setState(610); typeArgument(); + setState(615); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(611); match(COMMA); + setState(612); typeArgument(); + } + } + setState(617); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(618); match(GT); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentContext extends ParserRuleContext { + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public TypeArgumentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArgument; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitTypeArgument(this); + else return visitor.visitChildren(this); + } + } + + public final TypeArgumentContext typeArgument() throws RecognitionException { + TypeArgumentContext _localctx = new TypeArgumentContext(_ctx, getState()); + enterRule(_localctx, 84, RULE_typeArgument); + int _la; + try { + setState(626); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(620); type(); + } + break; + case QUESTION: + enterOuterAlt(_localctx, 2); + { + setState(621); match(QUESTION); + setState(624); + _la = _input.LA(1); + if (_la==EXTENDS || _la==SUPER) { + { + setState(622); + _la = _input.LA(1); + if ( !(_la==EXTENDS || _la==SUPER) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(623); type(); + } + } + + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class QualifiedNameListContext extends ParserRuleContext { + public List qualifiedName() { + return getRuleContexts(QualifiedNameContext.class); + } + public QualifiedNameContext qualifiedName(int i) { + return getRuleContext(QualifiedNameContext.class,i); + } + public QualifiedNameListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_qualifiedNameList; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitQualifiedNameList(this); + else return visitor.visitChildren(this); + } + } + + public final QualifiedNameListContext qualifiedNameList() throws RecognitionException { + QualifiedNameListContext _localctx = new QualifiedNameListContext(_ctx, getState()); + enterRule(_localctx, 86, RULE_qualifiedNameList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(628); qualifiedName(); + setState(633); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(629); match(COMMA); + setState(630); qualifiedName(); + } + } + setState(635); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FormalParametersContext extends ParserRuleContext { + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public FormalParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_formalParameters; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitFormalParameters(this); + else return visitor.visitChildren(this); + } + } + + public final FormalParametersContext formalParameters() throws RecognitionException { + FormalParametersContext _localctx = new FormalParametersContext(_ctx, getState()); + enterRule(_localctx, 88, RULE_formalParameters); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(636); match(LPAREN); + setState(638); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << SHORT))) != 0) || _la==Identifier || _la==AT) { + { + setState(637); formalParameterList(); + } + } + + setState(640); match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FormalParameterListContext extends ParserRuleContext { + public List formalParameter() { + return getRuleContexts(FormalParameterContext.class); + } + public LastFormalParameterContext lastFormalParameter() { + return getRuleContext(LastFormalParameterContext.class,0); + } + public FormalParameterContext formalParameter(int i) { + return getRuleContext(FormalParameterContext.class,i); + } + public FormalParameterListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_formalParameterList; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitFormalParameterList(this); + else return visitor.visitChildren(this); + } + } + + public final FormalParameterListContext formalParameterList() throws RecognitionException { + FormalParameterListContext _localctx = new FormalParameterListContext(_ctx, getState()); + enterRule(_localctx, 90, RULE_formalParameterList); + int _la; + try { + int _alt; + setState(655); + switch ( getInterpreter().adaptivePredict(_input,71,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(642); formalParameter(); + setState(647); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,69,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(643); match(COMMA); + setState(644); formalParameter(); + } + } + } + setState(649); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,69,_ctx); + } + setState(652); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(650); match(COMMA); + setState(651); lastFormalParameter(); + } + } + + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(654); lastFormalParameter(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FormalParameterContext extends ParserRuleContext { + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public FormalParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_formalParameter; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitFormalParameter(this); + else return visitor.visitChildren(this); + } + } + + public final FormalParameterContext formalParameter() throws RecognitionException { + FormalParameterContext _localctx = new FormalParameterContext(_ctx, getState()); + enterRule(_localctx, 92, RULE_formalParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(660); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(657); variableModifier(); + } + } + setState(662); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(663); type(); + setState(664); variableDeclaratorId(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LastFormalParameterContext extends ParserRuleContext { + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public LastFormalParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lastFormalParameter; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitLastFormalParameter(this); + else return visitor.visitChildren(this); + } + } + + public final LastFormalParameterContext lastFormalParameter() throws RecognitionException { + LastFormalParameterContext _localctx = new LastFormalParameterContext(_ctx, getState()); + enterRule(_localctx, 94, RULE_lastFormalParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(669); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(666); variableModifier(); + } + } + setState(671); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(672); type(); + setState(673); match(ELLIPSIS); + setState(674); variableDeclaratorId(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MethodBodyContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public MethodBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_methodBody; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitMethodBody(this); + else return visitor.visitChildren(this); + } + } + + public final MethodBodyContext methodBody() throws RecognitionException { + MethodBodyContext _localctx = new MethodBodyContext(_ctx, getState()); + enterRule(_localctx, 96, RULE_methodBody); + try { + enterOuterAlt(_localctx, 1); + { + setState(676); block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstructorBodyContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public ConstructorBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constructorBody; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitConstructorBody(this); + else return visitor.visitChildren(this); + } + } + + public final ConstructorBodyContext constructorBody() throws RecognitionException { + ConstructorBodyContext _localctx = new ConstructorBodyContext(_ctx, getState()); + enterRule(_localctx, 98, RULE_constructorBody); + try { + enterOuterAlt(_localctx, 1); + { + setState(678); block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class QualifiedNameContext extends ParserRuleContext { + public List Identifier() { return getTokens(Java8Parser.Identifier); } + public TerminalNode Identifier(int i) { + return getToken(Java8Parser.Identifier, i); + } + public QualifiedNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_qualifiedName; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitQualifiedName(this); + else return visitor.visitChildren(this); + } + } + + public final QualifiedNameContext qualifiedName() throws RecognitionException { + QualifiedNameContext _localctx = new QualifiedNameContext(_ctx, getState()); + enterRule(_localctx, 100, RULE_qualifiedName); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(680); match(Identifier); + setState(685); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,74,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(681); match(DOT); + setState(682); match(Identifier); + } + } + } + setState(687); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,74,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LiteralContext extends ParserRuleContext { + public TerminalNode StringLiteral() { return getToken(Java8Parser.StringLiteral, 0); } + public TerminalNode IntegerLiteral() { return getToken(Java8Parser.IntegerLiteral, 0); } + public TerminalNode FloatingPointLiteral() { return getToken(Java8Parser.FloatingPointLiteral, 0); } + public TerminalNode BooleanLiteral() { return getToken(Java8Parser.BooleanLiteral, 0); } + public TerminalNode CharacterLiteral() { return getToken(Java8Parser.CharacterLiteral, 0); } + public LiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_literal; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitLiteral(this); + else return visitor.visitChildren(this); + } + } + + public final LiteralContext literal() throws RecognitionException { + LiteralContext _localctx = new LiteralContext(_ctx, getState()); + enterRule(_localctx, 102, RULE_literal); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(688); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationContext extends ParserRuleContext { + public ElementValuePairsContext elementValuePairs() { + return getRuleContext(ElementValuePairsContext.class,0); + } + public AnnotationNameContext annotationName() { + return getRuleContext(AnnotationNameContext.class,0); + } + public ElementValueContext elementValue() { + return getRuleContext(ElementValueContext.class,0); + } + public AnnotationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotation; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitAnnotation(this); + else return visitor.visitChildren(this); + } + } + + public final AnnotationContext annotation() throws RecognitionException { + AnnotationContext _localctx = new AnnotationContext(_ctx, getState()); + enterRule(_localctx, 104, RULE_annotation); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(690); match(AT); + setState(691); annotationName(); + setState(698); + _la = _input.LA(1); + if (_la==LPAREN) { + { + setState(692); match(LPAREN); + setState(695); + switch ( getInterpreter().adaptivePredict(_input,75,_ctx) ) { + case 1: + { + setState(693); elementValuePairs(); + } + break; + case 2: + { + setState(694); elementValue(); + } + break; + } + setState(697); match(RPAREN); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationNameContext extends ParserRuleContext { + public QualifiedNameContext qualifiedName() { + return getRuleContext(QualifiedNameContext.class,0); + } + public AnnotationNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationName; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitAnnotationName(this); + else return visitor.visitChildren(this); + } + } + + public final AnnotationNameContext annotationName() throws RecognitionException { + AnnotationNameContext _localctx = new AnnotationNameContext(_ctx, getState()); + enterRule(_localctx, 106, RULE_annotationName); + try { + enterOuterAlt(_localctx, 1); + { + setState(700); qualifiedName(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValuePairsContext extends ParserRuleContext { + public ElementValuePairContext elementValuePair(int i) { + return getRuleContext(ElementValuePairContext.class,i); + } + public List elementValuePair() { + return getRuleContexts(ElementValuePairContext.class); + } + public ElementValuePairsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValuePairs; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitElementValuePairs(this); + else return visitor.visitChildren(this); + } + } + + public final ElementValuePairsContext elementValuePairs() throws RecognitionException { + ElementValuePairsContext _localctx = new ElementValuePairsContext(_ctx, getState()); + enterRule(_localctx, 108, RULE_elementValuePairs); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(702); elementValuePair(); + setState(707); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(703); match(COMMA); + setState(704); elementValuePair(); + } + } + setState(709); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValuePairContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public ElementValueContext elementValue() { + return getRuleContext(ElementValueContext.class,0); + } + public ElementValuePairContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValuePair; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitElementValuePair(this); + else return visitor.visitChildren(this); + } + } + + public final ElementValuePairContext elementValuePair() throws RecognitionException { + ElementValuePairContext _localctx = new ElementValuePairContext(_ctx, getState()); + enterRule(_localctx, 110, RULE_elementValuePair); + try { + enterOuterAlt(_localctx, 1); + { + setState(710); match(Identifier); + setState(711); match(ASSIGN); + setState(712); elementValue(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValueContext extends ParserRuleContext { + public ElementValueArrayInitializerContext elementValueArrayInitializer() { + return getRuleContext(ElementValueArrayInitializerContext.class,0); + } + public AnnotationContext annotation() { + return getRuleContext(AnnotationContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ElementValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValue; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitElementValue(this); + else return visitor.visitChildren(this); + } + } + + public final ElementValueContext elementValue() throws RecognitionException { + ElementValueContext _localctx = new ElementValueContext(_ctx, getState()); + enterRule(_localctx, 112, RULE_elementValue); + try { + setState(717); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case NEW: + case SHORT: + case SUPER: + case THIS: + case VOID: + case IntegerLiteral: + case FloatingPointLiteral: + case BooleanLiteral: + case CharacterLiteral: + case StringLiteral: + case NullLiteral: + case LPAREN: + case LT: + case BANG: + case TILDE: + case INC: + case DEC: + case ADD: + case SUB: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(714); expression(0); + } + break; + case AT: + enterOuterAlt(_localctx, 2); + { + setState(715); annotation(); + } + break; + case LBRACE: + enterOuterAlt(_localctx, 3); + { + setState(716); elementValueArrayInitializer(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValueArrayInitializerContext extends ParserRuleContext { + public ElementValueContext elementValue(int i) { + return getRuleContext(ElementValueContext.class,i); + } + public List elementValue() { + return getRuleContexts(ElementValueContext.class); + } + public ElementValueArrayInitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValueArrayInitializer; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitElementValueArrayInitializer(this); + else return visitor.visitChildren(this); + } + } + + public final ElementValueArrayInitializerContext elementValueArrayInitializer() throws RecognitionException { + ElementValueArrayInitializerContext _localctx = new ElementValueArrayInitializerContext(_ctx, getState()); + enterRule(_localctx, 114, RULE_elementValueArrayInitializer); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(719); match(LBRACE); + setState(728); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + setState(720); elementValue(); + setState(725); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,79,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(721); match(COMMA); + setState(722); elementValue(); + } + } + } + setState(727); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,79,_ctx); + } + } + } + + setState(731); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(730); match(COMMA); + } + } + + setState(733); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public AnnotationTypeBodyContext annotationTypeBody() { + return getRuleContext(AnnotationTypeBodyContext.class,0); + } + public AnnotationTypeDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitAnnotationTypeDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final AnnotationTypeDeclarationContext annotationTypeDeclaration() throws RecognitionException { + AnnotationTypeDeclarationContext _localctx = new AnnotationTypeDeclarationContext(_ctx, getState()); + enterRule(_localctx, 116, RULE_annotationTypeDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(735); match(AT); + setState(736); match(INTERFACE); + setState(737); match(Identifier); + setState(738); annotationTypeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeBodyContext extends ParserRuleContext { + public List annotationTypeElementDeclaration() { + return getRuleContexts(AnnotationTypeElementDeclarationContext.class); + } + public AnnotationTypeElementDeclarationContext annotationTypeElementDeclaration(int i) { + return getRuleContext(AnnotationTypeElementDeclarationContext.class,i); + } + public AnnotationTypeBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeBody; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitAnnotationTypeBody(this); + else return visitor.visitChildren(this); + } + } + + public final AnnotationTypeBodyContext annotationTypeBody() throws RecognitionException { + AnnotationTypeBodyContext _localctx = new AnnotationTypeBodyContext(_ctx, getState()); + enterRule(_localctx, 118, RULE_annotationTypeBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(740); match(LBRACE); + setState(744); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOLATILE) | (1L << SEMI))) != 0) || _la==Identifier || _la==AT) { + { + { + setState(741); annotationTypeElementDeclaration(); + } + } + setState(746); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(747); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeElementDeclarationContext extends ParserRuleContext { + public List modifier() { + return getRuleContexts(ModifierContext.class); + } + public AnnotationTypeElementRestContext annotationTypeElementRest() { + return getRuleContext(AnnotationTypeElementRestContext.class,0); + } + public ModifierContext modifier(int i) { + return getRuleContext(ModifierContext.class,i); + } + public AnnotationTypeElementDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeElementDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitAnnotationTypeElementDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final AnnotationTypeElementDeclarationContext annotationTypeElementDeclaration() throws RecognitionException { + AnnotationTypeElementDeclarationContext _localctx = new AnnotationTypeElementDeclarationContext(_ctx, getState()); + enterRule(_localctx, 120, RULE_annotationTypeElementDeclaration); + try { + int _alt; + setState(757); + switch (_input.LA(1)) { + case ABSTRACT: + case BOOLEAN: + case BYTE: + case CHAR: + case CLASS: + case DOUBLE: + case ENUM: + case FINAL: + case FLOAT: + case INT: + case INTERFACE: + case LONG: + case NATIVE: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case SHORT: + case STATIC: + case STRICTFP: + case SYNCHRONIZED: + case TRANSIENT: + case VOLATILE: + case Identifier: + case AT: + enterOuterAlt(_localctx, 1); + { + setState(752); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,83,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(749); modifier(); + } + } + } + setState(754); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,83,_ctx); + } + setState(755); annotationTypeElementRest(); + } + break; + case SEMI: + enterOuterAlt(_localctx, 2); + { + setState(756); match(SEMI); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeElementRestContext extends ParserRuleContext { + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public AnnotationMethodOrConstantRestContext annotationMethodOrConstantRest() { + return getRuleContext(AnnotationMethodOrConstantRestContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public AnnotationTypeElementRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeElementRest; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitAnnotationTypeElementRest(this); + else return visitor.visitChildren(this); + } + } + + public final AnnotationTypeElementRestContext annotationTypeElementRest() throws RecognitionException { + AnnotationTypeElementRestContext _localctx = new AnnotationTypeElementRestContext(_ctx, getState()); + enterRule(_localctx, 122, RULE_annotationTypeElementRest); + try { + setState(779); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(759); type(); + setState(760); annotationMethodOrConstantRest(); + setState(761); match(SEMI); + } + break; + case CLASS: + enterOuterAlt(_localctx, 2); + { + setState(763); classDeclaration(); + setState(765); + switch ( getInterpreter().adaptivePredict(_input,85,_ctx) ) { + case 1: + { + setState(764); match(SEMI); + } + break; + } + } + break; + case INTERFACE: + enterOuterAlt(_localctx, 3); + { + setState(767); interfaceDeclaration(); + setState(769); + switch ( getInterpreter().adaptivePredict(_input,86,_ctx) ) { + case 1: + { + setState(768); match(SEMI); + } + break; + } + } + break; + case ENUM: + enterOuterAlt(_localctx, 4); + { + setState(771); enumDeclaration(); + setState(773); + switch ( getInterpreter().adaptivePredict(_input,87,_ctx) ) { + case 1: + { + setState(772); match(SEMI); + } + break; + } + } + break; + case AT: + enterOuterAlt(_localctx, 5); + { + setState(775); annotationTypeDeclaration(); + setState(777); + switch ( getInterpreter().adaptivePredict(_input,88,_ctx) ) { + case 1: + { + setState(776); match(SEMI); + } + break; + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationMethodOrConstantRestContext extends ParserRuleContext { + public AnnotationMethodRestContext annotationMethodRest() { + return getRuleContext(AnnotationMethodRestContext.class,0); + } + public AnnotationConstantRestContext annotationConstantRest() { + return getRuleContext(AnnotationConstantRestContext.class,0); + } + public AnnotationMethodOrConstantRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationMethodOrConstantRest; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitAnnotationMethodOrConstantRest(this); + else return visitor.visitChildren(this); + } + } + + public final AnnotationMethodOrConstantRestContext annotationMethodOrConstantRest() throws RecognitionException { + AnnotationMethodOrConstantRestContext _localctx = new AnnotationMethodOrConstantRestContext(_ctx, getState()); + enterRule(_localctx, 124, RULE_annotationMethodOrConstantRest); + try { + setState(783); + switch ( getInterpreter().adaptivePredict(_input,90,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(781); annotationMethodRest(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(782); annotationConstantRest(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationMethodRestContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public DefaultValueContext defaultValue() { + return getRuleContext(DefaultValueContext.class,0); + } + public AnnotationMethodRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationMethodRest; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitAnnotationMethodRest(this); + else return visitor.visitChildren(this); + } + } + + public final AnnotationMethodRestContext annotationMethodRest() throws RecognitionException { + AnnotationMethodRestContext _localctx = new AnnotationMethodRestContext(_ctx, getState()); + enterRule(_localctx, 126, RULE_annotationMethodRest); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(785); match(Identifier); + setState(786); match(LPAREN); + setState(787); match(RPAREN); + setState(789); + _la = _input.LA(1); + if (_la==DEFAULT) { + { + setState(788); defaultValue(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationConstantRestContext extends ParserRuleContext { + public VariableDeclaratorsContext variableDeclarators() { + return getRuleContext(VariableDeclaratorsContext.class,0); + } + public AnnotationConstantRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationConstantRest; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitAnnotationConstantRest(this); + else return visitor.visitChildren(this); + } + } + + public final AnnotationConstantRestContext annotationConstantRest() throws RecognitionException { + AnnotationConstantRestContext _localctx = new AnnotationConstantRestContext(_ctx, getState()); + enterRule(_localctx, 128, RULE_annotationConstantRest); + try { + enterOuterAlt(_localctx, 1); + { + setState(791); variableDeclarators(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DefaultValueContext extends ParserRuleContext { + public ElementValueContext elementValue() { + return getRuleContext(ElementValueContext.class,0); + } + public DefaultValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_defaultValue; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitDefaultValue(this); + else return visitor.visitChildren(this); + } + } + + public final DefaultValueContext defaultValue() throws RecognitionException { + DefaultValueContext _localctx = new DefaultValueContext(_ctx, getState()); + enterRule(_localctx, 130, RULE_defaultValue); + try { + enterOuterAlt(_localctx, 1); + { + setState(793); match(DEFAULT); + setState(794); elementValue(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BlockContext extends ParserRuleContext { + public List blockStatement() { + return getRuleContexts(BlockStatementContext.class); + } + public BlockStatementContext blockStatement(int i) { + return getRuleContext(BlockStatementContext.class,i); + } + public BlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_block; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitBlock(this); + else return visitor.visitChildren(this); + } + } + + public final BlockContext block() throws RecognitionException { + BlockContext _localctx = new BlockContext(_ctx, getState()); + enterRule(_localctx, 132, RULE_block); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(796); match(LBRACE); + setState(800); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << ASSERT) | (1L << BOOLEAN) | (1L << BREAK) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << CONTINUE) | (1L << DO) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << FOR) | (1L << IF) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NEW) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << RETURN) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SUPER) | (1L << SWITCH) | (1L << SYNCHRONIZED) | (1L << THIS) | (1L << THROW) | (1L << TRY) | (1L << VOID) | (1L << WHILE) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + { + setState(797); blockStatement(); + } + } + setState(802); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(803); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BlockStatementContext extends ParserRuleContext { + public TypeDeclarationContext typeDeclaration() { + return getRuleContext(TypeDeclarationContext.class,0); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public LocalVariableDeclarationStatementContext localVariableDeclarationStatement() { + return getRuleContext(LocalVariableDeclarationStatementContext.class,0); + } + public BlockStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_blockStatement; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitBlockStatement(this); + else return visitor.visitChildren(this); + } + } + + public final BlockStatementContext blockStatement() throws RecognitionException { + BlockStatementContext _localctx = new BlockStatementContext(_ctx, getState()); + enterRule(_localctx, 134, RULE_blockStatement); + try { + setState(808); + switch ( getInterpreter().adaptivePredict(_input,93,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(805); localVariableDeclarationStatement(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(806); statement(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(807); typeDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LocalVariableDeclarationStatementContext extends ParserRuleContext { + public LocalVariableDeclarationContext localVariableDeclaration() { + return getRuleContext(LocalVariableDeclarationContext.class,0); + } + public LocalVariableDeclarationStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_localVariableDeclarationStatement; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitLocalVariableDeclarationStatement(this); + else return visitor.visitChildren(this); + } + } + + public final LocalVariableDeclarationStatementContext localVariableDeclarationStatement() throws RecognitionException { + LocalVariableDeclarationStatementContext _localctx = new LocalVariableDeclarationStatementContext(_ctx, getState()); + enterRule(_localctx, 136, RULE_localVariableDeclarationStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(810); localVariableDeclaration(); + setState(811); match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LocalVariableDeclarationContext extends ParserRuleContext { + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableDeclaratorsContext variableDeclarators() { + return getRuleContext(VariableDeclaratorsContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public LocalVariableDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_localVariableDeclaration; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitLocalVariableDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final LocalVariableDeclarationContext localVariableDeclaration() throws RecognitionException { + LocalVariableDeclarationContext _localctx = new LocalVariableDeclarationContext(_ctx, getState()); + enterRule(_localctx, 138, RULE_localVariableDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(816); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(813); variableModifier(); + } + } + setState(818); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(819); type(); + setState(820); variableDeclarators(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StatementContext extends ParserRuleContext { + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public StatementExpressionContext statementExpression() { + return getRuleContext(StatementExpressionContext.class,0); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public List switchLabel() { + return getRuleContexts(SwitchLabelContext.class); + } + public List switchBlockStatementGroup() { + return getRuleContexts(SwitchBlockStatementGroupContext.class); + } + public ParExpressionContext parExpression() { + return getRuleContext(ParExpressionContext.class,0); + } + public List catchClause() { + return getRuleContexts(CatchClauseContext.class); + } + public CatchClauseContext catchClause(int i) { + return getRuleContext(CatchClauseContext.class,i); + } + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public FinallyBlockContext finallyBlock() { + return getRuleContext(FinallyBlockContext.class,0); + } + public SwitchBlockStatementGroupContext switchBlockStatementGroup(int i) { + return getRuleContext(SwitchBlockStatementGroupContext.class,i); + } + public ForControlContext forControl() { + return getRuleContext(ForControlContext.class,0); + } + public TerminalNode ASSERT() { return getToken(Java8Parser.ASSERT, 0); } + public ResourceSpecificationContext resourceSpecification() { + return getRuleContext(ResourceSpecificationContext.class,0); + } + public List statement() { + return getRuleContexts(StatementContext.class); + } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public SwitchLabelContext switchLabel(int i) { + return getRuleContext(SwitchLabelContext.class,i); + } + public StatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statement; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitStatement(this); + else return visitor.visitChildren(this); + } + } + + public final StatementContext statement() throws RecognitionException { + StatementContext _localctx = new StatementContext(_ctx, getState()); + enterRule(_localctx, 140, RULE_statement); + int _la; + try { + int _alt; + setState(926); + switch ( getInterpreter().adaptivePredict(_input,107,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(822); block(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(823); match(ASSERT); + setState(824); expression(0); + setState(827); + _la = _input.LA(1); + if (_la==COLON) { + { + setState(825); match(COLON); + setState(826); expression(0); + } + } + + setState(829); match(SEMI); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(831); match(IF); + setState(832); parExpression(); + setState(833); statement(); + setState(836); + switch ( getInterpreter().adaptivePredict(_input,96,_ctx) ) { + case 1: + { + setState(834); match(ELSE); + setState(835); statement(); + } + break; + } + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(838); match(FOR); + setState(839); match(LPAREN); + setState(840); forControl(); + setState(841); match(RPAREN); + setState(842); statement(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(844); match(WHILE); + setState(845); parExpression(); + setState(846); statement(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(848); match(DO); + setState(849); statement(); + setState(850); match(WHILE); + setState(851); parExpression(); + setState(852); match(SEMI); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(854); match(TRY); + setState(855); block(); + setState(865); + switch (_input.LA(1)) { + case CATCH: + { + setState(857); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(856); catchClause(); + } + } + setState(859); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==CATCH ); + setState(862); + _la = _input.LA(1); + if (_la==FINALLY) { + { + setState(861); finallyBlock(); + } + } + + } + break; + case FINALLY: + { + setState(864); finallyBlock(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(867); match(TRY); + setState(868); resourceSpecification(); + setState(869); block(); + setState(873); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==CATCH) { + { + { + setState(870); catchClause(); + } + } + setState(875); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(877); + _la = _input.LA(1); + if (_la==FINALLY) { + { + setState(876); finallyBlock(); + } + } + + } + break; + case 9: + enterOuterAlt(_localctx, 9); + { + setState(879); match(SWITCH); + setState(880); parExpression(); + setState(881); match(LBRACE); + setState(885); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,102,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(882); switchBlockStatementGroup(); + } + } + } + setState(887); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,102,_ctx); + } + setState(891); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==CASE || _la==DEFAULT) { + { + { + setState(888); switchLabel(); + } + } + setState(893); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(894); match(RBRACE); + } + break; + case 10: + enterOuterAlt(_localctx, 10); + { + setState(896); match(SYNCHRONIZED); + setState(897); parExpression(); + setState(898); block(); + } + break; + case 11: + enterOuterAlt(_localctx, 11); + { + setState(900); match(RETURN); + setState(902); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(901); expression(0); + } + } + + setState(904); match(SEMI); + } + break; + case 12: + enterOuterAlt(_localctx, 12); + { + setState(905); match(THROW); + setState(906); expression(0); + setState(907); match(SEMI); + } + break; + case 13: + enterOuterAlt(_localctx, 13); + { + setState(909); match(BREAK); + setState(911); + _la = _input.LA(1); + if (_la==Identifier) { + { + setState(910); match(Identifier); + } + } + + setState(913); match(SEMI); + } + break; + case 14: + enterOuterAlt(_localctx, 14); + { + setState(914); match(CONTINUE); + setState(916); + _la = _input.LA(1); + if (_la==Identifier) { + { + setState(915); match(Identifier); + } + } + + setState(918); match(SEMI); + } + break; + case 15: + enterOuterAlt(_localctx, 15); + { + setState(919); match(SEMI); + } + break; + case 16: + enterOuterAlt(_localctx, 16); + { + setState(920); statementExpression(); + setState(921); match(SEMI); + } + break; + case 17: + enterOuterAlt(_localctx, 17); + { + setState(923); match(Identifier); + setState(924); match(COLON); + setState(925); statement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CatchClauseContext extends ParserRuleContext { + public CatchTypeContext catchType() { + return getRuleContext(CatchTypeContext.class,0); + } + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public CatchClauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_catchClause; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitCatchClause(this); + else return visitor.visitChildren(this); + } + } + + public final CatchClauseContext catchClause() throws RecognitionException { + CatchClauseContext _localctx = new CatchClauseContext(_ctx, getState()); + enterRule(_localctx, 142, RULE_catchClause); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(928); match(CATCH); + setState(929); match(LPAREN); + setState(933); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(930); variableModifier(); + } + } + setState(935); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(936); catchType(); + setState(937); match(Identifier); + setState(938); match(RPAREN); + setState(939); block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CatchTypeContext extends ParserRuleContext { + public List qualifiedName() { + return getRuleContexts(QualifiedNameContext.class); + } + public QualifiedNameContext qualifiedName(int i) { + return getRuleContext(QualifiedNameContext.class,i); + } + public CatchTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_catchType; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitCatchType(this); + else return visitor.visitChildren(this); + } + } + + public final CatchTypeContext catchType() throws RecognitionException { + CatchTypeContext _localctx = new CatchTypeContext(_ctx, getState()); + enterRule(_localctx, 144, RULE_catchType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(941); qualifiedName(); + setState(946); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==BITOR) { + { + { + setState(942); match(BITOR); + setState(943); qualifiedName(); + } + } + setState(948); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FinallyBlockContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public FinallyBlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_finallyBlock; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitFinallyBlock(this); + else return visitor.visitChildren(this); + } + } + + public final FinallyBlockContext finallyBlock() throws RecognitionException { + FinallyBlockContext _localctx = new FinallyBlockContext(_ctx, getState()); + enterRule(_localctx, 146, RULE_finallyBlock); + try { + enterOuterAlt(_localctx, 1); + { + setState(949); match(FINALLY); + setState(950); block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ResourceSpecificationContext extends ParserRuleContext { + public ResourcesContext resources() { + return getRuleContext(ResourcesContext.class,0); + } + public ResourceSpecificationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_resourceSpecification; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitResourceSpecification(this); + else return visitor.visitChildren(this); + } + } + + public final ResourceSpecificationContext resourceSpecification() throws RecognitionException { + ResourceSpecificationContext _localctx = new ResourceSpecificationContext(_ctx, getState()); + enterRule(_localctx, 148, RULE_resourceSpecification); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(952); match(LPAREN); + setState(953); resources(); + setState(955); + _la = _input.LA(1); + if (_la==SEMI) { + { + setState(954); match(SEMI); + } + } + + setState(957); match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ResourcesContext extends ParserRuleContext { + public ResourceContext resource(int i) { + return getRuleContext(ResourceContext.class,i); + } + public List resource() { + return getRuleContexts(ResourceContext.class); + } + public ResourcesContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_resources; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitResources(this); + else return visitor.visitChildren(this); + } + } + + public final ResourcesContext resources() throws RecognitionException { + ResourcesContext _localctx = new ResourcesContext(_ctx, getState()); + enterRule(_localctx, 150, RULE_resources); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(959); resource(); + setState(964); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,111,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(960); match(SEMI); + setState(961); resource(); + } + } + } + setState(966); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,111,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ResourceContext extends ParserRuleContext { + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public ClassOrInterfaceTypeContext classOrInterfaceType() { + return getRuleContext(ClassOrInterfaceTypeContext.class,0); + } + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ResourceContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_resource; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitResource(this); + else return visitor.visitChildren(this); + } + } + + public final ResourceContext resource() throws RecognitionException { + ResourceContext _localctx = new ResourceContext(_ctx, getState()); + enterRule(_localctx, 152, RULE_resource); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(970); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(967); variableModifier(); + } + } + setState(972); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(973); classOrInterfaceType(); + setState(974); variableDeclaratorId(); + setState(975); match(ASSIGN); + setState(976); expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SwitchBlockStatementGroupContext extends ParserRuleContext { + public List blockStatement() { + return getRuleContexts(BlockStatementContext.class); + } + public List switchLabel() { + return getRuleContexts(SwitchLabelContext.class); + } + public BlockStatementContext blockStatement(int i) { + return getRuleContext(BlockStatementContext.class,i); + } + public SwitchLabelContext switchLabel(int i) { + return getRuleContext(SwitchLabelContext.class,i); + } + public SwitchBlockStatementGroupContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_switchBlockStatementGroup; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitSwitchBlockStatementGroup(this); + else return visitor.visitChildren(this); + } + } + + public final SwitchBlockStatementGroupContext switchBlockStatementGroup() throws RecognitionException { + SwitchBlockStatementGroupContext _localctx = new SwitchBlockStatementGroupContext(_ctx, getState()); + enterRule(_localctx, 154, RULE_switchBlockStatementGroup); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(979); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(978); switchLabel(); + } + } + setState(981); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==CASE || _la==DEFAULT ); + setState(984); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(983); blockStatement(); + } + } + setState(986); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << ASSERT) | (1L << BOOLEAN) | (1L << BREAK) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << CONTINUE) | (1L << DO) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << FOR) | (1L << IF) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NEW) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << RETURN) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SUPER) | (1L << SWITCH) | (1L << SYNCHRONIZED) | (1L << THIS) | (1L << THROW) | (1L << TRY) | (1L << VOID) | (1L << WHILE) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0) ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SwitchLabelContext extends ParserRuleContext { + public ConstantExpressionContext constantExpression() { + return getRuleContext(ConstantExpressionContext.class,0); + } + public EnumConstantNameContext enumConstantName() { + return getRuleContext(EnumConstantNameContext.class,0); + } + public SwitchLabelContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_switchLabel; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitSwitchLabel(this); + else return visitor.visitChildren(this); + } + } + + public final SwitchLabelContext switchLabel() throws RecognitionException { + SwitchLabelContext _localctx = new SwitchLabelContext(_ctx, getState()); + enterRule(_localctx, 156, RULE_switchLabel); + try { + setState(998); + switch ( getInterpreter().adaptivePredict(_input,115,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(988); match(CASE); + setState(989); constantExpression(); + setState(990); match(COLON); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(992); match(CASE); + setState(993); enumConstantName(); + setState(994); match(COLON); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(996); match(DEFAULT); + setState(997); match(COLON); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ForControlContext extends ParserRuleContext { + public ForUpdateContext forUpdate() { + return getRuleContext(ForUpdateContext.class,0); + } + public ForInitContext forInit() { + return getRuleContext(ForInitContext.class,0); + } + public EnhancedForControlContext enhancedForControl() { + return getRuleContext(EnhancedForControlContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ForControlContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_forControl; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitForControl(this); + else return visitor.visitChildren(this); + } + } + + public final ForControlContext forControl() throws RecognitionException { + ForControlContext _localctx = new ForControlContext(_ctx, getState()); + enterRule(_localctx, 158, RULE_forControl); + int _la; + try { + setState(1012); + switch ( getInterpreter().adaptivePredict(_input,119,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1000); enhancedForControl(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1002); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + setState(1001); forInit(); + } + } + + setState(1004); match(SEMI); + setState(1006); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(1005); expression(0); + } + } + + setState(1008); match(SEMI); + setState(1010); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(1009); forUpdate(); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ForInitContext extends ParserRuleContext { + public LocalVariableDeclarationContext localVariableDeclaration() { + return getRuleContext(LocalVariableDeclarationContext.class,0); + } + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public ForInitContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_forInit; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitForInit(this); + else return visitor.visitChildren(this); + } + } + + public final ForInitContext forInit() throws RecognitionException { + ForInitContext _localctx = new ForInitContext(_ctx, getState()); + enterRule(_localctx, 160, RULE_forInit); + try { + setState(1016); + switch ( getInterpreter().adaptivePredict(_input,120,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1014); localVariableDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1015); expressionList(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnhancedForControlContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public EnhancedForControlContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enhancedForControl; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitEnhancedForControl(this); + else return visitor.visitChildren(this); + } + } + + public final EnhancedForControlContext enhancedForControl() throws RecognitionException { + EnhancedForControlContext _localctx = new EnhancedForControlContext(_ctx, getState()); + enterRule(_localctx, 162, RULE_enhancedForControl); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1021); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(1018); variableModifier(); + } + } + setState(1023); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1024); type(); + setState(1025); match(Identifier); + setState(1026); match(COLON); + setState(1027); expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ForUpdateContext extends ParserRuleContext { + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public ForUpdateContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_forUpdate; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitForUpdate(this); + else return visitor.visitChildren(this); + } + } + + public final ForUpdateContext forUpdate() throws RecognitionException { + ForUpdateContext _localctx = new ForUpdateContext(_ctx, getState()); + enterRule(_localctx, 164, RULE_forUpdate); + try { + enterOuterAlt(_localctx, 1); + { + setState(1029); expressionList(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ParExpressionContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ParExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_parExpression; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitParExpression(this); + else return visitor.visitChildren(this); + } + } + + public final ParExpressionContext parExpression() throws RecognitionException { + ParExpressionContext _localctx = new ParExpressionContext(_ctx, getState()); + enterRule(_localctx, 166, RULE_parExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(1031); match(LPAREN); + setState(1032); expression(0); + setState(1033); match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpressionListContext extends ParserRuleContext { + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expressionList; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitExpressionList(this); + else return visitor.visitChildren(this); + } + } + + public final ExpressionListContext expressionList() throws RecognitionException { + ExpressionListContext _localctx = new ExpressionListContext(_ctx, getState()); + enterRule(_localctx, 168, RULE_expressionList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1035); expression(0); + setState(1040); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(1036); match(COMMA); + setState(1037); expression(0); + } + } + setState(1042); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StatementExpressionContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public StatementExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statementExpression; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitStatementExpression(this); + else return visitor.visitChildren(this); + } + } + + public final StatementExpressionContext statementExpression() throws RecognitionException { + StatementExpressionContext _localctx = new StatementExpressionContext(_ctx, getState()); + enterRule(_localctx, 170, RULE_statementExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(1043); expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstantExpressionContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ConstantExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constantExpression; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitConstantExpression(this); + else return visitor.visitChildren(this); + } + } + + public final ConstantExpressionContext constantExpression() throws RecognitionException { + ConstantExpressionContext _localctx = new ConstantExpressionContext(_ctx, getState()); + enterRule(_localctx, 172, RULE_constantExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(1045); expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpressionContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public ExplicitGenericInvocationContext explicitGenericInvocation() { + return getRuleContext(ExplicitGenericInvocationContext.class,0); + } + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public InnerCreatorContext innerCreator() { + return getRuleContext(InnerCreatorContext.class,0); + } + public SuperSuffixContext superSuffix() { + return getRuleContext(SuperSuffixContext.class,0); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public PrimaryContext primary() { + return getRuleContext(PrimaryContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public CreatorContext creator() { + return getRuleContext(CreatorContext.class,0); + } + public ExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expression; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitExpression(this); + else return visitor.visitChildren(this); + } + } + + public final ExpressionContext expression() throws RecognitionException { + return expression(0); + } + + private ExpressionContext expression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ExpressionContext _localctx = new ExpressionContext(_ctx, _parentState); + ExpressionContext _prevctx = _localctx; + int _startState = 174; + enterRecursionRule(_localctx, 174, RULE_expression, _p); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1060); + switch ( getInterpreter().adaptivePredict(_input,123,_ctx) ) { + case 1: + { + setState(1048); match(LPAREN); + setState(1049); type(); + setState(1050); match(RPAREN); + setState(1051); expression(17); + } + break; + case 2: + { + setState(1053); + _la = _input.LA(1); + if ( !(((((_la - 79)) & ~0x3f) == 0 && ((1L << (_la - 79)) & ((1L << (INC - 79)) | (1L << (DEC - 79)) | (1L << (ADD - 79)) | (1L << (SUB - 79)))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1054); expression(15); + } + break; + case 3: + { + setState(1055); + _la = _input.LA(1); + if ( !(_la==BANG || _la==TILDE) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1056); expression(14); + } + break; + case 4: + { + setState(1057); primary(); + } + break; + case 5: + { + setState(1058); match(NEW); + setState(1059); creator(); + } + break; + } + _ctx.stop = _input.LT(-1); + setState(1147); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,128,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(1145); + switch ( getInterpreter().adaptivePredict(_input,127,_ctx) ) { + case 1: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1062); + if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); + setState(1063); + _la = _input.LA(1); + if ( !(((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (MUL - 83)) | (1L << (DIV - 83)) | (1L << (MOD - 83)))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1064); expression(14); + } + break; + case 2: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1065); + if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); + setState(1066); + _la = _input.LA(1); + if ( !(_la==ADD || _la==SUB) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1067); expression(13); + } + break; + case 3: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1068); + if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); + setState(1076); + switch ( getInterpreter().adaptivePredict(_input,124,_ctx) ) { + case 1: + { + setState(1069); match(LT); + setState(1070); match(LT); + } + break; + case 2: + { + setState(1071); match(GT); + setState(1072); match(GT); + setState(1073); match(GT); + } + break; + case 3: + { + setState(1074); match(GT); + setState(1075); match(GT); + } + break; + } + setState(1078); expression(12); + } + break; + case 4: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1079); + if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); + setState(1080); + _la = _input.LA(1); + if ( !(((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (GT - 67)) | (1L << (LT - 67)) | (1L << (LE - 67)) | (1L << (GE - 67)))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1081); expression(11); + } + break; + case 5: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1082); + if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); + setState(1083); + _la = _input.LA(1); + if ( !(_la==EQUAL || _la==NOTEQUAL) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1084); expression(9); + } + break; + case 6: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1085); + if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); + setState(1086); match(BITAND); + setState(1087); expression(8); + } + break; + case 7: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1088); + if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); + setState(1089); match(CARET); + setState(1090); expression(7); + } + break; + case 8: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1091); + if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); + setState(1092); match(BITOR); + setState(1093); expression(6); + } + break; + case 9: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1094); + if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)"); + setState(1095); match(AND); + setState(1096); expression(5); + } + break; + case 10: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1097); + if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); + setState(1098); match(OR); + setState(1099); expression(4); + } + break; + case 11: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1100); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(1101); match(QUESTION); + setState(1102); expression(0); + setState(1103); match(COLON); + setState(1104); expression(3); + } + break; + case 12: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1106); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(1107); + _la = _input.LA(1); + if ( !(((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (ASSIGN - 66)) | (1L << (ADD_ASSIGN - 66)) | (1L << (SUB_ASSIGN - 66)) | (1L << (MUL_ASSIGN - 66)) | (1L << (DIV_ASSIGN - 66)) | (1L << (AND_ASSIGN - 66)) | (1L << (OR_ASSIGN - 66)) | (1L << (XOR_ASSIGN - 66)) | (1L << (MOD_ASSIGN - 66)) | (1L << (LSHIFT_ASSIGN - 66)) | (1L << (RSHIFT_ASSIGN - 66)) | (1L << (URSHIFT_ASSIGN - 66)))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1108); expression(2); + } + break; + case 13: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1109); + if (!(precpred(_ctx, 25))) throw new FailedPredicateException(this, "precpred(_ctx, 25)"); + setState(1110); match(DOT); + setState(1111); match(Identifier); + } + break; + case 14: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1112); + if (!(precpred(_ctx, 24))) throw new FailedPredicateException(this, "precpred(_ctx, 24)"); + setState(1113); match(DOT); + setState(1114); match(THIS); + } + break; + case 15: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1115); + if (!(precpred(_ctx, 23))) throw new FailedPredicateException(this, "precpred(_ctx, 23)"); + setState(1116); match(DOT); + setState(1117); match(NEW); + setState(1119); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1118); nonWildcardTypeArguments(); + } + } + + setState(1121); innerCreator(); + } + break; + case 16: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1122); + if (!(precpred(_ctx, 22))) throw new FailedPredicateException(this, "precpred(_ctx, 22)"); + setState(1123); match(DOT); + setState(1124); match(SUPER); + setState(1125); superSuffix(); + } + break; + case 17: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1126); + if (!(precpred(_ctx, 21))) throw new FailedPredicateException(this, "precpred(_ctx, 21)"); + setState(1127); match(DOT); + setState(1128); explicitGenericInvocation(); + } + break; + case 18: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1129); + if (!(precpred(_ctx, 20))) throw new FailedPredicateException(this, "precpred(_ctx, 20)"); + setState(1130); match(LBRACK); + setState(1131); expression(0); + setState(1132); match(RBRACK); + } + break; + case 19: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1134); + if (!(precpred(_ctx, 19))) throw new FailedPredicateException(this, "precpred(_ctx, 19)"); + setState(1135); match(LPAREN); + setState(1137); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(1136); expressionList(); + } + } + + setState(1139); match(RPAREN); + } + break; + case 20: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1140); + if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)"); + setState(1141); + _la = _input.LA(1); + if ( !(_la==INC || _la==DEC) ) { + _errHandler.recoverInline(this); + } + consume(); + } + break; + case 21: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1142); + if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); + setState(1143); match(INSTANCEOF); + setState(1144); type(); + } + break; + } + } + } + setState(1149); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,128,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class PrimaryContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public ExplicitGenericInvocationSuffixContext explicitGenericInvocationSuffix() { + return getRuleContext(ExplicitGenericInvocationSuffixContext.class,0); + } + public LiteralContext literal() { + return getRuleContext(LiteralContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public PrimaryContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_primary; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitPrimary(this); + else return visitor.visitChildren(this); + } + } + + public final PrimaryContext primary() throws RecognitionException { + PrimaryContext _localctx = new PrimaryContext(_ctx, getState()); + enterRule(_localctx, 176, RULE_primary); + try { + setState(1171); + switch ( getInterpreter().adaptivePredict(_input,130,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1150); match(LPAREN); + setState(1151); expression(0); + setState(1152); match(RPAREN); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1154); match(THIS); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1155); match(SUPER); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(1156); literal(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(1157); match(Identifier); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(1158); type(); + setState(1159); match(DOT); + setState(1160); match(CLASS); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(1162); match(VOID); + setState(1163); match(DOT); + setState(1164); match(CLASS); + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(1165); nonWildcardTypeArguments(); + setState(1169); + switch (_input.LA(1)) { + case SUPER: + case Identifier: + { + setState(1166); explicitGenericInvocationSuffix(); + } + break; + case THIS: + { + setState(1167); match(THIS); + setState(1168); arguments(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CreatorContext extends ParserRuleContext { + public ArrayCreatorRestContext arrayCreatorRest() { + return getRuleContext(ArrayCreatorRestContext.class,0); + } + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public ClassCreatorRestContext classCreatorRest() { + return getRuleContext(ClassCreatorRestContext.class,0); + } + public CreatedNameContext createdName() { + return getRuleContext(CreatedNameContext.class,0); + } + public CreatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_creator; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitCreator(this); + else return visitor.visitChildren(this); + } + } + + public final CreatorContext creator() throws RecognitionException { + CreatorContext _localctx = new CreatorContext(_ctx, getState()); + enterRule(_localctx, 178, RULE_creator); + try { + setState(1182); + switch (_input.LA(1)) { + case LT: + enterOuterAlt(_localctx, 1); + { + setState(1173); nonWildcardTypeArguments(); + setState(1174); createdName(); + setState(1175); classCreatorRest(); + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + enterOuterAlt(_localctx, 2); + { + setState(1177); createdName(); + setState(1180); + switch (_input.LA(1)) { + case LBRACK: + { + setState(1178); arrayCreatorRest(); + } + break; + case LPAREN: + { + setState(1179); classCreatorRest(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CreatedNameContext extends ParserRuleContext { + public List Identifier() { return getTokens(Java8Parser.Identifier); } + public TerminalNode Identifier(int i) { + return getToken(Java8Parser.Identifier, i); + } + public List typeArgumentsOrDiamond() { + return getRuleContexts(TypeArgumentsOrDiamondContext.class); + } + public PrimitiveTypeContext primitiveType() { + return getRuleContext(PrimitiveTypeContext.class,0); + } + public TypeArgumentsOrDiamondContext typeArgumentsOrDiamond(int i) { + return getRuleContext(TypeArgumentsOrDiamondContext.class,i); + } + public CreatedNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_createdName; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitCreatedName(this); + else return visitor.visitChildren(this); + } + } + + public final CreatedNameContext createdName() throws RecognitionException { + CreatedNameContext _localctx = new CreatedNameContext(_ctx, getState()); + enterRule(_localctx, 180, RULE_createdName); + int _la; + try { + setState(1199); + switch (_input.LA(1)) { + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(1184); match(Identifier); + setState(1186); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1185); typeArgumentsOrDiamond(); + } + } + + setState(1195); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==DOT) { + { + { + setState(1188); match(DOT); + setState(1189); match(Identifier); + setState(1191); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1190); typeArgumentsOrDiamond(); + } + } + + } + } + setState(1197); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + enterOuterAlt(_localctx, 2); + { + setState(1198); primitiveType(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InnerCreatorContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public ClassCreatorRestContext classCreatorRest() { + return getRuleContext(ClassCreatorRestContext.class,0); + } + public NonWildcardTypeArgumentsOrDiamondContext nonWildcardTypeArgumentsOrDiamond() { + return getRuleContext(NonWildcardTypeArgumentsOrDiamondContext.class,0); + } + public InnerCreatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_innerCreator; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitInnerCreator(this); + else return visitor.visitChildren(this); + } + } + + public final InnerCreatorContext innerCreator() throws RecognitionException { + InnerCreatorContext _localctx = new InnerCreatorContext(_ctx, getState()); + enterRule(_localctx, 182, RULE_innerCreator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1201); match(Identifier); + setState(1203); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1202); nonWildcardTypeArgumentsOrDiamond(); + } + } + + setState(1205); classCreatorRest(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrayCreatorRestContext extends ParserRuleContext { + public ArrayInitializerContext arrayInitializer() { + return getRuleContext(ArrayInitializerContext.class,0); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ArrayCreatorRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayCreatorRest; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitArrayCreatorRest(this); + else return visitor.visitChildren(this); + } + } + + public final ArrayCreatorRestContext arrayCreatorRest() throws RecognitionException { + ArrayCreatorRestContext _localctx = new ArrayCreatorRestContext(_ctx, getState()); + enterRule(_localctx, 184, RULE_arrayCreatorRest); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1207); match(LBRACK); + setState(1235); + switch (_input.LA(1)) { + case RBRACK: + { + setState(1208); match(RBRACK); + setState(1213); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(1209); match(LBRACK); + setState(1210); match(RBRACK); + } + } + setState(1215); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1216); arrayInitializer(); + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case NEW: + case SHORT: + case SUPER: + case THIS: + case VOID: + case IntegerLiteral: + case FloatingPointLiteral: + case BooleanLiteral: + case CharacterLiteral: + case StringLiteral: + case NullLiteral: + case LPAREN: + case LT: + case BANG: + case TILDE: + case INC: + case DEC: + case ADD: + case SUB: + case Identifier: + { + setState(1217); expression(0); + setState(1218); match(RBRACK); + setState(1225); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,139,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1219); match(LBRACK); + setState(1220); expression(0); + setState(1221); match(RBRACK); + } + } + } + setState(1227); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,139,_ctx); + } + setState(1232); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,140,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1228); match(LBRACK); + setState(1229); match(RBRACK); + } + } + } + setState(1234); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,140,_ctx); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassCreatorRestContext extends ParserRuleContext { + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public ClassCreatorRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classCreatorRest; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitClassCreatorRest(this); + else return visitor.visitChildren(this); + } + } + + public final ClassCreatorRestContext classCreatorRest() throws RecognitionException { + ClassCreatorRestContext _localctx = new ClassCreatorRestContext(_ctx, getState()); + enterRule(_localctx, 186, RULE_classCreatorRest); + try { + enterOuterAlt(_localctx, 1); + { + setState(1237); arguments(); + setState(1239); + switch ( getInterpreter().adaptivePredict(_input,142,_ctx) ) { + case 1: + { + setState(1238); classBody(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExplicitGenericInvocationContext extends ParserRuleContext { + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public ExplicitGenericInvocationSuffixContext explicitGenericInvocationSuffix() { + return getRuleContext(ExplicitGenericInvocationSuffixContext.class,0); + } + public ExplicitGenericInvocationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_explicitGenericInvocation; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitExplicitGenericInvocation(this); + else return visitor.visitChildren(this); + } + } + + public final ExplicitGenericInvocationContext explicitGenericInvocation() throws RecognitionException { + ExplicitGenericInvocationContext _localctx = new ExplicitGenericInvocationContext(_ctx, getState()); + enterRule(_localctx, 188, RULE_explicitGenericInvocation); + try { + enterOuterAlt(_localctx, 1); + { + setState(1241); nonWildcardTypeArguments(); + setState(1242); explicitGenericInvocationSuffix(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NonWildcardTypeArgumentsContext extends ParserRuleContext { + public TypeListContext typeList() { + return getRuleContext(TypeListContext.class,0); + } + public NonWildcardTypeArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_nonWildcardTypeArguments; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitNonWildcardTypeArguments(this); + else return visitor.visitChildren(this); + } + } + + public final NonWildcardTypeArgumentsContext nonWildcardTypeArguments() throws RecognitionException { + NonWildcardTypeArgumentsContext _localctx = new NonWildcardTypeArgumentsContext(_ctx, getState()); + enterRule(_localctx, 190, RULE_nonWildcardTypeArguments); + try { + enterOuterAlt(_localctx, 1); + { + setState(1244); match(LT); + setState(1245); typeList(); + setState(1246); match(GT); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentsOrDiamondContext extends ParserRuleContext { + public TypeArgumentsContext typeArguments() { + return getRuleContext(TypeArgumentsContext.class,0); + } + public TypeArgumentsOrDiamondContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArgumentsOrDiamond; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitTypeArgumentsOrDiamond(this); + else return visitor.visitChildren(this); + } + } + + public final TypeArgumentsOrDiamondContext typeArgumentsOrDiamond() throws RecognitionException { + TypeArgumentsOrDiamondContext _localctx = new TypeArgumentsOrDiamondContext(_ctx, getState()); + enterRule(_localctx, 192, RULE_typeArgumentsOrDiamond); + try { + setState(1251); + switch ( getInterpreter().adaptivePredict(_input,143,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1248); match(LT); + setState(1249); match(GT); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1250); typeArguments(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NonWildcardTypeArgumentsOrDiamondContext extends ParserRuleContext { + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public NonWildcardTypeArgumentsOrDiamondContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_nonWildcardTypeArgumentsOrDiamond; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitNonWildcardTypeArgumentsOrDiamond(this); + else return visitor.visitChildren(this); + } + } + + public final NonWildcardTypeArgumentsOrDiamondContext nonWildcardTypeArgumentsOrDiamond() throws RecognitionException { + NonWildcardTypeArgumentsOrDiamondContext _localctx = new NonWildcardTypeArgumentsOrDiamondContext(_ctx, getState()); + enterRule(_localctx, 194, RULE_nonWildcardTypeArgumentsOrDiamond); + try { + setState(1256); + switch ( getInterpreter().adaptivePredict(_input,144,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1253); match(LT); + setState(1254); match(GT); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1255); nonWildcardTypeArguments(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SuperSuffixContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public SuperSuffixContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_superSuffix; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitSuperSuffix(this); + else return visitor.visitChildren(this); + } + } + + public final SuperSuffixContext superSuffix() throws RecognitionException { + SuperSuffixContext _localctx = new SuperSuffixContext(_ctx, getState()); + enterRule(_localctx, 196, RULE_superSuffix); + try { + setState(1264); + switch (_input.LA(1)) { + case LPAREN: + enterOuterAlt(_localctx, 1); + { + setState(1258); arguments(); + } + break; + case DOT: + enterOuterAlt(_localctx, 2); + { + setState(1259); match(DOT); + setState(1260); match(Identifier); + setState(1262); + switch ( getInterpreter().adaptivePredict(_input,145,_ctx) ) { + case 1: + { + setState(1261); arguments(); + } + break; + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExplicitGenericInvocationSuffixContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public SuperSuffixContext superSuffix() { + return getRuleContext(SuperSuffixContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public ExplicitGenericInvocationSuffixContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_explicitGenericInvocationSuffix; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitExplicitGenericInvocationSuffix(this); + else return visitor.visitChildren(this); + } + } + + public final ExplicitGenericInvocationSuffixContext explicitGenericInvocationSuffix() throws RecognitionException { + ExplicitGenericInvocationSuffixContext _localctx = new ExplicitGenericInvocationSuffixContext(_ctx, getState()); + enterRule(_localctx, 198, RULE_explicitGenericInvocationSuffix); + try { + setState(1270); + switch (_input.LA(1)) { + case SUPER: + enterOuterAlt(_localctx, 1); + { + setState(1266); match(SUPER); + setState(1267); superSuffix(); + } + break; + case Identifier: + enterOuterAlt(_localctx, 2); + { + setState(1268); match(Identifier); + setState(1269); arguments(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArgumentsContext extends ParserRuleContext { + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public ArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arguments; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof Java8Visitor ) return ((Java8Visitor)visitor).visitArguments(this); + else return visitor.visitChildren(this); + } + } + + public final ArgumentsContext arguments() throws RecognitionException { + ArgumentsContext _localctx = new ArgumentsContext(_ctx, getState()); + enterRule(_localctx, 200, RULE_arguments); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1272); match(LPAREN); + setState(1274); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(1273); expressionList(); + } + } + + setState(1276); match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 87: return expression_sempred((ExpressionContext)_localctx, predIndex); + } + return true; + } + private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 0: return precpred(_ctx, 13); + case 1: return precpred(_ctx, 12); + case 2: return precpred(_ctx, 11); + case 3: return precpred(_ctx, 10); + case 4: return precpred(_ctx, 8); + case 5: return precpred(_ctx, 7); + case 6: return precpred(_ctx, 6); + case 7: return precpred(_ctx, 5); + case 8: return precpred(_ctx, 4); + case 9: return precpred(_ctx, 3); + case 10: return precpred(_ctx, 2); + case 11: return precpred(_ctx, 1); + case 12: return precpred(_ctx, 25); + case 13: return precpred(_ctx, 24); + case 14: return precpred(_ctx, 23); + case 15: return precpred(_ctx, 22); + case 16: return precpred(_ctx, 21); + case 17: return precpred(_ctx, 20); + case 18: return precpred(_ctx, 19); + case 19: return precpred(_ctx, 16); + case 20: return precpred(_ctx, 9); + } + return true; + } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3k\u0501\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\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\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ + "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ + "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ + "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\3\2\5\2\u00ce\n\2\3\2\7\2\u00d1"+ + "\n\2\f\2\16\2\u00d4\13\2\3\2\7\2\u00d7\n\2\f\2\16\2\u00da\13\2\3\2\3\2"+ + "\3\3\7\3\u00df\n\3\f\3\16\3\u00e2\13\3\3\3\3\3\3\3\3\3\3\4\3\4\5\4\u00ea"+ + "\n\4\3\4\3\4\3\4\5\4\u00ef\n\4\3\4\3\4\3\5\7\5\u00f4\n\5\f\5\16\5\u00f7"+ + "\13\5\3\5\3\5\7\5\u00fb\n\5\f\5\16\5\u00fe\13\5\3\5\3\5\7\5\u0102\n\5"+ + "\f\5\16\5\u0105\13\5\3\5\3\5\7\5\u0109\n\5\f\5\16\5\u010c\13\5\3\5\3\5"+ + "\5\5\u0110\n\5\3\6\3\6\5\6\u0114\n\6\3\7\3\7\5\7\u0118\n\7\3\b\3\b\5\b"+ + "\u011c\n\b\3\t\3\t\3\t\5\t\u0121\n\t\3\t\3\t\5\t\u0125\n\t\3\t\3\t\5\t"+ + "\u0129\n\t\3\t\3\t\3\n\3\n\3\n\3\n\7\n\u0131\n\n\f\n\16\n\u0134\13\n\3"+ + "\n\3\n\3\13\3\13\3\13\5\13\u013b\n\13\3\f\3\f\3\f\7\f\u0140\n\f\f\f\16"+ + "\f\u0143\13\f\3\r\3\r\3\r\3\r\5\r\u0149\n\r\3\r\3\r\5\r\u014d\n\r\3\r"+ + "\5\r\u0150\n\r\3\r\5\r\u0153\n\r\3\r\3\r\3\16\3\16\3\16\7\16\u015a\n\16"+ + "\f\16\16\16\u015d\13\16\3\17\7\17\u0160\n\17\f\17\16\17\u0163\13\17\3"+ + "\17\3\17\5\17\u0167\n\17\3\17\5\17\u016a\n\17\3\20\3\20\7\20\u016e\n\20"+ + "\f\20\16\20\u0171\13\20\3\21\3\21\3\21\5\21\u0176\n\21\3\21\3\21\5\21"+ + "\u017a\n\21\3\21\3\21\3\22\3\22\3\22\7\22\u0181\n\22\f\22\16\22\u0184"+ + "\13\22\3\23\3\23\7\23\u0188\n\23\f\23\16\23\u018b\13\23\3\23\3\23\3\24"+ + "\3\24\7\24\u0191\n\24\f\24\16\24\u0194\13\24\3\24\3\24\3\25\3\25\5\25"+ + "\u019a\n\25\3\25\3\25\7\25\u019e\n\25\f\25\16\25\u01a1\13\25\3\25\5\25"+ + "\u01a4\n\25\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\5\26\u01af\n"+ + "\26\3\27\3\27\5\27\u01b3\n\27\3\27\3\27\3\27\3\27\7\27\u01b9\n\27\f\27"+ + "\16\27\u01bc\13\27\3\27\3\27\5\27\u01c0\n\27\3\27\3\27\5\27\u01c4\n\27"+ + "\3\30\3\30\3\30\3\31\3\31\3\31\3\31\5\31\u01cd\n\31\3\31\3\31\3\32\3\32"+ + "\3\32\3\33\3\33\3\33\3\33\3\34\7\34\u01d9\n\34\f\34\16\34\u01dc\13\34"+ + "\3\34\3\34\5\34\u01e0\n\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35\5\35\u01e9"+ + "\n\35\3\36\3\36\3\36\3\36\7\36\u01ef\n\36\f\36\16\36\u01f2\13\36\3\36"+ + "\3\36\3\37\3\37\3\37\7\37\u01f9\n\37\f\37\16\37\u01fc\13\37\3\37\3\37"+ + "\3\37\3 \3 \5 \u0203\n \3 \3 \3 \3 \7 \u0209\n \f \16 \u020c\13 \3 \3"+ + " \5 \u0210\n \3 \3 \3!\3!\3!\3\"\3\"\3\"\7\"\u021a\n\"\f\"\16\"\u021d"+ + "\13\"\3#\3#\3#\5#\u0222\n#\3$\3$\3$\7$\u0227\n$\f$\16$\u022a\13$\3%\3"+ + "%\5%\u022e\n%\3&\3&\3&\3&\7&\u0234\n&\f&\16&\u0237\13&\3&\5&\u023a\n&"+ + "\5&\u023c\n&\3&\3&\3\'\3\'\3(\3(\3(\7(\u0245\n(\f(\16(\u0248\13(\3(\3"+ + "(\3(\7(\u024d\n(\f(\16(\u0250\13(\5(\u0252\n(\3)\3)\5)\u0256\n)\3)\3)"+ + "\3)\5)\u025b\n)\7)\u025d\n)\f)\16)\u0260\13)\3*\3*\3+\3+\3+\3+\7+\u0268"+ + "\n+\f+\16+\u026b\13+\3+\3+\3,\3,\3,\3,\5,\u0273\n,\5,\u0275\n,\3-\3-\3"+ + "-\7-\u027a\n-\f-\16-\u027d\13-\3.\3.\5.\u0281\n.\3.\3.\3/\3/\3/\7/\u0288"+ + "\n/\f/\16/\u028b\13/\3/\3/\5/\u028f\n/\3/\5/\u0292\n/\3\60\7\60\u0295"+ + "\n\60\f\60\16\60\u0298\13\60\3\60\3\60\3\60\3\61\7\61\u029e\n\61\f\61"+ + "\16\61\u02a1\13\61\3\61\3\61\3\61\3\61\3\62\3\62\3\63\3\63\3\64\3\64\3"+ + "\64\7\64\u02ae\n\64\f\64\16\64\u02b1\13\64\3\65\3\65\3\66\3\66\3\66\3"+ + "\66\3\66\5\66\u02ba\n\66\3\66\5\66\u02bd\n\66\3\67\3\67\38\38\38\78\u02c4"+ + "\n8\f8\168\u02c7\138\39\39\39\39\3:\3:\3:\5:\u02d0\n:\3;\3;\3;\3;\7;\u02d6"+ + "\n;\f;\16;\u02d9\13;\5;\u02db\n;\3;\5;\u02de\n;\3;\3;\3<\3<\3<\3<\3<\3"+ + "=\3=\7=\u02e9\n=\f=\16=\u02ec\13=\3=\3=\3>\7>\u02f1\n>\f>\16>\u02f4\13"+ + ">\3>\3>\5>\u02f8\n>\3?\3?\3?\3?\3?\3?\5?\u0300\n?\3?\3?\5?\u0304\n?\3"+ + "?\3?\5?\u0308\n?\3?\3?\5?\u030c\n?\5?\u030e\n?\3@\3@\5@\u0312\n@\3A\3"+ + "A\3A\3A\5A\u0318\nA\3B\3B\3C\3C\3C\3D\3D\7D\u0321\nD\fD\16D\u0324\13D"+ + "\3D\3D\3E\3E\3E\5E\u032b\nE\3F\3F\3F\3G\7G\u0331\nG\fG\16G\u0334\13G\3"+ + "G\3G\3G\3H\3H\3H\3H\3H\5H\u033e\nH\3H\3H\3H\3H\3H\3H\3H\5H\u0347\nH\3"+ + "H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\6H\u035c\nH\r"+ + "H\16H\u035d\3H\5H\u0361\nH\3H\5H\u0364\nH\3H\3H\3H\3H\7H\u036a\nH\fH\16"+ + "H\u036d\13H\3H\5H\u0370\nH\3H\3H\3H\3H\7H\u0376\nH\fH\16H\u0379\13H\3"+ + "H\7H\u037c\nH\fH\16H\u037f\13H\3H\3H\3H\3H\3H\3H\3H\3H\5H\u0389\nH\3H"+ + "\3H\3H\3H\3H\3H\3H\5H\u0392\nH\3H\3H\3H\5H\u0397\nH\3H\3H\3H\3H\3H\3H"+ + "\3H\3H\5H\u03a1\nH\3I\3I\3I\7I\u03a6\nI\fI\16I\u03a9\13I\3I\3I\3I\3I\3"+ + "I\3J\3J\3J\7J\u03b3\nJ\fJ\16J\u03b6\13J\3K\3K\3K\3L\3L\3L\5L\u03be\nL"+ + "\3L\3L\3M\3M\3M\7M\u03c5\nM\fM\16M\u03c8\13M\3N\7N\u03cb\nN\fN\16N\u03ce"+ + "\13N\3N\3N\3N\3N\3N\3O\6O\u03d6\nO\rO\16O\u03d7\3O\6O\u03db\nO\rO\16O"+ + "\u03dc\3P\3P\3P\3P\3P\3P\3P\3P\3P\3P\5P\u03e9\nP\3Q\3Q\5Q\u03ed\nQ\3Q"+ + "\3Q\5Q\u03f1\nQ\3Q\3Q\5Q\u03f5\nQ\5Q\u03f7\nQ\3R\3R\5R\u03fb\nR\3S\7S"+ + "\u03fe\nS\fS\16S\u0401\13S\3S\3S\3S\3S\3S\3T\3T\3U\3U\3U\3U\3V\3V\3V\7"+ + "V\u0411\nV\fV\16V\u0414\13V\3W\3W\3X\3X\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y"+ + "\3Y\3Y\3Y\5Y\u0427\nY\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\5Y\u0437"+ + "\nY\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y"+ + "\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\5Y\u0462\nY"+ + "\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\5Y\u0474\nY\3Y\3Y\3Y"+ + "\3Y\3Y\3Y\7Y\u047c\nY\fY\16Y\u047f\13Y\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3"+ + "Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\5Z\u0494\nZ\5Z\u0496\nZ\3[\3[\3[\3[\3[\3[\3"+ + "[\5[\u049f\n[\5[\u04a1\n[\3\\\3\\\5\\\u04a5\n\\\3\\\3\\\3\\\5\\\u04aa"+ + "\n\\\7\\\u04ac\n\\\f\\\16\\\u04af\13\\\3\\\5\\\u04b2\n\\\3]\3]\5]\u04b6"+ + "\n]\3]\3]\3^\3^\3^\3^\7^\u04be\n^\f^\16^\u04c1\13^\3^\3^\3^\3^\3^\3^\3"+ + "^\7^\u04ca\n^\f^\16^\u04cd\13^\3^\3^\7^\u04d1\n^\f^\16^\u04d4\13^\5^\u04d6"+ + "\n^\3_\3_\5_\u04da\n_\3`\3`\3`\3a\3a\3a\3a\3b\3b\3b\5b\u04e6\nb\3c\3c"+ + "\3c\5c\u04eb\nc\3d\3d\3d\3d\5d\u04f1\nd\5d\u04f3\nd\3e\3e\3e\3e\5e\u04f9"+ + "\ne\3f\3f\5f\u04fd\nf\3f\3f\3f\2\3\u00b0g\2\4\6\b\n\f\16\20\22\24\26\30"+ + "\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~\u0080"+ + "\u0082\u0084\u0086\u0088\u008a\u008c\u008e\u0090\u0092\u0094\u0096\u0098"+ + "\u009a\u009c\u009e\u00a0\u00a2\u00a4\u00a6\u00a8\u00aa\u00ac\u00ae\u00b0"+ + "\u00b2\u00b4\u00b6\u00b8\u00ba\u00bc\u00be\u00c0\u00c2\u00c4\u00c6\u00c8"+ + "\u00ca\2\17\6\2 ,,\60\60\63\63\6\2\3\3\24\24#%()\n\2\5\5\7\7\n\n\20\20"+ + "\26\26\35\35\37\37\'\'\4\2\23\23**\3\2\65:\3\2QT\3\2GH\4\2UVZZ\3\2ST\4"+ + "\2EFLM\4\2KKNN\4\2DD[e\3\2QR\u0573\2\u00cd\3\2\2\2\4\u00e0\3\2\2\2\6\u00e7"+ + "\3\2\2\2\b\u010f\3\2\2\2\n\u0113\3\2\2\2\f\u0117\3\2\2\2\16\u011b\3\2"+ + "\2\2\20\u011d\3\2\2\2\22\u012c\3\2\2\2\24\u0137\3\2\2\2\26\u013c\3\2\2"+ + "\2\30\u0144\3\2\2\2\32\u0156\3\2\2\2\34\u0161\3\2\2\2\36\u016b\3\2\2\2"+ + " \u0172\3\2\2\2\"\u017d\3\2\2\2$\u0185\3\2\2\2&\u018e\3\2\2\2(\u01a3\3"+ + "\2\2\2*\u01ae\3\2\2\2,\u01b2\3\2\2\2.\u01c5\3\2\2\2\60\u01c8\3\2\2\2\62"+ + "\u01d0\3\2\2\2\64\u01d3\3\2\2\2\66\u01df\3\2\2\28\u01e8\3\2\2\2:\u01ea"+ + "\3\2\2\2<\u01f5\3\2\2\2>\u0202\3\2\2\2@\u0213\3\2\2\2B\u0216\3\2\2\2D"+ + "\u021e\3\2\2\2F\u0223\3\2\2\2H\u022d\3\2\2\2J\u022f\3\2\2\2L\u023f\3\2"+ + "\2\2N\u0251\3\2\2\2P\u0253\3\2\2\2R\u0261\3\2\2\2T\u0263\3\2\2\2V\u0274"+ + "\3\2\2\2X\u0276\3\2\2\2Z\u027e\3\2\2\2\\\u0291\3\2\2\2^\u0296\3\2\2\2"+ + "`\u029f\3\2\2\2b\u02a6\3\2\2\2d\u02a8\3\2\2\2f\u02aa\3\2\2\2h\u02b2\3"+ + "\2\2\2j\u02b4\3\2\2\2l\u02be\3\2\2\2n\u02c0\3\2\2\2p\u02c8\3\2\2\2r\u02cf"+ + "\3\2\2\2t\u02d1\3\2\2\2v\u02e1\3\2\2\2x\u02e6\3\2\2\2z\u02f7\3\2\2\2|"+ + "\u030d\3\2\2\2~\u0311\3\2\2\2\u0080\u0313\3\2\2\2\u0082\u0319\3\2\2\2"+ + "\u0084\u031b\3\2\2\2\u0086\u031e\3\2\2\2\u0088\u032a\3\2\2\2\u008a\u032c"+ + "\3\2\2\2\u008c\u0332\3\2\2\2\u008e\u03a0\3\2\2\2\u0090\u03a2\3\2\2\2\u0092"+ + "\u03af\3\2\2\2\u0094\u03b7\3\2\2\2\u0096\u03ba\3\2\2\2\u0098\u03c1\3\2"+ + "\2\2\u009a\u03cc\3\2\2\2\u009c\u03d5\3\2\2\2\u009e\u03e8\3\2\2\2\u00a0"+ + "\u03f6\3\2\2\2\u00a2\u03fa\3\2\2\2\u00a4\u03ff\3\2\2\2\u00a6\u0407\3\2"+ + "\2\2\u00a8\u0409\3\2\2\2\u00aa\u040d\3\2\2\2\u00ac\u0415\3\2\2\2\u00ae"+ + "\u0417\3\2\2\2\u00b0\u0426\3\2\2\2\u00b2\u0495\3\2\2\2\u00b4\u04a0\3\2"+ + "\2\2\u00b6\u04b1\3\2\2\2\u00b8\u04b3\3\2\2\2\u00ba\u04b9\3\2\2\2\u00bc"+ + "\u04d7\3\2\2\2\u00be\u04db\3\2\2\2\u00c0\u04de\3\2\2\2\u00c2\u04e5\3\2"+ + "\2\2\u00c4\u04ea\3\2\2\2\u00c6\u04f2\3\2\2\2\u00c8\u04f8\3\2\2\2\u00ca"+ + "\u04fa\3\2\2\2\u00cc\u00ce\5\4\3\2\u00cd\u00cc\3\2\2\2\u00cd\u00ce\3\2"+ + "\2\2\u00ce\u00d2\3\2\2\2\u00cf\u00d1\5\6\4\2\u00d0\u00cf\3\2\2\2\u00d1"+ + "\u00d4\3\2\2\2\u00d2\u00d0\3\2\2\2\u00d2\u00d3\3\2\2\2\u00d3\u00d8\3\2"+ + "\2\2\u00d4\u00d2\3\2\2\2\u00d5\u00d7\5\b\5\2\u00d6\u00d5\3\2\2\2\u00d7"+ + "\u00da\3\2\2\2\u00d8\u00d6\3\2\2\2\u00d8\u00d9\3\2\2\2\u00d9\u00db\3\2"+ + "\2\2\u00da\u00d8\3\2\2\2\u00db\u00dc\7\2\2\3\u00dc\3\3\2\2\2\u00dd\u00df"+ + "\5j\66\2\u00de\u00dd\3\2\2\2\u00df\u00e2\3\2\2\2\u00e0\u00de\3\2\2\2\u00e0"+ + "\u00e1\3\2\2\2\u00e1\u00e3\3\2\2\2\u00e2\u00e0\3\2\2\2\u00e3\u00e4\7\""+ + "\2\2\u00e4\u00e5\5f\64\2\u00e5\u00e6\7A\2\2\u00e6\5\3\2\2\2\u00e7\u00e9"+ + "\7\33\2\2\u00e8\u00ea\7(\2\2\u00e9\u00e8\3\2\2\2\u00e9\u00ea\3\2\2\2\u00ea"+ + "\u00eb\3\2\2\2\u00eb\u00ee\5f\64\2\u00ec\u00ed\7C\2\2\u00ed\u00ef\7U\2"+ + "\2\u00ee\u00ec\3\2\2\2\u00ee\u00ef\3\2\2\2\u00ef\u00f0\3\2\2\2\u00f0\u00f1"+ + "\7A\2\2\u00f1\7\3\2\2\2\u00f2\u00f4\5\f\7\2\u00f3\u00f2\3\2\2\2\u00f4"+ + "\u00f7\3\2\2\2\u00f5\u00f3\3\2\2\2\u00f5\u00f6\3\2\2\2\u00f6\u00f8\3\2"+ + "\2\2\u00f7\u00f5\3\2\2\2\u00f8\u0110\5\20\t\2\u00f9\u00fb\5\f\7\2\u00fa"+ + "\u00f9\3\2\2\2\u00fb\u00fe\3\2\2\2\u00fc\u00fa\3\2\2\2\u00fc\u00fd\3\2"+ + "\2\2\u00fd\u00ff\3\2\2\2\u00fe\u00fc\3\2\2\2\u00ff\u0110\5\30\r\2\u0100"+ + "\u0102\5\f\7\2\u0101\u0100\3\2\2\2\u0102\u0105\3\2\2\2\u0103\u0101\3\2"+ + "\2\2\u0103\u0104\3\2\2\2\u0104\u0106\3\2\2\2\u0105\u0103\3\2\2\2\u0106"+ + "\u0110\5 \21\2\u0107\u0109\5\f\7\2\u0108\u0107\3\2\2\2\u0109\u010c\3\2"+ + "\2\2\u010a\u0108\3\2\2\2\u010a\u010b\3\2\2\2\u010b\u010d\3\2\2\2\u010c"+ + "\u010a\3\2\2\2\u010d\u0110\5v<\2\u010e\u0110\7A\2\2\u010f\u00f5\3\2\2"+ + "\2\u010f\u00fc\3\2\2\2\u010f\u0103\3\2\2\2\u010f\u010a\3\2\2\2\u010f\u010e"+ + "\3\2\2\2\u0110\t\3\2\2\2\u0111\u0114\5\f\7\2\u0112\u0114\t\2\2\2\u0113"+ + "\u0111\3\2\2\2\u0113\u0112\3\2\2\2\u0114\13\3\2\2\2\u0115\u0118\5j\66"+ + "\2\u0116\u0118\t\3\2\2\u0117\u0115\3\2\2\2\u0117\u0116\3\2\2\2\u0118\r"+ + "\3\2\2\2\u0119\u011c\7\24\2\2\u011a\u011c\5j\66\2\u011b\u0119\3\2\2\2"+ + "\u011b\u011a\3\2\2\2\u011c\17\3\2\2\2\u011d\u011e\7\13\2\2\u011e\u0120"+ + "\7f\2\2\u011f\u0121\5\22\n\2\u0120\u011f\3\2\2\2\u0120\u0121\3\2\2\2\u0121"+ + "\u0124\3\2\2\2\u0122\u0123\7\23\2\2\u0123\u0125\5N(\2\u0124\u0122\3\2"+ + "\2\2\u0124\u0125\3\2\2\2\u0125\u0128\3\2\2\2\u0126\u0127\7\32\2\2\u0127"+ + "\u0129\5\"\22\2\u0128\u0126\3\2\2\2\u0128\u0129\3\2\2\2\u0129\u012a\3"+ + "\2\2\2\u012a\u012b\5$\23\2\u012b\21\3\2\2\2\u012c\u012d\7F\2\2\u012d\u0132"+ + "\5\24\13\2\u012e\u012f\7B\2\2\u012f\u0131\5\24\13\2\u0130\u012e\3\2\2"+ + "\2\u0131\u0134\3\2\2\2\u0132\u0130\3\2\2\2\u0132\u0133\3\2\2\2\u0133\u0135"+ + "\3\2\2\2\u0134\u0132\3\2\2\2\u0135\u0136\7E\2\2\u0136\23\3\2\2\2\u0137"+ + "\u013a\7f\2\2\u0138\u0139\7\23\2\2\u0139\u013b\5\26\f\2\u013a\u0138\3"+ + "\2\2\2\u013a\u013b\3\2\2\2\u013b\25\3\2\2\2\u013c\u0141\5N(\2\u013d\u013e"+ + "\7W\2\2\u013e\u0140\5N(\2\u013f\u013d\3\2\2\2\u0140\u0143\3\2\2\2\u0141"+ + "\u013f\3\2\2\2\u0141\u0142\3\2\2\2\u0142\27\3\2\2\2\u0143\u0141\3\2\2"+ + "\2\u0144\u0145\7\22\2\2\u0145\u0148\7f\2\2\u0146\u0147\7\32\2\2\u0147"+ + "\u0149\5\"\22\2\u0148\u0146\3\2\2\2\u0148\u0149\3\2\2\2\u0149\u014a\3"+ + "\2\2\2\u014a\u014c\7=\2\2\u014b\u014d\5\32\16\2\u014c\u014b\3\2\2\2\u014c"+ + "\u014d\3\2\2\2\u014d\u014f\3\2\2\2\u014e\u0150\7B\2\2\u014f\u014e\3\2"+ + "\2\2\u014f\u0150\3\2\2\2\u0150\u0152\3\2\2\2\u0151\u0153\5\36\20\2\u0152"+ + "\u0151\3\2\2\2\u0152\u0153\3\2\2\2\u0153\u0154\3\2\2\2\u0154\u0155\7>"+ + "\2\2\u0155\31\3\2\2\2\u0156\u015b\5\34\17\2\u0157\u0158\7B\2\2\u0158\u015a"+ + "\5\34\17\2\u0159\u0157\3\2\2\2\u015a\u015d\3\2\2\2\u015b\u0159\3\2\2\2"+ + "\u015b\u015c\3\2\2\2\u015c\33\3\2\2\2\u015d\u015b\3\2\2\2\u015e\u0160"+ + "\5j\66\2\u015f\u015e\3\2\2\2\u0160\u0163\3\2\2\2\u0161\u015f\3\2\2\2\u0161"+ + "\u0162\3\2\2\2\u0162\u0164\3\2\2\2\u0163\u0161\3\2\2\2\u0164\u0166\7f"+ + "\2\2\u0165\u0167\5\u00caf\2\u0166\u0165\3\2\2\2\u0166\u0167\3\2\2\2\u0167"+ + "\u0169\3\2\2\2\u0168\u016a\5$\23\2\u0169\u0168\3\2\2\2\u0169\u016a\3\2"+ + "\2\2\u016a\35\3\2\2\2\u016b\u016f\7A\2\2\u016c\u016e\5(\25\2\u016d\u016c"+ + "\3\2\2\2\u016e\u0171\3\2\2\2\u016f\u016d\3\2\2\2\u016f\u0170\3\2\2\2\u0170"+ + "\37\3\2\2\2\u0171\u016f\3\2\2\2\u0172\u0173\7\36\2\2\u0173\u0175\7f\2"+ + "\2\u0174\u0176\5\22\n\2\u0175\u0174\3\2\2\2\u0175\u0176\3\2\2\2\u0176"+ + "\u0179\3\2\2\2\u0177\u0178\7\23\2\2\u0178\u017a\5\"\22\2\u0179\u0177\3"+ + "\2\2\2\u0179\u017a\3\2\2\2\u017a\u017b\3\2\2\2\u017b\u017c\5&\24\2\u017c"+ + "!\3\2\2\2\u017d\u0182\5N(\2\u017e\u017f\7B\2\2\u017f\u0181\5N(\2\u0180"+ + "\u017e\3\2\2\2\u0181\u0184\3\2\2\2\u0182\u0180\3\2\2\2\u0182\u0183\3\2"+ + "\2\2\u0183#\3\2\2\2\u0184\u0182\3\2\2\2\u0185\u0189\7=\2\2\u0186\u0188"+ + "\5(\25\2\u0187\u0186\3\2\2\2\u0188\u018b\3\2\2\2\u0189\u0187\3\2\2\2\u0189"+ + "\u018a\3\2\2\2\u018a\u018c\3\2\2\2\u018b\u0189\3\2\2\2\u018c\u018d\7>"+ + "\2\2\u018d%\3\2\2\2\u018e\u0192\7=\2\2\u018f\u0191\5\66\34\2\u0190\u018f"+ + "\3\2\2\2\u0191\u0194\3\2\2\2\u0192\u0190\3\2\2\2\u0192\u0193\3\2\2\2\u0193"+ + "\u0195\3\2\2\2\u0194\u0192\3\2\2\2\u0195\u0196\7>\2\2\u0196\'\3\2\2\2"+ + "\u0197\u01a4\7A\2\2\u0198\u019a\7(\2\2\u0199\u0198\3\2\2\2\u0199\u019a"+ + "\3\2\2\2\u019a\u019b\3\2\2\2\u019b\u01a4\5\u0086D\2\u019c\u019e\5\n\6"+ + "\2\u019d\u019c\3\2\2\2\u019e\u01a1\3\2\2\2\u019f\u019d\3\2\2\2\u019f\u01a0"+ + "\3\2\2\2\u01a0\u01a2\3\2\2\2\u01a1\u019f\3\2\2\2\u01a2\u01a4\5*\26\2\u01a3"+ + "\u0197\3\2\2\2\u01a3\u0199\3\2\2\2\u01a3\u019f\3\2\2\2\u01a4)\3\2\2\2"+ + "\u01a5\u01af\5,\27\2\u01a6\u01af\5.\30\2\u01a7\u01af\5\64\33\2\u01a8\u01af"+ + "\5\60\31\2\u01a9\u01af\5\62\32\2\u01aa\u01af\5 \21\2\u01ab\u01af\5v<\2"+ + "\u01ac\u01af\5\20\t\2\u01ad\u01af\5\30\r\2\u01ae\u01a5\3\2\2\2\u01ae\u01a6"+ + "\3\2\2\2\u01ae\u01a7\3\2\2\2\u01ae\u01a8\3\2\2\2\u01ae\u01a9\3\2\2\2\u01ae"+ + "\u01aa\3\2\2\2\u01ae\u01ab\3\2\2\2\u01ae\u01ac\3\2\2\2\u01ae\u01ad\3\2"+ + "\2\2\u01af+\3\2\2\2\u01b0\u01b3\5N(\2\u01b1\u01b3\7\62\2\2\u01b2\u01b0"+ + "\3\2\2\2\u01b2\u01b1\3\2\2\2\u01b3\u01b4\3\2\2\2\u01b4\u01b5\7f\2\2\u01b5"+ + "\u01ba\5Z.\2\u01b6\u01b7\7?\2\2\u01b7\u01b9\7@\2\2\u01b8\u01b6\3\2\2\2"+ + "\u01b9\u01bc\3\2\2\2\u01ba\u01b8\3\2\2\2\u01ba\u01bb\3\2\2\2\u01bb\u01bf"+ + "\3\2\2\2\u01bc\u01ba\3\2\2\2\u01bd\u01be\7/\2\2\u01be\u01c0\5X-\2\u01bf"+ + "\u01bd\3\2\2\2\u01bf\u01c0\3\2\2\2\u01c0\u01c3\3\2\2\2\u01c1\u01c4\5b"+ + "\62\2\u01c2\u01c4\7A\2\2\u01c3\u01c1\3\2\2\2\u01c3\u01c2\3\2\2\2\u01c4"+ + "-\3\2\2\2\u01c5\u01c6\5\22\n\2\u01c6\u01c7\5,\27\2\u01c7/\3\2\2\2\u01c8"+ + "\u01c9\7f\2\2\u01c9\u01cc\5Z.\2\u01ca\u01cb\7/\2\2\u01cb\u01cd\5X-\2\u01cc"+ + "\u01ca\3\2\2\2\u01cc\u01cd\3\2\2\2\u01cd\u01ce\3\2\2\2\u01ce\u01cf\5d"+ + "\63\2\u01cf\61\3\2\2\2\u01d0\u01d1\5\22\n\2\u01d1\u01d2\5\60\31\2\u01d2"+ + "\63\3\2\2\2\u01d3\u01d4\5N(\2\u01d4\u01d5\5B\"\2\u01d5\u01d6\7A\2\2\u01d6"+ + "\65\3\2\2\2\u01d7\u01d9\5\n\6\2\u01d8\u01d7\3\2\2\2\u01d9\u01dc\3\2\2"+ + "\2\u01da\u01d8\3\2\2\2\u01da\u01db\3\2\2\2\u01db\u01dd\3\2\2\2\u01dc\u01da"+ + "\3\2\2\2\u01dd\u01e0\58\35\2\u01de\u01e0\7A\2\2\u01df\u01da\3\2\2\2\u01df"+ + "\u01de\3\2\2\2\u01e0\67\3\2\2\2\u01e1\u01e9\5:\36\2\u01e2\u01e9\5> \2"+ + "\u01e3\u01e9\5@!\2\u01e4\u01e9\5 \21\2\u01e5\u01e9\5v<\2\u01e6\u01e9\5"+ + "\20\t\2\u01e7\u01e9\5\30\r\2\u01e8\u01e1\3\2\2\2\u01e8\u01e2\3\2\2\2\u01e8"+ + "\u01e3\3\2\2\2\u01e8\u01e4\3\2\2\2\u01e8\u01e5\3\2\2\2\u01e8\u01e6\3\2"+ + "\2\2\u01e8\u01e7\3\2\2\2\u01e99\3\2\2\2\u01ea\u01eb\5N(\2\u01eb\u01f0"+ + "\5<\37\2\u01ec\u01ed\7B\2\2\u01ed\u01ef\5<\37\2\u01ee\u01ec\3\2\2\2\u01ef"+ + "\u01f2\3\2\2\2\u01f0\u01ee\3\2\2\2\u01f0\u01f1\3\2\2\2\u01f1\u01f3\3\2"+ + "\2\2\u01f2\u01f0\3\2\2\2\u01f3\u01f4\7A\2\2\u01f4;\3\2\2\2\u01f5\u01fa"+ + "\7f\2\2\u01f6\u01f7\7?\2\2\u01f7\u01f9\7@\2\2\u01f8\u01f6\3\2\2\2\u01f9"+ + "\u01fc\3\2\2\2\u01fa\u01f8\3\2\2\2\u01fa\u01fb\3\2\2\2\u01fb\u01fd\3\2"+ + "\2\2\u01fc\u01fa\3\2\2\2\u01fd\u01fe\7D\2\2\u01fe\u01ff\5H%\2\u01ff=\3"+ + "\2\2\2\u0200\u0203\5N(\2\u0201\u0203\7\62\2\2\u0202\u0200\3\2\2\2\u0202"+ + "\u0201\3\2\2\2\u0203\u0204\3\2\2\2\u0204\u0205\7f\2\2\u0205\u020a\5Z."+ + "\2\u0206\u0207\7?\2\2\u0207\u0209\7@\2\2\u0208\u0206\3\2\2\2\u0209\u020c"+ + "\3\2\2\2\u020a\u0208\3\2\2\2\u020a\u020b\3\2\2\2\u020b\u020f\3\2\2\2\u020c"+ + "\u020a\3\2\2\2\u020d\u020e\7/\2\2\u020e\u0210\5X-\2\u020f\u020d\3\2\2"+ + "\2\u020f\u0210\3\2\2\2\u0210\u0211\3\2\2\2\u0211\u0212\7A\2\2\u0212?\3"+ + "\2\2\2\u0213\u0214\5\22\n\2\u0214\u0215\5> \2\u0215A\3\2\2\2\u0216\u021b"+ + "\5D#\2\u0217\u0218\7B\2\2\u0218\u021a\5D#\2\u0219\u0217\3\2\2\2\u021a"+ + "\u021d\3\2\2\2\u021b\u0219\3\2\2\2\u021b\u021c\3\2\2\2\u021cC\3\2\2\2"+ + "\u021d\u021b\3\2\2\2\u021e\u0221\5F$\2\u021f\u0220\7D\2\2\u0220\u0222"+ + "\5H%\2\u0221\u021f\3\2\2\2\u0221\u0222\3\2\2\2\u0222E\3\2\2\2\u0223\u0228"+ + "\7f\2\2\u0224\u0225\7?\2\2\u0225\u0227\7@\2\2\u0226\u0224\3\2\2\2\u0227"+ + "\u022a\3\2\2\2\u0228\u0226\3\2\2\2\u0228\u0229\3\2\2\2\u0229G\3\2\2\2"+ + "\u022a\u0228\3\2\2\2\u022b\u022e\5J&\2\u022c\u022e\5\u00b0Y\2\u022d\u022b"+ + "\3\2\2\2\u022d\u022c\3\2\2\2\u022eI\3\2\2\2\u022f\u023b\7=\2\2\u0230\u0235"+ + "\5H%\2\u0231\u0232\7B\2\2\u0232\u0234\5H%\2\u0233\u0231\3\2\2\2\u0234"+ + "\u0237\3\2\2\2\u0235\u0233\3\2\2\2\u0235\u0236\3\2\2\2\u0236\u0239\3\2"+ + "\2\2\u0237\u0235\3\2\2\2\u0238\u023a\7B\2\2\u0239\u0238\3\2\2\2\u0239"+ + "\u023a\3\2\2\2\u023a\u023c\3\2\2\2\u023b\u0230\3\2\2\2\u023b\u023c\3\2"+ + "\2\2\u023c\u023d\3\2\2\2\u023d\u023e\7>\2\2\u023eK\3\2\2\2\u023f\u0240"+ + "\7f\2\2\u0240M\3\2\2\2\u0241\u0246\5P)\2\u0242\u0243\7?\2\2\u0243\u0245"+ + "\7@\2\2\u0244\u0242\3\2\2\2\u0245\u0248\3\2\2\2\u0246\u0244\3\2\2\2\u0246"+ + "\u0247\3\2\2\2\u0247\u0252\3\2\2\2\u0248\u0246\3\2\2\2\u0249\u024e\5R"+ + "*\2\u024a\u024b\7?\2\2\u024b\u024d\7@\2\2\u024c\u024a\3\2\2\2\u024d\u0250"+ + "\3\2\2\2\u024e\u024c\3\2\2\2\u024e\u024f\3\2\2\2\u024f\u0252\3\2\2\2\u0250"+ + "\u024e\3\2\2\2\u0251\u0241\3\2\2\2\u0251\u0249\3\2\2\2\u0252O\3\2\2\2"+ + "\u0253\u0255\7f\2\2\u0254\u0256\5T+\2\u0255\u0254\3\2\2\2\u0255\u0256"+ + "\3\2\2\2\u0256\u025e\3\2\2\2\u0257\u0258\7C\2\2\u0258\u025a\7f\2\2\u0259"+ + "\u025b\5T+\2\u025a\u0259\3\2\2\2\u025a\u025b\3\2\2\2\u025b\u025d\3\2\2"+ + "\2\u025c\u0257\3\2\2\2\u025d\u0260\3\2\2\2\u025e\u025c\3\2\2\2\u025e\u025f"+ + "\3\2\2\2\u025fQ\3\2\2\2\u0260\u025e\3\2\2\2\u0261\u0262\t\4\2\2\u0262"+ + "S\3\2\2\2\u0263\u0264\7F\2\2\u0264\u0269\5V,\2\u0265\u0266\7B\2\2\u0266"+ + "\u0268\5V,\2\u0267\u0265\3\2\2\2\u0268\u026b\3\2\2\2\u0269\u0267\3\2\2"+ + "\2\u0269\u026a\3\2\2\2\u026a\u026c\3\2\2\2\u026b\u0269\3\2\2\2\u026c\u026d"+ + "\7E\2\2\u026dU\3\2\2\2\u026e\u0275\5N(\2\u026f\u0272\7I\2\2\u0270\u0271"+ + "\t\5\2\2\u0271\u0273\5N(\2\u0272\u0270\3\2\2\2\u0272\u0273\3\2\2\2\u0273"+ + "\u0275\3\2\2\2\u0274\u026e\3\2\2\2\u0274\u026f\3\2\2\2\u0275W\3\2\2\2"+ + "\u0276\u027b\5f\64\2\u0277\u0278\7B\2\2\u0278\u027a\5f\64\2\u0279\u0277"+ + "\3\2\2\2\u027a\u027d\3\2\2\2\u027b\u0279\3\2\2\2\u027b\u027c\3\2\2\2\u027c"+ + "Y\3\2\2\2\u027d\u027b\3\2\2\2\u027e\u0280\7;\2\2\u027f\u0281\5\\/\2\u0280"+ + "\u027f\3\2\2\2\u0280\u0281\3\2\2\2\u0281\u0282\3\2\2\2\u0282\u0283\7<"+ + "\2\2\u0283[\3\2\2\2\u0284\u0289\5^\60\2\u0285\u0286\7B\2\2\u0286\u0288"+ + "\5^\60\2\u0287\u0285\3\2\2\2\u0288\u028b\3\2\2\2\u0289\u0287\3\2\2\2\u0289"+ + "\u028a\3\2\2\2\u028a\u028e\3\2\2\2\u028b\u0289\3\2\2\2\u028c\u028d\7B"+ + "\2\2\u028d\u028f\5`\61\2\u028e\u028c\3\2\2\2\u028e\u028f\3\2\2\2\u028f"+ + "\u0292\3\2\2\2\u0290\u0292\5`\61\2\u0291\u0284\3\2\2\2\u0291\u0290\3\2"+ + "\2\2\u0292]\3\2\2\2\u0293\u0295\5\16\b\2\u0294\u0293\3\2\2\2\u0295\u0298"+ + "\3\2\2\2\u0296\u0294\3\2\2\2\u0296\u0297\3\2\2\2\u0297\u0299\3\2\2\2\u0298"+ + "\u0296\3\2\2\2\u0299\u029a\5N(\2\u029a\u029b\5F$\2\u029b_\3\2\2\2\u029c"+ + "\u029e\5\16\b\2\u029d\u029c\3\2\2\2\u029e\u02a1\3\2\2\2\u029f\u029d\3"+ + "\2\2\2\u029f\u02a0\3\2\2\2\u02a0\u02a2\3\2\2\2\u02a1\u029f\3\2\2\2\u02a2"+ + "\u02a3\5N(\2\u02a3\u02a4\7h\2\2\u02a4\u02a5\5F$\2\u02a5a\3\2\2\2\u02a6"+ + "\u02a7\5\u0086D\2\u02a7c\3\2\2\2\u02a8\u02a9\5\u0086D\2\u02a9e\3\2\2\2"+ + "\u02aa\u02af\7f\2\2\u02ab\u02ac\7C\2\2\u02ac\u02ae\7f\2\2\u02ad\u02ab"+ + "\3\2\2\2\u02ae\u02b1\3\2\2\2\u02af\u02ad\3\2\2\2\u02af\u02b0\3\2\2\2\u02b0"+ + "g\3\2\2\2\u02b1\u02af\3\2\2\2\u02b2\u02b3\t\6\2\2\u02b3i\3\2\2\2\u02b4"+ + "\u02b5\7g\2\2\u02b5\u02bc\5l\67\2\u02b6\u02b9\7;\2\2\u02b7\u02ba\5n8\2"+ + "\u02b8\u02ba\5r:\2\u02b9\u02b7\3\2\2\2\u02b9\u02b8\3\2\2\2\u02b9\u02ba"+ + "\3\2\2\2\u02ba\u02bb\3\2\2\2\u02bb\u02bd\7<\2\2\u02bc\u02b6\3\2\2\2\u02bc"+ + "\u02bd\3\2\2\2\u02bdk\3\2\2\2\u02be\u02bf\5f\64\2\u02bfm\3\2\2\2\u02c0"+ + "\u02c5\5p9\2\u02c1\u02c2\7B\2\2\u02c2\u02c4\5p9\2\u02c3\u02c1\3\2\2\2"+ + "\u02c4\u02c7\3\2\2\2\u02c5\u02c3\3\2\2\2\u02c5\u02c6\3\2\2\2\u02c6o\3"+ + "\2\2\2\u02c7\u02c5\3\2\2\2\u02c8\u02c9\7f\2\2\u02c9\u02ca\7D\2\2\u02ca"+ + "\u02cb\5r:\2\u02cbq\3\2\2\2\u02cc\u02d0\5\u00b0Y\2\u02cd\u02d0\5j\66\2"+ + "\u02ce\u02d0\5t;\2\u02cf\u02cc\3\2\2\2\u02cf\u02cd\3\2\2\2\u02cf\u02ce"+ + "\3\2\2\2\u02d0s\3\2\2\2\u02d1\u02da\7=\2\2\u02d2\u02d7\5r:\2\u02d3\u02d4"+ + "\7B\2\2\u02d4\u02d6\5r:\2\u02d5\u02d3\3\2\2\2\u02d6\u02d9\3\2\2\2\u02d7"+ + "\u02d5\3\2\2\2\u02d7\u02d8\3\2\2\2\u02d8\u02db\3\2\2\2\u02d9\u02d7\3\2"+ + "\2\2\u02da\u02d2\3\2\2\2\u02da\u02db\3\2\2\2\u02db\u02dd\3\2\2\2\u02dc"+ + "\u02de\7B\2\2\u02dd\u02dc\3\2\2\2\u02dd\u02de\3\2\2\2\u02de\u02df\3\2"+ + "\2\2\u02df\u02e0\7>\2\2\u02e0u\3\2\2\2\u02e1\u02e2\7g\2\2\u02e2\u02e3"+ + "\7\36\2\2\u02e3\u02e4\7f\2\2\u02e4\u02e5\5x=\2\u02e5w\3\2\2\2\u02e6\u02ea"+ + "\7=\2\2\u02e7\u02e9\5z>\2\u02e8\u02e7\3\2\2\2\u02e9\u02ec\3\2\2\2\u02ea"+ + "\u02e8\3\2\2\2\u02ea\u02eb\3\2\2\2\u02eb\u02ed\3\2\2\2\u02ec\u02ea\3\2"+ + "\2\2\u02ed\u02ee\7>\2\2\u02eey\3\2\2\2\u02ef\u02f1\5\n\6\2\u02f0\u02ef"+ + "\3\2\2\2\u02f1\u02f4\3\2\2\2\u02f2\u02f0\3\2\2\2\u02f2\u02f3\3\2\2\2\u02f3"+ + "\u02f5\3\2\2\2\u02f4\u02f2\3\2\2\2\u02f5\u02f8\5|?\2\u02f6\u02f8\7A\2"+ + "\2\u02f7\u02f2\3\2\2\2\u02f7\u02f6\3\2\2\2\u02f8{\3\2\2\2\u02f9\u02fa"+ + "\5N(\2\u02fa\u02fb\5~@\2\u02fb\u02fc\7A\2\2\u02fc\u030e\3\2\2\2\u02fd"+ + "\u02ff\5\20\t\2\u02fe\u0300\7A\2\2\u02ff\u02fe\3\2\2\2\u02ff\u0300\3\2"+ + "\2\2\u0300\u030e\3\2\2\2\u0301\u0303\5 \21\2\u0302\u0304\7A\2\2\u0303"+ + "\u0302\3\2\2\2\u0303\u0304\3\2\2\2\u0304\u030e\3\2\2\2\u0305\u0307\5\30"+ + "\r\2\u0306\u0308\7A\2\2\u0307\u0306\3\2\2\2\u0307\u0308\3\2\2\2\u0308"+ + "\u030e\3\2\2\2\u0309\u030b\5v<\2\u030a\u030c\7A\2\2\u030b\u030a\3\2\2"+ + "\2\u030b\u030c\3\2\2\2\u030c\u030e\3\2\2\2\u030d\u02f9\3\2\2\2\u030d\u02fd"+ + "\3\2\2\2\u030d\u0301\3\2\2\2\u030d\u0305\3\2\2\2\u030d\u0309\3\2\2\2\u030e"+ + "}\3\2\2\2\u030f\u0312\5\u0080A\2\u0310\u0312\5\u0082B\2\u0311\u030f\3"+ + "\2\2\2\u0311\u0310\3\2\2\2\u0312\177\3\2\2\2\u0313\u0314\7f\2\2\u0314"+ + "\u0315\7;\2\2\u0315\u0317\7<\2\2\u0316\u0318\5\u0084C\2\u0317\u0316\3"+ + "\2\2\2\u0317\u0318\3\2\2\2\u0318\u0081\3\2\2\2\u0319\u031a\5B\"\2\u031a"+ + "\u0083\3\2\2\2\u031b\u031c\7\16\2\2\u031c\u031d\5r:\2\u031d\u0085\3\2"+ + "\2\2\u031e\u0322\7=\2\2\u031f\u0321\5\u0088E\2\u0320\u031f\3\2\2\2\u0321"+ + "\u0324\3\2\2\2\u0322\u0320\3\2\2\2\u0322\u0323\3\2\2\2\u0323\u0325\3\2"+ + "\2\2\u0324\u0322\3\2\2\2\u0325\u0326\7>\2\2\u0326\u0087\3\2\2\2\u0327"+ + "\u032b\5\u008aF\2\u0328\u032b\5\u008eH\2\u0329\u032b\5\b\5\2\u032a\u0327"+ + "\3\2\2\2\u032a\u0328\3\2\2\2\u032a\u0329\3\2\2\2\u032b\u0089\3\2\2\2\u032c"+ + "\u032d\5\u008cG\2\u032d\u032e\7A\2\2\u032e\u008b\3\2\2\2\u032f\u0331\5"+ + "\16\b\2\u0330\u032f\3\2\2\2\u0331\u0334\3\2\2\2\u0332\u0330\3\2\2\2\u0332"+ + "\u0333\3\2\2\2\u0333\u0335\3\2\2\2\u0334\u0332\3\2\2\2\u0335\u0336\5N"+ + "(\2\u0336\u0337\5B\"\2\u0337\u008d\3\2\2\2\u0338\u03a1\5\u0086D\2\u0339"+ + "\u033a\7\4\2\2\u033a\u033d\5\u00b0Y\2\u033b\u033c\7J\2\2\u033c\u033e\5"+ + "\u00b0Y\2\u033d\u033b\3\2\2\2\u033d\u033e\3\2\2\2\u033e\u033f\3\2\2\2"+ + "\u033f\u0340\7A\2\2\u0340\u03a1\3\2\2\2\u0341\u0342\7\30\2\2\u0342\u0343"+ + "\5\u00a8U\2\u0343\u0346\5\u008eH\2\u0344\u0345\7\21\2\2\u0345\u0347\5"+ + "\u008eH\2\u0346\u0344\3\2\2\2\u0346\u0347\3\2\2\2\u0347\u03a1\3\2\2\2"+ + "\u0348\u0349\7\27\2\2\u0349\u034a\7;\2\2\u034a\u034b\5\u00a0Q\2\u034b"+ + "\u034c\7<\2\2\u034c\u034d\5\u008eH\2\u034d\u03a1\3\2\2\2\u034e\u034f\7"+ + "\64\2\2\u034f\u0350\5\u00a8U\2\u0350\u0351\5\u008eH\2\u0351\u03a1\3\2"+ + "\2\2\u0352\u0353\7\17\2\2\u0353\u0354\5\u008eH\2\u0354\u0355\7\64\2\2"+ + "\u0355\u0356\5\u00a8U\2\u0356\u0357\7A\2\2\u0357\u03a1\3\2\2\2\u0358\u0359"+ + "\7\61\2\2\u0359\u0363\5\u0086D\2\u035a\u035c\5\u0090I\2\u035b\u035a\3"+ + "\2\2\2\u035c\u035d\3\2\2\2\u035d\u035b\3\2\2\2\u035d\u035e\3\2\2\2\u035e"+ + "\u0360\3\2\2\2\u035f\u0361\5\u0094K\2\u0360\u035f\3\2\2\2\u0360\u0361"+ + "\3\2\2\2\u0361\u0364\3\2\2\2\u0362\u0364\5\u0094K\2\u0363\u035b\3\2\2"+ + "\2\u0363\u0362\3\2\2\2\u0364\u03a1\3\2\2\2\u0365\u0366\7\61\2\2\u0366"+ + "\u0367\5\u0096L\2\u0367\u036b\5\u0086D\2\u0368\u036a\5\u0090I\2\u0369"+ + "\u0368\3\2\2\2\u036a\u036d\3\2\2\2\u036b\u0369\3\2\2\2\u036b\u036c\3\2"+ + "\2\2\u036c\u036f\3\2\2\2\u036d\u036b\3\2\2\2\u036e\u0370\5\u0094K\2\u036f"+ + "\u036e\3\2\2\2\u036f\u0370\3\2\2\2\u0370\u03a1\3\2\2\2\u0371\u0372\7+"+ + "\2\2\u0372\u0373\5\u00a8U\2\u0373\u0377\7=\2\2\u0374\u0376\5\u009cO\2"+ + "\u0375\u0374\3\2\2\2\u0376\u0379\3\2\2\2\u0377\u0375\3\2\2\2\u0377\u0378"+ + "\3\2\2\2\u0378\u037d\3\2\2\2\u0379\u0377\3\2\2\2\u037a\u037c\5\u009eP"+ + "\2\u037b\u037a\3\2\2\2\u037c\u037f\3\2\2\2\u037d\u037b\3\2\2\2\u037d\u037e"+ + "\3\2\2\2\u037e\u0380\3\2\2\2\u037f\u037d\3\2\2\2\u0380\u0381\7>\2\2\u0381"+ + "\u03a1\3\2\2\2\u0382\u0383\7,\2\2\u0383\u0384\5\u00a8U\2\u0384\u0385\5"+ + "\u0086D\2\u0385\u03a1\3\2\2\2\u0386\u0388\7&\2\2\u0387\u0389\5\u00b0Y"+ + "\2\u0388\u0387\3\2\2\2\u0388\u0389\3\2\2\2\u0389\u038a\3\2\2\2\u038a\u03a1"+ + "\7A\2\2\u038b\u038c\7.\2\2\u038c\u038d\5\u00b0Y\2\u038d\u038e\7A\2\2\u038e"+ + "\u03a1\3\2\2\2\u038f\u0391\7\6\2\2\u0390\u0392\7f\2\2\u0391\u0390\3\2"+ + "\2\2\u0391\u0392\3\2\2\2\u0392\u0393\3\2\2\2\u0393\u03a1\7A\2\2\u0394"+ + "\u0396\7\r\2\2\u0395\u0397\7f\2\2\u0396\u0395\3\2\2\2\u0396\u0397\3\2"+ + "\2\2\u0397\u0398\3\2\2\2\u0398\u03a1\7A\2\2\u0399\u03a1\7A\2\2\u039a\u039b"+ + "\5\u00acW\2\u039b\u039c\7A\2\2\u039c\u03a1\3\2\2\2\u039d\u039e\7f\2\2"+ + "\u039e\u039f\7J\2\2\u039f\u03a1\5\u008eH\2\u03a0\u0338\3\2\2\2\u03a0\u0339"+ + "\3\2\2\2\u03a0\u0341\3\2\2\2\u03a0\u0348\3\2\2\2\u03a0\u034e\3\2\2\2\u03a0"+ + "\u0352\3\2\2\2\u03a0\u0358\3\2\2\2\u03a0\u0365\3\2\2\2\u03a0\u0371\3\2"+ + "\2\2\u03a0\u0382\3\2\2\2\u03a0\u0386\3\2\2\2\u03a0\u038b\3\2\2\2\u03a0"+ + "\u038f\3\2\2\2\u03a0\u0394\3\2\2\2\u03a0\u0399\3\2\2\2\u03a0\u039a\3\2"+ + "\2\2\u03a0\u039d\3\2\2\2\u03a1\u008f\3\2\2\2\u03a2\u03a3\7\t\2\2\u03a3"+ + "\u03a7\7;\2\2\u03a4\u03a6\5\16\b\2\u03a5\u03a4\3\2\2\2\u03a6\u03a9\3\2"+ + "\2\2\u03a7\u03a5\3\2\2\2\u03a7\u03a8\3\2\2\2\u03a8\u03aa\3\2\2\2\u03a9"+ + "\u03a7\3\2\2\2\u03aa\u03ab\5\u0092J\2\u03ab\u03ac\7f\2\2\u03ac\u03ad\7"+ + "<\2\2\u03ad\u03ae\5\u0086D\2\u03ae\u0091\3\2\2\2\u03af\u03b4\5f\64\2\u03b0"+ + "\u03b1\7X\2\2\u03b1\u03b3\5f\64\2\u03b2\u03b0\3\2\2\2\u03b3\u03b6\3\2"+ + "\2\2\u03b4\u03b2\3\2\2\2\u03b4\u03b5\3\2\2\2\u03b5\u0093\3\2\2\2\u03b6"+ + "\u03b4\3\2\2\2\u03b7\u03b8\7\25\2\2\u03b8\u03b9\5\u0086D\2\u03b9\u0095"+ + "\3\2\2\2\u03ba\u03bb\7;\2\2\u03bb\u03bd\5\u0098M\2\u03bc\u03be\7A\2\2"+ + "\u03bd\u03bc\3\2\2\2\u03bd\u03be\3\2\2\2\u03be\u03bf\3\2\2\2\u03bf\u03c0"+ + "\7<\2\2\u03c0\u0097\3\2\2\2\u03c1\u03c6\5\u009aN\2\u03c2\u03c3\7A\2\2"+ + "\u03c3\u03c5\5\u009aN\2\u03c4\u03c2\3\2\2\2\u03c5\u03c8\3\2\2\2\u03c6"+ + "\u03c4\3\2\2\2\u03c6\u03c7\3\2\2\2\u03c7\u0099\3\2\2\2\u03c8\u03c6\3\2"+ + "\2\2\u03c9\u03cb\5\16\b\2\u03ca\u03c9\3\2\2\2\u03cb\u03ce\3\2\2\2\u03cc"+ + "\u03ca\3\2\2\2\u03cc\u03cd\3\2\2\2\u03cd\u03cf\3\2\2\2\u03ce\u03cc\3\2"+ + "\2\2\u03cf\u03d0\5P)\2\u03d0\u03d1\5F$\2\u03d1\u03d2\7D\2\2\u03d2\u03d3"+ + "\5\u00b0Y\2\u03d3\u009b\3\2\2\2\u03d4\u03d6\5\u009eP\2\u03d5\u03d4\3\2"+ + "\2\2\u03d6\u03d7\3\2\2\2\u03d7\u03d5\3\2\2\2\u03d7\u03d8\3\2\2\2\u03d8"+ + "\u03da\3\2\2\2\u03d9\u03db\5\u0088E\2\u03da\u03d9\3\2\2\2\u03db\u03dc"+ + "\3\2\2\2\u03dc\u03da\3\2\2\2\u03dc\u03dd\3\2\2\2\u03dd\u009d\3\2\2\2\u03de"+ + "\u03df\7\b\2\2\u03df\u03e0\5\u00aeX\2\u03e0\u03e1\7J\2\2\u03e1\u03e9\3"+ + "\2\2\2\u03e2\u03e3\7\b\2\2\u03e3\u03e4\5L\'\2\u03e4\u03e5\7J\2\2\u03e5"+ + "\u03e9\3\2\2\2\u03e6\u03e7\7\16\2\2\u03e7\u03e9\7J\2\2\u03e8\u03de\3\2"+ + "\2\2\u03e8\u03e2\3\2\2\2\u03e8\u03e6\3\2\2\2\u03e9\u009f\3\2\2\2\u03ea"+ + "\u03f7\5\u00a4S\2\u03eb\u03ed\5\u00a2R\2\u03ec\u03eb\3\2\2\2\u03ec\u03ed"+ + "\3\2\2\2\u03ed\u03ee\3\2\2\2\u03ee\u03f0\7A\2\2\u03ef\u03f1\5\u00b0Y\2"+ + "\u03f0\u03ef\3\2\2\2\u03f0\u03f1\3\2\2\2\u03f1\u03f2\3\2\2\2\u03f2\u03f4"+ + "\7A\2\2\u03f3\u03f5\5\u00a6T\2\u03f4\u03f3\3\2\2\2\u03f4\u03f5\3\2\2\2"+ + "\u03f5\u03f7\3\2\2\2\u03f6\u03ea\3\2\2\2\u03f6\u03ec\3\2\2\2\u03f7\u00a1"+ + "\3\2\2\2\u03f8\u03fb\5\u008cG\2\u03f9\u03fb\5\u00aaV\2\u03fa\u03f8\3\2"+ + "\2\2\u03fa\u03f9\3\2\2\2\u03fb\u00a3\3\2\2\2\u03fc\u03fe\5\16\b\2\u03fd"+ + "\u03fc\3\2\2\2\u03fe\u0401\3\2\2\2\u03ff\u03fd\3\2\2\2\u03ff\u0400\3\2"+ + "\2\2\u0400\u0402\3\2\2\2\u0401\u03ff\3\2\2\2\u0402\u0403\5N(\2\u0403\u0404"+ + "\7f\2\2\u0404\u0405\7J\2\2\u0405\u0406\5\u00b0Y\2\u0406\u00a5\3\2\2\2"+ + "\u0407\u0408\5\u00aaV\2\u0408\u00a7\3\2\2\2\u0409\u040a\7;\2\2\u040a\u040b"+ + "\5\u00b0Y\2\u040b\u040c\7<\2\2\u040c\u00a9\3\2\2\2\u040d\u0412\5\u00b0"+ + "Y\2\u040e\u040f\7B\2\2\u040f\u0411\5\u00b0Y\2\u0410\u040e\3\2\2\2\u0411"+ + "\u0414\3\2\2\2\u0412\u0410\3\2\2\2\u0412\u0413\3\2\2\2\u0413\u00ab\3\2"+ + "\2\2\u0414\u0412\3\2\2\2\u0415\u0416\5\u00b0Y\2\u0416\u00ad\3\2\2\2\u0417"+ + "\u0418\5\u00b0Y\2\u0418\u00af\3\2\2\2\u0419\u041a\bY\1\2\u041a\u041b\7"+ + ";\2\2\u041b\u041c\5N(\2\u041c\u041d\7<\2\2\u041d\u041e\5\u00b0Y\23\u041e"+ + "\u0427\3\2\2\2\u041f\u0420\t\7\2\2\u0420\u0427\5\u00b0Y\21\u0421\u0422"+ + "\t\b\2\2\u0422\u0427\5\u00b0Y\20\u0423\u0427\5\u00b2Z\2\u0424\u0425\7"+ + "!\2\2\u0425\u0427\5\u00b4[\2\u0426\u0419\3\2\2\2\u0426\u041f\3\2\2\2\u0426"+ + "\u0421\3\2\2\2\u0426\u0423\3\2\2\2\u0426\u0424\3\2\2\2\u0427\u047d\3\2"+ + "\2\2\u0428\u0429\f\17\2\2\u0429\u042a\t\t\2\2\u042a\u047c\5\u00b0Y\20"+ + "\u042b\u042c\f\16\2\2\u042c\u042d\t\n\2\2\u042d\u047c\5\u00b0Y\17\u042e"+ + "\u0436\f\r\2\2\u042f\u0430\7F\2\2\u0430\u0437\7F\2\2\u0431\u0432\7E\2"+ + "\2\u0432\u0433\7E\2\2\u0433\u0437\7E\2\2\u0434\u0435\7E\2\2\u0435\u0437"+ + "\7E\2\2\u0436\u042f\3\2\2\2\u0436\u0431\3\2\2\2\u0436\u0434\3\2\2\2\u0437"+ + "\u0438\3\2\2\2\u0438\u047c\5\u00b0Y\16\u0439\u043a\f\f\2\2\u043a\u043b"+ + "\t\13\2\2\u043b\u047c\5\u00b0Y\r\u043c\u043d\f\n\2\2\u043d\u043e\t\f\2"+ + "\2\u043e\u047c\5\u00b0Y\13\u043f\u0440\f\t\2\2\u0440\u0441\7W\2\2\u0441"+ + "\u047c\5\u00b0Y\n\u0442\u0443\f\b\2\2\u0443\u0444\7Y\2\2\u0444\u047c\5"+ + "\u00b0Y\t\u0445\u0446\f\7\2\2\u0446\u0447\7X\2\2\u0447\u047c\5\u00b0Y"+ + "\b\u0448\u0449\f\6\2\2\u0449\u044a\7O\2\2\u044a\u047c\5\u00b0Y\7\u044b"+ + "\u044c\f\5\2\2\u044c\u044d\7P\2\2\u044d\u047c\5\u00b0Y\6\u044e\u044f\f"+ + "\4\2\2\u044f\u0450\7I\2\2\u0450\u0451\5\u00b0Y\2\u0451\u0452\7J\2\2\u0452"+ + "\u0453\5\u00b0Y\5\u0453\u047c\3\2\2\2\u0454\u0455\f\3\2\2\u0455\u0456"+ + "\t\r\2\2\u0456\u047c\5\u00b0Y\4\u0457\u0458\f\33\2\2\u0458\u0459\7C\2"+ + "\2\u0459\u047c\7f\2\2\u045a\u045b\f\32\2\2\u045b\u045c\7C\2\2\u045c\u047c"+ + "\7-\2\2\u045d\u045e\f\31\2\2\u045e\u045f\7C\2\2\u045f\u0461\7!\2\2\u0460"+ + "\u0462\5\u00c0a\2\u0461\u0460\3\2\2\2\u0461\u0462\3\2\2\2\u0462\u0463"+ + "\3\2\2\2\u0463\u047c\5\u00b8]\2\u0464\u0465\f\30\2\2\u0465\u0466\7C\2"+ + "\2\u0466\u0467\7*\2\2\u0467\u047c\5\u00c6d\2\u0468\u0469\f\27\2\2\u0469"+ + "\u046a\7C\2\2\u046a\u047c\5\u00be`\2\u046b\u046c\f\26\2\2\u046c\u046d"+ + "\7?\2\2\u046d\u046e\5\u00b0Y\2\u046e\u046f\7@\2\2\u046f\u047c\3\2\2\2"+ + "\u0470\u0471\f\25\2\2\u0471\u0473\7;\2\2\u0472\u0474\5\u00aaV\2\u0473"+ + "\u0472\3\2\2\2\u0473\u0474\3\2\2\2\u0474\u0475\3\2\2\2\u0475\u047c\7<"+ + "\2\2\u0476\u0477\f\22\2\2\u0477\u047c\t\16\2\2\u0478\u0479\f\13\2\2\u0479"+ + "\u047a\7\34\2\2\u047a\u047c\5N(\2\u047b\u0428\3\2\2\2\u047b\u042b\3\2"+ + "\2\2\u047b\u042e\3\2\2\2\u047b\u0439\3\2\2\2\u047b\u043c\3\2\2\2\u047b"+ + "\u043f\3\2\2\2\u047b\u0442\3\2\2\2\u047b\u0445\3\2\2\2\u047b\u0448\3\2"+ + "\2\2\u047b\u044b\3\2\2\2\u047b\u044e\3\2\2\2\u047b\u0454\3\2\2\2\u047b"+ + "\u0457\3\2\2\2\u047b\u045a\3\2\2\2\u047b\u045d\3\2\2\2\u047b\u0464\3\2"+ + "\2\2\u047b\u0468\3\2\2\2\u047b\u046b\3\2\2\2\u047b\u0470\3\2\2\2\u047b"+ + "\u0476\3\2\2\2\u047b\u0478\3\2\2\2\u047c\u047f\3\2\2\2\u047d\u047b\3\2"+ + "\2\2\u047d\u047e\3\2\2\2\u047e\u00b1\3\2\2\2\u047f\u047d\3\2\2\2\u0480"+ + "\u0481\7;\2\2\u0481\u0482\5\u00b0Y\2\u0482\u0483\7<\2\2\u0483\u0496\3"+ + "\2\2\2\u0484\u0496\7-\2\2\u0485\u0496\7*\2\2\u0486\u0496\5h\65\2\u0487"+ + "\u0496\7f\2\2\u0488\u0489\5N(\2\u0489\u048a\7C\2\2\u048a\u048b\7\13\2"+ + "\2\u048b\u0496\3\2\2\2\u048c\u048d\7\62\2\2\u048d\u048e\7C\2\2\u048e\u0496"+ + "\7\13\2\2\u048f\u0493\5\u00c0a\2\u0490\u0494\5\u00c8e\2\u0491\u0492\7"+ + "-\2\2\u0492\u0494\5\u00caf\2\u0493\u0490\3\2\2\2\u0493\u0491\3\2\2\2\u0494"+ + "\u0496\3\2\2\2\u0495\u0480\3\2\2\2\u0495\u0484\3\2\2\2\u0495\u0485\3\2"+ + "\2\2\u0495\u0486\3\2\2\2\u0495\u0487\3\2\2\2\u0495\u0488\3\2\2\2\u0495"+ + "\u048c\3\2\2\2\u0495\u048f\3\2\2\2\u0496\u00b3\3\2\2\2\u0497\u0498\5\u00c0"+ + "a\2\u0498\u0499\5\u00b6\\\2\u0499\u049a\5\u00bc_\2\u049a\u04a1\3\2\2\2"+ + "\u049b\u049e\5\u00b6\\\2\u049c\u049f\5\u00ba^\2\u049d\u049f\5\u00bc_\2"+ + "\u049e\u049c\3\2\2\2\u049e\u049d\3\2\2\2\u049f\u04a1\3\2\2\2\u04a0\u0497"+ + "\3\2\2\2\u04a0\u049b\3\2\2\2\u04a1\u00b5\3\2\2\2\u04a2\u04a4\7f\2\2\u04a3"+ + "\u04a5\5\u00c2b\2\u04a4\u04a3\3\2\2\2\u04a4\u04a5\3\2\2\2\u04a5\u04ad"+ + "\3\2\2\2\u04a6\u04a7\7C\2\2\u04a7\u04a9\7f\2\2\u04a8\u04aa\5\u00c2b\2"+ + "\u04a9\u04a8\3\2\2\2\u04a9\u04aa\3\2\2\2\u04aa\u04ac\3\2\2\2\u04ab\u04a6"+ + "\3\2\2\2\u04ac\u04af\3\2\2\2\u04ad\u04ab\3\2\2\2\u04ad\u04ae\3\2\2\2\u04ae"+ + "\u04b2\3\2\2\2\u04af\u04ad\3\2\2\2\u04b0\u04b2\5R*\2\u04b1\u04a2\3\2\2"+ + "\2\u04b1\u04b0\3\2\2\2\u04b2\u00b7\3\2\2\2\u04b3\u04b5\7f\2\2\u04b4\u04b6"+ + "\5\u00c4c\2\u04b5\u04b4\3\2\2\2\u04b5\u04b6\3\2\2\2\u04b6\u04b7\3\2\2"+ + "\2\u04b7\u04b8\5\u00bc_\2\u04b8\u00b9\3\2\2\2\u04b9\u04d5\7?\2\2\u04ba"+ + "\u04bf\7@\2\2\u04bb\u04bc\7?\2\2\u04bc\u04be\7@\2\2\u04bd\u04bb\3\2\2"+ + "\2\u04be\u04c1\3\2\2\2\u04bf\u04bd\3\2\2\2\u04bf\u04c0\3\2\2\2\u04c0\u04c2"+ + "\3\2\2\2\u04c1\u04bf\3\2\2\2\u04c2\u04d6\5J&\2\u04c3\u04c4\5\u00b0Y\2"+ + "\u04c4\u04cb\7@\2\2\u04c5\u04c6\7?\2\2\u04c6\u04c7\5\u00b0Y\2\u04c7\u04c8"+ + "\7@\2\2\u04c8\u04ca\3\2\2\2\u04c9\u04c5\3\2\2\2\u04ca\u04cd\3\2\2\2\u04cb"+ + "\u04c9\3\2\2\2\u04cb\u04cc\3\2\2\2\u04cc\u04d2\3\2\2\2\u04cd\u04cb\3\2"+ + "\2\2\u04ce\u04cf\7?\2\2\u04cf\u04d1\7@\2\2\u04d0\u04ce\3\2\2\2\u04d1\u04d4"+ + "\3\2\2\2\u04d2\u04d0\3\2\2\2\u04d2\u04d3\3\2\2\2\u04d3\u04d6\3\2\2\2\u04d4"+ + "\u04d2\3\2\2\2\u04d5\u04ba\3\2\2\2\u04d5\u04c3\3\2\2\2\u04d6\u00bb\3\2"+ + "\2\2\u04d7\u04d9\5\u00caf\2\u04d8\u04da\5$\23\2\u04d9\u04d8\3\2\2\2\u04d9"+ + "\u04da\3\2\2\2\u04da\u00bd\3\2\2\2\u04db\u04dc\5\u00c0a\2\u04dc\u04dd"+ + "\5\u00c8e\2\u04dd\u00bf\3\2\2\2\u04de\u04df\7F\2\2\u04df\u04e0\5\"\22"+ + "\2\u04e0\u04e1\7E\2\2\u04e1\u00c1\3\2\2\2\u04e2\u04e3\7F\2\2\u04e3\u04e6"+ + "\7E\2\2\u04e4\u04e6\5T+\2\u04e5\u04e2\3\2\2\2\u04e5\u04e4\3\2\2\2\u04e6"+ + "\u00c3\3\2\2\2\u04e7\u04e8\7F\2\2\u04e8\u04eb\7E\2\2\u04e9\u04eb\5\u00c0"+ + "a\2\u04ea\u04e7\3\2\2\2\u04ea\u04e9\3\2\2\2\u04eb\u00c5\3\2\2\2\u04ec"+ + "\u04f3\5\u00caf\2\u04ed\u04ee\7C\2\2\u04ee\u04f0\7f\2\2\u04ef\u04f1\5"+ + "\u00caf\2\u04f0\u04ef\3\2\2\2\u04f0\u04f1\3\2\2\2\u04f1\u04f3\3\2\2\2"+ + "\u04f2\u04ec\3\2\2\2\u04f2\u04ed\3\2\2\2\u04f3\u00c7\3\2\2\2\u04f4\u04f5"+ + "\7*\2\2\u04f5\u04f9\5\u00c6d\2\u04f6\u04f7\7f\2\2\u04f7\u04f9\5\u00ca"+ + "f\2\u04f8\u04f4\3\2\2\2\u04f8\u04f6\3\2\2\2\u04f9\u00c9\3\2\2\2\u04fa"+ + "\u04fc\7;\2\2\u04fb\u04fd\5\u00aaV\2\u04fc\u04fb\3\2\2\2\u04fc\u04fd\3"+ + "\2\2\2\u04fd\u04fe\3\2\2\2\u04fe\u04ff\7<\2\2\u04ff\u00cb\3\2\2\2\u0097"+ + "\u00cd\u00d2\u00d8\u00e0\u00e9\u00ee\u00f5\u00fc\u0103\u010a\u010f\u0113"+ + "\u0117\u011b\u0120\u0124\u0128\u0132\u013a\u0141\u0148\u014c\u014f\u0152"+ + "\u015b\u0161\u0166\u0169\u016f\u0175\u0179\u0182\u0189\u0192\u0199\u019f"+ + "\u01a3\u01ae\u01b2\u01ba\u01bf\u01c3\u01cc\u01da\u01df\u01e8\u01f0\u01fa"+ + "\u0202\u020a\u020f\u021b\u0221\u0228\u022d\u0235\u0239\u023b\u0246\u024e"+ + "\u0251\u0255\u025a\u025e\u0269\u0272\u0274\u027b\u0280\u0289\u028e\u0291"+ + "\u0296\u029f\u02af\u02b9\u02bc\u02c5\u02cf\u02d7\u02da\u02dd\u02ea\u02f2"+ + "\u02f7\u02ff\u0303\u0307\u030b\u030d\u0311\u0317\u0322\u032a\u0332\u033d"+ + "\u0346\u035d\u0360\u0363\u036b\u036f\u0377\u037d\u0388\u0391\u0396\u03a0"+ + "\u03a7\u03b4\u03bd\u03c6\u03cc\u03d7\u03dc\u03e8\u03ec\u03f0\u03f4\u03f6"+ + "\u03fa\u03ff\u0412\u0426\u0436\u0461\u0473\u047b\u047d\u0493\u0495\u049e"+ + "\u04a0\u04a4\u04a9\u04ad\u04b1\u04b5\u04bf\u04cb\u04d2\u04d5\u04d9\u04e5"+ + "\u04ea\u04f0\u04f2\u04f8\u04fc"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/antlr/Java8Visitor.java b/antlr/Java8Visitor.java new file mode 100644 index 000000000..66ed9e6cc --- /dev/null +++ b/antlr/Java8Visitor.java @@ -0,0 +1,619 @@ +// Generated from Java8.g4 by ANTLR 4.4 +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ParseTreeVisitor; + +/** + * This interface defines a complete generic visitor for a parse tree produced + * by {@link Java8Parser}. + * + * @param The return type of the visit operation. Use {@link Void} for + * operations with no return type. + */ +public interface Java8Visitor extends ParseTreeVisitor { + /** + * Visit a parse tree produced by {@link Java8Parser#memberDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#defaultValue}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#annotationTypeElementDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#type}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitType(@NotNull Java8Parser.TypeContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#annotationTypeBody}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#genericInterfaceMethodDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#classBodyDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#block}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitBlock(@NotNull Java8Parser.BlockContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#enumBodyDeclarations}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#forUpdate}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitForUpdate(@NotNull Java8Parser.ForUpdateContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#enhancedForControl}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#annotationConstantRest}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#explicitGenericInvocation}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#nonWildcardTypeArgumentsOrDiamond}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#expressionList}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExpressionList(@NotNull Java8Parser.ExpressionListContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#annotationTypeElementRest}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#classOrInterfaceType}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#typeBound}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitTypeBound(@NotNull Java8Parser.TypeBoundContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#variableDeclaratorId}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#primary}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPrimary(@NotNull Java8Parser.PrimaryContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#classCreatorRest}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#interfaceBodyDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#typeArguments}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#annotationName}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#finallyBlock}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#typeParameters}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#lastFormalParameter}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#constructorBody}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#literal}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLiteral(@NotNull Java8Parser.LiteralContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#annotationMethodOrConstantRest}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#catchClause}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitCatchClause(@NotNull Java8Parser.CatchClauseContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#variableDeclarator}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#typeList}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitTypeList(@NotNull Java8Parser.TypeListContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#enumConstants}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#classBody}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitClassBody(@NotNull Java8Parser.ClassBodyContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#createdName}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitCreatedName(@NotNull Java8Parser.CreatedNameContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#enumDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#formalParameter}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#parExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitParExpression(@NotNull Java8Parser.ParExpressionContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#annotation}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAnnotation(@NotNull Java8Parser.AnnotationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#variableInitializer}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#elementValueArrayInitializer}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#creator}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitCreator(@NotNull Java8Parser.CreatorContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#arrayCreatorRest}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#expression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExpression(@NotNull Java8Parser.ExpressionContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#constantExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#qualifiedNameList}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#constructorDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#forControl}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitForControl(@NotNull Java8Parser.ForControlContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#superSuffix}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#variableDeclarators}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#catchType}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitCatchType(@NotNull Java8Parser.CatchTypeContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#classOrInterfaceModifier}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#enumConstantName}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#modifier}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitModifier(@NotNull Java8Parser.ModifierContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#innerCreator}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#explicitGenericInvocationSuffix}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#variableModifier}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#elementValuePair}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#arrayInitializer}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#elementValue}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitElementValue(@NotNull Java8Parser.ElementValueContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#constDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#resource}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitResource(@NotNull Java8Parser.ResourceContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#qualifiedName}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#resourceSpecification}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#formalParameterList}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#annotationTypeDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#compilationUnit}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#annotationMethodRest}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#switchBlockStatementGroup}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#typeParameter}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#interfaceBody}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#methodDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#methodBody}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitMethodBody(@NotNull Java8Parser.MethodBodyContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#typeArgument}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#typeDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#genericConstructorDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#classDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#enumConstant}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#statement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitStatement(@NotNull Java8Parser.StatementContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#importDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#primitiveType}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#interfaceDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#localVariableDeclarationStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#blockStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#fieldDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#constantDeclarator}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#resources}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitResources(@NotNull Java8Parser.ResourcesContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#statementExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#interfaceMethodDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#packageDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#elementValuePairs}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#localVariableDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#nonWildcardTypeArguments}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#interfaceMemberDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#switchLabel}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#forInit}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitForInit(@NotNull Java8Parser.ForInitContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#formalParameters}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#arguments}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitArguments(@NotNull Java8Parser.ArgumentsContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#genericMethodDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link Java8Parser#typeArgumentsOrDiamond}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx); +} \ No newline at end of file diff --git a/antlr/makefile b/antlr/makefile new file mode 100644 index 000000000..63db993ef --- /dev/null +++ b/antlr/makefile @@ -0,0 +1,4 @@ +all: + java -jar ./antlr-4.4-complete.jar -no-listener -visitor Java8.g4 + javac -cp ./antlr-4.4-complete.jar:. *.java + diff --git a/antlr/src/.gitignore b/antlr/src/.gitignore new file mode 100644 index 000000000..e93324f57 --- /dev/null +++ b/antlr/src/.gitignore @@ -0,0 +1,107 @@ +/Java8BaseListener.class +/Java8Lexer.class +/Java8Listener.class +/Java8Parser$AnnotationConstantRestContext.class +/Java8Parser$AnnotationContext.class +/Java8Parser$AnnotationMethodOrConstantRestContext.class +/Java8Parser$AnnotationMethodRestContext.class +/Java8Parser$AnnotationNameContext.class +/Java8Parser$AnnotationTypeBodyContext.class +/Java8Parser$AnnotationTypeDeclarationContext.class +/Java8Parser$AnnotationTypeElementDeclarationContext.class +/Java8Parser$AnnotationTypeElementRestContext.class +/Java8Parser$ArgumentsContext.class +/Java8Parser$ArrayCreatorRestContext.class +/Java8Parser$ArrayInitializerContext.class +/Java8Parser$BlockContext.class +/Java8Parser$BlockStatementContext.class +/Java8Parser$CatchClauseContext.class +/Java8Parser$CatchTypeContext.class +/Java8Parser$ClassBodyContext.class +/Java8Parser$ClassBodyDeclarationContext.class +/Java8Parser$ClassCreatorRestContext.class +/Java8Parser$ClassDeclarationContext.class +/Java8Parser$ClassOrInterfaceModifierContext.class +/Java8Parser$ClassOrInterfaceTypeContext.class +/Java8Parser$CompilationUnitContext.class +/Java8Parser$ConstDeclarationContext.class +/Java8Parser$ConstantDeclaratorContext.class +/Java8Parser$ConstantExpressionContext.class +/Java8Parser$ConstructorBodyContext.class +/Java8Parser$ConstructorDeclarationContext.class +/Java8Parser$CreatedNameContext.class +/Java8Parser$CreatorContext.class +/Java8Parser$DefaultValueContext.class +/Java8Parser$ElementValueArrayInitializerContext.class +/Java8Parser$ElementValueContext.class +/Java8Parser$ElementValuePairContext.class +/Java8Parser$ElementValuePairsContext.class +/Java8Parser$EnhancedForControlContext.class +/Java8Parser$EnumBodyDeclarationsContext.class +/Java8Parser$EnumConstantContext.class +/Java8Parser$EnumConstantNameContext.class +/Java8Parser$EnumConstantsContext.class +/Java8Parser$EnumDeclarationContext.class +/Java8Parser$ExplicitGenericInvocationContext.class +/Java8Parser$ExplicitGenericInvocationSuffixContext.class +/Java8Parser$ExpressionContext.class +/Java8Parser$ExpressionListContext.class +/Java8Parser$FieldDeclarationContext.class +/Java8Parser$FinallyBlockContext.class +/Java8Parser$ForControlContext.class +/Java8Parser$ForInitContext.class +/Java8Parser$ForUpdateContext.class +/Java8Parser$FormalParameterContext.class +/Java8Parser$FormalParameterListContext.class +/Java8Parser$FormalParametersContext.class +/Java8Parser$GenericConstructorDeclarationContext.class +/Java8Parser$GenericInterfaceMethodDeclarationContext.class +/Java8Parser$GenericMethodDeclarationContext.class +/Java8Parser$ImportDeclarationContext.class +/Java8Parser$InnerCreatorContext.class +/Java8Parser$InterfaceBodyContext.class +/Java8Parser$InterfaceBodyDeclarationContext.class +/Java8Parser$InterfaceDeclarationContext.class +/Java8Parser$InterfaceMemberDeclarationContext.class +/Java8Parser$InterfaceMethodDeclarationContext.class +/Java8Parser$LastFormalParameterContext.class +/Java8Parser$LiteralContext.class +/Java8Parser$LocalVariableDeclarationContext.class +/Java8Parser$LocalVariableDeclarationStatementContext.class +/Java8Parser$MemberDeclarationContext.class +/Java8Parser$MethodBodyContext.class +/Java8Parser$MethodDeclarationContext.class +/Java8Parser$ModifierContext.class +/Java8Parser$NonWildcardTypeArgumentsContext.class +/Java8Parser$NonWildcardTypeArgumentsOrDiamondContext.class +/Java8Parser$PackageDeclarationContext.class +/Java8Parser$ParExpressionContext.class +/Java8Parser$PrimaryContext.class +/Java8Parser$PrimitiveTypeContext.class +/Java8Parser$QualifiedNameContext.class +/Java8Parser$QualifiedNameListContext.class +/Java8Parser$ResourceContext.class +/Java8Parser$ResourceSpecificationContext.class +/Java8Parser$ResourcesContext.class +/Java8Parser$StatementContext.class +/Java8Parser$StatementExpressionContext.class +/Java8Parser$SuperSuffixContext.class +/Java8Parser$SwitchBlockStatementGroupContext.class +/Java8Parser$SwitchLabelContext.class +/Java8Parser$TypeArgumentContext.class +/Java8Parser$TypeArgumentsContext.class +/Java8Parser$TypeArgumentsOrDiamondContext.class +/Java8Parser$TypeBoundContext.class +/Java8Parser$TypeContext.class +/Java8Parser$TypeDeclarationContext.class +/Java8Parser$TypeListContext.class +/Java8Parser$TypeParameterContext.class +/Java8Parser$TypeParametersContext.class +/Java8Parser$VariableDeclaratorContext.class +/Java8Parser$VariableDeclaratorIdContext.class +/Java8Parser$VariableDeclaratorsContext.class +/Java8Parser$VariableInitializerContext.class +/Java8Parser$VariableModifierContext.class +/Java8Parser.class +/SyntaxTreeBuilder.class +/Test.class diff --git a/antlr/src/Java8BaseListener.java b/antlr/src/Java8BaseListener.java new file mode 100644 index 000000000..95e284132 --- /dev/null +++ b/antlr/src/Java8BaseListener.java @@ -0,0 +1,1252 @@ +package src; +// Generated from Java8.g4 by ANTLR 4.4 + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ErrorNode; +import org.antlr.v4.runtime.tree.TerminalNode; + +/** + * This class provides an empty implementation of {@link Java8Listener}, + * which can be extended to create a listener which only needs to handle a subset + * of the available methods. + */ +public class Java8BaseListener implements Java8Listener { + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterType(@NotNull Java8Parser.TypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitType(@NotNull Java8Parser.TypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBlock(@NotNull Java8Parser.BlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBlock(@NotNull Java8Parser.BlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterForUpdate(@NotNull Java8Parser.ForUpdateContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitForUpdate(@NotNull Java8Parser.ForUpdateContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExpressionList(@NotNull Java8Parser.ExpressionListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExpressionList(@NotNull Java8Parser.ExpressionListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeBound(@NotNull Java8Parser.TypeBoundContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeBound(@NotNull Java8Parser.TypeBoundContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPrimary(@NotNull Java8Parser.PrimaryContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPrimary(@NotNull Java8Parser.PrimaryContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLiteral(@NotNull Java8Parser.LiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLiteral(@NotNull Java8Parser.LiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCatchClause(@NotNull Java8Parser.CatchClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCatchClause(@NotNull Java8Parser.CatchClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeList(@NotNull Java8Parser.TypeListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeList(@NotNull Java8Parser.TypeListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassBody(@NotNull Java8Parser.ClassBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassBody(@NotNull Java8Parser.ClassBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCreatedName(@NotNull Java8Parser.CreatedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCreatedName(@NotNull Java8Parser.CreatedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterParExpression(@NotNull Java8Parser.ParExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitParExpression(@NotNull Java8Parser.ParExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotation(@NotNull Java8Parser.AnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotation(@NotNull Java8Parser.AnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCreator(@NotNull Java8Parser.CreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCreator(@NotNull Java8Parser.CreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExpression(@NotNull Java8Parser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExpression(@NotNull Java8Parser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterForControl(@NotNull Java8Parser.ForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitForControl(@NotNull Java8Parser.ForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCatchType(@NotNull Java8Parser.CatchTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCatchType(@NotNull Java8Parser.CatchTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterModifier(@NotNull Java8Parser.ModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitModifier(@NotNull Java8Parser.ModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterElementValue(@NotNull Java8Parser.ElementValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitElementValue(@NotNull Java8Parser.ElementValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterResource(@NotNull Java8Parser.ResourceContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitResource(@NotNull Java8Parser.ResourceContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMethodBody(@NotNull Java8Parser.MethodBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMethodBody(@NotNull Java8Parser.MethodBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStatement(@NotNull Java8Parser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStatement(@NotNull Java8Parser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterResources(@NotNull Java8Parser.ResourcesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitResources(@NotNull Java8Parser.ResourcesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterForInit(@NotNull Java8Parser.ForInitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitForInit(@NotNull Java8Parser.ForInitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArguments(@NotNull Java8Parser.ArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArguments(@NotNull Java8Parser.ArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx) { } + + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEveryRule(@NotNull ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEveryRule(@NotNull ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitTerminal(@NotNull TerminalNode node) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitErrorNode(@NotNull ErrorNode node) { } +} \ No newline at end of file diff --git a/antlr/src/Java8Lexer.java b/antlr/src/Java8Lexer.java new file mode 100644 index 000000000..be211c679 --- /dev/null +++ b/antlr/src/Java8Lexer.java @@ -0,0 +1,516 @@ +package src; +// Generated from Java8.g4 by ANTLR 4.4 +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class Java8Lexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.4", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + ABSTRACT=1, ASSERT=2, BOOLEAN=3, BREAK=4, BYTE=5, CASE=6, CATCH=7, CHAR=8, + CLASS=9, CONST=10, CONTINUE=11, DEFAULT=12, DO=13, DOUBLE=14, ELSE=15, + ENUM=16, EXTENDS=17, FINAL=18, FINALLY=19, FLOAT=20, FOR=21, IF=22, GOTO=23, + IMPLEMENTS=24, IMPORT=25, INSTANCEOF=26, INT=27, INTERFACE=28, LONG=29, + NATIVE=30, NEW=31, PACKAGE=32, PRIVATE=33, PROTECTED=34, PUBLIC=35, RETURN=36, + SHORT=37, STATIC=38, STRICTFP=39, SUPER=40, SWITCH=41, SYNCHRONIZED=42, + THIS=43, THROW=44, THROWS=45, TRANSIENT=46, TRY=47, VOID=48, VOLATILE=49, + WHILE=50, IntegerLiteral=51, FloatingPointLiteral=52, BooleanLiteral=53, + CharacterLiteral=54, StringLiteral=55, NullLiteral=56, LPAREN=57, RPAREN=58, + LBRACE=59, RBRACE=60, LBRACK=61, RBRACK=62, SEMI=63, COMMA=64, DOT=65, + ASSIGN=66, GT=67, LT=68, BANG=69, TILDE=70, QUESTION=71, COLON=72, EQUAL=73, + LE=74, GE=75, NOTEQUAL=76, AND=77, OR=78, INC=79, DEC=80, ADD=81, SUB=82, + MUL=83, DIV=84, BITAND=85, BITOR=86, CARET=87, MOD=88, ADD_ASSIGN=89, + SUB_ASSIGN=90, MUL_ASSIGN=91, DIV_ASSIGN=92, AND_ASSIGN=93, OR_ASSIGN=94, + XOR_ASSIGN=95, MOD_ASSIGN=96, LSHIFT_ASSIGN=97, RSHIFT_ASSIGN=98, URSHIFT_ASSIGN=99, + Identifier=100, AT=101, ELLIPSIS=102, WS=103, COMMENT=104, LINE_COMMENT=105; + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + public static final String[] tokenNames = { + "'\\u0000'", "'\\u0001'", "'\\u0002'", "'\\u0003'", "'\\u0004'", "'\\u0005'", + "'\\u0006'", "'\\u0007'", "'\b'", "'\t'", "'\n'", "'\\u000B'", "'\f'", + "'\r'", "'\\u000E'", "'\\u000F'", "'\\u0010'", "'\\u0011'", "'\\u0012'", + "'\\u0013'", "'\\u0014'", "'\\u0015'", "'\\u0016'", "'\\u0017'", "'\\u0018'", + "'\\u0019'", "'\\u001A'", "'\\u001B'", "'\\u001C'", "'\\u001D'", "'\\u001E'", + "'\\u001F'", "' '", "'!'", "'\"'", "'#'", "'$'", "'%'", "'&'", "'''", + "'('", "')'", "'*'", "'+'", "','", "'-'", "'.'", "'/'", "'0'", "'1'", + "'2'", "'3'", "'4'", "'5'", "'6'", "'7'", "'8'", "'9'", "':'", "';'", + "'<'", "'='", "'>'", "'?'", "'@'", "'A'", "'B'", "'C'", "'D'", "'E'", + "'F'", "'G'", "'H'", "'I'", "'J'", "'K'", "'L'", "'M'", "'N'", "'O'", + "'P'", "'Q'", "'R'", "'S'", "'T'", "'U'", "'V'", "'W'", "'X'", "'Y'", + "'Z'", "'['", "'\\'", "']'", "'^'", "'_'", "'`'", "'a'", "'b'", "'c'", + "'d'", "'e'", "'f'", "'g'", "'h'", "'i'" + }; + public static final String[] ruleNames = { + "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH", "CHAR", + "CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE", "ENUM", + "EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "IF", "GOTO", "IMPLEMENTS", + "IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG", "NATIVE", "NEW", "PACKAGE", + "PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "SHORT", "STATIC", "STRICTFP", + "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", "TRANSIENT", + "TRY", "VOID", "VOLATILE", "WHILE", "IntegerLiteral", "DecimalIntegerLiteral", + "HexIntegerLiteral", "OctalIntegerLiteral", "BinaryIntegerLiteral", "IntegerTypeSuffix", + "DecimalNumeral", "Digits", "Digit", "NonZeroDigit", "DigitOrUnderscore", + "Underscores", "HexNumeral", "HexDigits", "HexDigit", "HexDigitOrUnderscore", + "OctalNumeral", "OctalDigits", "OctalDigit", "OctalDigitOrUnderscore", + "BinaryNumeral", "BinaryDigits", "BinaryDigit", "BinaryDigitOrUnderscore", + "FloatingPointLiteral", "DecimalFloatingPointLiteral", "ExponentPart", + "ExponentIndicator", "SignedInteger", "Sign", "FloatTypeSuffix", "HexadecimalFloatingPointLiteral", + "HexSignificand", "BinaryExponent", "BinaryExponentIndicator", "BooleanLiteral", + "CharacterLiteral", "SingleCharacter", "StringLiteral", "StringCharacters", + "StringCharacter", "EscapeSequence", "OctalEscape", "UnicodeEscape", "ZeroToThree", + "NullLiteral", "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", + "SEMI", "COMMA", "DOT", "ASSIGN", "GT", "LT", "BANG", "TILDE", "QUESTION", + "COLON", "EQUAL", "LE", "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", "ADD", + "SUB", "MUL", "DIV", "BITAND", "BITOR", "CARET", "MOD", "ADD_ASSIGN", + "SUB_ASSIGN", "MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", + "MOD_ASSIGN", "LSHIFT_ASSIGN", "RSHIFT_ASSIGN", "URSHIFT_ASSIGN", "Identifier", + "JavaLetter", "JavaLetterOrDigit", "AT", "ELLIPSIS", "WS", "COMMENT", + "LINE_COMMENT" + }; + + + public Java8Lexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "Java8.g4"; } + + @Override + public String[] getTokenNames() { return tokenNames; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + @Override + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 140: return JavaLetter_sempred((RuleContext)_localctx, predIndex); + case 141: return JavaLetterOrDigit_sempred((RuleContext)_localctx, predIndex); + } + return true; + } + private boolean JavaLetterOrDigit_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 2: return Character.isJavaIdentifierPart(_input.LA(-1)); + case 3: return Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1))); + } + return true; + } + private boolean JavaLetter_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 0: return Character.isJavaIdentifierStart(_input.LA(-1)); + case 1: return Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1))); + } + return true; + } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2k\u042e\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"+ + "\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\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ + "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ + "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ + "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\t"+ + "k\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv\4"+ + "w\tw\4x\tx\4y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t\u0080"+ + "\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083\4\u0084\t\u0084\4\u0085"+ + "\t\u0085\4\u0086\t\u0086\4\u0087\t\u0087\4\u0088\t\u0088\4\u0089\t\u0089"+ + "\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"+ + "\4\u0093\t\u0093\4\u0094\t\u0094\3\2\3\2\3\2\3\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\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\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\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\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\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\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\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\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\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\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\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\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!\3!\3!\3!\3!\3\"\3\"\3"+ + "\"\3\"\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3$\3$\3$\3$\3$\3"+ + "$\3$\3%\3%\3%\3%\3%\3%\3%\3&\3&\3&\3&\3&\3&\3\'\3\'\3\'\3\'\3\'\3\'\3"+ + "\'\3(\3(\3(\3(\3(\3(\3(\3(\3(\3)\3)\3)\3)\3)\3)\3*\3*\3*\3*\3*\3*\3*\3"+ + "+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3,\3,\3,\3,\3,\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\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\64\3\64\5\64\u0281\n\64"+ + "\3\65\3\65\5\65\u0285\n\65\3\66\3\66\5\66\u0289\n\66\3\67\3\67\5\67\u028d"+ + "\n\67\38\38\58\u0291\n8\39\39\3:\3:\3:\5:\u0298\n:\3:\3:\3:\5:\u029d\n"+ + ":\5:\u029f\n:\3;\3;\7;\u02a3\n;\f;\16;\u02a6\13;\3;\5;\u02a9\n;\3<\3<"+ + "\5<\u02ad\n<\3=\3=\3>\3>\5>\u02b3\n>\3?\6?\u02b6\n?\r?\16?\u02b7\3@\3"+ + "@\3@\3@\3A\3A\7A\u02c0\nA\fA\16A\u02c3\13A\3A\5A\u02c6\nA\3B\3B\3C\3C"+ + "\5C\u02cc\nC\3D\3D\5D\u02d0\nD\3D\3D\3E\3E\7E\u02d6\nE\fE\16E\u02d9\13"+ + "E\3E\5E\u02dc\nE\3F\3F\3G\3G\5G\u02e2\nG\3H\3H\3H\3H\3I\3I\7I\u02ea\n"+ + "I\fI\16I\u02ed\13I\3I\5I\u02f0\nI\3J\3J\3K\3K\5K\u02f6\nK\3L\3L\5L\u02fa"+ + "\nL\3M\3M\3M\5M\u02ff\nM\3M\5M\u0302\nM\3M\5M\u0305\nM\3M\3M\3M\5M\u030a"+ + "\nM\3M\5M\u030d\nM\3M\3M\3M\5M\u0312\nM\3M\3M\3M\5M\u0317\nM\3N\3N\3N"+ + "\3O\3O\3P\5P\u031f\nP\3P\3P\3Q\3Q\3R\3R\3S\3S\3S\5S\u032a\nS\3T\3T\5T"+ + "\u032e\nT\3T\3T\3T\5T\u0333\nT\3T\3T\5T\u0337\nT\3U\3U\3U\3V\3V\3W\3W"+ + "\3W\3W\3W\3W\3W\3W\3W\5W\u0347\nW\3X\3X\3X\3X\3X\3X\3X\3X\5X\u0351\nX"+ + "\3Y\3Y\3Z\3Z\5Z\u0357\nZ\3Z\3Z\3[\6[\u035c\n[\r[\16[\u035d\3\\\3\\\5\\"+ + "\u0362\n\\\3]\3]\3]\3]\5]\u0368\n]\3^\3^\3^\3^\3^\3^\3^\3^\3^\3^\3^\5"+ + "^\u0375\n^\3_\3_\3_\3_\3_\3_\3_\3`\3`\3a\3a\3a\3a\3a\3b\3b\3c\3c\3d\3"+ + "d\3e\3e\3f\3f\3g\3g\3h\3h\3i\3i\3j\3j\3k\3k\3l\3l\3m\3m\3n\3n\3o\3o\3"+ + "p\3p\3q\3q\3r\3r\3r\3s\3s\3s\3t\3t\3t\3u\3u\3u\3v\3v\3v\3w\3w\3w\3x\3"+ + "x\3x\3y\3y\3y\3z\3z\3{\3{\3|\3|\3}\3}\3~\3~\3\177\3\177\3\u0080\3\u0080"+ + "\3\u0081\3\u0081\3\u0082\3\u0082\3\u0082\3\u0083\3\u0083\3\u0083\3\u0084"+ + "\3\u0084\3\u0084\3\u0085\3\u0085\3\u0085\3\u0086\3\u0086\3\u0086\3\u0087"+ + "\3\u0087\3\u0087\3\u0088\3\u0088\3\u0088\3\u0089\3\u0089\3\u0089\3\u008a"+ + "\3\u008a\3\u008a\3\u008a\3\u008b\3\u008b\3\u008b\3\u008b\3\u008c\3\u008c"+ + "\3\u008c\3\u008c\3\u008c\3\u008d\3\u008d\7\u008d\u03f4\n\u008d\f\u008d"+ + "\16\u008d\u03f7\13\u008d\3\u008e\3\u008e\3\u008e\3\u008e\3\u008e\3\u008e"+ + "\5\u008e\u03ff\n\u008e\3\u008f\3\u008f\3\u008f\3\u008f\3\u008f\3\u008f"+ + "\5\u008f\u0407\n\u008f\3\u0090\3\u0090\3\u0091\3\u0091\3\u0091\3\u0091"+ + "\3\u0092\6\u0092\u0410\n\u0092\r\u0092\16\u0092\u0411\3\u0092\3\u0092"+ + "\3\u0093\3\u0093\3\u0093\3\u0093\7\u0093\u041a\n\u0093\f\u0093\16\u0093"+ + "\u041d\13\u0093\3\u0093\3\u0093\3\u0093\3\u0093\3\u0093\3\u0094\3\u0094"+ + "\3\u0094\3\u0094\7\u0094\u0428\n\u0094\f\u0094\16\u0094\u042b\13\u0094"+ + "\3\u0094\3\u0094\3\u041b\2\u0095\3\3\5\4\7\5\t\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%\24\'\25)\26+\27-\30/\31"+ + "\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'M(O)Q*S+U,W-Y.[/]\60"+ + "_\61a\62c\63e\64g\65i\2k\2m\2o\2q\2s\2u\2w\2y\2{\2}\2\177\2\u0081\2\u0083"+ + "\2\u0085\2\u0087\2\u0089\2\u008b\2\u008d\2\u008f\2\u0091\2\u0093\2\u0095"+ + "\2\u0097\66\u0099\2\u009b\2\u009d\2\u009f\2\u00a1\2\u00a3\2\u00a5\2\u00a7"+ + "\2\u00a9\2\u00ab\2\u00ad\67\u00af8\u00b1\2\u00b39\u00b5\2\u00b7\2\u00b9"+ + "\2\u00bb\2\u00bd\2\u00bf\2\u00c1:\u00c3;\u00c5<\u00c7=\u00c9>\u00cb?\u00cd"+ + "@\u00cfA\u00d1B\u00d3C\u00d5D\u00d7E\u00d9F\u00dbG\u00ddH\u00dfI\u00e1"+ + "J\u00e3K\u00e5L\u00e7M\u00e9N\u00ebO\u00edP\u00efQ\u00f1R\u00f3S\u00f5"+ + "T\u00f7U\u00f9V\u00fbW\u00fdX\u00ffY\u0101Z\u0103[\u0105\\\u0107]\u0109"+ + "^\u010b_\u010d`\u010fa\u0111b\u0113c\u0115d\u0117e\u0119f\u011b\2\u011d"+ + "\2\u011fg\u0121h\u0123i\u0125j\u0127k\3\2\30\4\2NNnn\3\2\63;\4\2ZZzz\5"+ + "\2\62;CHch\3\2\629\4\2DDdd\3\2\62\63\4\2GGgg\4\2--//\6\2FFHHffhh\4\2R"+ + "Rrr\4\2))^^\4\2$$^^\n\2$$))^^ddhhppttvv\3\2\62\65\6\2&&C\\aac|\4\2\2\u0101"+ + "\ud802\udc01\3\2\ud802\udc01\3\2\udc02\ue001\7\2&&\62;C\\aac|\5\2\13\f"+ + "\16\17\"\"\4\2\f\f\17\17\u043c\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t"+ + "\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2"+ + "\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2"+ + "\37\3\2\2\2\2!\3\2\2\2\2#\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\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2"+ + "\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2"+ + "C\3\2\2\2\2E\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\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_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2"+ + "\u0097\3\2\2\2\2\u00ad\3\2\2\2\2\u00af\3\2\2\2\2\u00b3\3\2\2\2\2\u00c1"+ + "\3\2\2\2\2\u00c3\3\2\2\2\2\u00c5\3\2\2\2\2\u00c7\3\2\2\2\2\u00c9\3\2\2"+ + "\2\2\u00cb\3\2\2\2\2\u00cd\3\2\2\2\2\u00cf\3\2\2\2\2\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\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\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\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\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\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\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\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\2\2\u0119\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\u0127\3\2\2"+ + "\2\3\u0129\3\2\2\2\5\u0132\3\2\2\2\7\u0139\3\2\2\2\t\u0141\3\2\2\2\13"+ + "\u0147\3\2\2\2\r\u014c\3\2\2\2\17\u0151\3\2\2\2\21\u0157\3\2\2\2\23\u015c"+ + "\3\2\2\2\25\u0162\3\2\2\2\27\u0168\3\2\2\2\31\u0171\3\2\2\2\33\u0179\3"+ + "\2\2\2\35\u017c\3\2\2\2\37\u0183\3\2\2\2!\u0188\3\2\2\2#\u018d\3\2\2\2"+ + "%\u0195\3\2\2\2\'\u019b\3\2\2\2)\u01a3\3\2\2\2+\u01a9\3\2\2\2-\u01ad\3"+ + "\2\2\2/\u01b0\3\2\2\2\61\u01b5\3\2\2\2\63\u01c0\3\2\2\2\65\u01c7\3\2\2"+ + "\2\67\u01d2\3\2\2\29\u01d6\3\2\2\2;\u01e0\3\2\2\2=\u01e5\3\2\2\2?\u01ec"+ + "\3\2\2\2A\u01f0\3\2\2\2C\u01f8\3\2\2\2E\u0200\3\2\2\2G\u020a\3\2\2\2I"+ + "\u0211\3\2\2\2K\u0218\3\2\2\2M\u021e\3\2\2\2O\u0225\3\2\2\2Q\u022e\3\2"+ + "\2\2S\u0234\3\2\2\2U\u023b\3\2\2\2W\u0248\3\2\2\2Y\u024d\3\2\2\2[\u0253"+ + "\3\2\2\2]\u025a\3\2\2\2_\u0264\3\2\2\2a\u0268\3\2\2\2c\u026d\3\2\2\2e"+ + "\u0276\3\2\2\2g\u0280\3\2\2\2i\u0282\3\2\2\2k\u0286\3\2\2\2m\u028a\3\2"+ + "\2\2o\u028e\3\2\2\2q\u0292\3\2\2\2s\u029e\3\2\2\2u\u02a0\3\2\2\2w\u02ac"+ + "\3\2\2\2y\u02ae\3\2\2\2{\u02b2\3\2\2\2}\u02b5\3\2\2\2\177\u02b9\3\2\2"+ + "\2\u0081\u02bd\3\2\2\2\u0083\u02c7\3\2\2\2\u0085\u02cb\3\2\2\2\u0087\u02cd"+ + "\3\2\2\2\u0089\u02d3\3\2\2\2\u008b\u02dd\3\2\2\2\u008d\u02e1\3\2\2\2\u008f"+ + "\u02e3\3\2\2\2\u0091\u02e7\3\2\2\2\u0093\u02f1\3\2\2\2\u0095\u02f5\3\2"+ + "\2\2\u0097\u02f9\3\2\2\2\u0099\u0316\3\2\2\2\u009b\u0318\3\2\2\2\u009d"+ + "\u031b\3\2\2\2\u009f\u031e\3\2\2\2\u00a1\u0322\3\2\2\2\u00a3\u0324\3\2"+ + "\2\2\u00a5\u0326\3\2\2\2\u00a7\u0336\3\2\2\2\u00a9\u0338\3\2\2\2\u00ab"+ + "\u033b\3\2\2\2\u00ad\u0346\3\2\2\2\u00af\u0350\3\2\2\2\u00b1\u0352\3\2"+ + "\2\2\u00b3\u0354\3\2\2\2\u00b5\u035b\3\2\2\2\u00b7\u0361\3\2\2\2\u00b9"+ + "\u0367\3\2\2\2\u00bb\u0374\3\2\2\2\u00bd\u0376\3\2\2\2\u00bf\u037d\3\2"+ + "\2\2\u00c1\u037f\3\2\2\2\u00c3\u0384\3\2\2\2\u00c5\u0386\3\2\2\2\u00c7"+ + "\u0388\3\2\2\2\u00c9\u038a\3\2\2\2\u00cb\u038c\3\2\2\2\u00cd\u038e\3\2"+ + "\2\2\u00cf\u0390\3\2\2\2\u00d1\u0392\3\2\2\2\u00d3\u0394\3\2\2\2\u00d5"+ + "\u0396\3\2\2\2\u00d7\u0398\3\2\2\2\u00d9\u039a\3\2\2\2\u00db\u039c\3\2"+ + "\2\2\u00dd\u039e\3\2\2\2\u00df\u03a0\3\2\2\2\u00e1\u03a2\3\2\2\2\u00e3"+ + "\u03a4\3\2\2\2\u00e5\u03a7\3\2\2\2\u00e7\u03aa\3\2\2\2\u00e9\u03ad\3\2"+ + "\2\2\u00eb\u03b0\3\2\2\2\u00ed\u03b3\3\2\2\2\u00ef\u03b6\3\2\2\2\u00f1"+ + "\u03b9\3\2\2\2\u00f3\u03bc\3\2\2\2\u00f5\u03be\3\2\2\2\u00f7\u03c0\3\2"+ + "\2\2\u00f9\u03c2\3\2\2\2\u00fb\u03c4\3\2\2\2\u00fd\u03c6\3\2\2\2\u00ff"+ + "\u03c8\3\2\2\2\u0101\u03ca\3\2\2\2\u0103\u03cc\3\2\2\2\u0105\u03cf\3\2"+ + "\2\2\u0107\u03d2\3\2\2\2\u0109\u03d5\3\2\2\2\u010b\u03d8\3\2\2\2\u010d"+ + "\u03db\3\2\2\2\u010f\u03de\3\2\2\2\u0111\u03e1\3\2\2\2\u0113\u03e4\3\2"+ + "\2\2\u0115\u03e8\3\2\2\2\u0117\u03ec\3\2\2\2\u0119\u03f1\3\2\2\2\u011b"+ + "\u03fe\3\2\2\2\u011d\u0406\3\2\2\2\u011f\u0408\3\2\2\2\u0121\u040a\3\2"+ + "\2\2\u0123\u040f\3\2\2\2\u0125\u0415\3\2\2\2\u0127\u0423\3\2\2\2\u0129"+ + "\u012a\7c\2\2\u012a\u012b\7d\2\2\u012b\u012c\7u\2\2\u012c\u012d\7v\2\2"+ + "\u012d\u012e\7t\2\2\u012e\u012f\7c\2\2\u012f\u0130\7e\2\2\u0130\u0131"+ + "\7v\2\2\u0131\4\3\2\2\2\u0132\u0133\7c\2\2\u0133\u0134\7u\2\2\u0134\u0135"+ + "\7u\2\2\u0135\u0136\7g\2\2\u0136\u0137\7t\2\2\u0137\u0138\7v\2\2\u0138"+ + "\6\3\2\2\2\u0139\u013a\7d\2\2\u013a\u013b\7q\2\2\u013b\u013c\7q\2\2\u013c"+ + "\u013d\7n\2\2\u013d\u013e\7g\2\2\u013e\u013f\7c\2\2\u013f\u0140\7p\2\2"+ + "\u0140\b\3\2\2\2\u0141\u0142\7d\2\2\u0142\u0143\7t\2\2\u0143\u0144\7g"+ + "\2\2\u0144\u0145\7c\2\2\u0145\u0146\7m\2\2\u0146\n\3\2\2\2\u0147\u0148"+ + "\7d\2\2\u0148\u0149\7{\2\2\u0149\u014a\7v\2\2\u014a\u014b\7g\2\2\u014b"+ + "\f\3\2\2\2\u014c\u014d\7e\2\2\u014d\u014e\7c\2\2\u014e\u014f\7u\2\2\u014f"+ + "\u0150\7g\2\2\u0150\16\3\2\2\2\u0151\u0152\7e\2\2\u0152\u0153\7c\2\2\u0153"+ + "\u0154\7v\2\2\u0154\u0155\7e\2\2\u0155\u0156\7j\2\2\u0156\20\3\2\2\2\u0157"+ + "\u0158\7e\2\2\u0158\u0159\7j\2\2\u0159\u015a\7c\2\2\u015a\u015b\7t\2\2"+ + "\u015b\22\3\2\2\2\u015c\u015d\7e\2\2\u015d\u015e\7n\2\2\u015e\u015f\7"+ + "c\2\2\u015f\u0160\7u\2\2\u0160\u0161\7u\2\2\u0161\24\3\2\2\2\u0162\u0163"+ + "\7e\2\2\u0163\u0164\7q\2\2\u0164\u0165\7p\2\2\u0165\u0166\7u\2\2\u0166"+ + "\u0167\7v\2\2\u0167\26\3\2\2\2\u0168\u0169\7e\2\2\u0169\u016a\7q\2\2\u016a"+ + "\u016b\7p\2\2\u016b\u016c\7v\2\2\u016c\u016d\7k\2\2\u016d\u016e\7p\2\2"+ + "\u016e\u016f\7w\2\2\u016f\u0170\7g\2\2\u0170\30\3\2\2\2\u0171\u0172\7"+ + "f\2\2\u0172\u0173\7g\2\2\u0173\u0174\7h\2\2\u0174\u0175\7c\2\2\u0175\u0176"+ + "\7w\2\2\u0176\u0177\7n\2\2\u0177\u0178\7v\2\2\u0178\32\3\2\2\2\u0179\u017a"+ + "\7f\2\2\u017a\u017b\7q\2\2\u017b\34\3\2\2\2\u017c\u017d\7f\2\2\u017d\u017e"+ + "\7q\2\2\u017e\u017f\7w\2\2\u017f\u0180\7d\2\2\u0180\u0181\7n\2\2\u0181"+ + "\u0182\7g\2\2\u0182\36\3\2\2\2\u0183\u0184\7g\2\2\u0184\u0185\7n\2\2\u0185"+ + "\u0186\7u\2\2\u0186\u0187\7g\2\2\u0187 \3\2\2\2\u0188\u0189\7g\2\2\u0189"+ + "\u018a\7p\2\2\u018a\u018b\7w\2\2\u018b\u018c\7o\2\2\u018c\"\3\2\2\2\u018d"+ + "\u018e\7g\2\2\u018e\u018f\7z\2\2\u018f\u0190\7v\2\2\u0190\u0191\7g\2\2"+ + "\u0191\u0192\7p\2\2\u0192\u0193\7f\2\2\u0193\u0194\7u\2\2\u0194$\3\2\2"+ + "\2\u0195\u0196\7h\2\2\u0196\u0197\7k\2\2\u0197\u0198\7p\2\2\u0198\u0199"+ + "\7c\2\2\u0199\u019a\7n\2\2\u019a&\3\2\2\2\u019b\u019c\7h\2\2\u019c\u019d"+ + "\7k\2\2\u019d\u019e\7p\2\2\u019e\u019f\7c\2\2\u019f\u01a0\7n\2\2\u01a0"+ + "\u01a1\7n\2\2\u01a1\u01a2\7{\2\2\u01a2(\3\2\2\2\u01a3\u01a4\7h\2\2\u01a4"+ + "\u01a5\7n\2\2\u01a5\u01a6\7q\2\2\u01a6\u01a7\7c\2\2\u01a7\u01a8\7v\2\2"+ + "\u01a8*\3\2\2\2\u01a9\u01aa\7h\2\2\u01aa\u01ab\7q\2\2\u01ab\u01ac\7t\2"+ + "\2\u01ac,\3\2\2\2\u01ad\u01ae\7k\2\2\u01ae\u01af\7h\2\2\u01af.\3\2\2\2"+ + "\u01b0\u01b1\7i\2\2\u01b1\u01b2\7q\2\2\u01b2\u01b3\7v\2\2\u01b3\u01b4"+ + "\7q\2\2\u01b4\60\3\2\2\2\u01b5\u01b6\7k\2\2\u01b6\u01b7\7o\2\2\u01b7\u01b8"+ + "\7r\2\2\u01b8\u01b9\7n\2\2\u01b9\u01ba\7g\2\2\u01ba\u01bb\7o\2\2\u01bb"+ + "\u01bc\7g\2\2\u01bc\u01bd\7p\2\2\u01bd\u01be\7v\2\2\u01be\u01bf\7u\2\2"+ + "\u01bf\62\3\2\2\2\u01c0\u01c1\7k\2\2\u01c1\u01c2\7o\2\2\u01c2\u01c3\7"+ + "r\2\2\u01c3\u01c4\7q\2\2\u01c4\u01c5\7t\2\2\u01c5\u01c6\7v\2\2\u01c6\64"+ + "\3\2\2\2\u01c7\u01c8\7k\2\2\u01c8\u01c9\7p\2\2\u01c9\u01ca\7u\2\2\u01ca"+ + "\u01cb\7v\2\2\u01cb\u01cc\7c\2\2\u01cc\u01cd\7p\2\2\u01cd\u01ce\7e\2\2"+ + "\u01ce\u01cf\7g\2\2\u01cf\u01d0\7q\2\2\u01d0\u01d1\7h\2\2\u01d1\66\3\2"+ + "\2\2\u01d2\u01d3\7k\2\2\u01d3\u01d4\7p\2\2\u01d4\u01d5\7v\2\2\u01d58\3"+ + "\2\2\2\u01d6\u01d7\7k\2\2\u01d7\u01d8\7p\2\2\u01d8\u01d9\7v\2\2\u01d9"+ + "\u01da\7g\2\2\u01da\u01db\7t\2\2\u01db\u01dc\7h\2\2\u01dc\u01dd\7c\2\2"+ + "\u01dd\u01de\7e\2\2\u01de\u01df\7g\2\2\u01df:\3\2\2\2\u01e0\u01e1\7n\2"+ + "\2\u01e1\u01e2\7q\2\2\u01e2\u01e3\7p\2\2\u01e3\u01e4\7i\2\2\u01e4<\3\2"+ + "\2\2\u01e5\u01e6\7p\2\2\u01e6\u01e7\7c\2\2\u01e7\u01e8\7v\2\2\u01e8\u01e9"+ + "\7k\2\2\u01e9\u01ea\7x\2\2\u01ea\u01eb\7g\2\2\u01eb>\3\2\2\2\u01ec\u01ed"+ + "\7p\2\2\u01ed\u01ee\7g\2\2\u01ee\u01ef\7y\2\2\u01ef@\3\2\2\2\u01f0\u01f1"+ + "\7r\2\2\u01f1\u01f2\7c\2\2\u01f2\u01f3\7e\2\2\u01f3\u01f4\7m\2\2\u01f4"+ + "\u01f5\7c\2\2\u01f5\u01f6\7i\2\2\u01f6\u01f7\7g\2\2\u01f7B\3\2\2\2\u01f8"+ + "\u01f9\7r\2\2\u01f9\u01fa\7t\2\2\u01fa\u01fb\7k\2\2\u01fb\u01fc\7x\2\2"+ + "\u01fc\u01fd\7c\2\2\u01fd\u01fe\7v\2\2\u01fe\u01ff\7g\2\2\u01ffD\3\2\2"+ + "\2\u0200\u0201\7r\2\2\u0201\u0202\7t\2\2\u0202\u0203\7q\2\2\u0203\u0204"+ + "\7v\2\2\u0204\u0205\7g\2\2\u0205\u0206\7e\2\2\u0206\u0207\7v\2\2\u0207"+ + "\u0208\7g\2\2\u0208\u0209\7f\2\2\u0209F\3\2\2\2\u020a\u020b\7r\2\2\u020b"+ + "\u020c\7w\2\2\u020c\u020d\7d\2\2\u020d\u020e\7n\2\2\u020e\u020f\7k\2\2"+ + "\u020f\u0210\7e\2\2\u0210H\3\2\2\2\u0211\u0212\7t\2\2\u0212\u0213\7g\2"+ + "\2\u0213\u0214\7v\2\2\u0214\u0215\7w\2\2\u0215\u0216\7t\2\2\u0216\u0217"+ + "\7p\2\2\u0217J\3\2\2\2\u0218\u0219\7u\2\2\u0219\u021a\7j\2\2\u021a\u021b"+ + "\7q\2\2\u021b\u021c\7t\2\2\u021c\u021d\7v\2\2\u021dL\3\2\2\2\u021e\u021f"+ + "\7u\2\2\u021f\u0220\7v\2\2\u0220\u0221\7c\2\2\u0221\u0222\7v\2\2\u0222"+ + "\u0223\7k\2\2\u0223\u0224\7e\2\2\u0224N\3\2\2\2\u0225\u0226\7u\2\2\u0226"+ + "\u0227\7v\2\2\u0227\u0228\7t\2\2\u0228\u0229\7k\2\2\u0229\u022a\7e\2\2"+ + "\u022a\u022b\7v\2\2\u022b\u022c\7h\2\2\u022c\u022d\7r\2\2\u022dP\3\2\2"+ + "\2\u022e\u022f\7u\2\2\u022f\u0230\7w\2\2\u0230\u0231\7r\2\2\u0231\u0232"+ + "\7g\2\2\u0232\u0233\7t\2\2\u0233R\3\2\2\2\u0234\u0235\7u\2\2\u0235\u0236"+ + "\7y\2\2\u0236\u0237\7k\2\2\u0237\u0238\7v\2\2\u0238\u0239\7e\2\2\u0239"+ + "\u023a\7j\2\2\u023aT\3\2\2\2\u023b\u023c\7u\2\2\u023c\u023d\7{\2\2\u023d"+ + "\u023e\7p\2\2\u023e\u023f\7e\2\2\u023f\u0240\7j\2\2\u0240\u0241\7t\2\2"+ + "\u0241\u0242\7q\2\2\u0242\u0243\7p\2\2\u0243\u0244\7k\2\2\u0244\u0245"+ + "\7|\2\2\u0245\u0246\7g\2\2\u0246\u0247\7f\2\2\u0247V\3\2\2\2\u0248\u0249"+ + "\7v\2\2\u0249\u024a\7j\2\2\u024a\u024b\7k\2\2\u024b\u024c\7u\2\2\u024c"+ + "X\3\2\2\2\u024d\u024e\7v\2\2\u024e\u024f\7j\2\2\u024f\u0250\7t\2\2\u0250"+ + "\u0251\7q\2\2\u0251\u0252\7y\2\2\u0252Z\3\2\2\2\u0253\u0254\7v\2\2\u0254"+ + "\u0255\7j\2\2\u0255\u0256\7t\2\2\u0256\u0257\7q\2\2\u0257\u0258\7y\2\2"+ + "\u0258\u0259\7u\2\2\u0259\\\3\2\2\2\u025a\u025b\7v\2\2\u025b\u025c\7t"+ + "\2\2\u025c\u025d\7c\2\2\u025d\u025e\7p\2\2\u025e\u025f\7u\2\2\u025f\u0260"+ + "\7k\2\2\u0260\u0261\7g\2\2\u0261\u0262\7p\2\2\u0262\u0263\7v\2\2\u0263"+ + "^\3\2\2\2\u0264\u0265\7v\2\2\u0265\u0266\7t\2\2\u0266\u0267\7{\2\2\u0267"+ + "`\3\2\2\2\u0268\u0269\7x\2\2\u0269\u026a\7q\2\2\u026a\u026b\7k\2\2\u026b"+ + "\u026c\7f\2\2\u026cb\3\2\2\2\u026d\u026e\7x\2\2\u026e\u026f\7q\2\2\u026f"+ + "\u0270\7n\2\2\u0270\u0271\7c\2\2\u0271\u0272\7v\2\2\u0272\u0273\7k\2\2"+ + "\u0273\u0274\7n\2\2\u0274\u0275\7g\2\2\u0275d\3\2\2\2\u0276\u0277\7y\2"+ + "\2\u0277\u0278\7j\2\2\u0278\u0279\7k\2\2\u0279\u027a\7n\2\2\u027a\u027b"+ + "\7g\2\2\u027bf\3\2\2\2\u027c\u0281\5i\65\2\u027d\u0281\5k\66\2\u027e\u0281"+ + "\5m\67\2\u027f\u0281\5o8\2\u0280\u027c\3\2\2\2\u0280\u027d\3\2\2\2\u0280"+ + "\u027e\3\2\2\2\u0280\u027f\3\2\2\2\u0281h\3\2\2\2\u0282\u0284\5s:\2\u0283"+ + "\u0285\5q9\2\u0284\u0283\3\2\2\2\u0284\u0285\3\2\2\2\u0285j\3\2\2\2\u0286"+ + "\u0288\5\177@\2\u0287\u0289\5q9\2\u0288\u0287\3\2\2\2\u0288\u0289\3\2"+ + "\2\2\u0289l\3\2\2\2\u028a\u028c\5\u0087D\2\u028b\u028d\5q9\2\u028c\u028b"+ + "\3\2\2\2\u028c\u028d\3\2\2\2\u028dn\3\2\2\2\u028e\u0290\5\u008fH\2\u028f"+ + "\u0291\5q9\2\u0290\u028f\3\2\2\2\u0290\u0291\3\2\2\2\u0291p\3\2\2\2\u0292"+ + "\u0293\t\2\2\2\u0293r\3\2\2\2\u0294\u029f\7\62\2\2\u0295\u029c\5y=\2\u0296"+ + "\u0298\5u;\2\u0297\u0296\3\2\2\2\u0297\u0298\3\2\2\2\u0298\u029d\3\2\2"+ + "\2\u0299\u029a\5}?\2\u029a\u029b\5u;\2\u029b\u029d\3\2\2\2\u029c\u0297"+ + "\3\2\2\2\u029c\u0299\3\2\2\2\u029d\u029f\3\2\2\2\u029e\u0294\3\2\2\2\u029e"+ + "\u0295\3\2\2\2\u029ft\3\2\2\2\u02a0\u02a8\5w<\2\u02a1\u02a3\5{>\2\u02a2"+ + "\u02a1\3\2\2\2\u02a3\u02a6\3\2\2\2\u02a4\u02a2\3\2\2\2\u02a4\u02a5\3\2"+ + "\2\2\u02a5\u02a7\3\2\2\2\u02a6\u02a4\3\2\2\2\u02a7\u02a9\5w<\2\u02a8\u02a4"+ + "\3\2\2\2\u02a8\u02a9\3\2\2\2\u02a9v\3\2\2\2\u02aa\u02ad\7\62\2\2\u02ab"+ + "\u02ad\5y=\2\u02ac\u02aa\3\2\2\2\u02ac\u02ab\3\2\2\2\u02adx\3\2\2\2\u02ae"+ + "\u02af\t\3\2\2\u02afz\3\2\2\2\u02b0\u02b3\5w<\2\u02b1\u02b3\7a\2\2\u02b2"+ + "\u02b0\3\2\2\2\u02b2\u02b1\3\2\2\2\u02b3|\3\2\2\2\u02b4\u02b6\7a\2\2\u02b5"+ + "\u02b4\3\2\2\2\u02b6\u02b7\3\2\2\2\u02b7\u02b5\3\2\2\2\u02b7\u02b8\3\2"+ + "\2\2\u02b8~\3\2\2\2\u02b9\u02ba\7\62\2\2\u02ba\u02bb\t\4\2\2\u02bb\u02bc"+ + "\5\u0081A\2\u02bc\u0080\3\2\2\2\u02bd\u02c5\5\u0083B\2\u02be\u02c0\5\u0085"+ + "C\2\u02bf\u02be\3\2\2\2\u02c0\u02c3\3\2\2\2\u02c1\u02bf\3\2\2\2\u02c1"+ + "\u02c2\3\2\2\2\u02c2\u02c4\3\2\2\2\u02c3\u02c1\3\2\2\2\u02c4\u02c6\5\u0083"+ + "B\2\u02c5\u02c1\3\2\2\2\u02c5\u02c6\3\2\2\2\u02c6\u0082\3\2\2\2\u02c7"+ + "\u02c8\t\5\2\2\u02c8\u0084\3\2\2\2\u02c9\u02cc\5\u0083B\2\u02ca\u02cc"+ + "\7a\2\2\u02cb\u02c9\3\2\2\2\u02cb\u02ca\3\2\2\2\u02cc\u0086\3\2\2\2\u02cd"+ + "\u02cf\7\62\2\2\u02ce\u02d0\5}?\2\u02cf\u02ce\3\2\2\2\u02cf\u02d0\3\2"+ + "\2\2\u02d0\u02d1\3\2\2\2\u02d1\u02d2\5\u0089E\2\u02d2\u0088\3\2\2\2\u02d3"+ + "\u02db\5\u008bF\2\u02d4\u02d6\5\u008dG\2\u02d5\u02d4\3\2\2\2\u02d6\u02d9"+ + "\3\2\2\2\u02d7\u02d5\3\2\2\2\u02d7\u02d8\3\2\2\2\u02d8\u02da\3\2\2\2\u02d9"+ + "\u02d7\3\2\2\2\u02da\u02dc\5\u008bF\2\u02db\u02d7\3\2\2\2\u02db\u02dc"+ + "\3\2\2\2\u02dc\u008a\3\2\2\2\u02dd\u02de\t\6\2\2\u02de\u008c\3\2\2\2\u02df"+ + "\u02e2\5\u008bF\2\u02e0\u02e2\7a\2\2\u02e1\u02df\3\2\2\2\u02e1\u02e0\3"+ + "\2\2\2\u02e2\u008e\3\2\2\2\u02e3\u02e4\7\62\2\2\u02e4\u02e5\t\7\2\2\u02e5"+ + "\u02e6\5\u0091I\2\u02e6\u0090\3\2\2\2\u02e7\u02ef\5\u0093J\2\u02e8\u02ea"+ + "\5\u0095K\2\u02e9\u02e8\3\2\2\2\u02ea\u02ed\3\2\2\2\u02eb\u02e9\3\2\2"+ + "\2\u02eb\u02ec\3\2\2\2\u02ec\u02ee\3\2\2\2\u02ed\u02eb\3\2\2\2\u02ee\u02f0"+ + "\5\u0093J\2\u02ef\u02eb\3\2\2\2\u02ef\u02f0\3\2\2\2\u02f0\u0092\3\2\2"+ + "\2\u02f1\u02f2\t\b\2\2\u02f2\u0094\3\2\2\2\u02f3\u02f6\5\u0093J\2\u02f4"+ + "\u02f6\7a\2\2\u02f5\u02f3\3\2\2\2\u02f5\u02f4\3\2\2\2\u02f6\u0096\3\2"+ + "\2\2\u02f7\u02fa\5\u0099M\2\u02f8\u02fa\5\u00a5S\2\u02f9\u02f7\3\2\2\2"+ + "\u02f9\u02f8\3\2\2\2\u02fa\u0098\3\2\2\2\u02fb\u02fc\5u;\2\u02fc\u02fe"+ + "\7\60\2\2\u02fd\u02ff\5u;\2\u02fe\u02fd\3\2\2\2\u02fe\u02ff\3\2\2\2\u02ff"+ + "\u0301\3\2\2\2\u0300\u0302\5\u009bN\2\u0301\u0300\3\2\2\2\u0301\u0302"+ + "\3\2\2\2\u0302\u0304\3\2\2\2\u0303\u0305\5\u00a3R\2\u0304\u0303\3\2\2"+ + "\2\u0304\u0305\3\2\2\2\u0305\u0317\3\2\2\2\u0306\u0307\7\60\2\2\u0307"+ + "\u0309\5u;\2\u0308\u030a\5\u009bN\2\u0309\u0308\3\2\2\2\u0309\u030a\3"+ + "\2\2\2\u030a\u030c\3\2\2\2\u030b\u030d\5\u00a3R\2\u030c\u030b\3\2\2\2"+ + "\u030c\u030d\3\2\2\2\u030d\u0317\3\2\2\2\u030e\u030f\5u;\2\u030f\u0311"+ + "\5\u009bN\2\u0310\u0312\5\u00a3R\2\u0311\u0310\3\2\2\2\u0311\u0312\3\2"+ + "\2\2\u0312\u0317\3\2\2\2\u0313\u0314\5u;\2\u0314\u0315\5\u00a3R\2\u0315"+ + "\u0317\3\2\2\2\u0316\u02fb\3\2\2\2\u0316\u0306\3\2\2\2\u0316\u030e\3\2"+ + "\2\2\u0316\u0313\3\2\2\2\u0317\u009a\3\2\2\2\u0318\u0319\5\u009dO\2\u0319"+ + "\u031a\5\u009fP\2\u031a\u009c\3\2\2\2\u031b\u031c\t\t\2\2\u031c\u009e"+ + "\3\2\2\2\u031d\u031f\5\u00a1Q\2\u031e\u031d\3\2\2\2\u031e\u031f\3\2\2"+ + "\2\u031f\u0320\3\2\2\2\u0320\u0321\5u;\2\u0321\u00a0\3\2\2\2\u0322\u0323"+ + "\t\n\2\2\u0323\u00a2\3\2\2\2\u0324\u0325\t\13\2\2\u0325\u00a4\3\2\2\2"+ + "\u0326\u0327\5\u00a7T\2\u0327\u0329\5\u00a9U\2\u0328\u032a\5\u00a3R\2"+ + "\u0329\u0328\3\2\2\2\u0329\u032a\3\2\2\2\u032a\u00a6\3\2\2\2\u032b\u032d"+ + "\5\177@\2\u032c\u032e\7\60\2\2\u032d\u032c\3\2\2\2\u032d\u032e\3\2\2\2"+ + "\u032e\u0337\3\2\2\2\u032f\u0330\7\62\2\2\u0330\u0332\t\4\2\2\u0331\u0333"+ + "\5\u0081A\2\u0332\u0331\3\2\2\2\u0332\u0333\3\2\2\2\u0333\u0334\3\2\2"+ + "\2\u0334\u0335\7\60\2\2\u0335\u0337\5\u0081A\2\u0336\u032b\3\2\2\2\u0336"+ + "\u032f\3\2\2\2\u0337\u00a8\3\2\2\2\u0338\u0339\5\u00abV\2\u0339\u033a"+ + "\5\u009fP\2\u033a\u00aa\3\2\2\2\u033b\u033c\t\f\2\2\u033c\u00ac\3\2\2"+ + "\2\u033d\u033e\7v\2\2\u033e\u033f\7t\2\2\u033f\u0340\7w\2\2\u0340\u0347"+ + "\7g\2\2\u0341\u0342\7h\2\2\u0342\u0343\7c\2\2\u0343\u0344\7n\2\2\u0344"+ + "\u0345\7u\2\2\u0345\u0347\7g\2\2\u0346\u033d\3\2\2\2\u0346\u0341\3\2\2"+ + "\2\u0347\u00ae\3\2\2\2\u0348\u0349\7)\2\2\u0349\u034a\5\u00b1Y\2\u034a"+ + "\u034b\7)\2\2\u034b\u0351\3\2\2\2\u034c\u034d\7)\2\2\u034d\u034e\5\u00b9"+ + "]\2\u034e\u034f\7)\2\2\u034f\u0351\3\2\2\2\u0350\u0348\3\2\2\2\u0350\u034c"+ + "\3\2\2\2\u0351\u00b0\3\2\2\2\u0352\u0353\n\r\2\2\u0353\u00b2\3\2\2\2\u0354"+ + "\u0356\7$\2\2\u0355\u0357\5\u00b5[\2\u0356\u0355\3\2\2\2\u0356\u0357\3"+ + "\2\2\2\u0357\u0358\3\2\2\2\u0358\u0359\7$\2\2\u0359\u00b4\3\2\2\2\u035a"+ + "\u035c\5\u00b7\\\2\u035b\u035a\3\2\2\2\u035c\u035d\3\2\2\2\u035d\u035b"+ + "\3\2\2\2\u035d\u035e\3\2\2\2\u035e\u00b6\3\2\2\2\u035f\u0362\n\16\2\2"+ + "\u0360\u0362\5\u00b9]\2\u0361\u035f\3\2\2\2\u0361\u0360\3\2\2\2\u0362"+ + "\u00b8\3\2\2\2\u0363\u0364\7^\2\2\u0364\u0368\t\17\2\2\u0365\u0368\5\u00bb"+ + "^\2\u0366\u0368\5\u00bd_\2\u0367\u0363\3\2\2\2\u0367\u0365\3\2\2\2\u0367"+ + "\u0366\3\2\2\2\u0368\u00ba\3\2\2\2\u0369\u036a\7^\2\2\u036a\u0375\5\u008b"+ + "F\2\u036b\u036c\7^\2\2\u036c\u036d\5\u008bF\2\u036d\u036e\5\u008bF\2\u036e"+ + "\u0375\3\2\2\2\u036f\u0370\7^\2\2\u0370\u0371\5\u00bf`\2\u0371\u0372\5"+ + "\u008bF\2\u0372\u0373\5\u008bF\2\u0373\u0375\3\2\2\2\u0374\u0369\3\2\2"+ + "\2\u0374\u036b\3\2\2\2\u0374\u036f\3\2\2\2\u0375\u00bc\3\2\2\2\u0376\u0377"+ + "\7^\2\2\u0377\u0378\7w\2\2\u0378\u0379\5\u0083B\2\u0379\u037a\5\u0083"+ + "B\2\u037a\u037b\5\u0083B\2\u037b\u037c\5\u0083B\2\u037c\u00be\3\2\2\2"+ + "\u037d\u037e\t\20\2\2\u037e\u00c0\3\2\2\2\u037f\u0380\7p\2\2\u0380\u0381"+ + "\7w\2\2\u0381\u0382\7n\2\2\u0382\u0383\7n\2\2\u0383\u00c2\3\2\2\2\u0384"+ + "\u0385\7*\2\2\u0385\u00c4\3\2\2\2\u0386\u0387\7+\2\2\u0387\u00c6\3\2\2"+ + "\2\u0388\u0389\7}\2\2\u0389\u00c8\3\2\2\2\u038a\u038b\7\177\2\2\u038b"+ + "\u00ca\3\2\2\2\u038c\u038d\7]\2\2\u038d\u00cc\3\2\2\2\u038e\u038f\7_\2"+ + "\2\u038f\u00ce\3\2\2\2\u0390\u0391\7=\2\2\u0391\u00d0\3\2\2\2\u0392\u0393"+ + "\7.\2\2\u0393\u00d2\3\2\2\2\u0394\u0395\7\60\2\2\u0395\u00d4\3\2\2\2\u0396"+ + "\u0397\7?\2\2\u0397\u00d6\3\2\2\2\u0398\u0399\7@\2\2\u0399\u00d8\3\2\2"+ + "\2\u039a\u039b\7>\2\2\u039b\u00da\3\2\2\2\u039c\u039d\7#\2\2\u039d\u00dc"+ + "\3\2\2\2\u039e\u039f\7\u0080\2\2\u039f\u00de\3\2\2\2\u03a0\u03a1\7A\2"+ + "\2\u03a1\u00e0\3\2\2\2\u03a2\u03a3\7<\2\2\u03a3\u00e2\3\2\2\2\u03a4\u03a5"+ + "\7?\2\2\u03a5\u03a6\7?\2\2\u03a6\u00e4\3\2\2\2\u03a7\u03a8\7>\2\2\u03a8"+ + "\u03a9\7?\2\2\u03a9\u00e6\3\2\2\2\u03aa\u03ab\7@\2\2\u03ab\u03ac\7?\2"+ + "\2\u03ac\u00e8\3\2\2\2\u03ad\u03ae\7#\2\2\u03ae\u03af\7?\2\2\u03af\u00ea"+ + "\3\2\2\2\u03b0\u03b1\7(\2\2\u03b1\u03b2\7(\2\2\u03b2\u00ec\3\2\2\2\u03b3"+ + "\u03b4\7~\2\2\u03b4\u03b5\7~\2\2\u03b5\u00ee\3\2\2\2\u03b6\u03b7\7-\2"+ + "\2\u03b7\u03b8\7-\2\2\u03b8\u00f0\3\2\2\2\u03b9\u03ba\7/\2\2\u03ba\u03bb"+ + "\7/\2\2\u03bb\u00f2\3\2\2\2\u03bc\u03bd\7-\2\2\u03bd\u00f4\3\2\2\2\u03be"+ + "\u03bf\7/\2\2\u03bf\u00f6\3\2\2\2\u03c0\u03c1\7,\2\2\u03c1\u00f8\3\2\2"+ + "\2\u03c2\u03c3\7\61\2\2\u03c3\u00fa\3\2\2\2\u03c4\u03c5\7(\2\2\u03c5\u00fc"+ + "\3\2\2\2\u03c6\u03c7\7~\2\2\u03c7\u00fe\3\2\2\2\u03c8\u03c9\7`\2\2\u03c9"+ + "\u0100\3\2\2\2\u03ca\u03cb\7\'\2\2\u03cb\u0102\3\2\2\2\u03cc\u03cd\7-"+ + "\2\2\u03cd\u03ce\7?\2\2\u03ce\u0104\3\2\2\2\u03cf\u03d0\7/\2\2\u03d0\u03d1"+ + "\7?\2\2\u03d1\u0106\3\2\2\2\u03d2\u03d3\7,\2\2\u03d3\u03d4\7?\2\2\u03d4"+ + "\u0108\3\2\2\2\u03d5\u03d6\7\61\2\2\u03d6\u03d7\7?\2\2\u03d7\u010a\3\2"+ + "\2\2\u03d8\u03d9\7(\2\2\u03d9\u03da\7?\2\2\u03da\u010c\3\2\2\2\u03db\u03dc"+ + "\7~\2\2\u03dc\u03dd\7?\2\2\u03dd\u010e\3\2\2\2\u03de\u03df\7`\2\2\u03df"+ + "\u03e0\7?\2\2\u03e0\u0110\3\2\2\2\u03e1\u03e2\7\'\2\2\u03e2\u03e3\7?\2"+ + "\2\u03e3\u0112\3\2\2\2\u03e4\u03e5\7>\2\2\u03e5\u03e6\7>\2\2\u03e6\u03e7"+ + "\7?\2\2\u03e7\u0114\3\2\2\2\u03e8\u03e9\7@\2\2\u03e9\u03ea\7@\2\2\u03ea"+ + "\u03eb\7?\2\2\u03eb\u0116\3\2\2\2\u03ec\u03ed\7@\2\2\u03ed\u03ee\7@\2"+ + "\2\u03ee\u03ef\7@\2\2\u03ef\u03f0\7?\2\2\u03f0\u0118\3\2\2\2\u03f1\u03f5"+ + "\5\u011b\u008e\2\u03f2\u03f4\5\u011d\u008f\2\u03f3\u03f2\3\2\2\2\u03f4"+ + "\u03f7\3\2\2\2\u03f5\u03f3\3\2\2\2\u03f5\u03f6\3\2\2\2\u03f6\u011a\3\2"+ + "\2\2\u03f7\u03f5\3\2\2\2\u03f8\u03ff\t\21\2\2\u03f9\u03fa\n\22\2\2\u03fa"+ + "\u03ff\6\u008e\2\2\u03fb\u03fc\t\23\2\2\u03fc\u03fd\t\24\2\2\u03fd\u03ff"+ + "\6\u008e\3\2\u03fe\u03f8\3\2\2\2\u03fe\u03f9\3\2\2\2\u03fe\u03fb\3\2\2"+ + "\2\u03ff\u011c\3\2\2\2\u0400\u0407\t\25\2\2\u0401\u0402\n\22\2\2\u0402"+ + "\u0407\6\u008f\4\2\u0403\u0404\t\23\2\2\u0404\u0405\t\24\2\2\u0405\u0407"+ + "\6\u008f\5\2\u0406\u0400\3\2\2\2\u0406\u0401\3\2\2\2\u0406\u0403\3\2\2"+ + "\2\u0407\u011e\3\2\2\2\u0408\u0409\7B\2\2\u0409\u0120\3\2\2\2\u040a\u040b"+ + "\7\60\2\2\u040b\u040c\7\60\2\2\u040c\u040d\7\60\2\2\u040d\u0122\3\2\2"+ + "\2\u040e\u0410\t\26\2\2\u040f\u040e\3\2\2\2\u0410\u0411\3\2\2\2\u0411"+ + "\u040f\3\2\2\2\u0411\u0412\3\2\2\2\u0412\u0413\3\2\2\2\u0413\u0414\b\u0092"+ + "\2\2\u0414\u0124\3\2\2\2\u0415\u0416\7\61\2\2\u0416\u0417\7,\2\2\u0417"+ + "\u041b\3\2\2\2\u0418\u041a\13\2\2\2\u0419\u0418\3\2\2\2\u041a\u041d\3"+ + "\2\2\2\u041b\u041c\3\2\2\2\u041b\u0419\3\2\2\2\u041c\u041e\3\2\2\2\u041d"+ + "\u041b\3\2\2\2\u041e\u041f\7,\2\2\u041f\u0420\7\61\2\2\u0420\u0421\3\2"+ + "\2\2\u0421\u0422\b\u0093\2\2\u0422\u0126\3\2\2\2\u0423\u0424\7\61\2\2"+ + "\u0424\u0425\7\61\2\2\u0425\u0429\3\2\2\2\u0426\u0428\n\27\2\2\u0427\u0426"+ + "\3\2\2\2\u0428\u042b\3\2\2\2\u0429\u0427\3\2\2\2\u0429\u042a\3\2\2\2\u042a"+ + "\u042c\3\2\2\2\u042b\u0429\3\2\2\2\u042c\u042d\b\u0094\2\2\u042d\u0128"+ + "\3\2\2\2\64\2\u0280\u0284\u0288\u028c\u0290\u0297\u029c\u029e\u02a4\u02a8"+ + "\u02ac\u02b2\u02b7\u02c1\u02c5\u02cb\u02cf\u02d7\u02db\u02e1\u02eb\u02ef"+ + "\u02f5\u02f9\u02fe\u0301\u0304\u0309\u030c\u0311\u0316\u031e\u0329\u032d"+ + "\u0332\u0336\u0346\u0350\u0356\u035d\u0361\u0367\u0374\u03f5\u03fe\u0406"+ + "\u0411\u041b\u0429\3\b\2\2"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/antlr/src/Java8Listener.java b/antlr/src/Java8Listener.java new file mode 100644 index 000000000..321266966 --- /dev/null +++ b/antlr/src/Java8Listener.java @@ -0,0 +1,1021 @@ +package src; +// Generated from Java8.g4 by ANTLR 4.4 +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link Java8Parser}. + */ +public interface Java8Listener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link Java8Parser#memberDeclaration}. + * @param ctx the parse tree + */ + void enterMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#memberDeclaration}. + * @param ctx the parse tree + */ + void exitMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#defaultValue}. + * @param ctx the parse tree + */ + void enterDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#defaultValue}. + * @param ctx the parse tree + */ + void exitDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationTypeElementDeclaration}. + * @param ctx the parse tree + */ + void enterAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationTypeElementDeclaration}. + * @param ctx the parse tree + */ + void exitAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#type}. + * @param ctx the parse tree + */ + void enterType(@NotNull Java8Parser.TypeContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#type}. + * @param ctx the parse tree + */ + void exitType(@NotNull Java8Parser.TypeContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationTypeBody}. + * @param ctx the parse tree + */ + void enterAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationTypeBody}. + * @param ctx the parse tree + */ + void exitAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#genericInterfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void enterGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#genericInterfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void exitGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#classBodyDeclaration}. + * @param ctx the parse tree + */ + void enterClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#classBodyDeclaration}. + * @param ctx the parse tree + */ + void exitClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#block}. + * @param ctx the parse tree + */ + void enterBlock(@NotNull Java8Parser.BlockContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#block}. + * @param ctx the parse tree + */ + void exitBlock(@NotNull Java8Parser.BlockContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#enumBodyDeclarations}. + * @param ctx the parse tree + */ + void enterEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#enumBodyDeclarations}. + * @param ctx the parse tree + */ + void exitEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#forUpdate}. + * @param ctx the parse tree + */ + void enterForUpdate(@NotNull Java8Parser.ForUpdateContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#forUpdate}. + * @param ctx the parse tree + */ + void exitForUpdate(@NotNull Java8Parser.ForUpdateContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#enhancedForControl}. + * @param ctx the parse tree + */ + void enterEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#enhancedForControl}. + * @param ctx the parse tree + */ + void exitEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationConstantRest}. + * @param ctx the parse tree + */ + void enterAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationConstantRest}. + * @param ctx the parse tree + */ + void exitAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#explicitGenericInvocation}. + * @param ctx the parse tree + */ + void enterExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#explicitGenericInvocation}. + * @param ctx the parse tree + */ + void exitExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#nonWildcardTypeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void enterNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#nonWildcardTypeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void exitNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#expressionList}. + * @param ctx the parse tree + */ + void enterExpressionList(@NotNull Java8Parser.ExpressionListContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#expressionList}. + * @param ctx the parse tree + */ + void exitExpressionList(@NotNull Java8Parser.ExpressionListContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationTypeElementRest}. + * @param ctx the parse tree + */ + void enterAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationTypeElementRest}. + * @param ctx the parse tree + */ + void exitAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#classOrInterfaceType}. + * @param ctx the parse tree + */ + void enterClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#classOrInterfaceType}. + * @param ctx the parse tree + */ + void exitClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeBound}. + * @param ctx the parse tree + */ + void enterTypeBound(@NotNull Java8Parser.TypeBoundContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeBound}. + * @param ctx the parse tree + */ + void exitTypeBound(@NotNull Java8Parser.TypeBoundContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#variableDeclaratorId}. + * @param ctx the parse tree + */ + void enterVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#variableDeclaratorId}. + * @param ctx the parse tree + */ + void exitVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#primary}. + * @param ctx the parse tree + */ + void enterPrimary(@NotNull Java8Parser.PrimaryContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#primary}. + * @param ctx the parse tree + */ + void exitPrimary(@NotNull Java8Parser.PrimaryContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#classCreatorRest}. + * @param ctx the parse tree + */ + void enterClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#classCreatorRest}. + * @param ctx the parse tree + */ + void exitClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#interfaceBodyDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#interfaceBodyDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeArguments}. + * @param ctx the parse tree + */ + void enterTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeArguments}. + * @param ctx the parse tree + */ + void exitTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationName}. + * @param ctx the parse tree + */ + void enterAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationName}. + * @param ctx the parse tree + */ + void exitAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#finallyBlock}. + * @param ctx the parse tree + */ + void enterFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#finallyBlock}. + * @param ctx the parse tree + */ + void exitFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeParameters}. + * @param ctx the parse tree + */ + void enterTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeParameters}. + * @param ctx the parse tree + */ + void exitTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#lastFormalParameter}. + * @param ctx the parse tree + */ + void enterLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#lastFormalParameter}. + * @param ctx the parse tree + */ + void exitLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#constructorBody}. + * @param ctx the parse tree + */ + void enterConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#constructorBody}. + * @param ctx the parse tree + */ + void exitConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#literal}. + * @param ctx the parse tree + */ + void enterLiteral(@NotNull Java8Parser.LiteralContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#literal}. + * @param ctx the parse tree + */ + void exitLiteral(@NotNull Java8Parser.LiteralContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationMethodOrConstantRest}. + * @param ctx the parse tree + */ + void enterAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationMethodOrConstantRest}. + * @param ctx the parse tree + */ + void exitAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#catchClause}. + * @param ctx the parse tree + */ + void enterCatchClause(@NotNull Java8Parser.CatchClauseContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#catchClause}. + * @param ctx the parse tree + */ + void exitCatchClause(@NotNull Java8Parser.CatchClauseContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#variableDeclarator}. + * @param ctx the parse tree + */ + void enterVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#variableDeclarator}. + * @param ctx the parse tree + */ + void exitVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeList}. + * @param ctx the parse tree + */ + void enterTypeList(@NotNull Java8Parser.TypeListContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeList}. + * @param ctx the parse tree + */ + void exitTypeList(@NotNull Java8Parser.TypeListContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#enumConstants}. + * @param ctx the parse tree + */ + void enterEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#enumConstants}. + * @param ctx the parse tree + */ + void exitEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#classBody}. + * @param ctx the parse tree + */ + void enterClassBody(@NotNull Java8Parser.ClassBodyContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#classBody}. + * @param ctx the parse tree + */ + void exitClassBody(@NotNull Java8Parser.ClassBodyContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#createdName}. + * @param ctx the parse tree + */ + void enterCreatedName(@NotNull Java8Parser.CreatedNameContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#createdName}. + * @param ctx the parse tree + */ + void exitCreatedName(@NotNull Java8Parser.CreatedNameContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#enumDeclaration}. + * @param ctx the parse tree + */ + void enterEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#enumDeclaration}. + * @param ctx the parse tree + */ + void exitEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#formalParameter}. + * @param ctx the parse tree + */ + void enterFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#formalParameter}. + * @param ctx the parse tree + */ + void exitFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#parExpression}. + * @param ctx the parse tree + */ + void enterParExpression(@NotNull Java8Parser.ParExpressionContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#parExpression}. + * @param ctx the parse tree + */ + void exitParExpression(@NotNull Java8Parser.ParExpressionContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotation}. + * @param ctx the parse tree + */ + void enterAnnotation(@NotNull Java8Parser.AnnotationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotation}. + * @param ctx the parse tree + */ + void exitAnnotation(@NotNull Java8Parser.AnnotationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#variableInitializer}. + * @param ctx the parse tree + */ + void enterVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#variableInitializer}. + * @param ctx the parse tree + */ + void exitVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#elementValueArrayInitializer}. + * @param ctx the parse tree + */ + void enterElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#elementValueArrayInitializer}. + * @param ctx the parse tree + */ + void exitElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#creator}. + * @param ctx the parse tree + */ + void enterCreator(@NotNull Java8Parser.CreatorContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#creator}. + * @param ctx the parse tree + */ + void exitCreator(@NotNull Java8Parser.CreatorContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#arrayCreatorRest}. + * @param ctx the parse tree + */ + void enterArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#arrayCreatorRest}. + * @param ctx the parse tree + */ + void exitArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#expression}. + * @param ctx the parse tree + */ + void enterExpression(@NotNull Java8Parser.ExpressionContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#expression}. + * @param ctx the parse tree + */ + void exitExpression(@NotNull Java8Parser.ExpressionContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#constantExpression}. + * @param ctx the parse tree + */ + void enterConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#constantExpression}. + * @param ctx the parse tree + */ + void exitConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#qualifiedNameList}. + * @param ctx the parse tree + */ + void enterQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#qualifiedNameList}. + * @param ctx the parse tree + */ + void exitQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#constructorDeclaration}. + * @param ctx the parse tree + */ + void enterConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#constructorDeclaration}. + * @param ctx the parse tree + */ + void exitConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#forControl}. + * @param ctx the parse tree + */ + void enterForControl(@NotNull Java8Parser.ForControlContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#forControl}. + * @param ctx the parse tree + */ + void exitForControl(@NotNull Java8Parser.ForControlContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#superSuffix}. + * @param ctx the parse tree + */ + void enterSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#superSuffix}. + * @param ctx the parse tree + */ + void exitSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#variableDeclarators}. + * @param ctx the parse tree + */ + void enterVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#variableDeclarators}. + * @param ctx the parse tree + */ + void exitVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#catchType}. + * @param ctx the parse tree + */ + void enterCatchType(@NotNull Java8Parser.CatchTypeContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#catchType}. + * @param ctx the parse tree + */ + void exitCatchType(@NotNull Java8Parser.CatchTypeContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#classOrInterfaceModifier}. + * @param ctx the parse tree + */ + void enterClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#classOrInterfaceModifier}. + * @param ctx the parse tree + */ + void exitClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#enumConstantName}. + * @param ctx the parse tree + */ + void enterEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#enumConstantName}. + * @param ctx the parse tree + */ + void exitEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#modifier}. + * @param ctx the parse tree + */ + void enterModifier(@NotNull Java8Parser.ModifierContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#modifier}. + * @param ctx the parse tree + */ + void exitModifier(@NotNull Java8Parser.ModifierContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#innerCreator}. + * @param ctx the parse tree + */ + void enterInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#innerCreator}. + * @param ctx the parse tree + */ + void exitInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#explicitGenericInvocationSuffix}. + * @param ctx the parse tree + */ + void enterExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#explicitGenericInvocationSuffix}. + * @param ctx the parse tree + */ + void exitExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#variableModifier}. + * @param ctx the parse tree + */ + void enterVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#variableModifier}. + * @param ctx the parse tree + */ + void exitVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#elementValuePair}. + * @param ctx the parse tree + */ + void enterElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#elementValuePair}. + * @param ctx the parse tree + */ + void exitElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#arrayInitializer}. + * @param ctx the parse tree + */ + void enterArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#arrayInitializer}. + * @param ctx the parse tree + */ + void exitArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#elementValue}. + * @param ctx the parse tree + */ + void enterElementValue(@NotNull Java8Parser.ElementValueContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#elementValue}. + * @param ctx the parse tree + */ + void exitElementValue(@NotNull Java8Parser.ElementValueContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#constDeclaration}. + * @param ctx the parse tree + */ + void enterConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#constDeclaration}. + * @param ctx the parse tree + */ + void exitConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#resource}. + * @param ctx the parse tree + */ + void enterResource(@NotNull Java8Parser.ResourceContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#resource}. + * @param ctx the parse tree + */ + void exitResource(@NotNull Java8Parser.ResourceContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#qualifiedName}. + * @param ctx the parse tree + */ + void enterQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#qualifiedName}. + * @param ctx the parse tree + */ + void exitQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#resourceSpecification}. + * @param ctx the parse tree + */ + void enterResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#resourceSpecification}. + * @param ctx the parse tree + */ + void exitResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#formalParameterList}. + * @param ctx the parse tree + */ + void enterFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#formalParameterList}. + * @param ctx the parse tree + */ + void exitFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationTypeDeclaration}. + * @param ctx the parse tree + */ + void enterAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationTypeDeclaration}. + * @param ctx the parse tree + */ + void exitAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#compilationUnit}. + * @param ctx the parse tree + */ + void enterCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#compilationUnit}. + * @param ctx the parse tree + */ + void exitCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#annotationMethodRest}. + * @param ctx the parse tree + */ + void enterAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#annotationMethodRest}. + * @param ctx the parse tree + */ + void exitAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#switchBlockStatementGroup}. + * @param ctx the parse tree + */ + void enterSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#switchBlockStatementGroup}. + * @param ctx the parse tree + */ + void exitSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeParameter}. + * @param ctx the parse tree + */ + void enterTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeParameter}. + * @param ctx the parse tree + */ + void exitTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#interfaceBody}. + * @param ctx the parse tree + */ + void enterInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#interfaceBody}. + * @param ctx the parse tree + */ + void exitInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#methodDeclaration}. + * @param ctx the parse tree + */ + void enterMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#methodDeclaration}. + * @param ctx the parse tree + */ + void exitMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#methodBody}. + * @param ctx the parse tree + */ + void enterMethodBody(@NotNull Java8Parser.MethodBodyContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#methodBody}. + * @param ctx the parse tree + */ + void exitMethodBody(@NotNull Java8Parser.MethodBodyContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeArgument}. + * @param ctx the parse tree + */ + void enterTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeArgument}. + * @param ctx the parse tree + */ + void exitTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeDeclaration}. + * @param ctx the parse tree + */ + void enterTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeDeclaration}. + * @param ctx the parse tree + */ + void exitTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#genericConstructorDeclaration}. + * @param ctx the parse tree + */ + void enterGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#genericConstructorDeclaration}. + * @param ctx the parse tree + */ + void exitGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#classDeclaration}. + * @param ctx the parse tree + */ + void enterClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#classDeclaration}. + * @param ctx the parse tree + */ + void exitClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#enumConstant}. + * @param ctx the parse tree + */ + void enterEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#enumConstant}. + * @param ctx the parse tree + */ + void exitEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#statement}. + * @param ctx the parse tree + */ + void enterStatement(@NotNull Java8Parser.StatementContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#statement}. + * @param ctx the parse tree + */ + void exitStatement(@NotNull Java8Parser.StatementContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#importDeclaration}. + * @param ctx the parse tree + */ + void enterImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#importDeclaration}. + * @param ctx the parse tree + */ + void exitImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#primitiveType}. + * @param ctx the parse tree + */ + void enterPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#primitiveType}. + * @param ctx the parse tree + */ + void exitPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#interfaceDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#interfaceDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#localVariableDeclarationStatement}. + * @param ctx the parse tree + */ + void enterLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#localVariableDeclarationStatement}. + * @param ctx the parse tree + */ + void exitLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#blockStatement}. + * @param ctx the parse tree + */ + void enterBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#blockStatement}. + * @param ctx the parse tree + */ + void exitBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#fieldDeclaration}. + * @param ctx the parse tree + */ + void enterFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#fieldDeclaration}. + * @param ctx the parse tree + */ + void exitFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#constantDeclarator}. + * @param ctx the parse tree + */ + void enterConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#constantDeclarator}. + * @param ctx the parse tree + */ + void exitConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#resources}. + * @param ctx the parse tree + */ + void enterResources(@NotNull Java8Parser.ResourcesContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#resources}. + * @param ctx the parse tree + */ + void exitResources(@NotNull Java8Parser.ResourcesContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#statementExpression}. + * @param ctx the parse tree + */ + void enterStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#statementExpression}. + * @param ctx the parse tree + */ + void exitStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#interfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#interfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#packageDeclaration}. + * @param ctx the parse tree + */ + void enterPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#packageDeclaration}. + * @param ctx the parse tree + */ + void exitPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#elementValuePairs}. + * @param ctx the parse tree + */ + void enterElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#elementValuePairs}. + * @param ctx the parse tree + */ + void exitElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#localVariableDeclaration}. + * @param ctx the parse tree + */ + void enterLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#localVariableDeclaration}. + * @param ctx the parse tree + */ + void exitLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#nonWildcardTypeArguments}. + * @param ctx the parse tree + */ + void enterNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#nonWildcardTypeArguments}. + * @param ctx the parse tree + */ + void exitNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#interfaceMemberDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#interfaceMemberDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#switchLabel}. + * @param ctx the parse tree + */ + void enterSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#switchLabel}. + * @param ctx the parse tree + */ + void exitSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#forInit}. + * @param ctx the parse tree + */ + void enterForInit(@NotNull Java8Parser.ForInitContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#forInit}. + * @param ctx the parse tree + */ + void exitForInit(@NotNull Java8Parser.ForInitContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#formalParameters}. + * @param ctx the parse tree + */ + void enterFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#formalParameters}. + * @param ctx the parse tree + */ + void exitFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#arguments}. + * @param ctx the parse tree + */ + void enterArguments(@NotNull Java8Parser.ArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#arguments}. + * @param ctx the parse tree + */ + void exitArguments(@NotNull Java8Parser.ArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#genericMethodDeclaration}. + * @param ctx the parse tree + */ + void enterGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#genericMethodDeclaration}. + * @param ctx the parse tree + */ + void exitGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link Java8Parser#typeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void enterTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx); + /** + * Exit a parse tree produced by {@link Java8Parser#typeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void exitTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx); +} \ No newline at end of file diff --git a/antlr/src/Java8Parser.java b/antlr/src/Java8Parser.java new file mode 100644 index 000000000..ba802b41c --- /dev/null +++ b/antlr/src/Java8Parser.java @@ -0,0 +1,7696 @@ +package src; +// Generated from Java8.g4 by ANTLR 4.4 +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.misc.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; +import java.util.Iterator; +import java.util.ArrayList; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class Java8Parser extends Parser { + static { RuntimeMetaData.checkVersion("4.4", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + ABSTRACT=1, ASSERT=2, BOOLEAN=3, BREAK=4, BYTE=5, CASE=6, CATCH=7, CHAR=8, + CLASS=9, CONST=10, CONTINUE=11, DEFAULT=12, DO=13, DOUBLE=14, ELSE=15, + ENUM=16, EXTENDS=17, FINAL=18, FINALLY=19, FLOAT=20, FOR=21, IF=22, GOTO=23, + IMPLEMENTS=24, IMPORT=25, INSTANCEOF=26, INT=27, INTERFACE=28, LONG=29, + NATIVE=30, NEW=31, PACKAGE=32, PRIVATE=33, PROTECTED=34, PUBLIC=35, RETURN=36, + SHORT=37, STATIC=38, STRICTFP=39, SUPER=40, SWITCH=41, SYNCHRONIZED=42, + THIS=43, THROW=44, THROWS=45, TRANSIENT=46, TRY=47, VOID=48, VOLATILE=49, + WHILE=50, IntegerLiteral=51, FloatingPointLiteral=52, BooleanLiteral=53, + CharacterLiteral=54, StringLiteral=55, NullLiteral=56, LPAREN=57, RPAREN=58, + LBRACE=59, RBRACE=60, LBRACK=61, RBRACK=62, SEMI=63, COMMA=64, DOT=65, + ASSIGN=66, GT=67, LT=68, BANG=69, TILDE=70, QUESTION=71, COLON=72, EQUAL=73, + LE=74, GE=75, NOTEQUAL=76, AND=77, OR=78, INC=79, DEC=80, ADD=81, SUB=82, + MUL=83, DIV=84, BITAND=85, BITOR=86, CARET=87, MOD=88, ADD_ASSIGN=89, + SUB_ASSIGN=90, MUL_ASSIGN=91, DIV_ASSIGN=92, AND_ASSIGN=93, OR_ASSIGN=94, + XOR_ASSIGN=95, MOD_ASSIGN=96, LSHIFT_ASSIGN=97, RSHIFT_ASSIGN=98, URSHIFT_ASSIGN=99, + Identifier=100, AT=101, ELLIPSIS=102, WS=103, COMMENT=104, LINE_COMMENT=105; + public static final String[] tokenNames = { + "", "'abstract'", "'assert'", "'boolean'", "'break'", "'byte'", + "'case'", "'catch'", "'char'", "'class'", "'const'", "'continue'", "'default'", + "'do'", "'double'", "'else'", "'enum'", "'extends'", "'final'", "'finally'", + "'float'", "'for'", "'if'", "'goto'", "'implements'", "'import'", "'instanceof'", + "'int'", "'interface'", "'long'", "'native'", "'new'", "'package'", "'private'", + "'protected'", "'public'", "'return'", "'short'", "'static'", "'strictfp'", + "'super'", "'switch'", "'synchronized'", "'this'", "'throw'", "'throws'", + "'transient'", "'try'", "'void'", "'volatile'", "'while'", "IntegerLiteral", + "FloatingPointLiteral", "BooleanLiteral", "CharacterLiteral", "StringLiteral", + "'null'", "'('", "')'", "'{'", "'}'", "'['", "']'", "';'", "','", "'.'", + "'='", "'>'", "'<'", "'!'", "'~'", "'?'", "':'", "'=='", "'<='", "'>='", + "'!='", "'&&'", "'||'", "'++'", "'--'", "'+'", "'-'", "'*'", "'/'", "'&'", + "'|'", "'^'", "'%'", "'+='", "'-='", "'*='", "'/='", "'&='", "'|='", "'^='", + "'%='", "'<<='", "'>>='", "'>>>='", "Identifier", "'@'", "'...'", "WS", + "COMMENT", "LINE_COMMENT" + }; + public static final int + RULE_compilationUnit = 0, RULE_packageDeclaration = 1, RULE_importDeclaration = 2, + RULE_typeDeclaration = 3, RULE_modifier = 4, RULE_classOrInterfaceModifier = 5, + RULE_variableModifier = 6, RULE_classDeclaration = 7, RULE_typeParameters = 8, + RULE_typeParameter = 9, RULE_typeBound = 10, RULE_enumDeclaration = 11, + RULE_enumConstants = 12, RULE_enumConstant = 13, RULE_enumBodyDeclarations = 14, + RULE_interfaceDeclaration = 15, RULE_typeList = 16, RULE_classBody = 17, + RULE_interfaceBody = 18, RULE_classBodyDeclaration = 19, RULE_memberDeclaration = 20, + RULE_methodDeclaration = 21, RULE_genericMethodDeclaration = 22, RULE_constructorDeclaration = 23, + RULE_genericConstructorDeclaration = 24, RULE_fieldDeclaration = 25, RULE_interfaceBodyDeclaration = 26, + RULE_interfaceMemberDeclaration = 27, RULE_constDeclaration = 28, RULE_constantDeclarator = 29, + RULE_interfaceMethodDeclaration = 30, RULE_genericInterfaceMethodDeclaration = 31, + RULE_variableDeclarators = 32, RULE_variableDeclarator = 33, RULE_variableDeclaratorId = 34, + RULE_variableInitializer = 35, RULE_arrayInitializer = 36, RULE_enumConstantName = 37, + RULE_type = 38, RULE_classOrInterfaceType = 39, RULE_primitiveType = 40, + RULE_typeArguments = 41, RULE_typeArgument = 42, RULE_qualifiedNameList = 43, + RULE_formalParameters = 44, RULE_formalParameterList = 45, RULE_formalParameter = 46, + RULE_lastFormalParameter = 47, RULE_methodBody = 48, RULE_constructorBody = 49, + RULE_qualifiedName = 50, RULE_literal = 51, RULE_annotation = 52, RULE_annotationName = 53, + RULE_elementValuePairs = 54, RULE_elementValuePair = 55, RULE_elementValue = 56, + RULE_elementValueArrayInitializer = 57, RULE_annotationTypeDeclaration = 58, + RULE_annotationTypeBody = 59, RULE_annotationTypeElementDeclaration = 60, + RULE_annotationTypeElementRest = 61, RULE_annotationMethodOrConstantRest = 62, + RULE_annotationMethodRest = 63, RULE_annotationConstantRest = 64, RULE_defaultValue = 65, + RULE_block = 66, RULE_blockStatement = 67, RULE_localVariableDeclarationStatement = 68, + RULE_localVariableDeclaration = 69, RULE_statement = 70, RULE_catchClause = 71, + RULE_catchType = 72, RULE_finallyBlock = 73, RULE_resourceSpecification = 74, + RULE_resources = 75, RULE_resource = 76, RULE_switchBlockStatementGroup = 77, + RULE_switchLabel = 78, RULE_forControl = 79, RULE_forInit = 80, RULE_enhancedForControl = 81, + RULE_forUpdate = 82, RULE_parExpression = 83, RULE_expressionList = 84, + RULE_statementExpression = 85, RULE_constantExpression = 86, RULE_expression = 87, + RULE_primary = 88, RULE_creator = 89, RULE_createdName = 90, RULE_innerCreator = 91, + RULE_arrayCreatorRest = 92, RULE_classCreatorRest = 93, RULE_explicitGenericInvocation = 94, + RULE_nonWildcardTypeArguments = 95, RULE_typeArgumentsOrDiamond = 96, + RULE_nonWildcardTypeArgumentsOrDiamond = 97, RULE_superSuffix = 98, RULE_explicitGenericInvocationSuffix = 99, + RULE_arguments = 100; + public static final String[] ruleNames = { + "compilationUnit", "packageDeclaration", "importDeclaration", "typeDeclaration", + "modifier", "classOrInterfaceModifier", "variableModifier", "classDeclaration", + "typeParameters", "typeParameter", "typeBound", "enumDeclaration", "enumConstants", + "enumConstant", "enumBodyDeclarations", "interfaceDeclaration", "typeList", + "classBody", "interfaceBody", "classBodyDeclaration", "memberDeclaration", + "methodDeclaration", "genericMethodDeclaration", "constructorDeclaration", + "genericConstructorDeclaration", "fieldDeclaration", "interfaceBodyDeclaration", + "interfaceMemberDeclaration", "constDeclaration", "constantDeclarator", + "interfaceMethodDeclaration", "genericInterfaceMethodDeclaration", "variableDeclarators", + "variableDeclarator", "variableDeclaratorId", "variableInitializer", "arrayInitializer", + "enumConstantName", "type", "classOrInterfaceType", "primitiveType", "typeArguments", + "typeArgument", "qualifiedNameList", "formalParameters", "formalParameterList", + "formalParameter", "lastFormalParameter", "methodBody", "constructorBody", + "qualifiedName", "literal", "annotation", "annotationName", "elementValuePairs", + "elementValuePair", "elementValue", "elementValueArrayInitializer", "annotationTypeDeclaration", + "annotationTypeBody", "annotationTypeElementDeclaration", "annotationTypeElementRest", + "annotationMethodOrConstantRest", "annotationMethodRest", "annotationConstantRest", + "defaultValue", "block", "blockStatement", "localVariableDeclarationStatement", + "localVariableDeclaration", "statement", "catchClause", "catchType", "finallyBlock", + "resourceSpecification", "resources", "resource", "switchBlockStatementGroup", + "switchLabel", "forControl", "forInit", "enhancedForControl", "forUpdate", + "parExpression", "expressionList", "statementExpression", "constantExpression", + "expression", "primary", "creator", "createdName", "innerCreator", "arrayCreatorRest", + "classCreatorRest", "explicitGenericInvocation", "nonWildcardTypeArguments", + "typeArgumentsOrDiamond", "nonWildcardTypeArgumentsOrDiamond", "superSuffix", + "explicitGenericInvocationSuffix", "arguments" + }; + + @Override + public String getGrammarFileName() { return "Java8.g4"; } + + @Override + public String[] getTokenNames() { return tokenNames; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public Java8Parser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + public static class CompilationUnitContext extends ParserRuleContext { + public TypeDeclarationContext typeDeclaration(int i) { + return getRuleContext(TypeDeclarationContext.class,i); + } + public ImportDeclarationContext importDeclaration(int i) { + return getRuleContext(ImportDeclarationContext.class,i); + } + public List importDeclaration() { + return getRuleContexts(ImportDeclarationContext.class); + } + public TerminalNode EOF() { return getToken(Java8Parser.EOF, 0); } + public PackageDeclarationContext packageDeclaration() { + return getRuleContext(PackageDeclarationContext.class,0); + } + public List typeDeclaration() { + return getRuleContexts(TypeDeclarationContext.class); + } + public CompilationUnitContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_compilationUnit; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterCompilationUnit(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitCompilationUnit(this); + } + } + + public final CompilationUnitContext compilationUnit() throws RecognitionException { + CompilationUnitContext _localctx = new CompilationUnitContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_compilationUnit); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(203); + switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) { + case 1: + { + setState(202); packageDeclaration(); + } + break; + } + setState(208); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==IMPORT) { + { + { + setState(205); importDeclaration(); + } + } + setState(210); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(214); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << CLASS) | (1L << ENUM) | (1L << FINAL) | (1L << INTERFACE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP) | (1L << SEMI))) != 0) || _la==AT) { + { + { + setState(211); typeDeclaration(); + } + } + setState(216); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(217); match(EOF); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PackageDeclarationContext extends ParserRuleContext { + public List annotation() { + return getRuleContexts(AnnotationContext.class); + } + public QualifiedNameContext qualifiedName() { + return getRuleContext(QualifiedNameContext.class,0); + } + public AnnotationContext annotation(int i) { + return getRuleContext(AnnotationContext.class,i); + } + public PackageDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_packageDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterPackageDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitPackageDeclaration(this); + } + } + + public final PackageDeclarationContext packageDeclaration() throws RecognitionException { + PackageDeclarationContext _localctx = new PackageDeclarationContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_packageDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(222); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==AT) { + { + { + setState(219); annotation(); + } + } + setState(224); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(225); match(PACKAGE); + setState(226); qualifiedName(); + setState(227); match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImportDeclarationContext extends ParserRuleContext { + public QualifiedNameContext qualifiedName() { + return getRuleContext(QualifiedNameContext.class,0); + } + public ImportDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_importDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterImportDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitImportDeclaration(this); + } + } + + public final ImportDeclarationContext importDeclaration() throws RecognitionException { + ImportDeclarationContext _localctx = new ImportDeclarationContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_importDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(229); match(IMPORT); + setState(231); + _la = _input.LA(1); + if (_la==STATIC) { + { + setState(230); match(STATIC); + } + } + + setState(233); qualifiedName(); + setState(236); + _la = _input.LA(1); + if (_la==DOT) { + { + setState(234); match(DOT); + setState(235); match(MUL); + } + } + + setState(238); match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeDeclarationContext extends ParserRuleContext { + public ClassOrInterfaceModifierContext classOrInterfaceModifier(int i) { + return getRuleContext(ClassOrInterfaceModifierContext.class,i); + } + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public List classOrInterfaceModifier() { + return getRuleContexts(ClassOrInterfaceModifierContext.class); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public TypeDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeDeclaration(this); + } + } + + public final TypeDeclarationContext typeDeclaration() throws RecognitionException { + TypeDeclarationContext _localctx = new TypeDeclarationContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_typeDeclaration); + int _la; + try { + int _alt; + setState(269); + switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(243); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==AT) { + { + { + setState(240); classOrInterfaceModifier(); + } + } + setState(245); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(246); classDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(250); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==AT) { + { + { + setState(247); classOrInterfaceModifier(); + } + } + setState(252); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(253); enumDeclaration(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(257); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==AT) { + { + { + setState(254); classOrInterfaceModifier(); + } + } + setState(259); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(260); interfaceDeclaration(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(264); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,9,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(261); classOrInterfaceModifier(); + } + } + } + setState(266); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,9,_ctx); + } + setState(267); annotationTypeDeclaration(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(268); match(SEMI); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ModifierContext extends ParserRuleContext { + public ClassOrInterfaceModifierContext classOrInterfaceModifier() { + return getRuleContext(ClassOrInterfaceModifierContext.class,0); + } + public ModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_modifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitModifier(this); + } + } + + public final ModifierContext modifier() throws RecognitionException { + ModifierContext _localctx = new ModifierContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_modifier); + int _la; + try { + setState(273); + switch (_input.LA(1)) { + case ABSTRACT: + case FINAL: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case STATIC: + case STRICTFP: + case AT: + enterOuterAlt(_localctx, 1); + { + setState(271); classOrInterfaceModifier(); + } + break; + case NATIVE: + case SYNCHRONIZED: + case TRANSIENT: + case VOLATILE: + enterOuterAlt(_localctx, 2); + { + setState(272); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NATIVE) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOLATILE))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassOrInterfaceModifierContext extends ParserRuleContext { + public AnnotationContext annotation() { + return getRuleContext(AnnotationContext.class,0); + } + public ClassOrInterfaceModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classOrInterfaceModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterClassOrInterfaceModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitClassOrInterfaceModifier(this); + } + } + + public final ClassOrInterfaceModifierContext classOrInterfaceModifier() throws RecognitionException { + ClassOrInterfaceModifierContext _localctx = new ClassOrInterfaceModifierContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_classOrInterfaceModifier); + int _la; + try { + setState(277); + switch (_input.LA(1)) { + case AT: + enterOuterAlt(_localctx, 1); + { + setState(275); annotation(); + } + break; + case ABSTRACT: + case FINAL: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case STATIC: + case STRICTFP: + enterOuterAlt(_localctx, 2); + { + setState(276); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableModifierContext extends ParserRuleContext { + public AnnotationContext annotation() { + return getRuleContext(AnnotationContext.class,0); + } + public VariableModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterVariableModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitVariableModifier(this); + } + } + + public final VariableModifierContext variableModifier() throws RecognitionException { + VariableModifierContext _localctx = new VariableModifierContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_variableModifier); + try { + setState(281); + switch (_input.LA(1)) { + case FINAL: + enterOuterAlt(_localctx, 1); + { + setState(279); match(FINAL); + } + break; + case AT: + enterOuterAlt(_localctx, 2); + { + setState(280); annotation(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public TypeListContext typeList() { + return getRuleContext(TypeListContext.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public ClassDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterClassDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitClassDeclaration(this); + } + } + + public final ClassDeclarationContext classDeclaration() throws RecognitionException { + ClassDeclarationContext _localctx = new ClassDeclarationContext(_ctx, getState()); + enterRule(_localctx, 14, RULE_classDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(283); match(CLASS); + setState(284); match(Identifier); + setState(286); + _la = _input.LA(1); + if (_la==LT) { + { + setState(285); typeParameters(); + } + } + + setState(290); + _la = _input.LA(1); + if (_la==EXTENDS) { + { + setState(288); match(EXTENDS); + setState(289); type(); + } + } + + setState(294); + _la = _input.LA(1); + if (_la==IMPLEMENTS) { + { + setState(292); match(IMPLEMENTS); + setState(293); typeList(); + } + } + + setState(296); classBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeParametersContext extends ParserRuleContext { + public List typeParameter() { + return getRuleContexts(TypeParameterContext.class); + } + public TypeParameterContext typeParameter(int i) { + return getRuleContext(TypeParameterContext.class,i); + } + public TypeParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeParameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeParameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeParameters(this); + } + } + + public final TypeParametersContext typeParameters() throws RecognitionException { + TypeParametersContext _localctx = new TypeParametersContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_typeParameters); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(298); match(LT); + setState(299); typeParameter(); + setState(304); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(300); match(COMMA); + setState(301); typeParameter(); + } + } + setState(306); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(307); match(GT); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeParameterContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public TypeBoundContext typeBound() { + return getRuleContext(TypeBoundContext.class,0); + } + public TypeParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeParameter(this); + } + } + + public final TypeParameterContext typeParameter() throws RecognitionException { + TypeParameterContext _localctx = new TypeParameterContext(_ctx, getState()); + enterRule(_localctx, 18, RULE_typeParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(309); match(Identifier); + setState(312); + _la = _input.LA(1); + if (_la==EXTENDS) { + { + setState(310); match(EXTENDS); + setState(311); typeBound(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeBoundContext extends ParserRuleContext { + public TypeContext type(int i) { + return getRuleContext(TypeContext.class,i); + } + public List type() { + return getRuleContexts(TypeContext.class); + } + public TypeBoundContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeBound; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeBound(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeBound(this); + } + } + + public final TypeBoundContext typeBound() throws RecognitionException { + TypeBoundContext _localctx = new TypeBoundContext(_ctx, getState()); + enterRule(_localctx, 20, RULE_typeBound); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(314); type(); + setState(319); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==BITAND) { + { + { + setState(315); match(BITAND); + setState(316); type(); + } + } + setState(321); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumDeclarationContext extends ParserRuleContext { + public EnumBodyDeclarationsContext enumBodyDeclarations() { + return getRuleContext(EnumBodyDeclarationsContext.class,0); + } + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public TypeListContext typeList() { + return getRuleContext(TypeListContext.class,0); + } + public TerminalNode ENUM() { return getToken(Java8Parser.ENUM, 0); } + public EnumConstantsContext enumConstants() { + return getRuleContext(EnumConstantsContext.class,0); + } + public EnumDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterEnumDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitEnumDeclaration(this); + } + } + + public final EnumDeclarationContext enumDeclaration() throws RecognitionException { + EnumDeclarationContext _localctx = new EnumDeclarationContext(_ctx, getState()); + enterRule(_localctx, 22, RULE_enumDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(322); match(ENUM); + setState(323); match(Identifier); + setState(326); + _la = _input.LA(1); + if (_la==IMPLEMENTS) { + { + setState(324); match(IMPLEMENTS); + setState(325); typeList(); + } + } + + setState(328); match(LBRACE); + setState(330); + _la = _input.LA(1); + if (_la==Identifier || _la==AT) { + { + setState(329); enumConstants(); + } + } + + setState(333); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(332); match(COMMA); + } + } + + setState(336); + _la = _input.LA(1); + if (_la==SEMI) { + { + setState(335); enumBodyDeclarations(); + } + } + + setState(338); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumConstantsContext extends ParserRuleContext { + public List enumConstant() { + return getRuleContexts(EnumConstantContext.class); + } + public EnumConstantContext enumConstant(int i) { + return getRuleContext(EnumConstantContext.class,i); + } + public EnumConstantsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumConstants; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterEnumConstants(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitEnumConstants(this); + } + } + + public final EnumConstantsContext enumConstants() throws RecognitionException { + EnumConstantsContext _localctx = new EnumConstantsContext(_ctx, getState()); + enterRule(_localctx, 24, RULE_enumConstants); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(340); enumConstant(); + setState(345); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,24,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(341); match(COMMA); + setState(342); enumConstant(); + } + } + } + setState(347); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,24,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumConstantContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public List annotation() { + return getRuleContexts(AnnotationContext.class); + } + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public AnnotationContext annotation(int i) { + return getRuleContext(AnnotationContext.class,i); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public EnumConstantContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumConstant; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterEnumConstant(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitEnumConstant(this); + } + } + + public final EnumConstantContext enumConstant() throws RecognitionException { + EnumConstantContext _localctx = new EnumConstantContext(_ctx, getState()); + enterRule(_localctx, 26, RULE_enumConstant); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(351); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==AT) { + { + { + setState(348); annotation(); + } + } + setState(353); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(354); match(Identifier); + setState(356); + _la = _input.LA(1); + if (_la==LPAREN) { + { + setState(355); arguments(); + } + } + + setState(359); + _la = _input.LA(1); + if (_la==LBRACE) { + { + setState(358); classBody(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumBodyDeclarationsContext extends ParserRuleContext { + public List classBodyDeclaration() { + return getRuleContexts(ClassBodyDeclarationContext.class); + } + public ClassBodyDeclarationContext classBodyDeclaration(int i) { + return getRuleContext(ClassBodyDeclarationContext.class,i); + } + public EnumBodyDeclarationsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumBodyDeclarations; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterEnumBodyDeclarations(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitEnumBodyDeclarations(this); + } + } + + public final EnumBodyDeclarationsContext enumBodyDeclarations() throws RecognitionException { + EnumBodyDeclarationsContext _localctx = new EnumBodyDeclarationsContext(_ctx, getState()); + enterRule(_localctx, 28, RULE_enumBodyDeclarations); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(361); match(SEMI); + setState(365); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOID) | (1L << VOLATILE) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + { + setState(362); classBodyDeclaration(); + } + } + setState(367); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public InterfaceBodyContext interfaceBody() { + return getRuleContext(InterfaceBodyContext.class,0); + } + public TypeListContext typeList() { + return getRuleContext(TypeListContext.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public InterfaceDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterInterfaceDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitInterfaceDeclaration(this); + } + } + + public final InterfaceDeclarationContext interfaceDeclaration() throws RecognitionException { + InterfaceDeclarationContext _localctx = new InterfaceDeclarationContext(_ctx, getState()); + enterRule(_localctx, 30, RULE_interfaceDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(368); match(INTERFACE); + setState(369); match(Identifier); + setState(371); + _la = _input.LA(1); + if (_la==LT) { + { + setState(370); typeParameters(); + } + } + + setState(375); + _la = _input.LA(1); + if (_la==EXTENDS) { + { + setState(373); match(EXTENDS); + setState(374); typeList(); + } + } + + setState(377); interfaceBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeListContext extends ParserRuleContext { + public TypeContext type(int i) { + return getRuleContext(TypeContext.class,i); + } + public List type() { + return getRuleContexts(TypeContext.class); + } + public TypeListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeList(this); + } + } + + public final TypeListContext typeList() throws RecognitionException { + TypeListContext _localctx = new TypeListContext(_ctx, getState()); + enterRule(_localctx, 32, RULE_typeList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(379); type(); + setState(384); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(380); match(COMMA); + setState(381); type(); + } + } + setState(386); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassBodyContext extends ParserRuleContext { + public List classBodyDeclaration() { + return getRuleContexts(ClassBodyDeclarationContext.class); + } + public ClassBodyDeclarationContext classBodyDeclaration(int i) { + return getRuleContext(ClassBodyDeclarationContext.class,i); + } + public ClassBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterClassBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitClassBody(this); + } + } + + public final ClassBodyContext classBody() throws RecognitionException { + ClassBodyContext _localctx = new ClassBodyContext(_ctx, getState()); + enterRule(_localctx, 34, RULE_classBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(387); match(LBRACE); + setState(391); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOID) | (1L << VOLATILE) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + { + setState(388); classBodyDeclaration(); + } + } + setState(393); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(394); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceBodyContext extends ParserRuleContext { + public List interfaceBodyDeclaration() { + return getRuleContexts(InterfaceBodyDeclarationContext.class); + } + public InterfaceBodyDeclarationContext interfaceBodyDeclaration(int i) { + return getRuleContext(InterfaceBodyDeclarationContext.class,i); + } + public InterfaceBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterInterfaceBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitInterfaceBody(this); + } + } + + public final InterfaceBodyContext interfaceBody() throws RecognitionException { + InterfaceBodyContext _localctx = new InterfaceBodyContext(_ctx, getState()); + enterRule(_localctx, 36, RULE_interfaceBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(396); match(LBRACE); + setState(400); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOID) | (1L << VOLATILE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + { + setState(397); interfaceBodyDeclaration(); + } + } + setState(402); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(403); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassBodyDeclarationContext extends ParserRuleContext { + public List modifier() { + return getRuleContexts(ModifierContext.class); + } + public MemberDeclarationContext memberDeclaration() { + return getRuleContext(MemberDeclarationContext.class,0); + } + public ModifierContext modifier(int i) { + return getRuleContext(ModifierContext.class,i); + } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public ClassBodyDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classBodyDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterClassBodyDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitClassBodyDeclaration(this); + } + } + + public final ClassBodyDeclarationContext classBodyDeclaration() throws RecognitionException { + ClassBodyDeclarationContext _localctx = new ClassBodyDeclarationContext(_ctx, getState()); + enterRule(_localctx, 38, RULE_classBodyDeclaration); + int _la; + try { + int _alt; + setState(417); + switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(405); match(SEMI); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(407); + _la = _input.LA(1); + if (_la==STATIC) { + { + setState(406); match(STATIC); + } + } + + setState(409); block(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(413); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(410); modifier(); + } + } + } + setState(415); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); + } + setState(416); memberDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MemberDeclarationContext extends ParserRuleContext { + public GenericMethodDeclarationContext genericMethodDeclaration() { + return getRuleContext(GenericMethodDeclarationContext.class,0); + } + public MethodDeclarationContext methodDeclaration() { + return getRuleContext(MethodDeclarationContext.class,0); + } + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public GenericConstructorDeclarationContext genericConstructorDeclaration() { + return getRuleContext(GenericConstructorDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public ConstructorDeclarationContext constructorDeclaration() { + return getRuleContext(ConstructorDeclarationContext.class,0); + } + public FieldDeclarationContext fieldDeclaration() { + return getRuleContext(FieldDeclarationContext.class,0); + } + public MemberDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_memberDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterMemberDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitMemberDeclaration(this); + } + } + + public final MemberDeclarationContext memberDeclaration() throws RecognitionException { + MemberDeclarationContext _localctx = new MemberDeclarationContext(_ctx, getState()); + enterRule(_localctx, 40, RULE_memberDeclaration); + try { + setState(428); + switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(419); methodDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(420); genericMethodDeclaration(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(421); fieldDeclaration(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(422); constructorDeclaration(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(423); genericConstructorDeclaration(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(424); interfaceDeclaration(); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(425); annotationTypeDeclaration(); + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(426); classDeclaration(); + } + break; + case 9: + enterOuterAlt(_localctx, 9); + { + setState(427); enumDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MethodDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public MethodBodyContext methodBody() { + return getRuleContext(MethodBodyContext.class,0); + } + public QualifiedNameListContext qualifiedNameList() { + return getRuleContext(QualifiedNameListContext.class,0); + } + public FormalParametersContext formalParameters() { + return getRuleContext(FormalParametersContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public MethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_methodDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterMethodDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitMethodDeclaration(this); + } + } + + public final MethodDeclarationContext methodDeclaration() throws RecognitionException { + MethodDeclarationContext _localctx = new MethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 42, RULE_methodDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(432); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + { + setState(430); type(); + } + break; + case VOID: + { + setState(431); match(VOID); + } + break; + default: + throw new NoViableAltException(this); + } + setState(434); match(Identifier); + setState(435); formalParameters(); + setState(440); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(436); match(LBRACK); + setState(437); match(RBRACK); + } + } + setState(442); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(445); + _la = _input.LA(1); + if (_la==THROWS) { + { + setState(443); match(THROWS); + setState(444); qualifiedNameList(); + } + } + + setState(449); + switch (_input.LA(1)) { + case LBRACE: + { + setState(447); methodBody(); + } + break; + case SEMI: + { + setState(448); match(SEMI); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GenericMethodDeclarationContext extends ParserRuleContext { + public MethodDeclarationContext methodDeclaration() { + return getRuleContext(MethodDeclarationContext.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public GenericMethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_genericMethodDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterGenericMethodDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitGenericMethodDeclaration(this); + } + } + + public final GenericMethodDeclarationContext genericMethodDeclaration() throws RecognitionException { + GenericMethodDeclarationContext _localctx = new GenericMethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 44, RULE_genericMethodDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(451); typeParameters(); + setState(452); methodDeclaration(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstructorDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public ConstructorBodyContext constructorBody() { + return getRuleContext(ConstructorBodyContext.class,0); + } + public QualifiedNameListContext qualifiedNameList() { + return getRuleContext(QualifiedNameListContext.class,0); + } + public FormalParametersContext formalParameters() { + return getRuleContext(FormalParametersContext.class,0); + } + public ConstructorDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constructorDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterConstructorDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitConstructorDeclaration(this); + } + } + + public final ConstructorDeclarationContext constructorDeclaration() throws RecognitionException { + ConstructorDeclarationContext _localctx = new ConstructorDeclarationContext(_ctx, getState()); + enterRule(_localctx, 46, RULE_constructorDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(454); match(Identifier); + setState(455); formalParameters(); + setState(458); + _la = _input.LA(1); + if (_la==THROWS) { + { + setState(456); match(THROWS); + setState(457); qualifiedNameList(); + } + } + + setState(460); constructorBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GenericConstructorDeclarationContext extends ParserRuleContext { + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public ConstructorDeclarationContext constructorDeclaration() { + return getRuleContext(ConstructorDeclarationContext.class,0); + } + public GenericConstructorDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_genericConstructorDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterGenericConstructorDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitGenericConstructorDeclaration(this); + } + } + + public final GenericConstructorDeclarationContext genericConstructorDeclaration() throws RecognitionException { + GenericConstructorDeclarationContext _localctx = new GenericConstructorDeclarationContext(_ctx, getState()); + enterRule(_localctx, 48, RULE_genericConstructorDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(462); typeParameters(); + setState(463); constructorDeclaration(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FieldDeclarationContext extends ParserRuleContext { + public VariableDeclaratorsContext variableDeclarators() { + return getRuleContext(VariableDeclaratorsContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public FieldDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_fieldDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterFieldDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitFieldDeclaration(this); + } + } + + public final FieldDeclarationContext fieldDeclaration() throws RecognitionException { + FieldDeclarationContext _localctx = new FieldDeclarationContext(_ctx, getState()); + enterRule(_localctx, 50, RULE_fieldDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(465); type(); + setState(466); variableDeclarators(); + setState(467); match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceBodyDeclarationContext extends ParserRuleContext { + public List modifier() { + return getRuleContexts(ModifierContext.class); + } + public ModifierContext modifier(int i) { + return getRuleContext(ModifierContext.class,i); + } + public InterfaceMemberDeclarationContext interfaceMemberDeclaration() { + return getRuleContext(InterfaceMemberDeclarationContext.class,0); + } + public InterfaceBodyDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceBodyDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterInterfaceBodyDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitInterfaceBodyDeclaration(this); + } + } + + public final InterfaceBodyDeclarationContext interfaceBodyDeclaration() throws RecognitionException { + InterfaceBodyDeclarationContext _localctx = new InterfaceBodyDeclarationContext(_ctx, getState()); + enterRule(_localctx, 52, RULE_interfaceBodyDeclaration); + try { + int _alt; + setState(477); + switch (_input.LA(1)) { + case ABSTRACT: + case BOOLEAN: + case BYTE: + case CHAR: + case CLASS: + case DOUBLE: + case ENUM: + case FINAL: + case FLOAT: + case INT: + case INTERFACE: + case LONG: + case NATIVE: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case SHORT: + case STATIC: + case STRICTFP: + case SYNCHRONIZED: + case TRANSIENT: + case VOID: + case VOLATILE: + case LT: + case Identifier: + case AT: + enterOuterAlt(_localctx, 1); + { + setState(472); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,43,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(469); modifier(); + } + } + } + setState(474); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,43,_ctx); + } + setState(475); interfaceMemberDeclaration(); + } + break; + case SEMI: + enterOuterAlt(_localctx, 2); + { + setState(476); match(SEMI); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceMemberDeclarationContext extends ParserRuleContext { + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public GenericInterfaceMethodDeclarationContext genericInterfaceMethodDeclaration() { + return getRuleContext(GenericInterfaceMethodDeclarationContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public ConstDeclarationContext constDeclaration() { + return getRuleContext(ConstDeclarationContext.class,0); + } + public InterfaceMethodDeclarationContext interfaceMethodDeclaration() { + return getRuleContext(InterfaceMethodDeclarationContext.class,0); + } + public InterfaceMemberDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceMemberDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterInterfaceMemberDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitInterfaceMemberDeclaration(this); + } + } + + public final InterfaceMemberDeclarationContext interfaceMemberDeclaration() throws RecognitionException { + InterfaceMemberDeclarationContext _localctx = new InterfaceMemberDeclarationContext(_ctx, getState()); + enterRule(_localctx, 54, RULE_interfaceMemberDeclaration); + try { + setState(486); + switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(479); constDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(480); interfaceMethodDeclaration(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(481); genericInterfaceMethodDeclaration(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(482); interfaceDeclaration(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(483); annotationTypeDeclaration(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(484); classDeclaration(); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(485); enumDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstDeclarationContext extends ParserRuleContext { + public ConstantDeclaratorContext constantDeclarator(int i) { + return getRuleContext(ConstantDeclaratorContext.class,i); + } + public List constantDeclarator() { + return getRuleContexts(ConstantDeclaratorContext.class); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public ConstDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterConstDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitConstDeclaration(this); + } + } + + public final ConstDeclarationContext constDeclaration() throws RecognitionException { + ConstDeclarationContext _localctx = new ConstDeclarationContext(_ctx, getState()); + enterRule(_localctx, 56, RULE_constDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(488); type(); + setState(489); constantDeclarator(); + setState(494); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(490); match(COMMA); + setState(491); constantDeclarator(); + } + } + setState(496); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(497); match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstantDeclaratorContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public VariableInitializerContext variableInitializer() { + return getRuleContext(VariableInitializerContext.class,0); + } + public ConstantDeclaratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constantDeclarator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterConstantDeclarator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitConstantDeclarator(this); + } + } + + public final ConstantDeclaratorContext constantDeclarator() throws RecognitionException { + ConstantDeclaratorContext _localctx = new ConstantDeclaratorContext(_ctx, getState()); + enterRule(_localctx, 58, RULE_constantDeclarator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(499); match(Identifier); + setState(504); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(500); match(LBRACK); + setState(501); match(RBRACK); + } + } + setState(506); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(507); match(ASSIGN); + setState(508); variableInitializer(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceMethodDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public QualifiedNameListContext qualifiedNameList() { + return getRuleContext(QualifiedNameListContext.class,0); + } + public FormalParametersContext formalParameters() { + return getRuleContext(FormalParametersContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public InterfaceMethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceMethodDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterInterfaceMethodDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitInterfaceMethodDeclaration(this); + } + } + + public final InterfaceMethodDeclarationContext interfaceMethodDeclaration() throws RecognitionException { + InterfaceMethodDeclarationContext _localctx = new InterfaceMethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 60, RULE_interfaceMethodDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(512); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + { + setState(510); type(); + } + break; + case VOID: + { + setState(511); match(VOID); + } + break; + default: + throw new NoViableAltException(this); + } + setState(514); match(Identifier); + setState(515); formalParameters(); + setState(520); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(516); match(LBRACK); + setState(517); match(RBRACK); + } + } + setState(522); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(525); + _la = _input.LA(1); + if (_la==THROWS) { + { + setState(523); match(THROWS); + setState(524); qualifiedNameList(); + } + } + + setState(527); match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GenericInterfaceMethodDeclarationContext extends ParserRuleContext { + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public InterfaceMethodDeclarationContext interfaceMethodDeclaration() { + return getRuleContext(InterfaceMethodDeclarationContext.class,0); + } + public GenericInterfaceMethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_genericInterfaceMethodDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterGenericInterfaceMethodDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitGenericInterfaceMethodDeclaration(this); + } + } + + public final GenericInterfaceMethodDeclarationContext genericInterfaceMethodDeclaration() throws RecognitionException { + GenericInterfaceMethodDeclarationContext _localctx = new GenericInterfaceMethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 62, RULE_genericInterfaceMethodDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(529); typeParameters(); + setState(530); interfaceMethodDeclaration(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclaratorsContext extends ParserRuleContext { + public List variableDeclarator() { + return getRuleContexts(VariableDeclaratorContext.class); + } + public VariableDeclaratorContext variableDeclarator(int i) { + return getRuleContext(VariableDeclaratorContext.class,i); + } + public VariableDeclaratorsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclarators; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterVariableDeclarators(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitVariableDeclarators(this); + } + } + + public final VariableDeclaratorsContext variableDeclarators() throws RecognitionException { + VariableDeclaratorsContext _localctx = new VariableDeclaratorsContext(_ctx, getState()); + enterRule(_localctx, 64, RULE_variableDeclarators); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(532); variableDeclarator(); + setState(537); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(533); match(COMMA); + setState(534); variableDeclarator(); + } + } + setState(539); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclaratorContext extends ParserRuleContext { + public VariableInitializerContext variableInitializer() { + return getRuleContext(VariableInitializerContext.class,0); + } + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public VariableDeclaratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclarator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterVariableDeclarator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitVariableDeclarator(this); + } + } + + public final VariableDeclaratorContext variableDeclarator() throws RecognitionException { + VariableDeclaratorContext _localctx = new VariableDeclaratorContext(_ctx, getState()); + enterRule(_localctx, 66, RULE_variableDeclarator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(540); variableDeclaratorId(); + setState(543); + _la = _input.LA(1); + if (_la==ASSIGN) { + { + setState(541); match(ASSIGN); + setState(542); variableInitializer(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclaratorIdContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public VariableDeclaratorIdContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclaratorId; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterVariableDeclaratorId(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitVariableDeclaratorId(this); + } + } + + public final VariableDeclaratorIdContext variableDeclaratorId() throws RecognitionException { + VariableDeclaratorIdContext _localctx = new VariableDeclaratorIdContext(_ctx, getState()); + enterRule(_localctx, 68, RULE_variableDeclaratorId); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(545); match(Identifier); + setState(550); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(546); match(LBRACK); + setState(547); match(RBRACK); + } + } + setState(552); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableInitializerContext extends ParserRuleContext { + public ArrayInitializerContext arrayInitializer() { + return getRuleContext(ArrayInitializerContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public VariableInitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableInitializer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterVariableInitializer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitVariableInitializer(this); + } + } + + public final VariableInitializerContext variableInitializer() throws RecognitionException { + VariableInitializerContext _localctx = new VariableInitializerContext(_ctx, getState()); + enterRule(_localctx, 70, RULE_variableInitializer); + try { + setState(555); + switch (_input.LA(1)) { + case LBRACE: + enterOuterAlt(_localctx, 1); + { + setState(553); arrayInitializer(); + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case NEW: + case SHORT: + case SUPER: + case THIS: + case VOID: + case IntegerLiteral: + case FloatingPointLiteral: + case BooleanLiteral: + case CharacterLiteral: + case StringLiteral: + case NullLiteral: + case LPAREN: + case LT: + case BANG: + case TILDE: + case INC: + case DEC: + case ADD: + case SUB: + case Identifier: + enterOuterAlt(_localctx, 2); + { + setState(554); expression(0); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrayInitializerContext extends ParserRuleContext { + public List variableInitializer() { + return getRuleContexts(VariableInitializerContext.class); + } + public VariableInitializerContext variableInitializer(int i) { + return getRuleContext(VariableInitializerContext.class,i); + } + public ArrayInitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayInitializer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterArrayInitializer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitArrayInitializer(this); + } + } + + public final ArrayInitializerContext arrayInitializer() throws RecognitionException { + ArrayInitializerContext _localctx = new ArrayInitializerContext(_ctx, getState()); + enterRule(_localctx, 72, RULE_arrayInitializer); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(557); match(LBRACE); + setState(569); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(558); variableInitializer(); + setState(563); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,55,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(559); match(COMMA); + setState(560); variableInitializer(); + } + } + } + setState(565); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,55,_ctx); + } + setState(567); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(566); match(COMMA); + } + } + + } + } + + setState(571); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumConstantNameContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public EnumConstantNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumConstantName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterEnumConstantName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitEnumConstantName(this); + } + } + + public final EnumConstantNameContext enumConstantName() throws RecognitionException { + EnumConstantNameContext _localctx = new EnumConstantNameContext(_ctx, getState()); + enterRule(_localctx, 74, RULE_enumConstantName); + try { + enterOuterAlt(_localctx, 1); + { + setState(573); match(Identifier); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeContext extends ParserRuleContext { + public PrimitiveTypeContext primitiveType() { + return getRuleContext(PrimitiveTypeContext.class,0); + } + public ClassOrInterfaceTypeContext classOrInterfaceType() { + return getRuleContext(ClassOrInterfaceTypeContext.class,0); + } + public TypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_type; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitType(this); + } + } + + public final TypeContext type() throws RecognitionException { + TypeContext _localctx = new TypeContext(_ctx, getState()); + enterRule(_localctx, 76, RULE_type); + try { + int _alt; + setState(591); + switch (_input.LA(1)) { + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(575); classOrInterfaceType(); + setState(580); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,58,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(576); match(LBRACK); + setState(577); match(RBRACK); + } + } + } + setState(582); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,58,_ctx); + } + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + enterOuterAlt(_localctx, 2); + { + setState(583); primitiveType(); + setState(588); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,59,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(584); match(LBRACK); + setState(585); match(RBRACK); + } + } + } + setState(590); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,59,_ctx); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassOrInterfaceTypeContext extends ParserRuleContext { + public List typeArguments() { + return getRuleContexts(TypeArgumentsContext.class); + } + public List Identifier() { return getTokens(Java8Parser.Identifier); } + public TerminalNode Identifier(int i) { + return getToken(Java8Parser.Identifier, i); + } + public TypeArgumentsContext typeArguments(int i) { + return getRuleContext(TypeArgumentsContext.class,i); + } + public ClassOrInterfaceTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classOrInterfaceType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterClassOrInterfaceType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitClassOrInterfaceType(this); + } + } + + public final ClassOrInterfaceTypeContext classOrInterfaceType() throws RecognitionException { + ClassOrInterfaceTypeContext _localctx = new ClassOrInterfaceTypeContext(_ctx, getState()); + enterRule(_localctx, 78, RULE_classOrInterfaceType); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(593); match(Identifier); + setState(595); + switch ( getInterpreter().adaptivePredict(_input,61,_ctx) ) { + case 1: + { + setState(594); typeArguments(); + } + break; + } + setState(604); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,63,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(597); match(DOT); + setState(598); match(Identifier); + setState(600); + switch ( getInterpreter().adaptivePredict(_input,62,_ctx) ) { + case 1: + { + setState(599); typeArguments(); + } + break; + } + } + } + } + setState(606); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,63,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PrimitiveTypeContext extends ParserRuleContext { + public PrimitiveTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_primitiveType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterPrimitiveType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitPrimitiveType(this); + } + } + + public final PrimitiveTypeContext primitiveType() throws RecognitionException { + PrimitiveTypeContext _localctx = new PrimitiveTypeContext(_ctx, getState()); + enterRule(_localctx, 80, RULE_primitiveType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(607); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << SHORT))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentsContext extends ParserRuleContext { + public List typeArgument() { + return getRuleContexts(TypeArgumentContext.class); + } + public TypeArgumentContext typeArgument(int i) { + return getRuleContext(TypeArgumentContext.class,i); + } + public TypeArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeArguments(this); + } + } + + public final TypeArgumentsContext typeArguments() throws RecognitionException { + TypeArgumentsContext _localctx = new TypeArgumentsContext(_ctx, getState()); + enterRule(_localctx, 82, RULE_typeArguments); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(609); match(LT); + setState(610); typeArgument(); + setState(615); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(611); match(COMMA); + setState(612); typeArgument(); + } + } + setState(617); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(618); match(GT); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentContext extends ParserRuleContext { + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public TypeArgumentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArgument; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeArgument(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeArgument(this); + } + } + + public final TypeArgumentContext typeArgument() throws RecognitionException { + TypeArgumentContext _localctx = new TypeArgumentContext(_ctx, getState()); + enterRule(_localctx, 84, RULE_typeArgument); + int _la; + try { + setState(626); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(620); type(); + } + break; + case QUESTION: + enterOuterAlt(_localctx, 2); + { + setState(621); match(QUESTION); + setState(624); + _la = _input.LA(1); + if (_la==EXTENDS || _la==SUPER) { + { + setState(622); + _la = _input.LA(1); + if ( !(_la==EXTENDS || _la==SUPER) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(623); type(); + } + } + + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class QualifiedNameListContext extends ParserRuleContext { + public List qualifiedName() { + return getRuleContexts(QualifiedNameContext.class); + } + public QualifiedNameContext qualifiedName(int i) { + return getRuleContext(QualifiedNameContext.class,i); + } + public QualifiedNameListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_qualifiedNameList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterQualifiedNameList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitQualifiedNameList(this); + } + } + + public final QualifiedNameListContext qualifiedNameList() throws RecognitionException { + QualifiedNameListContext _localctx = new QualifiedNameListContext(_ctx, getState()); + enterRule(_localctx, 86, RULE_qualifiedNameList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(628); qualifiedName(); + setState(633); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(629); match(COMMA); + setState(630); qualifiedName(); + } + } + setState(635); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FormalParametersContext extends ParserRuleContext { + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public FormalParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_formalParameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterFormalParameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitFormalParameters(this); + } + } + + public final FormalParametersContext formalParameters() throws RecognitionException { + FormalParametersContext _localctx = new FormalParametersContext(_ctx, getState()); + enterRule(_localctx, 88, RULE_formalParameters); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(636); match(LPAREN); + setState(638); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << SHORT))) != 0) || _la==Identifier || _la==AT) { + { + setState(637); formalParameterList(); + } + } + + setState(640); match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FormalParameterListContext extends ParserRuleContext { + public List formalParameter() { + return getRuleContexts(FormalParameterContext.class); + } + public LastFormalParameterContext lastFormalParameter() { + return getRuleContext(LastFormalParameterContext.class,0); + } + public FormalParameterContext formalParameter(int i) { + return getRuleContext(FormalParameterContext.class,i); + } + public FormalParameterListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_formalParameterList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterFormalParameterList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitFormalParameterList(this); + } + } + + public final FormalParameterListContext formalParameterList() throws RecognitionException { + FormalParameterListContext _localctx = new FormalParameterListContext(_ctx, getState()); + enterRule(_localctx, 90, RULE_formalParameterList); + int _la; + try { + int _alt; + setState(655); + switch ( getInterpreter().adaptivePredict(_input,71,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(642); formalParameter(); + setState(647); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,69,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(643); match(COMMA); + setState(644); formalParameter(); + } + } + } + setState(649); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,69,_ctx); + } + setState(652); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(650); match(COMMA); + setState(651); lastFormalParameter(); + } + } + + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(654); lastFormalParameter(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FormalParameterContext extends ParserRuleContext { + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public FormalParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_formalParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterFormalParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitFormalParameter(this); + } + } + + public final FormalParameterContext formalParameter() throws RecognitionException { + FormalParameterContext _localctx = new FormalParameterContext(_ctx, getState()); + enterRule(_localctx, 92, RULE_formalParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(660); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(657); variableModifier(); + } + } + setState(662); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(663); type(); + setState(664); variableDeclaratorId(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LastFormalParameterContext extends ParserRuleContext { + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public LastFormalParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lastFormalParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterLastFormalParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitLastFormalParameter(this); + } + } + + public final LastFormalParameterContext lastFormalParameter() throws RecognitionException { + LastFormalParameterContext _localctx = new LastFormalParameterContext(_ctx, getState()); + enterRule(_localctx, 94, RULE_lastFormalParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(669); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(666); variableModifier(); + } + } + setState(671); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(672); type(); + setState(673); match(ELLIPSIS); + setState(674); variableDeclaratorId(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MethodBodyContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public MethodBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_methodBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterMethodBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitMethodBody(this); + } + } + + public final MethodBodyContext methodBody() throws RecognitionException { + MethodBodyContext _localctx = new MethodBodyContext(_ctx, getState()); + enterRule(_localctx, 96, RULE_methodBody); + try { + enterOuterAlt(_localctx, 1); + { + setState(676); block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstructorBodyContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public ConstructorBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constructorBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterConstructorBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitConstructorBody(this); + } + } + + public final ConstructorBodyContext constructorBody() throws RecognitionException { + ConstructorBodyContext _localctx = new ConstructorBodyContext(_ctx, getState()); + enterRule(_localctx, 98, RULE_constructorBody); + try { + enterOuterAlt(_localctx, 1); + { + setState(678); block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class QualifiedNameContext extends ParserRuleContext { + public List Identifier() { return getTokens(Java8Parser.Identifier); } + public TerminalNode Identifier(int i) { + return getToken(Java8Parser.Identifier, i); + } + public QualifiedNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_qualifiedName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterQualifiedName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitQualifiedName(this); + } + } + + public final QualifiedNameContext qualifiedName() throws RecognitionException { + QualifiedNameContext _localctx = new QualifiedNameContext(_ctx, getState()); + enterRule(_localctx, 100, RULE_qualifiedName); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(680); match(Identifier); + setState(685); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,74,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(681); match(DOT); + setState(682); match(Identifier); + } + } + } + setState(687); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,74,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LiteralContext extends ParserRuleContext { + public TerminalNode StringLiteral() { return getToken(Java8Parser.StringLiteral, 0); } + public TerminalNode IntegerLiteral() { return getToken(Java8Parser.IntegerLiteral, 0); } + public TerminalNode FloatingPointLiteral() { return getToken(Java8Parser.FloatingPointLiteral, 0); } + public TerminalNode BooleanLiteral() { return getToken(Java8Parser.BooleanLiteral, 0); } + public TerminalNode CharacterLiteral() { return getToken(Java8Parser.CharacterLiteral, 0); } + public LiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_literal; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitLiteral(this); + } + } + + public final LiteralContext literal() throws RecognitionException { + LiteralContext _localctx = new LiteralContext(_ctx, getState()); + enterRule(_localctx, 102, RULE_literal); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(688); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationContext extends ParserRuleContext { + public ElementValuePairsContext elementValuePairs() { + return getRuleContext(ElementValuePairsContext.class,0); + } + public AnnotationNameContext annotationName() { + return getRuleContext(AnnotationNameContext.class,0); + } + public ElementValueContext elementValue() { + return getRuleContext(ElementValueContext.class,0); + } + public AnnotationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotation(this); + } + } + + public final AnnotationContext annotation() throws RecognitionException { + AnnotationContext _localctx = new AnnotationContext(_ctx, getState()); + enterRule(_localctx, 104, RULE_annotation); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(690); match(AT); + setState(691); annotationName(); + setState(698); + _la = _input.LA(1); + if (_la==LPAREN) { + { + setState(692); match(LPAREN); + setState(695); + switch ( getInterpreter().adaptivePredict(_input,75,_ctx) ) { + case 1: + { + setState(693); elementValuePairs(); + } + break; + case 2: + { + setState(694); elementValue(); + } + break; + } + setState(697); match(RPAREN); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationNameContext extends ParserRuleContext { + public QualifiedNameContext qualifiedName() { + return getRuleContext(QualifiedNameContext.class,0); + } + public AnnotationNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationName(this); + } + } + + public final AnnotationNameContext annotationName() throws RecognitionException { + AnnotationNameContext _localctx = new AnnotationNameContext(_ctx, getState()); + enterRule(_localctx, 106, RULE_annotationName); + try { + enterOuterAlt(_localctx, 1); + { + setState(700); qualifiedName(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValuePairsContext extends ParserRuleContext { + public ElementValuePairContext elementValuePair(int i) { + return getRuleContext(ElementValuePairContext.class,i); + } + public List elementValuePair() { + return getRuleContexts(ElementValuePairContext.class); + } + public ElementValuePairsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValuePairs; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterElementValuePairs(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitElementValuePairs(this); + } + } + + public final ElementValuePairsContext elementValuePairs() throws RecognitionException { + ElementValuePairsContext _localctx = new ElementValuePairsContext(_ctx, getState()); + enterRule(_localctx, 108, RULE_elementValuePairs); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(702); elementValuePair(); + setState(707); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(703); match(COMMA); + setState(704); elementValuePair(); + } + } + setState(709); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValuePairContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public ElementValueContext elementValue() { + return getRuleContext(ElementValueContext.class,0); + } + public ElementValuePairContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValuePair; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterElementValuePair(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitElementValuePair(this); + } + } + + public final ElementValuePairContext elementValuePair() throws RecognitionException { + ElementValuePairContext _localctx = new ElementValuePairContext(_ctx, getState()); + enterRule(_localctx, 110, RULE_elementValuePair); + try { + enterOuterAlt(_localctx, 1); + { + setState(710); match(Identifier); + setState(711); match(ASSIGN); + setState(712); elementValue(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValueContext extends ParserRuleContext { + public ElementValueArrayInitializerContext elementValueArrayInitializer() { + return getRuleContext(ElementValueArrayInitializerContext.class,0); + } + public AnnotationContext annotation() { + return getRuleContext(AnnotationContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ElementValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValue; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterElementValue(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitElementValue(this); + } + } + + public final ElementValueContext elementValue() throws RecognitionException { + ElementValueContext _localctx = new ElementValueContext(_ctx, getState()); + enterRule(_localctx, 112, RULE_elementValue); + try { + setState(717); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case NEW: + case SHORT: + case SUPER: + case THIS: + case VOID: + case IntegerLiteral: + case FloatingPointLiteral: + case BooleanLiteral: + case CharacterLiteral: + case StringLiteral: + case NullLiteral: + case LPAREN: + case LT: + case BANG: + case TILDE: + case INC: + case DEC: + case ADD: + case SUB: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(714); expression(0); + } + break; + case AT: + enterOuterAlt(_localctx, 2); + { + setState(715); annotation(); + } + break; + case LBRACE: + enterOuterAlt(_localctx, 3); + { + setState(716); elementValueArrayInitializer(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValueArrayInitializerContext extends ParserRuleContext { + public ElementValueContext elementValue(int i) { + return getRuleContext(ElementValueContext.class,i); + } + public List elementValue() { + return getRuleContexts(ElementValueContext.class); + } + public ElementValueArrayInitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValueArrayInitializer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterElementValueArrayInitializer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitElementValueArrayInitializer(this); + } + } + + public final ElementValueArrayInitializerContext elementValueArrayInitializer() throws RecognitionException { + ElementValueArrayInitializerContext _localctx = new ElementValueArrayInitializerContext(_ctx, getState()); + enterRule(_localctx, 114, RULE_elementValueArrayInitializer); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(719); match(LBRACE); + setState(728); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + setState(720); elementValue(); + setState(725); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,79,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(721); match(COMMA); + setState(722); elementValue(); + } + } + } + setState(727); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,79,_ctx); + } + } + } + + setState(731); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(730); match(COMMA); + } + } + + setState(733); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public AnnotationTypeBodyContext annotationTypeBody() { + return getRuleContext(AnnotationTypeBodyContext.class,0); + } + public AnnotationTypeDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationTypeDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationTypeDeclaration(this); + } + } + + public final AnnotationTypeDeclarationContext annotationTypeDeclaration() throws RecognitionException { + AnnotationTypeDeclarationContext _localctx = new AnnotationTypeDeclarationContext(_ctx, getState()); + enterRule(_localctx, 116, RULE_annotationTypeDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(735); match(AT); + setState(736); match(INTERFACE); + setState(737); match(Identifier); + setState(738); annotationTypeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeBodyContext extends ParserRuleContext { + public List annotationTypeElementDeclaration() { + return getRuleContexts(AnnotationTypeElementDeclarationContext.class); + } + public AnnotationTypeElementDeclarationContext annotationTypeElementDeclaration(int i) { + return getRuleContext(AnnotationTypeElementDeclarationContext.class,i); + } + public AnnotationTypeBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationTypeBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationTypeBody(this); + } + } + + public final AnnotationTypeBodyContext annotationTypeBody() throws RecognitionException { + AnnotationTypeBodyContext _localctx = new AnnotationTypeBodyContext(_ctx, getState()); + enterRule(_localctx, 118, RULE_annotationTypeBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(740); match(LBRACE); + setState(744); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOLATILE) | (1L << SEMI))) != 0) || _la==Identifier || _la==AT) { + { + { + setState(741); annotationTypeElementDeclaration(); + } + } + setState(746); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(747); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeElementDeclarationContext extends ParserRuleContext { + public List modifier() { + return getRuleContexts(ModifierContext.class); + } + public AnnotationTypeElementRestContext annotationTypeElementRest() { + return getRuleContext(AnnotationTypeElementRestContext.class,0); + } + public ModifierContext modifier(int i) { + return getRuleContext(ModifierContext.class,i); + } + public AnnotationTypeElementDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeElementDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationTypeElementDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationTypeElementDeclaration(this); + } + } + + public final AnnotationTypeElementDeclarationContext annotationTypeElementDeclaration() throws RecognitionException { + AnnotationTypeElementDeclarationContext _localctx = new AnnotationTypeElementDeclarationContext(_ctx, getState()); + enterRule(_localctx, 120, RULE_annotationTypeElementDeclaration); + try { + int _alt; + setState(757); + switch (_input.LA(1)) { + case ABSTRACT: + case BOOLEAN: + case BYTE: + case CHAR: + case CLASS: + case DOUBLE: + case ENUM: + case FINAL: + case FLOAT: + case INT: + case INTERFACE: + case LONG: + case NATIVE: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case SHORT: + case STATIC: + case STRICTFP: + case SYNCHRONIZED: + case TRANSIENT: + case VOLATILE: + case Identifier: + case AT: + enterOuterAlt(_localctx, 1); + { + setState(752); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,83,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(749); modifier(); + } + } + } + setState(754); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,83,_ctx); + } + setState(755); annotationTypeElementRest(); + } + break; + case SEMI: + enterOuterAlt(_localctx, 2); + { + setState(756); match(SEMI); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeElementRestContext extends ParserRuleContext { + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public AnnotationMethodOrConstantRestContext annotationMethodOrConstantRest() { + return getRuleContext(AnnotationMethodOrConstantRestContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public AnnotationTypeElementRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeElementRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationTypeElementRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationTypeElementRest(this); + } + } + + public final AnnotationTypeElementRestContext annotationTypeElementRest() throws RecognitionException { + AnnotationTypeElementRestContext _localctx = new AnnotationTypeElementRestContext(_ctx, getState()); + enterRule(_localctx, 122, RULE_annotationTypeElementRest); + try { + setState(779); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(759); type(); + setState(760); annotationMethodOrConstantRest(); + setState(761); match(SEMI); + } + break; + case CLASS: + enterOuterAlt(_localctx, 2); + { + setState(763); classDeclaration(); + setState(765); + switch ( getInterpreter().adaptivePredict(_input,85,_ctx) ) { + case 1: + { + setState(764); match(SEMI); + } + break; + } + } + break; + case INTERFACE: + enterOuterAlt(_localctx, 3); + { + setState(767); interfaceDeclaration(); + setState(769); + switch ( getInterpreter().adaptivePredict(_input,86,_ctx) ) { + case 1: + { + setState(768); match(SEMI); + } + break; + } + } + break; + case ENUM: + enterOuterAlt(_localctx, 4); + { + setState(771); enumDeclaration(); + setState(773); + switch ( getInterpreter().adaptivePredict(_input,87,_ctx) ) { + case 1: + { + setState(772); match(SEMI); + } + break; + } + } + break; + case AT: + enterOuterAlt(_localctx, 5); + { + setState(775); annotationTypeDeclaration(); + setState(777); + switch ( getInterpreter().adaptivePredict(_input,88,_ctx) ) { + case 1: + { + setState(776); match(SEMI); + } + break; + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationMethodOrConstantRestContext extends ParserRuleContext { + public AnnotationMethodRestContext annotationMethodRest() { + return getRuleContext(AnnotationMethodRestContext.class,0); + } + public AnnotationConstantRestContext annotationConstantRest() { + return getRuleContext(AnnotationConstantRestContext.class,0); + } + public AnnotationMethodOrConstantRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationMethodOrConstantRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationMethodOrConstantRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationMethodOrConstantRest(this); + } + } + + public final AnnotationMethodOrConstantRestContext annotationMethodOrConstantRest() throws RecognitionException { + AnnotationMethodOrConstantRestContext _localctx = new AnnotationMethodOrConstantRestContext(_ctx, getState()); + enterRule(_localctx, 124, RULE_annotationMethodOrConstantRest); + try { + setState(783); + switch ( getInterpreter().adaptivePredict(_input,90,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(781); annotationMethodRest(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(782); annotationConstantRest(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationMethodRestContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public DefaultValueContext defaultValue() { + return getRuleContext(DefaultValueContext.class,0); + } + public AnnotationMethodRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationMethodRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationMethodRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationMethodRest(this); + } + } + + public final AnnotationMethodRestContext annotationMethodRest() throws RecognitionException { + AnnotationMethodRestContext _localctx = new AnnotationMethodRestContext(_ctx, getState()); + enterRule(_localctx, 126, RULE_annotationMethodRest); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(785); match(Identifier); + setState(786); match(LPAREN); + setState(787); match(RPAREN); + setState(789); + _la = _input.LA(1); + if (_la==DEFAULT) { + { + setState(788); defaultValue(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationConstantRestContext extends ParserRuleContext { + public VariableDeclaratorsContext variableDeclarators() { + return getRuleContext(VariableDeclaratorsContext.class,0); + } + public AnnotationConstantRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationConstantRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationConstantRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationConstantRest(this); + } + } + + public final AnnotationConstantRestContext annotationConstantRest() throws RecognitionException { + AnnotationConstantRestContext _localctx = new AnnotationConstantRestContext(_ctx, getState()); + enterRule(_localctx, 128, RULE_annotationConstantRest); + try { + enterOuterAlt(_localctx, 1); + { + setState(791); variableDeclarators(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DefaultValueContext extends ParserRuleContext { + public ElementValueContext elementValue() { + return getRuleContext(ElementValueContext.class,0); + } + public DefaultValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_defaultValue; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterDefaultValue(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitDefaultValue(this); + } + } + + public final DefaultValueContext defaultValue() throws RecognitionException { + DefaultValueContext _localctx = new DefaultValueContext(_ctx, getState()); + enterRule(_localctx, 130, RULE_defaultValue); + try { + enterOuterAlt(_localctx, 1); + { + setState(793); match(DEFAULT); + setState(794); elementValue(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BlockContext extends ParserRuleContext { + public List blockStatement() { + return getRuleContexts(BlockStatementContext.class); + } + public BlockStatementContext blockStatement(int i) { + return getRuleContext(BlockStatementContext.class,i); + } + public BlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_block; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitBlock(this); + } + } + + public final BlockContext block() throws RecognitionException { + BlockContext _localctx = new BlockContext(_ctx, getState()); + enterRule(_localctx, 132, RULE_block); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(796); match(LBRACE); + setState(800); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << ASSERT) | (1L << BOOLEAN) | (1L << BREAK) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << CONTINUE) | (1L << DO) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << FOR) | (1L << IF) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NEW) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << RETURN) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SUPER) | (1L << SWITCH) | (1L << SYNCHRONIZED) | (1L << THIS) | (1L << THROW) | (1L << TRY) | (1L << VOID) | (1L << WHILE) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + { + setState(797); blockStatement(); + } + } + setState(802); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(803); match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BlockStatementContext extends ParserRuleContext { + public TypeDeclarationContext typeDeclaration() { + return getRuleContext(TypeDeclarationContext.class,0); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public LocalVariableDeclarationStatementContext localVariableDeclarationStatement() { + return getRuleContext(LocalVariableDeclarationStatementContext.class,0); + } + public BlockStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_blockStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterBlockStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitBlockStatement(this); + } + } + + public final BlockStatementContext blockStatement() throws RecognitionException { + BlockStatementContext _localctx = new BlockStatementContext(_ctx, getState()); + enterRule(_localctx, 134, RULE_blockStatement); + try { + setState(808); + switch ( getInterpreter().adaptivePredict(_input,93,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(805); localVariableDeclarationStatement(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(806); statement(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(807); typeDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LocalVariableDeclarationStatementContext extends ParserRuleContext { + public LocalVariableDeclarationContext localVariableDeclaration() { + return getRuleContext(LocalVariableDeclarationContext.class,0); + } + public LocalVariableDeclarationStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_localVariableDeclarationStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterLocalVariableDeclarationStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitLocalVariableDeclarationStatement(this); + } + } + + public final LocalVariableDeclarationStatementContext localVariableDeclarationStatement() throws RecognitionException { + LocalVariableDeclarationStatementContext _localctx = new LocalVariableDeclarationStatementContext(_ctx, getState()); + enterRule(_localctx, 136, RULE_localVariableDeclarationStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(810); localVariableDeclaration(); + setState(811); match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LocalVariableDeclarationContext extends ParserRuleContext { + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableDeclaratorsContext variableDeclarators() { + return getRuleContext(VariableDeclaratorsContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public LocalVariableDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_localVariableDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterLocalVariableDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitLocalVariableDeclaration(this); + } + } + + public final LocalVariableDeclarationContext localVariableDeclaration() throws RecognitionException { + LocalVariableDeclarationContext _localctx = new LocalVariableDeclarationContext(_ctx, getState()); + enterRule(_localctx, 138, RULE_localVariableDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(816); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(813); variableModifier(); + } + } + setState(818); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(819); type(); + setState(820); variableDeclarators(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StatementContext extends ParserRuleContext { + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public StatementExpressionContext statementExpression() { + return getRuleContext(StatementExpressionContext.class,0); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public List switchLabel() { + return getRuleContexts(SwitchLabelContext.class); + } + public List switchBlockStatementGroup() { + return getRuleContexts(SwitchBlockStatementGroupContext.class); + } + public ParExpressionContext parExpression() { + return getRuleContext(ParExpressionContext.class,0); + } + public List catchClause() { + return getRuleContexts(CatchClauseContext.class); + } + public CatchClauseContext catchClause(int i) { + return getRuleContext(CatchClauseContext.class,i); + } + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public FinallyBlockContext finallyBlock() { + return getRuleContext(FinallyBlockContext.class,0); + } + public SwitchBlockStatementGroupContext switchBlockStatementGroup(int i) { + return getRuleContext(SwitchBlockStatementGroupContext.class,i); + } + public ForControlContext forControl() { + return getRuleContext(ForControlContext.class,0); + } + public TerminalNode ASSERT() { return getToken(Java8Parser.ASSERT, 0); } + public ResourceSpecificationContext resourceSpecification() { + return getRuleContext(ResourceSpecificationContext.class,0); + } + public List statement() { + return getRuleContexts(StatementContext.class); + } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public SwitchLabelContext switchLabel(int i) { + return getRuleContext(SwitchLabelContext.class,i); + } + public StatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitStatement(this); + } + } + + public final StatementContext statement() throws RecognitionException { + StatementContext _localctx = new StatementContext(_ctx, getState()); + enterRule(_localctx, 140, RULE_statement); + int _la; + try { + int _alt; + setState(926); + switch ( getInterpreter().adaptivePredict(_input,107,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(822); block(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(823); match(ASSERT); + setState(824); expression(0); + setState(827); + _la = _input.LA(1); + if (_la==COLON) { + { + setState(825); match(COLON); + setState(826); expression(0); + } + } + + setState(829); match(SEMI); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(831); match(IF); + setState(832); parExpression(); + setState(833); statement(); + setState(836); + switch ( getInterpreter().adaptivePredict(_input,96,_ctx) ) { + case 1: + { + setState(834); match(ELSE); + setState(835); statement(); + } + break; + } + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(838); match(FOR); + setState(839); match(LPAREN); + setState(840); forControl(); + setState(841); match(RPAREN); + setState(842); statement(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(844); match(WHILE); + setState(845); parExpression(); + setState(846); statement(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(848); match(DO); + setState(849); statement(); + setState(850); match(WHILE); + setState(851); parExpression(); + setState(852); match(SEMI); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(854); match(TRY); + setState(855); block(); + setState(865); + switch (_input.LA(1)) { + case CATCH: + { + setState(857); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(856); catchClause(); + } + } + setState(859); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==CATCH ); + setState(862); + _la = _input.LA(1); + if (_la==FINALLY) { + { + setState(861); finallyBlock(); + } + } + + } + break; + case FINALLY: + { + setState(864); finallyBlock(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(867); match(TRY); + setState(868); resourceSpecification(); + setState(869); block(); + setState(873); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==CATCH) { + { + { + setState(870); catchClause(); + } + } + setState(875); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(877); + _la = _input.LA(1); + if (_la==FINALLY) { + { + setState(876); finallyBlock(); + } + } + + } + break; + case 9: + enterOuterAlt(_localctx, 9); + { + setState(879); match(SWITCH); + setState(880); parExpression(); + setState(881); match(LBRACE); + setState(885); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,102,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(882); switchBlockStatementGroup(); + } + } + } + setState(887); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,102,_ctx); + } + setState(891); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==CASE || _la==DEFAULT) { + { + { + setState(888); switchLabel(); + } + } + setState(893); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(894); match(RBRACE); + } + break; + case 10: + enterOuterAlt(_localctx, 10); + { + setState(896); match(SYNCHRONIZED); + setState(897); parExpression(); + setState(898); block(); + } + break; + case 11: + enterOuterAlt(_localctx, 11); + { + setState(900); match(RETURN); + setState(902); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(901); expression(0); + } + } + + setState(904); match(SEMI); + } + break; + case 12: + enterOuterAlt(_localctx, 12); + { + setState(905); match(THROW); + setState(906); expression(0); + setState(907); match(SEMI); + } + break; + case 13: + enterOuterAlt(_localctx, 13); + { + setState(909); match(BREAK); + setState(911); + _la = _input.LA(1); + if (_la==Identifier) { + { + setState(910); match(Identifier); + } + } + + setState(913); match(SEMI); + } + break; + case 14: + enterOuterAlt(_localctx, 14); + { + setState(914); match(CONTINUE); + setState(916); + _la = _input.LA(1); + if (_la==Identifier) { + { + setState(915); match(Identifier); + } + } + + setState(918); match(SEMI); + } + break; + case 15: + enterOuterAlt(_localctx, 15); + { + setState(919); match(SEMI); + } + break; + case 16: + enterOuterAlt(_localctx, 16); + { + setState(920); statementExpression(); + setState(921); match(SEMI); + } + break; + case 17: + enterOuterAlt(_localctx, 17); + { + setState(923); match(Identifier); + setState(924); match(COLON); + setState(925); statement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CatchClauseContext extends ParserRuleContext { + public CatchTypeContext catchType() { + return getRuleContext(CatchTypeContext.class,0); + } + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public CatchClauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_catchClause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterCatchClause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitCatchClause(this); + } + } + + public final CatchClauseContext catchClause() throws RecognitionException { + CatchClauseContext _localctx = new CatchClauseContext(_ctx, getState()); + enterRule(_localctx, 142, RULE_catchClause); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(928); match(CATCH); + setState(929); match(LPAREN); + setState(933); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(930); variableModifier(); + } + } + setState(935); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(936); catchType(); + setState(937); match(Identifier); + setState(938); match(RPAREN); + setState(939); block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CatchTypeContext extends ParserRuleContext { + public List qualifiedName() { + return getRuleContexts(QualifiedNameContext.class); + } + public QualifiedNameContext qualifiedName(int i) { + return getRuleContext(QualifiedNameContext.class,i); + } + public CatchTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_catchType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterCatchType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitCatchType(this); + } + } + + public final CatchTypeContext catchType() throws RecognitionException { + CatchTypeContext _localctx = new CatchTypeContext(_ctx, getState()); + enterRule(_localctx, 144, RULE_catchType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(941); qualifiedName(); + setState(946); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==BITOR) { + { + { + setState(942); match(BITOR); + setState(943); qualifiedName(); + } + } + setState(948); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FinallyBlockContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public FinallyBlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_finallyBlock; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterFinallyBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitFinallyBlock(this); + } + } + + public final FinallyBlockContext finallyBlock() throws RecognitionException { + FinallyBlockContext _localctx = new FinallyBlockContext(_ctx, getState()); + enterRule(_localctx, 146, RULE_finallyBlock); + try { + enterOuterAlt(_localctx, 1); + { + setState(949); match(FINALLY); + setState(950); block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ResourceSpecificationContext extends ParserRuleContext { + public ResourcesContext resources() { + return getRuleContext(ResourcesContext.class,0); + } + public ResourceSpecificationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_resourceSpecification; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterResourceSpecification(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitResourceSpecification(this); + } + } + + public final ResourceSpecificationContext resourceSpecification() throws RecognitionException { + ResourceSpecificationContext _localctx = new ResourceSpecificationContext(_ctx, getState()); + enterRule(_localctx, 148, RULE_resourceSpecification); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(952); match(LPAREN); + setState(953); resources(); + setState(955); + _la = _input.LA(1); + if (_la==SEMI) { + { + setState(954); match(SEMI); + } + } + + setState(957); match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ResourcesContext extends ParserRuleContext { + public ResourceContext resource(int i) { + return getRuleContext(ResourceContext.class,i); + } + public List resource() { + return getRuleContexts(ResourceContext.class); + } + public ResourcesContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_resources; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterResources(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitResources(this); + } + } + + public final ResourcesContext resources() throws RecognitionException { + ResourcesContext _localctx = new ResourcesContext(_ctx, getState()); + enterRule(_localctx, 150, RULE_resources); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(959); resource(); + setState(964); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,111,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(960); match(SEMI); + setState(961); resource(); + } + } + } + setState(966); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,111,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ResourceContext extends ParserRuleContext { + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public ClassOrInterfaceTypeContext classOrInterfaceType() { + return getRuleContext(ClassOrInterfaceTypeContext.class,0); + } + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ResourceContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_resource; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterResource(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitResource(this); + } + } + + public final ResourceContext resource() throws RecognitionException { + ResourceContext _localctx = new ResourceContext(_ctx, getState()); + enterRule(_localctx, 152, RULE_resource); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(970); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(967); variableModifier(); + } + } + setState(972); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(973); classOrInterfaceType(); + setState(974); variableDeclaratorId(); + setState(975); match(ASSIGN); + setState(976); expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SwitchBlockStatementGroupContext extends ParserRuleContext { + public List blockStatement() { + return getRuleContexts(BlockStatementContext.class); + } + public List switchLabel() { + return getRuleContexts(SwitchLabelContext.class); + } + public BlockStatementContext blockStatement(int i) { + return getRuleContext(BlockStatementContext.class,i); + } + public SwitchLabelContext switchLabel(int i) { + return getRuleContext(SwitchLabelContext.class,i); + } + public SwitchBlockStatementGroupContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_switchBlockStatementGroup; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterSwitchBlockStatementGroup(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitSwitchBlockStatementGroup(this); + } + } + + public final SwitchBlockStatementGroupContext switchBlockStatementGroup() throws RecognitionException { + SwitchBlockStatementGroupContext _localctx = new SwitchBlockStatementGroupContext(_ctx, getState()); + enterRule(_localctx, 154, RULE_switchBlockStatementGroup); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(979); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(978); switchLabel(); + } + } + setState(981); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==CASE || _la==DEFAULT ); + setState(984); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(983); blockStatement(); + } + } + setState(986); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << ASSERT) | (1L << BOOLEAN) | (1L << BREAK) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << CONTINUE) | (1L << DO) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << FOR) | (1L << IF) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NEW) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << RETURN) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SUPER) | (1L << SWITCH) | (1L << SYNCHRONIZED) | (1L << THIS) | (1L << THROW) | (1L << TRY) | (1L << VOID) | (1L << WHILE) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0) ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SwitchLabelContext extends ParserRuleContext { + public ConstantExpressionContext constantExpression() { + return getRuleContext(ConstantExpressionContext.class,0); + } + public EnumConstantNameContext enumConstantName() { + return getRuleContext(EnumConstantNameContext.class,0); + } + public SwitchLabelContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_switchLabel; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterSwitchLabel(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitSwitchLabel(this); + } + } + + public final SwitchLabelContext switchLabel() throws RecognitionException { + SwitchLabelContext _localctx = new SwitchLabelContext(_ctx, getState()); + enterRule(_localctx, 156, RULE_switchLabel); + try { + setState(998); + switch ( getInterpreter().adaptivePredict(_input,115,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(988); match(CASE); + setState(989); constantExpression(); + setState(990); match(COLON); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(992); match(CASE); + setState(993); enumConstantName(); + setState(994); match(COLON); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(996); match(DEFAULT); + setState(997); match(COLON); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ForControlContext extends ParserRuleContext { + public ForUpdateContext forUpdate() { + return getRuleContext(ForUpdateContext.class,0); + } + public ForInitContext forInit() { + return getRuleContext(ForInitContext.class,0); + } + public EnhancedForControlContext enhancedForControl() { + return getRuleContext(EnhancedForControlContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ForControlContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_forControl; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterForControl(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitForControl(this); + } + } + + public final ForControlContext forControl() throws RecognitionException { + ForControlContext _localctx = new ForControlContext(_ctx, getState()); + enterRule(_localctx, 158, RULE_forControl); + int _la; + try { + setState(1012); + switch ( getInterpreter().adaptivePredict(_input,119,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1000); enhancedForControl(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1002); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + setState(1001); forInit(); + } + } + + setState(1004); match(SEMI); + setState(1006); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(1005); expression(0); + } + } + + setState(1008); match(SEMI); + setState(1010); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(1009); forUpdate(); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ForInitContext extends ParserRuleContext { + public LocalVariableDeclarationContext localVariableDeclaration() { + return getRuleContext(LocalVariableDeclarationContext.class,0); + } + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public ForInitContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_forInit; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterForInit(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitForInit(this); + } + } + + public final ForInitContext forInit() throws RecognitionException { + ForInitContext _localctx = new ForInitContext(_ctx, getState()); + enterRule(_localctx, 160, RULE_forInit); + try { + setState(1016); + switch ( getInterpreter().adaptivePredict(_input,120,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1014); localVariableDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1015); expressionList(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnhancedForControlContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public EnhancedForControlContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enhancedForControl; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterEnhancedForControl(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitEnhancedForControl(this); + } + } + + public final EnhancedForControlContext enhancedForControl() throws RecognitionException { + EnhancedForControlContext _localctx = new EnhancedForControlContext(_ctx, getState()); + enterRule(_localctx, 162, RULE_enhancedForControl); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1021); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(1018); variableModifier(); + } + } + setState(1023); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1024); type(); + setState(1025); match(Identifier); + setState(1026); match(COLON); + setState(1027); expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ForUpdateContext extends ParserRuleContext { + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public ForUpdateContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_forUpdate; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterForUpdate(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitForUpdate(this); + } + } + + public final ForUpdateContext forUpdate() throws RecognitionException { + ForUpdateContext _localctx = new ForUpdateContext(_ctx, getState()); + enterRule(_localctx, 164, RULE_forUpdate); + try { + enterOuterAlt(_localctx, 1); + { + setState(1029); expressionList(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ParExpressionContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ParExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_parExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterParExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitParExpression(this); + } + } + + public final ParExpressionContext parExpression() throws RecognitionException { + ParExpressionContext _localctx = new ParExpressionContext(_ctx, getState()); + enterRule(_localctx, 166, RULE_parExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(1031); match(LPAREN); + setState(1032); expression(0); + setState(1033); match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpressionListContext extends ParserRuleContext { + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expressionList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterExpressionList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitExpressionList(this); + } + } + + public final ExpressionListContext expressionList() throws RecognitionException { + ExpressionListContext _localctx = new ExpressionListContext(_ctx, getState()); + enterRule(_localctx, 168, RULE_expressionList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1035); expression(0); + setState(1040); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(1036); match(COMMA); + setState(1037); expression(0); + } + } + setState(1042); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StatementExpressionContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public StatementExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statementExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterStatementExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitStatementExpression(this); + } + } + + public final StatementExpressionContext statementExpression() throws RecognitionException { + StatementExpressionContext _localctx = new StatementExpressionContext(_ctx, getState()); + enterRule(_localctx, 170, RULE_statementExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(1043); expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstantExpressionContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ConstantExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constantExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterConstantExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitConstantExpression(this); + } + } + + public final ConstantExpressionContext constantExpression() throws RecognitionException { + ConstantExpressionContext _localctx = new ConstantExpressionContext(_ctx, getState()); + enterRule(_localctx, 172, RULE_constantExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(1045); expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpressionContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public ExplicitGenericInvocationContext explicitGenericInvocation() { + return getRuleContext(ExplicitGenericInvocationContext.class,0); + } + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public InnerCreatorContext innerCreator() { + return getRuleContext(InnerCreatorContext.class,0); + } + public SuperSuffixContext superSuffix() { + return getRuleContext(SuperSuffixContext.class,0); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public PrimaryContext primary() { + return getRuleContext(PrimaryContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public CreatorContext creator() { + return getRuleContext(CreatorContext.class,0); + } + public ExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitExpression(this); + } + } + + public final ExpressionContext expression() throws RecognitionException { + return expression(0); + } + + private ExpressionContext expression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ExpressionContext _localctx = new ExpressionContext(_ctx, _parentState); + ExpressionContext _prevctx = _localctx; + int _startState = 174; + enterRecursionRule(_localctx, 174, RULE_expression, _p); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1060); + switch ( getInterpreter().adaptivePredict(_input,123,_ctx) ) { + case 1: + { + setState(1048); match(LPAREN); + setState(1049); type(); + setState(1050); match(RPAREN); + setState(1051); expression(17); + } + break; + case 2: + { + setState(1053); + _la = _input.LA(1); + if ( !(((((_la - 79)) & ~0x3f) == 0 && ((1L << (_la - 79)) & ((1L << (INC - 79)) | (1L << (DEC - 79)) | (1L << (ADD - 79)) | (1L << (SUB - 79)))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1054); expression(15); + } + break; + case 3: + { + setState(1055); + _la = _input.LA(1); + if ( !(_la==BANG || _la==TILDE) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1056); expression(14); + } + break; + case 4: + { + setState(1057); primary(); + } + break; + case 5: + { + setState(1058); match(NEW); + setState(1059); creator(); + } + break; + } + _ctx.stop = _input.LT(-1); + setState(1147); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,128,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(1145); + switch ( getInterpreter().adaptivePredict(_input,127,_ctx) ) { + case 1: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1062); + if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); + setState(1063); + _la = _input.LA(1); + if ( !(((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (MUL - 83)) | (1L << (DIV - 83)) | (1L << (MOD - 83)))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1064); expression(14); + } + break; + case 2: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1065); + if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); + setState(1066); + _la = _input.LA(1); + if ( !(_la==ADD || _la==SUB) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1067); expression(13); + } + break; + case 3: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1068); + if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); + setState(1076); + switch ( getInterpreter().adaptivePredict(_input,124,_ctx) ) { + case 1: + { + setState(1069); match(LT); + setState(1070); match(LT); + } + break; + case 2: + { + setState(1071); match(GT); + setState(1072); match(GT); + setState(1073); match(GT); + } + break; + case 3: + { + setState(1074); match(GT); + setState(1075); match(GT); + } + break; + } + setState(1078); expression(12); + } + break; + case 4: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1079); + if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); + setState(1080); + _la = _input.LA(1); + if ( !(((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (GT - 67)) | (1L << (LT - 67)) | (1L << (LE - 67)) | (1L << (GE - 67)))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1081); expression(11); + } + break; + case 5: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1082); + if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); + setState(1083); + _la = _input.LA(1); + if ( !(_la==EQUAL || _la==NOTEQUAL) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1084); expression(9); + } + break; + case 6: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1085); + if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); + setState(1086); match(BITAND); + setState(1087); expression(8); + } + break; + case 7: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1088); + if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); + setState(1089); match(CARET); + setState(1090); expression(7); + } + break; + case 8: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1091); + if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); + setState(1092); match(BITOR); + setState(1093); expression(6); + } + break; + case 9: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1094); + if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)"); + setState(1095); match(AND); + setState(1096); expression(5); + } + break; + case 10: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1097); + if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); + setState(1098); match(OR); + setState(1099); expression(4); + } + break; + case 11: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1100); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(1101); match(QUESTION); + setState(1102); expression(0); + setState(1103); match(COLON); + setState(1104); expression(3); + } + break; + case 12: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1106); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(1107); + _la = _input.LA(1); + if ( !(((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (ASSIGN - 66)) | (1L << (ADD_ASSIGN - 66)) | (1L << (SUB_ASSIGN - 66)) | (1L << (MUL_ASSIGN - 66)) | (1L << (DIV_ASSIGN - 66)) | (1L << (AND_ASSIGN - 66)) | (1L << (OR_ASSIGN - 66)) | (1L << (XOR_ASSIGN - 66)) | (1L << (MOD_ASSIGN - 66)) | (1L << (LSHIFT_ASSIGN - 66)) | (1L << (RSHIFT_ASSIGN - 66)) | (1L << (URSHIFT_ASSIGN - 66)))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1108); expression(2); + } + break; + case 13: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1109); + if (!(precpred(_ctx, 25))) throw new FailedPredicateException(this, "precpred(_ctx, 25)"); + setState(1110); match(DOT); + setState(1111); match(Identifier); + } + break; + case 14: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1112); + if (!(precpred(_ctx, 24))) throw new FailedPredicateException(this, "precpred(_ctx, 24)"); + setState(1113); match(DOT); + setState(1114); match(THIS); + } + break; + case 15: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1115); + if (!(precpred(_ctx, 23))) throw new FailedPredicateException(this, "precpred(_ctx, 23)"); + setState(1116); match(DOT); + setState(1117); match(NEW); + setState(1119); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1118); nonWildcardTypeArguments(); + } + } + + setState(1121); innerCreator(); + } + break; + case 16: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1122); + if (!(precpred(_ctx, 22))) throw new FailedPredicateException(this, "precpred(_ctx, 22)"); + setState(1123); match(DOT); + setState(1124); match(SUPER); + setState(1125); superSuffix(); + } + break; + case 17: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1126); + if (!(precpred(_ctx, 21))) throw new FailedPredicateException(this, "precpred(_ctx, 21)"); + setState(1127); match(DOT); + setState(1128); explicitGenericInvocation(); + } + break; + case 18: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1129); + if (!(precpred(_ctx, 20))) throw new FailedPredicateException(this, "precpred(_ctx, 20)"); + setState(1130); match(LBRACK); + setState(1131); expression(0); + setState(1132); match(RBRACK); + } + break; + case 19: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1134); + if (!(precpred(_ctx, 19))) throw new FailedPredicateException(this, "precpred(_ctx, 19)"); + setState(1135); match(LPAREN); + setState(1137); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(1136); expressionList(); + } + } + + setState(1139); match(RPAREN); + } + break; + case 20: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1140); + if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)"); + setState(1141); + _la = _input.LA(1); + if ( !(_la==INC || _la==DEC) ) { + _errHandler.recoverInline(this); + } + consume(); + } + break; + case 21: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1142); + if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); + setState(1143); match(INSTANCEOF); + setState(1144); type(); + } + break; + } + } + } + setState(1149); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,128,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class PrimaryContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public ExplicitGenericInvocationSuffixContext explicitGenericInvocationSuffix() { + return getRuleContext(ExplicitGenericInvocationSuffixContext.class,0); + } + public LiteralContext literal() { + return getRuleContext(LiteralContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public PrimaryContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_primary; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterPrimary(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitPrimary(this); + } + } + + public final PrimaryContext primary() throws RecognitionException { + PrimaryContext _localctx = new PrimaryContext(_ctx, getState()); + enterRule(_localctx, 176, RULE_primary); + try { + setState(1171); + switch ( getInterpreter().adaptivePredict(_input,130,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1150); match(LPAREN); + setState(1151); expression(0); + setState(1152); match(RPAREN); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1154); match(THIS); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1155); match(SUPER); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(1156); literal(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(1157); match(Identifier); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(1158); type(); + setState(1159); match(DOT); + setState(1160); match(CLASS); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(1162); match(VOID); + setState(1163); match(DOT); + setState(1164); match(CLASS); + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(1165); nonWildcardTypeArguments(); + setState(1169); + switch (_input.LA(1)) { + case SUPER: + case Identifier: + { + setState(1166); explicitGenericInvocationSuffix(); + } + break; + case THIS: + { + setState(1167); match(THIS); + setState(1168); arguments(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CreatorContext extends ParserRuleContext { + public ArrayCreatorRestContext arrayCreatorRest() { + return getRuleContext(ArrayCreatorRestContext.class,0); + } + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public ClassCreatorRestContext classCreatorRest() { + return getRuleContext(ClassCreatorRestContext.class,0); + } + public CreatedNameContext createdName() { + return getRuleContext(CreatedNameContext.class,0); + } + public CreatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_creator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterCreator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitCreator(this); + } + } + + public final CreatorContext creator() throws RecognitionException { + CreatorContext _localctx = new CreatorContext(_ctx, getState()); + enterRule(_localctx, 178, RULE_creator); + try { + setState(1182); + switch (_input.LA(1)) { + case LT: + enterOuterAlt(_localctx, 1); + { + setState(1173); nonWildcardTypeArguments(); + setState(1174); createdName(); + setState(1175); classCreatorRest(); + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + enterOuterAlt(_localctx, 2); + { + setState(1177); createdName(); + setState(1180); + switch (_input.LA(1)) { + case LBRACK: + { + setState(1178); arrayCreatorRest(); + } + break; + case LPAREN: + { + setState(1179); classCreatorRest(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CreatedNameContext extends ParserRuleContext { + public List Identifier() { return getTokens(Java8Parser.Identifier); } + public TerminalNode Identifier(int i) { + return getToken(Java8Parser.Identifier, i); + } + public List typeArgumentsOrDiamond() { + return getRuleContexts(TypeArgumentsOrDiamondContext.class); + } + public PrimitiveTypeContext primitiveType() { + return getRuleContext(PrimitiveTypeContext.class,0); + } + public TypeArgumentsOrDiamondContext typeArgumentsOrDiamond(int i) { + return getRuleContext(TypeArgumentsOrDiamondContext.class,i); + } + public CreatedNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_createdName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterCreatedName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitCreatedName(this); + } + } + + public final CreatedNameContext createdName() throws RecognitionException { + CreatedNameContext _localctx = new CreatedNameContext(_ctx, getState()); + enterRule(_localctx, 180, RULE_createdName); + int _la; + try { + setState(1199); + switch (_input.LA(1)) { + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(1184); match(Identifier); + setState(1186); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1185); typeArgumentsOrDiamond(); + } + } + + setState(1195); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==DOT) { + { + { + setState(1188); match(DOT); + setState(1189); match(Identifier); + setState(1191); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1190); typeArgumentsOrDiamond(); + } + } + + } + } + setState(1197); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + enterOuterAlt(_localctx, 2); + { + setState(1198); primitiveType(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InnerCreatorContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public ClassCreatorRestContext classCreatorRest() { + return getRuleContext(ClassCreatorRestContext.class,0); + } + public NonWildcardTypeArgumentsOrDiamondContext nonWildcardTypeArgumentsOrDiamond() { + return getRuleContext(NonWildcardTypeArgumentsOrDiamondContext.class,0); + } + public InnerCreatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_innerCreator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterInnerCreator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitInnerCreator(this); + } + } + + public final InnerCreatorContext innerCreator() throws RecognitionException { + InnerCreatorContext _localctx = new InnerCreatorContext(_ctx, getState()); + enterRule(_localctx, 182, RULE_innerCreator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1201); match(Identifier); + setState(1203); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1202); nonWildcardTypeArgumentsOrDiamond(); + } + } + + setState(1205); classCreatorRest(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrayCreatorRestContext extends ParserRuleContext { + public ArrayInitializerContext arrayInitializer() { + return getRuleContext(ArrayInitializerContext.class,0); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ArrayCreatorRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayCreatorRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterArrayCreatorRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitArrayCreatorRest(this); + } + } + + public final ArrayCreatorRestContext arrayCreatorRest() throws RecognitionException { + ArrayCreatorRestContext _localctx = new ArrayCreatorRestContext(_ctx, getState()); + enterRule(_localctx, 184, RULE_arrayCreatorRest); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1207); match(LBRACK); + setState(1235); + switch (_input.LA(1)) { + case RBRACK: + { + setState(1208); match(RBRACK); + setState(1213); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(1209); match(LBRACK); + setState(1210); match(RBRACK); + } + } + setState(1215); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1216); arrayInitializer(); + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case NEW: + case SHORT: + case SUPER: + case THIS: + case VOID: + case IntegerLiteral: + case FloatingPointLiteral: + case BooleanLiteral: + case CharacterLiteral: + case StringLiteral: + case NullLiteral: + case LPAREN: + case LT: + case BANG: + case TILDE: + case INC: + case DEC: + case ADD: + case SUB: + case Identifier: + { + setState(1217); expression(0); + setState(1218); match(RBRACK); + setState(1225); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,139,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1219); match(LBRACK); + setState(1220); expression(0); + setState(1221); match(RBRACK); + } + } + } + setState(1227); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,139,_ctx); + } + setState(1232); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,140,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1228); match(LBRACK); + setState(1229); match(RBRACK); + } + } + } + setState(1234); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,140,_ctx); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassCreatorRestContext extends ParserRuleContext { + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public ClassCreatorRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classCreatorRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterClassCreatorRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitClassCreatorRest(this); + } + } + + public final ClassCreatorRestContext classCreatorRest() throws RecognitionException { + ClassCreatorRestContext _localctx = new ClassCreatorRestContext(_ctx, getState()); + enterRule(_localctx, 186, RULE_classCreatorRest); + try { + enterOuterAlt(_localctx, 1); + { + setState(1237); arguments(); + setState(1239); + switch ( getInterpreter().adaptivePredict(_input,142,_ctx) ) { + case 1: + { + setState(1238); classBody(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExplicitGenericInvocationContext extends ParserRuleContext { + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public ExplicitGenericInvocationSuffixContext explicitGenericInvocationSuffix() { + return getRuleContext(ExplicitGenericInvocationSuffixContext.class,0); + } + public ExplicitGenericInvocationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_explicitGenericInvocation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterExplicitGenericInvocation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitExplicitGenericInvocation(this); + } + } + + public final ExplicitGenericInvocationContext explicitGenericInvocation() throws RecognitionException { + ExplicitGenericInvocationContext _localctx = new ExplicitGenericInvocationContext(_ctx, getState()); + enterRule(_localctx, 188, RULE_explicitGenericInvocation); + try { + enterOuterAlt(_localctx, 1); + { + setState(1241); nonWildcardTypeArguments(); + setState(1242); explicitGenericInvocationSuffix(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NonWildcardTypeArgumentsContext extends ParserRuleContext { + public TypeListContext typeList() { + return getRuleContext(TypeListContext.class,0); + } + public NonWildcardTypeArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_nonWildcardTypeArguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterNonWildcardTypeArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitNonWildcardTypeArguments(this); + } + } + + public final NonWildcardTypeArgumentsContext nonWildcardTypeArguments() throws RecognitionException { + NonWildcardTypeArgumentsContext _localctx = new NonWildcardTypeArgumentsContext(_ctx, getState()); + enterRule(_localctx, 190, RULE_nonWildcardTypeArguments); + try { + enterOuterAlt(_localctx, 1); + { + setState(1244); match(LT); + setState(1245); typeList(); + setState(1246); match(GT); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentsOrDiamondContext extends ParserRuleContext { + public TypeArgumentsContext typeArguments() { + return getRuleContext(TypeArgumentsContext.class,0); + } + public TypeArgumentsOrDiamondContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArgumentsOrDiamond; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeArgumentsOrDiamond(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeArgumentsOrDiamond(this); + } + } + + public final TypeArgumentsOrDiamondContext typeArgumentsOrDiamond() throws RecognitionException { + TypeArgumentsOrDiamondContext _localctx = new TypeArgumentsOrDiamondContext(_ctx, getState()); + enterRule(_localctx, 192, RULE_typeArgumentsOrDiamond); + try { + setState(1251); + switch ( getInterpreter().adaptivePredict(_input,143,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1248); match(LT); + setState(1249); match(GT); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1250); typeArguments(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NonWildcardTypeArgumentsOrDiamondContext extends ParserRuleContext { + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public NonWildcardTypeArgumentsOrDiamondContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_nonWildcardTypeArgumentsOrDiamond; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterNonWildcardTypeArgumentsOrDiamond(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitNonWildcardTypeArgumentsOrDiamond(this); + } + } + + public final NonWildcardTypeArgumentsOrDiamondContext nonWildcardTypeArgumentsOrDiamond() throws RecognitionException { + NonWildcardTypeArgumentsOrDiamondContext _localctx = new NonWildcardTypeArgumentsOrDiamondContext(_ctx, getState()); + enterRule(_localctx, 194, RULE_nonWildcardTypeArgumentsOrDiamond); + try { + setState(1256); + switch ( getInterpreter().adaptivePredict(_input,144,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1253); match(LT); + setState(1254); match(GT); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1255); nonWildcardTypeArguments(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SuperSuffixContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public SuperSuffixContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_superSuffix; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterSuperSuffix(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitSuperSuffix(this); + } + } + + public final SuperSuffixContext superSuffix() throws RecognitionException { + SuperSuffixContext _localctx = new SuperSuffixContext(_ctx, getState()); + enterRule(_localctx, 196, RULE_superSuffix); + try { + setState(1264); + switch (_input.LA(1)) { + case LPAREN: + enterOuterAlt(_localctx, 1); + { + setState(1258); arguments(); + } + break; + case DOT: + enterOuterAlt(_localctx, 2); + { + setState(1259); match(DOT); + setState(1260); match(Identifier); + setState(1262); + switch ( getInterpreter().adaptivePredict(_input,145,_ctx) ) { + case 1: + { + setState(1261); arguments(); + } + break; + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExplicitGenericInvocationSuffixContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } + public SuperSuffixContext superSuffix() { + return getRuleContext(SuperSuffixContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public ExplicitGenericInvocationSuffixContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_explicitGenericInvocationSuffix; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterExplicitGenericInvocationSuffix(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitExplicitGenericInvocationSuffix(this); + } + } + + public final ExplicitGenericInvocationSuffixContext explicitGenericInvocationSuffix() throws RecognitionException { + ExplicitGenericInvocationSuffixContext _localctx = new ExplicitGenericInvocationSuffixContext(_ctx, getState()); + enterRule(_localctx, 198, RULE_explicitGenericInvocationSuffix); + try { + setState(1270); + switch (_input.LA(1)) { + case SUPER: + enterOuterAlt(_localctx, 1); + { + setState(1266); match(SUPER); + setState(1267); superSuffix(); + } + break; + case Identifier: + enterOuterAlt(_localctx, 2); + { + setState(1268); match(Identifier); + setState(1269); arguments(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArgumentsContext extends ParserRuleContext { + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public ArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitArguments(this); + } + } + + public final ArgumentsContext arguments() throws RecognitionException { + ArgumentsContext _localctx = new ArgumentsContext(_ctx, getState()); + enterRule(_localctx, 200, RULE_arguments); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1272); match(LPAREN); + setState(1274); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(1273); expressionList(); + } + } + + setState(1276); match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 87: return expression_sempred((ExpressionContext)_localctx, predIndex); + } + return true; + } + private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 0: return precpred(_ctx, 13); + case 1: return precpred(_ctx, 12); + case 2: return precpred(_ctx, 11); + case 3: return precpred(_ctx, 10); + case 4: return precpred(_ctx, 8); + case 5: return precpred(_ctx, 7); + case 6: return precpred(_ctx, 6); + case 7: return precpred(_ctx, 5); + case 8: return precpred(_ctx, 4); + case 9: return precpred(_ctx, 3); + case 10: return precpred(_ctx, 2); + case 11: return precpred(_ctx, 1); + case 12: return precpred(_ctx, 25); + case 13: return precpred(_ctx, 24); + case 14: return precpred(_ctx, 23); + case 15: return precpred(_ctx, 22); + case 16: return precpred(_ctx, 21); + case 17: return precpred(_ctx, 20); + case 18: return precpred(_ctx, 19); + case 19: return precpred(_ctx, 16); + case 20: return precpred(_ctx, 9); + } + return true; + } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3k\u0501\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\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\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ + "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ + "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ + "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\3\2\5\2\u00ce\n\2\3\2\7\2\u00d1"+ + "\n\2\f\2\16\2\u00d4\13\2\3\2\7\2\u00d7\n\2\f\2\16\2\u00da\13\2\3\2\3\2"+ + "\3\3\7\3\u00df\n\3\f\3\16\3\u00e2\13\3\3\3\3\3\3\3\3\3\3\4\3\4\5\4\u00ea"+ + "\n\4\3\4\3\4\3\4\5\4\u00ef\n\4\3\4\3\4\3\5\7\5\u00f4\n\5\f\5\16\5\u00f7"+ + "\13\5\3\5\3\5\7\5\u00fb\n\5\f\5\16\5\u00fe\13\5\3\5\3\5\7\5\u0102\n\5"+ + "\f\5\16\5\u0105\13\5\3\5\3\5\7\5\u0109\n\5\f\5\16\5\u010c\13\5\3\5\3\5"+ + "\5\5\u0110\n\5\3\6\3\6\5\6\u0114\n\6\3\7\3\7\5\7\u0118\n\7\3\b\3\b\5\b"+ + "\u011c\n\b\3\t\3\t\3\t\5\t\u0121\n\t\3\t\3\t\5\t\u0125\n\t\3\t\3\t\5\t"+ + "\u0129\n\t\3\t\3\t\3\n\3\n\3\n\3\n\7\n\u0131\n\n\f\n\16\n\u0134\13\n\3"+ + "\n\3\n\3\13\3\13\3\13\5\13\u013b\n\13\3\f\3\f\3\f\7\f\u0140\n\f\f\f\16"+ + "\f\u0143\13\f\3\r\3\r\3\r\3\r\5\r\u0149\n\r\3\r\3\r\5\r\u014d\n\r\3\r"+ + "\5\r\u0150\n\r\3\r\5\r\u0153\n\r\3\r\3\r\3\16\3\16\3\16\7\16\u015a\n\16"+ + "\f\16\16\16\u015d\13\16\3\17\7\17\u0160\n\17\f\17\16\17\u0163\13\17\3"+ + "\17\3\17\5\17\u0167\n\17\3\17\5\17\u016a\n\17\3\20\3\20\7\20\u016e\n\20"+ + "\f\20\16\20\u0171\13\20\3\21\3\21\3\21\5\21\u0176\n\21\3\21\3\21\5\21"+ + "\u017a\n\21\3\21\3\21\3\22\3\22\3\22\7\22\u0181\n\22\f\22\16\22\u0184"+ + "\13\22\3\23\3\23\7\23\u0188\n\23\f\23\16\23\u018b\13\23\3\23\3\23\3\24"+ + "\3\24\7\24\u0191\n\24\f\24\16\24\u0194\13\24\3\24\3\24\3\25\3\25\5\25"+ + "\u019a\n\25\3\25\3\25\7\25\u019e\n\25\f\25\16\25\u01a1\13\25\3\25\5\25"+ + "\u01a4\n\25\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\5\26\u01af\n"+ + "\26\3\27\3\27\5\27\u01b3\n\27\3\27\3\27\3\27\3\27\7\27\u01b9\n\27\f\27"+ + "\16\27\u01bc\13\27\3\27\3\27\5\27\u01c0\n\27\3\27\3\27\5\27\u01c4\n\27"+ + "\3\30\3\30\3\30\3\31\3\31\3\31\3\31\5\31\u01cd\n\31\3\31\3\31\3\32\3\32"+ + "\3\32\3\33\3\33\3\33\3\33\3\34\7\34\u01d9\n\34\f\34\16\34\u01dc\13\34"+ + "\3\34\3\34\5\34\u01e0\n\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35\5\35\u01e9"+ + "\n\35\3\36\3\36\3\36\3\36\7\36\u01ef\n\36\f\36\16\36\u01f2\13\36\3\36"+ + "\3\36\3\37\3\37\3\37\7\37\u01f9\n\37\f\37\16\37\u01fc\13\37\3\37\3\37"+ + "\3\37\3 \3 \5 \u0203\n \3 \3 \3 \3 \7 \u0209\n \f \16 \u020c\13 \3 \3"+ + " \5 \u0210\n \3 \3 \3!\3!\3!\3\"\3\"\3\"\7\"\u021a\n\"\f\"\16\"\u021d"+ + "\13\"\3#\3#\3#\5#\u0222\n#\3$\3$\3$\7$\u0227\n$\f$\16$\u022a\13$\3%\3"+ + "%\5%\u022e\n%\3&\3&\3&\3&\7&\u0234\n&\f&\16&\u0237\13&\3&\5&\u023a\n&"+ + "\5&\u023c\n&\3&\3&\3\'\3\'\3(\3(\3(\7(\u0245\n(\f(\16(\u0248\13(\3(\3"+ + "(\3(\7(\u024d\n(\f(\16(\u0250\13(\5(\u0252\n(\3)\3)\5)\u0256\n)\3)\3)"+ + "\3)\5)\u025b\n)\7)\u025d\n)\f)\16)\u0260\13)\3*\3*\3+\3+\3+\3+\7+\u0268"+ + "\n+\f+\16+\u026b\13+\3+\3+\3,\3,\3,\3,\5,\u0273\n,\5,\u0275\n,\3-\3-\3"+ + "-\7-\u027a\n-\f-\16-\u027d\13-\3.\3.\5.\u0281\n.\3.\3.\3/\3/\3/\7/\u0288"+ + "\n/\f/\16/\u028b\13/\3/\3/\5/\u028f\n/\3/\5/\u0292\n/\3\60\7\60\u0295"+ + "\n\60\f\60\16\60\u0298\13\60\3\60\3\60\3\60\3\61\7\61\u029e\n\61\f\61"+ + "\16\61\u02a1\13\61\3\61\3\61\3\61\3\61\3\62\3\62\3\63\3\63\3\64\3\64\3"+ + "\64\7\64\u02ae\n\64\f\64\16\64\u02b1\13\64\3\65\3\65\3\66\3\66\3\66\3"+ + "\66\3\66\5\66\u02ba\n\66\3\66\5\66\u02bd\n\66\3\67\3\67\38\38\38\78\u02c4"+ + "\n8\f8\168\u02c7\138\39\39\39\39\3:\3:\3:\5:\u02d0\n:\3;\3;\3;\3;\7;\u02d6"+ + "\n;\f;\16;\u02d9\13;\5;\u02db\n;\3;\5;\u02de\n;\3;\3;\3<\3<\3<\3<\3<\3"+ + "=\3=\7=\u02e9\n=\f=\16=\u02ec\13=\3=\3=\3>\7>\u02f1\n>\f>\16>\u02f4\13"+ + ">\3>\3>\5>\u02f8\n>\3?\3?\3?\3?\3?\3?\5?\u0300\n?\3?\3?\5?\u0304\n?\3"+ + "?\3?\5?\u0308\n?\3?\3?\5?\u030c\n?\5?\u030e\n?\3@\3@\5@\u0312\n@\3A\3"+ + "A\3A\3A\5A\u0318\nA\3B\3B\3C\3C\3C\3D\3D\7D\u0321\nD\fD\16D\u0324\13D"+ + "\3D\3D\3E\3E\3E\5E\u032b\nE\3F\3F\3F\3G\7G\u0331\nG\fG\16G\u0334\13G\3"+ + "G\3G\3G\3H\3H\3H\3H\3H\5H\u033e\nH\3H\3H\3H\3H\3H\3H\3H\5H\u0347\nH\3"+ + "H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\6H\u035c\nH\r"+ + "H\16H\u035d\3H\5H\u0361\nH\3H\5H\u0364\nH\3H\3H\3H\3H\7H\u036a\nH\fH\16"+ + "H\u036d\13H\3H\5H\u0370\nH\3H\3H\3H\3H\7H\u0376\nH\fH\16H\u0379\13H\3"+ + "H\7H\u037c\nH\fH\16H\u037f\13H\3H\3H\3H\3H\3H\3H\3H\3H\5H\u0389\nH\3H"+ + "\3H\3H\3H\3H\3H\3H\5H\u0392\nH\3H\3H\3H\5H\u0397\nH\3H\3H\3H\3H\3H\3H"+ + "\3H\3H\5H\u03a1\nH\3I\3I\3I\7I\u03a6\nI\fI\16I\u03a9\13I\3I\3I\3I\3I\3"+ + "I\3J\3J\3J\7J\u03b3\nJ\fJ\16J\u03b6\13J\3K\3K\3K\3L\3L\3L\5L\u03be\nL"+ + "\3L\3L\3M\3M\3M\7M\u03c5\nM\fM\16M\u03c8\13M\3N\7N\u03cb\nN\fN\16N\u03ce"+ + "\13N\3N\3N\3N\3N\3N\3O\6O\u03d6\nO\rO\16O\u03d7\3O\6O\u03db\nO\rO\16O"+ + "\u03dc\3P\3P\3P\3P\3P\3P\3P\3P\3P\3P\5P\u03e9\nP\3Q\3Q\5Q\u03ed\nQ\3Q"+ + "\3Q\5Q\u03f1\nQ\3Q\3Q\5Q\u03f5\nQ\5Q\u03f7\nQ\3R\3R\5R\u03fb\nR\3S\7S"+ + "\u03fe\nS\fS\16S\u0401\13S\3S\3S\3S\3S\3S\3T\3T\3U\3U\3U\3U\3V\3V\3V\7"+ + "V\u0411\nV\fV\16V\u0414\13V\3W\3W\3X\3X\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y"+ + "\3Y\3Y\3Y\5Y\u0427\nY\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\5Y\u0437"+ + "\nY\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y"+ + "\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\5Y\u0462\nY"+ + "\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\5Y\u0474\nY\3Y\3Y\3Y"+ + "\3Y\3Y\3Y\7Y\u047c\nY\fY\16Y\u047f\13Y\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3"+ + "Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\5Z\u0494\nZ\5Z\u0496\nZ\3[\3[\3[\3[\3[\3[\3"+ + "[\5[\u049f\n[\5[\u04a1\n[\3\\\3\\\5\\\u04a5\n\\\3\\\3\\\3\\\5\\\u04aa"+ + "\n\\\7\\\u04ac\n\\\f\\\16\\\u04af\13\\\3\\\5\\\u04b2\n\\\3]\3]\5]\u04b6"+ + "\n]\3]\3]\3^\3^\3^\3^\7^\u04be\n^\f^\16^\u04c1\13^\3^\3^\3^\3^\3^\3^\3"+ + "^\7^\u04ca\n^\f^\16^\u04cd\13^\3^\3^\7^\u04d1\n^\f^\16^\u04d4\13^\5^\u04d6"+ + "\n^\3_\3_\5_\u04da\n_\3`\3`\3`\3a\3a\3a\3a\3b\3b\3b\5b\u04e6\nb\3c\3c"+ + "\3c\5c\u04eb\nc\3d\3d\3d\3d\5d\u04f1\nd\5d\u04f3\nd\3e\3e\3e\3e\5e\u04f9"+ + "\ne\3f\3f\5f\u04fd\nf\3f\3f\3f\2\3\u00b0g\2\4\6\b\n\f\16\20\22\24\26\30"+ + "\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~\u0080"+ + "\u0082\u0084\u0086\u0088\u008a\u008c\u008e\u0090\u0092\u0094\u0096\u0098"+ + "\u009a\u009c\u009e\u00a0\u00a2\u00a4\u00a6\u00a8\u00aa\u00ac\u00ae\u00b0"+ + "\u00b2\u00b4\u00b6\u00b8\u00ba\u00bc\u00be\u00c0\u00c2\u00c4\u00c6\u00c8"+ + "\u00ca\2\17\6\2 ,,\60\60\63\63\6\2\3\3\24\24#%()\n\2\5\5\7\7\n\n\20\20"+ + "\26\26\35\35\37\37\'\'\4\2\23\23**\3\2\65:\3\2QT\3\2GH\4\2UVZZ\3\2ST\4"+ + "\2EFLM\4\2KKNN\4\2DD[e\3\2QR\u0573\2\u00cd\3\2\2\2\4\u00e0\3\2\2\2\6\u00e7"+ + "\3\2\2\2\b\u010f\3\2\2\2\n\u0113\3\2\2\2\f\u0117\3\2\2\2\16\u011b\3\2"+ + "\2\2\20\u011d\3\2\2\2\22\u012c\3\2\2\2\24\u0137\3\2\2\2\26\u013c\3\2\2"+ + "\2\30\u0144\3\2\2\2\32\u0156\3\2\2\2\34\u0161\3\2\2\2\36\u016b\3\2\2\2"+ + " \u0172\3\2\2\2\"\u017d\3\2\2\2$\u0185\3\2\2\2&\u018e\3\2\2\2(\u01a3\3"+ + "\2\2\2*\u01ae\3\2\2\2,\u01b2\3\2\2\2.\u01c5\3\2\2\2\60\u01c8\3\2\2\2\62"+ + "\u01d0\3\2\2\2\64\u01d3\3\2\2\2\66\u01df\3\2\2\28\u01e8\3\2\2\2:\u01ea"+ + "\3\2\2\2<\u01f5\3\2\2\2>\u0202\3\2\2\2@\u0213\3\2\2\2B\u0216\3\2\2\2D"+ + "\u021e\3\2\2\2F\u0223\3\2\2\2H\u022d\3\2\2\2J\u022f\3\2\2\2L\u023f\3\2"+ + "\2\2N\u0251\3\2\2\2P\u0253\3\2\2\2R\u0261\3\2\2\2T\u0263\3\2\2\2V\u0274"+ + "\3\2\2\2X\u0276\3\2\2\2Z\u027e\3\2\2\2\\\u0291\3\2\2\2^\u0296\3\2\2\2"+ + "`\u029f\3\2\2\2b\u02a6\3\2\2\2d\u02a8\3\2\2\2f\u02aa\3\2\2\2h\u02b2\3"+ + "\2\2\2j\u02b4\3\2\2\2l\u02be\3\2\2\2n\u02c0\3\2\2\2p\u02c8\3\2\2\2r\u02cf"+ + "\3\2\2\2t\u02d1\3\2\2\2v\u02e1\3\2\2\2x\u02e6\3\2\2\2z\u02f7\3\2\2\2|"+ + "\u030d\3\2\2\2~\u0311\3\2\2\2\u0080\u0313\3\2\2\2\u0082\u0319\3\2\2\2"+ + "\u0084\u031b\3\2\2\2\u0086\u031e\3\2\2\2\u0088\u032a\3\2\2\2\u008a\u032c"+ + "\3\2\2\2\u008c\u0332\3\2\2\2\u008e\u03a0\3\2\2\2\u0090\u03a2\3\2\2\2\u0092"+ + "\u03af\3\2\2\2\u0094\u03b7\3\2\2\2\u0096\u03ba\3\2\2\2\u0098\u03c1\3\2"+ + "\2\2\u009a\u03cc\3\2\2\2\u009c\u03d5\3\2\2\2\u009e\u03e8\3\2\2\2\u00a0"+ + "\u03f6\3\2\2\2\u00a2\u03fa\3\2\2\2\u00a4\u03ff\3\2\2\2\u00a6\u0407\3\2"+ + "\2\2\u00a8\u0409\3\2\2\2\u00aa\u040d\3\2\2\2\u00ac\u0415\3\2\2\2\u00ae"+ + "\u0417\3\2\2\2\u00b0\u0426\3\2\2\2\u00b2\u0495\3\2\2\2\u00b4\u04a0\3\2"+ + "\2\2\u00b6\u04b1\3\2\2\2\u00b8\u04b3\3\2\2\2\u00ba\u04b9\3\2\2\2\u00bc"+ + "\u04d7\3\2\2\2\u00be\u04db\3\2\2\2\u00c0\u04de\3\2\2\2\u00c2\u04e5\3\2"+ + "\2\2\u00c4\u04ea\3\2\2\2\u00c6\u04f2\3\2\2\2\u00c8\u04f8\3\2\2\2\u00ca"+ + "\u04fa\3\2\2\2\u00cc\u00ce\5\4\3\2\u00cd\u00cc\3\2\2\2\u00cd\u00ce\3\2"+ + "\2\2\u00ce\u00d2\3\2\2\2\u00cf\u00d1\5\6\4\2\u00d0\u00cf\3\2\2\2\u00d1"+ + "\u00d4\3\2\2\2\u00d2\u00d0\3\2\2\2\u00d2\u00d3\3\2\2\2\u00d3\u00d8\3\2"+ + "\2\2\u00d4\u00d2\3\2\2\2\u00d5\u00d7\5\b\5\2\u00d6\u00d5\3\2\2\2\u00d7"+ + "\u00da\3\2\2\2\u00d8\u00d6\3\2\2\2\u00d8\u00d9\3\2\2\2\u00d9\u00db\3\2"+ + "\2\2\u00da\u00d8\3\2\2\2\u00db\u00dc\7\2\2\3\u00dc\3\3\2\2\2\u00dd\u00df"+ + "\5j\66\2\u00de\u00dd\3\2\2\2\u00df\u00e2\3\2\2\2\u00e0\u00de\3\2\2\2\u00e0"+ + "\u00e1\3\2\2\2\u00e1\u00e3\3\2\2\2\u00e2\u00e0\3\2\2\2\u00e3\u00e4\7\""+ + "\2\2\u00e4\u00e5\5f\64\2\u00e5\u00e6\7A\2\2\u00e6\5\3\2\2\2\u00e7\u00e9"+ + "\7\33\2\2\u00e8\u00ea\7(\2\2\u00e9\u00e8\3\2\2\2\u00e9\u00ea\3\2\2\2\u00ea"+ + "\u00eb\3\2\2\2\u00eb\u00ee\5f\64\2\u00ec\u00ed\7C\2\2\u00ed\u00ef\7U\2"+ + "\2\u00ee\u00ec\3\2\2\2\u00ee\u00ef\3\2\2\2\u00ef\u00f0\3\2\2\2\u00f0\u00f1"+ + "\7A\2\2\u00f1\7\3\2\2\2\u00f2\u00f4\5\f\7\2\u00f3\u00f2\3\2\2\2\u00f4"+ + "\u00f7\3\2\2\2\u00f5\u00f3\3\2\2\2\u00f5\u00f6\3\2\2\2\u00f6\u00f8\3\2"+ + "\2\2\u00f7\u00f5\3\2\2\2\u00f8\u0110\5\20\t\2\u00f9\u00fb\5\f\7\2\u00fa"+ + "\u00f9\3\2\2\2\u00fb\u00fe\3\2\2\2\u00fc\u00fa\3\2\2\2\u00fc\u00fd\3\2"+ + "\2\2\u00fd\u00ff\3\2\2\2\u00fe\u00fc\3\2\2\2\u00ff\u0110\5\30\r\2\u0100"+ + "\u0102\5\f\7\2\u0101\u0100\3\2\2\2\u0102\u0105\3\2\2\2\u0103\u0101\3\2"+ + "\2\2\u0103\u0104\3\2\2\2\u0104\u0106\3\2\2\2\u0105\u0103\3\2\2\2\u0106"+ + "\u0110\5 \21\2\u0107\u0109\5\f\7\2\u0108\u0107\3\2\2\2\u0109\u010c\3\2"+ + "\2\2\u010a\u0108\3\2\2\2\u010a\u010b\3\2\2\2\u010b\u010d\3\2\2\2\u010c"+ + "\u010a\3\2\2\2\u010d\u0110\5v<\2\u010e\u0110\7A\2\2\u010f\u00f5\3\2\2"+ + "\2\u010f\u00fc\3\2\2\2\u010f\u0103\3\2\2\2\u010f\u010a\3\2\2\2\u010f\u010e"+ + "\3\2\2\2\u0110\t\3\2\2\2\u0111\u0114\5\f\7\2\u0112\u0114\t\2\2\2\u0113"+ + "\u0111\3\2\2\2\u0113\u0112\3\2\2\2\u0114\13\3\2\2\2\u0115\u0118\5j\66"+ + "\2\u0116\u0118\t\3\2\2\u0117\u0115\3\2\2\2\u0117\u0116\3\2\2\2\u0118\r"+ + "\3\2\2\2\u0119\u011c\7\24\2\2\u011a\u011c\5j\66\2\u011b\u0119\3\2\2\2"+ + "\u011b\u011a\3\2\2\2\u011c\17\3\2\2\2\u011d\u011e\7\13\2\2\u011e\u0120"+ + "\7f\2\2\u011f\u0121\5\22\n\2\u0120\u011f\3\2\2\2\u0120\u0121\3\2\2\2\u0121"+ + "\u0124\3\2\2\2\u0122\u0123\7\23\2\2\u0123\u0125\5N(\2\u0124\u0122\3\2"+ + "\2\2\u0124\u0125\3\2\2\2\u0125\u0128\3\2\2\2\u0126\u0127\7\32\2\2\u0127"+ + "\u0129\5\"\22\2\u0128\u0126\3\2\2\2\u0128\u0129\3\2\2\2\u0129\u012a\3"+ + "\2\2\2\u012a\u012b\5$\23\2\u012b\21\3\2\2\2\u012c\u012d\7F\2\2\u012d\u0132"+ + "\5\24\13\2\u012e\u012f\7B\2\2\u012f\u0131\5\24\13\2\u0130\u012e\3\2\2"+ + "\2\u0131\u0134\3\2\2\2\u0132\u0130\3\2\2\2\u0132\u0133\3\2\2\2\u0133\u0135"+ + "\3\2\2\2\u0134\u0132\3\2\2\2\u0135\u0136\7E\2\2\u0136\23\3\2\2\2\u0137"+ + "\u013a\7f\2\2\u0138\u0139\7\23\2\2\u0139\u013b\5\26\f\2\u013a\u0138\3"+ + "\2\2\2\u013a\u013b\3\2\2\2\u013b\25\3\2\2\2\u013c\u0141\5N(\2\u013d\u013e"+ + "\7W\2\2\u013e\u0140\5N(\2\u013f\u013d\3\2\2\2\u0140\u0143\3\2\2\2\u0141"+ + "\u013f\3\2\2\2\u0141\u0142\3\2\2\2\u0142\27\3\2\2\2\u0143\u0141\3\2\2"+ + "\2\u0144\u0145\7\22\2\2\u0145\u0148\7f\2\2\u0146\u0147\7\32\2\2\u0147"+ + "\u0149\5\"\22\2\u0148\u0146\3\2\2\2\u0148\u0149\3\2\2\2\u0149\u014a\3"+ + "\2\2\2\u014a\u014c\7=\2\2\u014b\u014d\5\32\16\2\u014c\u014b\3\2\2\2\u014c"+ + "\u014d\3\2\2\2\u014d\u014f\3\2\2\2\u014e\u0150\7B\2\2\u014f\u014e\3\2"+ + "\2\2\u014f\u0150\3\2\2\2\u0150\u0152\3\2\2\2\u0151\u0153\5\36\20\2\u0152"+ + "\u0151\3\2\2\2\u0152\u0153\3\2\2\2\u0153\u0154\3\2\2\2\u0154\u0155\7>"+ + "\2\2\u0155\31\3\2\2\2\u0156\u015b\5\34\17\2\u0157\u0158\7B\2\2\u0158\u015a"+ + "\5\34\17\2\u0159\u0157\3\2\2\2\u015a\u015d\3\2\2\2\u015b\u0159\3\2\2\2"+ + "\u015b\u015c\3\2\2\2\u015c\33\3\2\2\2\u015d\u015b\3\2\2\2\u015e\u0160"+ + "\5j\66\2\u015f\u015e\3\2\2\2\u0160\u0163\3\2\2\2\u0161\u015f\3\2\2\2\u0161"+ + "\u0162\3\2\2\2\u0162\u0164\3\2\2\2\u0163\u0161\3\2\2\2\u0164\u0166\7f"+ + "\2\2\u0165\u0167\5\u00caf\2\u0166\u0165\3\2\2\2\u0166\u0167\3\2\2\2\u0167"+ + "\u0169\3\2\2\2\u0168\u016a\5$\23\2\u0169\u0168\3\2\2\2\u0169\u016a\3\2"+ + "\2\2\u016a\35\3\2\2\2\u016b\u016f\7A\2\2\u016c\u016e\5(\25\2\u016d\u016c"+ + "\3\2\2\2\u016e\u0171\3\2\2\2\u016f\u016d\3\2\2\2\u016f\u0170\3\2\2\2\u0170"+ + "\37\3\2\2\2\u0171\u016f\3\2\2\2\u0172\u0173\7\36\2\2\u0173\u0175\7f\2"+ + "\2\u0174\u0176\5\22\n\2\u0175\u0174\3\2\2\2\u0175\u0176\3\2\2\2\u0176"+ + "\u0179\3\2\2\2\u0177\u0178\7\23\2\2\u0178\u017a\5\"\22\2\u0179\u0177\3"+ + "\2\2\2\u0179\u017a\3\2\2\2\u017a\u017b\3\2\2\2\u017b\u017c\5&\24\2\u017c"+ + "!\3\2\2\2\u017d\u0182\5N(\2\u017e\u017f\7B\2\2\u017f\u0181\5N(\2\u0180"+ + "\u017e\3\2\2\2\u0181\u0184\3\2\2\2\u0182\u0180\3\2\2\2\u0182\u0183\3\2"+ + "\2\2\u0183#\3\2\2\2\u0184\u0182\3\2\2\2\u0185\u0189\7=\2\2\u0186\u0188"+ + "\5(\25\2\u0187\u0186\3\2\2\2\u0188\u018b\3\2\2\2\u0189\u0187\3\2\2\2\u0189"+ + "\u018a\3\2\2\2\u018a\u018c\3\2\2\2\u018b\u0189\3\2\2\2\u018c\u018d\7>"+ + "\2\2\u018d%\3\2\2\2\u018e\u0192\7=\2\2\u018f\u0191\5\66\34\2\u0190\u018f"+ + "\3\2\2\2\u0191\u0194\3\2\2\2\u0192\u0190\3\2\2\2\u0192\u0193\3\2\2\2\u0193"+ + "\u0195\3\2\2\2\u0194\u0192\3\2\2\2\u0195\u0196\7>\2\2\u0196\'\3\2\2\2"+ + "\u0197\u01a4\7A\2\2\u0198\u019a\7(\2\2\u0199\u0198\3\2\2\2\u0199\u019a"+ + "\3\2\2\2\u019a\u019b\3\2\2\2\u019b\u01a4\5\u0086D\2\u019c\u019e\5\n\6"+ + "\2\u019d\u019c\3\2\2\2\u019e\u01a1\3\2\2\2\u019f\u019d\3\2\2\2\u019f\u01a0"+ + "\3\2\2\2\u01a0\u01a2\3\2\2\2\u01a1\u019f\3\2\2\2\u01a2\u01a4\5*\26\2\u01a3"+ + "\u0197\3\2\2\2\u01a3\u0199\3\2\2\2\u01a3\u019f\3\2\2\2\u01a4)\3\2\2\2"+ + "\u01a5\u01af\5,\27\2\u01a6\u01af\5.\30\2\u01a7\u01af\5\64\33\2\u01a8\u01af"+ + "\5\60\31\2\u01a9\u01af\5\62\32\2\u01aa\u01af\5 \21\2\u01ab\u01af\5v<\2"+ + "\u01ac\u01af\5\20\t\2\u01ad\u01af\5\30\r\2\u01ae\u01a5\3\2\2\2\u01ae\u01a6"+ + "\3\2\2\2\u01ae\u01a7\3\2\2\2\u01ae\u01a8\3\2\2\2\u01ae\u01a9\3\2\2\2\u01ae"+ + "\u01aa\3\2\2\2\u01ae\u01ab\3\2\2\2\u01ae\u01ac\3\2\2\2\u01ae\u01ad\3\2"+ + "\2\2\u01af+\3\2\2\2\u01b0\u01b3\5N(\2\u01b1\u01b3\7\62\2\2\u01b2\u01b0"+ + "\3\2\2\2\u01b2\u01b1\3\2\2\2\u01b3\u01b4\3\2\2\2\u01b4\u01b5\7f\2\2\u01b5"+ + "\u01ba\5Z.\2\u01b6\u01b7\7?\2\2\u01b7\u01b9\7@\2\2\u01b8\u01b6\3\2\2\2"+ + "\u01b9\u01bc\3\2\2\2\u01ba\u01b8\3\2\2\2\u01ba\u01bb\3\2\2\2\u01bb\u01bf"+ + "\3\2\2\2\u01bc\u01ba\3\2\2\2\u01bd\u01be\7/\2\2\u01be\u01c0\5X-\2\u01bf"+ + "\u01bd\3\2\2\2\u01bf\u01c0\3\2\2\2\u01c0\u01c3\3\2\2\2\u01c1\u01c4\5b"+ + "\62\2\u01c2\u01c4\7A\2\2\u01c3\u01c1\3\2\2\2\u01c3\u01c2\3\2\2\2\u01c4"+ + "-\3\2\2\2\u01c5\u01c6\5\22\n\2\u01c6\u01c7\5,\27\2\u01c7/\3\2\2\2\u01c8"+ + "\u01c9\7f\2\2\u01c9\u01cc\5Z.\2\u01ca\u01cb\7/\2\2\u01cb\u01cd\5X-\2\u01cc"+ + "\u01ca\3\2\2\2\u01cc\u01cd\3\2\2\2\u01cd\u01ce\3\2\2\2\u01ce\u01cf\5d"+ + "\63\2\u01cf\61\3\2\2\2\u01d0\u01d1\5\22\n\2\u01d1\u01d2\5\60\31\2\u01d2"+ + "\63\3\2\2\2\u01d3\u01d4\5N(\2\u01d4\u01d5\5B\"\2\u01d5\u01d6\7A\2\2\u01d6"+ + "\65\3\2\2\2\u01d7\u01d9\5\n\6\2\u01d8\u01d7\3\2\2\2\u01d9\u01dc\3\2\2"+ + "\2\u01da\u01d8\3\2\2\2\u01da\u01db\3\2\2\2\u01db\u01dd\3\2\2\2\u01dc\u01da"+ + "\3\2\2\2\u01dd\u01e0\58\35\2\u01de\u01e0\7A\2\2\u01df\u01da\3\2\2\2\u01df"+ + "\u01de\3\2\2\2\u01e0\67\3\2\2\2\u01e1\u01e9\5:\36\2\u01e2\u01e9\5> \2"+ + "\u01e3\u01e9\5@!\2\u01e4\u01e9\5 \21\2\u01e5\u01e9\5v<\2\u01e6\u01e9\5"+ + "\20\t\2\u01e7\u01e9\5\30\r\2\u01e8\u01e1\3\2\2\2\u01e8\u01e2\3\2\2\2\u01e8"+ + "\u01e3\3\2\2\2\u01e8\u01e4\3\2\2\2\u01e8\u01e5\3\2\2\2\u01e8\u01e6\3\2"+ + "\2\2\u01e8\u01e7\3\2\2\2\u01e99\3\2\2\2\u01ea\u01eb\5N(\2\u01eb\u01f0"+ + "\5<\37\2\u01ec\u01ed\7B\2\2\u01ed\u01ef\5<\37\2\u01ee\u01ec\3\2\2\2\u01ef"+ + "\u01f2\3\2\2\2\u01f0\u01ee\3\2\2\2\u01f0\u01f1\3\2\2\2\u01f1\u01f3\3\2"+ + "\2\2\u01f2\u01f0\3\2\2\2\u01f3\u01f4\7A\2\2\u01f4;\3\2\2\2\u01f5\u01fa"+ + "\7f\2\2\u01f6\u01f7\7?\2\2\u01f7\u01f9\7@\2\2\u01f8\u01f6\3\2\2\2\u01f9"+ + "\u01fc\3\2\2\2\u01fa\u01f8\3\2\2\2\u01fa\u01fb\3\2\2\2\u01fb\u01fd\3\2"+ + "\2\2\u01fc\u01fa\3\2\2\2\u01fd\u01fe\7D\2\2\u01fe\u01ff\5H%\2\u01ff=\3"+ + "\2\2\2\u0200\u0203\5N(\2\u0201\u0203\7\62\2\2\u0202\u0200\3\2\2\2\u0202"+ + "\u0201\3\2\2\2\u0203\u0204\3\2\2\2\u0204\u0205\7f\2\2\u0205\u020a\5Z."+ + "\2\u0206\u0207\7?\2\2\u0207\u0209\7@\2\2\u0208\u0206\3\2\2\2\u0209\u020c"+ + "\3\2\2\2\u020a\u0208\3\2\2\2\u020a\u020b\3\2\2\2\u020b\u020f\3\2\2\2\u020c"+ + "\u020a\3\2\2\2\u020d\u020e\7/\2\2\u020e\u0210\5X-\2\u020f\u020d\3\2\2"+ + "\2\u020f\u0210\3\2\2\2\u0210\u0211\3\2\2\2\u0211\u0212\7A\2\2\u0212?\3"+ + "\2\2\2\u0213\u0214\5\22\n\2\u0214\u0215\5> \2\u0215A\3\2\2\2\u0216\u021b"+ + "\5D#\2\u0217\u0218\7B\2\2\u0218\u021a\5D#\2\u0219\u0217\3\2\2\2\u021a"+ + "\u021d\3\2\2\2\u021b\u0219\3\2\2\2\u021b\u021c\3\2\2\2\u021cC\3\2\2\2"+ + "\u021d\u021b\3\2\2\2\u021e\u0221\5F$\2\u021f\u0220\7D\2\2\u0220\u0222"+ + "\5H%\2\u0221\u021f\3\2\2\2\u0221\u0222\3\2\2\2\u0222E\3\2\2\2\u0223\u0228"+ + "\7f\2\2\u0224\u0225\7?\2\2\u0225\u0227\7@\2\2\u0226\u0224\3\2\2\2\u0227"+ + "\u022a\3\2\2\2\u0228\u0226\3\2\2\2\u0228\u0229\3\2\2\2\u0229G\3\2\2\2"+ + "\u022a\u0228\3\2\2\2\u022b\u022e\5J&\2\u022c\u022e\5\u00b0Y\2\u022d\u022b"+ + "\3\2\2\2\u022d\u022c\3\2\2\2\u022eI\3\2\2\2\u022f\u023b\7=\2\2\u0230\u0235"+ + "\5H%\2\u0231\u0232\7B\2\2\u0232\u0234\5H%\2\u0233\u0231\3\2\2\2\u0234"+ + "\u0237\3\2\2\2\u0235\u0233\3\2\2\2\u0235\u0236\3\2\2\2\u0236\u0239\3\2"+ + "\2\2\u0237\u0235\3\2\2\2\u0238\u023a\7B\2\2\u0239\u0238\3\2\2\2\u0239"+ + "\u023a\3\2\2\2\u023a\u023c\3\2\2\2\u023b\u0230\3\2\2\2\u023b\u023c\3\2"+ + "\2\2\u023c\u023d\3\2\2\2\u023d\u023e\7>\2\2\u023eK\3\2\2\2\u023f\u0240"+ + "\7f\2\2\u0240M\3\2\2\2\u0241\u0246\5P)\2\u0242\u0243\7?\2\2\u0243\u0245"+ + "\7@\2\2\u0244\u0242\3\2\2\2\u0245\u0248\3\2\2\2\u0246\u0244\3\2\2\2\u0246"+ + "\u0247\3\2\2\2\u0247\u0252\3\2\2\2\u0248\u0246\3\2\2\2\u0249\u024e\5R"+ + "*\2\u024a\u024b\7?\2\2\u024b\u024d\7@\2\2\u024c\u024a\3\2\2\2\u024d\u0250"+ + "\3\2\2\2\u024e\u024c\3\2\2\2\u024e\u024f\3\2\2\2\u024f\u0252\3\2\2\2\u0250"+ + "\u024e\3\2\2\2\u0251\u0241\3\2\2\2\u0251\u0249\3\2\2\2\u0252O\3\2\2\2"+ + "\u0253\u0255\7f\2\2\u0254\u0256\5T+\2\u0255\u0254\3\2\2\2\u0255\u0256"+ + "\3\2\2\2\u0256\u025e\3\2\2\2\u0257\u0258\7C\2\2\u0258\u025a\7f\2\2\u0259"+ + "\u025b\5T+\2\u025a\u0259\3\2\2\2\u025a\u025b\3\2\2\2\u025b\u025d\3\2\2"+ + "\2\u025c\u0257\3\2\2\2\u025d\u0260\3\2\2\2\u025e\u025c\3\2\2\2\u025e\u025f"+ + "\3\2\2\2\u025fQ\3\2\2\2\u0260\u025e\3\2\2\2\u0261\u0262\t\4\2\2\u0262"+ + "S\3\2\2\2\u0263\u0264\7F\2\2\u0264\u0269\5V,\2\u0265\u0266\7B\2\2\u0266"+ + "\u0268\5V,\2\u0267\u0265\3\2\2\2\u0268\u026b\3\2\2\2\u0269\u0267\3\2\2"+ + "\2\u0269\u026a\3\2\2\2\u026a\u026c\3\2\2\2\u026b\u0269\3\2\2\2\u026c\u026d"+ + "\7E\2\2\u026dU\3\2\2\2\u026e\u0275\5N(\2\u026f\u0272\7I\2\2\u0270\u0271"+ + "\t\5\2\2\u0271\u0273\5N(\2\u0272\u0270\3\2\2\2\u0272\u0273\3\2\2\2\u0273"+ + "\u0275\3\2\2\2\u0274\u026e\3\2\2\2\u0274\u026f\3\2\2\2\u0275W\3\2\2\2"+ + "\u0276\u027b\5f\64\2\u0277\u0278\7B\2\2\u0278\u027a\5f\64\2\u0279\u0277"+ + "\3\2\2\2\u027a\u027d\3\2\2\2\u027b\u0279\3\2\2\2\u027b\u027c\3\2\2\2\u027c"+ + "Y\3\2\2\2\u027d\u027b\3\2\2\2\u027e\u0280\7;\2\2\u027f\u0281\5\\/\2\u0280"+ + "\u027f\3\2\2\2\u0280\u0281\3\2\2\2\u0281\u0282\3\2\2\2\u0282\u0283\7<"+ + "\2\2\u0283[\3\2\2\2\u0284\u0289\5^\60\2\u0285\u0286\7B\2\2\u0286\u0288"+ + "\5^\60\2\u0287\u0285\3\2\2\2\u0288\u028b\3\2\2\2\u0289\u0287\3\2\2\2\u0289"+ + "\u028a\3\2\2\2\u028a\u028e\3\2\2\2\u028b\u0289\3\2\2\2\u028c\u028d\7B"+ + "\2\2\u028d\u028f\5`\61\2\u028e\u028c\3\2\2\2\u028e\u028f\3\2\2\2\u028f"+ + "\u0292\3\2\2\2\u0290\u0292\5`\61\2\u0291\u0284\3\2\2\2\u0291\u0290\3\2"+ + "\2\2\u0292]\3\2\2\2\u0293\u0295\5\16\b\2\u0294\u0293\3\2\2\2\u0295\u0298"+ + "\3\2\2\2\u0296\u0294\3\2\2\2\u0296\u0297\3\2\2\2\u0297\u0299\3\2\2\2\u0298"+ + "\u0296\3\2\2\2\u0299\u029a\5N(\2\u029a\u029b\5F$\2\u029b_\3\2\2\2\u029c"+ + "\u029e\5\16\b\2\u029d\u029c\3\2\2\2\u029e\u02a1\3\2\2\2\u029f\u029d\3"+ + "\2\2\2\u029f\u02a0\3\2\2\2\u02a0\u02a2\3\2\2\2\u02a1\u029f\3\2\2\2\u02a2"+ + "\u02a3\5N(\2\u02a3\u02a4\7h\2\2\u02a4\u02a5\5F$\2\u02a5a\3\2\2\2\u02a6"+ + "\u02a7\5\u0086D\2\u02a7c\3\2\2\2\u02a8\u02a9\5\u0086D\2\u02a9e\3\2\2\2"+ + "\u02aa\u02af\7f\2\2\u02ab\u02ac\7C\2\2\u02ac\u02ae\7f\2\2\u02ad\u02ab"+ + "\3\2\2\2\u02ae\u02b1\3\2\2\2\u02af\u02ad\3\2\2\2\u02af\u02b0\3\2\2\2\u02b0"+ + "g\3\2\2\2\u02b1\u02af\3\2\2\2\u02b2\u02b3\t\6\2\2\u02b3i\3\2\2\2\u02b4"+ + "\u02b5\7g\2\2\u02b5\u02bc\5l\67\2\u02b6\u02b9\7;\2\2\u02b7\u02ba\5n8\2"+ + "\u02b8\u02ba\5r:\2\u02b9\u02b7\3\2\2\2\u02b9\u02b8\3\2\2\2\u02b9\u02ba"+ + "\3\2\2\2\u02ba\u02bb\3\2\2\2\u02bb\u02bd\7<\2\2\u02bc\u02b6\3\2\2\2\u02bc"+ + "\u02bd\3\2\2\2\u02bdk\3\2\2\2\u02be\u02bf\5f\64\2\u02bfm\3\2\2\2\u02c0"+ + "\u02c5\5p9\2\u02c1\u02c2\7B\2\2\u02c2\u02c4\5p9\2\u02c3\u02c1\3\2\2\2"+ + "\u02c4\u02c7\3\2\2\2\u02c5\u02c3\3\2\2\2\u02c5\u02c6\3\2\2\2\u02c6o\3"+ + "\2\2\2\u02c7\u02c5\3\2\2\2\u02c8\u02c9\7f\2\2\u02c9\u02ca\7D\2\2\u02ca"+ + "\u02cb\5r:\2\u02cbq\3\2\2\2\u02cc\u02d0\5\u00b0Y\2\u02cd\u02d0\5j\66\2"+ + "\u02ce\u02d0\5t;\2\u02cf\u02cc\3\2\2\2\u02cf\u02cd\3\2\2\2\u02cf\u02ce"+ + "\3\2\2\2\u02d0s\3\2\2\2\u02d1\u02da\7=\2\2\u02d2\u02d7\5r:\2\u02d3\u02d4"+ + "\7B\2\2\u02d4\u02d6\5r:\2\u02d5\u02d3\3\2\2\2\u02d6\u02d9\3\2\2\2\u02d7"+ + "\u02d5\3\2\2\2\u02d7\u02d8\3\2\2\2\u02d8\u02db\3\2\2\2\u02d9\u02d7\3\2"+ + "\2\2\u02da\u02d2\3\2\2\2\u02da\u02db\3\2\2\2\u02db\u02dd\3\2\2\2\u02dc"+ + "\u02de\7B\2\2\u02dd\u02dc\3\2\2\2\u02dd\u02de\3\2\2\2\u02de\u02df\3\2"+ + "\2\2\u02df\u02e0\7>\2\2\u02e0u\3\2\2\2\u02e1\u02e2\7g\2\2\u02e2\u02e3"+ + "\7\36\2\2\u02e3\u02e4\7f\2\2\u02e4\u02e5\5x=\2\u02e5w\3\2\2\2\u02e6\u02ea"+ + "\7=\2\2\u02e7\u02e9\5z>\2\u02e8\u02e7\3\2\2\2\u02e9\u02ec\3\2\2\2\u02ea"+ + "\u02e8\3\2\2\2\u02ea\u02eb\3\2\2\2\u02eb\u02ed\3\2\2\2\u02ec\u02ea\3\2"+ + "\2\2\u02ed\u02ee\7>\2\2\u02eey\3\2\2\2\u02ef\u02f1\5\n\6\2\u02f0\u02ef"+ + "\3\2\2\2\u02f1\u02f4\3\2\2\2\u02f2\u02f0\3\2\2\2\u02f2\u02f3\3\2\2\2\u02f3"+ + "\u02f5\3\2\2\2\u02f4\u02f2\3\2\2\2\u02f5\u02f8\5|?\2\u02f6\u02f8\7A\2"+ + "\2\u02f7\u02f2\3\2\2\2\u02f7\u02f6\3\2\2\2\u02f8{\3\2\2\2\u02f9\u02fa"+ + "\5N(\2\u02fa\u02fb\5~@\2\u02fb\u02fc\7A\2\2\u02fc\u030e\3\2\2\2\u02fd"+ + "\u02ff\5\20\t\2\u02fe\u0300\7A\2\2\u02ff\u02fe\3\2\2\2\u02ff\u0300\3\2"+ + "\2\2\u0300\u030e\3\2\2\2\u0301\u0303\5 \21\2\u0302\u0304\7A\2\2\u0303"+ + "\u0302\3\2\2\2\u0303\u0304\3\2\2\2\u0304\u030e\3\2\2\2\u0305\u0307\5\30"+ + "\r\2\u0306\u0308\7A\2\2\u0307\u0306\3\2\2\2\u0307\u0308\3\2\2\2\u0308"+ + "\u030e\3\2\2\2\u0309\u030b\5v<\2\u030a\u030c\7A\2\2\u030b\u030a\3\2\2"+ + "\2\u030b\u030c\3\2\2\2\u030c\u030e\3\2\2\2\u030d\u02f9\3\2\2\2\u030d\u02fd"+ + "\3\2\2\2\u030d\u0301\3\2\2\2\u030d\u0305\3\2\2\2\u030d\u0309\3\2\2\2\u030e"+ + "}\3\2\2\2\u030f\u0312\5\u0080A\2\u0310\u0312\5\u0082B\2\u0311\u030f\3"+ + "\2\2\2\u0311\u0310\3\2\2\2\u0312\177\3\2\2\2\u0313\u0314\7f\2\2\u0314"+ + "\u0315\7;\2\2\u0315\u0317\7<\2\2\u0316\u0318\5\u0084C\2\u0317\u0316\3"+ + "\2\2\2\u0317\u0318\3\2\2\2\u0318\u0081\3\2\2\2\u0319\u031a\5B\"\2\u031a"+ + "\u0083\3\2\2\2\u031b\u031c\7\16\2\2\u031c\u031d\5r:\2\u031d\u0085\3\2"+ + "\2\2\u031e\u0322\7=\2\2\u031f\u0321\5\u0088E\2\u0320\u031f\3\2\2\2\u0321"+ + "\u0324\3\2\2\2\u0322\u0320\3\2\2\2\u0322\u0323\3\2\2\2\u0323\u0325\3\2"+ + "\2\2\u0324\u0322\3\2\2\2\u0325\u0326\7>\2\2\u0326\u0087\3\2\2\2\u0327"+ + "\u032b\5\u008aF\2\u0328\u032b\5\u008eH\2\u0329\u032b\5\b\5\2\u032a\u0327"+ + "\3\2\2\2\u032a\u0328\3\2\2\2\u032a\u0329\3\2\2\2\u032b\u0089\3\2\2\2\u032c"+ + "\u032d\5\u008cG\2\u032d\u032e\7A\2\2\u032e\u008b\3\2\2\2\u032f\u0331\5"+ + "\16\b\2\u0330\u032f\3\2\2\2\u0331\u0334\3\2\2\2\u0332\u0330\3\2\2\2\u0332"+ + "\u0333\3\2\2\2\u0333\u0335\3\2\2\2\u0334\u0332\3\2\2\2\u0335\u0336\5N"+ + "(\2\u0336\u0337\5B\"\2\u0337\u008d\3\2\2\2\u0338\u03a1\5\u0086D\2\u0339"+ + "\u033a\7\4\2\2\u033a\u033d\5\u00b0Y\2\u033b\u033c\7J\2\2\u033c\u033e\5"+ + "\u00b0Y\2\u033d\u033b\3\2\2\2\u033d\u033e\3\2\2\2\u033e\u033f\3\2\2\2"+ + "\u033f\u0340\7A\2\2\u0340\u03a1\3\2\2\2\u0341\u0342\7\30\2\2\u0342\u0343"+ + "\5\u00a8U\2\u0343\u0346\5\u008eH\2\u0344\u0345\7\21\2\2\u0345\u0347\5"+ + "\u008eH\2\u0346\u0344\3\2\2\2\u0346\u0347\3\2\2\2\u0347\u03a1\3\2\2\2"+ + "\u0348\u0349\7\27\2\2\u0349\u034a\7;\2\2\u034a\u034b\5\u00a0Q\2\u034b"+ + "\u034c\7<\2\2\u034c\u034d\5\u008eH\2\u034d\u03a1\3\2\2\2\u034e\u034f\7"+ + "\64\2\2\u034f\u0350\5\u00a8U\2\u0350\u0351\5\u008eH\2\u0351\u03a1\3\2"+ + "\2\2\u0352\u0353\7\17\2\2\u0353\u0354\5\u008eH\2\u0354\u0355\7\64\2\2"+ + "\u0355\u0356\5\u00a8U\2\u0356\u0357\7A\2\2\u0357\u03a1\3\2\2\2\u0358\u0359"+ + "\7\61\2\2\u0359\u0363\5\u0086D\2\u035a\u035c\5\u0090I\2\u035b\u035a\3"+ + "\2\2\2\u035c\u035d\3\2\2\2\u035d\u035b\3\2\2\2\u035d\u035e\3\2\2\2\u035e"+ + "\u0360\3\2\2\2\u035f\u0361\5\u0094K\2\u0360\u035f\3\2\2\2\u0360\u0361"+ + "\3\2\2\2\u0361\u0364\3\2\2\2\u0362\u0364\5\u0094K\2\u0363\u035b\3\2\2"+ + "\2\u0363\u0362\3\2\2\2\u0364\u03a1\3\2\2\2\u0365\u0366\7\61\2\2\u0366"+ + "\u0367\5\u0096L\2\u0367\u036b\5\u0086D\2\u0368\u036a\5\u0090I\2\u0369"+ + "\u0368\3\2\2\2\u036a\u036d\3\2\2\2\u036b\u0369\3\2\2\2\u036b\u036c\3\2"+ + "\2\2\u036c\u036f\3\2\2\2\u036d\u036b\3\2\2\2\u036e\u0370\5\u0094K\2\u036f"+ + "\u036e\3\2\2\2\u036f\u0370\3\2\2\2\u0370\u03a1\3\2\2\2\u0371\u0372\7+"+ + "\2\2\u0372\u0373\5\u00a8U\2\u0373\u0377\7=\2\2\u0374\u0376\5\u009cO\2"+ + "\u0375\u0374\3\2\2\2\u0376\u0379\3\2\2\2\u0377\u0375\3\2\2\2\u0377\u0378"+ + "\3\2\2\2\u0378\u037d\3\2\2\2\u0379\u0377\3\2\2\2\u037a\u037c\5\u009eP"+ + "\2\u037b\u037a\3\2\2\2\u037c\u037f\3\2\2\2\u037d\u037b\3\2\2\2\u037d\u037e"+ + "\3\2\2\2\u037e\u0380\3\2\2\2\u037f\u037d\3\2\2\2\u0380\u0381\7>\2\2\u0381"+ + "\u03a1\3\2\2\2\u0382\u0383\7,\2\2\u0383\u0384\5\u00a8U\2\u0384\u0385\5"+ + "\u0086D\2\u0385\u03a1\3\2\2\2\u0386\u0388\7&\2\2\u0387\u0389\5\u00b0Y"+ + "\2\u0388\u0387\3\2\2\2\u0388\u0389\3\2\2\2\u0389\u038a\3\2\2\2\u038a\u03a1"+ + "\7A\2\2\u038b\u038c\7.\2\2\u038c\u038d\5\u00b0Y\2\u038d\u038e\7A\2\2\u038e"+ + "\u03a1\3\2\2\2\u038f\u0391\7\6\2\2\u0390\u0392\7f\2\2\u0391\u0390\3\2"+ + "\2\2\u0391\u0392\3\2\2\2\u0392\u0393\3\2\2\2\u0393\u03a1\7A\2\2\u0394"+ + "\u0396\7\r\2\2\u0395\u0397\7f\2\2\u0396\u0395\3\2\2\2\u0396\u0397\3\2"+ + "\2\2\u0397\u0398\3\2\2\2\u0398\u03a1\7A\2\2\u0399\u03a1\7A\2\2\u039a\u039b"+ + "\5\u00acW\2\u039b\u039c\7A\2\2\u039c\u03a1\3\2\2\2\u039d\u039e\7f\2\2"+ + "\u039e\u039f\7J\2\2\u039f\u03a1\5\u008eH\2\u03a0\u0338\3\2\2\2\u03a0\u0339"+ + "\3\2\2\2\u03a0\u0341\3\2\2\2\u03a0\u0348\3\2\2\2\u03a0\u034e\3\2\2\2\u03a0"+ + "\u0352\3\2\2\2\u03a0\u0358\3\2\2\2\u03a0\u0365\3\2\2\2\u03a0\u0371\3\2"+ + "\2\2\u03a0\u0382\3\2\2\2\u03a0\u0386\3\2\2\2\u03a0\u038b\3\2\2\2\u03a0"+ + "\u038f\3\2\2\2\u03a0\u0394\3\2\2\2\u03a0\u0399\3\2\2\2\u03a0\u039a\3\2"+ + "\2\2\u03a0\u039d\3\2\2\2\u03a1\u008f\3\2\2\2\u03a2\u03a3\7\t\2\2\u03a3"+ + "\u03a7\7;\2\2\u03a4\u03a6\5\16\b\2\u03a5\u03a4\3\2\2\2\u03a6\u03a9\3\2"+ + "\2\2\u03a7\u03a5\3\2\2\2\u03a7\u03a8\3\2\2\2\u03a8\u03aa\3\2\2\2\u03a9"+ + "\u03a7\3\2\2\2\u03aa\u03ab\5\u0092J\2\u03ab\u03ac\7f\2\2\u03ac\u03ad\7"+ + "<\2\2\u03ad\u03ae\5\u0086D\2\u03ae\u0091\3\2\2\2\u03af\u03b4\5f\64\2\u03b0"+ + "\u03b1\7X\2\2\u03b1\u03b3\5f\64\2\u03b2\u03b0\3\2\2\2\u03b3\u03b6\3\2"+ + "\2\2\u03b4\u03b2\3\2\2\2\u03b4\u03b5\3\2\2\2\u03b5\u0093\3\2\2\2\u03b6"+ + "\u03b4\3\2\2\2\u03b7\u03b8\7\25\2\2\u03b8\u03b9\5\u0086D\2\u03b9\u0095"+ + "\3\2\2\2\u03ba\u03bb\7;\2\2\u03bb\u03bd\5\u0098M\2\u03bc\u03be\7A\2\2"+ + "\u03bd\u03bc\3\2\2\2\u03bd\u03be\3\2\2\2\u03be\u03bf\3\2\2\2\u03bf\u03c0"+ + "\7<\2\2\u03c0\u0097\3\2\2\2\u03c1\u03c6\5\u009aN\2\u03c2\u03c3\7A\2\2"+ + "\u03c3\u03c5\5\u009aN\2\u03c4\u03c2\3\2\2\2\u03c5\u03c8\3\2\2\2\u03c6"+ + "\u03c4\3\2\2\2\u03c6\u03c7\3\2\2\2\u03c7\u0099\3\2\2\2\u03c8\u03c6\3\2"+ + "\2\2\u03c9\u03cb\5\16\b\2\u03ca\u03c9\3\2\2\2\u03cb\u03ce\3\2\2\2\u03cc"+ + "\u03ca\3\2\2\2\u03cc\u03cd\3\2\2\2\u03cd\u03cf\3\2\2\2\u03ce\u03cc\3\2"+ + "\2\2\u03cf\u03d0\5P)\2\u03d0\u03d1\5F$\2\u03d1\u03d2\7D\2\2\u03d2\u03d3"+ + "\5\u00b0Y\2\u03d3\u009b\3\2\2\2\u03d4\u03d6\5\u009eP\2\u03d5\u03d4\3\2"+ + "\2\2\u03d6\u03d7\3\2\2\2\u03d7\u03d5\3\2\2\2\u03d7\u03d8\3\2\2\2\u03d8"+ + "\u03da\3\2\2\2\u03d9\u03db\5\u0088E\2\u03da\u03d9\3\2\2\2\u03db\u03dc"+ + "\3\2\2\2\u03dc\u03da\3\2\2\2\u03dc\u03dd\3\2\2\2\u03dd\u009d\3\2\2\2\u03de"+ + "\u03df\7\b\2\2\u03df\u03e0\5\u00aeX\2\u03e0\u03e1\7J\2\2\u03e1\u03e9\3"+ + "\2\2\2\u03e2\u03e3\7\b\2\2\u03e3\u03e4\5L\'\2\u03e4\u03e5\7J\2\2\u03e5"+ + "\u03e9\3\2\2\2\u03e6\u03e7\7\16\2\2\u03e7\u03e9\7J\2\2\u03e8\u03de\3\2"+ + "\2\2\u03e8\u03e2\3\2\2\2\u03e8\u03e6\3\2\2\2\u03e9\u009f\3\2\2\2\u03ea"+ + "\u03f7\5\u00a4S\2\u03eb\u03ed\5\u00a2R\2\u03ec\u03eb\3\2\2\2\u03ec\u03ed"+ + "\3\2\2\2\u03ed\u03ee\3\2\2\2\u03ee\u03f0\7A\2\2\u03ef\u03f1\5\u00b0Y\2"+ + "\u03f0\u03ef\3\2\2\2\u03f0\u03f1\3\2\2\2\u03f1\u03f2\3\2\2\2\u03f2\u03f4"+ + "\7A\2\2\u03f3\u03f5\5\u00a6T\2\u03f4\u03f3\3\2\2\2\u03f4\u03f5\3\2\2\2"+ + "\u03f5\u03f7\3\2\2\2\u03f6\u03ea\3\2\2\2\u03f6\u03ec\3\2\2\2\u03f7\u00a1"+ + "\3\2\2\2\u03f8\u03fb\5\u008cG\2\u03f9\u03fb\5\u00aaV\2\u03fa\u03f8\3\2"+ + "\2\2\u03fa\u03f9\3\2\2\2\u03fb\u00a3\3\2\2\2\u03fc\u03fe\5\16\b\2\u03fd"+ + "\u03fc\3\2\2\2\u03fe\u0401\3\2\2\2\u03ff\u03fd\3\2\2\2\u03ff\u0400\3\2"+ + "\2\2\u0400\u0402\3\2\2\2\u0401\u03ff\3\2\2\2\u0402\u0403\5N(\2\u0403\u0404"+ + "\7f\2\2\u0404\u0405\7J\2\2\u0405\u0406\5\u00b0Y\2\u0406\u00a5\3\2\2\2"+ + "\u0407\u0408\5\u00aaV\2\u0408\u00a7\3\2\2\2\u0409\u040a\7;\2\2\u040a\u040b"+ + "\5\u00b0Y\2\u040b\u040c\7<\2\2\u040c\u00a9\3\2\2\2\u040d\u0412\5\u00b0"+ + "Y\2\u040e\u040f\7B\2\2\u040f\u0411\5\u00b0Y\2\u0410\u040e\3\2\2\2\u0411"+ + "\u0414\3\2\2\2\u0412\u0410\3\2\2\2\u0412\u0413\3\2\2\2\u0413\u00ab\3\2"+ + "\2\2\u0414\u0412\3\2\2\2\u0415\u0416\5\u00b0Y\2\u0416\u00ad\3\2\2\2\u0417"+ + "\u0418\5\u00b0Y\2\u0418\u00af\3\2\2\2\u0419\u041a\bY\1\2\u041a\u041b\7"+ + ";\2\2\u041b\u041c\5N(\2\u041c\u041d\7<\2\2\u041d\u041e\5\u00b0Y\23\u041e"+ + "\u0427\3\2\2\2\u041f\u0420\t\7\2\2\u0420\u0427\5\u00b0Y\21\u0421\u0422"+ + "\t\b\2\2\u0422\u0427\5\u00b0Y\20\u0423\u0427\5\u00b2Z\2\u0424\u0425\7"+ + "!\2\2\u0425\u0427\5\u00b4[\2\u0426\u0419\3\2\2\2\u0426\u041f\3\2\2\2\u0426"+ + "\u0421\3\2\2\2\u0426\u0423\3\2\2\2\u0426\u0424\3\2\2\2\u0427\u047d\3\2"+ + "\2\2\u0428\u0429\f\17\2\2\u0429\u042a\t\t\2\2\u042a\u047c\5\u00b0Y\20"+ + "\u042b\u042c\f\16\2\2\u042c\u042d\t\n\2\2\u042d\u047c\5\u00b0Y\17\u042e"+ + "\u0436\f\r\2\2\u042f\u0430\7F\2\2\u0430\u0437\7F\2\2\u0431\u0432\7E\2"+ + "\2\u0432\u0433\7E\2\2\u0433\u0437\7E\2\2\u0434\u0435\7E\2\2\u0435\u0437"+ + "\7E\2\2\u0436\u042f\3\2\2\2\u0436\u0431\3\2\2\2\u0436\u0434\3\2\2\2\u0437"+ + "\u0438\3\2\2\2\u0438\u047c\5\u00b0Y\16\u0439\u043a\f\f\2\2\u043a\u043b"+ + "\t\13\2\2\u043b\u047c\5\u00b0Y\r\u043c\u043d\f\n\2\2\u043d\u043e\t\f\2"+ + "\2\u043e\u047c\5\u00b0Y\13\u043f\u0440\f\t\2\2\u0440\u0441\7W\2\2\u0441"+ + "\u047c\5\u00b0Y\n\u0442\u0443\f\b\2\2\u0443\u0444\7Y\2\2\u0444\u047c\5"+ + "\u00b0Y\t\u0445\u0446\f\7\2\2\u0446\u0447\7X\2\2\u0447\u047c\5\u00b0Y"+ + "\b\u0448\u0449\f\6\2\2\u0449\u044a\7O\2\2\u044a\u047c\5\u00b0Y\7\u044b"+ + "\u044c\f\5\2\2\u044c\u044d\7P\2\2\u044d\u047c\5\u00b0Y\6\u044e\u044f\f"+ + "\4\2\2\u044f\u0450\7I\2\2\u0450\u0451\5\u00b0Y\2\u0451\u0452\7J\2\2\u0452"+ + "\u0453\5\u00b0Y\5\u0453\u047c\3\2\2\2\u0454\u0455\f\3\2\2\u0455\u0456"+ + "\t\r\2\2\u0456\u047c\5\u00b0Y\4\u0457\u0458\f\33\2\2\u0458\u0459\7C\2"+ + "\2\u0459\u047c\7f\2\2\u045a\u045b\f\32\2\2\u045b\u045c\7C\2\2\u045c\u047c"+ + "\7-\2\2\u045d\u045e\f\31\2\2\u045e\u045f\7C\2\2\u045f\u0461\7!\2\2\u0460"+ + "\u0462\5\u00c0a\2\u0461\u0460\3\2\2\2\u0461\u0462\3\2\2\2\u0462\u0463"+ + "\3\2\2\2\u0463\u047c\5\u00b8]\2\u0464\u0465\f\30\2\2\u0465\u0466\7C\2"+ + "\2\u0466\u0467\7*\2\2\u0467\u047c\5\u00c6d\2\u0468\u0469\f\27\2\2\u0469"+ + "\u046a\7C\2\2\u046a\u047c\5\u00be`\2\u046b\u046c\f\26\2\2\u046c\u046d"+ + "\7?\2\2\u046d\u046e\5\u00b0Y\2\u046e\u046f\7@\2\2\u046f\u047c\3\2\2\2"+ + "\u0470\u0471\f\25\2\2\u0471\u0473\7;\2\2\u0472\u0474\5\u00aaV\2\u0473"+ + "\u0472\3\2\2\2\u0473\u0474\3\2\2\2\u0474\u0475\3\2\2\2\u0475\u047c\7<"+ + "\2\2\u0476\u0477\f\22\2\2\u0477\u047c\t\16\2\2\u0478\u0479\f\13\2\2\u0479"+ + "\u047a\7\34\2\2\u047a\u047c\5N(\2\u047b\u0428\3\2\2\2\u047b\u042b\3\2"+ + "\2\2\u047b\u042e\3\2\2\2\u047b\u0439\3\2\2\2\u047b\u043c\3\2\2\2\u047b"+ + "\u043f\3\2\2\2\u047b\u0442\3\2\2\2\u047b\u0445\3\2\2\2\u047b\u0448\3\2"+ + "\2\2\u047b\u044b\3\2\2\2\u047b\u044e\3\2\2\2\u047b\u0454\3\2\2\2\u047b"+ + "\u0457\3\2\2\2\u047b\u045a\3\2\2\2\u047b\u045d\3\2\2\2\u047b\u0464\3\2"+ + "\2\2\u047b\u0468\3\2\2\2\u047b\u046b\3\2\2\2\u047b\u0470\3\2\2\2\u047b"+ + "\u0476\3\2\2\2\u047b\u0478\3\2\2\2\u047c\u047f\3\2\2\2\u047d\u047b\3\2"+ + "\2\2\u047d\u047e\3\2\2\2\u047e\u00b1\3\2\2\2\u047f\u047d\3\2\2\2\u0480"+ + "\u0481\7;\2\2\u0481\u0482\5\u00b0Y\2\u0482\u0483\7<\2\2\u0483\u0496\3"+ + "\2\2\2\u0484\u0496\7-\2\2\u0485\u0496\7*\2\2\u0486\u0496\5h\65\2\u0487"+ + "\u0496\7f\2\2\u0488\u0489\5N(\2\u0489\u048a\7C\2\2\u048a\u048b\7\13\2"+ + "\2\u048b\u0496\3\2\2\2\u048c\u048d\7\62\2\2\u048d\u048e\7C\2\2\u048e\u0496"+ + "\7\13\2\2\u048f\u0493\5\u00c0a\2\u0490\u0494\5\u00c8e\2\u0491\u0492\7"+ + "-\2\2\u0492\u0494\5\u00caf\2\u0493\u0490\3\2\2\2\u0493\u0491\3\2\2\2\u0494"+ + "\u0496\3\2\2\2\u0495\u0480\3\2\2\2\u0495\u0484\3\2\2\2\u0495\u0485\3\2"+ + "\2\2\u0495\u0486\3\2\2\2\u0495\u0487\3\2\2\2\u0495\u0488\3\2\2\2\u0495"+ + "\u048c\3\2\2\2\u0495\u048f\3\2\2\2\u0496\u00b3\3\2\2\2\u0497\u0498\5\u00c0"+ + "a\2\u0498\u0499\5\u00b6\\\2\u0499\u049a\5\u00bc_\2\u049a\u04a1\3\2\2\2"+ + "\u049b\u049e\5\u00b6\\\2\u049c\u049f\5\u00ba^\2\u049d\u049f\5\u00bc_\2"+ + "\u049e\u049c\3\2\2\2\u049e\u049d\3\2\2\2\u049f\u04a1\3\2\2\2\u04a0\u0497"+ + "\3\2\2\2\u04a0\u049b\3\2\2\2\u04a1\u00b5\3\2\2\2\u04a2\u04a4\7f\2\2\u04a3"+ + "\u04a5\5\u00c2b\2\u04a4\u04a3\3\2\2\2\u04a4\u04a5\3\2\2\2\u04a5\u04ad"+ + "\3\2\2\2\u04a6\u04a7\7C\2\2\u04a7\u04a9\7f\2\2\u04a8\u04aa\5\u00c2b\2"+ + "\u04a9\u04a8\3\2\2\2\u04a9\u04aa\3\2\2\2\u04aa\u04ac\3\2\2\2\u04ab\u04a6"+ + "\3\2\2\2\u04ac\u04af\3\2\2\2\u04ad\u04ab\3\2\2\2\u04ad\u04ae\3\2\2\2\u04ae"+ + "\u04b2\3\2\2\2\u04af\u04ad\3\2\2\2\u04b0\u04b2\5R*\2\u04b1\u04a2\3\2\2"+ + "\2\u04b1\u04b0\3\2\2\2\u04b2\u00b7\3\2\2\2\u04b3\u04b5\7f\2\2\u04b4\u04b6"+ + "\5\u00c4c\2\u04b5\u04b4\3\2\2\2\u04b5\u04b6\3\2\2\2\u04b6\u04b7\3\2\2"+ + "\2\u04b7\u04b8\5\u00bc_\2\u04b8\u00b9\3\2\2\2\u04b9\u04d5\7?\2\2\u04ba"+ + "\u04bf\7@\2\2\u04bb\u04bc\7?\2\2\u04bc\u04be\7@\2\2\u04bd\u04bb\3\2\2"+ + "\2\u04be\u04c1\3\2\2\2\u04bf\u04bd\3\2\2\2\u04bf\u04c0\3\2\2\2\u04c0\u04c2"+ + "\3\2\2\2\u04c1\u04bf\3\2\2\2\u04c2\u04d6\5J&\2\u04c3\u04c4\5\u00b0Y\2"+ + "\u04c4\u04cb\7@\2\2\u04c5\u04c6\7?\2\2\u04c6\u04c7\5\u00b0Y\2\u04c7\u04c8"+ + "\7@\2\2\u04c8\u04ca\3\2\2\2\u04c9\u04c5\3\2\2\2\u04ca\u04cd\3\2\2\2\u04cb"+ + "\u04c9\3\2\2\2\u04cb\u04cc\3\2\2\2\u04cc\u04d2\3\2\2\2\u04cd\u04cb\3\2"+ + "\2\2\u04ce\u04cf\7?\2\2\u04cf\u04d1\7@\2\2\u04d0\u04ce\3\2\2\2\u04d1\u04d4"+ + "\3\2\2\2\u04d2\u04d0\3\2\2\2\u04d2\u04d3\3\2\2\2\u04d3\u04d6\3\2\2\2\u04d4"+ + "\u04d2\3\2\2\2\u04d5\u04ba\3\2\2\2\u04d5\u04c3\3\2\2\2\u04d6\u00bb\3\2"+ + "\2\2\u04d7\u04d9\5\u00caf\2\u04d8\u04da\5$\23\2\u04d9\u04d8\3\2\2\2\u04d9"+ + "\u04da\3\2\2\2\u04da\u00bd\3\2\2\2\u04db\u04dc\5\u00c0a\2\u04dc\u04dd"+ + "\5\u00c8e\2\u04dd\u00bf\3\2\2\2\u04de\u04df\7F\2\2\u04df\u04e0\5\"\22"+ + "\2\u04e0\u04e1\7E\2\2\u04e1\u00c1\3\2\2\2\u04e2\u04e3\7F\2\2\u04e3\u04e6"+ + "\7E\2\2\u04e4\u04e6\5T+\2\u04e5\u04e2\3\2\2\2\u04e5\u04e4\3\2\2\2\u04e6"+ + "\u00c3\3\2\2\2\u04e7\u04e8\7F\2\2\u04e8\u04eb\7E\2\2\u04e9\u04eb\5\u00c0"+ + "a\2\u04ea\u04e7\3\2\2\2\u04ea\u04e9\3\2\2\2\u04eb\u00c5\3\2\2\2\u04ec"+ + "\u04f3\5\u00caf\2\u04ed\u04ee\7C\2\2\u04ee\u04f0\7f\2\2\u04ef\u04f1\5"+ + "\u00caf\2\u04f0\u04ef\3\2\2\2\u04f0\u04f1\3\2\2\2\u04f1\u04f3\3\2\2\2"+ + "\u04f2\u04ec\3\2\2\2\u04f2\u04ed\3\2\2\2\u04f3\u00c7\3\2\2\2\u04f4\u04f5"+ + "\7*\2\2\u04f5\u04f9\5\u00c6d\2\u04f6\u04f7\7f\2\2\u04f7\u04f9\5\u00ca"+ + "f\2\u04f8\u04f4\3\2\2\2\u04f8\u04f6\3\2\2\2\u04f9\u00c9\3\2\2\2\u04fa"+ + "\u04fc\7;\2\2\u04fb\u04fd\5\u00aaV\2\u04fc\u04fb\3\2\2\2\u04fc\u04fd\3"+ + "\2\2\2\u04fd\u04fe\3\2\2\2\u04fe\u04ff\7<\2\2\u04ff\u00cb\3\2\2\2\u0097"+ + "\u00cd\u00d2\u00d8\u00e0\u00e9\u00ee\u00f5\u00fc\u0103\u010a\u010f\u0113"+ + "\u0117\u011b\u0120\u0124\u0128\u0132\u013a\u0141\u0148\u014c\u014f\u0152"+ + "\u015b\u0161\u0166\u0169\u016f\u0175\u0179\u0182\u0189\u0192\u0199\u019f"+ + "\u01a3\u01ae\u01b2\u01ba\u01bf\u01c3\u01cc\u01da\u01df\u01e8\u01f0\u01fa"+ + "\u0202\u020a\u020f\u021b\u0221\u0228\u022d\u0235\u0239\u023b\u0246\u024e"+ + "\u0251\u0255\u025a\u025e\u0269\u0272\u0274\u027b\u0280\u0289\u028e\u0291"+ + "\u0296\u029f\u02af\u02b9\u02bc\u02c5\u02cf\u02d7\u02da\u02dd\u02ea\u02f2"+ + "\u02f7\u02ff\u0303\u0307\u030b\u030d\u0311\u0317\u0322\u032a\u0332\u033d"+ + "\u0346\u035d\u0360\u0363\u036b\u036f\u0377\u037d\u0388\u0391\u0396\u03a0"+ + "\u03a7\u03b4\u03bd\u03c6\u03cc\u03d7\u03dc\u03e8\u03ec\u03f0\u03f4\u03f6"+ + "\u03fa\u03ff\u0412\u0426\u0436\u0461\u0473\u047b\u047d\u0493\u0495\u049e"+ + "\u04a0\u04a4\u04a9\u04ad\u04b1\u04b5\u04bf\u04cb\u04d2\u04d5\u04d9\u04e5"+ + "\u04ea\u04f0\u04f2\u04f8\u04fc"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/antlr/src/Test.java b/antlr/src/Test.java new file mode 100644 index 000000000..16433bd4b --- /dev/null +++ b/antlr/src/Test.java @@ -0,0 +1,37 @@ +package src; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.tree.*; + +import src.Java8Parser.BlockContext; + +public class Test { + public static void main(String[] args) throws Exception { + ANTLRInputStream input = new ANTLRInputStream(System.in); + Java8Lexer lexer = new Java8Lexer(input); + CommonTokenStream tokens = new CommonTokenStream(lexer); + Java8Parser parser = new Java8Parser(tokens); + ParseTree tree = parser.compilationUnit(); // begin parsing at init rule + System.out.println(tree.toStringTree(parser)); // print LISP-style tree + // Create a generic parse tree walker that can trigger callbacks + ParseTreeWalker walker = new ParseTreeWalker(); + // Walk the tree created during the parse, trigger callbacks + walker.walk(new SyntaxTreeBuilder(), tree); + } +} + +class SyntaxTreeBuilder extends Java8BaseListener { + + @Override + public void exitBlock(BlockContext ctx) { + Token t; + System.out.println("Exit Block"+ctx.blockStatement()); + super.exitBlock(ctx); + } + +} + +public class EvalVisitor extends LabeledExprBaseVisitor { + @Override + public SourceFile + +} From 250b98d679b60dd62b88e2913347a4c144cdecc3 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Mon, 15 Sep 2014 17:03:13 +0200 Subject: [PATCH 19/46] Antlr verschoben --- .classpath | 1 + antlr/Java8BaseListener.java | 1251 --- antlr/Java8Lexer.java | 515 -- antlr/Java8Listener.java | 1020 --- antlr/src/.gitignore | 107 - antlr/src/Java8BaseListener.java | 1252 --- antlr/src/Java8Listener.java | 1021 --- antlr/src/Java8Parser.java | 7696 ----------------- antlr/src/Test.java | 37 - bin/.gitignore | 1 - .../de/dhbwstuttgart/antlr}/.classpath | 0 .../de/dhbwstuttgart/antlr}/.gitignore | 0 .../de/dhbwstuttgart/antlr}/.idea/.name | 0 .../de/dhbwstuttgart/antlr}/.idea/antlr.iml | 0 .../dhbwstuttgart/antlr}/.idea/compiler.xml | 0 .../.idea/copyright/profiles_settings.xml | 0 .../dhbwstuttgart/antlr}/.idea/encodings.xml | 0 .../.idea/libraries/antlr_4_4_complete.xml | 0 .../de/dhbwstuttgart/antlr}/.idea/misc.xml | 0 .../de/dhbwstuttgart/antlr}/.idea/modules.xml | 0 .../antlr}/.idea/scopes/scope_settings.xml | 0 .../de/dhbwstuttgart/antlr}/.idea/vcs.xml | 0 .../dhbwstuttgart/antlr}/.idea/workspace.xml | 0 .../de/dhbwstuttgart/antlr}/.project | 0 .../de/dhbwstuttgart/antlr}/Java8.g4 | 2 +- .../de/dhbwstuttgart/antlr}/Java8.tokens | 0 .../antlr}/Java8BaseVisitor.java | 2 + .../de/dhbwstuttgart/antlr}/Java8Lexer.java | 3 +- .../de/dhbwstuttgart/antlr}/Java8Lexer.tokens | 0 .../de/dhbwstuttgart/antlr}/Java8Parser.java | 2 + .../de/dhbwstuttgart/antlr}/Java8Visitor.java | 2 + src/de/dhbwstuttgart/antlr/Test.java | 53 + .../de/dhbwstuttgart/antlr}/makefile | 1 - 33 files changed, 63 insertions(+), 12903 deletions(-) delete mode 100644 antlr/Java8BaseListener.java delete mode 100644 antlr/Java8Lexer.java delete mode 100644 antlr/Java8Listener.java delete mode 100644 antlr/src/.gitignore delete mode 100644 antlr/src/Java8BaseListener.java delete mode 100644 antlr/src/Java8Listener.java delete mode 100644 antlr/src/Java8Parser.java delete mode 100644 antlr/src/Test.java rename {antlr => src/de/dhbwstuttgart/antlr}/.classpath (100%) rename {antlr => src/de/dhbwstuttgart/antlr}/.gitignore (100%) rename {antlr => src/de/dhbwstuttgart/antlr}/.idea/.name (100%) rename {antlr => src/de/dhbwstuttgart/antlr}/.idea/antlr.iml (100%) rename {antlr => src/de/dhbwstuttgart/antlr}/.idea/compiler.xml (100%) rename {antlr => src/de/dhbwstuttgart/antlr}/.idea/copyright/profiles_settings.xml (100%) rename {antlr => src/de/dhbwstuttgart/antlr}/.idea/encodings.xml (100%) rename {antlr => src/de/dhbwstuttgart/antlr}/.idea/libraries/antlr_4_4_complete.xml (100%) rename {antlr => src/de/dhbwstuttgart/antlr}/.idea/misc.xml (100%) rename {antlr => src/de/dhbwstuttgart/antlr}/.idea/modules.xml (100%) rename {antlr => src/de/dhbwstuttgart/antlr}/.idea/scopes/scope_settings.xml (100%) rename {antlr => src/de/dhbwstuttgart/antlr}/.idea/vcs.xml (100%) rename {antlr => src/de/dhbwstuttgart/antlr}/.idea/workspace.xml (100%) rename {antlr => src/de/dhbwstuttgart/antlr}/.project (100%) rename {antlr => src/de/dhbwstuttgart/antlr}/Java8.g4 (99%) rename {antlr => src/de/dhbwstuttgart/antlr}/Java8.tokens (100%) rename {antlr => src/de/dhbwstuttgart/antlr}/Java8BaseVisitor.java (99%) rename {antlr/src => src/de/dhbwstuttgart/antlr}/Java8Lexer.java (99%) rename {antlr => src/de/dhbwstuttgart/antlr}/Java8Lexer.tokens (100%) rename {antlr => src/de/dhbwstuttgart/antlr}/Java8Parser.java (99%) rename {antlr => src/de/dhbwstuttgart/antlr}/Java8Visitor.java (99%) create mode 100644 src/de/dhbwstuttgart/antlr/Test.java rename {antlr => src/de/dhbwstuttgart/antlr}/makefile (61%) diff --git a/.classpath b/.classpath index 20f5e9156..11f44fced 100755 --- a/.classpath +++ b/.classpath @@ -6,5 +6,6 @@ + diff --git a/antlr/Java8BaseListener.java b/antlr/Java8BaseListener.java deleted file mode 100644 index ba69f6df5..000000000 --- a/antlr/Java8BaseListener.java +++ /dev/null @@ -1,1251 +0,0 @@ -// Generated from Java8.g4 by ANTLR 4.4 - -import org.antlr.v4.runtime.ParserRuleContext; -import org.antlr.v4.runtime.misc.NotNull; -import org.antlr.v4.runtime.tree.ErrorNode; -import org.antlr.v4.runtime.tree.TerminalNode; - -/** - * This class provides an empty implementation of {@link Java8Listener}, - * which can be extended to create a listener which only needs to handle a subset - * of the available methods. - */ -public class Java8BaseListener implements Java8Listener { - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterType(@NotNull Java8Parser.TypeContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitType(@NotNull Java8Parser.TypeContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterBlock(@NotNull Java8Parser.BlockContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitBlock(@NotNull Java8Parser.BlockContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterForUpdate(@NotNull Java8Parser.ForUpdateContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitForUpdate(@NotNull Java8Parser.ForUpdateContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterExpressionList(@NotNull Java8Parser.ExpressionListContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitExpressionList(@NotNull Java8Parser.ExpressionListContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterTypeBound(@NotNull Java8Parser.TypeBoundContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitTypeBound(@NotNull Java8Parser.TypeBoundContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterPrimary(@NotNull Java8Parser.PrimaryContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitPrimary(@NotNull Java8Parser.PrimaryContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterLiteral(@NotNull Java8Parser.LiteralContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitLiteral(@NotNull Java8Parser.LiteralContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterCatchClause(@NotNull Java8Parser.CatchClauseContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitCatchClause(@NotNull Java8Parser.CatchClauseContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterTypeList(@NotNull Java8Parser.TypeListContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitTypeList(@NotNull Java8Parser.TypeListContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterClassBody(@NotNull Java8Parser.ClassBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitClassBody(@NotNull Java8Parser.ClassBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterCreatedName(@NotNull Java8Parser.CreatedNameContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitCreatedName(@NotNull Java8Parser.CreatedNameContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterParExpression(@NotNull Java8Parser.ParExpressionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitParExpression(@NotNull Java8Parser.ParExpressionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterAnnotation(@NotNull Java8Parser.AnnotationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitAnnotation(@NotNull Java8Parser.AnnotationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterCreator(@NotNull Java8Parser.CreatorContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitCreator(@NotNull Java8Parser.CreatorContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterExpression(@NotNull Java8Parser.ExpressionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitExpression(@NotNull Java8Parser.ExpressionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterForControl(@NotNull Java8Parser.ForControlContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitForControl(@NotNull Java8Parser.ForControlContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterCatchType(@NotNull Java8Parser.CatchTypeContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitCatchType(@NotNull Java8Parser.CatchTypeContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterModifier(@NotNull Java8Parser.ModifierContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitModifier(@NotNull Java8Parser.ModifierContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterElementValue(@NotNull Java8Parser.ElementValueContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitElementValue(@NotNull Java8Parser.ElementValueContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterResource(@NotNull Java8Parser.ResourceContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitResource(@NotNull Java8Parser.ResourceContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterMethodBody(@NotNull Java8Parser.MethodBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitMethodBody(@NotNull Java8Parser.MethodBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterStatement(@NotNull Java8Parser.StatementContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitStatement(@NotNull Java8Parser.StatementContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterResources(@NotNull Java8Parser.ResourcesContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitResources(@NotNull Java8Parser.ResourcesContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterForInit(@NotNull Java8Parser.ForInitContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitForInit(@NotNull Java8Parser.ForInitContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterArguments(@NotNull Java8Parser.ArgumentsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitArguments(@NotNull Java8Parser.ArgumentsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx) { } - - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterEveryRule(@NotNull ParserRuleContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitEveryRule(@NotNull ParserRuleContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void visitTerminal(@NotNull TerminalNode node) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void visitErrorNode(@NotNull ErrorNode node) { } -} \ No newline at end of file diff --git a/antlr/Java8Lexer.java b/antlr/Java8Lexer.java deleted file mode 100644 index 91a2c30ed..000000000 --- a/antlr/Java8Lexer.java +++ /dev/null @@ -1,515 +0,0 @@ -// Generated from Java8.g4 by ANTLR 4.4 -import org.antlr.v4.runtime.Lexer; -import org.antlr.v4.runtime.CharStream; -import org.antlr.v4.runtime.Token; -import org.antlr.v4.runtime.TokenStream; -import org.antlr.v4.runtime.*; -import org.antlr.v4.runtime.atn.*; -import org.antlr.v4.runtime.dfa.DFA; -import org.antlr.v4.runtime.misc.*; - -@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) -public class Java8Lexer extends Lexer { - static { RuntimeMetaData.checkVersion("4.4", RuntimeMetaData.VERSION); } - - protected static final DFA[] _decisionToDFA; - protected static final PredictionContextCache _sharedContextCache = - new PredictionContextCache(); - public static final int - ABSTRACT=1, ASSERT=2, BOOLEAN=3, BREAK=4, BYTE=5, CASE=6, CATCH=7, CHAR=8, - CLASS=9, CONST=10, CONTINUE=11, DEFAULT=12, DO=13, DOUBLE=14, ELSE=15, - ENUM=16, EXTENDS=17, FINAL=18, FINALLY=19, FLOAT=20, FOR=21, IF=22, GOTO=23, - IMPLEMENTS=24, IMPORT=25, INSTANCEOF=26, INT=27, INTERFACE=28, LONG=29, - NATIVE=30, NEW=31, PACKAGE=32, PRIVATE=33, PROTECTED=34, PUBLIC=35, RETURN=36, - SHORT=37, STATIC=38, STRICTFP=39, SUPER=40, SWITCH=41, SYNCHRONIZED=42, - THIS=43, THROW=44, THROWS=45, TRANSIENT=46, TRY=47, VOID=48, VOLATILE=49, - WHILE=50, IntegerLiteral=51, FloatingPointLiteral=52, BooleanLiteral=53, - CharacterLiteral=54, StringLiteral=55, NullLiteral=56, LPAREN=57, RPAREN=58, - LBRACE=59, RBRACE=60, LBRACK=61, RBRACK=62, SEMI=63, COMMA=64, DOT=65, - ASSIGN=66, GT=67, LT=68, BANG=69, TILDE=70, QUESTION=71, COLON=72, EQUAL=73, - LE=74, GE=75, NOTEQUAL=76, AND=77, OR=78, INC=79, DEC=80, ADD=81, SUB=82, - MUL=83, DIV=84, BITAND=85, BITOR=86, CARET=87, MOD=88, ADD_ASSIGN=89, - SUB_ASSIGN=90, MUL_ASSIGN=91, DIV_ASSIGN=92, AND_ASSIGN=93, OR_ASSIGN=94, - XOR_ASSIGN=95, MOD_ASSIGN=96, LSHIFT_ASSIGN=97, RSHIFT_ASSIGN=98, URSHIFT_ASSIGN=99, - Identifier=100, AT=101, ELLIPSIS=102, WS=103, COMMENT=104, LINE_COMMENT=105; - public static String[] modeNames = { - "DEFAULT_MODE" - }; - - public static final String[] tokenNames = { - "'\\u0000'", "'\\u0001'", "'\\u0002'", "'\\u0003'", "'\\u0004'", "'\\u0005'", - "'\\u0006'", "'\\u0007'", "'\b'", "'\t'", "'\n'", "'\\u000B'", "'\f'", - "'\r'", "'\\u000E'", "'\\u000F'", "'\\u0010'", "'\\u0011'", "'\\u0012'", - "'\\u0013'", "'\\u0014'", "'\\u0015'", "'\\u0016'", "'\\u0017'", "'\\u0018'", - "'\\u0019'", "'\\u001A'", "'\\u001B'", "'\\u001C'", "'\\u001D'", "'\\u001E'", - "'\\u001F'", "' '", "'!'", "'\"'", "'#'", "'$'", "'%'", "'&'", "'''", - "'('", "')'", "'*'", "'+'", "','", "'-'", "'.'", "'/'", "'0'", "'1'", - "'2'", "'3'", "'4'", "'5'", "'6'", "'7'", "'8'", "'9'", "':'", "';'", - "'<'", "'='", "'>'", "'?'", "'@'", "'A'", "'B'", "'C'", "'D'", "'E'", - "'F'", "'G'", "'H'", "'I'", "'J'", "'K'", "'L'", "'M'", "'N'", "'O'", - "'P'", "'Q'", "'R'", "'S'", "'T'", "'U'", "'V'", "'W'", "'X'", "'Y'", - "'Z'", "'['", "'\\'", "']'", "'^'", "'_'", "'`'", "'a'", "'b'", "'c'", - "'d'", "'e'", "'f'", "'g'", "'h'", "'i'" - }; - public static final String[] ruleNames = { - "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH", "CHAR", - "CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE", "ENUM", - "EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "IF", "GOTO", "IMPLEMENTS", - "IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG", "NATIVE", "NEW", "PACKAGE", - "PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "SHORT", "STATIC", "STRICTFP", - "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", "TRANSIENT", - "TRY", "VOID", "VOLATILE", "WHILE", "IntegerLiteral", "DecimalIntegerLiteral", - "HexIntegerLiteral", "OctalIntegerLiteral", "BinaryIntegerLiteral", "IntegerTypeSuffix", - "DecimalNumeral", "Digits", "Digit", "NonZeroDigit", "DigitOrUnderscore", - "Underscores", "HexNumeral", "HexDigits", "HexDigit", "HexDigitOrUnderscore", - "OctalNumeral", "OctalDigits", "OctalDigit", "OctalDigitOrUnderscore", - "BinaryNumeral", "BinaryDigits", "BinaryDigit", "BinaryDigitOrUnderscore", - "FloatingPointLiteral", "DecimalFloatingPointLiteral", "ExponentPart", - "ExponentIndicator", "SignedInteger", "Sign", "FloatTypeSuffix", "HexadecimalFloatingPointLiteral", - "HexSignificand", "BinaryExponent", "BinaryExponentIndicator", "BooleanLiteral", - "CharacterLiteral", "SingleCharacter", "StringLiteral", "StringCharacters", - "StringCharacter", "EscapeSequence", "OctalEscape", "UnicodeEscape", "ZeroToThree", - "NullLiteral", "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", - "SEMI", "COMMA", "DOT", "ASSIGN", "GT", "LT", "BANG", "TILDE", "QUESTION", - "COLON", "EQUAL", "LE", "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", "ADD", - "SUB", "MUL", "DIV", "BITAND", "BITOR", "CARET", "MOD", "ADD_ASSIGN", - "SUB_ASSIGN", "MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", - "MOD_ASSIGN", "LSHIFT_ASSIGN", "RSHIFT_ASSIGN", "URSHIFT_ASSIGN", "Identifier", - "JavaLetter", "JavaLetterOrDigit", "AT", "ELLIPSIS", "WS", "COMMENT", - "LINE_COMMENT" - }; - - - public Java8Lexer(CharStream input) { - super(input); - _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); - } - - @Override - public String getGrammarFileName() { return "Java8.g4"; } - - @Override - public String[] getTokenNames() { return tokenNames; } - - @Override - public String[] getRuleNames() { return ruleNames; } - - @Override - public String getSerializedATN() { return _serializedATN; } - - @Override - public String[] getModeNames() { return modeNames; } - - @Override - public ATN getATN() { return _ATN; } - - @Override - public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { - switch (ruleIndex) { - case 140: return JavaLetter_sempred((RuleContext)_localctx, predIndex); - case 141: return JavaLetterOrDigit_sempred((RuleContext)_localctx, predIndex); - } - return true; - } - private boolean JavaLetterOrDigit_sempred(RuleContext _localctx, int predIndex) { - switch (predIndex) { - case 2: return Character.isJavaIdentifierPart(_input.LA(-1)); - case 3: return Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1))); - } - return true; - } - private boolean JavaLetter_sempred(RuleContext _localctx, int predIndex) { - switch (predIndex) { - case 0: return Character.isJavaIdentifierStart(_input.LA(-1)); - case 1: return Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1))); - } - return true; - } - - public static final String _serializedATN = - "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2k\u042e\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"+ - "\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\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ - "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ - ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ - "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ - "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ - "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ - "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ - "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\t"+ - "k\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv\4"+ - "w\tw\4x\tx\4y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t\u0080"+ - "\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083\4\u0084\t\u0084\4\u0085"+ - "\t\u0085\4\u0086\t\u0086\4\u0087\t\u0087\4\u0088\t\u0088\4\u0089\t\u0089"+ - "\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"+ - "\4\u0093\t\u0093\4\u0094\t\u0094\3\2\3\2\3\2\3\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\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\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\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\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\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\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\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\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\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\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\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\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!\3!\3!\3!\3!\3\"\3\"\3"+ - "\"\3\"\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3$\3$\3$\3$\3$\3"+ - "$\3$\3%\3%\3%\3%\3%\3%\3%\3&\3&\3&\3&\3&\3&\3\'\3\'\3\'\3\'\3\'\3\'\3"+ - "\'\3(\3(\3(\3(\3(\3(\3(\3(\3(\3)\3)\3)\3)\3)\3)\3*\3*\3*\3*\3*\3*\3*\3"+ - "+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3,\3,\3,\3,\3,\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\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\64\3\64\5\64\u0281\n\64"+ - "\3\65\3\65\5\65\u0285\n\65\3\66\3\66\5\66\u0289\n\66\3\67\3\67\5\67\u028d"+ - "\n\67\38\38\58\u0291\n8\39\39\3:\3:\3:\5:\u0298\n:\3:\3:\3:\5:\u029d\n"+ - ":\5:\u029f\n:\3;\3;\7;\u02a3\n;\f;\16;\u02a6\13;\3;\5;\u02a9\n;\3<\3<"+ - "\5<\u02ad\n<\3=\3=\3>\3>\5>\u02b3\n>\3?\6?\u02b6\n?\r?\16?\u02b7\3@\3"+ - "@\3@\3@\3A\3A\7A\u02c0\nA\fA\16A\u02c3\13A\3A\5A\u02c6\nA\3B\3B\3C\3C"+ - "\5C\u02cc\nC\3D\3D\5D\u02d0\nD\3D\3D\3E\3E\7E\u02d6\nE\fE\16E\u02d9\13"+ - "E\3E\5E\u02dc\nE\3F\3F\3G\3G\5G\u02e2\nG\3H\3H\3H\3H\3I\3I\7I\u02ea\n"+ - "I\fI\16I\u02ed\13I\3I\5I\u02f0\nI\3J\3J\3K\3K\5K\u02f6\nK\3L\3L\5L\u02fa"+ - "\nL\3M\3M\3M\5M\u02ff\nM\3M\5M\u0302\nM\3M\5M\u0305\nM\3M\3M\3M\5M\u030a"+ - "\nM\3M\5M\u030d\nM\3M\3M\3M\5M\u0312\nM\3M\3M\3M\5M\u0317\nM\3N\3N\3N"+ - "\3O\3O\3P\5P\u031f\nP\3P\3P\3Q\3Q\3R\3R\3S\3S\3S\5S\u032a\nS\3T\3T\5T"+ - "\u032e\nT\3T\3T\3T\5T\u0333\nT\3T\3T\5T\u0337\nT\3U\3U\3U\3V\3V\3W\3W"+ - "\3W\3W\3W\3W\3W\3W\3W\5W\u0347\nW\3X\3X\3X\3X\3X\3X\3X\3X\5X\u0351\nX"+ - "\3Y\3Y\3Z\3Z\5Z\u0357\nZ\3Z\3Z\3[\6[\u035c\n[\r[\16[\u035d\3\\\3\\\5\\"+ - "\u0362\n\\\3]\3]\3]\3]\5]\u0368\n]\3^\3^\3^\3^\3^\3^\3^\3^\3^\3^\3^\5"+ - "^\u0375\n^\3_\3_\3_\3_\3_\3_\3_\3`\3`\3a\3a\3a\3a\3a\3b\3b\3c\3c\3d\3"+ - "d\3e\3e\3f\3f\3g\3g\3h\3h\3i\3i\3j\3j\3k\3k\3l\3l\3m\3m\3n\3n\3o\3o\3"+ - "p\3p\3q\3q\3r\3r\3r\3s\3s\3s\3t\3t\3t\3u\3u\3u\3v\3v\3v\3w\3w\3w\3x\3"+ - "x\3x\3y\3y\3y\3z\3z\3{\3{\3|\3|\3}\3}\3~\3~\3\177\3\177\3\u0080\3\u0080"+ - "\3\u0081\3\u0081\3\u0082\3\u0082\3\u0082\3\u0083\3\u0083\3\u0083\3\u0084"+ - "\3\u0084\3\u0084\3\u0085\3\u0085\3\u0085\3\u0086\3\u0086\3\u0086\3\u0087"+ - "\3\u0087\3\u0087\3\u0088\3\u0088\3\u0088\3\u0089\3\u0089\3\u0089\3\u008a"+ - "\3\u008a\3\u008a\3\u008a\3\u008b\3\u008b\3\u008b\3\u008b\3\u008c\3\u008c"+ - "\3\u008c\3\u008c\3\u008c\3\u008d\3\u008d\7\u008d\u03f4\n\u008d\f\u008d"+ - "\16\u008d\u03f7\13\u008d\3\u008e\3\u008e\3\u008e\3\u008e\3\u008e\3\u008e"+ - "\5\u008e\u03ff\n\u008e\3\u008f\3\u008f\3\u008f\3\u008f\3\u008f\3\u008f"+ - "\5\u008f\u0407\n\u008f\3\u0090\3\u0090\3\u0091\3\u0091\3\u0091\3\u0091"+ - "\3\u0092\6\u0092\u0410\n\u0092\r\u0092\16\u0092\u0411\3\u0092\3\u0092"+ - "\3\u0093\3\u0093\3\u0093\3\u0093\7\u0093\u041a\n\u0093\f\u0093\16\u0093"+ - "\u041d\13\u0093\3\u0093\3\u0093\3\u0093\3\u0093\3\u0093\3\u0094\3\u0094"+ - "\3\u0094\3\u0094\7\u0094\u0428\n\u0094\f\u0094\16\u0094\u042b\13\u0094"+ - "\3\u0094\3\u0094\3\u041b\2\u0095\3\3\5\4\7\5\t\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%\24\'\25)\26+\27-\30/\31"+ - "\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'M(O)Q*S+U,W-Y.[/]\60"+ - "_\61a\62c\63e\64g\65i\2k\2m\2o\2q\2s\2u\2w\2y\2{\2}\2\177\2\u0081\2\u0083"+ - "\2\u0085\2\u0087\2\u0089\2\u008b\2\u008d\2\u008f\2\u0091\2\u0093\2\u0095"+ - "\2\u0097\66\u0099\2\u009b\2\u009d\2\u009f\2\u00a1\2\u00a3\2\u00a5\2\u00a7"+ - "\2\u00a9\2\u00ab\2\u00ad\67\u00af8\u00b1\2\u00b39\u00b5\2\u00b7\2\u00b9"+ - "\2\u00bb\2\u00bd\2\u00bf\2\u00c1:\u00c3;\u00c5<\u00c7=\u00c9>\u00cb?\u00cd"+ - "@\u00cfA\u00d1B\u00d3C\u00d5D\u00d7E\u00d9F\u00dbG\u00ddH\u00dfI\u00e1"+ - "J\u00e3K\u00e5L\u00e7M\u00e9N\u00ebO\u00edP\u00efQ\u00f1R\u00f3S\u00f5"+ - "T\u00f7U\u00f9V\u00fbW\u00fdX\u00ffY\u0101Z\u0103[\u0105\\\u0107]\u0109"+ - "^\u010b_\u010d`\u010fa\u0111b\u0113c\u0115d\u0117e\u0119f\u011b\2\u011d"+ - "\2\u011fg\u0121h\u0123i\u0125j\u0127k\3\2\30\4\2NNnn\3\2\63;\4\2ZZzz\5"+ - "\2\62;CHch\3\2\629\4\2DDdd\3\2\62\63\4\2GGgg\4\2--//\6\2FFHHffhh\4\2R"+ - "Rrr\4\2))^^\4\2$$^^\n\2$$))^^ddhhppttvv\3\2\62\65\6\2&&C\\aac|\4\2\2\u0101"+ - "\ud802\udc01\3\2\ud802\udc01\3\2\udc02\ue001\7\2&&\62;C\\aac|\5\2\13\f"+ - "\16\17\"\"\4\2\f\f\17\17\u043c\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t"+ - "\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2"+ - "\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2"+ - "\37\3\2\2\2\2!\3\2\2\2\2#\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\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2"+ - "\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2"+ - "C\3\2\2\2\2E\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\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_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2"+ - "\u0097\3\2\2\2\2\u00ad\3\2\2\2\2\u00af\3\2\2\2\2\u00b3\3\2\2\2\2\u00c1"+ - "\3\2\2\2\2\u00c3\3\2\2\2\2\u00c5\3\2\2\2\2\u00c7\3\2\2\2\2\u00c9\3\2\2"+ - "\2\2\u00cb\3\2\2\2\2\u00cd\3\2\2\2\2\u00cf\3\2\2\2\2\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\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\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\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\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\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\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\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\2\2\u0119\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\u0127\3\2\2"+ - "\2\3\u0129\3\2\2\2\5\u0132\3\2\2\2\7\u0139\3\2\2\2\t\u0141\3\2\2\2\13"+ - "\u0147\3\2\2\2\r\u014c\3\2\2\2\17\u0151\3\2\2\2\21\u0157\3\2\2\2\23\u015c"+ - "\3\2\2\2\25\u0162\3\2\2\2\27\u0168\3\2\2\2\31\u0171\3\2\2\2\33\u0179\3"+ - "\2\2\2\35\u017c\3\2\2\2\37\u0183\3\2\2\2!\u0188\3\2\2\2#\u018d\3\2\2\2"+ - "%\u0195\3\2\2\2\'\u019b\3\2\2\2)\u01a3\3\2\2\2+\u01a9\3\2\2\2-\u01ad\3"+ - "\2\2\2/\u01b0\3\2\2\2\61\u01b5\3\2\2\2\63\u01c0\3\2\2\2\65\u01c7\3\2\2"+ - "\2\67\u01d2\3\2\2\29\u01d6\3\2\2\2;\u01e0\3\2\2\2=\u01e5\3\2\2\2?\u01ec"+ - "\3\2\2\2A\u01f0\3\2\2\2C\u01f8\3\2\2\2E\u0200\3\2\2\2G\u020a\3\2\2\2I"+ - "\u0211\3\2\2\2K\u0218\3\2\2\2M\u021e\3\2\2\2O\u0225\3\2\2\2Q\u022e\3\2"+ - "\2\2S\u0234\3\2\2\2U\u023b\3\2\2\2W\u0248\3\2\2\2Y\u024d\3\2\2\2[\u0253"+ - "\3\2\2\2]\u025a\3\2\2\2_\u0264\3\2\2\2a\u0268\3\2\2\2c\u026d\3\2\2\2e"+ - "\u0276\3\2\2\2g\u0280\3\2\2\2i\u0282\3\2\2\2k\u0286\3\2\2\2m\u028a\3\2"+ - "\2\2o\u028e\3\2\2\2q\u0292\3\2\2\2s\u029e\3\2\2\2u\u02a0\3\2\2\2w\u02ac"+ - "\3\2\2\2y\u02ae\3\2\2\2{\u02b2\3\2\2\2}\u02b5\3\2\2\2\177\u02b9\3\2\2"+ - "\2\u0081\u02bd\3\2\2\2\u0083\u02c7\3\2\2\2\u0085\u02cb\3\2\2\2\u0087\u02cd"+ - "\3\2\2\2\u0089\u02d3\3\2\2\2\u008b\u02dd\3\2\2\2\u008d\u02e1\3\2\2\2\u008f"+ - "\u02e3\3\2\2\2\u0091\u02e7\3\2\2\2\u0093\u02f1\3\2\2\2\u0095\u02f5\3\2"+ - "\2\2\u0097\u02f9\3\2\2\2\u0099\u0316\3\2\2\2\u009b\u0318\3\2\2\2\u009d"+ - "\u031b\3\2\2\2\u009f\u031e\3\2\2\2\u00a1\u0322\3\2\2\2\u00a3\u0324\3\2"+ - "\2\2\u00a5\u0326\3\2\2\2\u00a7\u0336\3\2\2\2\u00a9\u0338\3\2\2\2\u00ab"+ - "\u033b\3\2\2\2\u00ad\u0346\3\2\2\2\u00af\u0350\3\2\2\2\u00b1\u0352\3\2"+ - "\2\2\u00b3\u0354\3\2\2\2\u00b5\u035b\3\2\2\2\u00b7\u0361\3\2\2\2\u00b9"+ - "\u0367\3\2\2\2\u00bb\u0374\3\2\2\2\u00bd\u0376\3\2\2\2\u00bf\u037d\3\2"+ - "\2\2\u00c1\u037f\3\2\2\2\u00c3\u0384\3\2\2\2\u00c5\u0386\3\2\2\2\u00c7"+ - "\u0388\3\2\2\2\u00c9\u038a\3\2\2\2\u00cb\u038c\3\2\2\2\u00cd\u038e\3\2"+ - "\2\2\u00cf\u0390\3\2\2\2\u00d1\u0392\3\2\2\2\u00d3\u0394\3\2\2\2\u00d5"+ - "\u0396\3\2\2\2\u00d7\u0398\3\2\2\2\u00d9\u039a\3\2\2\2\u00db\u039c\3\2"+ - "\2\2\u00dd\u039e\3\2\2\2\u00df\u03a0\3\2\2\2\u00e1\u03a2\3\2\2\2\u00e3"+ - "\u03a4\3\2\2\2\u00e5\u03a7\3\2\2\2\u00e7\u03aa\3\2\2\2\u00e9\u03ad\3\2"+ - "\2\2\u00eb\u03b0\3\2\2\2\u00ed\u03b3\3\2\2\2\u00ef\u03b6\3\2\2\2\u00f1"+ - "\u03b9\3\2\2\2\u00f3\u03bc\3\2\2\2\u00f5\u03be\3\2\2\2\u00f7\u03c0\3\2"+ - "\2\2\u00f9\u03c2\3\2\2\2\u00fb\u03c4\3\2\2\2\u00fd\u03c6\3\2\2\2\u00ff"+ - "\u03c8\3\2\2\2\u0101\u03ca\3\2\2\2\u0103\u03cc\3\2\2\2\u0105\u03cf\3\2"+ - "\2\2\u0107\u03d2\3\2\2\2\u0109\u03d5\3\2\2\2\u010b\u03d8\3\2\2\2\u010d"+ - "\u03db\3\2\2\2\u010f\u03de\3\2\2\2\u0111\u03e1\3\2\2\2\u0113\u03e4\3\2"+ - "\2\2\u0115\u03e8\3\2\2\2\u0117\u03ec\3\2\2\2\u0119\u03f1\3\2\2\2\u011b"+ - "\u03fe\3\2\2\2\u011d\u0406\3\2\2\2\u011f\u0408\3\2\2\2\u0121\u040a\3\2"+ - "\2\2\u0123\u040f\3\2\2\2\u0125\u0415\3\2\2\2\u0127\u0423\3\2\2\2\u0129"+ - "\u012a\7c\2\2\u012a\u012b\7d\2\2\u012b\u012c\7u\2\2\u012c\u012d\7v\2\2"+ - "\u012d\u012e\7t\2\2\u012e\u012f\7c\2\2\u012f\u0130\7e\2\2\u0130\u0131"+ - "\7v\2\2\u0131\4\3\2\2\2\u0132\u0133\7c\2\2\u0133\u0134\7u\2\2\u0134\u0135"+ - "\7u\2\2\u0135\u0136\7g\2\2\u0136\u0137\7t\2\2\u0137\u0138\7v\2\2\u0138"+ - "\6\3\2\2\2\u0139\u013a\7d\2\2\u013a\u013b\7q\2\2\u013b\u013c\7q\2\2\u013c"+ - "\u013d\7n\2\2\u013d\u013e\7g\2\2\u013e\u013f\7c\2\2\u013f\u0140\7p\2\2"+ - "\u0140\b\3\2\2\2\u0141\u0142\7d\2\2\u0142\u0143\7t\2\2\u0143\u0144\7g"+ - "\2\2\u0144\u0145\7c\2\2\u0145\u0146\7m\2\2\u0146\n\3\2\2\2\u0147\u0148"+ - "\7d\2\2\u0148\u0149\7{\2\2\u0149\u014a\7v\2\2\u014a\u014b\7g\2\2\u014b"+ - "\f\3\2\2\2\u014c\u014d\7e\2\2\u014d\u014e\7c\2\2\u014e\u014f\7u\2\2\u014f"+ - "\u0150\7g\2\2\u0150\16\3\2\2\2\u0151\u0152\7e\2\2\u0152\u0153\7c\2\2\u0153"+ - "\u0154\7v\2\2\u0154\u0155\7e\2\2\u0155\u0156\7j\2\2\u0156\20\3\2\2\2\u0157"+ - "\u0158\7e\2\2\u0158\u0159\7j\2\2\u0159\u015a\7c\2\2\u015a\u015b\7t\2\2"+ - "\u015b\22\3\2\2\2\u015c\u015d\7e\2\2\u015d\u015e\7n\2\2\u015e\u015f\7"+ - "c\2\2\u015f\u0160\7u\2\2\u0160\u0161\7u\2\2\u0161\24\3\2\2\2\u0162\u0163"+ - "\7e\2\2\u0163\u0164\7q\2\2\u0164\u0165\7p\2\2\u0165\u0166\7u\2\2\u0166"+ - "\u0167\7v\2\2\u0167\26\3\2\2\2\u0168\u0169\7e\2\2\u0169\u016a\7q\2\2\u016a"+ - "\u016b\7p\2\2\u016b\u016c\7v\2\2\u016c\u016d\7k\2\2\u016d\u016e\7p\2\2"+ - "\u016e\u016f\7w\2\2\u016f\u0170\7g\2\2\u0170\30\3\2\2\2\u0171\u0172\7"+ - "f\2\2\u0172\u0173\7g\2\2\u0173\u0174\7h\2\2\u0174\u0175\7c\2\2\u0175\u0176"+ - "\7w\2\2\u0176\u0177\7n\2\2\u0177\u0178\7v\2\2\u0178\32\3\2\2\2\u0179\u017a"+ - "\7f\2\2\u017a\u017b\7q\2\2\u017b\34\3\2\2\2\u017c\u017d\7f\2\2\u017d\u017e"+ - "\7q\2\2\u017e\u017f\7w\2\2\u017f\u0180\7d\2\2\u0180\u0181\7n\2\2\u0181"+ - "\u0182\7g\2\2\u0182\36\3\2\2\2\u0183\u0184\7g\2\2\u0184\u0185\7n\2\2\u0185"+ - "\u0186\7u\2\2\u0186\u0187\7g\2\2\u0187 \3\2\2\2\u0188\u0189\7g\2\2\u0189"+ - "\u018a\7p\2\2\u018a\u018b\7w\2\2\u018b\u018c\7o\2\2\u018c\"\3\2\2\2\u018d"+ - "\u018e\7g\2\2\u018e\u018f\7z\2\2\u018f\u0190\7v\2\2\u0190\u0191\7g\2\2"+ - "\u0191\u0192\7p\2\2\u0192\u0193\7f\2\2\u0193\u0194\7u\2\2\u0194$\3\2\2"+ - "\2\u0195\u0196\7h\2\2\u0196\u0197\7k\2\2\u0197\u0198\7p\2\2\u0198\u0199"+ - "\7c\2\2\u0199\u019a\7n\2\2\u019a&\3\2\2\2\u019b\u019c\7h\2\2\u019c\u019d"+ - "\7k\2\2\u019d\u019e\7p\2\2\u019e\u019f\7c\2\2\u019f\u01a0\7n\2\2\u01a0"+ - "\u01a1\7n\2\2\u01a1\u01a2\7{\2\2\u01a2(\3\2\2\2\u01a3\u01a4\7h\2\2\u01a4"+ - "\u01a5\7n\2\2\u01a5\u01a6\7q\2\2\u01a6\u01a7\7c\2\2\u01a7\u01a8\7v\2\2"+ - "\u01a8*\3\2\2\2\u01a9\u01aa\7h\2\2\u01aa\u01ab\7q\2\2\u01ab\u01ac\7t\2"+ - "\2\u01ac,\3\2\2\2\u01ad\u01ae\7k\2\2\u01ae\u01af\7h\2\2\u01af.\3\2\2\2"+ - "\u01b0\u01b1\7i\2\2\u01b1\u01b2\7q\2\2\u01b2\u01b3\7v\2\2\u01b3\u01b4"+ - "\7q\2\2\u01b4\60\3\2\2\2\u01b5\u01b6\7k\2\2\u01b6\u01b7\7o\2\2\u01b7\u01b8"+ - "\7r\2\2\u01b8\u01b9\7n\2\2\u01b9\u01ba\7g\2\2\u01ba\u01bb\7o\2\2\u01bb"+ - "\u01bc\7g\2\2\u01bc\u01bd\7p\2\2\u01bd\u01be\7v\2\2\u01be\u01bf\7u\2\2"+ - "\u01bf\62\3\2\2\2\u01c0\u01c1\7k\2\2\u01c1\u01c2\7o\2\2\u01c2\u01c3\7"+ - "r\2\2\u01c3\u01c4\7q\2\2\u01c4\u01c5\7t\2\2\u01c5\u01c6\7v\2\2\u01c6\64"+ - "\3\2\2\2\u01c7\u01c8\7k\2\2\u01c8\u01c9\7p\2\2\u01c9\u01ca\7u\2\2\u01ca"+ - "\u01cb\7v\2\2\u01cb\u01cc\7c\2\2\u01cc\u01cd\7p\2\2\u01cd\u01ce\7e\2\2"+ - "\u01ce\u01cf\7g\2\2\u01cf\u01d0\7q\2\2\u01d0\u01d1\7h\2\2\u01d1\66\3\2"+ - "\2\2\u01d2\u01d3\7k\2\2\u01d3\u01d4\7p\2\2\u01d4\u01d5\7v\2\2\u01d58\3"+ - "\2\2\2\u01d6\u01d7\7k\2\2\u01d7\u01d8\7p\2\2\u01d8\u01d9\7v\2\2\u01d9"+ - "\u01da\7g\2\2\u01da\u01db\7t\2\2\u01db\u01dc\7h\2\2\u01dc\u01dd\7c\2\2"+ - "\u01dd\u01de\7e\2\2\u01de\u01df\7g\2\2\u01df:\3\2\2\2\u01e0\u01e1\7n\2"+ - "\2\u01e1\u01e2\7q\2\2\u01e2\u01e3\7p\2\2\u01e3\u01e4\7i\2\2\u01e4<\3\2"+ - "\2\2\u01e5\u01e6\7p\2\2\u01e6\u01e7\7c\2\2\u01e7\u01e8\7v\2\2\u01e8\u01e9"+ - "\7k\2\2\u01e9\u01ea\7x\2\2\u01ea\u01eb\7g\2\2\u01eb>\3\2\2\2\u01ec\u01ed"+ - "\7p\2\2\u01ed\u01ee\7g\2\2\u01ee\u01ef\7y\2\2\u01ef@\3\2\2\2\u01f0\u01f1"+ - "\7r\2\2\u01f1\u01f2\7c\2\2\u01f2\u01f3\7e\2\2\u01f3\u01f4\7m\2\2\u01f4"+ - "\u01f5\7c\2\2\u01f5\u01f6\7i\2\2\u01f6\u01f7\7g\2\2\u01f7B\3\2\2\2\u01f8"+ - "\u01f9\7r\2\2\u01f9\u01fa\7t\2\2\u01fa\u01fb\7k\2\2\u01fb\u01fc\7x\2\2"+ - "\u01fc\u01fd\7c\2\2\u01fd\u01fe\7v\2\2\u01fe\u01ff\7g\2\2\u01ffD\3\2\2"+ - "\2\u0200\u0201\7r\2\2\u0201\u0202\7t\2\2\u0202\u0203\7q\2\2\u0203\u0204"+ - "\7v\2\2\u0204\u0205\7g\2\2\u0205\u0206\7e\2\2\u0206\u0207\7v\2\2\u0207"+ - "\u0208\7g\2\2\u0208\u0209\7f\2\2\u0209F\3\2\2\2\u020a\u020b\7r\2\2\u020b"+ - "\u020c\7w\2\2\u020c\u020d\7d\2\2\u020d\u020e\7n\2\2\u020e\u020f\7k\2\2"+ - "\u020f\u0210\7e\2\2\u0210H\3\2\2\2\u0211\u0212\7t\2\2\u0212\u0213\7g\2"+ - "\2\u0213\u0214\7v\2\2\u0214\u0215\7w\2\2\u0215\u0216\7t\2\2\u0216\u0217"+ - "\7p\2\2\u0217J\3\2\2\2\u0218\u0219\7u\2\2\u0219\u021a\7j\2\2\u021a\u021b"+ - "\7q\2\2\u021b\u021c\7t\2\2\u021c\u021d\7v\2\2\u021dL\3\2\2\2\u021e\u021f"+ - "\7u\2\2\u021f\u0220\7v\2\2\u0220\u0221\7c\2\2\u0221\u0222\7v\2\2\u0222"+ - "\u0223\7k\2\2\u0223\u0224\7e\2\2\u0224N\3\2\2\2\u0225\u0226\7u\2\2\u0226"+ - "\u0227\7v\2\2\u0227\u0228\7t\2\2\u0228\u0229\7k\2\2\u0229\u022a\7e\2\2"+ - "\u022a\u022b\7v\2\2\u022b\u022c\7h\2\2\u022c\u022d\7r\2\2\u022dP\3\2\2"+ - "\2\u022e\u022f\7u\2\2\u022f\u0230\7w\2\2\u0230\u0231\7r\2\2\u0231\u0232"+ - "\7g\2\2\u0232\u0233\7t\2\2\u0233R\3\2\2\2\u0234\u0235\7u\2\2\u0235\u0236"+ - "\7y\2\2\u0236\u0237\7k\2\2\u0237\u0238\7v\2\2\u0238\u0239\7e\2\2\u0239"+ - "\u023a\7j\2\2\u023aT\3\2\2\2\u023b\u023c\7u\2\2\u023c\u023d\7{\2\2\u023d"+ - "\u023e\7p\2\2\u023e\u023f\7e\2\2\u023f\u0240\7j\2\2\u0240\u0241\7t\2\2"+ - "\u0241\u0242\7q\2\2\u0242\u0243\7p\2\2\u0243\u0244\7k\2\2\u0244\u0245"+ - "\7|\2\2\u0245\u0246\7g\2\2\u0246\u0247\7f\2\2\u0247V\3\2\2\2\u0248\u0249"+ - "\7v\2\2\u0249\u024a\7j\2\2\u024a\u024b\7k\2\2\u024b\u024c\7u\2\2\u024c"+ - "X\3\2\2\2\u024d\u024e\7v\2\2\u024e\u024f\7j\2\2\u024f\u0250\7t\2\2\u0250"+ - "\u0251\7q\2\2\u0251\u0252\7y\2\2\u0252Z\3\2\2\2\u0253\u0254\7v\2\2\u0254"+ - "\u0255\7j\2\2\u0255\u0256\7t\2\2\u0256\u0257\7q\2\2\u0257\u0258\7y\2\2"+ - "\u0258\u0259\7u\2\2\u0259\\\3\2\2\2\u025a\u025b\7v\2\2\u025b\u025c\7t"+ - "\2\2\u025c\u025d\7c\2\2\u025d\u025e\7p\2\2\u025e\u025f\7u\2\2\u025f\u0260"+ - "\7k\2\2\u0260\u0261\7g\2\2\u0261\u0262\7p\2\2\u0262\u0263\7v\2\2\u0263"+ - "^\3\2\2\2\u0264\u0265\7v\2\2\u0265\u0266\7t\2\2\u0266\u0267\7{\2\2\u0267"+ - "`\3\2\2\2\u0268\u0269\7x\2\2\u0269\u026a\7q\2\2\u026a\u026b\7k\2\2\u026b"+ - "\u026c\7f\2\2\u026cb\3\2\2\2\u026d\u026e\7x\2\2\u026e\u026f\7q\2\2\u026f"+ - "\u0270\7n\2\2\u0270\u0271\7c\2\2\u0271\u0272\7v\2\2\u0272\u0273\7k\2\2"+ - "\u0273\u0274\7n\2\2\u0274\u0275\7g\2\2\u0275d\3\2\2\2\u0276\u0277\7y\2"+ - "\2\u0277\u0278\7j\2\2\u0278\u0279\7k\2\2\u0279\u027a\7n\2\2\u027a\u027b"+ - "\7g\2\2\u027bf\3\2\2\2\u027c\u0281\5i\65\2\u027d\u0281\5k\66\2\u027e\u0281"+ - "\5m\67\2\u027f\u0281\5o8\2\u0280\u027c\3\2\2\2\u0280\u027d\3\2\2\2\u0280"+ - "\u027e\3\2\2\2\u0280\u027f\3\2\2\2\u0281h\3\2\2\2\u0282\u0284\5s:\2\u0283"+ - "\u0285\5q9\2\u0284\u0283\3\2\2\2\u0284\u0285\3\2\2\2\u0285j\3\2\2\2\u0286"+ - "\u0288\5\177@\2\u0287\u0289\5q9\2\u0288\u0287\3\2\2\2\u0288\u0289\3\2"+ - "\2\2\u0289l\3\2\2\2\u028a\u028c\5\u0087D\2\u028b\u028d\5q9\2\u028c\u028b"+ - "\3\2\2\2\u028c\u028d\3\2\2\2\u028dn\3\2\2\2\u028e\u0290\5\u008fH\2\u028f"+ - "\u0291\5q9\2\u0290\u028f\3\2\2\2\u0290\u0291\3\2\2\2\u0291p\3\2\2\2\u0292"+ - "\u0293\t\2\2\2\u0293r\3\2\2\2\u0294\u029f\7\62\2\2\u0295\u029c\5y=\2\u0296"+ - "\u0298\5u;\2\u0297\u0296\3\2\2\2\u0297\u0298\3\2\2\2\u0298\u029d\3\2\2"+ - "\2\u0299\u029a\5}?\2\u029a\u029b\5u;\2\u029b\u029d\3\2\2\2\u029c\u0297"+ - "\3\2\2\2\u029c\u0299\3\2\2\2\u029d\u029f\3\2\2\2\u029e\u0294\3\2\2\2\u029e"+ - "\u0295\3\2\2\2\u029ft\3\2\2\2\u02a0\u02a8\5w<\2\u02a1\u02a3\5{>\2\u02a2"+ - "\u02a1\3\2\2\2\u02a3\u02a6\3\2\2\2\u02a4\u02a2\3\2\2\2\u02a4\u02a5\3\2"+ - "\2\2\u02a5\u02a7\3\2\2\2\u02a6\u02a4\3\2\2\2\u02a7\u02a9\5w<\2\u02a8\u02a4"+ - "\3\2\2\2\u02a8\u02a9\3\2\2\2\u02a9v\3\2\2\2\u02aa\u02ad\7\62\2\2\u02ab"+ - "\u02ad\5y=\2\u02ac\u02aa\3\2\2\2\u02ac\u02ab\3\2\2\2\u02adx\3\2\2\2\u02ae"+ - "\u02af\t\3\2\2\u02afz\3\2\2\2\u02b0\u02b3\5w<\2\u02b1\u02b3\7a\2\2\u02b2"+ - "\u02b0\3\2\2\2\u02b2\u02b1\3\2\2\2\u02b3|\3\2\2\2\u02b4\u02b6\7a\2\2\u02b5"+ - "\u02b4\3\2\2\2\u02b6\u02b7\3\2\2\2\u02b7\u02b5\3\2\2\2\u02b7\u02b8\3\2"+ - "\2\2\u02b8~\3\2\2\2\u02b9\u02ba\7\62\2\2\u02ba\u02bb\t\4\2\2\u02bb\u02bc"+ - "\5\u0081A\2\u02bc\u0080\3\2\2\2\u02bd\u02c5\5\u0083B\2\u02be\u02c0\5\u0085"+ - "C\2\u02bf\u02be\3\2\2\2\u02c0\u02c3\3\2\2\2\u02c1\u02bf\3\2\2\2\u02c1"+ - "\u02c2\3\2\2\2\u02c2\u02c4\3\2\2\2\u02c3\u02c1\3\2\2\2\u02c4\u02c6\5\u0083"+ - "B\2\u02c5\u02c1\3\2\2\2\u02c5\u02c6\3\2\2\2\u02c6\u0082\3\2\2\2\u02c7"+ - "\u02c8\t\5\2\2\u02c8\u0084\3\2\2\2\u02c9\u02cc\5\u0083B\2\u02ca\u02cc"+ - "\7a\2\2\u02cb\u02c9\3\2\2\2\u02cb\u02ca\3\2\2\2\u02cc\u0086\3\2\2\2\u02cd"+ - "\u02cf\7\62\2\2\u02ce\u02d0\5}?\2\u02cf\u02ce\3\2\2\2\u02cf\u02d0\3\2"+ - "\2\2\u02d0\u02d1\3\2\2\2\u02d1\u02d2\5\u0089E\2\u02d2\u0088\3\2\2\2\u02d3"+ - "\u02db\5\u008bF\2\u02d4\u02d6\5\u008dG\2\u02d5\u02d4\3\2\2\2\u02d6\u02d9"+ - "\3\2\2\2\u02d7\u02d5\3\2\2\2\u02d7\u02d8\3\2\2\2\u02d8\u02da\3\2\2\2\u02d9"+ - "\u02d7\3\2\2\2\u02da\u02dc\5\u008bF\2\u02db\u02d7\3\2\2\2\u02db\u02dc"+ - "\3\2\2\2\u02dc\u008a\3\2\2\2\u02dd\u02de\t\6\2\2\u02de\u008c\3\2\2\2\u02df"+ - "\u02e2\5\u008bF\2\u02e0\u02e2\7a\2\2\u02e1\u02df\3\2\2\2\u02e1\u02e0\3"+ - "\2\2\2\u02e2\u008e\3\2\2\2\u02e3\u02e4\7\62\2\2\u02e4\u02e5\t\7\2\2\u02e5"+ - "\u02e6\5\u0091I\2\u02e6\u0090\3\2\2\2\u02e7\u02ef\5\u0093J\2\u02e8\u02ea"+ - "\5\u0095K\2\u02e9\u02e8\3\2\2\2\u02ea\u02ed\3\2\2\2\u02eb\u02e9\3\2\2"+ - "\2\u02eb\u02ec\3\2\2\2\u02ec\u02ee\3\2\2\2\u02ed\u02eb\3\2\2\2\u02ee\u02f0"+ - "\5\u0093J\2\u02ef\u02eb\3\2\2\2\u02ef\u02f0\3\2\2\2\u02f0\u0092\3\2\2"+ - "\2\u02f1\u02f2\t\b\2\2\u02f2\u0094\3\2\2\2\u02f3\u02f6\5\u0093J\2\u02f4"+ - "\u02f6\7a\2\2\u02f5\u02f3\3\2\2\2\u02f5\u02f4\3\2\2\2\u02f6\u0096\3\2"+ - "\2\2\u02f7\u02fa\5\u0099M\2\u02f8\u02fa\5\u00a5S\2\u02f9\u02f7\3\2\2\2"+ - "\u02f9\u02f8\3\2\2\2\u02fa\u0098\3\2\2\2\u02fb\u02fc\5u;\2\u02fc\u02fe"+ - "\7\60\2\2\u02fd\u02ff\5u;\2\u02fe\u02fd\3\2\2\2\u02fe\u02ff\3\2\2\2\u02ff"+ - "\u0301\3\2\2\2\u0300\u0302\5\u009bN\2\u0301\u0300\3\2\2\2\u0301\u0302"+ - "\3\2\2\2\u0302\u0304\3\2\2\2\u0303\u0305\5\u00a3R\2\u0304\u0303\3\2\2"+ - "\2\u0304\u0305\3\2\2\2\u0305\u0317\3\2\2\2\u0306\u0307\7\60\2\2\u0307"+ - "\u0309\5u;\2\u0308\u030a\5\u009bN\2\u0309\u0308\3\2\2\2\u0309\u030a\3"+ - "\2\2\2\u030a\u030c\3\2\2\2\u030b\u030d\5\u00a3R\2\u030c\u030b\3\2\2\2"+ - "\u030c\u030d\3\2\2\2\u030d\u0317\3\2\2\2\u030e\u030f\5u;\2\u030f\u0311"+ - "\5\u009bN\2\u0310\u0312\5\u00a3R\2\u0311\u0310\3\2\2\2\u0311\u0312\3\2"+ - "\2\2\u0312\u0317\3\2\2\2\u0313\u0314\5u;\2\u0314\u0315\5\u00a3R\2\u0315"+ - "\u0317\3\2\2\2\u0316\u02fb\3\2\2\2\u0316\u0306\3\2\2\2\u0316\u030e\3\2"+ - "\2\2\u0316\u0313\3\2\2\2\u0317\u009a\3\2\2\2\u0318\u0319\5\u009dO\2\u0319"+ - "\u031a\5\u009fP\2\u031a\u009c\3\2\2\2\u031b\u031c\t\t\2\2\u031c\u009e"+ - "\3\2\2\2\u031d\u031f\5\u00a1Q\2\u031e\u031d\3\2\2\2\u031e\u031f\3\2\2"+ - "\2\u031f\u0320\3\2\2\2\u0320\u0321\5u;\2\u0321\u00a0\3\2\2\2\u0322\u0323"+ - "\t\n\2\2\u0323\u00a2\3\2\2\2\u0324\u0325\t\13\2\2\u0325\u00a4\3\2\2\2"+ - "\u0326\u0327\5\u00a7T\2\u0327\u0329\5\u00a9U\2\u0328\u032a\5\u00a3R\2"+ - "\u0329\u0328\3\2\2\2\u0329\u032a\3\2\2\2\u032a\u00a6\3\2\2\2\u032b\u032d"+ - "\5\177@\2\u032c\u032e\7\60\2\2\u032d\u032c\3\2\2\2\u032d\u032e\3\2\2\2"+ - "\u032e\u0337\3\2\2\2\u032f\u0330\7\62\2\2\u0330\u0332\t\4\2\2\u0331\u0333"+ - "\5\u0081A\2\u0332\u0331\3\2\2\2\u0332\u0333\3\2\2\2\u0333\u0334\3\2\2"+ - "\2\u0334\u0335\7\60\2\2\u0335\u0337\5\u0081A\2\u0336\u032b\3\2\2\2\u0336"+ - "\u032f\3\2\2\2\u0337\u00a8\3\2\2\2\u0338\u0339\5\u00abV\2\u0339\u033a"+ - "\5\u009fP\2\u033a\u00aa\3\2\2\2\u033b\u033c\t\f\2\2\u033c\u00ac\3\2\2"+ - "\2\u033d\u033e\7v\2\2\u033e\u033f\7t\2\2\u033f\u0340\7w\2\2\u0340\u0347"+ - "\7g\2\2\u0341\u0342\7h\2\2\u0342\u0343\7c\2\2\u0343\u0344\7n\2\2\u0344"+ - "\u0345\7u\2\2\u0345\u0347\7g\2\2\u0346\u033d\3\2\2\2\u0346\u0341\3\2\2"+ - "\2\u0347\u00ae\3\2\2\2\u0348\u0349\7)\2\2\u0349\u034a\5\u00b1Y\2\u034a"+ - "\u034b\7)\2\2\u034b\u0351\3\2\2\2\u034c\u034d\7)\2\2\u034d\u034e\5\u00b9"+ - "]\2\u034e\u034f\7)\2\2\u034f\u0351\3\2\2\2\u0350\u0348\3\2\2\2\u0350\u034c"+ - "\3\2\2\2\u0351\u00b0\3\2\2\2\u0352\u0353\n\r\2\2\u0353\u00b2\3\2\2\2\u0354"+ - "\u0356\7$\2\2\u0355\u0357\5\u00b5[\2\u0356\u0355\3\2\2\2\u0356\u0357\3"+ - "\2\2\2\u0357\u0358\3\2\2\2\u0358\u0359\7$\2\2\u0359\u00b4\3\2\2\2\u035a"+ - "\u035c\5\u00b7\\\2\u035b\u035a\3\2\2\2\u035c\u035d\3\2\2\2\u035d\u035b"+ - "\3\2\2\2\u035d\u035e\3\2\2\2\u035e\u00b6\3\2\2\2\u035f\u0362\n\16\2\2"+ - "\u0360\u0362\5\u00b9]\2\u0361\u035f\3\2\2\2\u0361\u0360\3\2\2\2\u0362"+ - "\u00b8\3\2\2\2\u0363\u0364\7^\2\2\u0364\u0368\t\17\2\2\u0365\u0368\5\u00bb"+ - "^\2\u0366\u0368\5\u00bd_\2\u0367\u0363\3\2\2\2\u0367\u0365\3\2\2\2\u0367"+ - "\u0366\3\2\2\2\u0368\u00ba\3\2\2\2\u0369\u036a\7^\2\2\u036a\u0375\5\u008b"+ - "F\2\u036b\u036c\7^\2\2\u036c\u036d\5\u008bF\2\u036d\u036e\5\u008bF\2\u036e"+ - "\u0375\3\2\2\2\u036f\u0370\7^\2\2\u0370\u0371\5\u00bf`\2\u0371\u0372\5"+ - "\u008bF\2\u0372\u0373\5\u008bF\2\u0373\u0375\3\2\2\2\u0374\u0369\3\2\2"+ - "\2\u0374\u036b\3\2\2\2\u0374\u036f\3\2\2\2\u0375\u00bc\3\2\2\2\u0376\u0377"+ - "\7^\2\2\u0377\u0378\7w\2\2\u0378\u0379\5\u0083B\2\u0379\u037a\5\u0083"+ - "B\2\u037a\u037b\5\u0083B\2\u037b\u037c\5\u0083B\2\u037c\u00be\3\2\2\2"+ - "\u037d\u037e\t\20\2\2\u037e\u00c0\3\2\2\2\u037f\u0380\7p\2\2\u0380\u0381"+ - "\7w\2\2\u0381\u0382\7n\2\2\u0382\u0383\7n\2\2\u0383\u00c2\3\2\2\2\u0384"+ - "\u0385\7*\2\2\u0385\u00c4\3\2\2\2\u0386\u0387\7+\2\2\u0387\u00c6\3\2\2"+ - "\2\u0388\u0389\7}\2\2\u0389\u00c8\3\2\2\2\u038a\u038b\7\177\2\2\u038b"+ - "\u00ca\3\2\2\2\u038c\u038d\7]\2\2\u038d\u00cc\3\2\2\2\u038e\u038f\7_\2"+ - "\2\u038f\u00ce\3\2\2\2\u0390\u0391\7=\2\2\u0391\u00d0\3\2\2\2\u0392\u0393"+ - "\7.\2\2\u0393\u00d2\3\2\2\2\u0394\u0395\7\60\2\2\u0395\u00d4\3\2\2\2\u0396"+ - "\u0397\7?\2\2\u0397\u00d6\3\2\2\2\u0398\u0399\7@\2\2\u0399\u00d8\3\2\2"+ - "\2\u039a\u039b\7>\2\2\u039b\u00da\3\2\2\2\u039c\u039d\7#\2\2\u039d\u00dc"+ - "\3\2\2\2\u039e\u039f\7\u0080\2\2\u039f\u00de\3\2\2\2\u03a0\u03a1\7A\2"+ - "\2\u03a1\u00e0\3\2\2\2\u03a2\u03a3\7<\2\2\u03a3\u00e2\3\2\2\2\u03a4\u03a5"+ - "\7?\2\2\u03a5\u03a6\7?\2\2\u03a6\u00e4\3\2\2\2\u03a7\u03a8\7>\2\2\u03a8"+ - "\u03a9\7?\2\2\u03a9\u00e6\3\2\2\2\u03aa\u03ab\7@\2\2\u03ab\u03ac\7?\2"+ - "\2\u03ac\u00e8\3\2\2\2\u03ad\u03ae\7#\2\2\u03ae\u03af\7?\2\2\u03af\u00ea"+ - "\3\2\2\2\u03b0\u03b1\7(\2\2\u03b1\u03b2\7(\2\2\u03b2\u00ec\3\2\2\2\u03b3"+ - "\u03b4\7~\2\2\u03b4\u03b5\7~\2\2\u03b5\u00ee\3\2\2\2\u03b6\u03b7\7-\2"+ - "\2\u03b7\u03b8\7-\2\2\u03b8\u00f0\3\2\2\2\u03b9\u03ba\7/\2\2\u03ba\u03bb"+ - "\7/\2\2\u03bb\u00f2\3\2\2\2\u03bc\u03bd\7-\2\2\u03bd\u00f4\3\2\2\2\u03be"+ - "\u03bf\7/\2\2\u03bf\u00f6\3\2\2\2\u03c0\u03c1\7,\2\2\u03c1\u00f8\3\2\2"+ - "\2\u03c2\u03c3\7\61\2\2\u03c3\u00fa\3\2\2\2\u03c4\u03c5\7(\2\2\u03c5\u00fc"+ - "\3\2\2\2\u03c6\u03c7\7~\2\2\u03c7\u00fe\3\2\2\2\u03c8\u03c9\7`\2\2\u03c9"+ - "\u0100\3\2\2\2\u03ca\u03cb\7\'\2\2\u03cb\u0102\3\2\2\2\u03cc\u03cd\7-"+ - "\2\2\u03cd\u03ce\7?\2\2\u03ce\u0104\3\2\2\2\u03cf\u03d0\7/\2\2\u03d0\u03d1"+ - "\7?\2\2\u03d1\u0106\3\2\2\2\u03d2\u03d3\7,\2\2\u03d3\u03d4\7?\2\2\u03d4"+ - "\u0108\3\2\2\2\u03d5\u03d6\7\61\2\2\u03d6\u03d7\7?\2\2\u03d7\u010a\3\2"+ - "\2\2\u03d8\u03d9\7(\2\2\u03d9\u03da\7?\2\2\u03da\u010c\3\2\2\2\u03db\u03dc"+ - "\7~\2\2\u03dc\u03dd\7?\2\2\u03dd\u010e\3\2\2\2\u03de\u03df\7`\2\2\u03df"+ - "\u03e0\7?\2\2\u03e0\u0110\3\2\2\2\u03e1\u03e2\7\'\2\2\u03e2\u03e3\7?\2"+ - "\2\u03e3\u0112\3\2\2\2\u03e4\u03e5\7>\2\2\u03e5\u03e6\7>\2\2\u03e6\u03e7"+ - "\7?\2\2\u03e7\u0114\3\2\2\2\u03e8\u03e9\7@\2\2\u03e9\u03ea\7@\2\2\u03ea"+ - "\u03eb\7?\2\2\u03eb\u0116\3\2\2\2\u03ec\u03ed\7@\2\2\u03ed\u03ee\7@\2"+ - "\2\u03ee\u03ef\7@\2\2\u03ef\u03f0\7?\2\2\u03f0\u0118\3\2\2\2\u03f1\u03f5"+ - "\5\u011b\u008e\2\u03f2\u03f4\5\u011d\u008f\2\u03f3\u03f2\3\2\2\2\u03f4"+ - "\u03f7\3\2\2\2\u03f5\u03f3\3\2\2\2\u03f5\u03f6\3\2\2\2\u03f6\u011a\3\2"+ - "\2\2\u03f7\u03f5\3\2\2\2\u03f8\u03ff\t\21\2\2\u03f9\u03fa\n\22\2\2\u03fa"+ - "\u03ff\6\u008e\2\2\u03fb\u03fc\t\23\2\2\u03fc\u03fd\t\24\2\2\u03fd\u03ff"+ - "\6\u008e\3\2\u03fe\u03f8\3\2\2\2\u03fe\u03f9\3\2\2\2\u03fe\u03fb\3\2\2"+ - "\2\u03ff\u011c\3\2\2\2\u0400\u0407\t\25\2\2\u0401\u0402\n\22\2\2\u0402"+ - "\u0407\6\u008f\4\2\u0403\u0404\t\23\2\2\u0404\u0405\t\24\2\2\u0405\u0407"+ - "\6\u008f\5\2\u0406\u0400\3\2\2\2\u0406\u0401\3\2\2\2\u0406\u0403\3\2\2"+ - "\2\u0407\u011e\3\2\2\2\u0408\u0409\7B\2\2\u0409\u0120\3\2\2\2\u040a\u040b"+ - "\7\60\2\2\u040b\u040c\7\60\2\2\u040c\u040d\7\60\2\2\u040d\u0122\3\2\2"+ - "\2\u040e\u0410\t\26\2\2\u040f\u040e\3\2\2\2\u0410\u0411\3\2\2\2\u0411"+ - "\u040f\3\2\2\2\u0411\u0412\3\2\2\2\u0412\u0413\3\2\2\2\u0413\u0414\b\u0092"+ - "\2\2\u0414\u0124\3\2\2\2\u0415\u0416\7\61\2\2\u0416\u0417\7,\2\2\u0417"+ - "\u041b\3\2\2\2\u0418\u041a\13\2\2\2\u0419\u0418\3\2\2\2\u041a\u041d\3"+ - "\2\2\2\u041b\u041c\3\2\2\2\u041b\u0419\3\2\2\2\u041c\u041e\3\2\2\2\u041d"+ - "\u041b\3\2\2\2\u041e\u041f\7,\2\2\u041f\u0420\7\61\2\2\u0420\u0421\3\2"+ - "\2\2\u0421\u0422\b\u0093\2\2\u0422\u0126\3\2\2\2\u0423\u0424\7\61\2\2"+ - "\u0424\u0425\7\61\2\2\u0425\u0429\3\2\2\2\u0426\u0428\n\27\2\2\u0427\u0426"+ - "\3\2\2\2\u0428\u042b\3\2\2\2\u0429\u0427\3\2\2\2\u0429\u042a\3\2\2\2\u042a"+ - "\u042c\3\2\2\2\u042b\u0429\3\2\2\2\u042c\u042d\b\u0094\2\2\u042d\u0128"+ - "\3\2\2\2\64\2\u0280\u0284\u0288\u028c\u0290\u0297\u029c\u029e\u02a4\u02a8"+ - "\u02ac\u02b2\u02b7\u02c1\u02c5\u02cb\u02cf\u02d7\u02db\u02e1\u02eb\u02ef"+ - "\u02f5\u02f9\u02fe\u0301\u0304\u0309\u030c\u0311\u0316\u031e\u0329\u032d"+ - "\u0332\u0336\u0346\u0350\u0356\u035d\u0361\u0367\u0374\u03f5\u03fe\u0406"+ - "\u0411\u041b\u0429\3\b\2\2"; - public static final ATN _ATN = - new ATNDeserializer().deserialize(_serializedATN.toCharArray()); - static { - _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; - for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { - _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); - } - } -} \ No newline at end of file diff --git a/antlr/Java8Listener.java b/antlr/Java8Listener.java deleted file mode 100644 index 5b49ebda2..000000000 --- a/antlr/Java8Listener.java +++ /dev/null @@ -1,1020 +0,0 @@ -// Generated from Java8.g4 by ANTLR 4.4 -import org.antlr.v4.runtime.misc.NotNull; -import org.antlr.v4.runtime.tree.ParseTreeListener; - -/** - * This interface defines a complete listener for a parse tree produced by - * {@link Java8Parser}. - */ -public interface Java8Listener extends ParseTreeListener { - /** - * Enter a parse tree produced by {@link Java8Parser#memberDeclaration}. - * @param ctx the parse tree - */ - void enterMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#memberDeclaration}. - * @param ctx the parse tree - */ - void exitMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#defaultValue}. - * @param ctx the parse tree - */ - void enterDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#defaultValue}. - * @param ctx the parse tree - */ - void exitDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#annotationTypeElementDeclaration}. - * @param ctx the parse tree - */ - void enterAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#annotationTypeElementDeclaration}. - * @param ctx the parse tree - */ - void exitAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#type}. - * @param ctx the parse tree - */ - void enterType(@NotNull Java8Parser.TypeContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#type}. - * @param ctx the parse tree - */ - void exitType(@NotNull Java8Parser.TypeContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#annotationTypeBody}. - * @param ctx the parse tree - */ - void enterAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#annotationTypeBody}. - * @param ctx the parse tree - */ - void exitAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#genericInterfaceMethodDeclaration}. - * @param ctx the parse tree - */ - void enterGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#genericInterfaceMethodDeclaration}. - * @param ctx the parse tree - */ - void exitGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#classBodyDeclaration}. - * @param ctx the parse tree - */ - void enterClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#classBodyDeclaration}. - * @param ctx the parse tree - */ - void exitClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#block}. - * @param ctx the parse tree - */ - void enterBlock(@NotNull Java8Parser.BlockContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#block}. - * @param ctx the parse tree - */ - void exitBlock(@NotNull Java8Parser.BlockContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#enumBodyDeclarations}. - * @param ctx the parse tree - */ - void enterEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#enumBodyDeclarations}. - * @param ctx the parse tree - */ - void exitEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#forUpdate}. - * @param ctx the parse tree - */ - void enterForUpdate(@NotNull Java8Parser.ForUpdateContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#forUpdate}. - * @param ctx the parse tree - */ - void exitForUpdate(@NotNull Java8Parser.ForUpdateContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#enhancedForControl}. - * @param ctx the parse tree - */ - void enterEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#enhancedForControl}. - * @param ctx the parse tree - */ - void exitEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#annotationConstantRest}. - * @param ctx the parse tree - */ - void enterAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#annotationConstantRest}. - * @param ctx the parse tree - */ - void exitAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#explicitGenericInvocation}. - * @param ctx the parse tree - */ - void enterExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#explicitGenericInvocation}. - * @param ctx the parse tree - */ - void exitExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#nonWildcardTypeArgumentsOrDiamond}. - * @param ctx the parse tree - */ - void enterNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#nonWildcardTypeArgumentsOrDiamond}. - * @param ctx the parse tree - */ - void exitNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#expressionList}. - * @param ctx the parse tree - */ - void enterExpressionList(@NotNull Java8Parser.ExpressionListContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#expressionList}. - * @param ctx the parse tree - */ - void exitExpressionList(@NotNull Java8Parser.ExpressionListContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#annotationTypeElementRest}. - * @param ctx the parse tree - */ - void enterAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#annotationTypeElementRest}. - * @param ctx the parse tree - */ - void exitAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#classOrInterfaceType}. - * @param ctx the parse tree - */ - void enterClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#classOrInterfaceType}. - * @param ctx the parse tree - */ - void exitClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#typeBound}. - * @param ctx the parse tree - */ - void enterTypeBound(@NotNull Java8Parser.TypeBoundContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#typeBound}. - * @param ctx the parse tree - */ - void exitTypeBound(@NotNull Java8Parser.TypeBoundContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#variableDeclaratorId}. - * @param ctx the parse tree - */ - void enterVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#variableDeclaratorId}. - * @param ctx the parse tree - */ - void exitVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#primary}. - * @param ctx the parse tree - */ - void enterPrimary(@NotNull Java8Parser.PrimaryContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#primary}. - * @param ctx the parse tree - */ - void exitPrimary(@NotNull Java8Parser.PrimaryContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#classCreatorRest}. - * @param ctx the parse tree - */ - void enterClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#classCreatorRest}. - * @param ctx the parse tree - */ - void exitClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#interfaceBodyDeclaration}. - * @param ctx the parse tree - */ - void enterInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#interfaceBodyDeclaration}. - * @param ctx the parse tree - */ - void exitInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#typeArguments}. - * @param ctx the parse tree - */ - void enterTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#typeArguments}. - * @param ctx the parse tree - */ - void exitTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#annotationName}. - * @param ctx the parse tree - */ - void enterAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#annotationName}. - * @param ctx the parse tree - */ - void exitAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#finallyBlock}. - * @param ctx the parse tree - */ - void enterFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#finallyBlock}. - * @param ctx the parse tree - */ - void exitFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#typeParameters}. - * @param ctx the parse tree - */ - void enterTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#typeParameters}. - * @param ctx the parse tree - */ - void exitTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#lastFormalParameter}. - * @param ctx the parse tree - */ - void enterLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#lastFormalParameter}. - * @param ctx the parse tree - */ - void exitLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#constructorBody}. - * @param ctx the parse tree - */ - void enterConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#constructorBody}. - * @param ctx the parse tree - */ - void exitConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#literal}. - * @param ctx the parse tree - */ - void enterLiteral(@NotNull Java8Parser.LiteralContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#literal}. - * @param ctx the parse tree - */ - void exitLiteral(@NotNull Java8Parser.LiteralContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#annotationMethodOrConstantRest}. - * @param ctx the parse tree - */ - void enterAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#annotationMethodOrConstantRest}. - * @param ctx the parse tree - */ - void exitAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#catchClause}. - * @param ctx the parse tree - */ - void enterCatchClause(@NotNull Java8Parser.CatchClauseContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#catchClause}. - * @param ctx the parse tree - */ - void exitCatchClause(@NotNull Java8Parser.CatchClauseContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#variableDeclarator}. - * @param ctx the parse tree - */ - void enterVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#variableDeclarator}. - * @param ctx the parse tree - */ - void exitVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#typeList}. - * @param ctx the parse tree - */ - void enterTypeList(@NotNull Java8Parser.TypeListContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#typeList}. - * @param ctx the parse tree - */ - void exitTypeList(@NotNull Java8Parser.TypeListContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#enumConstants}. - * @param ctx the parse tree - */ - void enterEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#enumConstants}. - * @param ctx the parse tree - */ - void exitEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#classBody}. - * @param ctx the parse tree - */ - void enterClassBody(@NotNull Java8Parser.ClassBodyContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#classBody}. - * @param ctx the parse tree - */ - void exitClassBody(@NotNull Java8Parser.ClassBodyContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#createdName}. - * @param ctx the parse tree - */ - void enterCreatedName(@NotNull Java8Parser.CreatedNameContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#createdName}. - * @param ctx the parse tree - */ - void exitCreatedName(@NotNull Java8Parser.CreatedNameContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#enumDeclaration}. - * @param ctx the parse tree - */ - void enterEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#enumDeclaration}. - * @param ctx the parse tree - */ - void exitEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#formalParameter}. - * @param ctx the parse tree - */ - void enterFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#formalParameter}. - * @param ctx the parse tree - */ - void exitFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#parExpression}. - * @param ctx the parse tree - */ - void enterParExpression(@NotNull Java8Parser.ParExpressionContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#parExpression}. - * @param ctx the parse tree - */ - void exitParExpression(@NotNull Java8Parser.ParExpressionContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#annotation}. - * @param ctx the parse tree - */ - void enterAnnotation(@NotNull Java8Parser.AnnotationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#annotation}. - * @param ctx the parse tree - */ - void exitAnnotation(@NotNull Java8Parser.AnnotationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#variableInitializer}. - * @param ctx the parse tree - */ - void enterVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#variableInitializer}. - * @param ctx the parse tree - */ - void exitVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#elementValueArrayInitializer}. - * @param ctx the parse tree - */ - void enterElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#elementValueArrayInitializer}. - * @param ctx the parse tree - */ - void exitElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#creator}. - * @param ctx the parse tree - */ - void enterCreator(@NotNull Java8Parser.CreatorContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#creator}. - * @param ctx the parse tree - */ - void exitCreator(@NotNull Java8Parser.CreatorContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#arrayCreatorRest}. - * @param ctx the parse tree - */ - void enterArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#arrayCreatorRest}. - * @param ctx the parse tree - */ - void exitArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#expression}. - * @param ctx the parse tree - */ - void enterExpression(@NotNull Java8Parser.ExpressionContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#expression}. - * @param ctx the parse tree - */ - void exitExpression(@NotNull Java8Parser.ExpressionContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#constantExpression}. - * @param ctx the parse tree - */ - void enterConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#constantExpression}. - * @param ctx the parse tree - */ - void exitConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#qualifiedNameList}. - * @param ctx the parse tree - */ - void enterQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#qualifiedNameList}. - * @param ctx the parse tree - */ - void exitQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#constructorDeclaration}. - * @param ctx the parse tree - */ - void enterConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#constructorDeclaration}. - * @param ctx the parse tree - */ - void exitConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#forControl}. - * @param ctx the parse tree - */ - void enterForControl(@NotNull Java8Parser.ForControlContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#forControl}. - * @param ctx the parse tree - */ - void exitForControl(@NotNull Java8Parser.ForControlContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#superSuffix}. - * @param ctx the parse tree - */ - void enterSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#superSuffix}. - * @param ctx the parse tree - */ - void exitSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#variableDeclarators}. - * @param ctx the parse tree - */ - void enterVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#variableDeclarators}. - * @param ctx the parse tree - */ - void exitVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#catchType}. - * @param ctx the parse tree - */ - void enterCatchType(@NotNull Java8Parser.CatchTypeContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#catchType}. - * @param ctx the parse tree - */ - void exitCatchType(@NotNull Java8Parser.CatchTypeContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#classOrInterfaceModifier}. - * @param ctx the parse tree - */ - void enterClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#classOrInterfaceModifier}. - * @param ctx the parse tree - */ - void exitClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#enumConstantName}. - * @param ctx the parse tree - */ - void enterEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#enumConstantName}. - * @param ctx the parse tree - */ - void exitEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#modifier}. - * @param ctx the parse tree - */ - void enterModifier(@NotNull Java8Parser.ModifierContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#modifier}. - * @param ctx the parse tree - */ - void exitModifier(@NotNull Java8Parser.ModifierContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#innerCreator}. - * @param ctx the parse tree - */ - void enterInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#innerCreator}. - * @param ctx the parse tree - */ - void exitInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#explicitGenericInvocationSuffix}. - * @param ctx the parse tree - */ - void enterExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#explicitGenericInvocationSuffix}. - * @param ctx the parse tree - */ - void exitExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#variableModifier}. - * @param ctx the parse tree - */ - void enterVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#variableModifier}. - * @param ctx the parse tree - */ - void exitVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#elementValuePair}. - * @param ctx the parse tree - */ - void enterElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#elementValuePair}. - * @param ctx the parse tree - */ - void exitElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#arrayInitializer}. - * @param ctx the parse tree - */ - void enterArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#arrayInitializer}. - * @param ctx the parse tree - */ - void exitArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#elementValue}. - * @param ctx the parse tree - */ - void enterElementValue(@NotNull Java8Parser.ElementValueContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#elementValue}. - * @param ctx the parse tree - */ - void exitElementValue(@NotNull Java8Parser.ElementValueContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#constDeclaration}. - * @param ctx the parse tree - */ - void enterConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#constDeclaration}. - * @param ctx the parse tree - */ - void exitConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#resource}. - * @param ctx the parse tree - */ - void enterResource(@NotNull Java8Parser.ResourceContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#resource}. - * @param ctx the parse tree - */ - void exitResource(@NotNull Java8Parser.ResourceContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#qualifiedName}. - * @param ctx the parse tree - */ - void enterQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#qualifiedName}. - * @param ctx the parse tree - */ - void exitQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#resourceSpecification}. - * @param ctx the parse tree - */ - void enterResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#resourceSpecification}. - * @param ctx the parse tree - */ - void exitResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#formalParameterList}. - * @param ctx the parse tree - */ - void enterFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#formalParameterList}. - * @param ctx the parse tree - */ - void exitFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#annotationTypeDeclaration}. - * @param ctx the parse tree - */ - void enterAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#annotationTypeDeclaration}. - * @param ctx the parse tree - */ - void exitAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#compilationUnit}. - * @param ctx the parse tree - */ - void enterCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#compilationUnit}. - * @param ctx the parse tree - */ - void exitCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#annotationMethodRest}. - * @param ctx the parse tree - */ - void enterAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#annotationMethodRest}. - * @param ctx the parse tree - */ - void exitAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#switchBlockStatementGroup}. - * @param ctx the parse tree - */ - void enterSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#switchBlockStatementGroup}. - * @param ctx the parse tree - */ - void exitSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#typeParameter}. - * @param ctx the parse tree - */ - void enterTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#typeParameter}. - * @param ctx the parse tree - */ - void exitTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#interfaceBody}. - * @param ctx the parse tree - */ - void enterInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#interfaceBody}. - * @param ctx the parse tree - */ - void exitInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#methodDeclaration}. - * @param ctx the parse tree - */ - void enterMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#methodDeclaration}. - * @param ctx the parse tree - */ - void exitMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#methodBody}. - * @param ctx the parse tree - */ - void enterMethodBody(@NotNull Java8Parser.MethodBodyContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#methodBody}. - * @param ctx the parse tree - */ - void exitMethodBody(@NotNull Java8Parser.MethodBodyContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#typeArgument}. - * @param ctx the parse tree - */ - void enterTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#typeArgument}. - * @param ctx the parse tree - */ - void exitTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#typeDeclaration}. - * @param ctx the parse tree - */ - void enterTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#typeDeclaration}. - * @param ctx the parse tree - */ - void exitTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#genericConstructorDeclaration}. - * @param ctx the parse tree - */ - void enterGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#genericConstructorDeclaration}. - * @param ctx the parse tree - */ - void exitGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#classDeclaration}. - * @param ctx the parse tree - */ - void enterClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#classDeclaration}. - * @param ctx the parse tree - */ - void exitClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#enumConstant}. - * @param ctx the parse tree - */ - void enterEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#enumConstant}. - * @param ctx the parse tree - */ - void exitEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#statement}. - * @param ctx the parse tree - */ - void enterStatement(@NotNull Java8Parser.StatementContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#statement}. - * @param ctx the parse tree - */ - void exitStatement(@NotNull Java8Parser.StatementContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#importDeclaration}. - * @param ctx the parse tree - */ - void enterImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#importDeclaration}. - * @param ctx the parse tree - */ - void exitImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#primitiveType}. - * @param ctx the parse tree - */ - void enterPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#primitiveType}. - * @param ctx the parse tree - */ - void exitPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#interfaceDeclaration}. - * @param ctx the parse tree - */ - void enterInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#interfaceDeclaration}. - * @param ctx the parse tree - */ - void exitInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#localVariableDeclarationStatement}. - * @param ctx the parse tree - */ - void enterLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#localVariableDeclarationStatement}. - * @param ctx the parse tree - */ - void exitLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#blockStatement}. - * @param ctx the parse tree - */ - void enterBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#blockStatement}. - * @param ctx the parse tree - */ - void exitBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#fieldDeclaration}. - * @param ctx the parse tree - */ - void enterFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#fieldDeclaration}. - * @param ctx the parse tree - */ - void exitFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#constantDeclarator}. - * @param ctx the parse tree - */ - void enterConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#constantDeclarator}. - * @param ctx the parse tree - */ - void exitConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#resources}. - * @param ctx the parse tree - */ - void enterResources(@NotNull Java8Parser.ResourcesContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#resources}. - * @param ctx the parse tree - */ - void exitResources(@NotNull Java8Parser.ResourcesContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#statementExpression}. - * @param ctx the parse tree - */ - void enterStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#statementExpression}. - * @param ctx the parse tree - */ - void exitStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#interfaceMethodDeclaration}. - * @param ctx the parse tree - */ - void enterInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#interfaceMethodDeclaration}. - * @param ctx the parse tree - */ - void exitInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#packageDeclaration}. - * @param ctx the parse tree - */ - void enterPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#packageDeclaration}. - * @param ctx the parse tree - */ - void exitPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#elementValuePairs}. - * @param ctx the parse tree - */ - void enterElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#elementValuePairs}. - * @param ctx the parse tree - */ - void exitElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#localVariableDeclaration}. - * @param ctx the parse tree - */ - void enterLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#localVariableDeclaration}. - * @param ctx the parse tree - */ - void exitLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#nonWildcardTypeArguments}. - * @param ctx the parse tree - */ - void enterNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#nonWildcardTypeArguments}. - * @param ctx the parse tree - */ - void exitNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#interfaceMemberDeclaration}. - * @param ctx the parse tree - */ - void enterInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#interfaceMemberDeclaration}. - * @param ctx the parse tree - */ - void exitInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#switchLabel}. - * @param ctx the parse tree - */ - void enterSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#switchLabel}. - * @param ctx the parse tree - */ - void exitSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#forInit}. - * @param ctx the parse tree - */ - void enterForInit(@NotNull Java8Parser.ForInitContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#forInit}. - * @param ctx the parse tree - */ - void exitForInit(@NotNull Java8Parser.ForInitContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#formalParameters}. - * @param ctx the parse tree - */ - void enterFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#formalParameters}. - * @param ctx the parse tree - */ - void exitFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#arguments}. - * @param ctx the parse tree - */ - void enterArguments(@NotNull Java8Parser.ArgumentsContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#arguments}. - * @param ctx the parse tree - */ - void exitArguments(@NotNull Java8Parser.ArgumentsContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#genericMethodDeclaration}. - * @param ctx the parse tree - */ - void enterGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#genericMethodDeclaration}. - * @param ctx the parse tree - */ - void exitGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#typeArgumentsOrDiamond}. - * @param ctx the parse tree - */ - void enterTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#typeArgumentsOrDiamond}. - * @param ctx the parse tree - */ - void exitTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx); -} \ No newline at end of file diff --git a/antlr/src/.gitignore b/antlr/src/.gitignore deleted file mode 100644 index e93324f57..000000000 --- a/antlr/src/.gitignore +++ /dev/null @@ -1,107 +0,0 @@ -/Java8BaseListener.class -/Java8Lexer.class -/Java8Listener.class -/Java8Parser$AnnotationConstantRestContext.class -/Java8Parser$AnnotationContext.class -/Java8Parser$AnnotationMethodOrConstantRestContext.class -/Java8Parser$AnnotationMethodRestContext.class -/Java8Parser$AnnotationNameContext.class -/Java8Parser$AnnotationTypeBodyContext.class -/Java8Parser$AnnotationTypeDeclarationContext.class -/Java8Parser$AnnotationTypeElementDeclarationContext.class -/Java8Parser$AnnotationTypeElementRestContext.class -/Java8Parser$ArgumentsContext.class -/Java8Parser$ArrayCreatorRestContext.class -/Java8Parser$ArrayInitializerContext.class -/Java8Parser$BlockContext.class -/Java8Parser$BlockStatementContext.class -/Java8Parser$CatchClauseContext.class -/Java8Parser$CatchTypeContext.class -/Java8Parser$ClassBodyContext.class -/Java8Parser$ClassBodyDeclarationContext.class -/Java8Parser$ClassCreatorRestContext.class -/Java8Parser$ClassDeclarationContext.class -/Java8Parser$ClassOrInterfaceModifierContext.class -/Java8Parser$ClassOrInterfaceTypeContext.class -/Java8Parser$CompilationUnitContext.class -/Java8Parser$ConstDeclarationContext.class -/Java8Parser$ConstantDeclaratorContext.class -/Java8Parser$ConstantExpressionContext.class -/Java8Parser$ConstructorBodyContext.class -/Java8Parser$ConstructorDeclarationContext.class -/Java8Parser$CreatedNameContext.class -/Java8Parser$CreatorContext.class -/Java8Parser$DefaultValueContext.class -/Java8Parser$ElementValueArrayInitializerContext.class -/Java8Parser$ElementValueContext.class -/Java8Parser$ElementValuePairContext.class -/Java8Parser$ElementValuePairsContext.class -/Java8Parser$EnhancedForControlContext.class -/Java8Parser$EnumBodyDeclarationsContext.class -/Java8Parser$EnumConstantContext.class -/Java8Parser$EnumConstantNameContext.class -/Java8Parser$EnumConstantsContext.class -/Java8Parser$EnumDeclarationContext.class -/Java8Parser$ExplicitGenericInvocationContext.class -/Java8Parser$ExplicitGenericInvocationSuffixContext.class -/Java8Parser$ExpressionContext.class -/Java8Parser$ExpressionListContext.class -/Java8Parser$FieldDeclarationContext.class -/Java8Parser$FinallyBlockContext.class -/Java8Parser$ForControlContext.class -/Java8Parser$ForInitContext.class -/Java8Parser$ForUpdateContext.class -/Java8Parser$FormalParameterContext.class -/Java8Parser$FormalParameterListContext.class -/Java8Parser$FormalParametersContext.class -/Java8Parser$GenericConstructorDeclarationContext.class -/Java8Parser$GenericInterfaceMethodDeclarationContext.class -/Java8Parser$GenericMethodDeclarationContext.class -/Java8Parser$ImportDeclarationContext.class -/Java8Parser$InnerCreatorContext.class -/Java8Parser$InterfaceBodyContext.class -/Java8Parser$InterfaceBodyDeclarationContext.class -/Java8Parser$InterfaceDeclarationContext.class -/Java8Parser$InterfaceMemberDeclarationContext.class -/Java8Parser$InterfaceMethodDeclarationContext.class -/Java8Parser$LastFormalParameterContext.class -/Java8Parser$LiteralContext.class -/Java8Parser$LocalVariableDeclarationContext.class -/Java8Parser$LocalVariableDeclarationStatementContext.class -/Java8Parser$MemberDeclarationContext.class -/Java8Parser$MethodBodyContext.class -/Java8Parser$MethodDeclarationContext.class -/Java8Parser$ModifierContext.class -/Java8Parser$NonWildcardTypeArgumentsContext.class -/Java8Parser$NonWildcardTypeArgumentsOrDiamondContext.class -/Java8Parser$PackageDeclarationContext.class -/Java8Parser$ParExpressionContext.class -/Java8Parser$PrimaryContext.class -/Java8Parser$PrimitiveTypeContext.class -/Java8Parser$QualifiedNameContext.class -/Java8Parser$QualifiedNameListContext.class -/Java8Parser$ResourceContext.class -/Java8Parser$ResourceSpecificationContext.class -/Java8Parser$ResourcesContext.class -/Java8Parser$StatementContext.class -/Java8Parser$StatementExpressionContext.class -/Java8Parser$SuperSuffixContext.class -/Java8Parser$SwitchBlockStatementGroupContext.class -/Java8Parser$SwitchLabelContext.class -/Java8Parser$TypeArgumentContext.class -/Java8Parser$TypeArgumentsContext.class -/Java8Parser$TypeArgumentsOrDiamondContext.class -/Java8Parser$TypeBoundContext.class -/Java8Parser$TypeContext.class -/Java8Parser$TypeDeclarationContext.class -/Java8Parser$TypeListContext.class -/Java8Parser$TypeParameterContext.class -/Java8Parser$TypeParametersContext.class -/Java8Parser$VariableDeclaratorContext.class -/Java8Parser$VariableDeclaratorIdContext.class -/Java8Parser$VariableDeclaratorsContext.class -/Java8Parser$VariableInitializerContext.class -/Java8Parser$VariableModifierContext.class -/Java8Parser.class -/SyntaxTreeBuilder.class -/Test.class diff --git a/antlr/src/Java8BaseListener.java b/antlr/src/Java8BaseListener.java deleted file mode 100644 index 95e284132..000000000 --- a/antlr/src/Java8BaseListener.java +++ /dev/null @@ -1,1252 +0,0 @@ -package src; -// Generated from Java8.g4 by ANTLR 4.4 - -import org.antlr.v4.runtime.ParserRuleContext; -import org.antlr.v4.runtime.misc.NotNull; -import org.antlr.v4.runtime.tree.ErrorNode; -import org.antlr.v4.runtime.tree.TerminalNode; - -/** - * This class provides an empty implementation of {@link Java8Listener}, - * which can be extended to create a listener which only needs to handle a subset - * of the available methods. - */ -public class Java8BaseListener implements Java8Listener { - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterType(@NotNull Java8Parser.TypeContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitType(@NotNull Java8Parser.TypeContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterBlock(@NotNull Java8Parser.BlockContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitBlock(@NotNull Java8Parser.BlockContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterForUpdate(@NotNull Java8Parser.ForUpdateContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitForUpdate(@NotNull Java8Parser.ForUpdateContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterExpressionList(@NotNull Java8Parser.ExpressionListContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitExpressionList(@NotNull Java8Parser.ExpressionListContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterTypeBound(@NotNull Java8Parser.TypeBoundContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitTypeBound(@NotNull Java8Parser.TypeBoundContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterPrimary(@NotNull Java8Parser.PrimaryContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitPrimary(@NotNull Java8Parser.PrimaryContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterLiteral(@NotNull Java8Parser.LiteralContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitLiteral(@NotNull Java8Parser.LiteralContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterCatchClause(@NotNull Java8Parser.CatchClauseContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitCatchClause(@NotNull Java8Parser.CatchClauseContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterTypeList(@NotNull Java8Parser.TypeListContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitTypeList(@NotNull Java8Parser.TypeListContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterClassBody(@NotNull Java8Parser.ClassBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitClassBody(@NotNull Java8Parser.ClassBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterCreatedName(@NotNull Java8Parser.CreatedNameContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitCreatedName(@NotNull Java8Parser.CreatedNameContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterParExpression(@NotNull Java8Parser.ParExpressionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitParExpression(@NotNull Java8Parser.ParExpressionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterAnnotation(@NotNull Java8Parser.AnnotationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitAnnotation(@NotNull Java8Parser.AnnotationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterCreator(@NotNull Java8Parser.CreatorContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitCreator(@NotNull Java8Parser.CreatorContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterExpression(@NotNull Java8Parser.ExpressionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitExpression(@NotNull Java8Parser.ExpressionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterForControl(@NotNull Java8Parser.ForControlContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitForControl(@NotNull Java8Parser.ForControlContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterCatchType(@NotNull Java8Parser.CatchTypeContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitCatchType(@NotNull Java8Parser.CatchTypeContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterModifier(@NotNull Java8Parser.ModifierContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitModifier(@NotNull Java8Parser.ModifierContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterElementValue(@NotNull Java8Parser.ElementValueContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitElementValue(@NotNull Java8Parser.ElementValueContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterResource(@NotNull Java8Parser.ResourceContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitResource(@NotNull Java8Parser.ResourceContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterMethodBody(@NotNull Java8Parser.MethodBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitMethodBody(@NotNull Java8Parser.MethodBodyContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterStatement(@NotNull Java8Parser.StatementContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitStatement(@NotNull Java8Parser.StatementContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterResources(@NotNull Java8Parser.ResourcesContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitResources(@NotNull Java8Parser.ResourcesContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterForInit(@NotNull Java8Parser.ForInitContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitForInit(@NotNull Java8Parser.ForInitContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterArguments(@NotNull Java8Parser.ArgumentsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitArguments(@NotNull Java8Parser.ArgumentsContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx) { } - - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterEveryRule(@NotNull ParserRuleContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitEveryRule(@NotNull ParserRuleContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void visitTerminal(@NotNull TerminalNode node) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void visitErrorNode(@NotNull ErrorNode node) { } -} \ No newline at end of file diff --git a/antlr/src/Java8Listener.java b/antlr/src/Java8Listener.java deleted file mode 100644 index 321266966..000000000 --- a/antlr/src/Java8Listener.java +++ /dev/null @@ -1,1021 +0,0 @@ -package src; -// Generated from Java8.g4 by ANTLR 4.4 -import org.antlr.v4.runtime.misc.NotNull; -import org.antlr.v4.runtime.tree.ParseTreeListener; - -/** - * This interface defines a complete listener for a parse tree produced by - * {@link Java8Parser}. - */ -public interface Java8Listener extends ParseTreeListener { - /** - * Enter a parse tree produced by {@link Java8Parser#memberDeclaration}. - * @param ctx the parse tree - */ - void enterMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#memberDeclaration}. - * @param ctx the parse tree - */ - void exitMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#defaultValue}. - * @param ctx the parse tree - */ - void enterDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#defaultValue}. - * @param ctx the parse tree - */ - void exitDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#annotationTypeElementDeclaration}. - * @param ctx the parse tree - */ - void enterAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#annotationTypeElementDeclaration}. - * @param ctx the parse tree - */ - void exitAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#type}. - * @param ctx the parse tree - */ - void enterType(@NotNull Java8Parser.TypeContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#type}. - * @param ctx the parse tree - */ - void exitType(@NotNull Java8Parser.TypeContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#annotationTypeBody}. - * @param ctx the parse tree - */ - void enterAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#annotationTypeBody}. - * @param ctx the parse tree - */ - void exitAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#genericInterfaceMethodDeclaration}. - * @param ctx the parse tree - */ - void enterGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#genericInterfaceMethodDeclaration}. - * @param ctx the parse tree - */ - void exitGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#classBodyDeclaration}. - * @param ctx the parse tree - */ - void enterClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#classBodyDeclaration}. - * @param ctx the parse tree - */ - void exitClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#block}. - * @param ctx the parse tree - */ - void enterBlock(@NotNull Java8Parser.BlockContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#block}. - * @param ctx the parse tree - */ - void exitBlock(@NotNull Java8Parser.BlockContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#enumBodyDeclarations}. - * @param ctx the parse tree - */ - void enterEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#enumBodyDeclarations}. - * @param ctx the parse tree - */ - void exitEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#forUpdate}. - * @param ctx the parse tree - */ - void enterForUpdate(@NotNull Java8Parser.ForUpdateContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#forUpdate}. - * @param ctx the parse tree - */ - void exitForUpdate(@NotNull Java8Parser.ForUpdateContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#enhancedForControl}. - * @param ctx the parse tree - */ - void enterEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#enhancedForControl}. - * @param ctx the parse tree - */ - void exitEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#annotationConstantRest}. - * @param ctx the parse tree - */ - void enterAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#annotationConstantRest}. - * @param ctx the parse tree - */ - void exitAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#explicitGenericInvocation}. - * @param ctx the parse tree - */ - void enterExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#explicitGenericInvocation}. - * @param ctx the parse tree - */ - void exitExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#nonWildcardTypeArgumentsOrDiamond}. - * @param ctx the parse tree - */ - void enterNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#nonWildcardTypeArgumentsOrDiamond}. - * @param ctx the parse tree - */ - void exitNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#expressionList}. - * @param ctx the parse tree - */ - void enterExpressionList(@NotNull Java8Parser.ExpressionListContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#expressionList}. - * @param ctx the parse tree - */ - void exitExpressionList(@NotNull Java8Parser.ExpressionListContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#annotationTypeElementRest}. - * @param ctx the parse tree - */ - void enterAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#annotationTypeElementRest}. - * @param ctx the parse tree - */ - void exitAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#classOrInterfaceType}. - * @param ctx the parse tree - */ - void enterClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#classOrInterfaceType}. - * @param ctx the parse tree - */ - void exitClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#typeBound}. - * @param ctx the parse tree - */ - void enterTypeBound(@NotNull Java8Parser.TypeBoundContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#typeBound}. - * @param ctx the parse tree - */ - void exitTypeBound(@NotNull Java8Parser.TypeBoundContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#variableDeclaratorId}. - * @param ctx the parse tree - */ - void enterVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#variableDeclaratorId}. - * @param ctx the parse tree - */ - void exitVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#primary}. - * @param ctx the parse tree - */ - void enterPrimary(@NotNull Java8Parser.PrimaryContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#primary}. - * @param ctx the parse tree - */ - void exitPrimary(@NotNull Java8Parser.PrimaryContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#classCreatorRest}. - * @param ctx the parse tree - */ - void enterClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#classCreatorRest}. - * @param ctx the parse tree - */ - void exitClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#interfaceBodyDeclaration}. - * @param ctx the parse tree - */ - void enterInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#interfaceBodyDeclaration}. - * @param ctx the parse tree - */ - void exitInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#typeArguments}. - * @param ctx the parse tree - */ - void enterTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#typeArguments}. - * @param ctx the parse tree - */ - void exitTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#annotationName}. - * @param ctx the parse tree - */ - void enterAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#annotationName}. - * @param ctx the parse tree - */ - void exitAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#finallyBlock}. - * @param ctx the parse tree - */ - void enterFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#finallyBlock}. - * @param ctx the parse tree - */ - void exitFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#typeParameters}. - * @param ctx the parse tree - */ - void enterTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#typeParameters}. - * @param ctx the parse tree - */ - void exitTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#lastFormalParameter}. - * @param ctx the parse tree - */ - void enterLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#lastFormalParameter}. - * @param ctx the parse tree - */ - void exitLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#constructorBody}. - * @param ctx the parse tree - */ - void enterConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#constructorBody}. - * @param ctx the parse tree - */ - void exitConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#literal}. - * @param ctx the parse tree - */ - void enterLiteral(@NotNull Java8Parser.LiteralContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#literal}. - * @param ctx the parse tree - */ - void exitLiteral(@NotNull Java8Parser.LiteralContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#annotationMethodOrConstantRest}. - * @param ctx the parse tree - */ - void enterAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#annotationMethodOrConstantRest}. - * @param ctx the parse tree - */ - void exitAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#catchClause}. - * @param ctx the parse tree - */ - void enterCatchClause(@NotNull Java8Parser.CatchClauseContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#catchClause}. - * @param ctx the parse tree - */ - void exitCatchClause(@NotNull Java8Parser.CatchClauseContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#variableDeclarator}. - * @param ctx the parse tree - */ - void enterVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#variableDeclarator}. - * @param ctx the parse tree - */ - void exitVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#typeList}. - * @param ctx the parse tree - */ - void enterTypeList(@NotNull Java8Parser.TypeListContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#typeList}. - * @param ctx the parse tree - */ - void exitTypeList(@NotNull Java8Parser.TypeListContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#enumConstants}. - * @param ctx the parse tree - */ - void enterEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#enumConstants}. - * @param ctx the parse tree - */ - void exitEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#classBody}. - * @param ctx the parse tree - */ - void enterClassBody(@NotNull Java8Parser.ClassBodyContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#classBody}. - * @param ctx the parse tree - */ - void exitClassBody(@NotNull Java8Parser.ClassBodyContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#createdName}. - * @param ctx the parse tree - */ - void enterCreatedName(@NotNull Java8Parser.CreatedNameContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#createdName}. - * @param ctx the parse tree - */ - void exitCreatedName(@NotNull Java8Parser.CreatedNameContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#enumDeclaration}. - * @param ctx the parse tree - */ - void enterEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#enumDeclaration}. - * @param ctx the parse tree - */ - void exitEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#formalParameter}. - * @param ctx the parse tree - */ - void enterFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#formalParameter}. - * @param ctx the parse tree - */ - void exitFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#parExpression}. - * @param ctx the parse tree - */ - void enterParExpression(@NotNull Java8Parser.ParExpressionContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#parExpression}. - * @param ctx the parse tree - */ - void exitParExpression(@NotNull Java8Parser.ParExpressionContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#annotation}. - * @param ctx the parse tree - */ - void enterAnnotation(@NotNull Java8Parser.AnnotationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#annotation}. - * @param ctx the parse tree - */ - void exitAnnotation(@NotNull Java8Parser.AnnotationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#variableInitializer}. - * @param ctx the parse tree - */ - void enterVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#variableInitializer}. - * @param ctx the parse tree - */ - void exitVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#elementValueArrayInitializer}. - * @param ctx the parse tree - */ - void enterElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#elementValueArrayInitializer}. - * @param ctx the parse tree - */ - void exitElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#creator}. - * @param ctx the parse tree - */ - void enterCreator(@NotNull Java8Parser.CreatorContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#creator}. - * @param ctx the parse tree - */ - void exitCreator(@NotNull Java8Parser.CreatorContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#arrayCreatorRest}. - * @param ctx the parse tree - */ - void enterArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#arrayCreatorRest}. - * @param ctx the parse tree - */ - void exitArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#expression}. - * @param ctx the parse tree - */ - void enterExpression(@NotNull Java8Parser.ExpressionContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#expression}. - * @param ctx the parse tree - */ - void exitExpression(@NotNull Java8Parser.ExpressionContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#constantExpression}. - * @param ctx the parse tree - */ - void enterConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#constantExpression}. - * @param ctx the parse tree - */ - void exitConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#qualifiedNameList}. - * @param ctx the parse tree - */ - void enterQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#qualifiedNameList}. - * @param ctx the parse tree - */ - void exitQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#constructorDeclaration}. - * @param ctx the parse tree - */ - void enterConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#constructorDeclaration}. - * @param ctx the parse tree - */ - void exitConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#forControl}. - * @param ctx the parse tree - */ - void enterForControl(@NotNull Java8Parser.ForControlContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#forControl}. - * @param ctx the parse tree - */ - void exitForControl(@NotNull Java8Parser.ForControlContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#superSuffix}. - * @param ctx the parse tree - */ - void enterSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#superSuffix}. - * @param ctx the parse tree - */ - void exitSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#variableDeclarators}. - * @param ctx the parse tree - */ - void enterVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#variableDeclarators}. - * @param ctx the parse tree - */ - void exitVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#catchType}. - * @param ctx the parse tree - */ - void enterCatchType(@NotNull Java8Parser.CatchTypeContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#catchType}. - * @param ctx the parse tree - */ - void exitCatchType(@NotNull Java8Parser.CatchTypeContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#classOrInterfaceModifier}. - * @param ctx the parse tree - */ - void enterClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#classOrInterfaceModifier}. - * @param ctx the parse tree - */ - void exitClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#enumConstantName}. - * @param ctx the parse tree - */ - void enterEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#enumConstantName}. - * @param ctx the parse tree - */ - void exitEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#modifier}. - * @param ctx the parse tree - */ - void enterModifier(@NotNull Java8Parser.ModifierContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#modifier}. - * @param ctx the parse tree - */ - void exitModifier(@NotNull Java8Parser.ModifierContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#innerCreator}. - * @param ctx the parse tree - */ - void enterInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#innerCreator}. - * @param ctx the parse tree - */ - void exitInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#explicitGenericInvocationSuffix}. - * @param ctx the parse tree - */ - void enterExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#explicitGenericInvocationSuffix}. - * @param ctx the parse tree - */ - void exitExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#variableModifier}. - * @param ctx the parse tree - */ - void enterVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#variableModifier}. - * @param ctx the parse tree - */ - void exitVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#elementValuePair}. - * @param ctx the parse tree - */ - void enterElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#elementValuePair}. - * @param ctx the parse tree - */ - void exitElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#arrayInitializer}. - * @param ctx the parse tree - */ - void enterArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#arrayInitializer}. - * @param ctx the parse tree - */ - void exitArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#elementValue}. - * @param ctx the parse tree - */ - void enterElementValue(@NotNull Java8Parser.ElementValueContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#elementValue}. - * @param ctx the parse tree - */ - void exitElementValue(@NotNull Java8Parser.ElementValueContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#constDeclaration}. - * @param ctx the parse tree - */ - void enterConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#constDeclaration}. - * @param ctx the parse tree - */ - void exitConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#resource}. - * @param ctx the parse tree - */ - void enterResource(@NotNull Java8Parser.ResourceContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#resource}. - * @param ctx the parse tree - */ - void exitResource(@NotNull Java8Parser.ResourceContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#qualifiedName}. - * @param ctx the parse tree - */ - void enterQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#qualifiedName}. - * @param ctx the parse tree - */ - void exitQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#resourceSpecification}. - * @param ctx the parse tree - */ - void enterResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#resourceSpecification}. - * @param ctx the parse tree - */ - void exitResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#formalParameterList}. - * @param ctx the parse tree - */ - void enterFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#formalParameterList}. - * @param ctx the parse tree - */ - void exitFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#annotationTypeDeclaration}. - * @param ctx the parse tree - */ - void enterAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#annotationTypeDeclaration}. - * @param ctx the parse tree - */ - void exitAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#compilationUnit}. - * @param ctx the parse tree - */ - void enterCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#compilationUnit}. - * @param ctx the parse tree - */ - void exitCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#annotationMethodRest}. - * @param ctx the parse tree - */ - void enterAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#annotationMethodRest}. - * @param ctx the parse tree - */ - void exitAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#switchBlockStatementGroup}. - * @param ctx the parse tree - */ - void enterSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#switchBlockStatementGroup}. - * @param ctx the parse tree - */ - void exitSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#typeParameter}. - * @param ctx the parse tree - */ - void enterTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#typeParameter}. - * @param ctx the parse tree - */ - void exitTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#interfaceBody}. - * @param ctx the parse tree - */ - void enterInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#interfaceBody}. - * @param ctx the parse tree - */ - void exitInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#methodDeclaration}. - * @param ctx the parse tree - */ - void enterMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#methodDeclaration}. - * @param ctx the parse tree - */ - void exitMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#methodBody}. - * @param ctx the parse tree - */ - void enterMethodBody(@NotNull Java8Parser.MethodBodyContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#methodBody}. - * @param ctx the parse tree - */ - void exitMethodBody(@NotNull Java8Parser.MethodBodyContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#typeArgument}. - * @param ctx the parse tree - */ - void enterTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#typeArgument}. - * @param ctx the parse tree - */ - void exitTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#typeDeclaration}. - * @param ctx the parse tree - */ - void enterTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#typeDeclaration}. - * @param ctx the parse tree - */ - void exitTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#genericConstructorDeclaration}. - * @param ctx the parse tree - */ - void enterGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#genericConstructorDeclaration}. - * @param ctx the parse tree - */ - void exitGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#classDeclaration}. - * @param ctx the parse tree - */ - void enterClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#classDeclaration}. - * @param ctx the parse tree - */ - void exitClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#enumConstant}. - * @param ctx the parse tree - */ - void enterEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#enumConstant}. - * @param ctx the parse tree - */ - void exitEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#statement}. - * @param ctx the parse tree - */ - void enterStatement(@NotNull Java8Parser.StatementContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#statement}. - * @param ctx the parse tree - */ - void exitStatement(@NotNull Java8Parser.StatementContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#importDeclaration}. - * @param ctx the parse tree - */ - void enterImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#importDeclaration}. - * @param ctx the parse tree - */ - void exitImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#primitiveType}. - * @param ctx the parse tree - */ - void enterPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#primitiveType}. - * @param ctx the parse tree - */ - void exitPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#interfaceDeclaration}. - * @param ctx the parse tree - */ - void enterInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#interfaceDeclaration}. - * @param ctx the parse tree - */ - void exitInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#localVariableDeclarationStatement}. - * @param ctx the parse tree - */ - void enterLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#localVariableDeclarationStatement}. - * @param ctx the parse tree - */ - void exitLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#blockStatement}. - * @param ctx the parse tree - */ - void enterBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#blockStatement}. - * @param ctx the parse tree - */ - void exitBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#fieldDeclaration}. - * @param ctx the parse tree - */ - void enterFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#fieldDeclaration}. - * @param ctx the parse tree - */ - void exitFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#constantDeclarator}. - * @param ctx the parse tree - */ - void enterConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#constantDeclarator}. - * @param ctx the parse tree - */ - void exitConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#resources}. - * @param ctx the parse tree - */ - void enterResources(@NotNull Java8Parser.ResourcesContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#resources}. - * @param ctx the parse tree - */ - void exitResources(@NotNull Java8Parser.ResourcesContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#statementExpression}. - * @param ctx the parse tree - */ - void enterStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#statementExpression}. - * @param ctx the parse tree - */ - void exitStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#interfaceMethodDeclaration}. - * @param ctx the parse tree - */ - void enterInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#interfaceMethodDeclaration}. - * @param ctx the parse tree - */ - void exitInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#packageDeclaration}. - * @param ctx the parse tree - */ - void enterPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#packageDeclaration}. - * @param ctx the parse tree - */ - void exitPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#elementValuePairs}. - * @param ctx the parse tree - */ - void enterElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#elementValuePairs}. - * @param ctx the parse tree - */ - void exitElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#localVariableDeclaration}. - * @param ctx the parse tree - */ - void enterLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#localVariableDeclaration}. - * @param ctx the parse tree - */ - void exitLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#nonWildcardTypeArguments}. - * @param ctx the parse tree - */ - void enterNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#nonWildcardTypeArguments}. - * @param ctx the parse tree - */ - void exitNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#interfaceMemberDeclaration}. - * @param ctx the parse tree - */ - void enterInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#interfaceMemberDeclaration}. - * @param ctx the parse tree - */ - void exitInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#switchLabel}. - * @param ctx the parse tree - */ - void enterSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#switchLabel}. - * @param ctx the parse tree - */ - void exitSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#forInit}. - * @param ctx the parse tree - */ - void enterForInit(@NotNull Java8Parser.ForInitContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#forInit}. - * @param ctx the parse tree - */ - void exitForInit(@NotNull Java8Parser.ForInitContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#formalParameters}. - * @param ctx the parse tree - */ - void enterFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#formalParameters}. - * @param ctx the parse tree - */ - void exitFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#arguments}. - * @param ctx the parse tree - */ - void enterArguments(@NotNull Java8Parser.ArgumentsContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#arguments}. - * @param ctx the parse tree - */ - void exitArguments(@NotNull Java8Parser.ArgumentsContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#genericMethodDeclaration}. - * @param ctx the parse tree - */ - void enterGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#genericMethodDeclaration}. - * @param ctx the parse tree - */ - void exitGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx); - /** - * Enter a parse tree produced by {@link Java8Parser#typeArgumentsOrDiamond}. - * @param ctx the parse tree - */ - void enterTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx); - /** - * Exit a parse tree produced by {@link Java8Parser#typeArgumentsOrDiamond}. - * @param ctx the parse tree - */ - void exitTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx); -} \ No newline at end of file diff --git a/antlr/src/Java8Parser.java b/antlr/src/Java8Parser.java deleted file mode 100644 index ba802b41c..000000000 --- a/antlr/src/Java8Parser.java +++ /dev/null @@ -1,7696 +0,0 @@ -package src; -// Generated from Java8.g4 by ANTLR 4.4 -import org.antlr.v4.runtime.atn.*; -import org.antlr.v4.runtime.dfa.DFA; -import org.antlr.v4.runtime.*; -import org.antlr.v4.runtime.misc.*; -import org.antlr.v4.runtime.tree.*; -import java.util.List; -import java.util.Iterator; -import java.util.ArrayList; - -@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) -public class Java8Parser extends Parser { - static { RuntimeMetaData.checkVersion("4.4", RuntimeMetaData.VERSION); } - - protected static final DFA[] _decisionToDFA; - protected static final PredictionContextCache _sharedContextCache = - new PredictionContextCache(); - public static final int - ABSTRACT=1, ASSERT=2, BOOLEAN=3, BREAK=4, BYTE=5, CASE=6, CATCH=7, CHAR=8, - CLASS=9, CONST=10, CONTINUE=11, DEFAULT=12, DO=13, DOUBLE=14, ELSE=15, - ENUM=16, EXTENDS=17, FINAL=18, FINALLY=19, FLOAT=20, FOR=21, IF=22, GOTO=23, - IMPLEMENTS=24, IMPORT=25, INSTANCEOF=26, INT=27, INTERFACE=28, LONG=29, - NATIVE=30, NEW=31, PACKAGE=32, PRIVATE=33, PROTECTED=34, PUBLIC=35, RETURN=36, - SHORT=37, STATIC=38, STRICTFP=39, SUPER=40, SWITCH=41, SYNCHRONIZED=42, - THIS=43, THROW=44, THROWS=45, TRANSIENT=46, TRY=47, VOID=48, VOLATILE=49, - WHILE=50, IntegerLiteral=51, FloatingPointLiteral=52, BooleanLiteral=53, - CharacterLiteral=54, StringLiteral=55, NullLiteral=56, LPAREN=57, RPAREN=58, - LBRACE=59, RBRACE=60, LBRACK=61, RBRACK=62, SEMI=63, COMMA=64, DOT=65, - ASSIGN=66, GT=67, LT=68, BANG=69, TILDE=70, QUESTION=71, COLON=72, EQUAL=73, - LE=74, GE=75, NOTEQUAL=76, AND=77, OR=78, INC=79, DEC=80, ADD=81, SUB=82, - MUL=83, DIV=84, BITAND=85, BITOR=86, CARET=87, MOD=88, ADD_ASSIGN=89, - SUB_ASSIGN=90, MUL_ASSIGN=91, DIV_ASSIGN=92, AND_ASSIGN=93, OR_ASSIGN=94, - XOR_ASSIGN=95, MOD_ASSIGN=96, LSHIFT_ASSIGN=97, RSHIFT_ASSIGN=98, URSHIFT_ASSIGN=99, - Identifier=100, AT=101, ELLIPSIS=102, WS=103, COMMENT=104, LINE_COMMENT=105; - public static final String[] tokenNames = { - "", "'abstract'", "'assert'", "'boolean'", "'break'", "'byte'", - "'case'", "'catch'", "'char'", "'class'", "'const'", "'continue'", "'default'", - "'do'", "'double'", "'else'", "'enum'", "'extends'", "'final'", "'finally'", - "'float'", "'for'", "'if'", "'goto'", "'implements'", "'import'", "'instanceof'", - "'int'", "'interface'", "'long'", "'native'", "'new'", "'package'", "'private'", - "'protected'", "'public'", "'return'", "'short'", "'static'", "'strictfp'", - "'super'", "'switch'", "'synchronized'", "'this'", "'throw'", "'throws'", - "'transient'", "'try'", "'void'", "'volatile'", "'while'", "IntegerLiteral", - "FloatingPointLiteral", "BooleanLiteral", "CharacterLiteral", "StringLiteral", - "'null'", "'('", "')'", "'{'", "'}'", "'['", "']'", "';'", "','", "'.'", - "'='", "'>'", "'<'", "'!'", "'~'", "'?'", "':'", "'=='", "'<='", "'>='", - "'!='", "'&&'", "'||'", "'++'", "'--'", "'+'", "'-'", "'*'", "'/'", "'&'", - "'|'", "'^'", "'%'", "'+='", "'-='", "'*='", "'/='", "'&='", "'|='", "'^='", - "'%='", "'<<='", "'>>='", "'>>>='", "Identifier", "'@'", "'...'", "WS", - "COMMENT", "LINE_COMMENT" - }; - public static final int - RULE_compilationUnit = 0, RULE_packageDeclaration = 1, RULE_importDeclaration = 2, - RULE_typeDeclaration = 3, RULE_modifier = 4, RULE_classOrInterfaceModifier = 5, - RULE_variableModifier = 6, RULE_classDeclaration = 7, RULE_typeParameters = 8, - RULE_typeParameter = 9, RULE_typeBound = 10, RULE_enumDeclaration = 11, - RULE_enumConstants = 12, RULE_enumConstant = 13, RULE_enumBodyDeclarations = 14, - RULE_interfaceDeclaration = 15, RULE_typeList = 16, RULE_classBody = 17, - RULE_interfaceBody = 18, RULE_classBodyDeclaration = 19, RULE_memberDeclaration = 20, - RULE_methodDeclaration = 21, RULE_genericMethodDeclaration = 22, RULE_constructorDeclaration = 23, - RULE_genericConstructorDeclaration = 24, RULE_fieldDeclaration = 25, RULE_interfaceBodyDeclaration = 26, - RULE_interfaceMemberDeclaration = 27, RULE_constDeclaration = 28, RULE_constantDeclarator = 29, - RULE_interfaceMethodDeclaration = 30, RULE_genericInterfaceMethodDeclaration = 31, - RULE_variableDeclarators = 32, RULE_variableDeclarator = 33, RULE_variableDeclaratorId = 34, - RULE_variableInitializer = 35, RULE_arrayInitializer = 36, RULE_enumConstantName = 37, - RULE_type = 38, RULE_classOrInterfaceType = 39, RULE_primitiveType = 40, - RULE_typeArguments = 41, RULE_typeArgument = 42, RULE_qualifiedNameList = 43, - RULE_formalParameters = 44, RULE_formalParameterList = 45, RULE_formalParameter = 46, - RULE_lastFormalParameter = 47, RULE_methodBody = 48, RULE_constructorBody = 49, - RULE_qualifiedName = 50, RULE_literal = 51, RULE_annotation = 52, RULE_annotationName = 53, - RULE_elementValuePairs = 54, RULE_elementValuePair = 55, RULE_elementValue = 56, - RULE_elementValueArrayInitializer = 57, RULE_annotationTypeDeclaration = 58, - RULE_annotationTypeBody = 59, RULE_annotationTypeElementDeclaration = 60, - RULE_annotationTypeElementRest = 61, RULE_annotationMethodOrConstantRest = 62, - RULE_annotationMethodRest = 63, RULE_annotationConstantRest = 64, RULE_defaultValue = 65, - RULE_block = 66, RULE_blockStatement = 67, RULE_localVariableDeclarationStatement = 68, - RULE_localVariableDeclaration = 69, RULE_statement = 70, RULE_catchClause = 71, - RULE_catchType = 72, RULE_finallyBlock = 73, RULE_resourceSpecification = 74, - RULE_resources = 75, RULE_resource = 76, RULE_switchBlockStatementGroup = 77, - RULE_switchLabel = 78, RULE_forControl = 79, RULE_forInit = 80, RULE_enhancedForControl = 81, - RULE_forUpdate = 82, RULE_parExpression = 83, RULE_expressionList = 84, - RULE_statementExpression = 85, RULE_constantExpression = 86, RULE_expression = 87, - RULE_primary = 88, RULE_creator = 89, RULE_createdName = 90, RULE_innerCreator = 91, - RULE_arrayCreatorRest = 92, RULE_classCreatorRest = 93, RULE_explicitGenericInvocation = 94, - RULE_nonWildcardTypeArguments = 95, RULE_typeArgumentsOrDiamond = 96, - RULE_nonWildcardTypeArgumentsOrDiamond = 97, RULE_superSuffix = 98, RULE_explicitGenericInvocationSuffix = 99, - RULE_arguments = 100; - public static final String[] ruleNames = { - "compilationUnit", "packageDeclaration", "importDeclaration", "typeDeclaration", - "modifier", "classOrInterfaceModifier", "variableModifier", "classDeclaration", - "typeParameters", "typeParameter", "typeBound", "enumDeclaration", "enumConstants", - "enumConstant", "enumBodyDeclarations", "interfaceDeclaration", "typeList", - "classBody", "interfaceBody", "classBodyDeclaration", "memberDeclaration", - "methodDeclaration", "genericMethodDeclaration", "constructorDeclaration", - "genericConstructorDeclaration", "fieldDeclaration", "interfaceBodyDeclaration", - "interfaceMemberDeclaration", "constDeclaration", "constantDeclarator", - "interfaceMethodDeclaration", "genericInterfaceMethodDeclaration", "variableDeclarators", - "variableDeclarator", "variableDeclaratorId", "variableInitializer", "arrayInitializer", - "enumConstantName", "type", "classOrInterfaceType", "primitiveType", "typeArguments", - "typeArgument", "qualifiedNameList", "formalParameters", "formalParameterList", - "formalParameter", "lastFormalParameter", "methodBody", "constructorBody", - "qualifiedName", "literal", "annotation", "annotationName", "elementValuePairs", - "elementValuePair", "elementValue", "elementValueArrayInitializer", "annotationTypeDeclaration", - "annotationTypeBody", "annotationTypeElementDeclaration", "annotationTypeElementRest", - "annotationMethodOrConstantRest", "annotationMethodRest", "annotationConstantRest", - "defaultValue", "block", "blockStatement", "localVariableDeclarationStatement", - "localVariableDeclaration", "statement", "catchClause", "catchType", "finallyBlock", - "resourceSpecification", "resources", "resource", "switchBlockStatementGroup", - "switchLabel", "forControl", "forInit", "enhancedForControl", "forUpdate", - "parExpression", "expressionList", "statementExpression", "constantExpression", - "expression", "primary", "creator", "createdName", "innerCreator", "arrayCreatorRest", - "classCreatorRest", "explicitGenericInvocation", "nonWildcardTypeArguments", - "typeArgumentsOrDiamond", "nonWildcardTypeArgumentsOrDiamond", "superSuffix", - "explicitGenericInvocationSuffix", "arguments" - }; - - @Override - public String getGrammarFileName() { return "Java8.g4"; } - - @Override - public String[] getTokenNames() { return tokenNames; } - - @Override - public String[] getRuleNames() { return ruleNames; } - - @Override - public String getSerializedATN() { return _serializedATN; } - - @Override - public ATN getATN() { return _ATN; } - - public Java8Parser(TokenStream input) { - super(input); - _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); - } - public static class CompilationUnitContext extends ParserRuleContext { - public TypeDeclarationContext typeDeclaration(int i) { - return getRuleContext(TypeDeclarationContext.class,i); - } - public ImportDeclarationContext importDeclaration(int i) { - return getRuleContext(ImportDeclarationContext.class,i); - } - public List importDeclaration() { - return getRuleContexts(ImportDeclarationContext.class); - } - public TerminalNode EOF() { return getToken(Java8Parser.EOF, 0); } - public PackageDeclarationContext packageDeclaration() { - return getRuleContext(PackageDeclarationContext.class,0); - } - public List typeDeclaration() { - return getRuleContexts(TypeDeclarationContext.class); - } - public CompilationUnitContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_compilationUnit; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterCompilationUnit(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitCompilationUnit(this); - } - } - - public final CompilationUnitContext compilationUnit() throws RecognitionException { - CompilationUnitContext _localctx = new CompilationUnitContext(_ctx, getState()); - enterRule(_localctx, 0, RULE_compilationUnit); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(203); - switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) { - case 1: - { - setState(202); packageDeclaration(); - } - break; - } - setState(208); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==IMPORT) { - { - { - setState(205); importDeclaration(); - } - } - setState(210); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(214); - _errHandler.sync(this); - _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << CLASS) | (1L << ENUM) | (1L << FINAL) | (1L << INTERFACE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP) | (1L << SEMI))) != 0) || _la==AT) { - { - { - setState(211); typeDeclaration(); - } - } - setState(216); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(217); match(EOF); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class PackageDeclarationContext extends ParserRuleContext { - public List annotation() { - return getRuleContexts(AnnotationContext.class); - } - public QualifiedNameContext qualifiedName() { - return getRuleContext(QualifiedNameContext.class,0); - } - public AnnotationContext annotation(int i) { - return getRuleContext(AnnotationContext.class,i); - } - public PackageDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_packageDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterPackageDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitPackageDeclaration(this); - } - } - - public final PackageDeclarationContext packageDeclaration() throws RecognitionException { - PackageDeclarationContext _localctx = new PackageDeclarationContext(_ctx, getState()); - enterRule(_localctx, 2, RULE_packageDeclaration); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(222); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==AT) { - { - { - setState(219); annotation(); - } - } - setState(224); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(225); match(PACKAGE); - setState(226); qualifiedName(); - setState(227); match(SEMI); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ImportDeclarationContext extends ParserRuleContext { - public QualifiedNameContext qualifiedName() { - return getRuleContext(QualifiedNameContext.class,0); - } - public ImportDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_importDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterImportDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitImportDeclaration(this); - } - } - - public final ImportDeclarationContext importDeclaration() throws RecognitionException { - ImportDeclarationContext _localctx = new ImportDeclarationContext(_ctx, getState()); - enterRule(_localctx, 4, RULE_importDeclaration); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(229); match(IMPORT); - setState(231); - _la = _input.LA(1); - if (_la==STATIC) { - { - setState(230); match(STATIC); - } - } - - setState(233); qualifiedName(); - setState(236); - _la = _input.LA(1); - if (_la==DOT) { - { - setState(234); match(DOT); - setState(235); match(MUL); - } - } - - setState(238); match(SEMI); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class TypeDeclarationContext extends ParserRuleContext { - public ClassOrInterfaceModifierContext classOrInterfaceModifier(int i) { - return getRuleContext(ClassOrInterfaceModifierContext.class,i); - } - public EnumDeclarationContext enumDeclaration() { - return getRuleContext(EnumDeclarationContext.class,0); - } - public ClassDeclarationContext classDeclaration() { - return getRuleContext(ClassDeclarationContext.class,0); - } - public AnnotationTypeDeclarationContext annotationTypeDeclaration() { - return getRuleContext(AnnotationTypeDeclarationContext.class,0); - } - public List classOrInterfaceModifier() { - return getRuleContexts(ClassOrInterfaceModifierContext.class); - } - public InterfaceDeclarationContext interfaceDeclaration() { - return getRuleContext(InterfaceDeclarationContext.class,0); - } - public TypeDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_typeDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeDeclaration(this); - } - } - - public final TypeDeclarationContext typeDeclaration() throws RecognitionException { - TypeDeclarationContext _localctx = new TypeDeclarationContext(_ctx, getState()); - enterRule(_localctx, 6, RULE_typeDeclaration); - int _la; - try { - int _alt; - setState(269); - switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) { - case 1: - enterOuterAlt(_localctx, 1); - { - setState(243); - _errHandler.sync(this); - _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==AT) { - { - { - setState(240); classOrInterfaceModifier(); - } - } - setState(245); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(246); classDeclaration(); - } - break; - case 2: - enterOuterAlt(_localctx, 2); - { - setState(250); - _errHandler.sync(this); - _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==AT) { - { - { - setState(247); classOrInterfaceModifier(); - } - } - setState(252); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(253); enumDeclaration(); - } - break; - case 3: - enterOuterAlt(_localctx, 3); - { - setState(257); - _errHandler.sync(this); - _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==AT) { - { - { - setState(254); classOrInterfaceModifier(); - } - } - setState(259); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(260); interfaceDeclaration(); - } - break; - case 4: - enterOuterAlt(_localctx, 4); - { - setState(264); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,9,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - { - { - setState(261); classOrInterfaceModifier(); - } - } - } - setState(266); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,9,_ctx); - } - setState(267); annotationTypeDeclaration(); - } - break; - case 5: - enterOuterAlt(_localctx, 5); - { - setState(268); match(SEMI); - } - break; - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ModifierContext extends ParserRuleContext { - public ClassOrInterfaceModifierContext classOrInterfaceModifier() { - return getRuleContext(ClassOrInterfaceModifierContext.class,0); - } - public ModifierContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_modifier; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterModifier(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitModifier(this); - } - } - - public final ModifierContext modifier() throws RecognitionException { - ModifierContext _localctx = new ModifierContext(_ctx, getState()); - enterRule(_localctx, 8, RULE_modifier); - int _la; - try { - setState(273); - switch (_input.LA(1)) { - case ABSTRACT: - case FINAL: - case PRIVATE: - case PROTECTED: - case PUBLIC: - case STATIC: - case STRICTFP: - case AT: - enterOuterAlt(_localctx, 1); - { - setState(271); classOrInterfaceModifier(); - } - break; - case NATIVE: - case SYNCHRONIZED: - case TRANSIENT: - case VOLATILE: - enterOuterAlt(_localctx, 2); - { - setState(272); - _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NATIVE) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOLATILE))) != 0)) ) { - _errHandler.recoverInline(this); - } - consume(); - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ClassOrInterfaceModifierContext extends ParserRuleContext { - public AnnotationContext annotation() { - return getRuleContext(AnnotationContext.class,0); - } - public ClassOrInterfaceModifierContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_classOrInterfaceModifier; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterClassOrInterfaceModifier(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitClassOrInterfaceModifier(this); - } - } - - public final ClassOrInterfaceModifierContext classOrInterfaceModifier() throws RecognitionException { - ClassOrInterfaceModifierContext _localctx = new ClassOrInterfaceModifierContext(_ctx, getState()); - enterRule(_localctx, 10, RULE_classOrInterfaceModifier); - int _la; - try { - setState(277); - switch (_input.LA(1)) { - case AT: - enterOuterAlt(_localctx, 1); - { - setState(275); annotation(); - } - break; - case ABSTRACT: - case FINAL: - case PRIVATE: - case PROTECTED: - case PUBLIC: - case STATIC: - case STRICTFP: - enterOuterAlt(_localctx, 2); - { - setState(276); - _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0)) ) { - _errHandler.recoverInline(this); - } - consume(); - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class VariableModifierContext extends ParserRuleContext { - public AnnotationContext annotation() { - return getRuleContext(AnnotationContext.class,0); - } - public VariableModifierContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_variableModifier; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterVariableModifier(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitVariableModifier(this); - } - } - - public final VariableModifierContext variableModifier() throws RecognitionException { - VariableModifierContext _localctx = new VariableModifierContext(_ctx, getState()); - enterRule(_localctx, 12, RULE_variableModifier); - try { - setState(281); - switch (_input.LA(1)) { - case FINAL: - enterOuterAlt(_localctx, 1); - { - setState(279); match(FINAL); - } - break; - case AT: - enterOuterAlt(_localctx, 2); - { - setState(280); annotation(); - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ClassDeclarationContext extends ParserRuleContext { - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public ClassBodyContext classBody() { - return getRuleContext(ClassBodyContext.class,0); - } - public TypeListContext typeList() { - return getRuleContext(TypeListContext.class,0); - } - public TypeParametersContext typeParameters() { - return getRuleContext(TypeParametersContext.class,0); - } - public TypeContext type() { - return getRuleContext(TypeContext.class,0); - } - public ClassDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_classDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterClassDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitClassDeclaration(this); - } - } - - public final ClassDeclarationContext classDeclaration() throws RecognitionException { - ClassDeclarationContext _localctx = new ClassDeclarationContext(_ctx, getState()); - enterRule(_localctx, 14, RULE_classDeclaration); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(283); match(CLASS); - setState(284); match(Identifier); - setState(286); - _la = _input.LA(1); - if (_la==LT) { - { - setState(285); typeParameters(); - } - } - - setState(290); - _la = _input.LA(1); - if (_la==EXTENDS) { - { - setState(288); match(EXTENDS); - setState(289); type(); - } - } - - setState(294); - _la = _input.LA(1); - if (_la==IMPLEMENTS) { - { - setState(292); match(IMPLEMENTS); - setState(293); typeList(); - } - } - - setState(296); classBody(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class TypeParametersContext extends ParserRuleContext { - public List typeParameter() { - return getRuleContexts(TypeParameterContext.class); - } - public TypeParameterContext typeParameter(int i) { - return getRuleContext(TypeParameterContext.class,i); - } - public TypeParametersContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_typeParameters; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeParameters(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeParameters(this); - } - } - - public final TypeParametersContext typeParameters() throws RecognitionException { - TypeParametersContext _localctx = new TypeParametersContext(_ctx, getState()); - enterRule(_localctx, 16, RULE_typeParameters); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(298); match(LT); - setState(299); typeParameter(); - setState(304); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==COMMA) { - { - { - setState(300); match(COMMA); - setState(301); typeParameter(); - } - } - setState(306); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(307); match(GT); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class TypeParameterContext extends ParserRuleContext { - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public TypeBoundContext typeBound() { - return getRuleContext(TypeBoundContext.class,0); - } - public TypeParameterContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_typeParameter; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeParameter(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeParameter(this); - } - } - - public final TypeParameterContext typeParameter() throws RecognitionException { - TypeParameterContext _localctx = new TypeParameterContext(_ctx, getState()); - enterRule(_localctx, 18, RULE_typeParameter); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(309); match(Identifier); - setState(312); - _la = _input.LA(1); - if (_la==EXTENDS) { - { - setState(310); match(EXTENDS); - setState(311); typeBound(); - } - } - - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class TypeBoundContext extends ParserRuleContext { - public TypeContext type(int i) { - return getRuleContext(TypeContext.class,i); - } - public List type() { - return getRuleContexts(TypeContext.class); - } - public TypeBoundContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_typeBound; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeBound(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeBound(this); - } - } - - public final TypeBoundContext typeBound() throws RecognitionException { - TypeBoundContext _localctx = new TypeBoundContext(_ctx, getState()); - enterRule(_localctx, 20, RULE_typeBound); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(314); type(); - setState(319); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==BITAND) { - { - { - setState(315); match(BITAND); - setState(316); type(); - } - } - setState(321); - _errHandler.sync(this); - _la = _input.LA(1); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class EnumDeclarationContext extends ParserRuleContext { - public EnumBodyDeclarationsContext enumBodyDeclarations() { - return getRuleContext(EnumBodyDeclarationsContext.class,0); - } - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public TypeListContext typeList() { - return getRuleContext(TypeListContext.class,0); - } - public TerminalNode ENUM() { return getToken(Java8Parser.ENUM, 0); } - public EnumConstantsContext enumConstants() { - return getRuleContext(EnumConstantsContext.class,0); - } - public EnumDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_enumDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterEnumDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitEnumDeclaration(this); - } - } - - public final EnumDeclarationContext enumDeclaration() throws RecognitionException { - EnumDeclarationContext _localctx = new EnumDeclarationContext(_ctx, getState()); - enterRule(_localctx, 22, RULE_enumDeclaration); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(322); match(ENUM); - setState(323); match(Identifier); - setState(326); - _la = _input.LA(1); - if (_la==IMPLEMENTS) { - { - setState(324); match(IMPLEMENTS); - setState(325); typeList(); - } - } - - setState(328); match(LBRACE); - setState(330); - _la = _input.LA(1); - if (_la==Identifier || _la==AT) { - { - setState(329); enumConstants(); - } - } - - setState(333); - _la = _input.LA(1); - if (_la==COMMA) { - { - setState(332); match(COMMA); - } - } - - setState(336); - _la = _input.LA(1); - if (_la==SEMI) { - { - setState(335); enumBodyDeclarations(); - } - } - - setState(338); match(RBRACE); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class EnumConstantsContext extends ParserRuleContext { - public List enumConstant() { - return getRuleContexts(EnumConstantContext.class); - } - public EnumConstantContext enumConstant(int i) { - return getRuleContext(EnumConstantContext.class,i); - } - public EnumConstantsContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_enumConstants; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterEnumConstants(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitEnumConstants(this); - } - } - - public final EnumConstantsContext enumConstants() throws RecognitionException { - EnumConstantsContext _localctx = new EnumConstantsContext(_ctx, getState()); - enterRule(_localctx, 24, RULE_enumConstants); - try { - int _alt; - enterOuterAlt(_localctx, 1); - { - setState(340); enumConstant(); - setState(345); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,24,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - { - { - setState(341); match(COMMA); - setState(342); enumConstant(); - } - } - } - setState(347); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,24,_ctx); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class EnumConstantContext extends ParserRuleContext { - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public List annotation() { - return getRuleContexts(AnnotationContext.class); - } - public ClassBodyContext classBody() { - return getRuleContext(ClassBodyContext.class,0); - } - public AnnotationContext annotation(int i) { - return getRuleContext(AnnotationContext.class,i); - } - public ArgumentsContext arguments() { - return getRuleContext(ArgumentsContext.class,0); - } - public EnumConstantContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_enumConstant; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterEnumConstant(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitEnumConstant(this); - } - } - - public final EnumConstantContext enumConstant() throws RecognitionException { - EnumConstantContext _localctx = new EnumConstantContext(_ctx, getState()); - enterRule(_localctx, 26, RULE_enumConstant); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(351); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==AT) { - { - { - setState(348); annotation(); - } - } - setState(353); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(354); match(Identifier); - setState(356); - _la = _input.LA(1); - if (_la==LPAREN) { - { - setState(355); arguments(); - } - } - - setState(359); - _la = _input.LA(1); - if (_la==LBRACE) { - { - setState(358); classBody(); - } - } - - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class EnumBodyDeclarationsContext extends ParserRuleContext { - public List classBodyDeclaration() { - return getRuleContexts(ClassBodyDeclarationContext.class); - } - public ClassBodyDeclarationContext classBodyDeclaration(int i) { - return getRuleContext(ClassBodyDeclarationContext.class,i); - } - public EnumBodyDeclarationsContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_enumBodyDeclarations; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterEnumBodyDeclarations(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitEnumBodyDeclarations(this); - } - } - - public final EnumBodyDeclarationsContext enumBodyDeclarations() throws RecognitionException { - EnumBodyDeclarationsContext _localctx = new EnumBodyDeclarationsContext(_ctx, getState()); - enterRule(_localctx, 28, RULE_enumBodyDeclarations); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(361); match(SEMI); - setState(365); - _errHandler.sync(this); - _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOID) | (1L << VOLATILE) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { - { - { - setState(362); classBodyDeclaration(); - } - } - setState(367); - _errHandler.sync(this); - _la = _input.LA(1); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class InterfaceDeclarationContext extends ParserRuleContext { - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public InterfaceBodyContext interfaceBody() { - return getRuleContext(InterfaceBodyContext.class,0); - } - public TypeListContext typeList() { - return getRuleContext(TypeListContext.class,0); - } - public TypeParametersContext typeParameters() { - return getRuleContext(TypeParametersContext.class,0); - } - public InterfaceDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_interfaceDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterInterfaceDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitInterfaceDeclaration(this); - } - } - - public final InterfaceDeclarationContext interfaceDeclaration() throws RecognitionException { - InterfaceDeclarationContext _localctx = new InterfaceDeclarationContext(_ctx, getState()); - enterRule(_localctx, 30, RULE_interfaceDeclaration); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(368); match(INTERFACE); - setState(369); match(Identifier); - setState(371); - _la = _input.LA(1); - if (_la==LT) { - { - setState(370); typeParameters(); - } - } - - setState(375); - _la = _input.LA(1); - if (_la==EXTENDS) { - { - setState(373); match(EXTENDS); - setState(374); typeList(); - } - } - - setState(377); interfaceBody(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class TypeListContext extends ParserRuleContext { - public TypeContext type(int i) { - return getRuleContext(TypeContext.class,i); - } - public List type() { - return getRuleContexts(TypeContext.class); - } - public TypeListContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_typeList; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeList(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeList(this); - } - } - - public final TypeListContext typeList() throws RecognitionException { - TypeListContext _localctx = new TypeListContext(_ctx, getState()); - enterRule(_localctx, 32, RULE_typeList); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(379); type(); - setState(384); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==COMMA) { - { - { - setState(380); match(COMMA); - setState(381); type(); - } - } - setState(386); - _errHandler.sync(this); - _la = _input.LA(1); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ClassBodyContext extends ParserRuleContext { - public List classBodyDeclaration() { - return getRuleContexts(ClassBodyDeclarationContext.class); - } - public ClassBodyDeclarationContext classBodyDeclaration(int i) { - return getRuleContext(ClassBodyDeclarationContext.class,i); - } - public ClassBodyContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_classBody; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterClassBody(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitClassBody(this); - } - } - - public final ClassBodyContext classBody() throws RecognitionException { - ClassBodyContext _localctx = new ClassBodyContext(_ctx, getState()); - enterRule(_localctx, 34, RULE_classBody); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(387); match(LBRACE); - setState(391); - _errHandler.sync(this); - _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOID) | (1L << VOLATILE) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { - { - { - setState(388); classBodyDeclaration(); - } - } - setState(393); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(394); match(RBRACE); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class InterfaceBodyContext extends ParserRuleContext { - public List interfaceBodyDeclaration() { - return getRuleContexts(InterfaceBodyDeclarationContext.class); - } - public InterfaceBodyDeclarationContext interfaceBodyDeclaration(int i) { - return getRuleContext(InterfaceBodyDeclarationContext.class,i); - } - public InterfaceBodyContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_interfaceBody; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterInterfaceBody(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitInterfaceBody(this); - } - } - - public final InterfaceBodyContext interfaceBody() throws RecognitionException { - InterfaceBodyContext _localctx = new InterfaceBodyContext(_ctx, getState()); - enterRule(_localctx, 36, RULE_interfaceBody); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(396); match(LBRACE); - setState(400); - _errHandler.sync(this); - _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOID) | (1L << VOLATILE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { - { - { - setState(397); interfaceBodyDeclaration(); - } - } - setState(402); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(403); match(RBRACE); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ClassBodyDeclarationContext extends ParserRuleContext { - public List modifier() { - return getRuleContexts(ModifierContext.class); - } - public MemberDeclarationContext memberDeclaration() { - return getRuleContext(MemberDeclarationContext.class,0); - } - public ModifierContext modifier(int i) { - return getRuleContext(ModifierContext.class,i); - } - public BlockContext block() { - return getRuleContext(BlockContext.class,0); - } - public ClassBodyDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_classBodyDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterClassBodyDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitClassBodyDeclaration(this); - } - } - - public final ClassBodyDeclarationContext classBodyDeclaration() throws RecognitionException { - ClassBodyDeclarationContext _localctx = new ClassBodyDeclarationContext(_ctx, getState()); - enterRule(_localctx, 38, RULE_classBodyDeclaration); - int _la; - try { - int _alt; - setState(417); - switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) { - case 1: - enterOuterAlt(_localctx, 1); - { - setState(405); match(SEMI); - } - break; - case 2: - enterOuterAlt(_localctx, 2); - { - setState(407); - _la = _input.LA(1); - if (_la==STATIC) { - { - setState(406); match(STATIC); - } - } - - setState(409); block(); - } - break; - case 3: - enterOuterAlt(_localctx, 3); - { - setState(413); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,35,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - { - { - setState(410); modifier(); - } - } - } - setState(415); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,35,_ctx); - } - setState(416); memberDeclaration(); - } - break; - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class MemberDeclarationContext extends ParserRuleContext { - public GenericMethodDeclarationContext genericMethodDeclaration() { - return getRuleContext(GenericMethodDeclarationContext.class,0); - } - public MethodDeclarationContext methodDeclaration() { - return getRuleContext(MethodDeclarationContext.class,0); - } - public EnumDeclarationContext enumDeclaration() { - return getRuleContext(EnumDeclarationContext.class,0); - } - public ClassDeclarationContext classDeclaration() { - return getRuleContext(ClassDeclarationContext.class,0); - } - public AnnotationTypeDeclarationContext annotationTypeDeclaration() { - return getRuleContext(AnnotationTypeDeclarationContext.class,0); - } - public GenericConstructorDeclarationContext genericConstructorDeclaration() { - return getRuleContext(GenericConstructorDeclarationContext.class,0); - } - public InterfaceDeclarationContext interfaceDeclaration() { - return getRuleContext(InterfaceDeclarationContext.class,0); - } - public ConstructorDeclarationContext constructorDeclaration() { - return getRuleContext(ConstructorDeclarationContext.class,0); - } - public FieldDeclarationContext fieldDeclaration() { - return getRuleContext(FieldDeclarationContext.class,0); - } - public MemberDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_memberDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterMemberDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitMemberDeclaration(this); - } - } - - public final MemberDeclarationContext memberDeclaration() throws RecognitionException { - MemberDeclarationContext _localctx = new MemberDeclarationContext(_ctx, getState()); - enterRule(_localctx, 40, RULE_memberDeclaration); - try { - setState(428); - switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) { - case 1: - enterOuterAlt(_localctx, 1); - { - setState(419); methodDeclaration(); - } - break; - case 2: - enterOuterAlt(_localctx, 2); - { - setState(420); genericMethodDeclaration(); - } - break; - case 3: - enterOuterAlt(_localctx, 3); - { - setState(421); fieldDeclaration(); - } - break; - case 4: - enterOuterAlt(_localctx, 4); - { - setState(422); constructorDeclaration(); - } - break; - case 5: - enterOuterAlt(_localctx, 5); - { - setState(423); genericConstructorDeclaration(); - } - break; - case 6: - enterOuterAlt(_localctx, 6); - { - setState(424); interfaceDeclaration(); - } - break; - case 7: - enterOuterAlt(_localctx, 7); - { - setState(425); annotationTypeDeclaration(); - } - break; - case 8: - enterOuterAlt(_localctx, 8); - { - setState(426); classDeclaration(); - } - break; - case 9: - enterOuterAlt(_localctx, 9); - { - setState(427); enumDeclaration(); - } - break; - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class MethodDeclarationContext extends ParserRuleContext { - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public MethodBodyContext methodBody() { - return getRuleContext(MethodBodyContext.class,0); - } - public QualifiedNameListContext qualifiedNameList() { - return getRuleContext(QualifiedNameListContext.class,0); - } - public FormalParametersContext formalParameters() { - return getRuleContext(FormalParametersContext.class,0); - } - public TypeContext type() { - return getRuleContext(TypeContext.class,0); - } - public MethodDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_methodDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterMethodDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitMethodDeclaration(this); - } - } - - public final MethodDeclarationContext methodDeclaration() throws RecognitionException { - MethodDeclarationContext _localctx = new MethodDeclarationContext(_ctx, getState()); - enterRule(_localctx, 42, RULE_methodDeclaration); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(432); - switch (_input.LA(1)) { - case BOOLEAN: - case BYTE: - case CHAR: - case DOUBLE: - case FLOAT: - case INT: - case LONG: - case SHORT: - case Identifier: - { - setState(430); type(); - } - break; - case VOID: - { - setState(431); match(VOID); - } - break; - default: - throw new NoViableAltException(this); - } - setState(434); match(Identifier); - setState(435); formalParameters(); - setState(440); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==LBRACK) { - { - { - setState(436); match(LBRACK); - setState(437); match(RBRACK); - } - } - setState(442); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(445); - _la = _input.LA(1); - if (_la==THROWS) { - { - setState(443); match(THROWS); - setState(444); qualifiedNameList(); - } - } - - setState(449); - switch (_input.LA(1)) { - case LBRACE: - { - setState(447); methodBody(); - } - break; - case SEMI: - { - setState(448); match(SEMI); - } - break; - default: - throw new NoViableAltException(this); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class GenericMethodDeclarationContext extends ParserRuleContext { - public MethodDeclarationContext methodDeclaration() { - return getRuleContext(MethodDeclarationContext.class,0); - } - public TypeParametersContext typeParameters() { - return getRuleContext(TypeParametersContext.class,0); - } - public GenericMethodDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_genericMethodDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterGenericMethodDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitGenericMethodDeclaration(this); - } - } - - public final GenericMethodDeclarationContext genericMethodDeclaration() throws RecognitionException { - GenericMethodDeclarationContext _localctx = new GenericMethodDeclarationContext(_ctx, getState()); - enterRule(_localctx, 44, RULE_genericMethodDeclaration); - try { - enterOuterAlt(_localctx, 1); - { - setState(451); typeParameters(); - setState(452); methodDeclaration(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ConstructorDeclarationContext extends ParserRuleContext { - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public ConstructorBodyContext constructorBody() { - return getRuleContext(ConstructorBodyContext.class,0); - } - public QualifiedNameListContext qualifiedNameList() { - return getRuleContext(QualifiedNameListContext.class,0); - } - public FormalParametersContext formalParameters() { - return getRuleContext(FormalParametersContext.class,0); - } - public ConstructorDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_constructorDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterConstructorDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitConstructorDeclaration(this); - } - } - - public final ConstructorDeclarationContext constructorDeclaration() throws RecognitionException { - ConstructorDeclarationContext _localctx = new ConstructorDeclarationContext(_ctx, getState()); - enterRule(_localctx, 46, RULE_constructorDeclaration); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(454); match(Identifier); - setState(455); formalParameters(); - setState(458); - _la = _input.LA(1); - if (_la==THROWS) { - { - setState(456); match(THROWS); - setState(457); qualifiedNameList(); - } - } - - setState(460); constructorBody(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class GenericConstructorDeclarationContext extends ParserRuleContext { - public TypeParametersContext typeParameters() { - return getRuleContext(TypeParametersContext.class,0); - } - public ConstructorDeclarationContext constructorDeclaration() { - return getRuleContext(ConstructorDeclarationContext.class,0); - } - public GenericConstructorDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_genericConstructorDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterGenericConstructorDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitGenericConstructorDeclaration(this); - } - } - - public final GenericConstructorDeclarationContext genericConstructorDeclaration() throws RecognitionException { - GenericConstructorDeclarationContext _localctx = new GenericConstructorDeclarationContext(_ctx, getState()); - enterRule(_localctx, 48, RULE_genericConstructorDeclaration); - try { - enterOuterAlt(_localctx, 1); - { - setState(462); typeParameters(); - setState(463); constructorDeclaration(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class FieldDeclarationContext extends ParserRuleContext { - public VariableDeclaratorsContext variableDeclarators() { - return getRuleContext(VariableDeclaratorsContext.class,0); - } - public TypeContext type() { - return getRuleContext(TypeContext.class,0); - } - public FieldDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_fieldDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterFieldDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitFieldDeclaration(this); - } - } - - public final FieldDeclarationContext fieldDeclaration() throws RecognitionException { - FieldDeclarationContext _localctx = new FieldDeclarationContext(_ctx, getState()); - enterRule(_localctx, 50, RULE_fieldDeclaration); - try { - enterOuterAlt(_localctx, 1); - { - setState(465); type(); - setState(466); variableDeclarators(); - setState(467); match(SEMI); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class InterfaceBodyDeclarationContext extends ParserRuleContext { - public List modifier() { - return getRuleContexts(ModifierContext.class); - } - public ModifierContext modifier(int i) { - return getRuleContext(ModifierContext.class,i); - } - public InterfaceMemberDeclarationContext interfaceMemberDeclaration() { - return getRuleContext(InterfaceMemberDeclarationContext.class,0); - } - public InterfaceBodyDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_interfaceBodyDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterInterfaceBodyDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitInterfaceBodyDeclaration(this); - } - } - - public final InterfaceBodyDeclarationContext interfaceBodyDeclaration() throws RecognitionException { - InterfaceBodyDeclarationContext _localctx = new InterfaceBodyDeclarationContext(_ctx, getState()); - enterRule(_localctx, 52, RULE_interfaceBodyDeclaration); - try { - int _alt; - setState(477); - switch (_input.LA(1)) { - case ABSTRACT: - case BOOLEAN: - case BYTE: - case CHAR: - case CLASS: - case DOUBLE: - case ENUM: - case FINAL: - case FLOAT: - case INT: - case INTERFACE: - case LONG: - case NATIVE: - case PRIVATE: - case PROTECTED: - case PUBLIC: - case SHORT: - case STATIC: - case STRICTFP: - case SYNCHRONIZED: - case TRANSIENT: - case VOID: - case VOLATILE: - case LT: - case Identifier: - case AT: - enterOuterAlt(_localctx, 1); - { - setState(472); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,43,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - { - { - setState(469); modifier(); - } - } - } - setState(474); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,43,_ctx); - } - setState(475); interfaceMemberDeclaration(); - } - break; - case SEMI: - enterOuterAlt(_localctx, 2); - { - setState(476); match(SEMI); - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class InterfaceMemberDeclarationContext extends ParserRuleContext { - public EnumDeclarationContext enumDeclaration() { - return getRuleContext(EnumDeclarationContext.class,0); - } - public ClassDeclarationContext classDeclaration() { - return getRuleContext(ClassDeclarationContext.class,0); - } - public GenericInterfaceMethodDeclarationContext genericInterfaceMethodDeclaration() { - return getRuleContext(GenericInterfaceMethodDeclarationContext.class,0); - } - public AnnotationTypeDeclarationContext annotationTypeDeclaration() { - return getRuleContext(AnnotationTypeDeclarationContext.class,0); - } - public InterfaceDeclarationContext interfaceDeclaration() { - return getRuleContext(InterfaceDeclarationContext.class,0); - } - public ConstDeclarationContext constDeclaration() { - return getRuleContext(ConstDeclarationContext.class,0); - } - public InterfaceMethodDeclarationContext interfaceMethodDeclaration() { - return getRuleContext(InterfaceMethodDeclarationContext.class,0); - } - public InterfaceMemberDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_interfaceMemberDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterInterfaceMemberDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitInterfaceMemberDeclaration(this); - } - } - - public final InterfaceMemberDeclarationContext interfaceMemberDeclaration() throws RecognitionException { - InterfaceMemberDeclarationContext _localctx = new InterfaceMemberDeclarationContext(_ctx, getState()); - enterRule(_localctx, 54, RULE_interfaceMemberDeclaration); - try { - setState(486); - switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) { - case 1: - enterOuterAlt(_localctx, 1); - { - setState(479); constDeclaration(); - } - break; - case 2: - enterOuterAlt(_localctx, 2); - { - setState(480); interfaceMethodDeclaration(); - } - break; - case 3: - enterOuterAlt(_localctx, 3); - { - setState(481); genericInterfaceMethodDeclaration(); - } - break; - case 4: - enterOuterAlt(_localctx, 4); - { - setState(482); interfaceDeclaration(); - } - break; - case 5: - enterOuterAlt(_localctx, 5); - { - setState(483); annotationTypeDeclaration(); - } - break; - case 6: - enterOuterAlt(_localctx, 6); - { - setState(484); classDeclaration(); - } - break; - case 7: - enterOuterAlt(_localctx, 7); - { - setState(485); enumDeclaration(); - } - break; - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ConstDeclarationContext extends ParserRuleContext { - public ConstantDeclaratorContext constantDeclarator(int i) { - return getRuleContext(ConstantDeclaratorContext.class,i); - } - public List constantDeclarator() { - return getRuleContexts(ConstantDeclaratorContext.class); - } - public TypeContext type() { - return getRuleContext(TypeContext.class,0); - } - public ConstDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_constDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterConstDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitConstDeclaration(this); - } - } - - public final ConstDeclarationContext constDeclaration() throws RecognitionException { - ConstDeclarationContext _localctx = new ConstDeclarationContext(_ctx, getState()); - enterRule(_localctx, 56, RULE_constDeclaration); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(488); type(); - setState(489); constantDeclarator(); - setState(494); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==COMMA) { - { - { - setState(490); match(COMMA); - setState(491); constantDeclarator(); - } - } - setState(496); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(497); match(SEMI); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ConstantDeclaratorContext extends ParserRuleContext { - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public VariableInitializerContext variableInitializer() { - return getRuleContext(VariableInitializerContext.class,0); - } - public ConstantDeclaratorContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_constantDeclarator; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterConstantDeclarator(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitConstantDeclarator(this); - } - } - - public final ConstantDeclaratorContext constantDeclarator() throws RecognitionException { - ConstantDeclaratorContext _localctx = new ConstantDeclaratorContext(_ctx, getState()); - enterRule(_localctx, 58, RULE_constantDeclarator); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(499); match(Identifier); - setState(504); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==LBRACK) { - { - { - setState(500); match(LBRACK); - setState(501); match(RBRACK); - } - } - setState(506); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(507); match(ASSIGN); - setState(508); variableInitializer(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class InterfaceMethodDeclarationContext extends ParserRuleContext { - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public QualifiedNameListContext qualifiedNameList() { - return getRuleContext(QualifiedNameListContext.class,0); - } - public FormalParametersContext formalParameters() { - return getRuleContext(FormalParametersContext.class,0); - } - public TypeContext type() { - return getRuleContext(TypeContext.class,0); - } - public InterfaceMethodDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_interfaceMethodDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterInterfaceMethodDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitInterfaceMethodDeclaration(this); - } - } - - public final InterfaceMethodDeclarationContext interfaceMethodDeclaration() throws RecognitionException { - InterfaceMethodDeclarationContext _localctx = new InterfaceMethodDeclarationContext(_ctx, getState()); - enterRule(_localctx, 60, RULE_interfaceMethodDeclaration); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(512); - switch (_input.LA(1)) { - case BOOLEAN: - case BYTE: - case CHAR: - case DOUBLE: - case FLOAT: - case INT: - case LONG: - case SHORT: - case Identifier: - { - setState(510); type(); - } - break; - case VOID: - { - setState(511); match(VOID); - } - break; - default: - throw new NoViableAltException(this); - } - setState(514); match(Identifier); - setState(515); formalParameters(); - setState(520); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==LBRACK) { - { - { - setState(516); match(LBRACK); - setState(517); match(RBRACK); - } - } - setState(522); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(525); - _la = _input.LA(1); - if (_la==THROWS) { - { - setState(523); match(THROWS); - setState(524); qualifiedNameList(); - } - } - - setState(527); match(SEMI); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class GenericInterfaceMethodDeclarationContext extends ParserRuleContext { - public TypeParametersContext typeParameters() { - return getRuleContext(TypeParametersContext.class,0); - } - public InterfaceMethodDeclarationContext interfaceMethodDeclaration() { - return getRuleContext(InterfaceMethodDeclarationContext.class,0); - } - public GenericInterfaceMethodDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_genericInterfaceMethodDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterGenericInterfaceMethodDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitGenericInterfaceMethodDeclaration(this); - } - } - - public final GenericInterfaceMethodDeclarationContext genericInterfaceMethodDeclaration() throws RecognitionException { - GenericInterfaceMethodDeclarationContext _localctx = new GenericInterfaceMethodDeclarationContext(_ctx, getState()); - enterRule(_localctx, 62, RULE_genericInterfaceMethodDeclaration); - try { - enterOuterAlt(_localctx, 1); - { - setState(529); typeParameters(); - setState(530); interfaceMethodDeclaration(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class VariableDeclaratorsContext extends ParserRuleContext { - public List variableDeclarator() { - return getRuleContexts(VariableDeclaratorContext.class); - } - public VariableDeclaratorContext variableDeclarator(int i) { - return getRuleContext(VariableDeclaratorContext.class,i); - } - public VariableDeclaratorsContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_variableDeclarators; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterVariableDeclarators(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitVariableDeclarators(this); - } - } - - public final VariableDeclaratorsContext variableDeclarators() throws RecognitionException { - VariableDeclaratorsContext _localctx = new VariableDeclaratorsContext(_ctx, getState()); - enterRule(_localctx, 64, RULE_variableDeclarators); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(532); variableDeclarator(); - setState(537); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==COMMA) { - { - { - setState(533); match(COMMA); - setState(534); variableDeclarator(); - } - } - setState(539); - _errHandler.sync(this); - _la = _input.LA(1); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class VariableDeclaratorContext extends ParserRuleContext { - public VariableInitializerContext variableInitializer() { - return getRuleContext(VariableInitializerContext.class,0); - } - public VariableDeclaratorIdContext variableDeclaratorId() { - return getRuleContext(VariableDeclaratorIdContext.class,0); - } - public VariableDeclaratorContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_variableDeclarator; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterVariableDeclarator(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitVariableDeclarator(this); - } - } - - public final VariableDeclaratorContext variableDeclarator() throws RecognitionException { - VariableDeclaratorContext _localctx = new VariableDeclaratorContext(_ctx, getState()); - enterRule(_localctx, 66, RULE_variableDeclarator); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(540); variableDeclaratorId(); - setState(543); - _la = _input.LA(1); - if (_la==ASSIGN) { - { - setState(541); match(ASSIGN); - setState(542); variableInitializer(); - } - } - - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class VariableDeclaratorIdContext extends ParserRuleContext { - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public VariableDeclaratorIdContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_variableDeclaratorId; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterVariableDeclaratorId(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitVariableDeclaratorId(this); - } - } - - public final VariableDeclaratorIdContext variableDeclaratorId() throws RecognitionException { - VariableDeclaratorIdContext _localctx = new VariableDeclaratorIdContext(_ctx, getState()); - enterRule(_localctx, 68, RULE_variableDeclaratorId); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(545); match(Identifier); - setState(550); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==LBRACK) { - { - { - setState(546); match(LBRACK); - setState(547); match(RBRACK); - } - } - setState(552); - _errHandler.sync(this); - _la = _input.LA(1); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class VariableInitializerContext extends ParserRuleContext { - public ArrayInitializerContext arrayInitializer() { - return getRuleContext(ArrayInitializerContext.class,0); - } - public ExpressionContext expression() { - return getRuleContext(ExpressionContext.class,0); - } - public VariableInitializerContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_variableInitializer; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterVariableInitializer(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitVariableInitializer(this); - } - } - - public final VariableInitializerContext variableInitializer() throws RecognitionException { - VariableInitializerContext _localctx = new VariableInitializerContext(_ctx, getState()); - enterRule(_localctx, 70, RULE_variableInitializer); - try { - setState(555); - switch (_input.LA(1)) { - case LBRACE: - enterOuterAlt(_localctx, 1); - { - setState(553); arrayInitializer(); - } - break; - case BOOLEAN: - case BYTE: - case CHAR: - case DOUBLE: - case FLOAT: - case INT: - case LONG: - case NEW: - case SHORT: - case SUPER: - case THIS: - case VOID: - case IntegerLiteral: - case FloatingPointLiteral: - case BooleanLiteral: - case CharacterLiteral: - case StringLiteral: - case NullLiteral: - case LPAREN: - case LT: - case BANG: - case TILDE: - case INC: - case DEC: - case ADD: - case SUB: - case Identifier: - enterOuterAlt(_localctx, 2); - { - setState(554); expression(0); - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ArrayInitializerContext extends ParserRuleContext { - public List variableInitializer() { - return getRuleContexts(VariableInitializerContext.class); - } - public VariableInitializerContext variableInitializer(int i) { - return getRuleContext(VariableInitializerContext.class,i); - } - public ArrayInitializerContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_arrayInitializer; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterArrayInitializer(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitArrayInitializer(this); - } - } - - public final ArrayInitializerContext arrayInitializer() throws RecognitionException { - ArrayInitializerContext _localctx = new ArrayInitializerContext(_ctx, getState()); - enterRule(_localctx, 72, RULE_arrayInitializer); - int _la; - try { - int _alt; - enterOuterAlt(_localctx, 1); - { - setState(557); match(LBRACE); - setState(569); - _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { - { - setState(558); variableInitializer(); - setState(563); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,55,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - { - { - setState(559); match(COMMA); - setState(560); variableInitializer(); - } - } - } - setState(565); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,55,_ctx); - } - setState(567); - _la = _input.LA(1); - if (_la==COMMA) { - { - setState(566); match(COMMA); - } - } - - } - } - - setState(571); match(RBRACE); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class EnumConstantNameContext extends ParserRuleContext { - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public EnumConstantNameContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_enumConstantName; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterEnumConstantName(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitEnumConstantName(this); - } - } - - public final EnumConstantNameContext enumConstantName() throws RecognitionException { - EnumConstantNameContext _localctx = new EnumConstantNameContext(_ctx, getState()); - enterRule(_localctx, 74, RULE_enumConstantName); - try { - enterOuterAlt(_localctx, 1); - { - setState(573); match(Identifier); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class TypeContext extends ParserRuleContext { - public PrimitiveTypeContext primitiveType() { - return getRuleContext(PrimitiveTypeContext.class,0); - } - public ClassOrInterfaceTypeContext classOrInterfaceType() { - return getRuleContext(ClassOrInterfaceTypeContext.class,0); - } - public TypeContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_type; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterType(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitType(this); - } - } - - public final TypeContext type() throws RecognitionException { - TypeContext _localctx = new TypeContext(_ctx, getState()); - enterRule(_localctx, 76, RULE_type); - try { - int _alt; - setState(591); - switch (_input.LA(1)) { - case Identifier: - enterOuterAlt(_localctx, 1); - { - setState(575); classOrInterfaceType(); - setState(580); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,58,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - { - { - setState(576); match(LBRACK); - setState(577); match(RBRACK); - } - } - } - setState(582); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,58,_ctx); - } - } - break; - case BOOLEAN: - case BYTE: - case CHAR: - case DOUBLE: - case FLOAT: - case INT: - case LONG: - case SHORT: - enterOuterAlt(_localctx, 2); - { - setState(583); primitiveType(); - setState(588); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,59,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - { - { - setState(584); match(LBRACK); - setState(585); match(RBRACK); - } - } - } - setState(590); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,59,_ctx); - } - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ClassOrInterfaceTypeContext extends ParserRuleContext { - public List typeArguments() { - return getRuleContexts(TypeArgumentsContext.class); - } - public List Identifier() { return getTokens(Java8Parser.Identifier); } - public TerminalNode Identifier(int i) { - return getToken(Java8Parser.Identifier, i); - } - public TypeArgumentsContext typeArguments(int i) { - return getRuleContext(TypeArgumentsContext.class,i); - } - public ClassOrInterfaceTypeContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_classOrInterfaceType; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterClassOrInterfaceType(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitClassOrInterfaceType(this); - } - } - - public final ClassOrInterfaceTypeContext classOrInterfaceType() throws RecognitionException { - ClassOrInterfaceTypeContext _localctx = new ClassOrInterfaceTypeContext(_ctx, getState()); - enterRule(_localctx, 78, RULE_classOrInterfaceType); - try { - int _alt; - enterOuterAlt(_localctx, 1); - { - setState(593); match(Identifier); - setState(595); - switch ( getInterpreter().adaptivePredict(_input,61,_ctx) ) { - case 1: - { - setState(594); typeArguments(); - } - break; - } - setState(604); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,63,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - { - { - setState(597); match(DOT); - setState(598); match(Identifier); - setState(600); - switch ( getInterpreter().adaptivePredict(_input,62,_ctx) ) { - case 1: - { - setState(599); typeArguments(); - } - break; - } - } - } - } - setState(606); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,63,_ctx); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class PrimitiveTypeContext extends ParserRuleContext { - public PrimitiveTypeContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_primitiveType; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterPrimitiveType(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitPrimitiveType(this); - } - } - - public final PrimitiveTypeContext primitiveType() throws RecognitionException { - PrimitiveTypeContext _localctx = new PrimitiveTypeContext(_ctx, getState()); - enterRule(_localctx, 80, RULE_primitiveType); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(607); - _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << SHORT))) != 0)) ) { - _errHandler.recoverInline(this); - } - consume(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class TypeArgumentsContext extends ParserRuleContext { - public List typeArgument() { - return getRuleContexts(TypeArgumentContext.class); - } - public TypeArgumentContext typeArgument(int i) { - return getRuleContext(TypeArgumentContext.class,i); - } - public TypeArgumentsContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_typeArguments; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeArguments(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeArguments(this); - } - } - - public final TypeArgumentsContext typeArguments() throws RecognitionException { - TypeArgumentsContext _localctx = new TypeArgumentsContext(_ctx, getState()); - enterRule(_localctx, 82, RULE_typeArguments); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(609); match(LT); - setState(610); typeArgument(); - setState(615); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==COMMA) { - { - { - setState(611); match(COMMA); - setState(612); typeArgument(); - } - } - setState(617); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(618); match(GT); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class TypeArgumentContext extends ParserRuleContext { - public TypeContext type() { - return getRuleContext(TypeContext.class,0); - } - public TypeArgumentContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_typeArgument; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeArgument(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeArgument(this); - } - } - - public final TypeArgumentContext typeArgument() throws RecognitionException { - TypeArgumentContext _localctx = new TypeArgumentContext(_ctx, getState()); - enterRule(_localctx, 84, RULE_typeArgument); - int _la; - try { - setState(626); - switch (_input.LA(1)) { - case BOOLEAN: - case BYTE: - case CHAR: - case DOUBLE: - case FLOAT: - case INT: - case LONG: - case SHORT: - case Identifier: - enterOuterAlt(_localctx, 1); - { - setState(620); type(); - } - break; - case QUESTION: - enterOuterAlt(_localctx, 2); - { - setState(621); match(QUESTION); - setState(624); - _la = _input.LA(1); - if (_la==EXTENDS || _la==SUPER) { - { - setState(622); - _la = _input.LA(1); - if ( !(_la==EXTENDS || _la==SUPER) ) { - _errHandler.recoverInline(this); - } - consume(); - setState(623); type(); - } - } - - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class QualifiedNameListContext extends ParserRuleContext { - public List qualifiedName() { - return getRuleContexts(QualifiedNameContext.class); - } - public QualifiedNameContext qualifiedName(int i) { - return getRuleContext(QualifiedNameContext.class,i); - } - public QualifiedNameListContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_qualifiedNameList; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterQualifiedNameList(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitQualifiedNameList(this); - } - } - - public final QualifiedNameListContext qualifiedNameList() throws RecognitionException { - QualifiedNameListContext _localctx = new QualifiedNameListContext(_ctx, getState()); - enterRule(_localctx, 86, RULE_qualifiedNameList); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(628); qualifiedName(); - setState(633); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==COMMA) { - { - { - setState(629); match(COMMA); - setState(630); qualifiedName(); - } - } - setState(635); - _errHandler.sync(this); - _la = _input.LA(1); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class FormalParametersContext extends ParserRuleContext { - public FormalParameterListContext formalParameterList() { - return getRuleContext(FormalParameterListContext.class,0); - } - public FormalParametersContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_formalParameters; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterFormalParameters(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitFormalParameters(this); - } - } - - public final FormalParametersContext formalParameters() throws RecognitionException { - FormalParametersContext _localctx = new FormalParametersContext(_ctx, getState()); - enterRule(_localctx, 88, RULE_formalParameters); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(636); match(LPAREN); - setState(638); - _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << SHORT))) != 0) || _la==Identifier || _la==AT) { - { - setState(637); formalParameterList(); - } - } - - setState(640); match(RPAREN); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class FormalParameterListContext extends ParserRuleContext { - public List formalParameter() { - return getRuleContexts(FormalParameterContext.class); - } - public LastFormalParameterContext lastFormalParameter() { - return getRuleContext(LastFormalParameterContext.class,0); - } - public FormalParameterContext formalParameter(int i) { - return getRuleContext(FormalParameterContext.class,i); - } - public FormalParameterListContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_formalParameterList; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterFormalParameterList(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitFormalParameterList(this); - } - } - - public final FormalParameterListContext formalParameterList() throws RecognitionException { - FormalParameterListContext _localctx = new FormalParameterListContext(_ctx, getState()); - enterRule(_localctx, 90, RULE_formalParameterList); - int _la; - try { - int _alt; - setState(655); - switch ( getInterpreter().adaptivePredict(_input,71,_ctx) ) { - case 1: - enterOuterAlt(_localctx, 1); - { - setState(642); formalParameter(); - setState(647); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,69,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - { - { - setState(643); match(COMMA); - setState(644); formalParameter(); - } - } - } - setState(649); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,69,_ctx); - } - setState(652); - _la = _input.LA(1); - if (_la==COMMA) { - { - setState(650); match(COMMA); - setState(651); lastFormalParameter(); - } - } - - } - break; - case 2: - enterOuterAlt(_localctx, 2); - { - setState(654); lastFormalParameter(); - } - break; - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class FormalParameterContext extends ParserRuleContext { - public VariableModifierContext variableModifier(int i) { - return getRuleContext(VariableModifierContext.class,i); - } - public List variableModifier() { - return getRuleContexts(VariableModifierContext.class); - } - public VariableDeclaratorIdContext variableDeclaratorId() { - return getRuleContext(VariableDeclaratorIdContext.class,0); - } - public TypeContext type() { - return getRuleContext(TypeContext.class,0); - } - public FormalParameterContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_formalParameter; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterFormalParameter(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitFormalParameter(this); - } - } - - public final FormalParameterContext formalParameter() throws RecognitionException { - FormalParameterContext _localctx = new FormalParameterContext(_ctx, getState()); - enterRule(_localctx, 92, RULE_formalParameter); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(660); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==FINAL || _la==AT) { - { - { - setState(657); variableModifier(); - } - } - setState(662); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(663); type(); - setState(664); variableDeclaratorId(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class LastFormalParameterContext extends ParserRuleContext { - public VariableModifierContext variableModifier(int i) { - return getRuleContext(VariableModifierContext.class,i); - } - public List variableModifier() { - return getRuleContexts(VariableModifierContext.class); - } - public VariableDeclaratorIdContext variableDeclaratorId() { - return getRuleContext(VariableDeclaratorIdContext.class,0); - } - public TypeContext type() { - return getRuleContext(TypeContext.class,0); - } - public LastFormalParameterContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_lastFormalParameter; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterLastFormalParameter(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitLastFormalParameter(this); - } - } - - public final LastFormalParameterContext lastFormalParameter() throws RecognitionException { - LastFormalParameterContext _localctx = new LastFormalParameterContext(_ctx, getState()); - enterRule(_localctx, 94, RULE_lastFormalParameter); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(669); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==FINAL || _la==AT) { - { - { - setState(666); variableModifier(); - } - } - setState(671); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(672); type(); - setState(673); match(ELLIPSIS); - setState(674); variableDeclaratorId(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class MethodBodyContext extends ParserRuleContext { - public BlockContext block() { - return getRuleContext(BlockContext.class,0); - } - public MethodBodyContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_methodBody; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterMethodBody(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitMethodBody(this); - } - } - - public final MethodBodyContext methodBody() throws RecognitionException { - MethodBodyContext _localctx = new MethodBodyContext(_ctx, getState()); - enterRule(_localctx, 96, RULE_methodBody); - try { - enterOuterAlt(_localctx, 1); - { - setState(676); block(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ConstructorBodyContext extends ParserRuleContext { - public BlockContext block() { - return getRuleContext(BlockContext.class,0); - } - public ConstructorBodyContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_constructorBody; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterConstructorBody(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitConstructorBody(this); - } - } - - public final ConstructorBodyContext constructorBody() throws RecognitionException { - ConstructorBodyContext _localctx = new ConstructorBodyContext(_ctx, getState()); - enterRule(_localctx, 98, RULE_constructorBody); - try { - enterOuterAlt(_localctx, 1); - { - setState(678); block(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class QualifiedNameContext extends ParserRuleContext { - public List Identifier() { return getTokens(Java8Parser.Identifier); } - public TerminalNode Identifier(int i) { - return getToken(Java8Parser.Identifier, i); - } - public QualifiedNameContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_qualifiedName; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterQualifiedName(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitQualifiedName(this); - } - } - - public final QualifiedNameContext qualifiedName() throws RecognitionException { - QualifiedNameContext _localctx = new QualifiedNameContext(_ctx, getState()); - enterRule(_localctx, 100, RULE_qualifiedName); - try { - int _alt; - enterOuterAlt(_localctx, 1); - { - setState(680); match(Identifier); - setState(685); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,74,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - { - { - setState(681); match(DOT); - setState(682); match(Identifier); - } - } - } - setState(687); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,74,_ctx); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class LiteralContext extends ParserRuleContext { - public TerminalNode StringLiteral() { return getToken(Java8Parser.StringLiteral, 0); } - public TerminalNode IntegerLiteral() { return getToken(Java8Parser.IntegerLiteral, 0); } - public TerminalNode FloatingPointLiteral() { return getToken(Java8Parser.FloatingPointLiteral, 0); } - public TerminalNode BooleanLiteral() { return getToken(Java8Parser.BooleanLiteral, 0); } - public TerminalNode CharacterLiteral() { return getToken(Java8Parser.CharacterLiteral, 0); } - public LiteralContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_literal; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterLiteral(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitLiteral(this); - } - } - - public final LiteralContext literal() throws RecognitionException { - LiteralContext _localctx = new LiteralContext(_ctx, getState()); - enterRule(_localctx, 102, RULE_literal); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(688); - _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral))) != 0)) ) { - _errHandler.recoverInline(this); - } - consume(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class AnnotationContext extends ParserRuleContext { - public ElementValuePairsContext elementValuePairs() { - return getRuleContext(ElementValuePairsContext.class,0); - } - public AnnotationNameContext annotationName() { - return getRuleContext(AnnotationNameContext.class,0); - } - public ElementValueContext elementValue() { - return getRuleContext(ElementValueContext.class,0); - } - public AnnotationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_annotation; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotation(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotation(this); - } - } - - public final AnnotationContext annotation() throws RecognitionException { - AnnotationContext _localctx = new AnnotationContext(_ctx, getState()); - enterRule(_localctx, 104, RULE_annotation); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(690); match(AT); - setState(691); annotationName(); - setState(698); - _la = _input.LA(1); - if (_la==LPAREN) { - { - setState(692); match(LPAREN); - setState(695); - switch ( getInterpreter().adaptivePredict(_input,75,_ctx) ) { - case 1: - { - setState(693); elementValuePairs(); - } - break; - case 2: - { - setState(694); elementValue(); - } - break; - } - setState(697); match(RPAREN); - } - } - - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class AnnotationNameContext extends ParserRuleContext { - public QualifiedNameContext qualifiedName() { - return getRuleContext(QualifiedNameContext.class,0); - } - public AnnotationNameContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_annotationName; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationName(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationName(this); - } - } - - public final AnnotationNameContext annotationName() throws RecognitionException { - AnnotationNameContext _localctx = new AnnotationNameContext(_ctx, getState()); - enterRule(_localctx, 106, RULE_annotationName); - try { - enterOuterAlt(_localctx, 1); - { - setState(700); qualifiedName(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ElementValuePairsContext extends ParserRuleContext { - public ElementValuePairContext elementValuePair(int i) { - return getRuleContext(ElementValuePairContext.class,i); - } - public List elementValuePair() { - return getRuleContexts(ElementValuePairContext.class); - } - public ElementValuePairsContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_elementValuePairs; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterElementValuePairs(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitElementValuePairs(this); - } - } - - public final ElementValuePairsContext elementValuePairs() throws RecognitionException { - ElementValuePairsContext _localctx = new ElementValuePairsContext(_ctx, getState()); - enterRule(_localctx, 108, RULE_elementValuePairs); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(702); elementValuePair(); - setState(707); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==COMMA) { - { - { - setState(703); match(COMMA); - setState(704); elementValuePair(); - } - } - setState(709); - _errHandler.sync(this); - _la = _input.LA(1); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ElementValuePairContext extends ParserRuleContext { - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public ElementValueContext elementValue() { - return getRuleContext(ElementValueContext.class,0); - } - public ElementValuePairContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_elementValuePair; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterElementValuePair(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitElementValuePair(this); - } - } - - public final ElementValuePairContext elementValuePair() throws RecognitionException { - ElementValuePairContext _localctx = new ElementValuePairContext(_ctx, getState()); - enterRule(_localctx, 110, RULE_elementValuePair); - try { - enterOuterAlt(_localctx, 1); - { - setState(710); match(Identifier); - setState(711); match(ASSIGN); - setState(712); elementValue(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ElementValueContext extends ParserRuleContext { - public ElementValueArrayInitializerContext elementValueArrayInitializer() { - return getRuleContext(ElementValueArrayInitializerContext.class,0); - } - public AnnotationContext annotation() { - return getRuleContext(AnnotationContext.class,0); - } - public ExpressionContext expression() { - return getRuleContext(ExpressionContext.class,0); - } - public ElementValueContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_elementValue; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterElementValue(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitElementValue(this); - } - } - - public final ElementValueContext elementValue() throws RecognitionException { - ElementValueContext _localctx = new ElementValueContext(_ctx, getState()); - enterRule(_localctx, 112, RULE_elementValue); - try { - setState(717); - switch (_input.LA(1)) { - case BOOLEAN: - case BYTE: - case CHAR: - case DOUBLE: - case FLOAT: - case INT: - case LONG: - case NEW: - case SHORT: - case SUPER: - case THIS: - case VOID: - case IntegerLiteral: - case FloatingPointLiteral: - case BooleanLiteral: - case CharacterLiteral: - case StringLiteral: - case NullLiteral: - case LPAREN: - case LT: - case BANG: - case TILDE: - case INC: - case DEC: - case ADD: - case SUB: - case Identifier: - enterOuterAlt(_localctx, 1); - { - setState(714); expression(0); - } - break; - case AT: - enterOuterAlt(_localctx, 2); - { - setState(715); annotation(); - } - break; - case LBRACE: - enterOuterAlt(_localctx, 3); - { - setState(716); elementValueArrayInitializer(); - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ElementValueArrayInitializerContext extends ParserRuleContext { - public ElementValueContext elementValue(int i) { - return getRuleContext(ElementValueContext.class,i); - } - public List elementValue() { - return getRuleContexts(ElementValueContext.class); - } - public ElementValueArrayInitializerContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_elementValueArrayInitializer; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterElementValueArrayInitializer(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitElementValueArrayInitializer(this); - } - } - - public final ElementValueArrayInitializerContext elementValueArrayInitializer() throws RecognitionException { - ElementValueArrayInitializerContext _localctx = new ElementValueArrayInitializerContext(_ctx, getState()); - enterRule(_localctx, 114, RULE_elementValueArrayInitializer); - int _la; - try { - int _alt; - enterOuterAlt(_localctx, 1); - { - setState(719); match(LBRACE); - setState(728); - _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { - { - setState(720); elementValue(); - setState(725); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,79,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - { - { - setState(721); match(COMMA); - setState(722); elementValue(); - } - } - } - setState(727); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,79,_ctx); - } - } - } - - setState(731); - _la = _input.LA(1); - if (_la==COMMA) { - { - setState(730); match(COMMA); - } - } - - setState(733); match(RBRACE); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class AnnotationTypeDeclarationContext extends ParserRuleContext { - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public AnnotationTypeBodyContext annotationTypeBody() { - return getRuleContext(AnnotationTypeBodyContext.class,0); - } - public AnnotationTypeDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_annotationTypeDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationTypeDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationTypeDeclaration(this); - } - } - - public final AnnotationTypeDeclarationContext annotationTypeDeclaration() throws RecognitionException { - AnnotationTypeDeclarationContext _localctx = new AnnotationTypeDeclarationContext(_ctx, getState()); - enterRule(_localctx, 116, RULE_annotationTypeDeclaration); - try { - enterOuterAlt(_localctx, 1); - { - setState(735); match(AT); - setState(736); match(INTERFACE); - setState(737); match(Identifier); - setState(738); annotationTypeBody(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class AnnotationTypeBodyContext extends ParserRuleContext { - public List annotationTypeElementDeclaration() { - return getRuleContexts(AnnotationTypeElementDeclarationContext.class); - } - public AnnotationTypeElementDeclarationContext annotationTypeElementDeclaration(int i) { - return getRuleContext(AnnotationTypeElementDeclarationContext.class,i); - } - public AnnotationTypeBodyContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_annotationTypeBody; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationTypeBody(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationTypeBody(this); - } - } - - public final AnnotationTypeBodyContext annotationTypeBody() throws RecognitionException { - AnnotationTypeBodyContext _localctx = new AnnotationTypeBodyContext(_ctx, getState()); - enterRule(_localctx, 118, RULE_annotationTypeBody); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(740); match(LBRACE); - setState(744); - _errHandler.sync(this); - _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOLATILE) | (1L << SEMI))) != 0) || _la==Identifier || _la==AT) { - { - { - setState(741); annotationTypeElementDeclaration(); - } - } - setState(746); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(747); match(RBRACE); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class AnnotationTypeElementDeclarationContext extends ParserRuleContext { - public List modifier() { - return getRuleContexts(ModifierContext.class); - } - public AnnotationTypeElementRestContext annotationTypeElementRest() { - return getRuleContext(AnnotationTypeElementRestContext.class,0); - } - public ModifierContext modifier(int i) { - return getRuleContext(ModifierContext.class,i); - } - public AnnotationTypeElementDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_annotationTypeElementDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationTypeElementDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationTypeElementDeclaration(this); - } - } - - public final AnnotationTypeElementDeclarationContext annotationTypeElementDeclaration() throws RecognitionException { - AnnotationTypeElementDeclarationContext _localctx = new AnnotationTypeElementDeclarationContext(_ctx, getState()); - enterRule(_localctx, 120, RULE_annotationTypeElementDeclaration); - try { - int _alt; - setState(757); - switch (_input.LA(1)) { - case ABSTRACT: - case BOOLEAN: - case BYTE: - case CHAR: - case CLASS: - case DOUBLE: - case ENUM: - case FINAL: - case FLOAT: - case INT: - case INTERFACE: - case LONG: - case NATIVE: - case PRIVATE: - case PROTECTED: - case PUBLIC: - case SHORT: - case STATIC: - case STRICTFP: - case SYNCHRONIZED: - case TRANSIENT: - case VOLATILE: - case Identifier: - case AT: - enterOuterAlt(_localctx, 1); - { - setState(752); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,83,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - { - { - setState(749); modifier(); - } - } - } - setState(754); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,83,_ctx); - } - setState(755); annotationTypeElementRest(); - } - break; - case SEMI: - enterOuterAlt(_localctx, 2); - { - setState(756); match(SEMI); - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class AnnotationTypeElementRestContext extends ParserRuleContext { - public EnumDeclarationContext enumDeclaration() { - return getRuleContext(EnumDeclarationContext.class,0); - } - public ClassDeclarationContext classDeclaration() { - return getRuleContext(ClassDeclarationContext.class,0); - } - public AnnotationMethodOrConstantRestContext annotationMethodOrConstantRest() { - return getRuleContext(AnnotationMethodOrConstantRestContext.class,0); - } - public AnnotationTypeDeclarationContext annotationTypeDeclaration() { - return getRuleContext(AnnotationTypeDeclarationContext.class,0); - } - public InterfaceDeclarationContext interfaceDeclaration() { - return getRuleContext(InterfaceDeclarationContext.class,0); - } - public TypeContext type() { - return getRuleContext(TypeContext.class,0); - } - public AnnotationTypeElementRestContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_annotationTypeElementRest; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationTypeElementRest(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationTypeElementRest(this); - } - } - - public final AnnotationTypeElementRestContext annotationTypeElementRest() throws RecognitionException { - AnnotationTypeElementRestContext _localctx = new AnnotationTypeElementRestContext(_ctx, getState()); - enterRule(_localctx, 122, RULE_annotationTypeElementRest); - try { - setState(779); - switch (_input.LA(1)) { - case BOOLEAN: - case BYTE: - case CHAR: - case DOUBLE: - case FLOAT: - case INT: - case LONG: - case SHORT: - case Identifier: - enterOuterAlt(_localctx, 1); - { - setState(759); type(); - setState(760); annotationMethodOrConstantRest(); - setState(761); match(SEMI); - } - break; - case CLASS: - enterOuterAlt(_localctx, 2); - { - setState(763); classDeclaration(); - setState(765); - switch ( getInterpreter().adaptivePredict(_input,85,_ctx) ) { - case 1: - { - setState(764); match(SEMI); - } - break; - } - } - break; - case INTERFACE: - enterOuterAlt(_localctx, 3); - { - setState(767); interfaceDeclaration(); - setState(769); - switch ( getInterpreter().adaptivePredict(_input,86,_ctx) ) { - case 1: - { - setState(768); match(SEMI); - } - break; - } - } - break; - case ENUM: - enterOuterAlt(_localctx, 4); - { - setState(771); enumDeclaration(); - setState(773); - switch ( getInterpreter().adaptivePredict(_input,87,_ctx) ) { - case 1: - { - setState(772); match(SEMI); - } - break; - } - } - break; - case AT: - enterOuterAlt(_localctx, 5); - { - setState(775); annotationTypeDeclaration(); - setState(777); - switch ( getInterpreter().adaptivePredict(_input,88,_ctx) ) { - case 1: - { - setState(776); match(SEMI); - } - break; - } - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class AnnotationMethodOrConstantRestContext extends ParserRuleContext { - public AnnotationMethodRestContext annotationMethodRest() { - return getRuleContext(AnnotationMethodRestContext.class,0); - } - public AnnotationConstantRestContext annotationConstantRest() { - return getRuleContext(AnnotationConstantRestContext.class,0); - } - public AnnotationMethodOrConstantRestContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_annotationMethodOrConstantRest; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationMethodOrConstantRest(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationMethodOrConstantRest(this); - } - } - - public final AnnotationMethodOrConstantRestContext annotationMethodOrConstantRest() throws RecognitionException { - AnnotationMethodOrConstantRestContext _localctx = new AnnotationMethodOrConstantRestContext(_ctx, getState()); - enterRule(_localctx, 124, RULE_annotationMethodOrConstantRest); - try { - setState(783); - switch ( getInterpreter().adaptivePredict(_input,90,_ctx) ) { - case 1: - enterOuterAlt(_localctx, 1); - { - setState(781); annotationMethodRest(); - } - break; - case 2: - enterOuterAlt(_localctx, 2); - { - setState(782); annotationConstantRest(); - } - break; - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class AnnotationMethodRestContext extends ParserRuleContext { - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public DefaultValueContext defaultValue() { - return getRuleContext(DefaultValueContext.class,0); - } - public AnnotationMethodRestContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_annotationMethodRest; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationMethodRest(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationMethodRest(this); - } - } - - public final AnnotationMethodRestContext annotationMethodRest() throws RecognitionException { - AnnotationMethodRestContext _localctx = new AnnotationMethodRestContext(_ctx, getState()); - enterRule(_localctx, 126, RULE_annotationMethodRest); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(785); match(Identifier); - setState(786); match(LPAREN); - setState(787); match(RPAREN); - setState(789); - _la = _input.LA(1); - if (_la==DEFAULT) { - { - setState(788); defaultValue(); - } - } - - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class AnnotationConstantRestContext extends ParserRuleContext { - public VariableDeclaratorsContext variableDeclarators() { - return getRuleContext(VariableDeclaratorsContext.class,0); - } - public AnnotationConstantRestContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_annotationConstantRest; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterAnnotationConstantRest(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitAnnotationConstantRest(this); - } - } - - public final AnnotationConstantRestContext annotationConstantRest() throws RecognitionException { - AnnotationConstantRestContext _localctx = new AnnotationConstantRestContext(_ctx, getState()); - enterRule(_localctx, 128, RULE_annotationConstantRest); - try { - enterOuterAlt(_localctx, 1); - { - setState(791); variableDeclarators(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class DefaultValueContext extends ParserRuleContext { - public ElementValueContext elementValue() { - return getRuleContext(ElementValueContext.class,0); - } - public DefaultValueContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_defaultValue; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterDefaultValue(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitDefaultValue(this); - } - } - - public final DefaultValueContext defaultValue() throws RecognitionException { - DefaultValueContext _localctx = new DefaultValueContext(_ctx, getState()); - enterRule(_localctx, 130, RULE_defaultValue); - try { - enterOuterAlt(_localctx, 1); - { - setState(793); match(DEFAULT); - setState(794); elementValue(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class BlockContext extends ParserRuleContext { - public List blockStatement() { - return getRuleContexts(BlockStatementContext.class); - } - public BlockStatementContext blockStatement(int i) { - return getRuleContext(BlockStatementContext.class,i); - } - public BlockContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_block; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterBlock(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitBlock(this); - } - } - - public final BlockContext block() throws RecognitionException { - BlockContext _localctx = new BlockContext(_ctx, getState()); - enterRule(_localctx, 132, RULE_block); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(796); match(LBRACE); - setState(800); - _errHandler.sync(this); - _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << ASSERT) | (1L << BOOLEAN) | (1L << BREAK) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << CONTINUE) | (1L << DO) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << FOR) | (1L << IF) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NEW) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << RETURN) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SUPER) | (1L << SWITCH) | (1L << SYNCHRONIZED) | (1L << THIS) | (1L << THROW) | (1L << TRY) | (1L << VOID) | (1L << WHILE) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { - { - { - setState(797); blockStatement(); - } - } - setState(802); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(803); match(RBRACE); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class BlockStatementContext extends ParserRuleContext { - public TypeDeclarationContext typeDeclaration() { - return getRuleContext(TypeDeclarationContext.class,0); - } - public StatementContext statement() { - return getRuleContext(StatementContext.class,0); - } - public LocalVariableDeclarationStatementContext localVariableDeclarationStatement() { - return getRuleContext(LocalVariableDeclarationStatementContext.class,0); - } - public BlockStatementContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_blockStatement; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterBlockStatement(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitBlockStatement(this); - } - } - - public final BlockStatementContext blockStatement() throws RecognitionException { - BlockStatementContext _localctx = new BlockStatementContext(_ctx, getState()); - enterRule(_localctx, 134, RULE_blockStatement); - try { - setState(808); - switch ( getInterpreter().adaptivePredict(_input,93,_ctx) ) { - case 1: - enterOuterAlt(_localctx, 1); - { - setState(805); localVariableDeclarationStatement(); - } - break; - case 2: - enterOuterAlt(_localctx, 2); - { - setState(806); statement(); - } - break; - case 3: - enterOuterAlt(_localctx, 3); - { - setState(807); typeDeclaration(); - } - break; - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class LocalVariableDeclarationStatementContext extends ParserRuleContext { - public LocalVariableDeclarationContext localVariableDeclaration() { - return getRuleContext(LocalVariableDeclarationContext.class,0); - } - public LocalVariableDeclarationStatementContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_localVariableDeclarationStatement; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterLocalVariableDeclarationStatement(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitLocalVariableDeclarationStatement(this); - } - } - - public final LocalVariableDeclarationStatementContext localVariableDeclarationStatement() throws RecognitionException { - LocalVariableDeclarationStatementContext _localctx = new LocalVariableDeclarationStatementContext(_ctx, getState()); - enterRule(_localctx, 136, RULE_localVariableDeclarationStatement); - try { - enterOuterAlt(_localctx, 1); - { - setState(810); localVariableDeclaration(); - setState(811); match(SEMI); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class LocalVariableDeclarationContext extends ParserRuleContext { - public VariableModifierContext variableModifier(int i) { - return getRuleContext(VariableModifierContext.class,i); - } - public List variableModifier() { - return getRuleContexts(VariableModifierContext.class); - } - public VariableDeclaratorsContext variableDeclarators() { - return getRuleContext(VariableDeclaratorsContext.class,0); - } - public TypeContext type() { - return getRuleContext(TypeContext.class,0); - } - public LocalVariableDeclarationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_localVariableDeclaration; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterLocalVariableDeclaration(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitLocalVariableDeclaration(this); - } - } - - public final LocalVariableDeclarationContext localVariableDeclaration() throws RecognitionException { - LocalVariableDeclarationContext _localctx = new LocalVariableDeclarationContext(_ctx, getState()); - enterRule(_localctx, 138, RULE_localVariableDeclaration); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(816); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==FINAL || _la==AT) { - { - { - setState(813); variableModifier(); - } - } - setState(818); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(819); type(); - setState(820); variableDeclarators(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class StatementContext extends ParserRuleContext { - public ExpressionContext expression(int i) { - return getRuleContext(ExpressionContext.class,i); - } - public StatementExpressionContext statementExpression() { - return getRuleContext(StatementExpressionContext.class,0); - } - public StatementContext statement(int i) { - return getRuleContext(StatementContext.class,i); - } - public List switchLabel() { - return getRuleContexts(SwitchLabelContext.class); - } - public List switchBlockStatementGroup() { - return getRuleContexts(SwitchBlockStatementGroupContext.class); - } - public ParExpressionContext parExpression() { - return getRuleContext(ParExpressionContext.class,0); - } - public List catchClause() { - return getRuleContexts(CatchClauseContext.class); - } - public CatchClauseContext catchClause(int i) { - return getRuleContext(CatchClauseContext.class,i); - } - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public FinallyBlockContext finallyBlock() { - return getRuleContext(FinallyBlockContext.class,0); - } - public SwitchBlockStatementGroupContext switchBlockStatementGroup(int i) { - return getRuleContext(SwitchBlockStatementGroupContext.class,i); - } - public ForControlContext forControl() { - return getRuleContext(ForControlContext.class,0); - } - public TerminalNode ASSERT() { return getToken(Java8Parser.ASSERT, 0); } - public ResourceSpecificationContext resourceSpecification() { - return getRuleContext(ResourceSpecificationContext.class,0); - } - public List statement() { - return getRuleContexts(StatementContext.class); - } - public BlockContext block() { - return getRuleContext(BlockContext.class,0); - } - public List expression() { - return getRuleContexts(ExpressionContext.class); - } - public SwitchLabelContext switchLabel(int i) { - return getRuleContext(SwitchLabelContext.class,i); - } - public StatementContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_statement; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterStatement(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitStatement(this); - } - } - - public final StatementContext statement() throws RecognitionException { - StatementContext _localctx = new StatementContext(_ctx, getState()); - enterRule(_localctx, 140, RULE_statement); - int _la; - try { - int _alt; - setState(926); - switch ( getInterpreter().adaptivePredict(_input,107,_ctx) ) { - case 1: - enterOuterAlt(_localctx, 1); - { - setState(822); block(); - } - break; - case 2: - enterOuterAlt(_localctx, 2); - { - setState(823); match(ASSERT); - setState(824); expression(0); - setState(827); - _la = _input.LA(1); - if (_la==COLON) { - { - setState(825); match(COLON); - setState(826); expression(0); - } - } - - setState(829); match(SEMI); - } - break; - case 3: - enterOuterAlt(_localctx, 3); - { - setState(831); match(IF); - setState(832); parExpression(); - setState(833); statement(); - setState(836); - switch ( getInterpreter().adaptivePredict(_input,96,_ctx) ) { - case 1: - { - setState(834); match(ELSE); - setState(835); statement(); - } - break; - } - } - break; - case 4: - enterOuterAlt(_localctx, 4); - { - setState(838); match(FOR); - setState(839); match(LPAREN); - setState(840); forControl(); - setState(841); match(RPAREN); - setState(842); statement(); - } - break; - case 5: - enterOuterAlt(_localctx, 5); - { - setState(844); match(WHILE); - setState(845); parExpression(); - setState(846); statement(); - } - break; - case 6: - enterOuterAlt(_localctx, 6); - { - setState(848); match(DO); - setState(849); statement(); - setState(850); match(WHILE); - setState(851); parExpression(); - setState(852); match(SEMI); - } - break; - case 7: - enterOuterAlt(_localctx, 7); - { - setState(854); match(TRY); - setState(855); block(); - setState(865); - switch (_input.LA(1)) { - case CATCH: - { - setState(857); - _errHandler.sync(this); - _la = _input.LA(1); - do { - { - { - setState(856); catchClause(); - } - } - setState(859); - _errHandler.sync(this); - _la = _input.LA(1); - } while ( _la==CATCH ); - setState(862); - _la = _input.LA(1); - if (_la==FINALLY) { - { - setState(861); finallyBlock(); - } - } - - } - break; - case FINALLY: - { - setState(864); finallyBlock(); - } - break; - default: - throw new NoViableAltException(this); - } - } - break; - case 8: - enterOuterAlt(_localctx, 8); - { - setState(867); match(TRY); - setState(868); resourceSpecification(); - setState(869); block(); - setState(873); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==CATCH) { - { - { - setState(870); catchClause(); - } - } - setState(875); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(877); - _la = _input.LA(1); - if (_la==FINALLY) { - { - setState(876); finallyBlock(); - } - } - - } - break; - case 9: - enterOuterAlt(_localctx, 9); - { - setState(879); match(SWITCH); - setState(880); parExpression(); - setState(881); match(LBRACE); - setState(885); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,102,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - { - { - setState(882); switchBlockStatementGroup(); - } - } - } - setState(887); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,102,_ctx); - } - setState(891); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==CASE || _la==DEFAULT) { - { - { - setState(888); switchLabel(); - } - } - setState(893); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(894); match(RBRACE); - } - break; - case 10: - enterOuterAlt(_localctx, 10); - { - setState(896); match(SYNCHRONIZED); - setState(897); parExpression(); - setState(898); block(); - } - break; - case 11: - enterOuterAlt(_localctx, 11); - { - setState(900); match(RETURN); - setState(902); - _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { - { - setState(901); expression(0); - } - } - - setState(904); match(SEMI); - } - break; - case 12: - enterOuterAlt(_localctx, 12); - { - setState(905); match(THROW); - setState(906); expression(0); - setState(907); match(SEMI); - } - break; - case 13: - enterOuterAlt(_localctx, 13); - { - setState(909); match(BREAK); - setState(911); - _la = _input.LA(1); - if (_la==Identifier) { - { - setState(910); match(Identifier); - } - } - - setState(913); match(SEMI); - } - break; - case 14: - enterOuterAlt(_localctx, 14); - { - setState(914); match(CONTINUE); - setState(916); - _la = _input.LA(1); - if (_la==Identifier) { - { - setState(915); match(Identifier); - } - } - - setState(918); match(SEMI); - } - break; - case 15: - enterOuterAlt(_localctx, 15); - { - setState(919); match(SEMI); - } - break; - case 16: - enterOuterAlt(_localctx, 16); - { - setState(920); statementExpression(); - setState(921); match(SEMI); - } - break; - case 17: - enterOuterAlt(_localctx, 17); - { - setState(923); match(Identifier); - setState(924); match(COLON); - setState(925); statement(); - } - break; - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class CatchClauseContext extends ParserRuleContext { - public CatchTypeContext catchType() { - return getRuleContext(CatchTypeContext.class,0); - } - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public VariableModifierContext variableModifier(int i) { - return getRuleContext(VariableModifierContext.class,i); - } - public List variableModifier() { - return getRuleContexts(VariableModifierContext.class); - } - public BlockContext block() { - return getRuleContext(BlockContext.class,0); - } - public CatchClauseContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_catchClause; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterCatchClause(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitCatchClause(this); - } - } - - public final CatchClauseContext catchClause() throws RecognitionException { - CatchClauseContext _localctx = new CatchClauseContext(_ctx, getState()); - enterRule(_localctx, 142, RULE_catchClause); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(928); match(CATCH); - setState(929); match(LPAREN); - setState(933); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==FINAL || _la==AT) { - { - { - setState(930); variableModifier(); - } - } - setState(935); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(936); catchType(); - setState(937); match(Identifier); - setState(938); match(RPAREN); - setState(939); block(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class CatchTypeContext extends ParserRuleContext { - public List qualifiedName() { - return getRuleContexts(QualifiedNameContext.class); - } - public QualifiedNameContext qualifiedName(int i) { - return getRuleContext(QualifiedNameContext.class,i); - } - public CatchTypeContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_catchType; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterCatchType(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitCatchType(this); - } - } - - public final CatchTypeContext catchType() throws RecognitionException { - CatchTypeContext _localctx = new CatchTypeContext(_ctx, getState()); - enterRule(_localctx, 144, RULE_catchType); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(941); qualifiedName(); - setState(946); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==BITOR) { - { - { - setState(942); match(BITOR); - setState(943); qualifiedName(); - } - } - setState(948); - _errHandler.sync(this); - _la = _input.LA(1); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class FinallyBlockContext extends ParserRuleContext { - public BlockContext block() { - return getRuleContext(BlockContext.class,0); - } - public FinallyBlockContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_finallyBlock; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterFinallyBlock(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitFinallyBlock(this); - } - } - - public final FinallyBlockContext finallyBlock() throws RecognitionException { - FinallyBlockContext _localctx = new FinallyBlockContext(_ctx, getState()); - enterRule(_localctx, 146, RULE_finallyBlock); - try { - enterOuterAlt(_localctx, 1); - { - setState(949); match(FINALLY); - setState(950); block(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ResourceSpecificationContext extends ParserRuleContext { - public ResourcesContext resources() { - return getRuleContext(ResourcesContext.class,0); - } - public ResourceSpecificationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_resourceSpecification; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterResourceSpecification(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitResourceSpecification(this); - } - } - - public final ResourceSpecificationContext resourceSpecification() throws RecognitionException { - ResourceSpecificationContext _localctx = new ResourceSpecificationContext(_ctx, getState()); - enterRule(_localctx, 148, RULE_resourceSpecification); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(952); match(LPAREN); - setState(953); resources(); - setState(955); - _la = _input.LA(1); - if (_la==SEMI) { - { - setState(954); match(SEMI); - } - } - - setState(957); match(RPAREN); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ResourcesContext extends ParserRuleContext { - public ResourceContext resource(int i) { - return getRuleContext(ResourceContext.class,i); - } - public List resource() { - return getRuleContexts(ResourceContext.class); - } - public ResourcesContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_resources; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterResources(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitResources(this); - } - } - - public final ResourcesContext resources() throws RecognitionException { - ResourcesContext _localctx = new ResourcesContext(_ctx, getState()); - enterRule(_localctx, 150, RULE_resources); - try { - int _alt; - enterOuterAlt(_localctx, 1); - { - setState(959); resource(); - setState(964); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,111,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - { - { - setState(960); match(SEMI); - setState(961); resource(); - } - } - } - setState(966); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,111,_ctx); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ResourceContext extends ParserRuleContext { - public VariableModifierContext variableModifier(int i) { - return getRuleContext(VariableModifierContext.class,i); - } - public List variableModifier() { - return getRuleContexts(VariableModifierContext.class); - } - public ClassOrInterfaceTypeContext classOrInterfaceType() { - return getRuleContext(ClassOrInterfaceTypeContext.class,0); - } - public VariableDeclaratorIdContext variableDeclaratorId() { - return getRuleContext(VariableDeclaratorIdContext.class,0); - } - public ExpressionContext expression() { - return getRuleContext(ExpressionContext.class,0); - } - public ResourceContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_resource; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterResource(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitResource(this); - } - } - - public final ResourceContext resource() throws RecognitionException { - ResourceContext _localctx = new ResourceContext(_ctx, getState()); - enterRule(_localctx, 152, RULE_resource); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(970); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==FINAL || _la==AT) { - { - { - setState(967); variableModifier(); - } - } - setState(972); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(973); classOrInterfaceType(); - setState(974); variableDeclaratorId(); - setState(975); match(ASSIGN); - setState(976); expression(0); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class SwitchBlockStatementGroupContext extends ParserRuleContext { - public List blockStatement() { - return getRuleContexts(BlockStatementContext.class); - } - public List switchLabel() { - return getRuleContexts(SwitchLabelContext.class); - } - public BlockStatementContext blockStatement(int i) { - return getRuleContext(BlockStatementContext.class,i); - } - public SwitchLabelContext switchLabel(int i) { - return getRuleContext(SwitchLabelContext.class,i); - } - public SwitchBlockStatementGroupContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_switchBlockStatementGroup; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterSwitchBlockStatementGroup(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitSwitchBlockStatementGroup(this); - } - } - - public final SwitchBlockStatementGroupContext switchBlockStatementGroup() throws RecognitionException { - SwitchBlockStatementGroupContext _localctx = new SwitchBlockStatementGroupContext(_ctx, getState()); - enterRule(_localctx, 154, RULE_switchBlockStatementGroup); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(979); - _errHandler.sync(this); - _la = _input.LA(1); - do { - { - { - setState(978); switchLabel(); - } - } - setState(981); - _errHandler.sync(this); - _la = _input.LA(1); - } while ( _la==CASE || _la==DEFAULT ); - setState(984); - _errHandler.sync(this); - _la = _input.LA(1); - do { - { - { - setState(983); blockStatement(); - } - } - setState(986); - _errHandler.sync(this); - _la = _input.LA(1); - } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << ASSERT) | (1L << BOOLEAN) | (1L << BREAK) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << CONTINUE) | (1L << DO) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << FOR) | (1L << IF) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NEW) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << RETURN) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SUPER) | (1L << SWITCH) | (1L << SYNCHRONIZED) | (1L << THIS) | (1L << THROW) | (1L << TRY) | (1L << VOID) | (1L << WHILE) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0) ); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class SwitchLabelContext extends ParserRuleContext { - public ConstantExpressionContext constantExpression() { - return getRuleContext(ConstantExpressionContext.class,0); - } - public EnumConstantNameContext enumConstantName() { - return getRuleContext(EnumConstantNameContext.class,0); - } - public SwitchLabelContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_switchLabel; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterSwitchLabel(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitSwitchLabel(this); - } - } - - public final SwitchLabelContext switchLabel() throws RecognitionException { - SwitchLabelContext _localctx = new SwitchLabelContext(_ctx, getState()); - enterRule(_localctx, 156, RULE_switchLabel); - try { - setState(998); - switch ( getInterpreter().adaptivePredict(_input,115,_ctx) ) { - case 1: - enterOuterAlt(_localctx, 1); - { - setState(988); match(CASE); - setState(989); constantExpression(); - setState(990); match(COLON); - } - break; - case 2: - enterOuterAlt(_localctx, 2); - { - setState(992); match(CASE); - setState(993); enumConstantName(); - setState(994); match(COLON); - } - break; - case 3: - enterOuterAlt(_localctx, 3); - { - setState(996); match(DEFAULT); - setState(997); match(COLON); - } - break; - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ForControlContext extends ParserRuleContext { - public ForUpdateContext forUpdate() { - return getRuleContext(ForUpdateContext.class,0); - } - public ForInitContext forInit() { - return getRuleContext(ForInitContext.class,0); - } - public EnhancedForControlContext enhancedForControl() { - return getRuleContext(EnhancedForControlContext.class,0); - } - public ExpressionContext expression() { - return getRuleContext(ExpressionContext.class,0); - } - public ForControlContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_forControl; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterForControl(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitForControl(this); - } - } - - public final ForControlContext forControl() throws RecognitionException { - ForControlContext _localctx = new ForControlContext(_ctx, getState()); - enterRule(_localctx, 158, RULE_forControl); - int _la; - try { - setState(1012); - switch ( getInterpreter().adaptivePredict(_input,119,_ctx) ) { - case 1: - enterOuterAlt(_localctx, 1); - { - setState(1000); enhancedForControl(); - } - break; - case 2: - enterOuterAlt(_localctx, 2); - { - setState(1002); - _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { - { - setState(1001); forInit(); - } - } - - setState(1004); match(SEMI); - setState(1006); - _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { - { - setState(1005); expression(0); - } - } - - setState(1008); match(SEMI); - setState(1010); - _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { - { - setState(1009); forUpdate(); - } - } - - } - break; - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ForInitContext extends ParserRuleContext { - public LocalVariableDeclarationContext localVariableDeclaration() { - return getRuleContext(LocalVariableDeclarationContext.class,0); - } - public ExpressionListContext expressionList() { - return getRuleContext(ExpressionListContext.class,0); - } - public ForInitContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_forInit; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterForInit(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitForInit(this); - } - } - - public final ForInitContext forInit() throws RecognitionException { - ForInitContext _localctx = new ForInitContext(_ctx, getState()); - enterRule(_localctx, 160, RULE_forInit); - try { - setState(1016); - switch ( getInterpreter().adaptivePredict(_input,120,_ctx) ) { - case 1: - enterOuterAlt(_localctx, 1); - { - setState(1014); localVariableDeclaration(); - } - break; - case 2: - enterOuterAlt(_localctx, 2); - { - setState(1015); expressionList(); - } - break; - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class EnhancedForControlContext extends ParserRuleContext { - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public VariableModifierContext variableModifier(int i) { - return getRuleContext(VariableModifierContext.class,i); - } - public List variableModifier() { - return getRuleContexts(VariableModifierContext.class); - } - public TypeContext type() { - return getRuleContext(TypeContext.class,0); - } - public ExpressionContext expression() { - return getRuleContext(ExpressionContext.class,0); - } - public EnhancedForControlContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_enhancedForControl; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterEnhancedForControl(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitEnhancedForControl(this); - } - } - - public final EnhancedForControlContext enhancedForControl() throws RecognitionException { - EnhancedForControlContext _localctx = new EnhancedForControlContext(_ctx, getState()); - enterRule(_localctx, 162, RULE_enhancedForControl); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(1021); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==FINAL || _la==AT) { - { - { - setState(1018); variableModifier(); - } - } - setState(1023); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(1024); type(); - setState(1025); match(Identifier); - setState(1026); match(COLON); - setState(1027); expression(0); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ForUpdateContext extends ParserRuleContext { - public ExpressionListContext expressionList() { - return getRuleContext(ExpressionListContext.class,0); - } - public ForUpdateContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_forUpdate; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterForUpdate(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitForUpdate(this); - } - } - - public final ForUpdateContext forUpdate() throws RecognitionException { - ForUpdateContext _localctx = new ForUpdateContext(_ctx, getState()); - enterRule(_localctx, 164, RULE_forUpdate); - try { - enterOuterAlt(_localctx, 1); - { - setState(1029); expressionList(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ParExpressionContext extends ParserRuleContext { - public ExpressionContext expression() { - return getRuleContext(ExpressionContext.class,0); - } - public ParExpressionContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_parExpression; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterParExpression(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitParExpression(this); - } - } - - public final ParExpressionContext parExpression() throws RecognitionException { - ParExpressionContext _localctx = new ParExpressionContext(_ctx, getState()); - enterRule(_localctx, 166, RULE_parExpression); - try { - enterOuterAlt(_localctx, 1); - { - setState(1031); match(LPAREN); - setState(1032); expression(0); - setState(1033); match(RPAREN); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ExpressionListContext extends ParserRuleContext { - public ExpressionContext expression(int i) { - return getRuleContext(ExpressionContext.class,i); - } - public List expression() { - return getRuleContexts(ExpressionContext.class); - } - public ExpressionListContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_expressionList; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterExpressionList(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitExpressionList(this); - } - } - - public final ExpressionListContext expressionList() throws RecognitionException { - ExpressionListContext _localctx = new ExpressionListContext(_ctx, getState()); - enterRule(_localctx, 168, RULE_expressionList); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(1035); expression(0); - setState(1040); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==COMMA) { - { - { - setState(1036); match(COMMA); - setState(1037); expression(0); - } - } - setState(1042); - _errHandler.sync(this); - _la = _input.LA(1); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class StatementExpressionContext extends ParserRuleContext { - public ExpressionContext expression() { - return getRuleContext(ExpressionContext.class,0); - } - public StatementExpressionContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_statementExpression; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterStatementExpression(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitStatementExpression(this); - } - } - - public final StatementExpressionContext statementExpression() throws RecognitionException { - StatementExpressionContext _localctx = new StatementExpressionContext(_ctx, getState()); - enterRule(_localctx, 170, RULE_statementExpression); - try { - enterOuterAlt(_localctx, 1); - { - setState(1043); expression(0); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ConstantExpressionContext extends ParserRuleContext { - public ExpressionContext expression() { - return getRuleContext(ExpressionContext.class,0); - } - public ConstantExpressionContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_constantExpression; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterConstantExpression(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitConstantExpression(this); - } - } - - public final ConstantExpressionContext constantExpression() throws RecognitionException { - ConstantExpressionContext _localctx = new ConstantExpressionContext(_ctx, getState()); - enterRule(_localctx, 172, RULE_constantExpression); - try { - enterOuterAlt(_localctx, 1); - { - setState(1045); expression(0); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ExpressionContext extends ParserRuleContext { - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { - return getRuleContext(NonWildcardTypeArgumentsContext.class,0); - } - public ExplicitGenericInvocationContext explicitGenericInvocation() { - return getRuleContext(ExplicitGenericInvocationContext.class,0); - } - public ExpressionListContext expressionList() { - return getRuleContext(ExpressionListContext.class,0); - } - public InnerCreatorContext innerCreator() { - return getRuleContext(InnerCreatorContext.class,0); - } - public SuperSuffixContext superSuffix() { - return getRuleContext(SuperSuffixContext.class,0); - } - public ExpressionContext expression(int i) { - return getRuleContext(ExpressionContext.class,i); - } - public PrimaryContext primary() { - return getRuleContext(PrimaryContext.class,0); - } - public TypeContext type() { - return getRuleContext(TypeContext.class,0); - } - public List expression() { - return getRuleContexts(ExpressionContext.class); - } - public CreatorContext creator() { - return getRuleContext(CreatorContext.class,0); - } - public ExpressionContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_expression; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterExpression(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitExpression(this); - } - } - - public final ExpressionContext expression() throws RecognitionException { - return expression(0); - } - - private ExpressionContext expression(int _p) throws RecognitionException { - ParserRuleContext _parentctx = _ctx; - int _parentState = getState(); - ExpressionContext _localctx = new ExpressionContext(_ctx, _parentState); - ExpressionContext _prevctx = _localctx; - int _startState = 174; - enterRecursionRule(_localctx, 174, RULE_expression, _p); - int _la; - try { - int _alt; - enterOuterAlt(_localctx, 1); - { - setState(1060); - switch ( getInterpreter().adaptivePredict(_input,123,_ctx) ) { - case 1: - { - setState(1048); match(LPAREN); - setState(1049); type(); - setState(1050); match(RPAREN); - setState(1051); expression(17); - } - break; - case 2: - { - setState(1053); - _la = _input.LA(1); - if ( !(((((_la - 79)) & ~0x3f) == 0 && ((1L << (_la - 79)) & ((1L << (INC - 79)) | (1L << (DEC - 79)) | (1L << (ADD - 79)) | (1L << (SUB - 79)))) != 0)) ) { - _errHandler.recoverInline(this); - } - consume(); - setState(1054); expression(15); - } - break; - case 3: - { - setState(1055); - _la = _input.LA(1); - if ( !(_la==BANG || _la==TILDE) ) { - _errHandler.recoverInline(this); - } - consume(); - setState(1056); expression(14); - } - break; - case 4: - { - setState(1057); primary(); - } - break; - case 5: - { - setState(1058); match(NEW); - setState(1059); creator(); - } - break; - } - _ctx.stop = _input.LT(-1); - setState(1147); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,128,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - if ( _parseListeners!=null ) triggerExitRuleEvent(); - _prevctx = _localctx; - { - setState(1145); - switch ( getInterpreter().adaptivePredict(_input,127,_ctx) ) { - case 1: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1062); - if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); - setState(1063); - _la = _input.LA(1); - if ( !(((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (MUL - 83)) | (1L << (DIV - 83)) | (1L << (MOD - 83)))) != 0)) ) { - _errHandler.recoverInline(this); - } - consume(); - setState(1064); expression(14); - } - break; - case 2: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1065); - if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); - setState(1066); - _la = _input.LA(1); - if ( !(_la==ADD || _la==SUB) ) { - _errHandler.recoverInline(this); - } - consume(); - setState(1067); expression(13); - } - break; - case 3: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1068); - if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); - setState(1076); - switch ( getInterpreter().adaptivePredict(_input,124,_ctx) ) { - case 1: - { - setState(1069); match(LT); - setState(1070); match(LT); - } - break; - case 2: - { - setState(1071); match(GT); - setState(1072); match(GT); - setState(1073); match(GT); - } - break; - case 3: - { - setState(1074); match(GT); - setState(1075); match(GT); - } - break; - } - setState(1078); expression(12); - } - break; - case 4: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1079); - if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); - setState(1080); - _la = _input.LA(1); - if ( !(((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (GT - 67)) | (1L << (LT - 67)) | (1L << (LE - 67)) | (1L << (GE - 67)))) != 0)) ) { - _errHandler.recoverInline(this); - } - consume(); - setState(1081); expression(11); - } - break; - case 5: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1082); - if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); - setState(1083); - _la = _input.LA(1); - if ( !(_la==EQUAL || _la==NOTEQUAL) ) { - _errHandler.recoverInline(this); - } - consume(); - setState(1084); expression(9); - } - break; - case 6: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1085); - if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); - setState(1086); match(BITAND); - setState(1087); expression(8); - } - break; - case 7: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1088); - if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); - setState(1089); match(CARET); - setState(1090); expression(7); - } - break; - case 8: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1091); - if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); - setState(1092); match(BITOR); - setState(1093); expression(6); - } - break; - case 9: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1094); - if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)"); - setState(1095); match(AND); - setState(1096); expression(5); - } - break; - case 10: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1097); - if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); - setState(1098); match(OR); - setState(1099); expression(4); - } - break; - case 11: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1100); - if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); - setState(1101); match(QUESTION); - setState(1102); expression(0); - setState(1103); match(COLON); - setState(1104); expression(3); - } - break; - case 12: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1106); - if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(1107); - _la = _input.LA(1); - if ( !(((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (ASSIGN - 66)) | (1L << (ADD_ASSIGN - 66)) | (1L << (SUB_ASSIGN - 66)) | (1L << (MUL_ASSIGN - 66)) | (1L << (DIV_ASSIGN - 66)) | (1L << (AND_ASSIGN - 66)) | (1L << (OR_ASSIGN - 66)) | (1L << (XOR_ASSIGN - 66)) | (1L << (MOD_ASSIGN - 66)) | (1L << (LSHIFT_ASSIGN - 66)) | (1L << (RSHIFT_ASSIGN - 66)) | (1L << (URSHIFT_ASSIGN - 66)))) != 0)) ) { - _errHandler.recoverInline(this); - } - consume(); - setState(1108); expression(2); - } - break; - case 13: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1109); - if (!(precpred(_ctx, 25))) throw new FailedPredicateException(this, "precpred(_ctx, 25)"); - setState(1110); match(DOT); - setState(1111); match(Identifier); - } - break; - case 14: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1112); - if (!(precpred(_ctx, 24))) throw new FailedPredicateException(this, "precpred(_ctx, 24)"); - setState(1113); match(DOT); - setState(1114); match(THIS); - } - break; - case 15: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1115); - if (!(precpred(_ctx, 23))) throw new FailedPredicateException(this, "precpred(_ctx, 23)"); - setState(1116); match(DOT); - setState(1117); match(NEW); - setState(1119); - _la = _input.LA(1); - if (_la==LT) { - { - setState(1118); nonWildcardTypeArguments(); - } - } - - setState(1121); innerCreator(); - } - break; - case 16: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1122); - if (!(precpred(_ctx, 22))) throw new FailedPredicateException(this, "precpred(_ctx, 22)"); - setState(1123); match(DOT); - setState(1124); match(SUPER); - setState(1125); superSuffix(); - } - break; - case 17: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1126); - if (!(precpred(_ctx, 21))) throw new FailedPredicateException(this, "precpred(_ctx, 21)"); - setState(1127); match(DOT); - setState(1128); explicitGenericInvocation(); - } - break; - case 18: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1129); - if (!(precpred(_ctx, 20))) throw new FailedPredicateException(this, "precpred(_ctx, 20)"); - setState(1130); match(LBRACK); - setState(1131); expression(0); - setState(1132); match(RBRACK); - } - break; - case 19: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1134); - if (!(precpred(_ctx, 19))) throw new FailedPredicateException(this, "precpred(_ctx, 19)"); - setState(1135); match(LPAREN); - setState(1137); - _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { - { - setState(1136); expressionList(); - } - } - - setState(1139); match(RPAREN); - } - break; - case 20: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1140); - if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)"); - setState(1141); - _la = _input.LA(1); - if ( !(_la==INC || _la==DEC) ) { - _errHandler.recoverInline(this); - } - consume(); - } - break; - case 21: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(1142); - if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); - setState(1143); match(INSTANCEOF); - setState(1144); type(); - } - break; - } - } - } - setState(1149); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,128,_ctx); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - unrollRecursionContexts(_parentctx); - } - return _localctx; - } - - public static class PrimaryContext extends ParserRuleContext { - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { - return getRuleContext(NonWildcardTypeArgumentsContext.class,0); - } - public ExplicitGenericInvocationSuffixContext explicitGenericInvocationSuffix() { - return getRuleContext(ExplicitGenericInvocationSuffixContext.class,0); - } - public LiteralContext literal() { - return getRuleContext(LiteralContext.class,0); - } - public TypeContext type() { - return getRuleContext(TypeContext.class,0); - } - public ArgumentsContext arguments() { - return getRuleContext(ArgumentsContext.class,0); - } - public ExpressionContext expression() { - return getRuleContext(ExpressionContext.class,0); - } - public PrimaryContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_primary; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterPrimary(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitPrimary(this); - } - } - - public final PrimaryContext primary() throws RecognitionException { - PrimaryContext _localctx = new PrimaryContext(_ctx, getState()); - enterRule(_localctx, 176, RULE_primary); - try { - setState(1171); - switch ( getInterpreter().adaptivePredict(_input,130,_ctx) ) { - case 1: - enterOuterAlt(_localctx, 1); - { - setState(1150); match(LPAREN); - setState(1151); expression(0); - setState(1152); match(RPAREN); - } - break; - case 2: - enterOuterAlt(_localctx, 2); - { - setState(1154); match(THIS); - } - break; - case 3: - enterOuterAlt(_localctx, 3); - { - setState(1155); match(SUPER); - } - break; - case 4: - enterOuterAlt(_localctx, 4); - { - setState(1156); literal(); - } - break; - case 5: - enterOuterAlt(_localctx, 5); - { - setState(1157); match(Identifier); - } - break; - case 6: - enterOuterAlt(_localctx, 6); - { - setState(1158); type(); - setState(1159); match(DOT); - setState(1160); match(CLASS); - } - break; - case 7: - enterOuterAlt(_localctx, 7); - { - setState(1162); match(VOID); - setState(1163); match(DOT); - setState(1164); match(CLASS); - } - break; - case 8: - enterOuterAlt(_localctx, 8); - { - setState(1165); nonWildcardTypeArguments(); - setState(1169); - switch (_input.LA(1)) { - case SUPER: - case Identifier: - { - setState(1166); explicitGenericInvocationSuffix(); - } - break; - case THIS: - { - setState(1167); match(THIS); - setState(1168); arguments(); - } - break; - default: - throw new NoViableAltException(this); - } - } - break; - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class CreatorContext extends ParserRuleContext { - public ArrayCreatorRestContext arrayCreatorRest() { - return getRuleContext(ArrayCreatorRestContext.class,0); - } - public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { - return getRuleContext(NonWildcardTypeArgumentsContext.class,0); - } - public ClassCreatorRestContext classCreatorRest() { - return getRuleContext(ClassCreatorRestContext.class,0); - } - public CreatedNameContext createdName() { - return getRuleContext(CreatedNameContext.class,0); - } - public CreatorContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_creator; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterCreator(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitCreator(this); - } - } - - public final CreatorContext creator() throws RecognitionException { - CreatorContext _localctx = new CreatorContext(_ctx, getState()); - enterRule(_localctx, 178, RULE_creator); - try { - setState(1182); - switch (_input.LA(1)) { - case LT: - enterOuterAlt(_localctx, 1); - { - setState(1173); nonWildcardTypeArguments(); - setState(1174); createdName(); - setState(1175); classCreatorRest(); - } - break; - case BOOLEAN: - case BYTE: - case CHAR: - case DOUBLE: - case FLOAT: - case INT: - case LONG: - case SHORT: - case Identifier: - enterOuterAlt(_localctx, 2); - { - setState(1177); createdName(); - setState(1180); - switch (_input.LA(1)) { - case LBRACK: - { - setState(1178); arrayCreatorRest(); - } - break; - case LPAREN: - { - setState(1179); classCreatorRest(); - } - break; - default: - throw new NoViableAltException(this); - } - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class CreatedNameContext extends ParserRuleContext { - public List Identifier() { return getTokens(Java8Parser.Identifier); } - public TerminalNode Identifier(int i) { - return getToken(Java8Parser.Identifier, i); - } - public List typeArgumentsOrDiamond() { - return getRuleContexts(TypeArgumentsOrDiamondContext.class); - } - public PrimitiveTypeContext primitiveType() { - return getRuleContext(PrimitiveTypeContext.class,0); - } - public TypeArgumentsOrDiamondContext typeArgumentsOrDiamond(int i) { - return getRuleContext(TypeArgumentsOrDiamondContext.class,i); - } - public CreatedNameContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_createdName; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterCreatedName(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitCreatedName(this); - } - } - - public final CreatedNameContext createdName() throws RecognitionException { - CreatedNameContext _localctx = new CreatedNameContext(_ctx, getState()); - enterRule(_localctx, 180, RULE_createdName); - int _la; - try { - setState(1199); - switch (_input.LA(1)) { - case Identifier: - enterOuterAlt(_localctx, 1); - { - setState(1184); match(Identifier); - setState(1186); - _la = _input.LA(1); - if (_la==LT) { - { - setState(1185); typeArgumentsOrDiamond(); - } - } - - setState(1195); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==DOT) { - { - { - setState(1188); match(DOT); - setState(1189); match(Identifier); - setState(1191); - _la = _input.LA(1); - if (_la==LT) { - { - setState(1190); typeArgumentsOrDiamond(); - } - } - - } - } - setState(1197); - _errHandler.sync(this); - _la = _input.LA(1); - } - } - break; - case BOOLEAN: - case BYTE: - case CHAR: - case DOUBLE: - case FLOAT: - case INT: - case LONG: - case SHORT: - enterOuterAlt(_localctx, 2); - { - setState(1198); primitiveType(); - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class InnerCreatorContext extends ParserRuleContext { - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public ClassCreatorRestContext classCreatorRest() { - return getRuleContext(ClassCreatorRestContext.class,0); - } - public NonWildcardTypeArgumentsOrDiamondContext nonWildcardTypeArgumentsOrDiamond() { - return getRuleContext(NonWildcardTypeArgumentsOrDiamondContext.class,0); - } - public InnerCreatorContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_innerCreator; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterInnerCreator(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitInnerCreator(this); - } - } - - public final InnerCreatorContext innerCreator() throws RecognitionException { - InnerCreatorContext _localctx = new InnerCreatorContext(_ctx, getState()); - enterRule(_localctx, 182, RULE_innerCreator); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(1201); match(Identifier); - setState(1203); - _la = _input.LA(1); - if (_la==LT) { - { - setState(1202); nonWildcardTypeArgumentsOrDiamond(); - } - } - - setState(1205); classCreatorRest(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ArrayCreatorRestContext extends ParserRuleContext { - public ArrayInitializerContext arrayInitializer() { - return getRuleContext(ArrayInitializerContext.class,0); - } - public ExpressionContext expression(int i) { - return getRuleContext(ExpressionContext.class,i); - } - public List expression() { - return getRuleContexts(ExpressionContext.class); - } - public ArrayCreatorRestContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_arrayCreatorRest; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterArrayCreatorRest(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitArrayCreatorRest(this); - } - } - - public final ArrayCreatorRestContext arrayCreatorRest() throws RecognitionException { - ArrayCreatorRestContext _localctx = new ArrayCreatorRestContext(_ctx, getState()); - enterRule(_localctx, 184, RULE_arrayCreatorRest); - int _la; - try { - int _alt; - enterOuterAlt(_localctx, 1); - { - setState(1207); match(LBRACK); - setState(1235); - switch (_input.LA(1)) { - case RBRACK: - { - setState(1208); match(RBRACK); - setState(1213); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==LBRACK) { - { - { - setState(1209); match(LBRACK); - setState(1210); match(RBRACK); - } - } - setState(1215); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(1216); arrayInitializer(); - } - break; - case BOOLEAN: - case BYTE: - case CHAR: - case DOUBLE: - case FLOAT: - case INT: - case LONG: - case NEW: - case SHORT: - case SUPER: - case THIS: - case VOID: - case IntegerLiteral: - case FloatingPointLiteral: - case BooleanLiteral: - case CharacterLiteral: - case StringLiteral: - case NullLiteral: - case LPAREN: - case LT: - case BANG: - case TILDE: - case INC: - case DEC: - case ADD: - case SUB: - case Identifier: - { - setState(1217); expression(0); - setState(1218); match(RBRACK); - setState(1225); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,139,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - { - { - setState(1219); match(LBRACK); - setState(1220); expression(0); - setState(1221); match(RBRACK); - } - } - } - setState(1227); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,139,_ctx); - } - setState(1232); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,140,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - { - { - setState(1228); match(LBRACK); - setState(1229); match(RBRACK); - } - } - } - setState(1234); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,140,_ctx); - } - } - break; - default: - throw new NoViableAltException(this); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ClassCreatorRestContext extends ParserRuleContext { - public ClassBodyContext classBody() { - return getRuleContext(ClassBodyContext.class,0); - } - public ArgumentsContext arguments() { - return getRuleContext(ArgumentsContext.class,0); - } - public ClassCreatorRestContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_classCreatorRest; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterClassCreatorRest(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitClassCreatorRest(this); - } - } - - public final ClassCreatorRestContext classCreatorRest() throws RecognitionException { - ClassCreatorRestContext _localctx = new ClassCreatorRestContext(_ctx, getState()); - enterRule(_localctx, 186, RULE_classCreatorRest); - try { - enterOuterAlt(_localctx, 1); - { - setState(1237); arguments(); - setState(1239); - switch ( getInterpreter().adaptivePredict(_input,142,_ctx) ) { - case 1: - { - setState(1238); classBody(); - } - break; - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ExplicitGenericInvocationContext extends ParserRuleContext { - public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { - return getRuleContext(NonWildcardTypeArgumentsContext.class,0); - } - public ExplicitGenericInvocationSuffixContext explicitGenericInvocationSuffix() { - return getRuleContext(ExplicitGenericInvocationSuffixContext.class,0); - } - public ExplicitGenericInvocationContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_explicitGenericInvocation; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterExplicitGenericInvocation(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitExplicitGenericInvocation(this); - } - } - - public final ExplicitGenericInvocationContext explicitGenericInvocation() throws RecognitionException { - ExplicitGenericInvocationContext _localctx = new ExplicitGenericInvocationContext(_ctx, getState()); - enterRule(_localctx, 188, RULE_explicitGenericInvocation); - try { - enterOuterAlt(_localctx, 1); - { - setState(1241); nonWildcardTypeArguments(); - setState(1242); explicitGenericInvocationSuffix(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class NonWildcardTypeArgumentsContext extends ParserRuleContext { - public TypeListContext typeList() { - return getRuleContext(TypeListContext.class,0); - } - public NonWildcardTypeArgumentsContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_nonWildcardTypeArguments; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterNonWildcardTypeArguments(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitNonWildcardTypeArguments(this); - } - } - - public final NonWildcardTypeArgumentsContext nonWildcardTypeArguments() throws RecognitionException { - NonWildcardTypeArgumentsContext _localctx = new NonWildcardTypeArgumentsContext(_ctx, getState()); - enterRule(_localctx, 190, RULE_nonWildcardTypeArguments); - try { - enterOuterAlt(_localctx, 1); - { - setState(1244); match(LT); - setState(1245); typeList(); - setState(1246); match(GT); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class TypeArgumentsOrDiamondContext extends ParserRuleContext { - public TypeArgumentsContext typeArguments() { - return getRuleContext(TypeArgumentsContext.class,0); - } - public TypeArgumentsOrDiamondContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_typeArgumentsOrDiamond; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterTypeArgumentsOrDiamond(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitTypeArgumentsOrDiamond(this); - } - } - - public final TypeArgumentsOrDiamondContext typeArgumentsOrDiamond() throws RecognitionException { - TypeArgumentsOrDiamondContext _localctx = new TypeArgumentsOrDiamondContext(_ctx, getState()); - enterRule(_localctx, 192, RULE_typeArgumentsOrDiamond); - try { - setState(1251); - switch ( getInterpreter().adaptivePredict(_input,143,_ctx) ) { - case 1: - enterOuterAlt(_localctx, 1); - { - setState(1248); match(LT); - setState(1249); match(GT); - } - break; - case 2: - enterOuterAlt(_localctx, 2); - { - setState(1250); typeArguments(); - } - break; - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class NonWildcardTypeArgumentsOrDiamondContext extends ParserRuleContext { - public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { - return getRuleContext(NonWildcardTypeArgumentsContext.class,0); - } - public NonWildcardTypeArgumentsOrDiamondContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_nonWildcardTypeArgumentsOrDiamond; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterNonWildcardTypeArgumentsOrDiamond(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitNonWildcardTypeArgumentsOrDiamond(this); - } - } - - public final NonWildcardTypeArgumentsOrDiamondContext nonWildcardTypeArgumentsOrDiamond() throws RecognitionException { - NonWildcardTypeArgumentsOrDiamondContext _localctx = new NonWildcardTypeArgumentsOrDiamondContext(_ctx, getState()); - enterRule(_localctx, 194, RULE_nonWildcardTypeArgumentsOrDiamond); - try { - setState(1256); - switch ( getInterpreter().adaptivePredict(_input,144,_ctx) ) { - case 1: - enterOuterAlt(_localctx, 1); - { - setState(1253); match(LT); - setState(1254); match(GT); - } - break; - case 2: - enterOuterAlt(_localctx, 2); - { - setState(1255); nonWildcardTypeArguments(); - } - break; - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class SuperSuffixContext extends ParserRuleContext { - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public ArgumentsContext arguments() { - return getRuleContext(ArgumentsContext.class,0); - } - public SuperSuffixContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_superSuffix; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterSuperSuffix(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitSuperSuffix(this); - } - } - - public final SuperSuffixContext superSuffix() throws RecognitionException { - SuperSuffixContext _localctx = new SuperSuffixContext(_ctx, getState()); - enterRule(_localctx, 196, RULE_superSuffix); - try { - setState(1264); - switch (_input.LA(1)) { - case LPAREN: - enterOuterAlt(_localctx, 1); - { - setState(1258); arguments(); - } - break; - case DOT: - enterOuterAlt(_localctx, 2); - { - setState(1259); match(DOT); - setState(1260); match(Identifier); - setState(1262); - switch ( getInterpreter().adaptivePredict(_input,145,_ctx) ) { - case 1: - { - setState(1261); arguments(); - } - break; - } - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ExplicitGenericInvocationSuffixContext extends ParserRuleContext { - public TerminalNode Identifier() { return getToken(Java8Parser.Identifier, 0); } - public SuperSuffixContext superSuffix() { - return getRuleContext(SuperSuffixContext.class,0); - } - public ArgumentsContext arguments() { - return getRuleContext(ArgumentsContext.class,0); - } - public ExplicitGenericInvocationSuffixContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_explicitGenericInvocationSuffix; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterExplicitGenericInvocationSuffix(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitExplicitGenericInvocationSuffix(this); - } - } - - public final ExplicitGenericInvocationSuffixContext explicitGenericInvocationSuffix() throws RecognitionException { - ExplicitGenericInvocationSuffixContext _localctx = new ExplicitGenericInvocationSuffixContext(_ctx, getState()); - enterRule(_localctx, 198, RULE_explicitGenericInvocationSuffix); - try { - setState(1270); - switch (_input.LA(1)) { - case SUPER: - enterOuterAlt(_localctx, 1); - { - setState(1266); match(SUPER); - setState(1267); superSuffix(); - } - break; - case Identifier: - enterOuterAlt(_localctx, 2); - { - setState(1268); match(Identifier); - setState(1269); arguments(); - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ArgumentsContext extends ParserRuleContext { - public ExpressionListContext expressionList() { - return getRuleContext(ExpressionListContext.class,0); - } - public ArgumentsContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_arguments; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).enterArguments(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof Java8Listener ) ((Java8Listener)listener).exitArguments(this); - } - } - - public final ArgumentsContext arguments() throws RecognitionException { - ArgumentsContext _localctx = new ArgumentsContext(_ctx, getState()); - enterRule(_localctx, 200, RULE_arguments); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(1272); match(LPAREN); - setState(1274); - _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { - { - setState(1273); expressionList(); - } - } - - setState(1276); match(RPAREN); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { - switch (ruleIndex) { - case 87: return expression_sempred((ExpressionContext)_localctx, predIndex); - } - return true; - } - private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { - switch (predIndex) { - case 0: return precpred(_ctx, 13); - case 1: return precpred(_ctx, 12); - case 2: return precpred(_ctx, 11); - case 3: return precpred(_ctx, 10); - case 4: return precpred(_ctx, 8); - case 5: return precpred(_ctx, 7); - case 6: return precpred(_ctx, 6); - case 7: return precpred(_ctx, 5); - case 8: return precpred(_ctx, 4); - case 9: return precpred(_ctx, 3); - case 10: return precpred(_ctx, 2); - case 11: return precpred(_ctx, 1); - case 12: return precpred(_ctx, 25); - case 13: return precpred(_ctx, 24); - case 14: return precpred(_ctx, 23); - case 15: return precpred(_ctx, 22); - case 16: return precpred(_ctx, 21); - case 17: return precpred(_ctx, 20); - case 18: return precpred(_ctx, 19); - case 19: return precpred(_ctx, 16); - case 20: return precpred(_ctx, 9); - } - return true; - } - - public static final String _serializedATN = - "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3k\u0501\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\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\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ - "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ - ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ - "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ - "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ - "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ - "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ - "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\3\2\5\2\u00ce\n\2\3\2\7\2\u00d1"+ - "\n\2\f\2\16\2\u00d4\13\2\3\2\7\2\u00d7\n\2\f\2\16\2\u00da\13\2\3\2\3\2"+ - "\3\3\7\3\u00df\n\3\f\3\16\3\u00e2\13\3\3\3\3\3\3\3\3\3\3\4\3\4\5\4\u00ea"+ - "\n\4\3\4\3\4\3\4\5\4\u00ef\n\4\3\4\3\4\3\5\7\5\u00f4\n\5\f\5\16\5\u00f7"+ - "\13\5\3\5\3\5\7\5\u00fb\n\5\f\5\16\5\u00fe\13\5\3\5\3\5\7\5\u0102\n\5"+ - "\f\5\16\5\u0105\13\5\3\5\3\5\7\5\u0109\n\5\f\5\16\5\u010c\13\5\3\5\3\5"+ - "\5\5\u0110\n\5\3\6\3\6\5\6\u0114\n\6\3\7\3\7\5\7\u0118\n\7\3\b\3\b\5\b"+ - "\u011c\n\b\3\t\3\t\3\t\5\t\u0121\n\t\3\t\3\t\5\t\u0125\n\t\3\t\3\t\5\t"+ - "\u0129\n\t\3\t\3\t\3\n\3\n\3\n\3\n\7\n\u0131\n\n\f\n\16\n\u0134\13\n\3"+ - "\n\3\n\3\13\3\13\3\13\5\13\u013b\n\13\3\f\3\f\3\f\7\f\u0140\n\f\f\f\16"+ - "\f\u0143\13\f\3\r\3\r\3\r\3\r\5\r\u0149\n\r\3\r\3\r\5\r\u014d\n\r\3\r"+ - "\5\r\u0150\n\r\3\r\5\r\u0153\n\r\3\r\3\r\3\16\3\16\3\16\7\16\u015a\n\16"+ - "\f\16\16\16\u015d\13\16\3\17\7\17\u0160\n\17\f\17\16\17\u0163\13\17\3"+ - "\17\3\17\5\17\u0167\n\17\3\17\5\17\u016a\n\17\3\20\3\20\7\20\u016e\n\20"+ - "\f\20\16\20\u0171\13\20\3\21\3\21\3\21\5\21\u0176\n\21\3\21\3\21\5\21"+ - "\u017a\n\21\3\21\3\21\3\22\3\22\3\22\7\22\u0181\n\22\f\22\16\22\u0184"+ - "\13\22\3\23\3\23\7\23\u0188\n\23\f\23\16\23\u018b\13\23\3\23\3\23\3\24"+ - "\3\24\7\24\u0191\n\24\f\24\16\24\u0194\13\24\3\24\3\24\3\25\3\25\5\25"+ - "\u019a\n\25\3\25\3\25\7\25\u019e\n\25\f\25\16\25\u01a1\13\25\3\25\5\25"+ - "\u01a4\n\25\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\5\26\u01af\n"+ - "\26\3\27\3\27\5\27\u01b3\n\27\3\27\3\27\3\27\3\27\7\27\u01b9\n\27\f\27"+ - "\16\27\u01bc\13\27\3\27\3\27\5\27\u01c0\n\27\3\27\3\27\5\27\u01c4\n\27"+ - "\3\30\3\30\3\30\3\31\3\31\3\31\3\31\5\31\u01cd\n\31\3\31\3\31\3\32\3\32"+ - "\3\32\3\33\3\33\3\33\3\33\3\34\7\34\u01d9\n\34\f\34\16\34\u01dc\13\34"+ - "\3\34\3\34\5\34\u01e0\n\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35\5\35\u01e9"+ - "\n\35\3\36\3\36\3\36\3\36\7\36\u01ef\n\36\f\36\16\36\u01f2\13\36\3\36"+ - "\3\36\3\37\3\37\3\37\7\37\u01f9\n\37\f\37\16\37\u01fc\13\37\3\37\3\37"+ - "\3\37\3 \3 \5 \u0203\n \3 \3 \3 \3 \7 \u0209\n \f \16 \u020c\13 \3 \3"+ - " \5 \u0210\n \3 \3 \3!\3!\3!\3\"\3\"\3\"\7\"\u021a\n\"\f\"\16\"\u021d"+ - "\13\"\3#\3#\3#\5#\u0222\n#\3$\3$\3$\7$\u0227\n$\f$\16$\u022a\13$\3%\3"+ - "%\5%\u022e\n%\3&\3&\3&\3&\7&\u0234\n&\f&\16&\u0237\13&\3&\5&\u023a\n&"+ - "\5&\u023c\n&\3&\3&\3\'\3\'\3(\3(\3(\7(\u0245\n(\f(\16(\u0248\13(\3(\3"+ - "(\3(\7(\u024d\n(\f(\16(\u0250\13(\5(\u0252\n(\3)\3)\5)\u0256\n)\3)\3)"+ - "\3)\5)\u025b\n)\7)\u025d\n)\f)\16)\u0260\13)\3*\3*\3+\3+\3+\3+\7+\u0268"+ - "\n+\f+\16+\u026b\13+\3+\3+\3,\3,\3,\3,\5,\u0273\n,\5,\u0275\n,\3-\3-\3"+ - "-\7-\u027a\n-\f-\16-\u027d\13-\3.\3.\5.\u0281\n.\3.\3.\3/\3/\3/\7/\u0288"+ - "\n/\f/\16/\u028b\13/\3/\3/\5/\u028f\n/\3/\5/\u0292\n/\3\60\7\60\u0295"+ - "\n\60\f\60\16\60\u0298\13\60\3\60\3\60\3\60\3\61\7\61\u029e\n\61\f\61"+ - "\16\61\u02a1\13\61\3\61\3\61\3\61\3\61\3\62\3\62\3\63\3\63\3\64\3\64\3"+ - "\64\7\64\u02ae\n\64\f\64\16\64\u02b1\13\64\3\65\3\65\3\66\3\66\3\66\3"+ - "\66\3\66\5\66\u02ba\n\66\3\66\5\66\u02bd\n\66\3\67\3\67\38\38\38\78\u02c4"+ - "\n8\f8\168\u02c7\138\39\39\39\39\3:\3:\3:\5:\u02d0\n:\3;\3;\3;\3;\7;\u02d6"+ - "\n;\f;\16;\u02d9\13;\5;\u02db\n;\3;\5;\u02de\n;\3;\3;\3<\3<\3<\3<\3<\3"+ - "=\3=\7=\u02e9\n=\f=\16=\u02ec\13=\3=\3=\3>\7>\u02f1\n>\f>\16>\u02f4\13"+ - ">\3>\3>\5>\u02f8\n>\3?\3?\3?\3?\3?\3?\5?\u0300\n?\3?\3?\5?\u0304\n?\3"+ - "?\3?\5?\u0308\n?\3?\3?\5?\u030c\n?\5?\u030e\n?\3@\3@\5@\u0312\n@\3A\3"+ - "A\3A\3A\5A\u0318\nA\3B\3B\3C\3C\3C\3D\3D\7D\u0321\nD\fD\16D\u0324\13D"+ - "\3D\3D\3E\3E\3E\5E\u032b\nE\3F\3F\3F\3G\7G\u0331\nG\fG\16G\u0334\13G\3"+ - "G\3G\3G\3H\3H\3H\3H\3H\5H\u033e\nH\3H\3H\3H\3H\3H\3H\3H\5H\u0347\nH\3"+ - "H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\6H\u035c\nH\r"+ - "H\16H\u035d\3H\5H\u0361\nH\3H\5H\u0364\nH\3H\3H\3H\3H\7H\u036a\nH\fH\16"+ - "H\u036d\13H\3H\5H\u0370\nH\3H\3H\3H\3H\7H\u0376\nH\fH\16H\u0379\13H\3"+ - "H\7H\u037c\nH\fH\16H\u037f\13H\3H\3H\3H\3H\3H\3H\3H\3H\5H\u0389\nH\3H"+ - "\3H\3H\3H\3H\3H\3H\5H\u0392\nH\3H\3H\3H\5H\u0397\nH\3H\3H\3H\3H\3H\3H"+ - "\3H\3H\5H\u03a1\nH\3I\3I\3I\7I\u03a6\nI\fI\16I\u03a9\13I\3I\3I\3I\3I\3"+ - "I\3J\3J\3J\7J\u03b3\nJ\fJ\16J\u03b6\13J\3K\3K\3K\3L\3L\3L\5L\u03be\nL"+ - "\3L\3L\3M\3M\3M\7M\u03c5\nM\fM\16M\u03c8\13M\3N\7N\u03cb\nN\fN\16N\u03ce"+ - "\13N\3N\3N\3N\3N\3N\3O\6O\u03d6\nO\rO\16O\u03d7\3O\6O\u03db\nO\rO\16O"+ - "\u03dc\3P\3P\3P\3P\3P\3P\3P\3P\3P\3P\5P\u03e9\nP\3Q\3Q\5Q\u03ed\nQ\3Q"+ - "\3Q\5Q\u03f1\nQ\3Q\3Q\5Q\u03f5\nQ\5Q\u03f7\nQ\3R\3R\5R\u03fb\nR\3S\7S"+ - "\u03fe\nS\fS\16S\u0401\13S\3S\3S\3S\3S\3S\3T\3T\3U\3U\3U\3U\3V\3V\3V\7"+ - "V\u0411\nV\fV\16V\u0414\13V\3W\3W\3X\3X\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y"+ - "\3Y\3Y\3Y\5Y\u0427\nY\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\5Y\u0437"+ - "\nY\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y"+ - "\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\5Y\u0462\nY"+ - "\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\5Y\u0474\nY\3Y\3Y\3Y"+ - "\3Y\3Y\3Y\7Y\u047c\nY\fY\16Y\u047f\13Y\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3"+ - "Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\5Z\u0494\nZ\5Z\u0496\nZ\3[\3[\3[\3[\3[\3[\3"+ - "[\5[\u049f\n[\5[\u04a1\n[\3\\\3\\\5\\\u04a5\n\\\3\\\3\\\3\\\5\\\u04aa"+ - "\n\\\7\\\u04ac\n\\\f\\\16\\\u04af\13\\\3\\\5\\\u04b2\n\\\3]\3]\5]\u04b6"+ - "\n]\3]\3]\3^\3^\3^\3^\7^\u04be\n^\f^\16^\u04c1\13^\3^\3^\3^\3^\3^\3^\3"+ - "^\7^\u04ca\n^\f^\16^\u04cd\13^\3^\3^\7^\u04d1\n^\f^\16^\u04d4\13^\5^\u04d6"+ - "\n^\3_\3_\5_\u04da\n_\3`\3`\3`\3a\3a\3a\3a\3b\3b\3b\5b\u04e6\nb\3c\3c"+ - "\3c\5c\u04eb\nc\3d\3d\3d\3d\5d\u04f1\nd\5d\u04f3\nd\3e\3e\3e\3e\5e\u04f9"+ - "\ne\3f\3f\5f\u04fd\nf\3f\3f\3f\2\3\u00b0g\2\4\6\b\n\f\16\20\22\24\26\30"+ - "\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~\u0080"+ - "\u0082\u0084\u0086\u0088\u008a\u008c\u008e\u0090\u0092\u0094\u0096\u0098"+ - "\u009a\u009c\u009e\u00a0\u00a2\u00a4\u00a6\u00a8\u00aa\u00ac\u00ae\u00b0"+ - "\u00b2\u00b4\u00b6\u00b8\u00ba\u00bc\u00be\u00c0\u00c2\u00c4\u00c6\u00c8"+ - "\u00ca\2\17\6\2 ,,\60\60\63\63\6\2\3\3\24\24#%()\n\2\5\5\7\7\n\n\20\20"+ - "\26\26\35\35\37\37\'\'\4\2\23\23**\3\2\65:\3\2QT\3\2GH\4\2UVZZ\3\2ST\4"+ - "\2EFLM\4\2KKNN\4\2DD[e\3\2QR\u0573\2\u00cd\3\2\2\2\4\u00e0\3\2\2\2\6\u00e7"+ - "\3\2\2\2\b\u010f\3\2\2\2\n\u0113\3\2\2\2\f\u0117\3\2\2\2\16\u011b\3\2"+ - "\2\2\20\u011d\3\2\2\2\22\u012c\3\2\2\2\24\u0137\3\2\2\2\26\u013c\3\2\2"+ - "\2\30\u0144\3\2\2\2\32\u0156\3\2\2\2\34\u0161\3\2\2\2\36\u016b\3\2\2\2"+ - " \u0172\3\2\2\2\"\u017d\3\2\2\2$\u0185\3\2\2\2&\u018e\3\2\2\2(\u01a3\3"+ - "\2\2\2*\u01ae\3\2\2\2,\u01b2\3\2\2\2.\u01c5\3\2\2\2\60\u01c8\3\2\2\2\62"+ - "\u01d0\3\2\2\2\64\u01d3\3\2\2\2\66\u01df\3\2\2\28\u01e8\3\2\2\2:\u01ea"+ - "\3\2\2\2<\u01f5\3\2\2\2>\u0202\3\2\2\2@\u0213\3\2\2\2B\u0216\3\2\2\2D"+ - "\u021e\3\2\2\2F\u0223\3\2\2\2H\u022d\3\2\2\2J\u022f\3\2\2\2L\u023f\3\2"+ - "\2\2N\u0251\3\2\2\2P\u0253\3\2\2\2R\u0261\3\2\2\2T\u0263\3\2\2\2V\u0274"+ - "\3\2\2\2X\u0276\3\2\2\2Z\u027e\3\2\2\2\\\u0291\3\2\2\2^\u0296\3\2\2\2"+ - "`\u029f\3\2\2\2b\u02a6\3\2\2\2d\u02a8\3\2\2\2f\u02aa\3\2\2\2h\u02b2\3"+ - "\2\2\2j\u02b4\3\2\2\2l\u02be\3\2\2\2n\u02c0\3\2\2\2p\u02c8\3\2\2\2r\u02cf"+ - "\3\2\2\2t\u02d1\3\2\2\2v\u02e1\3\2\2\2x\u02e6\3\2\2\2z\u02f7\3\2\2\2|"+ - "\u030d\3\2\2\2~\u0311\3\2\2\2\u0080\u0313\3\2\2\2\u0082\u0319\3\2\2\2"+ - "\u0084\u031b\3\2\2\2\u0086\u031e\3\2\2\2\u0088\u032a\3\2\2\2\u008a\u032c"+ - "\3\2\2\2\u008c\u0332\3\2\2\2\u008e\u03a0\3\2\2\2\u0090\u03a2\3\2\2\2\u0092"+ - "\u03af\3\2\2\2\u0094\u03b7\3\2\2\2\u0096\u03ba\3\2\2\2\u0098\u03c1\3\2"+ - "\2\2\u009a\u03cc\3\2\2\2\u009c\u03d5\3\2\2\2\u009e\u03e8\3\2\2\2\u00a0"+ - "\u03f6\3\2\2\2\u00a2\u03fa\3\2\2\2\u00a4\u03ff\3\2\2\2\u00a6\u0407\3\2"+ - "\2\2\u00a8\u0409\3\2\2\2\u00aa\u040d\3\2\2\2\u00ac\u0415\3\2\2\2\u00ae"+ - "\u0417\3\2\2\2\u00b0\u0426\3\2\2\2\u00b2\u0495\3\2\2\2\u00b4\u04a0\3\2"+ - "\2\2\u00b6\u04b1\3\2\2\2\u00b8\u04b3\3\2\2\2\u00ba\u04b9\3\2\2\2\u00bc"+ - "\u04d7\3\2\2\2\u00be\u04db\3\2\2\2\u00c0\u04de\3\2\2\2\u00c2\u04e5\3\2"+ - "\2\2\u00c4\u04ea\3\2\2\2\u00c6\u04f2\3\2\2\2\u00c8\u04f8\3\2\2\2\u00ca"+ - "\u04fa\3\2\2\2\u00cc\u00ce\5\4\3\2\u00cd\u00cc\3\2\2\2\u00cd\u00ce\3\2"+ - "\2\2\u00ce\u00d2\3\2\2\2\u00cf\u00d1\5\6\4\2\u00d0\u00cf\3\2\2\2\u00d1"+ - "\u00d4\3\2\2\2\u00d2\u00d0\3\2\2\2\u00d2\u00d3\3\2\2\2\u00d3\u00d8\3\2"+ - "\2\2\u00d4\u00d2\3\2\2\2\u00d5\u00d7\5\b\5\2\u00d6\u00d5\3\2\2\2\u00d7"+ - "\u00da\3\2\2\2\u00d8\u00d6\3\2\2\2\u00d8\u00d9\3\2\2\2\u00d9\u00db\3\2"+ - "\2\2\u00da\u00d8\3\2\2\2\u00db\u00dc\7\2\2\3\u00dc\3\3\2\2\2\u00dd\u00df"+ - "\5j\66\2\u00de\u00dd\3\2\2\2\u00df\u00e2\3\2\2\2\u00e0\u00de\3\2\2\2\u00e0"+ - "\u00e1\3\2\2\2\u00e1\u00e3\3\2\2\2\u00e2\u00e0\3\2\2\2\u00e3\u00e4\7\""+ - "\2\2\u00e4\u00e5\5f\64\2\u00e5\u00e6\7A\2\2\u00e6\5\3\2\2\2\u00e7\u00e9"+ - "\7\33\2\2\u00e8\u00ea\7(\2\2\u00e9\u00e8\3\2\2\2\u00e9\u00ea\3\2\2\2\u00ea"+ - "\u00eb\3\2\2\2\u00eb\u00ee\5f\64\2\u00ec\u00ed\7C\2\2\u00ed\u00ef\7U\2"+ - "\2\u00ee\u00ec\3\2\2\2\u00ee\u00ef\3\2\2\2\u00ef\u00f0\3\2\2\2\u00f0\u00f1"+ - "\7A\2\2\u00f1\7\3\2\2\2\u00f2\u00f4\5\f\7\2\u00f3\u00f2\3\2\2\2\u00f4"+ - "\u00f7\3\2\2\2\u00f5\u00f3\3\2\2\2\u00f5\u00f6\3\2\2\2\u00f6\u00f8\3\2"+ - "\2\2\u00f7\u00f5\3\2\2\2\u00f8\u0110\5\20\t\2\u00f9\u00fb\5\f\7\2\u00fa"+ - "\u00f9\3\2\2\2\u00fb\u00fe\3\2\2\2\u00fc\u00fa\3\2\2\2\u00fc\u00fd\3\2"+ - "\2\2\u00fd\u00ff\3\2\2\2\u00fe\u00fc\3\2\2\2\u00ff\u0110\5\30\r\2\u0100"+ - "\u0102\5\f\7\2\u0101\u0100\3\2\2\2\u0102\u0105\3\2\2\2\u0103\u0101\3\2"+ - "\2\2\u0103\u0104\3\2\2\2\u0104\u0106\3\2\2\2\u0105\u0103\3\2\2\2\u0106"+ - "\u0110\5 \21\2\u0107\u0109\5\f\7\2\u0108\u0107\3\2\2\2\u0109\u010c\3\2"+ - "\2\2\u010a\u0108\3\2\2\2\u010a\u010b\3\2\2\2\u010b\u010d\3\2\2\2\u010c"+ - "\u010a\3\2\2\2\u010d\u0110\5v<\2\u010e\u0110\7A\2\2\u010f\u00f5\3\2\2"+ - "\2\u010f\u00fc\3\2\2\2\u010f\u0103\3\2\2\2\u010f\u010a\3\2\2\2\u010f\u010e"+ - "\3\2\2\2\u0110\t\3\2\2\2\u0111\u0114\5\f\7\2\u0112\u0114\t\2\2\2\u0113"+ - "\u0111\3\2\2\2\u0113\u0112\3\2\2\2\u0114\13\3\2\2\2\u0115\u0118\5j\66"+ - "\2\u0116\u0118\t\3\2\2\u0117\u0115\3\2\2\2\u0117\u0116\3\2\2\2\u0118\r"+ - "\3\2\2\2\u0119\u011c\7\24\2\2\u011a\u011c\5j\66\2\u011b\u0119\3\2\2\2"+ - "\u011b\u011a\3\2\2\2\u011c\17\3\2\2\2\u011d\u011e\7\13\2\2\u011e\u0120"+ - "\7f\2\2\u011f\u0121\5\22\n\2\u0120\u011f\3\2\2\2\u0120\u0121\3\2\2\2\u0121"+ - "\u0124\3\2\2\2\u0122\u0123\7\23\2\2\u0123\u0125\5N(\2\u0124\u0122\3\2"+ - "\2\2\u0124\u0125\3\2\2\2\u0125\u0128\3\2\2\2\u0126\u0127\7\32\2\2\u0127"+ - "\u0129\5\"\22\2\u0128\u0126\3\2\2\2\u0128\u0129\3\2\2\2\u0129\u012a\3"+ - "\2\2\2\u012a\u012b\5$\23\2\u012b\21\3\2\2\2\u012c\u012d\7F\2\2\u012d\u0132"+ - "\5\24\13\2\u012e\u012f\7B\2\2\u012f\u0131\5\24\13\2\u0130\u012e\3\2\2"+ - "\2\u0131\u0134\3\2\2\2\u0132\u0130\3\2\2\2\u0132\u0133\3\2\2\2\u0133\u0135"+ - "\3\2\2\2\u0134\u0132\3\2\2\2\u0135\u0136\7E\2\2\u0136\23\3\2\2\2\u0137"+ - "\u013a\7f\2\2\u0138\u0139\7\23\2\2\u0139\u013b\5\26\f\2\u013a\u0138\3"+ - "\2\2\2\u013a\u013b\3\2\2\2\u013b\25\3\2\2\2\u013c\u0141\5N(\2\u013d\u013e"+ - "\7W\2\2\u013e\u0140\5N(\2\u013f\u013d\3\2\2\2\u0140\u0143\3\2\2\2\u0141"+ - "\u013f\3\2\2\2\u0141\u0142\3\2\2\2\u0142\27\3\2\2\2\u0143\u0141\3\2\2"+ - "\2\u0144\u0145\7\22\2\2\u0145\u0148\7f\2\2\u0146\u0147\7\32\2\2\u0147"+ - "\u0149\5\"\22\2\u0148\u0146\3\2\2\2\u0148\u0149\3\2\2\2\u0149\u014a\3"+ - "\2\2\2\u014a\u014c\7=\2\2\u014b\u014d\5\32\16\2\u014c\u014b\3\2\2\2\u014c"+ - "\u014d\3\2\2\2\u014d\u014f\3\2\2\2\u014e\u0150\7B\2\2\u014f\u014e\3\2"+ - "\2\2\u014f\u0150\3\2\2\2\u0150\u0152\3\2\2\2\u0151\u0153\5\36\20\2\u0152"+ - "\u0151\3\2\2\2\u0152\u0153\3\2\2\2\u0153\u0154\3\2\2\2\u0154\u0155\7>"+ - "\2\2\u0155\31\3\2\2\2\u0156\u015b\5\34\17\2\u0157\u0158\7B\2\2\u0158\u015a"+ - "\5\34\17\2\u0159\u0157\3\2\2\2\u015a\u015d\3\2\2\2\u015b\u0159\3\2\2\2"+ - "\u015b\u015c\3\2\2\2\u015c\33\3\2\2\2\u015d\u015b\3\2\2\2\u015e\u0160"+ - "\5j\66\2\u015f\u015e\3\2\2\2\u0160\u0163\3\2\2\2\u0161\u015f\3\2\2\2\u0161"+ - "\u0162\3\2\2\2\u0162\u0164\3\2\2\2\u0163\u0161\3\2\2\2\u0164\u0166\7f"+ - "\2\2\u0165\u0167\5\u00caf\2\u0166\u0165\3\2\2\2\u0166\u0167\3\2\2\2\u0167"+ - "\u0169\3\2\2\2\u0168\u016a\5$\23\2\u0169\u0168\3\2\2\2\u0169\u016a\3\2"+ - "\2\2\u016a\35\3\2\2\2\u016b\u016f\7A\2\2\u016c\u016e\5(\25\2\u016d\u016c"+ - "\3\2\2\2\u016e\u0171\3\2\2\2\u016f\u016d\3\2\2\2\u016f\u0170\3\2\2\2\u0170"+ - "\37\3\2\2\2\u0171\u016f\3\2\2\2\u0172\u0173\7\36\2\2\u0173\u0175\7f\2"+ - "\2\u0174\u0176\5\22\n\2\u0175\u0174\3\2\2\2\u0175\u0176\3\2\2\2\u0176"+ - "\u0179\3\2\2\2\u0177\u0178\7\23\2\2\u0178\u017a\5\"\22\2\u0179\u0177\3"+ - "\2\2\2\u0179\u017a\3\2\2\2\u017a\u017b\3\2\2\2\u017b\u017c\5&\24\2\u017c"+ - "!\3\2\2\2\u017d\u0182\5N(\2\u017e\u017f\7B\2\2\u017f\u0181\5N(\2\u0180"+ - "\u017e\3\2\2\2\u0181\u0184\3\2\2\2\u0182\u0180\3\2\2\2\u0182\u0183\3\2"+ - "\2\2\u0183#\3\2\2\2\u0184\u0182\3\2\2\2\u0185\u0189\7=\2\2\u0186\u0188"+ - "\5(\25\2\u0187\u0186\3\2\2\2\u0188\u018b\3\2\2\2\u0189\u0187\3\2\2\2\u0189"+ - "\u018a\3\2\2\2\u018a\u018c\3\2\2\2\u018b\u0189\3\2\2\2\u018c\u018d\7>"+ - "\2\2\u018d%\3\2\2\2\u018e\u0192\7=\2\2\u018f\u0191\5\66\34\2\u0190\u018f"+ - "\3\2\2\2\u0191\u0194\3\2\2\2\u0192\u0190\3\2\2\2\u0192\u0193\3\2\2\2\u0193"+ - "\u0195\3\2\2\2\u0194\u0192\3\2\2\2\u0195\u0196\7>\2\2\u0196\'\3\2\2\2"+ - "\u0197\u01a4\7A\2\2\u0198\u019a\7(\2\2\u0199\u0198\3\2\2\2\u0199\u019a"+ - "\3\2\2\2\u019a\u019b\3\2\2\2\u019b\u01a4\5\u0086D\2\u019c\u019e\5\n\6"+ - "\2\u019d\u019c\3\2\2\2\u019e\u01a1\3\2\2\2\u019f\u019d\3\2\2\2\u019f\u01a0"+ - "\3\2\2\2\u01a0\u01a2\3\2\2\2\u01a1\u019f\3\2\2\2\u01a2\u01a4\5*\26\2\u01a3"+ - "\u0197\3\2\2\2\u01a3\u0199\3\2\2\2\u01a3\u019f\3\2\2\2\u01a4)\3\2\2\2"+ - "\u01a5\u01af\5,\27\2\u01a6\u01af\5.\30\2\u01a7\u01af\5\64\33\2\u01a8\u01af"+ - "\5\60\31\2\u01a9\u01af\5\62\32\2\u01aa\u01af\5 \21\2\u01ab\u01af\5v<\2"+ - "\u01ac\u01af\5\20\t\2\u01ad\u01af\5\30\r\2\u01ae\u01a5\3\2\2\2\u01ae\u01a6"+ - "\3\2\2\2\u01ae\u01a7\3\2\2\2\u01ae\u01a8\3\2\2\2\u01ae\u01a9\3\2\2\2\u01ae"+ - "\u01aa\3\2\2\2\u01ae\u01ab\3\2\2\2\u01ae\u01ac\3\2\2\2\u01ae\u01ad\3\2"+ - "\2\2\u01af+\3\2\2\2\u01b0\u01b3\5N(\2\u01b1\u01b3\7\62\2\2\u01b2\u01b0"+ - "\3\2\2\2\u01b2\u01b1\3\2\2\2\u01b3\u01b4\3\2\2\2\u01b4\u01b5\7f\2\2\u01b5"+ - "\u01ba\5Z.\2\u01b6\u01b7\7?\2\2\u01b7\u01b9\7@\2\2\u01b8\u01b6\3\2\2\2"+ - "\u01b9\u01bc\3\2\2\2\u01ba\u01b8\3\2\2\2\u01ba\u01bb\3\2\2\2\u01bb\u01bf"+ - "\3\2\2\2\u01bc\u01ba\3\2\2\2\u01bd\u01be\7/\2\2\u01be\u01c0\5X-\2\u01bf"+ - "\u01bd\3\2\2\2\u01bf\u01c0\3\2\2\2\u01c0\u01c3\3\2\2\2\u01c1\u01c4\5b"+ - "\62\2\u01c2\u01c4\7A\2\2\u01c3\u01c1\3\2\2\2\u01c3\u01c2\3\2\2\2\u01c4"+ - "-\3\2\2\2\u01c5\u01c6\5\22\n\2\u01c6\u01c7\5,\27\2\u01c7/\3\2\2\2\u01c8"+ - "\u01c9\7f\2\2\u01c9\u01cc\5Z.\2\u01ca\u01cb\7/\2\2\u01cb\u01cd\5X-\2\u01cc"+ - "\u01ca\3\2\2\2\u01cc\u01cd\3\2\2\2\u01cd\u01ce\3\2\2\2\u01ce\u01cf\5d"+ - "\63\2\u01cf\61\3\2\2\2\u01d0\u01d1\5\22\n\2\u01d1\u01d2\5\60\31\2\u01d2"+ - "\63\3\2\2\2\u01d3\u01d4\5N(\2\u01d4\u01d5\5B\"\2\u01d5\u01d6\7A\2\2\u01d6"+ - "\65\3\2\2\2\u01d7\u01d9\5\n\6\2\u01d8\u01d7\3\2\2\2\u01d9\u01dc\3\2\2"+ - "\2\u01da\u01d8\3\2\2\2\u01da\u01db\3\2\2\2\u01db\u01dd\3\2\2\2\u01dc\u01da"+ - "\3\2\2\2\u01dd\u01e0\58\35\2\u01de\u01e0\7A\2\2\u01df\u01da\3\2\2\2\u01df"+ - "\u01de\3\2\2\2\u01e0\67\3\2\2\2\u01e1\u01e9\5:\36\2\u01e2\u01e9\5> \2"+ - "\u01e3\u01e9\5@!\2\u01e4\u01e9\5 \21\2\u01e5\u01e9\5v<\2\u01e6\u01e9\5"+ - "\20\t\2\u01e7\u01e9\5\30\r\2\u01e8\u01e1\3\2\2\2\u01e8\u01e2\3\2\2\2\u01e8"+ - "\u01e3\3\2\2\2\u01e8\u01e4\3\2\2\2\u01e8\u01e5\3\2\2\2\u01e8\u01e6\3\2"+ - "\2\2\u01e8\u01e7\3\2\2\2\u01e99\3\2\2\2\u01ea\u01eb\5N(\2\u01eb\u01f0"+ - "\5<\37\2\u01ec\u01ed\7B\2\2\u01ed\u01ef\5<\37\2\u01ee\u01ec\3\2\2\2\u01ef"+ - "\u01f2\3\2\2\2\u01f0\u01ee\3\2\2\2\u01f0\u01f1\3\2\2\2\u01f1\u01f3\3\2"+ - "\2\2\u01f2\u01f0\3\2\2\2\u01f3\u01f4\7A\2\2\u01f4;\3\2\2\2\u01f5\u01fa"+ - "\7f\2\2\u01f6\u01f7\7?\2\2\u01f7\u01f9\7@\2\2\u01f8\u01f6\3\2\2\2\u01f9"+ - "\u01fc\3\2\2\2\u01fa\u01f8\3\2\2\2\u01fa\u01fb\3\2\2\2\u01fb\u01fd\3\2"+ - "\2\2\u01fc\u01fa\3\2\2\2\u01fd\u01fe\7D\2\2\u01fe\u01ff\5H%\2\u01ff=\3"+ - "\2\2\2\u0200\u0203\5N(\2\u0201\u0203\7\62\2\2\u0202\u0200\3\2\2\2\u0202"+ - "\u0201\3\2\2\2\u0203\u0204\3\2\2\2\u0204\u0205\7f\2\2\u0205\u020a\5Z."+ - "\2\u0206\u0207\7?\2\2\u0207\u0209\7@\2\2\u0208\u0206\3\2\2\2\u0209\u020c"+ - "\3\2\2\2\u020a\u0208\3\2\2\2\u020a\u020b\3\2\2\2\u020b\u020f\3\2\2\2\u020c"+ - "\u020a\3\2\2\2\u020d\u020e\7/\2\2\u020e\u0210\5X-\2\u020f\u020d\3\2\2"+ - "\2\u020f\u0210\3\2\2\2\u0210\u0211\3\2\2\2\u0211\u0212\7A\2\2\u0212?\3"+ - "\2\2\2\u0213\u0214\5\22\n\2\u0214\u0215\5> \2\u0215A\3\2\2\2\u0216\u021b"+ - "\5D#\2\u0217\u0218\7B\2\2\u0218\u021a\5D#\2\u0219\u0217\3\2\2\2\u021a"+ - "\u021d\3\2\2\2\u021b\u0219\3\2\2\2\u021b\u021c\3\2\2\2\u021cC\3\2\2\2"+ - "\u021d\u021b\3\2\2\2\u021e\u0221\5F$\2\u021f\u0220\7D\2\2\u0220\u0222"+ - "\5H%\2\u0221\u021f\3\2\2\2\u0221\u0222\3\2\2\2\u0222E\3\2\2\2\u0223\u0228"+ - "\7f\2\2\u0224\u0225\7?\2\2\u0225\u0227\7@\2\2\u0226\u0224\3\2\2\2\u0227"+ - "\u022a\3\2\2\2\u0228\u0226\3\2\2\2\u0228\u0229\3\2\2\2\u0229G\3\2\2\2"+ - "\u022a\u0228\3\2\2\2\u022b\u022e\5J&\2\u022c\u022e\5\u00b0Y\2\u022d\u022b"+ - "\3\2\2\2\u022d\u022c\3\2\2\2\u022eI\3\2\2\2\u022f\u023b\7=\2\2\u0230\u0235"+ - "\5H%\2\u0231\u0232\7B\2\2\u0232\u0234\5H%\2\u0233\u0231\3\2\2\2\u0234"+ - "\u0237\3\2\2\2\u0235\u0233\3\2\2\2\u0235\u0236\3\2\2\2\u0236\u0239\3\2"+ - "\2\2\u0237\u0235\3\2\2\2\u0238\u023a\7B\2\2\u0239\u0238\3\2\2\2\u0239"+ - "\u023a\3\2\2\2\u023a\u023c\3\2\2\2\u023b\u0230\3\2\2\2\u023b\u023c\3\2"+ - "\2\2\u023c\u023d\3\2\2\2\u023d\u023e\7>\2\2\u023eK\3\2\2\2\u023f\u0240"+ - "\7f\2\2\u0240M\3\2\2\2\u0241\u0246\5P)\2\u0242\u0243\7?\2\2\u0243\u0245"+ - "\7@\2\2\u0244\u0242\3\2\2\2\u0245\u0248\3\2\2\2\u0246\u0244\3\2\2\2\u0246"+ - "\u0247\3\2\2\2\u0247\u0252\3\2\2\2\u0248\u0246\3\2\2\2\u0249\u024e\5R"+ - "*\2\u024a\u024b\7?\2\2\u024b\u024d\7@\2\2\u024c\u024a\3\2\2\2\u024d\u0250"+ - "\3\2\2\2\u024e\u024c\3\2\2\2\u024e\u024f\3\2\2\2\u024f\u0252\3\2\2\2\u0250"+ - "\u024e\3\2\2\2\u0251\u0241\3\2\2\2\u0251\u0249\3\2\2\2\u0252O\3\2\2\2"+ - "\u0253\u0255\7f\2\2\u0254\u0256\5T+\2\u0255\u0254\3\2\2\2\u0255\u0256"+ - "\3\2\2\2\u0256\u025e\3\2\2\2\u0257\u0258\7C\2\2\u0258\u025a\7f\2\2\u0259"+ - "\u025b\5T+\2\u025a\u0259\3\2\2\2\u025a\u025b\3\2\2\2\u025b\u025d\3\2\2"+ - "\2\u025c\u0257\3\2\2\2\u025d\u0260\3\2\2\2\u025e\u025c\3\2\2\2\u025e\u025f"+ - "\3\2\2\2\u025fQ\3\2\2\2\u0260\u025e\3\2\2\2\u0261\u0262\t\4\2\2\u0262"+ - "S\3\2\2\2\u0263\u0264\7F\2\2\u0264\u0269\5V,\2\u0265\u0266\7B\2\2\u0266"+ - "\u0268\5V,\2\u0267\u0265\3\2\2\2\u0268\u026b\3\2\2\2\u0269\u0267\3\2\2"+ - "\2\u0269\u026a\3\2\2\2\u026a\u026c\3\2\2\2\u026b\u0269\3\2\2\2\u026c\u026d"+ - "\7E\2\2\u026dU\3\2\2\2\u026e\u0275\5N(\2\u026f\u0272\7I\2\2\u0270\u0271"+ - "\t\5\2\2\u0271\u0273\5N(\2\u0272\u0270\3\2\2\2\u0272\u0273\3\2\2\2\u0273"+ - "\u0275\3\2\2\2\u0274\u026e\3\2\2\2\u0274\u026f\3\2\2\2\u0275W\3\2\2\2"+ - "\u0276\u027b\5f\64\2\u0277\u0278\7B\2\2\u0278\u027a\5f\64\2\u0279\u0277"+ - "\3\2\2\2\u027a\u027d\3\2\2\2\u027b\u0279\3\2\2\2\u027b\u027c\3\2\2\2\u027c"+ - "Y\3\2\2\2\u027d\u027b\3\2\2\2\u027e\u0280\7;\2\2\u027f\u0281\5\\/\2\u0280"+ - "\u027f\3\2\2\2\u0280\u0281\3\2\2\2\u0281\u0282\3\2\2\2\u0282\u0283\7<"+ - "\2\2\u0283[\3\2\2\2\u0284\u0289\5^\60\2\u0285\u0286\7B\2\2\u0286\u0288"+ - "\5^\60\2\u0287\u0285\3\2\2\2\u0288\u028b\3\2\2\2\u0289\u0287\3\2\2\2\u0289"+ - "\u028a\3\2\2\2\u028a\u028e\3\2\2\2\u028b\u0289\3\2\2\2\u028c\u028d\7B"+ - "\2\2\u028d\u028f\5`\61\2\u028e\u028c\3\2\2\2\u028e\u028f\3\2\2\2\u028f"+ - "\u0292\3\2\2\2\u0290\u0292\5`\61\2\u0291\u0284\3\2\2\2\u0291\u0290\3\2"+ - "\2\2\u0292]\3\2\2\2\u0293\u0295\5\16\b\2\u0294\u0293\3\2\2\2\u0295\u0298"+ - "\3\2\2\2\u0296\u0294\3\2\2\2\u0296\u0297\3\2\2\2\u0297\u0299\3\2\2\2\u0298"+ - "\u0296\3\2\2\2\u0299\u029a\5N(\2\u029a\u029b\5F$\2\u029b_\3\2\2\2\u029c"+ - "\u029e\5\16\b\2\u029d\u029c\3\2\2\2\u029e\u02a1\3\2\2\2\u029f\u029d\3"+ - "\2\2\2\u029f\u02a0\3\2\2\2\u02a0\u02a2\3\2\2\2\u02a1\u029f\3\2\2\2\u02a2"+ - "\u02a3\5N(\2\u02a3\u02a4\7h\2\2\u02a4\u02a5\5F$\2\u02a5a\3\2\2\2\u02a6"+ - "\u02a7\5\u0086D\2\u02a7c\3\2\2\2\u02a8\u02a9\5\u0086D\2\u02a9e\3\2\2\2"+ - "\u02aa\u02af\7f\2\2\u02ab\u02ac\7C\2\2\u02ac\u02ae\7f\2\2\u02ad\u02ab"+ - "\3\2\2\2\u02ae\u02b1\3\2\2\2\u02af\u02ad\3\2\2\2\u02af\u02b0\3\2\2\2\u02b0"+ - "g\3\2\2\2\u02b1\u02af\3\2\2\2\u02b2\u02b3\t\6\2\2\u02b3i\3\2\2\2\u02b4"+ - "\u02b5\7g\2\2\u02b5\u02bc\5l\67\2\u02b6\u02b9\7;\2\2\u02b7\u02ba\5n8\2"+ - "\u02b8\u02ba\5r:\2\u02b9\u02b7\3\2\2\2\u02b9\u02b8\3\2\2\2\u02b9\u02ba"+ - "\3\2\2\2\u02ba\u02bb\3\2\2\2\u02bb\u02bd\7<\2\2\u02bc\u02b6\3\2\2\2\u02bc"+ - "\u02bd\3\2\2\2\u02bdk\3\2\2\2\u02be\u02bf\5f\64\2\u02bfm\3\2\2\2\u02c0"+ - "\u02c5\5p9\2\u02c1\u02c2\7B\2\2\u02c2\u02c4\5p9\2\u02c3\u02c1\3\2\2\2"+ - "\u02c4\u02c7\3\2\2\2\u02c5\u02c3\3\2\2\2\u02c5\u02c6\3\2\2\2\u02c6o\3"+ - "\2\2\2\u02c7\u02c5\3\2\2\2\u02c8\u02c9\7f\2\2\u02c9\u02ca\7D\2\2\u02ca"+ - "\u02cb\5r:\2\u02cbq\3\2\2\2\u02cc\u02d0\5\u00b0Y\2\u02cd\u02d0\5j\66\2"+ - "\u02ce\u02d0\5t;\2\u02cf\u02cc\3\2\2\2\u02cf\u02cd\3\2\2\2\u02cf\u02ce"+ - "\3\2\2\2\u02d0s\3\2\2\2\u02d1\u02da\7=\2\2\u02d2\u02d7\5r:\2\u02d3\u02d4"+ - "\7B\2\2\u02d4\u02d6\5r:\2\u02d5\u02d3\3\2\2\2\u02d6\u02d9\3\2\2\2\u02d7"+ - "\u02d5\3\2\2\2\u02d7\u02d8\3\2\2\2\u02d8\u02db\3\2\2\2\u02d9\u02d7\3\2"+ - "\2\2\u02da\u02d2\3\2\2\2\u02da\u02db\3\2\2\2\u02db\u02dd\3\2\2\2\u02dc"+ - "\u02de\7B\2\2\u02dd\u02dc\3\2\2\2\u02dd\u02de\3\2\2\2\u02de\u02df\3\2"+ - "\2\2\u02df\u02e0\7>\2\2\u02e0u\3\2\2\2\u02e1\u02e2\7g\2\2\u02e2\u02e3"+ - "\7\36\2\2\u02e3\u02e4\7f\2\2\u02e4\u02e5\5x=\2\u02e5w\3\2\2\2\u02e6\u02ea"+ - "\7=\2\2\u02e7\u02e9\5z>\2\u02e8\u02e7\3\2\2\2\u02e9\u02ec\3\2\2\2\u02ea"+ - "\u02e8\3\2\2\2\u02ea\u02eb\3\2\2\2\u02eb\u02ed\3\2\2\2\u02ec\u02ea\3\2"+ - "\2\2\u02ed\u02ee\7>\2\2\u02eey\3\2\2\2\u02ef\u02f1\5\n\6\2\u02f0\u02ef"+ - "\3\2\2\2\u02f1\u02f4\3\2\2\2\u02f2\u02f0\3\2\2\2\u02f2\u02f3\3\2\2\2\u02f3"+ - "\u02f5\3\2\2\2\u02f4\u02f2\3\2\2\2\u02f5\u02f8\5|?\2\u02f6\u02f8\7A\2"+ - "\2\u02f7\u02f2\3\2\2\2\u02f7\u02f6\3\2\2\2\u02f8{\3\2\2\2\u02f9\u02fa"+ - "\5N(\2\u02fa\u02fb\5~@\2\u02fb\u02fc\7A\2\2\u02fc\u030e\3\2\2\2\u02fd"+ - "\u02ff\5\20\t\2\u02fe\u0300\7A\2\2\u02ff\u02fe\3\2\2\2\u02ff\u0300\3\2"+ - "\2\2\u0300\u030e\3\2\2\2\u0301\u0303\5 \21\2\u0302\u0304\7A\2\2\u0303"+ - "\u0302\3\2\2\2\u0303\u0304\3\2\2\2\u0304\u030e\3\2\2\2\u0305\u0307\5\30"+ - "\r\2\u0306\u0308\7A\2\2\u0307\u0306\3\2\2\2\u0307\u0308\3\2\2\2\u0308"+ - "\u030e\3\2\2\2\u0309\u030b\5v<\2\u030a\u030c\7A\2\2\u030b\u030a\3\2\2"+ - "\2\u030b\u030c\3\2\2\2\u030c\u030e\3\2\2\2\u030d\u02f9\3\2\2\2\u030d\u02fd"+ - "\3\2\2\2\u030d\u0301\3\2\2\2\u030d\u0305\3\2\2\2\u030d\u0309\3\2\2\2\u030e"+ - "}\3\2\2\2\u030f\u0312\5\u0080A\2\u0310\u0312\5\u0082B\2\u0311\u030f\3"+ - "\2\2\2\u0311\u0310\3\2\2\2\u0312\177\3\2\2\2\u0313\u0314\7f\2\2\u0314"+ - "\u0315\7;\2\2\u0315\u0317\7<\2\2\u0316\u0318\5\u0084C\2\u0317\u0316\3"+ - "\2\2\2\u0317\u0318\3\2\2\2\u0318\u0081\3\2\2\2\u0319\u031a\5B\"\2\u031a"+ - "\u0083\3\2\2\2\u031b\u031c\7\16\2\2\u031c\u031d\5r:\2\u031d\u0085\3\2"+ - "\2\2\u031e\u0322\7=\2\2\u031f\u0321\5\u0088E\2\u0320\u031f\3\2\2\2\u0321"+ - "\u0324\3\2\2\2\u0322\u0320\3\2\2\2\u0322\u0323\3\2\2\2\u0323\u0325\3\2"+ - "\2\2\u0324\u0322\3\2\2\2\u0325\u0326\7>\2\2\u0326\u0087\3\2\2\2\u0327"+ - "\u032b\5\u008aF\2\u0328\u032b\5\u008eH\2\u0329\u032b\5\b\5\2\u032a\u0327"+ - "\3\2\2\2\u032a\u0328\3\2\2\2\u032a\u0329\3\2\2\2\u032b\u0089\3\2\2\2\u032c"+ - "\u032d\5\u008cG\2\u032d\u032e\7A\2\2\u032e\u008b\3\2\2\2\u032f\u0331\5"+ - "\16\b\2\u0330\u032f\3\2\2\2\u0331\u0334\3\2\2\2\u0332\u0330\3\2\2\2\u0332"+ - "\u0333\3\2\2\2\u0333\u0335\3\2\2\2\u0334\u0332\3\2\2\2\u0335\u0336\5N"+ - "(\2\u0336\u0337\5B\"\2\u0337\u008d\3\2\2\2\u0338\u03a1\5\u0086D\2\u0339"+ - "\u033a\7\4\2\2\u033a\u033d\5\u00b0Y\2\u033b\u033c\7J\2\2\u033c\u033e\5"+ - "\u00b0Y\2\u033d\u033b\3\2\2\2\u033d\u033e\3\2\2\2\u033e\u033f\3\2\2\2"+ - "\u033f\u0340\7A\2\2\u0340\u03a1\3\2\2\2\u0341\u0342\7\30\2\2\u0342\u0343"+ - "\5\u00a8U\2\u0343\u0346\5\u008eH\2\u0344\u0345\7\21\2\2\u0345\u0347\5"+ - "\u008eH\2\u0346\u0344\3\2\2\2\u0346\u0347\3\2\2\2\u0347\u03a1\3\2\2\2"+ - "\u0348\u0349\7\27\2\2\u0349\u034a\7;\2\2\u034a\u034b\5\u00a0Q\2\u034b"+ - "\u034c\7<\2\2\u034c\u034d\5\u008eH\2\u034d\u03a1\3\2\2\2\u034e\u034f\7"+ - "\64\2\2\u034f\u0350\5\u00a8U\2\u0350\u0351\5\u008eH\2\u0351\u03a1\3\2"+ - "\2\2\u0352\u0353\7\17\2\2\u0353\u0354\5\u008eH\2\u0354\u0355\7\64\2\2"+ - "\u0355\u0356\5\u00a8U\2\u0356\u0357\7A\2\2\u0357\u03a1\3\2\2\2\u0358\u0359"+ - "\7\61\2\2\u0359\u0363\5\u0086D\2\u035a\u035c\5\u0090I\2\u035b\u035a\3"+ - "\2\2\2\u035c\u035d\3\2\2\2\u035d\u035b\3\2\2\2\u035d\u035e\3\2\2\2\u035e"+ - "\u0360\3\2\2\2\u035f\u0361\5\u0094K\2\u0360\u035f\3\2\2\2\u0360\u0361"+ - "\3\2\2\2\u0361\u0364\3\2\2\2\u0362\u0364\5\u0094K\2\u0363\u035b\3\2\2"+ - "\2\u0363\u0362\3\2\2\2\u0364\u03a1\3\2\2\2\u0365\u0366\7\61\2\2\u0366"+ - "\u0367\5\u0096L\2\u0367\u036b\5\u0086D\2\u0368\u036a\5\u0090I\2\u0369"+ - "\u0368\3\2\2\2\u036a\u036d\3\2\2\2\u036b\u0369\3\2\2\2\u036b\u036c\3\2"+ - "\2\2\u036c\u036f\3\2\2\2\u036d\u036b\3\2\2\2\u036e\u0370\5\u0094K\2\u036f"+ - "\u036e\3\2\2\2\u036f\u0370\3\2\2\2\u0370\u03a1\3\2\2\2\u0371\u0372\7+"+ - "\2\2\u0372\u0373\5\u00a8U\2\u0373\u0377\7=\2\2\u0374\u0376\5\u009cO\2"+ - "\u0375\u0374\3\2\2\2\u0376\u0379\3\2\2\2\u0377\u0375\3\2\2\2\u0377\u0378"+ - "\3\2\2\2\u0378\u037d\3\2\2\2\u0379\u0377\3\2\2\2\u037a\u037c\5\u009eP"+ - "\2\u037b\u037a\3\2\2\2\u037c\u037f\3\2\2\2\u037d\u037b\3\2\2\2\u037d\u037e"+ - "\3\2\2\2\u037e\u0380\3\2\2\2\u037f\u037d\3\2\2\2\u0380\u0381\7>\2\2\u0381"+ - "\u03a1\3\2\2\2\u0382\u0383\7,\2\2\u0383\u0384\5\u00a8U\2\u0384\u0385\5"+ - "\u0086D\2\u0385\u03a1\3\2\2\2\u0386\u0388\7&\2\2\u0387\u0389\5\u00b0Y"+ - "\2\u0388\u0387\3\2\2\2\u0388\u0389\3\2\2\2\u0389\u038a\3\2\2\2\u038a\u03a1"+ - "\7A\2\2\u038b\u038c\7.\2\2\u038c\u038d\5\u00b0Y\2\u038d\u038e\7A\2\2\u038e"+ - "\u03a1\3\2\2\2\u038f\u0391\7\6\2\2\u0390\u0392\7f\2\2\u0391\u0390\3\2"+ - "\2\2\u0391\u0392\3\2\2\2\u0392\u0393\3\2\2\2\u0393\u03a1\7A\2\2\u0394"+ - "\u0396\7\r\2\2\u0395\u0397\7f\2\2\u0396\u0395\3\2\2\2\u0396\u0397\3\2"+ - "\2\2\u0397\u0398\3\2\2\2\u0398\u03a1\7A\2\2\u0399\u03a1\7A\2\2\u039a\u039b"+ - "\5\u00acW\2\u039b\u039c\7A\2\2\u039c\u03a1\3\2\2\2\u039d\u039e\7f\2\2"+ - "\u039e\u039f\7J\2\2\u039f\u03a1\5\u008eH\2\u03a0\u0338\3\2\2\2\u03a0\u0339"+ - "\3\2\2\2\u03a0\u0341\3\2\2\2\u03a0\u0348\3\2\2\2\u03a0\u034e\3\2\2\2\u03a0"+ - "\u0352\3\2\2\2\u03a0\u0358\3\2\2\2\u03a0\u0365\3\2\2\2\u03a0\u0371\3\2"+ - "\2\2\u03a0\u0382\3\2\2\2\u03a0\u0386\3\2\2\2\u03a0\u038b\3\2\2\2\u03a0"+ - "\u038f\3\2\2\2\u03a0\u0394\3\2\2\2\u03a0\u0399\3\2\2\2\u03a0\u039a\3\2"+ - "\2\2\u03a0\u039d\3\2\2\2\u03a1\u008f\3\2\2\2\u03a2\u03a3\7\t\2\2\u03a3"+ - "\u03a7\7;\2\2\u03a4\u03a6\5\16\b\2\u03a5\u03a4\3\2\2\2\u03a6\u03a9\3\2"+ - "\2\2\u03a7\u03a5\3\2\2\2\u03a7\u03a8\3\2\2\2\u03a8\u03aa\3\2\2\2\u03a9"+ - "\u03a7\3\2\2\2\u03aa\u03ab\5\u0092J\2\u03ab\u03ac\7f\2\2\u03ac\u03ad\7"+ - "<\2\2\u03ad\u03ae\5\u0086D\2\u03ae\u0091\3\2\2\2\u03af\u03b4\5f\64\2\u03b0"+ - "\u03b1\7X\2\2\u03b1\u03b3\5f\64\2\u03b2\u03b0\3\2\2\2\u03b3\u03b6\3\2"+ - "\2\2\u03b4\u03b2\3\2\2\2\u03b4\u03b5\3\2\2\2\u03b5\u0093\3\2\2\2\u03b6"+ - "\u03b4\3\2\2\2\u03b7\u03b8\7\25\2\2\u03b8\u03b9\5\u0086D\2\u03b9\u0095"+ - "\3\2\2\2\u03ba\u03bb\7;\2\2\u03bb\u03bd\5\u0098M\2\u03bc\u03be\7A\2\2"+ - "\u03bd\u03bc\3\2\2\2\u03bd\u03be\3\2\2\2\u03be\u03bf\3\2\2\2\u03bf\u03c0"+ - "\7<\2\2\u03c0\u0097\3\2\2\2\u03c1\u03c6\5\u009aN\2\u03c2\u03c3\7A\2\2"+ - "\u03c3\u03c5\5\u009aN\2\u03c4\u03c2\3\2\2\2\u03c5\u03c8\3\2\2\2\u03c6"+ - "\u03c4\3\2\2\2\u03c6\u03c7\3\2\2\2\u03c7\u0099\3\2\2\2\u03c8\u03c6\3\2"+ - "\2\2\u03c9\u03cb\5\16\b\2\u03ca\u03c9\3\2\2\2\u03cb\u03ce\3\2\2\2\u03cc"+ - "\u03ca\3\2\2\2\u03cc\u03cd\3\2\2\2\u03cd\u03cf\3\2\2\2\u03ce\u03cc\3\2"+ - "\2\2\u03cf\u03d0\5P)\2\u03d0\u03d1\5F$\2\u03d1\u03d2\7D\2\2\u03d2\u03d3"+ - "\5\u00b0Y\2\u03d3\u009b\3\2\2\2\u03d4\u03d6\5\u009eP\2\u03d5\u03d4\3\2"+ - "\2\2\u03d6\u03d7\3\2\2\2\u03d7\u03d5\3\2\2\2\u03d7\u03d8\3\2\2\2\u03d8"+ - "\u03da\3\2\2\2\u03d9\u03db\5\u0088E\2\u03da\u03d9\3\2\2\2\u03db\u03dc"+ - "\3\2\2\2\u03dc\u03da\3\2\2\2\u03dc\u03dd\3\2\2\2\u03dd\u009d\3\2\2\2\u03de"+ - "\u03df\7\b\2\2\u03df\u03e0\5\u00aeX\2\u03e0\u03e1\7J\2\2\u03e1\u03e9\3"+ - "\2\2\2\u03e2\u03e3\7\b\2\2\u03e3\u03e4\5L\'\2\u03e4\u03e5\7J\2\2\u03e5"+ - "\u03e9\3\2\2\2\u03e6\u03e7\7\16\2\2\u03e7\u03e9\7J\2\2\u03e8\u03de\3\2"+ - "\2\2\u03e8\u03e2\3\2\2\2\u03e8\u03e6\3\2\2\2\u03e9\u009f\3\2\2\2\u03ea"+ - "\u03f7\5\u00a4S\2\u03eb\u03ed\5\u00a2R\2\u03ec\u03eb\3\2\2\2\u03ec\u03ed"+ - "\3\2\2\2\u03ed\u03ee\3\2\2\2\u03ee\u03f0\7A\2\2\u03ef\u03f1\5\u00b0Y\2"+ - "\u03f0\u03ef\3\2\2\2\u03f0\u03f1\3\2\2\2\u03f1\u03f2\3\2\2\2\u03f2\u03f4"+ - "\7A\2\2\u03f3\u03f5\5\u00a6T\2\u03f4\u03f3\3\2\2\2\u03f4\u03f5\3\2\2\2"+ - "\u03f5\u03f7\3\2\2\2\u03f6\u03ea\3\2\2\2\u03f6\u03ec\3\2\2\2\u03f7\u00a1"+ - "\3\2\2\2\u03f8\u03fb\5\u008cG\2\u03f9\u03fb\5\u00aaV\2\u03fa\u03f8\3\2"+ - "\2\2\u03fa\u03f9\3\2\2\2\u03fb\u00a3\3\2\2\2\u03fc\u03fe\5\16\b\2\u03fd"+ - "\u03fc\3\2\2\2\u03fe\u0401\3\2\2\2\u03ff\u03fd\3\2\2\2\u03ff\u0400\3\2"+ - "\2\2\u0400\u0402\3\2\2\2\u0401\u03ff\3\2\2\2\u0402\u0403\5N(\2\u0403\u0404"+ - "\7f\2\2\u0404\u0405\7J\2\2\u0405\u0406\5\u00b0Y\2\u0406\u00a5\3\2\2\2"+ - "\u0407\u0408\5\u00aaV\2\u0408\u00a7\3\2\2\2\u0409\u040a\7;\2\2\u040a\u040b"+ - "\5\u00b0Y\2\u040b\u040c\7<\2\2\u040c\u00a9\3\2\2\2\u040d\u0412\5\u00b0"+ - "Y\2\u040e\u040f\7B\2\2\u040f\u0411\5\u00b0Y\2\u0410\u040e\3\2\2\2\u0411"+ - "\u0414\3\2\2\2\u0412\u0410\3\2\2\2\u0412\u0413\3\2\2\2\u0413\u00ab\3\2"+ - "\2\2\u0414\u0412\3\2\2\2\u0415\u0416\5\u00b0Y\2\u0416\u00ad\3\2\2\2\u0417"+ - "\u0418\5\u00b0Y\2\u0418\u00af\3\2\2\2\u0419\u041a\bY\1\2\u041a\u041b\7"+ - ";\2\2\u041b\u041c\5N(\2\u041c\u041d\7<\2\2\u041d\u041e\5\u00b0Y\23\u041e"+ - "\u0427\3\2\2\2\u041f\u0420\t\7\2\2\u0420\u0427\5\u00b0Y\21\u0421\u0422"+ - "\t\b\2\2\u0422\u0427\5\u00b0Y\20\u0423\u0427\5\u00b2Z\2\u0424\u0425\7"+ - "!\2\2\u0425\u0427\5\u00b4[\2\u0426\u0419\3\2\2\2\u0426\u041f\3\2\2\2\u0426"+ - "\u0421\3\2\2\2\u0426\u0423\3\2\2\2\u0426\u0424\3\2\2\2\u0427\u047d\3\2"+ - "\2\2\u0428\u0429\f\17\2\2\u0429\u042a\t\t\2\2\u042a\u047c\5\u00b0Y\20"+ - "\u042b\u042c\f\16\2\2\u042c\u042d\t\n\2\2\u042d\u047c\5\u00b0Y\17\u042e"+ - "\u0436\f\r\2\2\u042f\u0430\7F\2\2\u0430\u0437\7F\2\2\u0431\u0432\7E\2"+ - "\2\u0432\u0433\7E\2\2\u0433\u0437\7E\2\2\u0434\u0435\7E\2\2\u0435\u0437"+ - "\7E\2\2\u0436\u042f\3\2\2\2\u0436\u0431\3\2\2\2\u0436\u0434\3\2\2\2\u0437"+ - "\u0438\3\2\2\2\u0438\u047c\5\u00b0Y\16\u0439\u043a\f\f\2\2\u043a\u043b"+ - "\t\13\2\2\u043b\u047c\5\u00b0Y\r\u043c\u043d\f\n\2\2\u043d\u043e\t\f\2"+ - "\2\u043e\u047c\5\u00b0Y\13\u043f\u0440\f\t\2\2\u0440\u0441\7W\2\2\u0441"+ - "\u047c\5\u00b0Y\n\u0442\u0443\f\b\2\2\u0443\u0444\7Y\2\2\u0444\u047c\5"+ - "\u00b0Y\t\u0445\u0446\f\7\2\2\u0446\u0447\7X\2\2\u0447\u047c\5\u00b0Y"+ - "\b\u0448\u0449\f\6\2\2\u0449\u044a\7O\2\2\u044a\u047c\5\u00b0Y\7\u044b"+ - "\u044c\f\5\2\2\u044c\u044d\7P\2\2\u044d\u047c\5\u00b0Y\6\u044e\u044f\f"+ - "\4\2\2\u044f\u0450\7I\2\2\u0450\u0451\5\u00b0Y\2\u0451\u0452\7J\2\2\u0452"+ - "\u0453\5\u00b0Y\5\u0453\u047c\3\2\2\2\u0454\u0455\f\3\2\2\u0455\u0456"+ - "\t\r\2\2\u0456\u047c\5\u00b0Y\4\u0457\u0458\f\33\2\2\u0458\u0459\7C\2"+ - "\2\u0459\u047c\7f\2\2\u045a\u045b\f\32\2\2\u045b\u045c\7C\2\2\u045c\u047c"+ - "\7-\2\2\u045d\u045e\f\31\2\2\u045e\u045f\7C\2\2\u045f\u0461\7!\2\2\u0460"+ - "\u0462\5\u00c0a\2\u0461\u0460\3\2\2\2\u0461\u0462\3\2\2\2\u0462\u0463"+ - "\3\2\2\2\u0463\u047c\5\u00b8]\2\u0464\u0465\f\30\2\2\u0465\u0466\7C\2"+ - "\2\u0466\u0467\7*\2\2\u0467\u047c\5\u00c6d\2\u0468\u0469\f\27\2\2\u0469"+ - "\u046a\7C\2\2\u046a\u047c\5\u00be`\2\u046b\u046c\f\26\2\2\u046c\u046d"+ - "\7?\2\2\u046d\u046e\5\u00b0Y\2\u046e\u046f\7@\2\2\u046f\u047c\3\2\2\2"+ - "\u0470\u0471\f\25\2\2\u0471\u0473\7;\2\2\u0472\u0474\5\u00aaV\2\u0473"+ - "\u0472\3\2\2\2\u0473\u0474\3\2\2\2\u0474\u0475\3\2\2\2\u0475\u047c\7<"+ - "\2\2\u0476\u0477\f\22\2\2\u0477\u047c\t\16\2\2\u0478\u0479\f\13\2\2\u0479"+ - "\u047a\7\34\2\2\u047a\u047c\5N(\2\u047b\u0428\3\2\2\2\u047b\u042b\3\2"+ - "\2\2\u047b\u042e\3\2\2\2\u047b\u0439\3\2\2\2\u047b\u043c\3\2\2\2\u047b"+ - "\u043f\3\2\2\2\u047b\u0442\3\2\2\2\u047b\u0445\3\2\2\2\u047b\u0448\3\2"+ - "\2\2\u047b\u044b\3\2\2\2\u047b\u044e\3\2\2\2\u047b\u0454\3\2\2\2\u047b"+ - "\u0457\3\2\2\2\u047b\u045a\3\2\2\2\u047b\u045d\3\2\2\2\u047b\u0464\3\2"+ - "\2\2\u047b\u0468\3\2\2\2\u047b\u046b\3\2\2\2\u047b\u0470\3\2\2\2\u047b"+ - "\u0476\3\2\2\2\u047b\u0478\3\2\2\2\u047c\u047f\3\2\2\2\u047d\u047b\3\2"+ - "\2\2\u047d\u047e\3\2\2\2\u047e\u00b1\3\2\2\2\u047f\u047d\3\2\2\2\u0480"+ - "\u0481\7;\2\2\u0481\u0482\5\u00b0Y\2\u0482\u0483\7<\2\2\u0483\u0496\3"+ - "\2\2\2\u0484\u0496\7-\2\2\u0485\u0496\7*\2\2\u0486\u0496\5h\65\2\u0487"+ - "\u0496\7f\2\2\u0488\u0489\5N(\2\u0489\u048a\7C\2\2\u048a\u048b\7\13\2"+ - "\2\u048b\u0496\3\2\2\2\u048c\u048d\7\62\2\2\u048d\u048e\7C\2\2\u048e\u0496"+ - "\7\13\2\2\u048f\u0493\5\u00c0a\2\u0490\u0494\5\u00c8e\2\u0491\u0492\7"+ - "-\2\2\u0492\u0494\5\u00caf\2\u0493\u0490\3\2\2\2\u0493\u0491\3\2\2\2\u0494"+ - "\u0496\3\2\2\2\u0495\u0480\3\2\2\2\u0495\u0484\3\2\2\2\u0495\u0485\3\2"+ - "\2\2\u0495\u0486\3\2\2\2\u0495\u0487\3\2\2\2\u0495\u0488\3\2\2\2\u0495"+ - "\u048c\3\2\2\2\u0495\u048f\3\2\2\2\u0496\u00b3\3\2\2\2\u0497\u0498\5\u00c0"+ - "a\2\u0498\u0499\5\u00b6\\\2\u0499\u049a\5\u00bc_\2\u049a\u04a1\3\2\2\2"+ - "\u049b\u049e\5\u00b6\\\2\u049c\u049f\5\u00ba^\2\u049d\u049f\5\u00bc_\2"+ - "\u049e\u049c\3\2\2\2\u049e\u049d\3\2\2\2\u049f\u04a1\3\2\2\2\u04a0\u0497"+ - "\3\2\2\2\u04a0\u049b\3\2\2\2\u04a1\u00b5\3\2\2\2\u04a2\u04a4\7f\2\2\u04a3"+ - "\u04a5\5\u00c2b\2\u04a4\u04a3\3\2\2\2\u04a4\u04a5\3\2\2\2\u04a5\u04ad"+ - "\3\2\2\2\u04a6\u04a7\7C\2\2\u04a7\u04a9\7f\2\2\u04a8\u04aa\5\u00c2b\2"+ - "\u04a9\u04a8\3\2\2\2\u04a9\u04aa\3\2\2\2\u04aa\u04ac\3\2\2\2\u04ab\u04a6"+ - "\3\2\2\2\u04ac\u04af\3\2\2\2\u04ad\u04ab\3\2\2\2\u04ad\u04ae\3\2\2\2\u04ae"+ - "\u04b2\3\2\2\2\u04af\u04ad\3\2\2\2\u04b0\u04b2\5R*\2\u04b1\u04a2\3\2\2"+ - "\2\u04b1\u04b0\3\2\2\2\u04b2\u00b7\3\2\2\2\u04b3\u04b5\7f\2\2\u04b4\u04b6"+ - "\5\u00c4c\2\u04b5\u04b4\3\2\2\2\u04b5\u04b6\3\2\2\2\u04b6\u04b7\3\2\2"+ - "\2\u04b7\u04b8\5\u00bc_\2\u04b8\u00b9\3\2\2\2\u04b9\u04d5\7?\2\2\u04ba"+ - "\u04bf\7@\2\2\u04bb\u04bc\7?\2\2\u04bc\u04be\7@\2\2\u04bd\u04bb\3\2\2"+ - "\2\u04be\u04c1\3\2\2\2\u04bf\u04bd\3\2\2\2\u04bf\u04c0\3\2\2\2\u04c0\u04c2"+ - "\3\2\2\2\u04c1\u04bf\3\2\2\2\u04c2\u04d6\5J&\2\u04c3\u04c4\5\u00b0Y\2"+ - "\u04c4\u04cb\7@\2\2\u04c5\u04c6\7?\2\2\u04c6\u04c7\5\u00b0Y\2\u04c7\u04c8"+ - "\7@\2\2\u04c8\u04ca\3\2\2\2\u04c9\u04c5\3\2\2\2\u04ca\u04cd\3\2\2\2\u04cb"+ - "\u04c9\3\2\2\2\u04cb\u04cc\3\2\2\2\u04cc\u04d2\3\2\2\2\u04cd\u04cb\3\2"+ - "\2\2\u04ce\u04cf\7?\2\2\u04cf\u04d1\7@\2\2\u04d0\u04ce\3\2\2\2\u04d1\u04d4"+ - "\3\2\2\2\u04d2\u04d0\3\2\2\2\u04d2\u04d3\3\2\2\2\u04d3\u04d6\3\2\2\2\u04d4"+ - "\u04d2\3\2\2\2\u04d5\u04ba\3\2\2\2\u04d5\u04c3\3\2\2\2\u04d6\u00bb\3\2"+ - "\2\2\u04d7\u04d9\5\u00caf\2\u04d8\u04da\5$\23\2\u04d9\u04d8\3\2\2\2\u04d9"+ - "\u04da\3\2\2\2\u04da\u00bd\3\2\2\2\u04db\u04dc\5\u00c0a\2\u04dc\u04dd"+ - "\5\u00c8e\2\u04dd\u00bf\3\2\2\2\u04de\u04df\7F\2\2\u04df\u04e0\5\"\22"+ - "\2\u04e0\u04e1\7E\2\2\u04e1\u00c1\3\2\2\2\u04e2\u04e3\7F\2\2\u04e3\u04e6"+ - "\7E\2\2\u04e4\u04e6\5T+\2\u04e5\u04e2\3\2\2\2\u04e5\u04e4\3\2\2\2\u04e6"+ - "\u00c3\3\2\2\2\u04e7\u04e8\7F\2\2\u04e8\u04eb\7E\2\2\u04e9\u04eb\5\u00c0"+ - "a\2\u04ea\u04e7\3\2\2\2\u04ea\u04e9\3\2\2\2\u04eb\u00c5\3\2\2\2\u04ec"+ - "\u04f3\5\u00caf\2\u04ed\u04ee\7C\2\2\u04ee\u04f0\7f\2\2\u04ef\u04f1\5"+ - "\u00caf\2\u04f0\u04ef\3\2\2\2\u04f0\u04f1\3\2\2\2\u04f1\u04f3\3\2\2\2"+ - "\u04f2\u04ec\3\2\2\2\u04f2\u04ed\3\2\2\2\u04f3\u00c7\3\2\2\2\u04f4\u04f5"+ - "\7*\2\2\u04f5\u04f9\5\u00c6d\2\u04f6\u04f7\7f\2\2\u04f7\u04f9\5\u00ca"+ - "f\2\u04f8\u04f4\3\2\2\2\u04f8\u04f6\3\2\2\2\u04f9\u00c9\3\2\2\2\u04fa"+ - "\u04fc\7;\2\2\u04fb\u04fd\5\u00aaV\2\u04fc\u04fb\3\2\2\2\u04fc\u04fd\3"+ - "\2\2\2\u04fd\u04fe\3\2\2\2\u04fe\u04ff\7<\2\2\u04ff\u00cb\3\2\2\2\u0097"+ - "\u00cd\u00d2\u00d8\u00e0\u00e9\u00ee\u00f5\u00fc\u0103\u010a\u010f\u0113"+ - "\u0117\u011b\u0120\u0124\u0128\u0132\u013a\u0141\u0148\u014c\u014f\u0152"+ - "\u015b\u0161\u0166\u0169\u016f\u0175\u0179\u0182\u0189\u0192\u0199\u019f"+ - "\u01a3\u01ae\u01b2\u01ba\u01bf\u01c3\u01cc\u01da\u01df\u01e8\u01f0\u01fa"+ - "\u0202\u020a\u020f\u021b\u0221\u0228\u022d\u0235\u0239\u023b\u0246\u024e"+ - "\u0251\u0255\u025a\u025e\u0269\u0272\u0274\u027b\u0280\u0289\u028e\u0291"+ - "\u0296\u029f\u02af\u02b9\u02bc\u02c5\u02cf\u02d7\u02da\u02dd\u02ea\u02f2"+ - "\u02f7\u02ff\u0303\u0307\u030b\u030d\u0311\u0317\u0322\u032a\u0332\u033d"+ - "\u0346\u035d\u0360\u0363\u036b\u036f\u0377\u037d\u0388\u0391\u0396\u03a0"+ - "\u03a7\u03b4\u03bd\u03c6\u03cc\u03d7\u03dc\u03e8\u03ec\u03f0\u03f4\u03f6"+ - "\u03fa\u03ff\u0412\u0426\u0436\u0461\u0473\u047b\u047d\u0493\u0495\u049e"+ - "\u04a0\u04a4\u04a9\u04ad\u04b1\u04b5\u04bf\u04cb\u04d2\u04d5\u04d9\u04e5"+ - "\u04ea\u04f0\u04f2\u04f8\u04fc"; - public static final ATN _ATN = - new ATNDeserializer().deserialize(_serializedATN.toCharArray()); - static { - _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; - for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { - _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); - } - } -} \ No newline at end of file diff --git a/antlr/src/Test.java b/antlr/src/Test.java deleted file mode 100644 index 16433bd4b..000000000 --- a/antlr/src/Test.java +++ /dev/null @@ -1,37 +0,0 @@ -package src; -import org.antlr.v4.runtime.*; -import org.antlr.v4.runtime.tree.*; - -import src.Java8Parser.BlockContext; - -public class Test { - public static void main(String[] args) throws Exception { - ANTLRInputStream input = new ANTLRInputStream(System.in); - Java8Lexer lexer = new Java8Lexer(input); - CommonTokenStream tokens = new CommonTokenStream(lexer); - Java8Parser parser = new Java8Parser(tokens); - ParseTree tree = parser.compilationUnit(); // begin parsing at init rule - System.out.println(tree.toStringTree(parser)); // print LISP-style tree - // Create a generic parse tree walker that can trigger callbacks - ParseTreeWalker walker = new ParseTreeWalker(); - // Walk the tree created during the parse, trigger callbacks - walker.walk(new SyntaxTreeBuilder(), tree); - } -} - -class SyntaxTreeBuilder extends Java8BaseListener { - - @Override - public void exitBlock(BlockContext ctx) { - Token t; - System.out.println("Exit Block"+ctx.blockStatement()); - super.exitBlock(ctx); - } - -} - -public class EvalVisitor extends LabeledExprBaseVisitor { - @Override - public SourceFile - -} diff --git a/bin/.gitignore b/bin/.gitignore index 5b035d518..56a30e6a4 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,6 +1,5 @@ /bytecode/ /de/ -/log4jTesting.xml /mycompiler/ /parser/ /plugindevelopment/ diff --git a/antlr/.classpath b/src/de/dhbwstuttgart/antlr/.classpath similarity index 100% rename from antlr/.classpath rename to src/de/dhbwstuttgart/antlr/.classpath diff --git a/antlr/.gitignore b/src/de/dhbwstuttgart/antlr/.gitignore similarity index 100% rename from antlr/.gitignore rename to src/de/dhbwstuttgart/antlr/.gitignore diff --git a/antlr/.idea/.name b/src/de/dhbwstuttgart/antlr/.idea/.name similarity index 100% rename from antlr/.idea/.name rename to src/de/dhbwstuttgart/antlr/.idea/.name diff --git a/antlr/.idea/antlr.iml b/src/de/dhbwstuttgart/antlr/.idea/antlr.iml similarity index 100% rename from antlr/.idea/antlr.iml rename to src/de/dhbwstuttgart/antlr/.idea/antlr.iml diff --git a/antlr/.idea/compiler.xml b/src/de/dhbwstuttgart/antlr/.idea/compiler.xml similarity index 100% rename from antlr/.idea/compiler.xml rename to src/de/dhbwstuttgart/antlr/.idea/compiler.xml diff --git a/antlr/.idea/copyright/profiles_settings.xml b/src/de/dhbwstuttgart/antlr/.idea/copyright/profiles_settings.xml similarity index 100% rename from antlr/.idea/copyright/profiles_settings.xml rename to src/de/dhbwstuttgart/antlr/.idea/copyright/profiles_settings.xml diff --git a/antlr/.idea/encodings.xml b/src/de/dhbwstuttgart/antlr/.idea/encodings.xml similarity index 100% rename from antlr/.idea/encodings.xml rename to src/de/dhbwstuttgart/antlr/.idea/encodings.xml diff --git a/antlr/.idea/libraries/antlr_4_4_complete.xml b/src/de/dhbwstuttgart/antlr/.idea/libraries/antlr_4_4_complete.xml similarity index 100% rename from antlr/.idea/libraries/antlr_4_4_complete.xml rename to src/de/dhbwstuttgart/antlr/.idea/libraries/antlr_4_4_complete.xml diff --git a/antlr/.idea/misc.xml b/src/de/dhbwstuttgart/antlr/.idea/misc.xml similarity index 100% rename from antlr/.idea/misc.xml rename to src/de/dhbwstuttgart/antlr/.idea/misc.xml diff --git a/antlr/.idea/modules.xml b/src/de/dhbwstuttgart/antlr/.idea/modules.xml similarity index 100% rename from antlr/.idea/modules.xml rename to src/de/dhbwstuttgart/antlr/.idea/modules.xml diff --git a/antlr/.idea/scopes/scope_settings.xml b/src/de/dhbwstuttgart/antlr/.idea/scopes/scope_settings.xml similarity index 100% rename from antlr/.idea/scopes/scope_settings.xml rename to src/de/dhbwstuttgart/antlr/.idea/scopes/scope_settings.xml diff --git a/antlr/.idea/vcs.xml b/src/de/dhbwstuttgart/antlr/.idea/vcs.xml similarity index 100% rename from antlr/.idea/vcs.xml rename to src/de/dhbwstuttgart/antlr/.idea/vcs.xml diff --git a/antlr/.idea/workspace.xml b/src/de/dhbwstuttgart/antlr/.idea/workspace.xml similarity index 100% rename from antlr/.idea/workspace.xml rename to src/de/dhbwstuttgart/antlr/.idea/workspace.xml diff --git a/antlr/.project b/src/de/dhbwstuttgart/antlr/.project similarity index 100% rename from antlr/.project rename to src/de/dhbwstuttgart/antlr/.project diff --git a/antlr/Java8.g4 b/src/de/dhbwstuttgart/antlr/Java8.g4 similarity index 99% rename from antlr/Java8.g4 rename to src/de/dhbwstuttgart/antlr/Java8.g4 index 6810eb44b..2b1c778a3 100644 --- a/antlr/Java8.g4 +++ b/src/de/dhbwstuttgart/antlr/Java8.g4 @@ -26,7 +26,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/** A Java 8 grammar for ANTLR v4 derived from ANTLR v3 Java grammar. +/* A Java 8 grammar for ANTLR v4 derived from ANTLR v3 Java grammar. * Follows syntax from spec: * http://docs.oracle.com/javase/specs/jls/se8/html/jls-19.html * Uses ANTLR v4's left-recursive expression notation. diff --git a/antlr/Java8.tokens b/src/de/dhbwstuttgart/antlr/Java8.tokens similarity index 100% rename from antlr/Java8.tokens rename to src/de/dhbwstuttgart/antlr/Java8.tokens diff --git a/antlr/Java8BaseVisitor.java b/src/de/dhbwstuttgart/antlr/Java8BaseVisitor.java similarity index 99% rename from antlr/Java8BaseVisitor.java rename to src/de/dhbwstuttgart/antlr/Java8BaseVisitor.java index b474ea368..0050e6c7b 100644 --- a/antlr/Java8BaseVisitor.java +++ b/src/de/dhbwstuttgart/antlr/Java8BaseVisitor.java @@ -1,3 +1,5 @@ +package de.dhbwstuttgart.antlr; + // Generated from Java8.g4 by ANTLR 4.4 import org.antlr.v4.runtime.misc.NotNull; import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; diff --git a/antlr/src/Java8Lexer.java b/src/de/dhbwstuttgart/antlr/Java8Lexer.java similarity index 99% rename from antlr/src/Java8Lexer.java rename to src/de/dhbwstuttgart/antlr/Java8Lexer.java index be211c679..8af172451 100644 --- a/antlr/src/Java8Lexer.java +++ b/src/de/dhbwstuttgart/antlr/Java8Lexer.java @@ -1,4 +1,5 @@ -package src; +package de.dhbwstuttgart.antlr; + // Generated from Java8.g4 by ANTLR 4.4 import org.antlr.v4.runtime.Lexer; import org.antlr.v4.runtime.CharStream; diff --git a/antlr/Java8Lexer.tokens b/src/de/dhbwstuttgart/antlr/Java8Lexer.tokens similarity index 100% rename from antlr/Java8Lexer.tokens rename to src/de/dhbwstuttgart/antlr/Java8Lexer.tokens diff --git a/antlr/Java8Parser.java b/src/de/dhbwstuttgart/antlr/Java8Parser.java similarity index 99% rename from antlr/Java8Parser.java rename to src/de/dhbwstuttgart/antlr/Java8Parser.java index 05d33ff9b..96aee9a37 100644 --- a/antlr/Java8Parser.java +++ b/src/de/dhbwstuttgart/antlr/Java8Parser.java @@ -1,3 +1,5 @@ +package de.dhbwstuttgart.antlr; + // Generated from Java8.g4 by ANTLR 4.4 import org.antlr.v4.runtime.atn.*; import org.antlr.v4.runtime.dfa.DFA; diff --git a/antlr/Java8Visitor.java b/src/de/dhbwstuttgart/antlr/Java8Visitor.java similarity index 99% rename from antlr/Java8Visitor.java rename to src/de/dhbwstuttgart/antlr/Java8Visitor.java index 66ed9e6cc..c54536250 100644 --- a/antlr/Java8Visitor.java +++ b/src/de/dhbwstuttgart/antlr/Java8Visitor.java @@ -1,3 +1,5 @@ +package de.dhbwstuttgart.antlr; + // Generated from Java8.g4 by ANTLR 4.4 import org.antlr.v4.runtime.misc.NotNull; import org.antlr.v4.runtime.tree.ParseTreeVisitor; diff --git a/src/de/dhbwstuttgart/antlr/Test.java b/src/de/dhbwstuttgart/antlr/Test.java new file mode 100644 index 000000000..bb1e08eda --- /dev/null +++ b/src/de/dhbwstuttgart/antlr/Test.java @@ -0,0 +1,53 @@ +package de.dhbwstuttgart.antlr; + +import java.util.Vector; + +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.tree.*; + +import de.dhbwstuttgart.antlr.Java8Parser.ClassDeclarationContext; +import de.dhbwstuttgart.antlr.Java8Parser.CompilationUnitContext; +import de.dhbwstuttgart.antlr.Java8Parser.TypeDeclarationContext; +import de.dhbwstuttgart.syntaxtree.SourceFile; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; + +public class Test { + public static void main(String[] args) throws Exception { + ANTLRInputStream input = new ANTLRInputStream(System.in); + Java8Lexer lexer = new Java8Lexer(input); + CommonTokenStream tokens = new CommonTokenStream(lexer); + Java8Parser parser = new Java8Parser(tokens); + ParseTree tree = parser.compilationUnit(); // begin parsing at init rule + System.out.println(tree.toStringTree(parser)); // print LISP-style tree + // Create a generic parse tree walker that can trigger callbacks + ParseTreeWalker walker = new ParseTreeWalker(); + } +} + +class EvalVisitor extends Java8BaseVisitor { + + @Override + public SyntaxTreeNode visitCompilationUnit(CompilationUnitContext ctx) { + Vector classDefinitions = new Vector<>(); + for(TypeDeclarationContext tDecl : ctx.typeDeclaration()){ + SyntaxTreeNode cl = visit(tDecl); + classDefinitions.add(cl); + } + + return new SourceFile(); + } + + @Override + public SyntaxTreeNode visitTypeDeclaration(TypeDeclarationContext ctx) { + // TODO Auto-generated method stub + return super.visitTypeDeclaration(ctx); + } + + @Override + public SyntaxTreeNode visitClassDeclaration(ClassDeclarationContext ctx) { + // TODO Auto-generated method stub + return super.visitClassDeclaration(ctx); + } + +} diff --git a/antlr/makefile b/src/de/dhbwstuttgart/antlr/makefile similarity index 61% rename from antlr/makefile rename to src/de/dhbwstuttgart/antlr/makefile index 63db993ef..0adefcb8b 100644 --- a/antlr/makefile +++ b/src/de/dhbwstuttgart/antlr/makefile @@ -1,4 +1,3 @@ all: java -jar ./antlr-4.4-complete.jar -no-listener -visitor Java8.g4 - javac -cp ./antlr-4.4-complete.jar:. *.java From 199278ac8ba42260dae2aa9cea92a2f45d6611c8 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Mon, 15 Sep 2014 23:37:50 +0200 Subject: [PATCH 20/46] ANTLR Test angepasst --- src/de/dhbwstuttgart/antlr/Test.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/de/dhbwstuttgart/antlr/Test.java b/src/de/dhbwstuttgart/antlr/Test.java index bb1e08eda..712954408 100644 --- a/src/de/dhbwstuttgart/antlr/Test.java +++ b/src/de/dhbwstuttgart/antlr/Test.java @@ -29,9 +29,9 @@ class EvalVisitor extends Java8BaseVisitor { @Override public SyntaxTreeNode visitCompilationUnit(CompilationUnitContext ctx) { - Vector classDefinitions = new Vector<>(); + Vector classDefinitions = new Vector<>(); for(TypeDeclarationContext tDecl : ctx.typeDeclaration()){ - SyntaxTreeNode cl = visit(tDecl); + Class cl = (Class) visit(tDecl); classDefinitions.add(cl); } @@ -39,15 +39,14 @@ class EvalVisitor extends Java8BaseVisitor { } @Override - public SyntaxTreeNode visitTypeDeclaration(TypeDeclarationContext ctx) { - // TODO Auto-generated method stub - return super.visitTypeDeclaration(ctx); + public Class visitTypeDeclaration(TypeDeclarationContext ctx) { + Class ret = (Class) visit(ctx.classDeclaration()); + return ret; } @Override - public SyntaxTreeNode visitClassDeclaration(ClassDeclarationContext ctx) { - // TODO Auto-generated method stub - return super.visitClassDeclaration(ctx); + public Class visitClassDeclaration(ClassDeclarationContext ctx) { + return null; } } From 18e7b6892702f74dfd81b8457e46dfb54a20d336 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 16 Sep 2014 11:31:15 +0200 Subject: [PATCH 21/46] JavaParser fixed --- .../antlr/{Test.java => VisitorTest.java} | 32 +++++++++++---- .../dhbwstuttgart/parser/InterfaceList.java | 9 ++++- src/de/dhbwstuttgart/parser/JavaParser.java | 40 +++++++++---------- src/de/dhbwstuttgart/parser/JavaParser.jay | 40 +++++++++---------- src/de/dhbwstuttgart/syntaxtree/Class.java | 23 ++++++----- .../dhbwstuttgart/syntaxtree/SourceFile.java | 6 ++- 6 files changed, 89 insertions(+), 61 deletions(-) rename src/de/dhbwstuttgart/antlr/{Test.java => VisitorTest.java} (61%) diff --git a/src/de/dhbwstuttgart/antlr/Test.java b/src/de/dhbwstuttgart/antlr/VisitorTest.java similarity index 61% rename from src/de/dhbwstuttgart/antlr/Test.java rename to src/de/dhbwstuttgart/antlr/VisitorTest.java index 712954408..e3cf519ad 100644 --- a/src/de/dhbwstuttgart/antlr/Test.java +++ b/src/de/dhbwstuttgart/antlr/VisitorTest.java @@ -1,9 +1,13 @@ package de.dhbwstuttgart.antlr; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; import java.util.Vector; import org.antlr.v4.runtime.*; import org.antlr.v4.runtime.tree.*; +import org.junit.Test; import de.dhbwstuttgart.antlr.Java8Parser.ClassDeclarationContext; import de.dhbwstuttgart.antlr.Java8Parser.CompilationUnitContext; @@ -12,17 +16,27 @@ import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; -public class Test { - public static void main(String[] args) throws Exception { - ANTLRInputStream input = new ANTLRInputStream(System.in); + +public class VisitorTest { + + private final static String testFile = System.getProperty("user.dir")+"/test/parser/AntlrTest.jav"; + + @Test + public void test() throws IOException{ + + ANTLRInputStream input = new ANTLRInputStream(new FileInputStream(testFile)); Java8Lexer lexer = new Java8Lexer(input); CommonTokenStream tokens = new CommonTokenStream(lexer); Java8Parser parser = new Java8Parser(tokens); ParseTree tree = parser.compilationUnit(); // begin parsing at init rule System.out.println(tree.toStringTree(parser)); // print LISP-style tree - // Create a generic parse tree walker that can trigger callbacks - ParseTreeWalker walker = new ParseTreeWalker(); - } + //VISITOR: + EvalVisitor visitor = new EvalVisitor(); + SyntaxTreeNode sourceFile = visitor.visit(tree); + System.out.println(sourceFile); + // Create a generic parse tree walker that can trigger callbacks + // ParseTreeWalker walker = new ParseTreeWalker(); + } } class EvalVisitor extends Java8BaseVisitor { @@ -35,7 +49,7 @@ class EvalVisitor extends Java8BaseVisitor { classDefinitions.add(cl); } - return new SourceFile(); + return new SourceFile(classDefinitions); } @Override @@ -46,7 +60,9 @@ class EvalVisitor extends Java8BaseVisitor { @Override public Class visitClassDeclaration(ClassDeclarationContext ctx) { - return null; + String name = ctx.Identifier().getText(); + int offset = ctx.Identifier().getSymbol().getStartIndex(); + return new Class(name, offset); } } diff --git a/src/de/dhbwstuttgart/parser/InterfaceList.java b/src/de/dhbwstuttgart/parser/InterfaceList.java index 3277b359f..e7438067a 100755 --- a/src/de/dhbwstuttgart/parser/InterfaceList.java +++ b/src/de/dhbwstuttgart/parser/InterfaceList.java @@ -5,6 +5,7 @@ package de.dhbwstuttgart.parser; // ino.module.InterfaceList.8615.import import java.util.Vector; +import de.dhbwstuttgart.syntaxtree.Interface; import de.dhbwstuttgart.syntaxtree.misc.UsedId; // ino.class.InterfaceList.24383.description type=javadoc @@ -35,11 +36,15 @@ public class InterfaceList // ino.end // ino.method.getVector.24392.definition - public Vector getVector() + public Vector getVector() // ino.end // ino.method.getVector.24392.body { - return superif; + Vector ret = new Vector<>(); + for(UsedId name : superif){ + ret.add(new Interface(name.get_Name_1Element(), name.getOffset())); + } + return ret; } // ino.end diff --git a/src/de/dhbwstuttgart/parser/JavaParser.java b/src/de/dhbwstuttgart/parser/JavaParser.java index 82e4457c3..585e4cb84 100644 --- a/src/de/dhbwstuttgart/parser/JavaParser.java +++ b/src/de/dhbwstuttgart/parser/JavaParser.java @@ -950,7 +950,7 @@ case 34: { Interface ic = new Interface(((InterfaceAndParameter)yyVals[-2+yyTop]).getName(), ((Token)yyVals[-3+yyTop]).getOffset()); ic.setParaList(((InterfaceAndParameter)yyVals[-2+yyTop]).getParaVector()); - ic.setSuperInterfaces(((InterfaceList)yyVals[-1+yyTop]).getVector()); + /*ic.setSuperInterfaces($3.getVector());*/ ic.setInterfaceBody(((InterfaceBody)yyVals[0+yyTop])); ic.setContainedTypes(containedTypes); initContainedTypes(); @@ -962,7 +962,7 @@ case 35: { Interface ic = new Interface(((InterfaceAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((Token)yyVals[-3+yyTop]).getOffset()); ic.setParaList(((InterfaceAndParameter)yyVals[-2+yyTop]).getParaVector()); - ic.setSuperInterfaces(((InterfaceList)yyVals[-1+yyTop]).getVector()); + /*ic.setSuperInterfaces($4.getVector());*/ ic.setInterfaceBody(((InterfaceBody)yyVals[0+yyTop])); ic.setContainedTypes(containedTypes); initContainedTypes(); @@ -986,7 +986,7 @@ case 37: // line 493 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParaList pl = new ParaList(); - RefType t = new RefType( ((Token)yyVals[-3+yyTop]).getLexem(),((Token)yyVals[-3+yyTop]).getOffset() ); + RefType t = new RefType( ((Token)yyVals[-3+yyTop]).getLexem(),null,((Token)yyVals[-3+yyTop]).getOffset() ); t.set_ParaList( ((ParaList)yyVals[-1+yyTop]).get_ParaList() ); pl.getParalist().addElement(t); org.apache.log4j.Logger.getLogger("parser").debug( "IDENTIFIER '<' paralist '>' --> Paralist f�r " + ((Token)yyVals[-3+yyTop]).getLexem() + ": RefType"); @@ -1018,7 +1018,7 @@ case 39: case 40: // line 521 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - RefType t = new RefType( ((Token)yyVals[-3+yyTop]).getLexem() ,((Token)yyVals[-3+yyTop]).getOffset() ); + RefType t = new RefType( ((Token)yyVals[-3+yyTop]).getLexem(),null ,((Token)yyVals[-3+yyTop]).getOffset() ); t.set_ParaList( ((ParaList)yyVals[-1+yyTop]).get_ParaList() ); ((ParaList)yyVals[-5+yyTop]).getParalist().addElement(t); org.apache.log4j.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER '<' paralist '>' --> Paralist f�r " + ((Token)yyVals[-3+yyTop]).getLexem() + ": RefType"); @@ -1036,7 +1036,7 @@ case 42: // line 535 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*Luar 29.11.06 Offset auf -1, da keine Angabe vorhanden*/ - WildcardType wc = new WildcardType(-1); + WildcardType wc = new WildcardType(null,-1); yyVal = wc; } break; @@ -1193,7 +1193,7 @@ case 64: // line 663 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*PL 05-07-30 eingefuegt containedTypes ANFANG*/ - RefType RT = new RefType(-1); + RefType RT = new RefType(null,-1); /*RT.set_UsedId($1);*/ /*RT.setName(RT.get_UsedId().get_Name_1Element());*/ RT.set_ParaList(((UsedId)yyVals[0+yyTop]).get_RealParaList()); @@ -1660,7 +1660,7 @@ case 122: case 123: // line 1071 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - Void Voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); + Void Voit = new Void(((Method)yyVals[0+yyTop]),((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).setType(Voit); yyVal=((Method)yyVals[0+yyTop]); } @@ -1668,7 +1668,7 @@ case 123: case 124: // line 1077 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - Void voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); + Void voit = new Void(((Method)yyVals[0+yyTop]),((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); ((Method)yyVals[0+yyTop]).setType(voit); yyVal=((Method)yyVals[0+yyTop]); @@ -1677,7 +1677,7 @@ case 124: case 125: // line 1084 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - Void voyt = new Void(((Token)yyVals[-2+yyTop]).getOffset()); + Void voyt = new Void(((Method)yyVals[-1+yyTop]),((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).setType(voyt); ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); yyVal=((Method)yyVals[-1+yyTop]); @@ -1686,7 +1686,7 @@ case 125: case 126: // line 1091 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - Void voyd = new Void(((Token)yyVals[-2+yyTop]).getOffset()); + Void voyd = new Void(((Method)yyVals[-1+yyTop]),((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); ((Method)yyVals[-1+yyTop]).setType(voyd); ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); @@ -1696,7 +1696,7 @@ case 126: case 127: // line 1099 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - Void Voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); + Void Voit = new Void(((Method)yyVals[0+yyTop]),((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).setType(Voit); ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-2+yyTop])); yyVal=((Method)yyVals[0+yyTop]); @@ -1705,7 +1705,7 @@ case 127: case 128: // line 1106 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - Void voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); + Void voit = new Void(((Method)yyVals[0+yyTop]),((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); ((Method)yyVals[0+yyTop]).setType(voit); ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-2+yyTop])); @@ -1715,7 +1715,7 @@ case 128: case 129: // line 1114 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - Void voyt = new Void(((Token)yyVals[-2+yyTop]).getOffset()); + Void voyt = new Void(((Method)yyVals[-1+yyTop]),((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).setType(voyt); ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); ((Method)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); @@ -1725,7 +1725,7 @@ case 129: case 130: // line 1122 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - Void voyd = new Void(((Token)yyVals[-2+yyTop]).getOffset()); + Void voyd = new Void(((Method)yyVals[-1+yyTop]),((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-4+yyTop])); ((Method)yyVals[-1+yyTop]).setType(voyd); ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); @@ -1867,7 +1867,7 @@ case 148: case 149: // line 1238 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - RefType RT = new RefType(-1); + RefType RT = new RefType(null,-1); RT.set_UsedId(((UsedId)yyVals[0+yyTop])); RT.setName(RT.get_UsedId().get_Name_1Element()); yyVal=RT; @@ -1915,7 +1915,7 @@ case 152: case 153: // line 1280 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - BooleanType BT = new BooleanType(); + BooleanType BT = new BooleanType(null); /* #JB# 05.04.2005 */ /* ########################################################### */ /*BT.setName($1.getLexem());*/ @@ -1939,7 +1939,7 @@ case 155: /*((UsedId)$1).vParaOrg = new Vector( $2.get_ParaList() );*/ } UsedId uid = ((UsedId)yyVals[-1+yyTop]); - RefType RT = new RefType(uid.getOffset()); + RefType RT = new RefType(null,uid.getOffset()); RT.set_ParaList(uid.get_RealParaList()); RT.setName(uid.getQualifiedName()); @@ -1956,7 +1956,7 @@ case 156: // line 1316 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->referenctype: " + ((UsedId)yyVals[0+yyTop])); - RefType RT = new RefType(((UsedId)yyVals[0+yyTop]).getOffset()); + RefType RT = new RefType(null,((UsedId)yyVals[0+yyTop]).getOffset()); /*ausgetauscht PL 05-07-30*/ /*RT.set_UsedId($1); */ @@ -2110,7 +2110,7 @@ case 174: case 175: // line 1481 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - IntegerType IT = new IntegerType(); + IntegerType IT = new IntegerType(null); /* #JB# 05.04.2005 */ /* ########################################################### */ /*IT.setName($1.getLexem());*/ @@ -2121,7 +2121,7 @@ case 175: case 176: // line 1490 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - CharacterType CT = new CharacterType(); + CharacterType CT = new CharacterType(null); /* #JB# 05.04.2005 */ /* ########################################################### */ /*CT.setName($1.getLexem());*/ diff --git a/src/de/dhbwstuttgart/parser/JavaParser.jay b/src/de/dhbwstuttgart/parser/JavaParser.jay index f4490d4fc..e163827e7 100755 --- a/src/de/dhbwstuttgart/parser/JavaParser.jay +++ b/src/de/dhbwstuttgart/parser/JavaParser.jay @@ -461,7 +461,7 @@ interfacedeclaration: INTERFACE interfaceidentifier interfacebody { Interface ic = new Interface($2.getName(), $1.getOffset()); ic.setParaList($2.getParaVector()); - ic.setSuperInterfaces($3.getVector()); + //ic.setSuperInterfaces($3.getVector()); ic.setInterfaceBody($4); ic.setContainedTypes(containedTypes); initContainedTypes(); @@ -471,7 +471,7 @@ interfacedeclaration: INTERFACE interfaceidentifier interfacebody { Interface ic = new Interface($3.getName(), $1, $2.getOffset()); ic.setParaList($3.getParaVector()); - ic.setSuperInterfaces($4.getVector()); + //ic.setSuperInterfaces($4.getVector()); ic.setInterfaceBody($5); ic.setContainedTypes(containedTypes); initContainedTypes(); @@ -492,7 +492,7 @@ paralist : IDENTIFIER | IDENTIFIER '<' paralist '>' { ParaList pl = new ParaList(); - RefType t = new RefType( $1.getLexem(),$1.getOffset() ); + RefType t = new RefType( $1.getLexem(),null,$1.getOffset() ); t.set_ParaList( $3.get_ParaList() ); pl.getParalist().addElement(t); org.apache.log4j.Logger.getLogger("parser").debug( "IDENTIFIER '<' paralist '>' --> Paralist f�r " + $1.getLexem() + ": RefType"); @@ -519,7 +519,7 @@ paralist : IDENTIFIER | paralist ',' IDENTIFIER '<' paralist '>' { - RefType t = new RefType( $3.getLexem() ,$3.getOffset() ); + RefType t = new RefType( $3.getLexem(),null ,$3.getOffset() ); t.set_ParaList( $5.get_ParaList() ); $1.getParalist().addElement(t); org.apache.log4j.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER '<' paralist '>' --> Paralist f�r " + $3.getLexem() + ": RefType"); @@ -534,7 +534,7 @@ paralist : IDENTIFIER wildcardparameter : '?' { //Luar 29.11.06 Offset auf -1, da keine Angabe vorhanden - WildcardType wc = new WildcardType(-1); + WildcardType wc = new WildcardType(null,-1); $$ = wc; } | '?' EXTENDS referencetype @@ -662,7 +662,7 @@ modifier : PUBLIC classtype : classorinterfacetype { //PL 05-07-30 eingefuegt containedTypes ANFANG - RefType RT = new RefType(-1); + RefType RT = new RefType(null,-1); //RT.set_UsedId($1); //RT.setName(RT.get_UsedId().get_Name_1Element()); RT.set_ParaList($1.get_RealParaList()); @@ -1069,27 +1069,27 @@ methodheader :genericdeclarationlist type methoddeclarator } | VOID methoddeclarator { - Void Voit = new Void($1.getOffset()); + Void Voit = new Void($2,$1.getOffset()); $2.setType(Voit); $$=$2; } | modifiers VOID methoddeclarator { - Void voit = new Void($2.getOffset()); + Void voit = new Void($3,$2.getOffset()); $3.set_Modifiers($1); $3.setType(voit); $$=$3; } | VOID methoddeclarator throws { - Void voyt = new Void($1.getOffset()); + Void voyt = new Void($2,$1.getOffset()); $2.setType(voyt); $2.set_ExceptionList($3); $$=$2; } | modifiers VOID methoddeclarator throws { - Void voyd = new Void($2.getOffset()); + Void voyd = new Void($3,$2.getOffset()); $3.set_Modifiers($1); $3.setType(voyd); $3.set_ExceptionList($4); @@ -1097,14 +1097,14 @@ methodheader :genericdeclarationlist type methoddeclarator } | genericdeclarationlist VOID methoddeclarator { - Void Voit = new Void($2.getOffset()); + Void Voit = new Void($3,$2.getOffset()); $3.setType(Voit); $3.setGenericParameter($1); $$=$3; } | modifiers genericdeclarationlist VOID methoddeclarator { - Void voit = new Void($3.getOffset()); + Void voit = new Void($4,$3.getOffset()); $4.set_Modifiers($1); $4.setType(voit); $4.setGenericParameter($2); @@ -1112,7 +1112,7 @@ methodheader :genericdeclarationlist type methoddeclarator } | genericdeclarationlist VOID methoddeclarator throws { - Void voyt = new Void($2.getOffset()); + Void voyt = new Void($3,$2.getOffset()); $3.setType(voyt); $3.set_ExceptionList($4); $3.setGenericParameter($1); @@ -1120,7 +1120,7 @@ methodheader :genericdeclarationlist type methoddeclarator } | modifiers genericdeclarationlist VOID methoddeclarator throws { - Void voyd = new Void($3.getOffset()); + Void voyd = new Void($4,$3.getOffset()); $4.set_Modifiers($1); $4.setType(voyd); $4.set_ExceptionList($5); @@ -1236,7 +1236,7 @@ explicitconstructorinvocation : THIS '(' ')' ';' classtypelist : classtype { - RefType RT = new RefType(-1); + RefType RT = new RefType(null,-1); RT.set_UsedId($1); RT.setName(RT.get_UsedId().get_Name_1Element()); $$=RT; @@ -1278,7 +1278,7 @@ methoddeclarator :IDENTIFIER '(' ')' primitivetype :BOOLEAN { - BooleanType BT = new BooleanType(); + BooleanType BT = new BooleanType(null); /* #JB# 05.04.2005 */ /* ########################################################### */ //BT.setName($1.getLexem()); @@ -1299,7 +1299,7 @@ referencelongtype : typename parameter //((UsedId)$1).vParaOrg = new Vector( $2.get_ParaList() ); } UsedId uid = $1; - RefType RT = new RefType(uid.getOffset()); + RefType RT = new RefType(null,uid.getOffset()); RT.set_ParaList(uid.get_RealParaList()); RT.setName(uid.getQualifiedName()); @@ -1315,7 +1315,7 @@ referencelongtype : typename parameter referencetype :classorinterfacetype { org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->referenctype: " + $1); - RefType RT = new RefType($1.getOffset()); + RefType RT = new RefType(null,$1.getOffset()); //ausgetauscht PL 05-07-30 //RT.set_UsedId($1); @@ -1479,7 +1479,7 @@ expression :assignmentexpression integraltype :INT { - IntegerType IT = new IntegerType(); + IntegerType IT = new IntegerType(null); /* #JB# 05.04.2005 */ /* ########################################################### */ //IT.setName($1.getLexem()); @@ -1488,7 +1488,7 @@ integraltype :INT } | CHAR { - CharacterType CT = new CharacterType(); + CharacterType CT = new CharacterType(null); /* #JB# 05.04.2005 */ /* ########################################################### */ //CT.setName($1.getLexem()); diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index 60163eff9..10b468074 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -172,12 +172,8 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit // ino.end // ino.method.Class.23044.body { - this.name = name; + this(name, offset); this.modifiers = mod; - if(name.equals("java.lang.Object")){ - superclassid=null; - } - this.offset = offset; } // ino.end @@ -193,13 +189,17 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit // ino.end // ino.method.Class.23047.body { - this.name = name; + this(name,offset); this.modifiers = mod; if (cb != null) set_ClassBody(cb); if (ct != null) setContainedTypes(ct); - if (superclass != null) set_UsedId(superclass); + if (superclass != null){ + this.superClass = new Class(superClass.getName().toString(),-1); + } if (superif != null) setSuperInterfaces(superif); - if (paralist != null) this.set_ParaList(paralist); + if (paralist != null){ + this.set_ParaList(paralist); + } if(usedIdsToCheck!=null) this.usedIdsToCheck=usedIdsToCheck; // HOTI 10.5.06 @@ -208,14 +208,14 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit if(name.equals("java.lang.Object")){ superclassid=null; } + parserlog.debug("Neue Klasse: " + name); - this.offset = offset; } // ino.end - public Vector getFields() + public Vector getFields() { return fielddecl; } @@ -1144,6 +1144,9 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit if(t instanceof GenericTypeVar)this.genericClassParameters.add((GenericTypeVar)t); else this.genericClassParameters.add(new GenericTypeVar(t.get_Name(),this,-1)); } + for(Type t : this.get_ParaList()){ + t.parserPostProcessing(this); + } /* for(GenericTypeVar gtv : this.getGenericParameter()){ gtv.setParentClass(this);; diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index 241e3cd56..4c7046f9f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -162,7 +162,11 @@ public class SourceFile } } - // ino.attribute.imports.21382.decldescription type=javadoc + public SourceFile(Vector classDefinitions) { + this.KlassenVektor = classDefinitions; + } + + // ino.attribute.imports.21382.decldescription type=javadoc /** * HOTI 4.5.06 * Beinhaltet alle Imports des aktuell geparsten Files From 49917239c1a996f0862e6d8d7e5d537fd11d514d Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 16 Sep 2014 17:34:04 +0200 Subject: [PATCH 22/46] GenericVarDeclarationList extends SyntaxTreeNode --- src/de/dhbwstuttgart/antlr/VisitorTest.java | 25 ++++++++++ src/de/dhbwstuttgart/syntaxtree/Class.java | 2 +- src/de/dhbwstuttgart/syntaxtree/Field.java | 2 +- .../syntaxtree/GenericDeclarationList.java | 49 ++++++++++++++++++- .../assumptions/TypeAssumptions.java | 3 +- 5 files changed, 76 insertions(+), 5 deletions(-) diff --git a/src/de/dhbwstuttgart/antlr/VisitorTest.java b/src/de/dhbwstuttgart/antlr/VisitorTest.java index e3cf519ad..eeaf4478f 100644 --- a/src/de/dhbwstuttgart/antlr/VisitorTest.java +++ b/src/de/dhbwstuttgart/antlr/VisitorTest.java @@ -12,9 +12,13 @@ import org.junit.Test; import de.dhbwstuttgart.antlr.Java8Parser.ClassDeclarationContext; import de.dhbwstuttgart.antlr.Java8Parser.CompilationUnitContext; import de.dhbwstuttgart.antlr.Java8Parser.TypeDeclarationContext; +import de.dhbwstuttgart.antlr.Java8Parser.TypeParameterContext; +import de.dhbwstuttgart.antlr.Java8Parser.TypeParametersContext; +import de.dhbwstuttgart.syntaxtree.GenericDeclarationList; import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; public class VisitorTest { @@ -62,7 +66,28 @@ class EvalVisitor extends Java8BaseVisitor { public Class visitClassDeclaration(ClassDeclarationContext ctx) { String name = ctx.Identifier().getText(); int offset = ctx.Identifier().getSymbol().getStartIndex(); + TypeParametersContext tpctx = ctx.typeParameters(); + GenericDeclarationList gtvList = (GenericDeclarationList) visit(tpctx); + return new Class(name, offset); } + @Override + public GenericDeclarationList visitTypeParameters(TypeParametersContext ctx) { + Vector list = new Vector<>(); + int endOffset = 0; + for(TypeParameterContext tpctx : ctx.typeParameter()){ + tpctx.Identifier(); + } + GenericDeclarationList ret = new GenericDeclarationList(list, endOffset); + return ret; + } + + @Override + public GenericTypeVar visitTypeParameter(TypeParameterContext ctx) { + GenericTypeVar ret = new GenericTypeVar(name, parent, offset); + return ret; + } + + } diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index 10b468074..7becd842a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -1184,7 +1184,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit @Override public Vector getGenericParameter() { if(this.genericClassParameters == null)return new Vector(); - return this.genericClassParameters; + return this.genericClassParameters.getVector(); } @Override diff --git a/src/de/dhbwstuttgart/syntaxtree/Field.java b/src/de/dhbwstuttgart/syntaxtree/Field.java index 51766f7a0..2ba3ce6b9 100644 --- a/src/de/dhbwstuttgart/syntaxtree/Field.java +++ b/src/de/dhbwstuttgart/syntaxtree/Field.java @@ -57,7 +57,7 @@ public abstract class Field extends SyntaxTreeNode implements TypeInsertable, Ty public Vector getGenericParameter() { Vector ret = new Vector<>(); if(this.genericParameters == null)return ret; - ret.addAll(this.genericParameters); + ret.addAll(this.genericParameters.getVector()); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java b/src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java index 115e60e33..9a722981e 100644 --- a/src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java +++ b/src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java @@ -1,5 +1,9 @@ package de.dhbwstuttgart.syntaxtree; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; +import java.util.ListIterator; import java.util.Vector; import de.dhbwstuttgart.parser.GenericVarDeclarationList; @@ -12,16 +16,57 @@ import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; * @author janulrich * */ -public class GenericDeclarationList extends Vector{ +public class GenericDeclarationList extends SyntaxTreeNode implements Iterable{ private int offsetOfLastElement; - + private Vector gtvs = new Vector<>(); + public GenericDeclarationList(Vector values, int endOffset) { this.addAll(values); this.offsetOfLastElement = endOffset; } + private void addAll(Vector values) { + this.gtvs.addAll(values); + } + public int getEndOffset(){ return offsetOfLastElement; } + + @Override + public int getOffset() { + return getEndOffset(); + } + + @Override + public int getVariableLength() { + return 0; + } + + @Override + public Iterator iterator() { + return this.gtvs.iterator(); + } + + @Override + public Vector getChildren() { + Vector ret = new Vector<>(); + for(GenericTypeVar gtv : gtvs){ + ret.add(gtv); + } + return ret; + } + + public int size() { + return gtvs.size(); + } + + public Vector getVector() { + return this.gtvs; + } + + public void add(GenericTypeVar t) { + this.gtvs.add(t); + } } diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index befd80002..227592602 100755 --- a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -316,7 +316,8 @@ public class TypeAssumptions { return new ConstraintType(ass.getAssumedType()); } } - //return null; + //Spezialfälle bei char, int, boolean, .... + //TODO throw new TypeinferenceException("Der Typ "+t.getName()+" ist nicht korrekt",inNode); } From 7abb1f8ad65d7654611210f6c759a3fe2d818437 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 16 Sep 2014 17:34:26 +0200 Subject: [PATCH 23/46] =?UTF-8?q?Antlr=20Test=20angef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/parser/AntlrTest.jav | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/parser/AntlrTest.jav diff --git a/test/parser/AntlrTest.jav b/test/parser/AntlrTest.jav new file mode 100644 index 000000000..43c1c252a --- /dev/null +++ b/test/parser/AntlrTest.jav @@ -0,0 +1 @@ +class Test{} \ No newline at end of file From d636d29ab59f23adc2a28cc26c8a8d48b8768f9e Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 18 Sep 2014 16:26:02 +0200 Subject: [PATCH 24/46] =?UTF-8?q?Problem=20mit=20der=20Umwandlung=20von=20?= =?UTF-8?q?generischen=20Variablen=20zu=20TPH=20behoben=20(noch=20nicht=20?= =?UTF-8?q?vollst=C3=A4ndig)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/de/dhbwstuttgart/antlr/VisitorTest.java | 2 +- .../dhbwstuttgart/core/AClassOrInterface.java | 8 ++- .../dhbwstuttgart/parser/InterfaceList.java | 8 ++- src/de/dhbwstuttgart/parser/JavaParser.java | 30 +++++----- src/de/dhbwstuttgart/parser/JavaParser.jay | 26 ++++---- src/de/dhbwstuttgart/syntaxtree/Class.java | 59 +++++++++++++++---- .../dhbwstuttgart/syntaxtree/SourceFile.java | 25 ++++---- .../syntaxtree/type/GenericTypeVar.java | 14 +++-- .../syntaxtree/type/RefType.java | 6 +- .../dhbwstuttgart/syntaxtree/type/Type.java | 2 +- .../assumptions/TypeAssumptions.java | 19 +++++- test/parser/AntlrTest.jav | 7 ++- test/parser/FieldVarTest.jav | 3 + test/parser/GeneralParserTest.java | 1 + .../TypeInsertTests/GenericTypeVarTest.jav | 2 +- .../TypeInsertTests/GenericTypeVarTest2.jav | 2 +- 16 files changed, 141 insertions(+), 73 deletions(-) create mode 100644 test/parser/FieldVarTest.jav diff --git a/src/de/dhbwstuttgart/antlr/VisitorTest.java b/src/de/dhbwstuttgart/antlr/VisitorTest.java index eeaf4478f..2effc93dd 100644 --- a/src/de/dhbwstuttgart/antlr/VisitorTest.java +++ b/src/de/dhbwstuttgart/antlr/VisitorTest.java @@ -85,7 +85,7 @@ class EvalVisitor extends Java8BaseVisitor { @Override public GenericTypeVar visitTypeParameter(TypeParameterContext ctx) { - GenericTypeVar ret = new GenericTypeVar(name, parent, offset); + GenericTypeVar ret = null;//new GenericTypeVar(name, parent, offset); return ret; } diff --git a/src/de/dhbwstuttgart/core/AClassOrInterface.java b/src/de/dhbwstuttgart/core/AClassOrInterface.java index 16a6f16f3..ab9f8a061 100755 --- a/src/de/dhbwstuttgart/core/AClassOrInterface.java +++ b/src/de/dhbwstuttgart/core/AClassOrInterface.java @@ -15,11 +15,15 @@ import org.apache.log4j.Logger; + + import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Interface; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; // ino.class.AClassOrInterface.21186.description type=javadoc /** @@ -37,8 +41,8 @@ public interface AClassOrInterface { public JavaClassName getName(); - public Vector getSuperInterfaces(); - public void setSuperInterfaces(Vector vector); + public Vector getSuperInterfaces(); + public void setSuperInterfaces(Vector vector); /* // ino.attribute.inferencelog.21189.decldescription type=javadoc diff --git a/src/de/dhbwstuttgart/parser/InterfaceList.java b/src/de/dhbwstuttgart/parser/InterfaceList.java index e7438067a..a3b8b82dd 100755 --- a/src/de/dhbwstuttgart/parser/InterfaceList.java +++ b/src/de/dhbwstuttgart/parser/InterfaceList.java @@ -7,6 +7,8 @@ import java.util.Vector; import de.dhbwstuttgart.syntaxtree.Interface; import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; // ino.class.InterfaceList.24383.description type=javadoc /** @@ -36,13 +38,13 @@ public class InterfaceList // ino.end // ino.method.getVector.24392.definition - public Vector getVector() + public Vector getTypeVector() // ino.end // ino.method.getVector.24392.body { - Vector ret = new Vector<>(); + Vector ret = new Vector<>(); for(UsedId name : superif){ - ret.add(new Interface(name.get_Name_1Element(), name.getOffset())); + ret.add(new Interface(name.get_Name_1Element(), name.getOffset()).getType()); } return ret; } diff --git a/src/de/dhbwstuttgart/parser/JavaParser.java b/src/de/dhbwstuttgart/parser/JavaParser.java index 585e4cb84..4968adaf8 100644 --- a/src/de/dhbwstuttgart/parser/JavaParser.java +++ b/src/de/dhbwstuttgart/parser/JavaParser.java @@ -281,8 +281,8 @@ public Vector testPair = new Vector(); //t "fielddeclarator : variabledeclarator '=' expression", //t "fielddeclarator : variabledeclarator", //t "genericdeclarationlist : '<' boundedMethodParameters '>'", -//t "fielddeclaration : fielddeclarator ';'", //t "fielddeclaration : type fielddeclarator ';'", +//t "fielddeclaration : fielddeclarator ';'", //t "fielddeclaration : genericdeclarationlist type fielddeclarator ';'", //t "fielddeclaration : variabledeclarators ';'", //t "fielddeclaration : type variabledeclarators ';'", @@ -833,7 +833,7 @@ case 20: /* Vector SuperInterfaces, */ /* Vector Parameterliste*/ - yyVal = new Class(((ClassAndParameter)yyVals[-1+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes, usedIdsToCheck, null, null, ((ClassAndParameter)yyVals[-1+yyTop]).getParaVector(), ((Token)yyVals[-2+yyTop]).getOffset()); + yyVal = new Class(((ClassAndParameter)yyVals[-1+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes, null, ((ClassAndParameter)yyVals[-1+yyTop]).getParaVector(), ((Token)yyVals[-2+yyTop]).getOffset()); this.initContainedTypes(); this.initUsedIdsToCheck(); } @@ -841,7 +841,7 @@ case 20: case 21: // line 376 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - yyVal = new Class(((ClassAndParameter)yyVals[-1+yyTop]).getName(), ((Modifiers)yyVals[-3+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes,usedIdsToCheck, null, null, ((ClassAndParameter)yyVals[-1+yyTop]).getParaVector(), ((Token)yyVals[-2+yyTop]).getOffset()); + yyVal = new Class(((ClassAndParameter)yyVals[-1+yyTop]).getName(), ((Modifiers)yyVals[-3+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, null, ((ClassAndParameter)yyVals[-1+yyTop]).getParaVector(), ((Token)yyVals[-2+yyTop]).getOffset()); this.initContainedTypes(); this.initUsedIdsToCheck(); } @@ -849,7 +849,7 @@ case 21: case 22: // line 382 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes,usedIdsToCheck, ((UsedId)yyVals[-1+yyTop]), null, ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); + yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes, ((UsedId)yyVals[-1+yyTop]), null, ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); this.initUsedIdsToCheck(); } @@ -857,7 +857,7 @@ case 22: case 23: // line 388 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, usedIdsToCheck, ((UsedId)yyVals[-1+yyTop]), null, ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); + yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, ((UsedId)yyVals[-1+yyTop]), null, ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); this.initUsedIdsToCheck(); } @@ -865,7 +865,7 @@ case 23: case 24: // line 395 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes, usedIdsToCheck, null, ((InterfaceList)yyVals[-1+yyTop]).getVector(), ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); + yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes, ((InterfaceList)yyVals[-1+yyTop]).getTypeVector(), ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); this.initUsedIdsToCheck(); } @@ -873,7 +873,7 @@ case 24: case 25: // line 401 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, usedIdsToCheck, null, ((InterfaceList)yyVals[-1+yyTop]).getVector(), ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); + yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, ((InterfaceList)yyVals[-1+yyTop]).getTypeVector(), ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); this.initUsedIdsToCheck(); } @@ -881,7 +881,7 @@ case 25: case 26: // line 407 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - yyVal = new Class(((ClassAndParameter)yyVals[-3+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes,usedIdsToCheck, ((UsedId)yyVals[-2+yyTop]), ((InterfaceList)yyVals[-1+yyTop]).getVector(), ((ClassAndParameter)yyVals[-3+yyTop]).getParaVector(), ((Token)yyVals[-4+yyTop]).getOffset()); + yyVal = new Class(((ClassAndParameter)yyVals[-3+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes, ((UsedId)yyVals[-2+yyTop]), ((InterfaceList)yyVals[-1+yyTop]).getTypeVector(), ((ClassAndParameter)yyVals[-3+yyTop]).getParaVector(), ((Token)yyVals[-4+yyTop]).getOffset()); this.initContainedTypes(); this.initUsedIdsToCheck(); } @@ -889,7 +889,7 @@ case 26: case 27: // line 413 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - yyVal = new Class(((ClassAndParameter)yyVals[-3+yyTop]).getName(), ((Modifiers)yyVals[-5+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, usedIdsToCheck, ((UsedId)yyVals[-2+yyTop]), ((InterfaceList)yyVals[-1+yyTop]).getVector(), ((ClassAndParameter)yyVals[-3+yyTop]).getParaVector(), ((Token)yyVals[-4+yyTop]).getOffset()); + yyVal = new Class(((ClassAndParameter)yyVals[-3+yyTop]).getName(), ((Modifiers)yyVals[-5+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, ((UsedId)yyVals[-2+yyTop]), ((InterfaceList)yyVals[-1+yyTop]).getTypeVector(), ((ClassAndParameter)yyVals[-3+yyTop]).getParaVector(), ((Token)yyVals[-4+yyTop]).getOffset()); this.initContainedTypes(); this.initUsedIdsToCheck(); } @@ -1396,13 +1396,13 @@ case 89: case 90: // line 854 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { + ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; case 91: - // line 858 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 859 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; @@ -3209,8 +3209,8 @@ case 289: 3, 2, 3, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 3, 3, 1, 0, 3, 1, 1, 1, - 1, 2, 2, 3, 6, 2, 3, 1, 3, 2, - 3, 4, 2, 3, 4, 2, 2, 3, 3, 4, + 1, 2, 2, 3, 6, 2, 3, 1, 3, 3, + 2, 4, 2, 3, 4, 2, 2, 3, 3, 4, 2, 3, 3, 4, 2, 1, 1, 3, 1, 3, 1, 3, 1, 3, 3, 2, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, @@ -3248,7 +3248,7 @@ case 289: 34, 0, 0, 0, 77, 21, 0, 0, 33, 0, 0, 0, 31, 0, 82, 0, 0, 0, 113, 0, 0, 132, 0, 142, 96, 0, 134, 46, 57, 0, - 93, 90, 0, 0, 0, 0, 0, 0, 0, 0, + 93, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 26, 51, 29, 53, 66, 0, 86, 0, 55, 43, 44, 73, 74, 23, 0, 25, 35, 111, 0, 108, 0, 0, 0, 254, 0, @@ -3261,7 +3261,7 @@ case 289: 165, 141, 0, 0, 0, 0, 0, 0, 0, 245, 286, 0, 0, 276, 0, 0, 0, 0, 0, 0, 0, 194, 173, 87, 241, 242, 248, 249, 174, 195, - 255, 259, 99, 0, 119, 94, 91, 0, 0, 0, + 255, 259, 99, 0, 119, 94, 90, 0, 0, 0, 135, 0, 0, 84, 0, 101, 0, 0, 0, 27, 0, 0, 0, 198, 0, 0, 0, 229, 230, 219, 0, 0, 0, 98, 144, 167, 216, 0, 0, 231, diff --git a/src/de/dhbwstuttgart/parser/JavaParser.jay b/src/de/dhbwstuttgart/parser/JavaParser.jay index e163827e7..23de6cbf8 100755 --- a/src/de/dhbwstuttgart/parser/JavaParser.jay +++ b/src/de/dhbwstuttgart/parser/JavaParser.jay @@ -368,50 +368,50 @@ classdeclaration : CLASS classidentifier classbody // Vector SuperInterfaces, // Vector Parameterliste - $$ = new Class($2.getName(), null, $3, containedTypes, usedIdsToCheck, null, null, $2.getParaVector(), $1.getOffset()); + $$ = new Class($2.getName(), null, $3, containedTypes, null, $2.getParaVector(), $1.getOffset()); this.initContainedTypes(); this.initUsedIdsToCheck(); } | modifiers CLASS classidentifier classbody { - $$ = new Class($3.getName(), $1, $4, containedTypes,usedIdsToCheck, null, null, $3.getParaVector(), $2.getOffset()); + $$ = new Class($3.getName(), $1, $4, containedTypes, null, $3.getParaVector(), $2.getOffset()); this.initContainedTypes(); this.initUsedIdsToCheck(); } | CLASS classidentifier super classbody { - $$ = new Class($2.getName(), null, $4, containedTypes,usedIdsToCheck, $3, null, $2.getParaVector(), $1.getOffset()); + $$ = new Class($2.getName(), null, $4, containedTypes, $3, null, $2.getParaVector(), $1.getOffset()); this.initContainedTypes(); this.initUsedIdsToCheck(); } | modifiers CLASS classidentifier super classbody { - $$ = new Class($3.getName(), $1, $5, containedTypes, usedIdsToCheck, $4, null, $3.getParaVector(), $2.getOffset()); + $$ = new Class($3.getName(), $1, $5, containedTypes, $4, null, $3.getParaVector(), $2.getOffset()); this.initContainedTypes(); this.initUsedIdsToCheck(); } ///* auskommentiert von Andreas Stadelmeier A10023 | CLASS classidentifier interfaces classbody { - $$ = new Class($2.getName(), null, $4, containedTypes, usedIdsToCheck, null, $3.getVector(), $2.getParaVector(), $1.getOffset()); + $$ = new Class($2.getName(), null, $4, containedTypes, $3.getTypeVector(), $2.getParaVector(), $1.getOffset()); this.initContainedTypes(); this.initUsedIdsToCheck(); } | modifiers CLASS classidentifier interfaces classbody { - $$ = new Class($3.getName(), $1, $5, containedTypes, usedIdsToCheck, null, $4.getVector(), $3.getParaVector(), $2.getOffset()); + $$ = new Class($3.getName(), $1, $5, containedTypes, $4.getTypeVector(), $3.getParaVector(), $2.getOffset()); this.initContainedTypes(); this.initUsedIdsToCheck(); } | CLASS classidentifier super interfaces classbody { - $$ = new Class($2.getName(), null, $5, containedTypes,usedIdsToCheck, $3, $4.getVector(), $2.getParaVector(), $1.getOffset()); + $$ = new Class($2.getName(), null, $5, containedTypes, $3, $4.getTypeVector(), $2.getParaVector(), $1.getOffset()); this.initContainedTypes(); this.initUsedIdsToCheck(); } | modifiers CLASS classidentifier super interfaces classbody { - $$ = new Class($3.getName(), $1, $6, containedTypes, usedIdsToCheck, $4, $5.getVector(), $3.getParaVector(), $2.getOffset()); + $$ = new Class($3.getName(), $1, $6, containedTypes, $4, $5.getTypeVector(), $3.getParaVector(), $2.getOffset()); this.initContainedTypes(); this.initUsedIdsToCheck(); } @@ -850,15 +850,15 @@ genericdeclarationlist : '<' boundedMethodParameters '>' } -fielddeclaration : fielddeclarator ';' - { - $$=$1; - } - | type fielddeclarator ';' +fielddeclaration : type fielddeclarator ';' { $2.setType($1); $$=$2; } + | fielddeclarator ';' + { + $$=$1; + } | genericdeclarationlist type fielddeclarator ';' {//angefügt von Andreas Stadelmeier $3.setType($2); diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index 7becd842a..a2554592c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -51,7 +51,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit protected Modifiers modifiers; protected String name; - private Vector superif = new Vector(); + private Vector superif = new Vector(); public UsedId getPackageName() { @@ -89,12 +89,13 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit return ret; } - public Vector getSuperInterfaces() + public Vector getSuperInterfaces() { return superif; } - public void setSuperInterfaces(Vector superif) + @Override + public void setSuperInterfaces(Vector superif) { this.superif = superif; } @@ -144,7 +145,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit private Vector fielddecl = new Vector(); private GenericDeclarationList genericClassParameters; private int offset; - private Class superClass; + private Type superClass; // ino.method.Class.23041.definition @@ -158,11 +159,11 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } this.offset = offset; if(!name.equals("Object"))//Alle Klassen außer Object erben von Object: - this.superClass = new Class("Object", -1); + this.superClass = new Class("Object", -1).getType(); } // ino.end - public Class(String name, Class superClass, int offset){ + public Class(String name, RefType superClass, int offset){ this(name,offset); this.superClass = superClass; } @@ -177,15 +178,44 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } // ino.end - // ino.method.Class.23047.defdescription type=javadoc + public Class(String name, Modifiers mod, ClassBody cb, Vector ct, Vector usedIdsToCheck, + UsedId superclass, Vector superif, Vector paralist, int offset){ + this(name, mod, cb, ct, usedIdToRefType(superclass),usedIdToRefType(superif),paralist,offset); + } + public Class(String name, ClassBody cb, Vector ct, + UsedId superclass, Vector superif, Vector paralist, int offset) { + this(name,null,cb,ct,usedIdToRefType(superclass),superif,paralist,offset); + } + public Class(String name2, Modifiers modifiers2, ClassBody classBody, + Vector containedTypes2, UsedId usedId, + Vector typeVector, Vector paraVector, int offset2) { + this(name2, modifiers2, classBody, containedTypes2, usedIdToRefType(usedId),typeVector, paraVector, offset2); + } + public Class(String name2, Modifiers object, ClassBody classBody, + Vector containedTypes2, Vector typeVector, + Vector paraVector, int offset2) { + this(name2, object, classBody, containedTypes2,(Type)null, typeVector, paraVector, offset2); + } + private static Vector usedIdToRefType(Vector superif2) { + Vector ret = new Vector<>(); + for(UsedId id : superif2)ret.add(usedIdToRefType(id)); + return ret; + } + private static Type usedIdToRefType(UsedId superclass2) { + RefType ret = new RefType(superclass2.getSimpleName(), null, superclass2.getOffset()); + ret.set_ParaList(superclass2.get_ParaList()); + return ret; + } + + // ino.method.Class.23047.defdescription type=javadoc /** * Konstruktor, der die Angabe aller Parameter ermoeglicht. * Zur Uebersichtlichkeit in der Grammatik. */ // ino.end // ino.method.Class.23047.definition - public Class(String name, Modifiers mod, ClassBody cb, Vector ct, Vector usedIdsToCheck, - UsedId superclass, Vector superif, Vector paralist, int offset) + public Class(String name, Modifiers mod, ClassBody cb, Vector ct, + Type superclass, Vector vector, Vector paralist, int offset) // ino.end // ino.method.Class.23047.body { @@ -194,9 +224,9 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit if (cb != null) set_ClassBody(cb); if (ct != null) setContainedTypes(ct); if (superclass != null){ - this.superClass = new Class(superClass.getName().toString(),-1); + this.superClass = superclass; } - if (superif != null) setSuperInterfaces(superif); + if (vector != null) setSuperInterfaces(vector); if (paralist != null){ this.set_ParaList(paralist); } @@ -214,7 +244,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } // ino.end - + public Vector getFields() { return fielddecl; @@ -1097,6 +1127,9 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit for(Field f : this.getFields()){ if(f.isPublic())ret.add(f.createTypeAssumptions(this)); } + for(GenericTypeVar gtv : this.getGenericParameter()){ + ret.add(gtv.createAssumptions()); + } return ret; } @@ -1225,7 +1258,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit * Die Super Klasse dieser Klasse. * @return null für Klasse Object */ - public Class getSuperClass(){ + public Type getSuperClass(){ return this.superClass; } } diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index 4c7046f9f..51387bd8b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -252,7 +252,7 @@ public class SourceFile */ // ino.end // ino.method.createPairFromClassAndSuperclass.21400.definition - private Pair createPairFromClassAndSuperclass(Class baseClass, Class superclass, Vector classParaOrg, Vector superclassParaOrg) + private Pair createPairFromClassAndSuperclass(Class baseClass, Type superclass, Vector classParaOrg, Vector superclassParaOrg, TypeAssumptions ass) // ino.end // ino.method.createPairFromClassAndSuperclass.21400.body { @@ -269,10 +269,12 @@ public class SourceFile new RefType( superclassName.toString(), superclassParaOrg,-1) ); */ - Pair P = new Pair(baseClass.getType(), superclass.getType()); + Pair P = new Pair(baseClass.getType().TYPE(ass, baseClass).getType(), superclass.TYPE(ass, baseClass).getType()); //PL 04-12-29 freshe Variablen ANFANG RefType r1 = (RefType)P.getTA1Copy(); - RefType r2 = (RefType)P.getTA2Copy(); + RefType r2 = (RefType)P.getTA2Copy(); + r1 = (RefType) r1.TYPE(ass, baseClass).getType(); + r2 = (RefType) r2.TYPE(ass, baseClass).getType(); // #JB# 05.04.2005 // ########################################################### Hashtable substHash = new Hashtable(); //fuer jedes Paar komplett neue Variablen @@ -305,7 +307,8 @@ public class SourceFile // Menge FC bilden Vector vFC = new Vector(); // Menge FC - + TypeAssumptions globalAssumptions = this.makeBasicAssumptionsFromJRE(imports); + globalAssumptions.add(this.getPublicFieldAssumptions()); // 1. Menge <= in FC aufnehmen --> Iteration ueber alle Klassen for( int i = 0; i < KlassenVektor.size(); i++ ) @@ -314,14 +317,14 @@ public class SourceFile inferencelog.debug("Verarbeite "+tempKlasse.getName()); //TODO: SuperKlasse erstellen, dies sollte am besten beim Konstruktoraufruf von Class geschehen. Diese kann dann mit getSuperClass abgefragt werden. if( tempKlasse.superclassid != null ) { // Klasse hat Superklasse - Pair P=createPairFromClassAndSuperclass(tempKlasse,tempKlasse.getSuperClass(),tempKlasse.get_ParaList(),tempKlasse.superclassid.get_ParaList()); + Pair P=createPairFromClassAndSuperclass(tempKlasse,tempKlasse.getSuperClass(),tempKlasse.get_ParaList(),tempKlasse.superclassid.get_ParaList(), globalAssumptions); vFC.add( P ); } if(tempKlasse.getSuperInterfaces()!=null){ - Iterator interfaceIterator=tempKlasse.getSuperInterfaces().iterator(); + Iterator interfaceIterator=tempKlasse.getSuperInterfaces().iterator(); while(interfaceIterator.hasNext()){ - Interface intf=interfaceIterator.next(); - Pair P=createPairFromClassAndSuperclass(tempKlasse,intf,tempKlasse.get_ParaList(),intf.get_ParaList()); + RefType intf=(RefType) interfaceIterator.next(); + Pair P=createPairFromClassAndSuperclass(tempKlasse,intf,tempKlasse.get_ParaList(),intf.get_ParaList(),globalAssumptions); vFC.add( P ); } @@ -330,10 +333,10 @@ public class SourceFile for(int i=0; i interfaceIterator=intf.getSuperInterfaces().iterator(); + Iterator interfaceIterator=intf.getSuperInterfaces().iterator(); while(interfaceIterator.hasNext()){ - Interface superintf=interfaceIterator.next(); - Pair P=createPairFromClassAndSuperclass(intf,superintf,intf.getParaList(), superintf.get_ParaList()); + RefType superintf=(RefType) interfaceIterator.next(); + Pair P=createPairFromClassAndSuperclass(intf,superintf,intf.getParaList(), superintf.get_ParaList(),globalAssumptions); vFC.add( P ); } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java index 405f84b56..229bfaeb0 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java @@ -44,7 +44,7 @@ public class GenericTypeVar extends Type // ino.method.GenericTypeVar.26509.defdescription type=line // private Hashtable> m_TypeErasureList; // ino.end - private static HashMap tph = new HashMap(); + private static HashMap tph = new HashMap<>(); /** * @@ -170,12 +170,14 @@ public class GenericTypeVar extends Type */ return new JavaCodeResult(this.name.toString()); } - - public TypePlaceholder getTypePlaceHolder() { - if(!GenericTypeVar.tph.containsKey(this)){ - GenericTypeVar.tph.put(this, TypePlaceholder.fresh(this.getName().toString(),this)); + + public TypePlaceholder getTypePlaceHolder(SyntaxTreeNode environment) { + String hashValue = this.getName().toString()+environment.hashCode(); + if(!GenericTypeVar.tph.containsKey(hashValue)){ + GenericTypeVar.tph.put(hashValue, TypePlaceholder.fresh(hashValue,this)); } - return GenericTypeVar.tph.get(this); + return GenericTypeVar.tph.get(hashValue); + //return TypePlaceholder.fresh(this.getParent()); //if(this.tph == null)this.tph = TypePlaceholder.fresh(); //return this.tph; } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java index 801eb60f7..f010cef62 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -212,12 +212,12 @@ public class RefType extends Type implements IMatchable * Wandelt die Parameter des RefTypes in TPHs um, sofern es sich um Generische Variablen handelt. * @return */ - public void GTV2TPH(){ + public void GTV2TPH(SyntaxTreeNode environment){ Vector paralist = new Vector(); if(this.get_ParaList()!=null)for(Type t : this.get_ParaList()){ - if(t instanceof GenericTypeVar)paralist.add(((GenericTypeVar)t).getTypePlaceHolder()); + if(t instanceof GenericTypeVar)paralist.add(((GenericTypeVar)t).getTypePlaceHolder(environment)); else{ - if(t instanceof RefType)((RefType) t).GTV2TPH(); + if(t instanceof RefType)((RefType) t).GTV2TPH(environment); paralist.add(t); } } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Type.java b/src/de/dhbwstuttgart/syntaxtree/type/Type.java index 13f22fd79..1c178f2b8 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Type.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Type.java @@ -298,7 +298,7 @@ public class Type extends SyntaxTreeNode implements IItemWithOffset */ //TODO: checkType wird nicht mehr gebraucht. TYPE übernimmt dessen Aufgabe. Es muss nur sichergestellt werden, dass jeder Typ in den Constraints landet, dadurch wird für jeden Typ die Methode TYPE aufgerufen. public ConstraintType TYPE(TypeAssumptions ass, SyntaxTreeNode parent){ - ConstraintType t = ass.getTypeFor(this, this); + ConstraintType t = ass.getTypeFor(this, parent); if(t==null) throw new TypeinferenceException("Der Typ "+this.getName()+" ist nicht korrekt", parent); return t; diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index 227592602..2a4d7521c 100755 --- a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -311,13 +311,28 @@ public class TypeAssumptions { if(ass.getIdentifier().equals(t.getName())){ if(! ass.getAssumedType().getParentClass().getName().equals(this.thisClassName)){ //Ist die Generische Variable nicht aus dieser Klasse, so muss sie zu einem TPH umgewandelt werden: - return new ConstraintType(ass.getAssumedType().getTypePlaceHolder()); + return new ConstraintType(ass.getAssumedType().getTypePlaceHolder(inNode)); } return new ConstraintType(ass.getAssumedType()); } } //Spezialfälle bei char, int, boolean, .... - //TODO + String name = t.getName().toString(); + switch(name){ + case "int": + return new ConstraintType(new RefType("java.lang.Integer",t.getParent(),t.getOffset())); + case "boolean": + return new ConstraintType(new RefType("java.lang.Boolean",t.getParent(),t.getOffset())); + case "double": + return new ConstraintType(new RefType("java.lang.Double",t.getParent(),t.getOffset())); + case "float": + return new ConstraintType(new RefType("java.lang.Float",t.getParent(),t.getOffset())); + case "long": + return new ConstraintType(new RefType("java.lang.Long",t.getParent(),t.getOffset())); + case "char": + return new ConstraintType(new RefType("java.lang.Character",t.getParent(),t.getOffset())); + } + throw new TypeinferenceException("Der Typ "+t.getName()+" ist nicht korrekt",inNode); } diff --git a/test/parser/AntlrTest.jav b/test/parser/AntlrTest.jav index 43c1c252a..31ab067d8 100644 --- a/test/parser/AntlrTest.jav +++ b/test/parser/AntlrTest.jav @@ -1 +1,6 @@ -class Test{} \ No newline at end of file +class Test{ +method(){ + if(true)i++; + if(true)i--; + else i++; +}} \ No newline at end of file diff --git a/test/parser/FieldVarTest.jav b/test/parser/FieldVarTest.jav new file mode 100644 index 000000000..aeeecdbf8 --- /dev/null +++ b/test/parser/FieldVarTest.jav @@ -0,0 +1,3 @@ +class Test{ +Typ a; +} \ No newline at end of file diff --git a/test/parser/GeneralParserTest.java b/test/parser/GeneralParserTest.java index 7edd2fb8f..6f0985db6 100644 --- a/test/parser/GeneralParserTest.java +++ b/test/parser/GeneralParserTest.java @@ -33,6 +33,7 @@ public class GeneralParserTest{ filenames.add("ImportTest.jav"); filenames.add("BoundedParameter.jav"); filenames.add("GenericFieldVarTest.jav"); + filenames.add("FieldVarTest.jav"); MyCompilerAPI compiler = MyCompiler.getAPI(); try{ for(String filename : filenames) diff --git a/test/plugindevelopment/TypeInsertTests/GenericTypeVarTest.jav b/test/plugindevelopment/TypeInsertTests/GenericTypeVarTest.jav index 6c08eff52..772f649b2 100644 --- a/test/plugindevelopment/TypeInsertTests/GenericTypeVarTest.jav +++ b/test/plugindevelopment/TypeInsertTests/GenericTypeVarTest.jav @@ -8,4 +8,4 @@ methode(){ class GTVTest2{ GTV2 var2; -} \ No newline at end of file +} diff --git a/test/plugindevelopment/TypeInsertTests/GenericTypeVarTest2.jav b/test/plugindevelopment/TypeInsertTests/GenericTypeVarTest2.jav index 30a9b171a..c1fd0e508 100644 --- a/test/plugindevelopment/TypeInsertTests/GenericTypeVarTest2.jav +++ b/test/plugindevelopment/TypeInsertTests/GenericTypeVarTest2.jav @@ -1,8 +1,8 @@ class GTVTest{ GTVTest2 var; -var2; methode(){ + var2; return var.test(var2); } } From b74f25552e922b3a19baf2452e66a7ea79a455d0 Mon Sep 17 00:00:00 2001 From: "Dr. Martin Pluemicke" Date: Thu, 18 Sep 2014 16:33:50 +0200 Subject: [PATCH 25/46] neu --- tools/AntParserBuilderDarwin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/AntParserBuilderDarwin.xml b/tools/AntParserBuilderDarwin.xml index 19dcdf267..df5b31d65 100755 --- a/tools/AntParserBuilderDarwin.xml +++ b/tools/AntParserBuilderDarwin.xml @@ -1,7 +1,7 @@ - + From 4c9d6969054169d7891c12c78fe4224dedd9cbca Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Wed, 1 Oct 2014 17:12:16 +0200 Subject: [PATCH 26/46] =?UTF-8?q?FC=20enth=C3=A4lt=20superklassen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .classpath | 2 +- .settings/org.eclipse.jdt.core.prefs | 7 ++-- bin/.gitignore | 4 +- src/de/dhbwstuttgart/core/MyCompiler.java | 2 - src/de/dhbwstuttgart/syntaxtree/Class.java | 5 +-- .../dhbwstuttgart/syntaxtree/SourceFile.java | 42 ++++++++++++++----- .../typeinference/ConstraintsSet.java | 8 ++++ .../typeinference/OderConstraint.java | 13 ++++++ .../assumptions/TypeAssumptions.java | 4 ++ 9 files changed, 64 insertions(+), 23 deletions(-) diff --git a/.classpath b/.classpath index 11f44fced..822c05c8f 100755 --- a/.classpath +++ b/.classpath @@ -3,7 +3,7 @@ - + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 794d6ee68..2e8ab188d 100755 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,12 +1,13 @@ eclipse.preferences.version=1 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.7 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/bin/.gitignore b/bin/.gitignore index 56a30e6a4..8c252d627 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,6 +1,4 @@ -/bytecode/ /de/ /mycompiler/ -/parser/ -/plugindevelopment/ /syntaxTree/ +/plugindevelopment/ diff --git a/src/de/dhbwstuttgart/core/MyCompiler.java b/src/de/dhbwstuttgart/core/MyCompiler.java index dd384b93e..f6f1c3631 100755 --- a/src/de/dhbwstuttgart/core/MyCompiler.java +++ b/src/de/dhbwstuttgart/core/MyCompiler.java @@ -16,8 +16,6 @@ import java.util.Vector; import org.apache.log4j.Logger; import org.apache.log4j.xml.DOMConfigurator; -import com.sun.corba.se.spi.orbutil.fsm.Guard.Result; -import com.sun.org.apache.xerces.internal.impl.xs.identity.Field; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.myexception.CTypeReconstructionException; diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index a2554592c..6bc3878f5 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -33,7 +33,6 @@ import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.unify.FC_TTO; import de.dhbwstuttgart.typeinference.unify.Unify; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; // ino.class.Class.23010.declaration @@ -163,8 +162,8 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } // ino.end - public Class(String name, RefType superClass, int offset){ - this(name,offset); + public Class(String name, RefType superClass, Modifiers mod, int offset){ + this(name,mod,offset); this.superClass = superClass; } diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index 51387bd8b..5ed9db311 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -46,8 +46,6 @@ import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.unify.FC_TTO; import de.dhbwstuttgart.typeinference.unify.Unify; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import sun.reflect.generics.reflectiveObjects.TypeVariableImpl; @@ -299,7 +297,7 @@ public class SourceFile */ // ino.end // ino.method.makeFC.21403.definition - public FC_TTO makeFC( ) + public FC_TTO makeFC( TypeAssumptions ass ) // ino.end // ino.method.makeFC.21403.body { @@ -311,6 +309,11 @@ public class SourceFile globalAssumptions.add(this.getPublicFieldAssumptions()); // 1. Menge <= in FC aufnehmen --> Iteration ueber alle Klassen + for(ClassAssumption cAss : ass.getClassAssumptions()){ + Pair p = new Pair(cAss.getAssumedClass().getType(), cAss.getAssumedClass().getSuperClass()); + vFC.add(p); + } + for( int i = 0; i < KlassenVektor.size(); i++ ) { Class tempKlasse = KlassenVektor.elementAt(i); @@ -650,9 +653,6 @@ public class SourceFile //Logger initialisieren: Logger typinferenzLog = Logger.getLogger("Typeinference"); - //FiniteClosure generieren: - FC_TTO finiteClosure = this.makeFC(); - //Alle Assumptions für diese SourceFile sammeln: for(Class klasse : this.KlassenVektor){ globalAssumptions.add(klasse.getPublicFieldAssumptions()); @@ -663,6 +663,11 @@ public class SourceFile globalAssumptions.add(importAssumptions); typinferenzLog.debug("Von JRE erstellte Assumptions: "+importAssumptions); + //FiniteClosure generieren: + FC_TTO finiteClosure = this.makeFC(globalAssumptions); + + System.out.println("FiniteClosure: \n"+finiteClosure); + ConstraintsSet oderConstraints = new ConstraintsSet(); //Alle Constraints der in dieser SourceFile enthaltenen Klassen sammeln: for(Class klasse : KlassenVektor){ @@ -672,6 +677,9 @@ public class SourceFile //////////////// //Karthesisches Produkt bilden: //////////////// + + //Unmögliche ConstraintsSets aussortieren durch Unifizierung + oderConstraints.filterWrongConstraints((pairs)->{return Unify.unify(pairs,finiteClosure);}); //Die Constraints in Pair's umwandeln (Karthesisches Produkt bilden): Vector> xConstraints = new Vector>();// = oderConstraints.getConstraints(); for(Vector uC:oderConstraints.getConstraints()){ //mit dem getConstraints-Aufruf wird das Karthesische Produkt erzeugt. @@ -1115,9 +1123,12 @@ public class SourceFile //String className=x.getSimpleName(); String className=x.getName(); + //Ermittle die Superklasse: + Class sClass; + sClass = getSuperClassOfJREClass(x, basicAssumptions); + Class parentClass = new Class(className, sClass.getType(),mod , 0); - Class parentClass = new Class(className, mod, 0); // Generische Typen erzeugen Hashtable jreSpiderRegistry=new Hashtable(); Vector typeGenPara = new Vector(); @@ -1242,9 +1253,16 @@ public class SourceFile } // ino.end + private Class getSuperClassOfJREClass(java.lang.Class x, TypeAssumptions ass) { + Class ret; + java.lang.Class s = x.getSuperclass(); + if(s == null)return new Class("java.lang.Object",new Modifiers(), 0); + Class ss = this.getSuperClassOfJREClass(s, ass); + ret = new Class(x.getName(),ss.getType(),new Modifiers(),0); + return ret; + } - - // ino.method.isBaseType.21412.definition + // ino.method.isBaseType.21412.definition private boolean isBaseType(String type) // ino.end // ino.method.isBaseType.21412.body @@ -1273,10 +1291,12 @@ public class SourceFile // ino.end // ino.method.createTypeFromJavaGenericType.21415.body { + /* auskommentiert, da die Klassen von Sun in der Open JDK 1.8 nicht unterstützt werden. if(type instanceof TypeVariableImpl){ - TypeVariableImpl tvi=((TypeVariableImpl)type); + TypeVariableImpl tvi=((TypeVariableImpl)type); return(new GenericTypeVar(jreSpiderRegistry.get(tvi.getName()).getName().toString(),parentClass,-1)); }else{ + */ //String jccNameForClass=baseTypeTranslationTable.get(cl.getSimpleName()); String jccNameForClass=baseTypeTranslationTable.get(cl.getName()); if(cl.getSimpleName().equalsIgnoreCase("void")){ @@ -1289,7 +1309,7 @@ public class SourceFile //return(new RefType(cl.getSimpleName())); return(new RefType(cl.getName(),parentClass,-1)); } - } + //} } // ino.end diff --git a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java index 889cf0a6e..a3f446594 100755 --- a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java +++ b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java @@ -3,6 +3,8 @@ package de.dhbwstuttgart.typeinference; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.typeinference.unify.Unifier; + public class ConstraintsSet implements Iterable{ private Vector constraintsSet; @@ -50,6 +52,12 @@ public class ConstraintsSet implements Iterable{ return constraintsSet.iterator(); } + public void filterWrongConstraints(Unifier unify) { + for(OderConstraint constraint : this){ + constraint.filterWrongConstraints(unify); + } + } + } diff --git a/src/de/dhbwstuttgart/typeinference/OderConstraint.java b/src/de/dhbwstuttgart/typeinference/OderConstraint.java index 62eb2096e..47e21a0af 100755 --- a/src/de/dhbwstuttgart/typeinference/OderConstraint.java +++ b/src/de/dhbwstuttgart/typeinference/OderConstraint.java @@ -5,6 +5,7 @@ import java.util.Vector; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.unify.Unifier; public class OderConstraint{ private Vector oderConstraintPairs; @@ -78,5 +79,17 @@ public class OderConstraint{ public void addConstraint(UndConstraint methodConstraint) { oderConstraintPairs.add(methodConstraint); } + + public void filterWrongConstraints(Unifier unify) { + Vector filteredConstraints = new Vector<>(); + for(UndConstraint cons : this.getUndConstraints()){ + if(!unify.unify(cons.getConstraintPairs()).isEmpty()){ + filteredConstraints.add(cons); + }else{ + System.out.println("Ausgesondertes Constraint: "+cons); + } + } + this.oderConstraintPairs = filteredConstraints; + } } diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index 2a4d7521c..b733e110f 100755 --- a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -371,6 +371,10 @@ public class TypeAssumptions { this.genericVarAssumptions.add(new GenericVarAssumption(genericTypeVar)); } + public Vector getClassAssumptions() { + return this.classAssumptions; + } + /** * Prüft einen Typ auf das vorhandensein in den BasicAssumptions. * Dabei werden alle Konstruktoren nach diesem Typ durchsucht. Denn jede Klasse hat einen Konstruktor und der muss in den TypeAssumptions vorhanden sein. From ab20e2c5e8b8b0d2546a3325a188cffc2a5fe185 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Wed, 1 Oct 2014 17:13:08 +0200 Subject: [PATCH 27/46] =?UTF-8?q?FC=20enth=C3=A4lt=20Supertklassen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../typeinference/unify/Unifier.java | 11 ++++++ .../TypeInsertTests/TypedMatrixTest.jav | 35 +++++++++++++++++++ .../TypeInsertTests/TypedMatrixTest.java | 16 +++++++++ 3 files changed, 62 insertions(+) create mode 100644 src/de/dhbwstuttgart/typeinference/unify/Unifier.java create mode 100644 test/plugindevelopment/TypeInsertTests/TypedMatrixTest.jav create mode 100644 test/plugindevelopment/TypeInsertTests/TypedMatrixTest.java diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unifier.java b/src/de/dhbwstuttgart/typeinference/unify/Unifier.java new file mode 100644 index 000000000..73478957c --- /dev/null +++ b/src/de/dhbwstuttgart/typeinference/unify/Unifier.java @@ -0,0 +1,11 @@ +package de.dhbwstuttgart.typeinference.unify; + +import java.util.Vector; + +import de.dhbwstuttgart.typeinference.Pair; + +public interface Unifier { + + public Vector> unify (Vector E); + +} diff --git a/test/plugindevelopment/TypeInsertTests/TypedMatrixTest.jav b/test/plugindevelopment/TypeInsertTests/TypedMatrixTest.jav new file mode 100644 index 000000000..f2c5c3f58 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/TypedMatrixTest.jav @@ -0,0 +1,35 @@ +import java.util.Vector; + +class Matrix extends Vector> { + + Matrix mul(Matrix m){ + Matrix ret; + ret = new Matrix(); + Integer i; + i = 0; + while(i < this.size()) { + Vector v1; + Vector v2; + v1 = this.elementAt(i); + v2 = new Vector(); + Integer j; + j = 0; + while(j < this.size()) { + erg; + erg = 0; + Integer k; + k = 0; + while(k < v1.size()) { + erg = erg + v1.elementAt(k).intValue() * m.elementAt(k).elementAt(j).intValue(); + k++; + } + v2.addElement(new Integer(erg)); + j++; + } + ret.addElement(v2); + i++; + } + return ret; + } + +} \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/TypedMatrixTest.java b/test/plugindevelopment/TypeInsertTests/TypedMatrixTest.java new file mode 100644 index 000000000..810af9993 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/TypedMatrixTest.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class TypedMatrixTest { + private static final String TEST_FILE = "TypedMatrixTest.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + mustContain.add("Integer erg;"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} From 37923779b1ea62c2751c3d258fa2e22d36336b29 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 7 Oct 2014 09:20:35 +0200 Subject: [PATCH 28/46] In der FC_TTO werden keine T <. T Constraints mehr aufgenommen --- src/de/dhbwstuttgart/syntaxtree/SourceFile.java | 6 ++++-- src/de/dhbwstuttgart/typeinference/ConstraintsSet.java | 3 --- src/de/dhbwstuttgart/typeinference/JavaCodeResult.java | 1 - 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index 5ed9db311..41dc15892 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -310,8 +310,10 @@ public class SourceFile // 1. Menge <= in FC aufnehmen --> Iteration ueber alle Klassen for(ClassAssumption cAss : ass.getClassAssumptions()){ - Pair p = new Pair(cAss.getAssumedClass().getType(), cAss.getAssumedClass().getSuperClass()); - vFC.add(p); + Type t1 = cAss.getAssumedClass().getType(); + Type t2 = cAss.getAssumedClass().getType(); + Pair p = new Pair(t1, t2); + if(! t1.equals(t2))vFC.add(p); //Um FC_TTO darf kein T <. T stehen. } for( int i = 0; i < KlassenVektor.size(); i++ ) diff --git a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java index a3f446594..4a28b6877 100755 --- a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java +++ b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java @@ -57,7 +57,4 @@ public class ConstraintsSet implements Iterable{ constraint.filterWrongConstraints(unify); } } - - - } diff --git a/src/de/dhbwstuttgart/typeinference/JavaCodeResult.java b/src/de/dhbwstuttgart/typeinference/JavaCodeResult.java index bd9c19788..fe9024608 100755 --- a/src/de/dhbwstuttgart/typeinference/JavaCodeResult.java +++ b/src/de/dhbwstuttgart/typeinference/JavaCodeResult.java @@ -3,7 +3,6 @@ package de.dhbwstuttgart.typeinference; import java.util.Vector; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; public class JavaCodeResult{ From 3db9b069c77335050650e41942222b348cd02f7c Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 7 Oct 2014 10:47:52 +0200 Subject: [PATCH 29/46] makeBasicAssumptions verbessert. Nimmt auch nun die Superklassen der BasicAssumptions auf --- .../dhbwstuttgart/syntaxtree/SourceFile.java | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index 41dc15892..50f7bdc2e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -311,9 +311,14 @@ public class SourceFile for(ClassAssumption cAss : ass.getClassAssumptions()){ Type t1 = cAss.getAssumedClass().getType(); - Type t2 = cAss.getAssumedClass().getType(); + Type t2 = cAss.getAssumedClass().getSuperClass(); Pair p = new Pair(t1, t2); - if(! t1.equals(t2))vFC.add(p); //Um FC_TTO darf kein T <. T stehen. + System.out.println("FCPair: "+p); + if(! t1.equals(t2)){ + vFC.add(p); //Um FC_TTO darf kein T <. T stehen. + }else{ + System.out.println("Wurde nicht aufgenommen"); + } } for( int i = 0; i < KlassenVektor.size(); i++ ) @@ -668,7 +673,7 @@ public class SourceFile //FiniteClosure generieren: FC_TTO finiteClosure = this.makeFC(globalAssumptions); - System.out.println("FiniteClosure: \n"+finiteClosure); + typinferenzLog.debug("FiniteClosure: \n"+finiteClosure); ConstraintsSet oderConstraints = new ConstraintsSet(); //Alle Constraints der in dieser SourceFile enthaltenen Klassen sammeln: @@ -682,6 +687,7 @@ public class SourceFile //Unmögliche ConstraintsSets aussortieren durch Unifizierung oderConstraints.filterWrongConstraints((pairs)->{return Unify.unify(pairs,finiteClosure);}); + typinferenzLog.debug("Übriggebliebene Konstraints:\n"+oderConstraints+"\n"); //Die Constraints in Pair's umwandeln (Karthesisches Produkt bilden): Vector> xConstraints = new Vector>();// = oderConstraints.getConstraints(); for(Vector uC:oderConstraints.getConstraints()){ //mit dem getConstraints-Aufruf wird das Karthesische Produkt erzeugt. @@ -1258,9 +1264,15 @@ public class SourceFile private Class getSuperClassOfJREClass(java.lang.Class x, TypeAssumptions ass) { Class ret; java.lang.Class s = x.getSuperclass(); - if(s == null)return new Class("java.lang.Object",new Modifiers(), 0); + if(s == null){ + return new Class("java.lang.Object",new Modifiers(), 0); + } Class ss = this.getSuperClassOfJREClass(s, ass); - ret = new Class(x.getName(),ss.getType(),new Modifiers(),0); + ret = new Class(s.getName(),ss.getType(),new Modifiers(),0); + + ass.addClassAssumption(new ClassAssumption(ss)); //Die beiden SuperKlassen den Assumptions anfügen... + ass.addClassAssumption(new ClassAssumption(ret)); + return ret; } From 81416b8bf447b9a7ef22667a71208f2d11165057 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 7 Oct 2014 15:36:18 +0200 Subject: [PATCH 30/46] Richtiger Import von Generischen Typen aus der JRE --- src/de/dhbwstuttgart/syntaxtree/Class.java | 21 ++++++++++ .../dhbwstuttgart/syntaxtree/SourceFile.java | 39 ++++++++++++------- .../syntaxtree/statement/Binary.java | 1 - .../syntaxtree/statement/Block.java | 2 +- .../syntaxtree/statement/DoubleLiteral.java | 2 - .../syntaxtree/statement/EmptyStmt.java | 4 +- .../syntaxtree/statement/Expr.java | 2 +- .../syntaxtree/statement/ForStmt.java | 3 +- .../syntaxtree/statement/IfStmt.java | 2 +- .../syntaxtree/statement/IntLiteral.java | 1 - .../syntaxtree/statement/LocalOrFieldVar.java | 1 - .../syntaxtree/statement/LongLiteral.java | 2 - .../syntaxtree/statement/Return.java | 1 - .../syntaxtree/statement/Statement.java | 1 - .../syntaxtree/statement/WhileStmt.java | 2 +- .../exceptions/NotImplementedException.java | 5 +++ 16 files changed, 58 insertions(+), 31 deletions(-) create mode 100644 src/de/dhbwstuttgart/typeinference/exceptions/NotImplementedException.java diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index 6bc3878f5..c2a9dc2f1 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -162,6 +162,26 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } // ino.end + /** + * Erstellt eine Klasse, welche nur für die Assumptions verwendet wird. + * Sie enthält keine unnötigen Informationen, wie Offset oder ClassBody. + * @param name + * @param superClass + * @param modifiers + * @param supertypeGenPara - Eine Liste von Namen, welche die Generischen Parameter der Klasse darstellen. + */ + public Class(String name, RefType superClass, Modifiers modifiers, + Vector supertypeGenPara) { + this(name,superClass,modifiers,0); + if(supertypeGenPara == null)return; + Vector gtvs = new Vector<>(); + for(String gname : supertypeGenPara){ + GenericTypeVar newGTV=new GenericTypeVar(gname,this,0); + gtvs.add(newGTV); + } + this.genericClassParameters = new GenericDeclarationList(gtvs,0); + } + public Class(String name, RefType superClass, Modifiers mod, int offset){ this(name,mod,offset); this.superClass = superClass; @@ -244,6 +264,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } // ino.end + public Vector getFields() { return fielddecl; diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index 50f7bdc2e..623a4ca4e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -1179,7 +1179,7 @@ public class SourceFile GenericTypeVar newGTV=new GenericTypeVar(superclassTVS[tvi].getName(),parentClass,-1); supertypeGenPara.addElement(newGTV); } - + if(supertypeGenPara.size()==0){ supertypeGenPara=null; } @@ -1267,9 +1267,17 @@ public class SourceFile if(s == null){ return new Class("java.lang.Object",new Modifiers(), 0); } + + Vector supertypeGenPara = new Vector<>();//Die Generischen Parameter für die Superklasse berechnen: + java.lang.reflect.TypeVariable[] superclassTVS=s.getTypeParameters(); + for(int tvi=0;tvi Date: Tue, 7 Oct 2014 17:47:23 +0200 Subject: [PATCH 31/46] NullPointerException in Unify beseitigt --- src/de/dhbwstuttgart/syntaxtree/type/RefType.java | 1 - .../typeinference/assumptions/TypeAssumptions.java | 1 - src/de/dhbwstuttgart/typeinference/unify/Unify.java | 4 ++++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java index f010cef62..56060e9ce 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -24,7 +24,6 @@ import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.unify.CSubstitutionGenVar; import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index b733e110f..9549e1374 100755 --- a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -16,7 +16,6 @@ import de.dhbwstuttgart.typeinference.FunN; import de.dhbwstuttgart.typeinference.FunNInterface; import de.dhbwstuttgart.typeinference.FunNMethod; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; /** * Eine Sammlung von TypeAssumptions. diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index 3317cbeac..7e3b82214 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -1068,6 +1068,10 @@ throws MatchException for(int i=0; i < FCtype.get_ParaList().size(); i++) { if (FCtype.get_ParaList().elementAt(i) instanceof GenericTypeVar) { inferencelog.debug("PUT"); + //TODO Auf Korrektheit prüfen: + if(tomatch.getParaList().size() != FCtype.getParaList().size()){ + throw new MatchException("Different Parameter Sizes!"); + }//Angefügt von Andreas Stadelmeier (ENDE) ht.put(((GenericTypeVar)FCtype.get_ParaList().elementAt(i)).getName(), tomatch.get_ParaList().elementAt(i)); } From 51e0d96174f2138e222fa537ad8475a91e54ab7f Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 7 Oct 2014 17:47:59 +0200 Subject: [PATCH 32/46] =?UTF-8?q?Reduziertes=20Testbeispiel=20angef=C3=BCg?= =?UTF-8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TypeInsertTests/TypedMatrixSimpleTest.jav | 24 +++++++++++++++++++ .../TypeInsertTests/ypedMatrixSimpleTest.java | 16 +++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.jav create mode 100644 test/plugindevelopment/TypeInsertTests/ypedMatrixSimpleTest.java diff --git a/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.jav b/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.jav new file mode 100644 index 000000000..72d008774 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.jav @@ -0,0 +1,24 @@ +import java.util.Vector; + +class Matrix extends Vector> { + + Matrix mul(Matrix m){ + Matrix ret; + ret = new Matrix(); + Integer i; + i = 0; + while(i < this.size()) { + Vector v1; + Vector v2; + v1 = this.elementAt(i); + v2 = new Vector(); + Integer j; + j = 0; + + ret.addElement(v2); + i++; + } + return ret; + } + +} \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/ypedMatrixSimpleTest.java b/test/plugindevelopment/TypeInsertTests/ypedMatrixSimpleTest.java new file mode 100644 index 000000000..d90e2627f --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/ypedMatrixSimpleTest.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class ypedMatrixSimpleTest { + private static final String TEST_FILE = "TypedMatrixSimpleTest.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + mustContain.add("Integer erg;"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} From 2b33576488baf251ccd8c351fc5f701e2b271008 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Wed, 8 Oct 2014 19:00:17 +0200 Subject: [PATCH 33/46] Finite Closure ohne Subtypes. checkType statt TYPE --- .../dhbwstuttgart/parser/JavaClassName.java | 1 + src/de/dhbwstuttgart/syntaxtree/Class.java | 34 +++++++---- .../syntaxtree/FormalParameter.java | 3 +- src/de/dhbwstuttgart/syntaxtree/Method.java | 4 +- .../dhbwstuttgart/syntaxtree/SourceFile.java | 56 ++++++++++++------- .../syntaxtree/statement/BoolLiteral.java | 2 +- .../syntaxtree/statement/DoubleLiteral.java | 2 +- .../syntaxtree/statement/IntLiteral.java | 2 +- .../syntaxtree/statement/LocalOrFieldVar.java | 3 +- .../syntaxtree/statement/LocalVarDecl.java | 2 +- .../syntaxtree/statement/NewClass.java | 44 +-------------- .../syntaxtree/statement/Null.java | 2 +- .../syntaxtree/statement/StringLiteral.java | 2 +- .../type/BoundedGenericTypeVar.java | 4 +- .../syntaxtree/type/FreshWildcardType.java | 2 +- .../syntaxtree/type/RefType.java | 19 ++++--- .../dhbwstuttgart/syntaxtree/type/Type.java | 12 ++-- .../syntaxtree/type/WildcardType.java | 3 +- .../typeinference/ConstraintType.java | 2 +- .../typeinference/FunNInterface.java | 19 ++++++- .../typeinference/FunNMethod.java | 2 +- .../typeinference/OderConstraint.java | 3 +- .../assumptions/TypeAssumptions.java | 27 +++++++-- .../typeinference/unify/FC_TTO.java | 4 +- .../TypeInsertTests/LambdaTest24.java | 2 +- ...leTest.java => TypedMatrixSimpleTest.java} | 2 +- .../TypeInsertTests/TypedMatrixTest.jav | 2 +- 27 files changed, 143 insertions(+), 117 deletions(-) rename test/plugindevelopment/TypeInsertTests/{ypedMatrixSimpleTest.java => TypedMatrixSimpleTest.java} (90%) diff --git a/src/de/dhbwstuttgart/parser/JavaClassName.java b/src/de/dhbwstuttgart/parser/JavaClassName.java index dbb879435..31609fe30 100644 --- a/src/de/dhbwstuttgart/parser/JavaClassName.java +++ b/src/de/dhbwstuttgart/parser/JavaClassName.java @@ -17,6 +17,7 @@ public class JavaClassName { private PackageName packageName; public JavaClassName(String name){ + if(name == null)throw new NullPointerException(); String[] names = name.split("[.]"); boolean match = true; if(names.length == 1){ diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index c2a9dc2f1..a33f3d761 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -112,7 +112,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit private Block class_block; // ino.end // ino.attribute.paralist.23023.declaration - private Vector paralist = new Vector(); // Parameterliste 'class xy{}' wird gespeichert + //private Vector paralist = new Vector(); // Parameterliste 'class xy{}' wird gespeichert // ino.end // ino.attribute.parahash.23026.declaration private Hashtable parahash = new Hashtable(); // parametrisierten Attrib. werden mit den Paramet.aus paralist verk. @@ -184,7 +184,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit public Class(String name, RefType superClass, Modifiers mod, int offset){ this(name,mod,offset); - this.superClass = superClass; + if(superClass == null)this.superClass = new Class("Object",-1).getType(); } // ino.method.Class.23044.definition @@ -247,7 +247,15 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } if (vector != null) setSuperInterfaces(vector); if (paralist != null){ - this.set_ParaList(paralist); + //this.set_ParaList(paralist); + Vector gtvList = new Vector<>(); + int lastItemOffset = 0; + for(Type paraT : paralist){ + GenericTypeVar gtv = new GenericTypeVar(paraT.get_Name(),this, paraT.getOffset()); + gtvList.add(gtv); + lastItemOffset = paraT.getOffset() + paraT.get_Name().length(); + } + this.genericClassParameters = new GenericDeclarationList(gtvList, lastItemOffset); } if(usedIdsToCheck!=null) this.usedIdsToCheck=usedIdsToCheck; @@ -264,7 +272,6 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } // ino.end - public Vector getFields() { return fielddecl; @@ -308,7 +315,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } // ino.end - + /* // ino.method.complete_paralist.23062.definition public Vector complete_paralist(boolean ext) // ino.end @@ -327,7 +334,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit return this.paralist; } // ino.end - + */ /** @@ -478,6 +485,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } // ino.end + /* // ino.method.set_ParaList.23098.definition public void set_ParaList(Vector para) // ino.end @@ -486,13 +494,15 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit this.paralist = para; } // ino.end - + */ + // ino.method.get_ParaList.23101.definition - public Vector get_ParaList() + public Vector get_ParaList() // ino.end // ino.method.get_ParaList.23101.body { - return this.paralist; + //if(this.paralist == null)return new Vector(); + return this.getGenericParameter(); } // ino.end @@ -660,10 +670,10 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit ConstraintsSet oderConstraints = new ConstraintsSet(); - for(Type gparam : this.paralist){ + for(Type gparam : this.get_ParaList()){ if(gparam instanceof GenericTypeVar)assumptions.add(((GenericTypeVar)gparam).createAssumptions()); //Constraints für die Generischen Variablen erstellen und diese dem AssumptionsSet hinzufügen } - for(Type gparam : this.paralist){ + for(Type gparam : this.get_ParaList()){ if(gparam instanceof GenericTypeVar)oderConstraints.add(((GenericTypeVar)gparam).TYPE(assumptions)); //Constraints für die Generischen Variablen erstellen und diese dem AssumptionsSet hinzufügen } @@ -1193,10 +1203,12 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } if(this.genericClassParameters == null)this.setGenericParameter(new GenericDeclarationList(new Vector(), 0)); + /*//Nicht mehr notwendig, Generische Klassenparameter werden nun immer direkt in die genericClassParameters gespeichert. for(Type t : this.get_ParaList()){ if(t instanceof GenericTypeVar)this.genericClassParameters.add((GenericTypeVar)t); else this.genericClassParameters.add(new GenericTypeVar(t.get_Name(),this,-1)); } + */ for(Type t : this.get_ParaList()){ t.parserPostProcessing(this); } diff --git a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java index cb726848d..47101ad59 100755 --- a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java +++ b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java @@ -6,6 +6,7 @@ package de.dhbwstuttgart.syntaxtree; import java.util.Vector; import org.apache.log4j.Logger; + import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.syntaxtree.misc.DeclId; @@ -15,10 +16,10 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.Typeable; +import de.dhbwstuttgart.typeinference.exceptions.NotImplementedException; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; // ino.class.FormalParameter.23391.declaration public class FormalParameter extends SyntaxTreeNode implements Typeable, TypeInsertable diff --git a/src/de/dhbwstuttgart/syntaxtree/Method.java b/src/de/dhbwstuttgart/syntaxtree/Method.java index db84fb99e..9b0d5bba7 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Method.java +++ b/src/de/dhbwstuttgart/syntaxtree/Method.java @@ -527,7 +527,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable } //TypeCheck, falls es sich um einen RefType handelt: - this.returntype = this.returntype.TYPE(localAss, this).getType(); + this.returntype = this.returntype.checkTYPE(localAss, this); /* if(this.returntype!=null && (this.returntype instanceof RefType)&& !(this.returntype instanceof mycompiler.mytype.Void)){//Sonderfall der Methode: Ihr Typ darf Void definiert werden. @@ -540,7 +540,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable //Die Parameter zu den Assumptions hinzufügen: if(this.parameterlist!=null)for(FormalParameter param : this.parameterlist){ - param.setType(param.getType().TYPE(localAss, this).getType()); + param.setType(param.getType().checkTYPE(localAss, this)); /* if(param.getType() instanceof RefType) { diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index 623a4ca4e..f98cf2303 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -305,19 +305,21 @@ public class SourceFile // Menge FC bilden Vector vFC = new Vector(); // Menge FC - TypeAssumptions globalAssumptions = this.makeBasicAssumptionsFromJRE(imports); + TypeAssumptions globalAssumptions = this.makeBasicAssumptionsFromJRE(imports, false); globalAssumptions.add(this.getPublicFieldAssumptions()); // 1. Menge <= in FC aufnehmen --> Iteration ueber alle Klassen + Vector basicAssumptionsClassVector = new Vector<>(); //die Klassen aus den BasicAssumptions for(ClassAssumption cAss : ass.getClassAssumptions()){ Type t1 = cAss.getAssumedClass().getType(); Type t2 = cAss.getAssumedClass().getSuperClass(); Pair p = new Pair(t1, t2); - System.out.println("FCPair: "+p); - if(! t1.equals(t2)){ - vFC.add(p); //Um FC_TTO darf kein T <. T stehen. + //System.out.println("FCPair: "+p); + if(! t1.equals(t2)){//Um FC_TTO darf kein T <. T stehen. + //vFC.add(p); //Wird momentan nicht hinzugefügt + basicAssumptionsClassVector.add(cAss.getAssumedClass());//Klasse ohne die Superklasse anfügen }else{ - System.out.println("Wurde nicht aufgenommen"); + //System.out.println("Wurde nicht aufgenommen"); } } @@ -621,10 +623,13 @@ public class SourceFile // printMenge( "nach trans: FC", vFC, 6 ); - FC_TTO fctto = new FC_TTO(vFC, tto,KlassenVektor); + Vector KlassenVektorunImportierteKlassen = new Vector<>(); + KlassenVektorunImportierteKlassen.addAll(basicAssumptionsClassVector); + KlassenVektorunImportierteKlassen.addAll(KlassenVektor); + + FC_TTO fctto = new FC_TTO(vFC, tto, KlassenVektorunImportierteKlassen); return fctto; } - // ino.end public TypeAssumptions getPublicFieldAssumptions(){ TypeAssumptions publicAssumptions = new TypeAssumptions(null); @@ -666,7 +671,7 @@ public class SourceFile } //Assumptions der importierten Klassen sammeln: - TypeAssumptions importAssumptions = this.makeBasicAssumptionsFromJRE(imports); + TypeAssumptions importAssumptions = this.makeBasicAssumptionsFromJRE(imports, true); globalAssumptions.add(importAssumptions); typinferenzLog.debug("Von JRE erstellte Assumptions: "+importAssumptions); @@ -1094,8 +1099,13 @@ public class SourceFile return ret; }*/ - // ino.method.makeBasicAssumptionsFromJRE.21409.definition - private TypeAssumptions makeBasicAssumptionsFromJRE(Vector imports) + /** + * Erstellt die Assumptions der standardmäßig importierten Packages (java.lang.) sowie der von imports übergebenen Klassen zusammen. + * @param imports + * @param withSuptypes - Gibt an, ob auch die subklassen der Packages den Assumptions angefügt werden sollen. + * @return + */ + private TypeAssumptions makeBasicAssumptionsFromJRE(Vector imports, boolean withSubtypes) // ino.end // ino.method.makeBasicAssumptionsFromJRE.21409.body { @@ -1132,26 +1142,30 @@ public class SourceFile String className=x.getName(); //Ermittle die Superklasse: - Class sClass; - sClass = getSuperClassOfJREClass(x, basicAssumptions); + Class sClass = new Class("Object",0); + if(withSubtypes)sClass = getSuperClassOfJREClass(x, basicAssumptions); - Class parentClass = new Class(className, sClass.getType(),mod , 0); - - // Generische Typen erzeugen + // Namen von Generische Typen erzeugen Hashtable jreSpiderRegistry=new Hashtable(); - Vector typeGenPara = new Vector(); + Vector typeGenPara = new Vector(); for(int j=0;j0){ //auskommentiert von Andreas Stadelmeier: //basicAssumptions.addGenericTypeVars(className, typeGenPara); - parentClass.set_ParaList((Vector)typeGenPara);//myCl.set_ParaList((Vector)typeGenPara); + //parentClass.set_ParaList((Vector)typeGenPara);//myCl.set_ParaList((Vector)typeGenPara); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java index 7516e1f22..7bbaf7577 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java @@ -126,7 +126,7 @@ public class BoolLiteral extends Literal @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { - this.type = assumptions.getTypeFor(new RefType("java.lang.Boolean",this,-1), this).getType(); + this.type = assumptions.checkType(new RefType("java.lang.Boolean",this,-1), this); return new ConstraintsSet(); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java index b8fec59f7..55a3d430c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java @@ -162,7 +162,7 @@ public class DoubleLiteral extends Literal @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { - this.setType(assumptions.getTypeFor(new RefType("Double",this,this.getOffset()), this).getType()); + this.setType(assumptions.checkType(new RefType("Double",this,this.getOffset()), this)); return new ConstraintsSet(); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java index 7d9f5c85f..d251cd7b0 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java @@ -160,7 +160,7 @@ public class IntLiteral extends Literal public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { ConstraintsSet ret = new ConstraintsSet(); //this.setType(new IntegerType()); - this.set_Type(assumptions.getTypeFor(new RefType("java.lang.Integer",this,-1), this).getType()); + this.set_Type(assumptions.checkType(new RefType("java.lang.Integer",this,-1), this)); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java index 729071495..d773f48c8 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java @@ -177,7 +177,8 @@ public class LocalOrFieldVar extends Expr //gibt es eine Assumption für den die LocalOrFieldVar-Variablen, dann folgendes ausführen: Type thisTypeAssumption = assumptions.getVarType(this.get_Name(), this.getParentClass()); if(thisTypeAssumption == null)throw new TypeinferenceException("Eine Variable "+this.get_Name()+" ist in den Assumptions nicht vorhanden",this); - this.setType(thisTypeAssumption); + Type thisType = thisTypeAssumption.checkTYPE(assumptions, this); + this.setType(thisType); //ret.add(new Constraint(thisTypeAssumption, this.getTypeVariable())); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java index 3da735a15..855f9ddef 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java @@ -378,7 +378,7 @@ public class LocalVarDecl extends Statement implements TypeInsertable ConstraintsSet ret = new ConstraintsSet(); if((this.getType() instanceof RefType)){ Type replaceType = null; - replaceType = assumptions.getTypeFor((RefType)this.getType(), this).getType(); + replaceType = assumptions.checkType((RefType)this.getType(), this); this.setType(replaceType); } assumptions.addAssumption(new LocalVarAssumption(this, this.getType())); //Bevor der Typ auf Void gesetzt wird. diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java index 8270ab74c..d279ebff9 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java @@ -88,46 +88,6 @@ public class NewClass extends Expr } // ino.end - // ino.method.sc_check.25852.definition - public void sc_check(Vector classname, Hashtable bh, Hashtable ch, boolean ext, Hashtable parach, Hashtable parabh) - throws SCStatementException - // ino.end - // ino.method.sc_check.25852.body - { - if(ext) - parserlog.debug(" ---NewClass---"); - Class cl; - String usedid = this.usedid.get_Name_1Element(); - String next = null; - for(Enumeration el = classname.elements(); el.hasMoreElements();) - { - cl = el.nextElement(); - next = (String)cl.getName().toString(); - if(ext) - parserlog.debug("Vergleiche "+usedid+" mit "+next); - if(usedid.equals(next)) - { - this.set_Type(new Type(next,this,getOffset())); - break; - } - else next = null; - } - if(next == null) - { - if(ext) - parserlog.error("Typfehler --> NewClass.sc_check()" ); - SCStatementException stex = new SCStatementException(); - SCExcept ex = new SCExcept(); - ex.set_error("Typfehler"); - ex.set_statement("NewClass: Klasse "+usedid+" existiert nicht im Vector classname."); - stex.addException(ex); - throw stex; - } - if(ext) - parserlog.debug("Klasse "+usedid+" im class-Vector gefunden"); - } - // ino.end - // ino.method.set_ArgumentList.25855.definition public void set_ArgumentList(ArgumentList al) // ino.end @@ -223,8 +183,8 @@ public class NewClass extends Expr //if(this.arglist != null && this.arglist.expr != null)for(Expr arg : this.arglist.expr){ // ret.add(arg.TYPEExpr(assumptions)); //} - - this.setType(assumptions.getTypeFor(new RefType(this.get_Name(),this,0), this).getType()); + Type thisT = assumptions.checkType(new RefType(this.get_Name(),this,0), (SyntaxTreeNode)this); + this.setType(thisT); /* diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java index 66bc356c8..a02121ac3 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java @@ -42,7 +42,7 @@ public class Null extends Literal // ino.method.Null.25926.body { super(-1,-1); - this.setType(new Type("__NULL__",this,getOffset())); + //this.setType(new Type("__NULL__",this,getOffset())); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java index 56fbe6acc..a1ed579f4 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java @@ -121,7 +121,7 @@ public class StringLiteral extends Literal @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { - this.set_Type(assumptions.getTypeFor(new RefType("String",this,0), this).getType()); + this.set_Type(assumptions.checkType(new RefType("String",this,0), this)); return new ConstraintsSet(); } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java index d75715dfa..ebe21b0d8 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java @@ -13,8 +13,6 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; -// ino.end // ino.class.BoundedGenericTypeVar.26464.description type=javadoc /** @@ -93,7 +91,7 @@ public class BoundedGenericTypeVar extends GenericTypeVar if(this.bounds != null){ for(Type ev : this.bounds){ ConstraintType extendsType = ass.getTypeFor(ev, this); - if(extendsType == null)throw new TypeinferenceException("Der Typ "+ev.getName()+" ist nicht korrekt", this); + //if(extendsType == null)throw new TypeinferenceException("Der Typ "+ev.getName()+" ist nicht korrekt", this); ret.add(new SingleConstraint(ass.getTypeFor(this, this), extendsType )); } } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java index 364681db4..829f0f40b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java @@ -6,7 +6,7 @@ import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; +import de.dhbwstuttgart.typeinference.exceptions.NotImplementedException; public class FreshWildcardType extends Type { diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java index 56060e9ce..ba8178dd8 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -268,6 +268,7 @@ public class RefType extends Type implements IMatchable // ino.end public void setName( JavaClassName name ){ + if(name == null)throw new NullPointerException(); this.name = name; } @@ -800,16 +801,16 @@ public class RefType extends Type implements IMatchable @Override public ConstraintType TYPE(TypeAssumptions ass, SyntaxTreeNode parent){ - //Der RefType muss zusätzlich seine Parameter prüfen. - Vector parameterList = new Vector<>(); - Vector parameterList2 = new Vector<>(); - if(this.parameter!=null)for(Type param : this.parameter){ - ConstraintType ct = param.TYPE(ass, parent); - parameterList.add(ct); - parameterList2.add(ct.getType()); - } - this.parameter = parameterList2; ConstraintType t = super.TYPE(ass,parent); + //((RefType)t.getType()).set_ParaList(this.get_ParaList()); + return t; + } + + @Override + public Type checkTYPE(TypeAssumptions ass, SyntaxTreeNode method) { + Type t = ass.checkType(this, parent); + if(t==null) + throw new TypeinferenceException("Der Typ "+this.getName()+" ist nicht korrekt", parent); return t; } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Type.java b/src/de/dhbwstuttgart/syntaxtree/type/Type.java index 1c178f2b8..ef26b1e7a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Type.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Type.java @@ -5,7 +5,6 @@ package de.dhbwstuttgart.syntaxtree.type; import java.util.ArrayList; import java.util.Vector; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.parser.JavaClassName; @@ -19,9 +18,9 @@ import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; - +//TODO: Die Klasse Type muss abstract werden! // ino.class.Type.26716.declaration -public class Type extends SyntaxTreeNode implements IItemWithOffset +public abstract class Type extends SyntaxTreeNode implements IItemWithOffset // ino.end // ino.class.Type.26716.body { @@ -181,6 +180,7 @@ public class Type extends SyntaxTreeNode implements IItemWithOffset if(obj instanceof Type){ // String name2 = ((Type)obj).printJavaCode(new ResultSet()).toString(); //return printJavaCode(new ResultSet()).toString().equals(name2); + if(((Type)obj).name == null)return false; //Auch wenn der Name dieses Typs auch null ist. Typen sind nur gleich wenn sie einen gleichen Namen haben, welcher nicht null ist. return ((Type)obj).name.equals(name); } else{ @@ -200,7 +200,7 @@ public class Type extends SyntaxTreeNode implements IItemWithOffset // ino.end // ino.method.clone.26768.body { - return new Type(this.getName().toString(), this.getParent(),getOffset()); + return new RefType(this.getName().toString(), this.getParent(),getOffset()); } // ino.end @@ -317,6 +317,10 @@ public class Type extends SyntaxTreeNode implements IItemWithOffset public Vector getChildren() { return new Vector<>(); } + + public Type checkTYPE(TypeAssumptions ass, SyntaxTreeNode method){ + return this; + } } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java index 0a28db061..56312b900 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java @@ -3,7 +3,8 @@ package de.dhbwstuttgart.syntaxtree.type; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.NotImplementedException; /** * Stellt eine Wildcard in Java dar. diff --git a/src/de/dhbwstuttgart/typeinference/ConstraintType.java b/src/de/dhbwstuttgart/typeinference/ConstraintType.java index f4ff991aa..09ccb7302 100644 --- a/src/de/dhbwstuttgart/typeinference/ConstraintType.java +++ b/src/de/dhbwstuttgart/typeinference/ConstraintType.java @@ -1,6 +1,7 @@ package de.dhbwstuttgart.typeinference; import de.dhbwstuttgart.syntaxtree.type.*; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; public class ConstraintType{ @@ -18,5 +19,4 @@ public class ConstraintType{ public Type getType() { return t; } - } diff --git a/src/de/dhbwstuttgart/typeinference/FunNInterface.java b/src/de/dhbwstuttgart/typeinference/FunNInterface.java index c41c228c5..fcc6b4524 100644 --- a/src/de/dhbwstuttgart/typeinference/FunNInterface.java +++ b/src/de/dhbwstuttgart/typeinference/FunNInterface.java @@ -4,7 +4,9 @@ import java.util.Vector; import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.assumptions.ClassAssumption; @@ -21,14 +23,15 @@ public class FunNInterface extends Class{ //TODO: getType muss einen Typ mit der ParameterListe zurückliefern. - private Vector gtvparalist; + //private Vector gtvparalist; /** * Ein FunN-Interface enthält nur eine Methode (namens apply). Ist also ein Funktionales Interface. * @param N - Die Anzahl der Parameter der apply-Methode. Beispiel N = 1 ergibt R apply(T1 par1); */ public FunNInterface(int N) { - super("Fun"+N, 0); + super("Fun"+N, null, new Modifiers(), FunNInterface.makeParaList(N)); + /* GenericTypeVar gtv; Vector paralist = new Vector<>(); gtv = new GenericTypeVar("R",this, 0); @@ -43,8 +46,18 @@ public class FunNInterface extends Class{ //paralist.add(TypePlaceholder.fresh()); } this.set_ParaList(paralist); + */ } + private static Vector makeParaList(int n) { + Vector ret = new Vector<>(); + ret.add("R"); + for(int i = 1; i<=n;i++){ + ret.add("T"+i); + } + return ret; + } + /** * @return Im Falle von einem FunN-Interface ist dies die apply-Methode */ @@ -54,7 +67,7 @@ public class FunNInterface extends Class{ TypeAssumptions ret = new TypeAssumptions(); ret.addAssumption(new MethodAssumption(this.getApplyFunction(), this)); ret.addClassAssumption(new ClassAssumption(this)); - for(GenericTypeVar gtv : this.gtvparalist)ret.addGenericVarAssumption(gtv); + for(GenericTypeVar gtv : this.getGenericParameter())ret.addGenericVarAssumption(gtv); return ret; } diff --git a/src/de/dhbwstuttgart/typeinference/FunNMethod.java b/src/de/dhbwstuttgart/typeinference/FunNMethod.java index 07b8acf81..cf056020e 100644 --- a/src/de/dhbwstuttgart/typeinference/FunNMethod.java +++ b/src/de/dhbwstuttgart/typeinference/FunNMethod.java @@ -15,7 +15,7 @@ public class FunNMethod extends Method{ * * @param N - Anzahl der Parameter (Beispiel: Fun2) */ - public FunNMethod(Vector paralist){ + public FunNMethod(Vector paralist){ super(0); //Hat keinen Offset, da nur theoretisch gedachte Methode int N = paralist.size(); //In der paraliste ist der erste Parameter der Rückgabetyp this.setType(paralist.firstElement()); diff --git a/src/de/dhbwstuttgart/typeinference/OderConstraint.java b/src/de/dhbwstuttgart/typeinference/OderConstraint.java index 47e21a0af..53fd06bb1 100755 --- a/src/de/dhbwstuttgart/typeinference/OderConstraint.java +++ b/src/de/dhbwstuttgart/typeinference/OderConstraint.java @@ -2,6 +2,7 @@ package de.dhbwstuttgart.typeinference; import java.util.Vector; +import de.dhbwstuttgart.logger.TypinferenzLog; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; @@ -86,7 +87,7 @@ public class OderConstraint{ if(!unify.unify(cons.getConstraintPairs()).isEmpty()){ filteredConstraints.add(cons); }else{ - System.out.println("Ausgesondertes Constraint: "+cons); + TypinferenzLog.debug("Ausgesondertes Constraint: "+cons); } } this.oderConstraintPairs = filteredConstraints; diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index 9549e1374..0285a5452 100755 --- a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -163,7 +163,7 @@ public class TypeAssumptions { } //Ebenso wie die Generischen Variablen: for(GenericVarAssumption ass : this.genericVarAssumptions){ - + if(ass.getIdentifier().equals(variableName))return ass.getAssumedType(); } //und zuletzt die Felder der Klasse in dessen Namensraum sich dieses AssumptionSet befindet. @@ -173,8 +173,8 @@ public class TypeAssumptions { } } //Wird keine Assumption gefunden, muss ein Fehler vorliegen: - //throw new TypeinferenceException("Eine Variable "+variableName+" ist in den Assumptions nicht vorhanden"); - return null; + throw new TypeinferenceException("Eine Variable "+variableName+" ist in den Assumptions nicht vorhanden", inScope); + //return null; } /** @@ -300,7 +300,20 @@ public class TypeAssumptions { if(match && t instanceof RefType){ RefType tr = (RefType)t; RefType ret = ass.getAssumedClass().getType(); //Dadurch erhält der RefType den vollen Namen (bsp. java.lang.Integer) - ret.set_ParaList(tr.getParaList()); + + //Falls der RefType mit Parametern angegeben wurde, so müssen diese erhalten bleiben: + if(tr.get_ParaList()!=null && tr.getParaList().size()>0){ + ret.set_ParaList(tr.getParaList()); + } + + //Der RefType muss zusätzlich seine Parameter prüfen. + Vector parameterList = new Vector<>(); + if(ret.get_ParaList()!=null)for(Type param : ret.get_ParaList()){ + ConstraintType ct = param.TYPE(this, inNode); + parameterList.add(ct.getType()); + } + ret.set_ParaList(parameterList); + return new ConstraintType(ret); } } @@ -374,6 +387,12 @@ public class TypeAssumptions { return this.classAssumptions; } + public Type checkType(RefType type, SyntaxTreeNode parent) { + ConstraintType t = this.getTypeFor(type, parent); //Richtigkeit des Typnahmensprüfen + type.setName(t.getType().getName()); //Und diesen auf den Typ anwenden + return t.getType(); + } + /** * Prüft einen Typ auf das vorhandensein in den BasicAssumptions. * Dabei werden alle Konstruktoren nach diesem Typ durchsucht. Denn jede Klasse hat einen Konstruktor und der muss in den TypeAssumptions vorhanden sein. diff --git a/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java b/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java index b1e8fe696..440bbd50c 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java +++ b/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java @@ -74,8 +74,8 @@ public class FC_TTO public void generateFullyNamedTypes(TypeAssumptions ass) { for(Pair p : this.FC){ - p.TA1 = ass.getTypeFor(p.TA1, null).getType(); - p.TA2 = ass.getTypeFor(p.TA2, null).getType(); + p.TA1 = ass.getTypeFor(p.TA1, p.TA1.getParent()).getType(); + p.TA2 = ass.getTypeFor(p.TA2, p.TA2.getParent()).getType(); } } } diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest24.java b/test/plugindevelopment/TypeInsertTests/LambdaTest24.java index 59de42e50..b3086da7e 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest24.java +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest24.java @@ -10,7 +10,7 @@ public class LambdaTest24 { @Test public void run(){ Vector mustContain = new Vector(); - //mustContain.add("Matrix ret"); + mustContain.add("Fun2"); MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); } } diff --git a/test/plugindevelopment/TypeInsertTests/ypedMatrixSimpleTest.java b/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.java similarity index 90% rename from test/plugindevelopment/TypeInsertTests/ypedMatrixSimpleTest.java rename to test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.java index d90e2627f..2db278050 100644 --- a/test/plugindevelopment/TypeInsertTests/ypedMatrixSimpleTest.java +++ b/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.java @@ -4,7 +4,7 @@ import java.util.Vector; import org.junit.Test; -public class ypedMatrixSimpleTest { +public class TypedMatrixSimpleTest { private static final String TEST_FILE = "TypedMatrixSimpleTest.jav"; @Test diff --git a/test/plugindevelopment/TypeInsertTests/TypedMatrixTest.jav b/test/plugindevelopment/TypeInsertTests/TypedMatrixTest.jav index f2c5c3f58..c9bbd6015 100644 --- a/test/plugindevelopment/TypeInsertTests/TypedMatrixTest.jav +++ b/test/plugindevelopment/TypeInsertTests/TypedMatrixTest.jav @@ -15,7 +15,7 @@ class Matrix extends Vector> { Integer j; j = 0; while(j < this.size()) { - erg; + Integer erg; erg = 0; Integer k; k = 0; From 26f35cfeb6ef7a854ebbf5f221d949894285bf72 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 9 Oct 2014 12:01:16 +0200 Subject: [PATCH 34/46] =?UTF-8?q?Logger=20angef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .classpath | 1 - bin/.gitignore | 1 - bin/log4j.xml | 4 +- bin/log4jTesting.xml | 4 +- log4j.xml | 4 +- src/de/dhbwstuttgart/bytecode/Attribute.java | 3 +- src/de/dhbwstuttgart/bytecode/CPInfo.java | 3 +- src/de/dhbwstuttgart/bytecode/ClassFile.java | 4 +- .../dhbwstuttgart/bytecode/CodeAttribute.java | 1 - .../bytecode/ExceptionTable.java | 2 +- src/de/dhbwstuttgart/bytecode/FieldInfo.java | 2 +- src/de/dhbwstuttgart/bytecode/JVMCode.java | 2 +- src/de/dhbwstuttgart/bytecode/Key.java | 2 +- src/de/dhbwstuttgart/bytecode/MethodInfo.java | 2 +- .../dhbwstuttgart/bytecode/SignatureInfo.java | 2 +- .../dhbwstuttgart/core/AClassOrInterface.java | 2 +- .../dhbwstuttgart/core/ConsoleInterface.java | 5 +- src/de/dhbwstuttgart/core/MyCompiler.java | 3 +- src/de/dhbwstuttgart/logger/Logger.java | 59 +++++++++++++++++++ .../myexception/SCClassException.java | 2 +- .../dhbwstuttgart/myexception/SCExcept.java | 2 +- .../myexception/SCException.java | 2 +- src/de/dhbwstuttgart/parser/JavaLexer.java | 2 +- src/de/dhbwstuttgart/parser/JavaLexer.lex | 2 +- src/de/dhbwstuttgart/parser/JavaParser.java | 38 ++++++------ src/de/dhbwstuttgart/parser/JavaParser.jay | 40 ++++++------- src/de/dhbwstuttgart/syntaxtree/Class.java | 2 +- .../dhbwstuttgart/syntaxtree/ClassBody.java | 2 +- .../syntaxtree/FormalParameter.java | 2 +- src/de/dhbwstuttgart/syntaxtree/Method.java | 2 +- .../dhbwstuttgart/syntaxtree/SourceFile.java | 13 ++-- .../dhbwstuttgart/syntaxtree/misc/DeclId.java | 2 +- .../syntaxtree/statement/Assign.java | 2 +- .../syntaxtree/statement/Binary.java | 2 +- .../syntaxtree/statement/Block.java | 2 +- .../syntaxtree/statement/BoolLiteral.java | 2 +- .../syntaxtree/statement/CastExpr.java | 2 +- .../syntaxtree/statement/CharLiteral.java | 2 +- .../syntaxtree/statement/DoubleLiteral.java | 2 +- .../syntaxtree/statement/EmptyStmt.java | 2 +- .../syntaxtree/statement/ExprStmt.java | 2 +- .../syntaxtree/statement/FloatLiteral.java | 2 +- .../syntaxtree/statement/ForStmt.java | 2 +- .../syntaxtree/statement/IfStmt.java | 2 +- .../syntaxtree/statement/InstVar.java | 2 +- .../syntaxtree/statement/InstanceOf.java | 2 +- .../syntaxtree/statement/IntLiteral.java | 2 +- .../syntaxtree/statement/LocalOrFieldVar.java | 2 +- .../syntaxtree/statement/LocalVarDecl.java | 4 +- .../syntaxtree/statement/LongLiteral.java | 2 +- .../syntaxtree/statement/MethodCall.java | 2 +- .../syntaxtree/statement/NegativeExpr.java | 2 +- .../syntaxtree/statement/NewArray.java | 2 +- .../syntaxtree/statement/NewClass.java | 2 +- .../syntaxtree/statement/NotExpr.java | 2 +- .../syntaxtree/statement/Null.java | 2 +- .../syntaxtree/statement/PositivExpr.java | 2 +- .../syntaxtree/statement/PostDecExpr.java | 2 +- .../syntaxtree/statement/PostIncExpr.java | 2 +- .../syntaxtree/statement/PreDecExpr.java | 2 +- .../syntaxtree/statement/PreIncExpr.java | 2 +- .../syntaxtree/statement/Receiver.java | 2 +- .../syntaxtree/statement/Return.java | 2 +- .../syntaxtree/statement/StringLiteral.java | 2 +- .../syntaxtree/statement/This.java | 2 +- .../syntaxtree/statement/WhileStmt.java | 2 +- .../syntaxtree/type/ParaList.java | 2 +- .../syntaxtree/type/RefType.java | 2 +- .../dhbwstuttgart/syntaxtree/type/Void.java | 6 ++ .../typeinference/ConstraintsSet.java | 19 ++++++ .../typeinference/OderConstraint.java | 15 +++-- .../typeinference/UndConstraint.java | 10 ++++ .../typedeployment/TypeInsertSet.java | 2 +- .../typeinference/unify/CSubstitution.java | 2 +- .../typeinference/unify/Unifier.java | 2 +- .../typeinference/unify/Unify.java | 6 +- test/log4jTesting.xml | 4 +- test/mycompiler/test/AllTests.java | 2 +- test/mycompiler/test/Log4jWrapper.java | 2 +- .../TestInferenceOwnTypeByMethodCall.java | 2 +- .../typeReconstructionTest/TrMakeFCTest.java | 4 +- .../TrSubUnifyTest.java | 4 +- .../typeReconstructionTest/TrUnifyTest.java | 2 +- test/plugindevelopment/TypeInsertTester.java | 10 ++-- 84 files changed, 242 insertions(+), 141 deletions(-) create mode 100644 src/de/dhbwstuttgart/logger/Logger.java diff --git a/.classpath b/.classpath index 822c05c8f..46d57734c 100755 --- a/.classpath +++ b/.classpath @@ -4,7 +4,6 @@ - diff --git a/bin/.gitignore b/bin/.gitignore index 8c252d627..f1735d3a6 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,4 +1,3 @@ /de/ /mycompiler/ -/syntaxTree/ /plugindevelopment/ diff --git a/bin/log4j.xml b/bin/log4j.xml index 41480fbd3..64e7c5dbd 100755 --- a/bin/log4j.xml +++ b/bin/log4j.xml @@ -3,10 +3,10 @@ - + - + diff --git a/bin/log4jTesting.xml b/bin/log4jTesting.xml index 642079a31..dc30c2453 100755 --- a/bin/log4jTesting.xml +++ b/bin/log4jTesting.xml @@ -3,10 +3,10 @@ - + - + diff --git a/log4j.xml b/log4j.xml index 41480fbd3..64e7c5dbd 100755 --- a/log4j.xml +++ b/log4j.xml @@ -3,10 +3,10 @@ - + - + diff --git a/src/de/dhbwstuttgart/bytecode/Attribute.java b/src/de/dhbwstuttgart/bytecode/Attribute.java index 579987798..a7e339720 100755 --- a/src/de/dhbwstuttgart/bytecode/Attribute.java +++ b/src/de/dhbwstuttgart/bytecode/Attribute.java @@ -7,9 +7,10 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; -import org.apache.log4j.Logger; // ino.end + +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.myexception.JVMCodeException; // ino.class.Attribute.21446.declaration diff --git a/src/de/dhbwstuttgart/bytecode/CPInfo.java b/src/de/dhbwstuttgart/bytecode/CPInfo.java index a3591b644..425011a2b 100755 --- a/src/de/dhbwstuttgart/bytecode/CPInfo.java +++ b/src/de/dhbwstuttgart/bytecode/CPInfo.java @@ -7,7 +7,8 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; + // ino.end // ino.class.CPInfo.22026.declaration diff --git a/src/de/dhbwstuttgart/bytecode/ClassFile.java b/src/de/dhbwstuttgart/bytecode/ClassFile.java index ba7de8e54..d5165110b 100755 --- a/src/de/dhbwstuttgart/bytecode/ClassFile.java +++ b/src/de/dhbwstuttgart/bytecode/ClassFile.java @@ -12,8 +12,6 @@ import java.io.IOException; import java.io.OutputStream; import java.lang.reflect.Array; import java.util.Vector; - -import org.apache.log4j.Logger; // ino.end @@ -23,7 +21,9 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Interface; import de.dhbwstuttgart.syntaxtree.ParameterList; diff --git a/src/de/dhbwstuttgart/bytecode/CodeAttribute.java b/src/de/dhbwstuttgart/bytecode/CodeAttribute.java index d8a6dfdf1..6cff7bc56 100755 --- a/src/de/dhbwstuttgart/bytecode/CodeAttribute.java +++ b/src/de/dhbwstuttgart/bytecode/CodeAttribute.java @@ -16,7 +16,6 @@ import java.util.Vector; import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.type.Type; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; // ino.class.CodeAttribute.21681.declaration public class CodeAttribute extends Attribute diff --git a/src/de/dhbwstuttgart/bytecode/ExceptionTable.java b/src/de/dhbwstuttgart/bytecode/ExceptionTable.java index 8c5dbe48b..7d22e35ff 100755 --- a/src/de/dhbwstuttgart/bytecode/ExceptionTable.java +++ b/src/de/dhbwstuttgart/bytecode/ExceptionTable.java @@ -7,7 +7,7 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; // ino.end // ino.class.ExceptionTable.22047.declaration diff --git a/src/de/dhbwstuttgart/bytecode/FieldInfo.java b/src/de/dhbwstuttgart/bytecode/FieldInfo.java index 9347bb609..1118e3ba1 100755 --- a/src/de/dhbwstuttgart/bytecode/FieldInfo.java +++ b/src/de/dhbwstuttgart/bytecode/FieldInfo.java @@ -8,7 +8,7 @@ import java.io.IOException; import java.io.OutputStream; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; // ino.end import de.dhbwstuttgart.myexception.JVMCodeException; diff --git a/src/de/dhbwstuttgart/bytecode/JVMCode.java b/src/de/dhbwstuttgart/bytecode/JVMCode.java index 1966ae884..24f9b23f7 100755 --- a/src/de/dhbwstuttgart/bytecode/JVMCode.java +++ b/src/de/dhbwstuttgart/bytecode/JVMCode.java @@ -4,7 +4,7 @@ package de.dhbwstuttgart.bytecode; // ino.module.JVMCode.8547.import import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; // ino.end diff --git a/src/de/dhbwstuttgart/bytecode/Key.java b/src/de/dhbwstuttgart/bytecode/Key.java index 77df160e1..6f4eee5bf 100755 --- a/src/de/dhbwstuttgart/bytecode/Key.java +++ b/src/de/dhbwstuttgart/bytecode/Key.java @@ -6,7 +6,7 @@ package de.dhbwstuttgart.bytecode; import java.io.FileOutputStream; import java.io.OutputStream; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; // ino.end // ino.class.Key.22890.declaration diff --git a/src/de/dhbwstuttgart/bytecode/MethodInfo.java b/src/de/dhbwstuttgart/bytecode/MethodInfo.java index a083b106c..ef2f91633 100755 --- a/src/de/dhbwstuttgart/bytecode/MethodInfo.java +++ b/src/de/dhbwstuttgart/bytecode/MethodInfo.java @@ -8,7 +8,7 @@ import java.io.IOException; import java.io.OutputStream; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; // ino.end import de.dhbwstuttgart.myexception.JVMCodeException; diff --git a/src/de/dhbwstuttgart/bytecode/SignatureInfo.java b/src/de/dhbwstuttgart/bytecode/SignatureInfo.java index cb4345977..c7fa7873c 100755 --- a/src/de/dhbwstuttgart/bytecode/SignatureInfo.java +++ b/src/de/dhbwstuttgart/bytecode/SignatureInfo.java @@ -8,7 +8,7 @@ import java.io.IOException; import java.io.OutputStream; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; // ino.end diff --git a/src/de/dhbwstuttgart/core/AClassOrInterface.java b/src/de/dhbwstuttgart/core/AClassOrInterface.java index ab9f8a061..cf3ba5155 100755 --- a/src/de/dhbwstuttgart/core/AClassOrInterface.java +++ b/src/de/dhbwstuttgart/core/AClassOrInterface.java @@ -6,7 +6,7 @@ package de.dhbwstuttgart.core; // ino.module.AClassOrInterface.8526.import import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; // ino.end diff --git a/src/de/dhbwstuttgart/core/ConsoleInterface.java b/src/de/dhbwstuttgart/core/ConsoleInterface.java index 576077d7d..742f0fe61 100755 --- a/src/de/dhbwstuttgart/core/ConsoleInterface.java +++ b/src/de/dhbwstuttgart/core/ConsoleInterface.java @@ -5,8 +5,7 @@ import static org.junit.Assert.fail; import java.util.*; -import org.apache.log4j.Logger; -import org.apache.log4j.varia.NullAppender; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; @@ -21,7 +20,7 @@ public class ConsoleInterface { for(String file : args){ filenames.add(file); } - Logger.getRootLogger().addAppender(new NullAppender()); // sämtliches Logging unterdrücken + Logger.setOutput(null); // sämtliches Logging unterdrücken run(filenames); } diff --git a/src/de/dhbwstuttgart/core/MyCompiler.java b/src/de/dhbwstuttgart/core/MyCompiler.java index f6f1c3631..7ec12f3b9 100755 --- a/src/de/dhbwstuttgart/core/MyCompiler.java +++ b/src/de/dhbwstuttgart/core/MyCompiler.java @@ -13,8 +13,7 @@ import java.io.Reader; import java.io.StringReader; import java.util.Vector; -import org.apache.log4j.Logger; -import org.apache.log4j.xml.DOMConfigurator; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; diff --git a/src/de/dhbwstuttgart/logger/Logger.java b/src/de/dhbwstuttgart/logger/Logger.java new file mode 100644 index 000000000..a640ae551 --- /dev/null +++ b/src/de/dhbwstuttgart/logger/Logger.java @@ -0,0 +1,59 @@ +package de.dhbwstuttgart.logger; + +import java.io.PrintStream; +import java.util.HashMap; + +public class Logger { + + private static PrintStream standardOutput; + private static final HashMap LOGGER_DIRECTORY = new HashMap<>(); + + private String name; + private PrintStream output; + + private Logger(String name, PrintStream output) { + this.name = name; + this.output = output; + } + + public void debug(String message){ + output(message); + } + + public static Logger getLogger(String name) { + Logger ret; + if(LOGGER_DIRECTORY.containsKey(name)){ + ret = LOGGER_DIRECTORY.get(name); + }else{ + ret = new Logger(name, standardOutput); + LOGGER_DIRECTORY.put(name, ret); + } + return ret; + } + + private void output(String msg){ + if(output != null){ + output.println(msg); + }else if(standardOutput != null){ + standardOutput.println(msg); + } + } + + public void info(String string) { + // TODO Auto-generated method stub + + } + + public void error(String string) { + // TODO Auto-generated method stub + + } + + /** + * wird hier null übergeben, so wird sämtliches Logging unterdrückt. + */ + public static void setStandardOutput(PrintStream outputStream) { + Logger.standardOutput = outputStream; + } + +} diff --git a/src/de/dhbwstuttgart/myexception/SCClassException.java b/src/de/dhbwstuttgart/myexception/SCClassException.java index 03ed35eec..c6d877414 100755 --- a/src/de/dhbwstuttgart/myexception/SCClassException.java +++ b/src/de/dhbwstuttgart/myexception/SCClassException.java @@ -4,7 +4,7 @@ package de.dhbwstuttgart.myexception; // ino.module.SCClassException.8576.import import java.util.Enumeration; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; // ino.end diff --git a/src/de/dhbwstuttgart/myexception/SCExcept.java b/src/de/dhbwstuttgart/myexception/SCExcept.java index fd5d6ba88..e8ad93d5c 100755 --- a/src/de/dhbwstuttgart/myexception/SCExcept.java +++ b/src/de/dhbwstuttgart/myexception/SCExcept.java @@ -3,7 +3,7 @@ package de.dhbwstuttgart.myexception; // ino.end // ino.module.SCExcept.8577.import -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; // ino.end // ino.class.SCExcept.23838.declaration diff --git a/src/de/dhbwstuttgart/myexception/SCException.java b/src/de/dhbwstuttgart/myexception/SCException.java index d996cc66d..9c96f2bdc 100755 --- a/src/de/dhbwstuttgart/myexception/SCException.java +++ b/src/de/dhbwstuttgart/myexception/SCException.java @@ -4,7 +4,7 @@ package de.dhbwstuttgart.myexception; // ino.module.SCException.8578.import import java.util.Enumeration; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; // ino.end diff --git a/src/de/dhbwstuttgart/parser/JavaLexer.java b/src/de/dhbwstuttgart/parser/JavaLexer.java index 4c5ccab14..788641ace 100644 --- a/src/de/dhbwstuttgart/parser/JavaLexer.java +++ b/src/de/dhbwstuttgart/parser/JavaLexer.java @@ -1291,7 +1291,7 @@ public class JavaLexer { case -37: break; case 37: - {org.apache.log4j.Logger.getLogger("parser").debug("Kommentar: "+yytext());} + {de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("Kommentar: "+yytext());} case -38: break; case 38: diff --git a/src/de/dhbwstuttgart/parser/JavaLexer.lex b/src/de/dhbwstuttgart/parser/JavaLexer.lex index 60f3806ed..9df37ace1 100755 --- a/src/de/dhbwstuttgart/parser/JavaLexer.lex +++ b/src/de/dhbwstuttgart/parser/JavaLexer.lex @@ -167,7 +167,7 @@ null { //">>=" {this.token = new Token(JavaParser.SIGNEDSHIFTRIGHTEQUAL, yytext(), yyline, yychar);return true;} //">>>=" {this.token = new Token(JavaParser.UNSIGNEDSHIFTRIGHTEQUAL, yytext(), yyline, yychar);return true;} {ws}|\n { /* System.out.print(yytext()); */ } -\\.\n {org.apache.log4j.Logger.getLogger("parser").debug("Kommentar: "+yytext());} +\\.\n {de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("Kommentar: "+yytext());} "->" {this.token = new Token(JavaParser.LAMBDAASSIGNMENT, yytext(), yyline, yychar);return true;} diff --git a/src/de/dhbwstuttgart/parser/JavaParser.java b/src/de/dhbwstuttgart/parser/JavaParser.java index 4968adaf8..8ab37814a 100644 --- a/src/de/dhbwstuttgart/parser/JavaParser.java +++ b/src/de/dhbwstuttgart/parser/JavaParser.java @@ -978,7 +978,7 @@ case 36: pl.getParalist().addElement(new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(),null, ((Token)yyVals[0+yyTop]).getOffset())); /*pl.getParalist().addElement( new TypePlaceholder($1.getLexem()) );*/ /* ########################################################### */ - org.apache.log4j.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + ((Token)yyVals[0+yyTop]).getLexem() + " TV"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + ((Token)yyVals[0+yyTop]).getLexem() + " TV"); yyVal = pl; } break; @@ -989,7 +989,7 @@ case 37: RefType t = new RefType( ((Token)yyVals[-3+yyTop]).getLexem(),null,((Token)yyVals[-3+yyTop]).getOffset() ); t.set_ParaList( ((ParaList)yyVals[-1+yyTop]).get_ParaList() ); pl.getParalist().addElement(t); - org.apache.log4j.Logger.getLogger("parser").debug( "IDENTIFIER '<' paralist '>' --> Paralist f�r " + ((Token)yyVals[-3+yyTop]).getLexem() + ": RefType"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER '<' paralist '>' --> Paralist f�r " + ((Token)yyVals[-3+yyTop]).getLexem() + ": RefType"); yyVal = pl; } break; @@ -1010,8 +1010,8 @@ case 39: ((ParaList)yyVals[-2+yyTop]).getParalist().addElement(new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(), null,((Token)yyVals[0+yyTop]).getOffset())); /*$1.getParalist().addElement(new TypePlaceholder($3.getLexem()));*/ /* ########################################################### */ - org.apache.log4j.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER --> Paralist f�r " + ((Token)yyVals[0+yyTop]).getLexem() + ": TV"); - org.apache.log4j.Logger.getLogger("parser").debug( "paralist: " + ((ParaList)yyVals[-2+yyTop]).getParalist()); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER --> Paralist f�r " + ((Token)yyVals[0+yyTop]).getLexem() + ": TV"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist: " + ((ParaList)yyVals[-2+yyTop]).getParalist()); yyVal=((ParaList)yyVals[-2+yyTop]); } break; @@ -1021,7 +1021,7 @@ case 40: RefType t = new RefType( ((Token)yyVals[-3+yyTop]).getLexem(),null ,((Token)yyVals[-3+yyTop]).getOffset() ); t.set_ParaList( ((ParaList)yyVals[-1+yyTop]).get_ParaList() ); ((ParaList)yyVals[-5+yyTop]).getParalist().addElement(t); - org.apache.log4j.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER '<' paralist '>' --> Paralist f�r " + ((Token)yyVals[-3+yyTop]).getLexem() + ": RefType"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER '<' paralist '>' --> Paralist f�r " + ((Token)yyVals[-3+yyTop]).getLexem() + ": RefType"); yyVal=((ParaList)yyVals[-5+yyTop]); } break; @@ -1423,7 +1423,7 @@ case 93: case 94: // line 875 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + ((Type)yyVals[-2+yyTop])); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + ((Type)yyVals[-2+yyTop])); ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); yyVal = ((FieldDeclaration)yyVals[-1+yyTop]); } @@ -1955,7 +1955,7 @@ case 155: case 156: // line 1316 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->referenctype: " + ((UsedId)yyVals[0+yyTop])); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("T->Parser->referenctype: " + ((UsedId)yyVals[0+yyTop])); RefType RT = new RefType(null,((UsedId)yyVals[0+yyTop]).getOffset()); /*ausgetauscht PL 05-07-30*/ @@ -2002,7 +2002,7 @@ case 160: case 161: // line 1393 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - org.apache.log4j.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + ((DeclId)yyVals[0+yyTop]).name); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + ((DeclId)yyVals[0+yyTop]).name); FormalParameter FP = new FormalParameter(((DeclId)yyVals[0+yyTop])); @@ -2011,7 +2011,7 @@ case 161: /*Type T = TypePlaceholder.fresh(); //auskommentiert von Andreas Stadelmeier*/ /* Type T = new TypePlaceholder(""); /* otth: Name wird automatisch berechnet * /*/ /* ###########################################################*/ - /*org.apache.log4j.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName());*/ + /*de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName());*/ /*auskommentiert von Andreas Stadelmeier (a10023) FP.setType( T );*/ /*FP.set_DeclId($1);*/ @@ -2132,7 +2132,7 @@ case 176: case 177: // line 1500 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); LocalVarDecl LVD = new LocalVarDecl(((Type)yyVals[-1+yyTop]).getOffset(),((Type)yyVals[-1+yyTop]).getVariableLength()); LVD.setType(((Type)yyVals[-1+yyTop])); LVD.setDeclidVector(((FieldDeclaration)yyVals[0+yyTop]).getDeclIdVector()); @@ -2142,7 +2142,7 @@ case 177: case 178: // line 1511 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); LocalVarDecl LVD = new LocalVarDecl(((FieldDeclaration)yyVals[0+yyTop]).getOffset(),((FieldDeclaration)yyVals[0+yyTop]).getVariableLength()); /*auskommentiert von Andreas Stadelmeier (a10023) LVD.setType(TypePlaceholder.fresh());*/ LVD.setDeclidVector(((FieldDeclaration)yyVals[0+yyTop]).getDeclIdVector()); @@ -2296,7 +2296,7 @@ case 193: case 194: // line 1650 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - org.apache.log4j.Logger.getLogger("parser").debug("conditionalexpression"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("conditionalexpression"); yyVal=((Expr)yyVals[0+yyTop]); } break; @@ -2361,7 +2361,7 @@ case 203: case 204: // line 1703 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n"); Assign Ass = new Assign(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); LocalOrFieldVar LOFV = new LocalOrFieldVar(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); LOFV.set_UsedId(((UsedId)yyVals[-2+yyTop])); @@ -2369,7 +2369,7 @@ case 204: /*auskommentiert von Andreas Stadelmeier (a10023) Ass.setType(TypePlaceholder.fresh());*/ if( ((Operator)yyVals[-1+yyTop]) == null ) { - org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> " + ((Expr)yyVals[0+yyTop]) + " \n"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> " + ((Expr)yyVals[0+yyTop]) + " \n"); Ass.set_Expr( LOFV,((Expr)yyVals[0+yyTop]) ); } else @@ -2378,7 +2378,7 @@ case 204: Bin.set_Expr1(LOFV); Bin.set_Operator(((Operator)yyVals[-1+yyTop])); Bin.set_Expr2(((Expr)yyVals[0+yyTop])); - org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> Binary\n"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> Binary\n"); /*auskommentiert von Andreas Stadelmeier (a10023) Bin.setType(TypePlaceholder.fresh());*/ Ass.set_Expr( LOFV, Bin ); } @@ -2608,7 +2608,7 @@ case 232: case 233: // line 1933 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - org.apache.log4j.Logger.getLogger("parser").debug("M1"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M1"); MethodCall MC = new MethodCall(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); UsedId udidmeth = new UsedId(((UsedId)yyVals[-2+yyTop]).getOffset()); udidmeth.set_Name((String)((((UsedId)yyVals[-2+yyTop]).get_Name()).elementAt(((UsedId)yyVals[-2+yyTop]).get_Name().size()-1))); @@ -2640,7 +2640,7 @@ case 233: case 234: // line 1963 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - org.apache.log4j.Logger.getLogger("parser").debug("M2"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M2"); MethodCall MCarg = new MethodCall(((UsedId)yyVals[-3+yyTop]).getOffset(),((UsedId)yyVals[-3+yyTop]).getVariableLength()); UsedId udidmeth = new UsedId(((UsedId)yyVals[-3+yyTop]).getOffset()); udidmeth.set_Name((String)((((UsedId)yyVals[-3+yyTop]).get_Name()).elementAt(((UsedId)yyVals[-3+yyTop]).get_Name().size()-1))); @@ -2673,7 +2673,7 @@ case 234: case 235: // line 1994 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - org.apache.log4j.Logger.getLogger("parser").debug("M3"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M3"); MethodCall MCpr = new MethodCall(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); /* PL 05-08-21 primary ist kein UsedId*/ @@ -2694,7 +2694,7 @@ case 235: case 236: // line 2013 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - org.apache.log4j.Logger.getLogger("parser").debug("M4"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M4"); MethodCall MCPA = new MethodCall(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); /* PL 05-08-21 primary ist kein UsedId*/ diff --git a/src/de/dhbwstuttgart/parser/JavaParser.jay b/src/de/dhbwstuttgart/parser/JavaParser.jay index 23de6cbf8..80d2bd39b 100755 --- a/src/de/dhbwstuttgart/parser/JavaParser.jay +++ b/src/de/dhbwstuttgart/parser/JavaParser.jay @@ -486,7 +486,7 @@ paralist : IDENTIFIER pl.getParalist().addElement(new GenericTypeVar($1.getLexem(),null, $1.getOffset())); //pl.getParalist().addElement( new TypePlaceholder($1.getLexem()) ); /* ########################################################### */ - org.apache.log4j.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + $1.getLexem() + " TV"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + $1.getLexem() + " TV"); $$ = pl; } | IDENTIFIER '<' paralist '>' @@ -495,7 +495,7 @@ paralist : IDENTIFIER RefType t = new RefType( $1.getLexem(),null,$1.getOffset() ); t.set_ParaList( $3.get_ParaList() ); pl.getParalist().addElement(t); - org.apache.log4j.Logger.getLogger("parser").debug( "IDENTIFIER '<' paralist '>' --> Paralist f�r " + $1.getLexem() + ": RefType"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER '<' paralist '>' --> Paralist f�r " + $1.getLexem() + ": RefType"); $$ = pl; } | wildcardparameter @@ -512,8 +512,8 @@ paralist : IDENTIFIER $1.getParalist().addElement(new GenericTypeVar($3.getLexem(), null,$3.getOffset())); //$1.getParalist().addElement(new TypePlaceholder($3.getLexem())); /* ########################################################### */ - org.apache.log4j.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER --> Paralist f�r " + $3.getLexem() + ": TV"); - org.apache.log4j.Logger.getLogger("parser").debug( "paralist: " + $1.getParalist()); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER --> Paralist f�r " + $3.getLexem() + ": TV"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist: " + $1.getParalist()); $$=$1; } @@ -522,7 +522,7 @@ paralist : IDENTIFIER RefType t = new RefType( $3.getLexem(),null ,$3.getOffset() ); t.set_ParaList( $5.get_ParaList() ); $1.getParalist().addElement(t); - org.apache.log4j.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER '<' paralist '>' --> Paralist f�r " + $3.getLexem() + ": RefType"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER '<' paralist '>' --> Paralist f�r " + $3.getLexem() + ": RefType"); $$=$1; } | paralist ',' wildcardparameter @@ -873,7 +873,7 @@ fielddeclaration : type fielddeclarator ';' | type variabledeclarators ';' { - org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + $1); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + $1); $2.setType($1); $$ = $2; } @@ -1314,7 +1314,7 @@ referencelongtype : typename parameter referencetype :classorinterfacetype { - org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->referenctype: " + $1); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("T->Parser->referenctype: " + $1); RefType RT = new RefType(null,$1.getOffset()); //ausgetauscht PL 05-07-30 @@ -1385,13 +1385,13 @@ formalparameter : type variabledeclaratorid //FP.set_DeclId($5); $$=FP; - org.apache.log4j.Logger.getLogger("parser").debug("P->Polymorphes Methodenargument hinzugefuegt: Name = " + $5.get_Name() + " Typ = " + $1.getName()); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P->Polymorphes Methodenargument hinzugefuegt: Name = " + $5.get_Name() + " Typ = " + $1.getName()); } */ | variabledeclaratorid { - org.apache.log4j.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + $1.name); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + $1.name); FormalParameter FP = new FormalParameter($1); @@ -1400,7 +1400,7 @@ formalparameter : type variabledeclaratorid //Type T = TypePlaceholder.fresh(); //auskommentiert von Andreas Stadelmeier // Type T = new TypePlaceholder(""); /* otth: Name wird automatisch berechnet */ // ########################################################### - //org.apache.log4j.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName()); + //de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName()); //auskommentiert von Andreas Stadelmeier (a10023) FP.setType( T ); //FP.set_DeclId($1); @@ -1498,7 +1498,7 @@ integraltype :INT localvariabledeclaration : type variabledeclarators { - org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); LocalVarDecl LVD = new LocalVarDecl($1.getOffset(),$1.getVariableLength()); LVD.setType($1); LVD.setDeclidVector($2.getDeclIdVector()); @@ -1509,7 +1509,7 @@ localvariabledeclaration : type variabledeclarators /* ########################################################### */ |variabledeclarators { - org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); LocalVarDecl LVD = new LocalVarDecl($1.getOffset(),$1.getVariableLength()); //auskommentiert von Andreas Stadelmeier (a10023) LVD.setType(TypePlaceholder.fresh()); LVD.setDeclidVector($1.getDeclIdVector()); @@ -1648,7 +1648,7 @@ forstatement assignmentexpression : conditionalexpression { - org.apache.log4j.Logger.getLogger("parser").debug("conditionalexpression"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("conditionalexpression"); $$=$1; } | assignment @@ -1701,7 +1701,7 @@ conditionalexpression :conditionalorexpression assignment :lefthandside assignmentoperator assignmentexpression { - org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n"); Assign Ass = new Assign($1.getOffset(),$1.getVariableLength()); LocalOrFieldVar LOFV = new LocalOrFieldVar($1.getOffset(),$1.getVariableLength()); LOFV.set_UsedId($1); @@ -1709,7 +1709,7 @@ assignment :lefthandside assignmentoperator assignmentexpr //auskommentiert von Andreas Stadelmeier (a10023) Ass.setType(TypePlaceholder.fresh()); if( $2 == null ) { - org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> " + $3 + " \n"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> " + $3 + " \n"); Ass.set_Expr( LOFV,$3 ); } else @@ -1718,7 +1718,7 @@ assignment :lefthandside assignmentoperator assignmentexpr Bin.set_Expr1(LOFV); Bin.set_Operator($2); Bin.set_Expr2($3); - org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> Binary\n"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> Binary\n"); //auskommentiert von Andreas Stadelmeier (a10023) Bin.setType(TypePlaceholder.fresh()); Ass.set_Expr( LOFV, Bin ); } @@ -1931,7 +1931,7 @@ postdecrementexpression :postfixexpression DECREMENT methodinvocation: name '(' ')' { - org.apache.log4j.Logger.getLogger("parser").debug("M1"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M1"); MethodCall MC = new MethodCall($1.getOffset(),$1.getVariableLength()); UsedId udidmeth = new UsedId($1.getOffset()); udidmeth.set_Name((String)(($1.get_Name()).elementAt($1.get_Name().size()-1))); @@ -1961,7 +1961,7 @@ methodinvocation: } | name '('argumentlist')' { - org.apache.log4j.Logger.getLogger("parser").debug("M2"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M2"); MethodCall MCarg = new MethodCall($1.getOffset(),$1.getVariableLength()); UsedId udidmeth = new UsedId($1.getOffset()); udidmeth.set_Name((String)(($1.get_Name()).elementAt($1.get_Name().size()-1))); @@ -1992,7 +1992,7 @@ methodinvocation: } | primary '.' IDENTIFIER '(' ')' { - org.apache.log4j.Logger.getLogger("parser").debug("M3"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M3"); MethodCall MCpr = new MethodCall($1.getOffset(),$1.getVariableLength()); // PL 05-08-21 primary ist kein UsedId @@ -2011,7 +2011,7 @@ methodinvocation: } | primary '.' IDENTIFIER '('argumentlist ')' { - org.apache.log4j.Logger.getLogger("parser").debug("M4"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M4"); MethodCall MCPA = new MethodCall($1.getOffset(),$1.getVariableLength()); // PL 05-08-21 primary ist kein UsedId diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index a33f3d761..65f07318f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -9,7 +9,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.core.AClassOrInterface; import de.dhbwstuttgart.core.IItemWithOffset; diff --git a/src/de/dhbwstuttgart/syntaxtree/ClassBody.java b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java index 3dd79b67b..da24d8cd8 100755 --- a/src/de/dhbwstuttgart/syntaxtree/ClassBody.java +++ b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java @@ -6,7 +6,7 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java index 47101ad59..d3d67c876 100755 --- a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java +++ b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java @@ -5,7 +5,7 @@ package de.dhbwstuttgart.syntaxtree; // ino.module.FormalParameter.8561.import import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; diff --git a/src/de/dhbwstuttgart/syntaxtree/Method.java b/src/de/dhbwstuttgart/syntaxtree/Method.java index 9b0d5bba7..6d8725b8b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Method.java +++ b/src/de/dhbwstuttgart/syntaxtree/Method.java @@ -7,7 +7,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.core.IItemWithOffset; diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index f98cf2303..d1f45761c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -10,8 +10,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; - +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.core.AClassOrInterface; import de.dhbwstuttgart.core.MyCompiler; @@ -45,6 +44,7 @@ import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.unify.FC_TTO; +import de.dhbwstuttgart.typeinference.unify.Unifier; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -691,11 +691,16 @@ public class SourceFile //////////////// //Unmögliche ConstraintsSets aussortieren durch Unifizierung - oderConstraints.filterWrongConstraints((pairs)->{return Unify.unify(pairs,finiteClosure);}); + Unifier unifier = (pairs)->{ + Vector> retValue = new Vector<>(); + retValue = Unify.unify(pairs, finiteClosure); + return retValue;}; + oderConstraints.filterWrongConstraints(unifier); + oderConstraints.unifyUndConstraints(unifier); typinferenzLog.debug("Übriggebliebene Konstraints:\n"+oderConstraints+"\n"); //Die Constraints in Pair's umwandeln (Karthesisches Produkt bilden): Vector> xConstraints = new Vector>();// = oderConstraints.getConstraints(); - for(Vector uC:oderConstraints.getConstraints()){ //mit dem getConstraints-Aufruf wird das Karthesische Produkt erzeugt. + for(Vector uC : oderConstraints.getConstraints()){ //mit dem getConstraints-Aufruf wird das Karthesische Produkt erzeugt. Vector cons = new Vector(); for(UndConstraint undCons:uC){ cons.addAll(undCons.getConstraintPairs()); diff --git a/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java index 7142823ca..111c0b53b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java @@ -4,7 +4,7 @@ package de.dhbwstuttgart.syntaxtree.misc; // ino.module.DeclId.8558.import import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java index 04bffdb17..96196a5a9 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java @@ -7,7 +7,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java index b062ff294..0e2934d55 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java @@ -7,7 +7,7 @@ import java.util.HashMap; import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java index c6780c41f..316b7bfe7 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java @@ -7,7 +7,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java index 7bbaf7577..dcb75bad6 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java @@ -5,7 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java index 681a03547..3e0870905 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java @@ -6,7 +6,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java index a8b3e8f6d..3790bbfc0 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java @@ -4,7 +4,7 @@ package de.dhbwstuttgart.syntaxtree.statement; // ino.module.CharLiteral.8628.import import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java index 55a3d430c..a9b870565 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java @@ -6,7 +6,7 @@ import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java index 24fe0cb0e..0d99f4195 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java @@ -5,7 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java index 14451efd0..40c30950e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java @@ -6,7 +6,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.syntaxtree.type.Type; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java index b1e1bb2b1..36d1dc5b6 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java @@ -5,7 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java index d103c6e86..e8e2e7a45 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java @@ -5,7 +5,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java index 59b315051..8b8ae0460 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java @@ -7,7 +7,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java index 28fa843b3..c98496c62 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java @@ -7,7 +7,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java index 79276d895..1f49be5d6 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java @@ -6,7 +6,7 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java index d251cd7b0..1e13b855c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java @@ -5,7 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java index d773f48c8..3266d67a7 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java @@ -6,7 +6,7 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java index 855f9ddef..5358a9e29 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java @@ -6,7 +6,7 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; @@ -209,7 +209,7 @@ public class LocalVarDecl extends Statement implements TypeInsertable throw ex; } else if(paralist==null && c.get_ParaList().size()>0){ - parserlog.debug(paralist); + parserlog.debug(paralist.toString()); parserlog.debug(c.getName()+" "+c.get_ParaList().size()); SCStatementException ex = new SCStatementException(); SCExcept e = new SCExcept(); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java index 7317255ff..c35f333a2 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java @@ -6,7 +6,7 @@ import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java index a2c418d04..d6e596c1a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java @@ -5,7 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java index c83cfe5a0..108ec3800 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java @@ -6,7 +6,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java index 94e9af5c9..a1f03f3c3 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java @@ -6,7 +6,7 @@ import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java index d279ebff9..ce586551b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java @@ -8,7 +8,7 @@ import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java index 0b7a2a55d..e859441eb 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java @@ -6,7 +6,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java index a02121ac3..b60060c44 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java @@ -6,7 +6,7 @@ import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java index bea0c19dd..4e2ff472f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java @@ -6,7 +6,7 @@ import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java index 99b83e516..2c224f97d 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java @@ -6,7 +6,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java index 3837a3aa2..02959a14d 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java @@ -6,7 +6,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java index a40139a3d..778f7491e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java @@ -6,7 +6,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java index 97a5bc0dc..51553b2f4 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java @@ -6,7 +6,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java b/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java index bfe41dd71..8ed2da922 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java @@ -5,7 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Return.java b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java index 865bf1da9..d0c13f816 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Return.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java @@ -5,7 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java index a1ed579f4..631234263 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java @@ -6,7 +6,7 @@ import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/This.java b/src/de/dhbwstuttgart/syntaxtree/statement/This.java index 7733b5aac..e7c836fa5 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/This.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/This.java @@ -5,7 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java index 7649743cc..8d1e0ddcc 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java @@ -7,7 +7,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; diff --git a/src/de/dhbwstuttgart/syntaxtree/type/ParaList.java b/src/de/dhbwstuttgart/syntaxtree/type/ParaList.java index efa0b35f2..6ac63a028 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/ParaList.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/ParaList.java @@ -3,7 +3,7 @@ package de.dhbwstuttgart.syntaxtree.type; // ino.end // ino.module.ParaList.8674.import import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java index ba8178dd8..85e4ba2fb 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -8,7 +8,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Void.java b/src/de/dhbwstuttgart/syntaxtree/type/Void.java index 2ef1cd1c3..1e58e5647 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Void.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Void.java @@ -74,5 +74,11 @@ public class Void extends RefType public ConstraintType TYPE(TypeAssumptions ass, SyntaxTreeNode parent){ return new ConstraintType(this); } + + @Override + public Type checkTYPE(TypeAssumptions ass, SyntaxTreeNode method) { + return this;//VOID ist immer korrekt, das wird vom Parser geprüft + } + } // ino.end diff --git a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java index 4a28b6877..139393209 100755 --- a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java +++ b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java @@ -57,4 +57,23 @@ public class ConstraintsSet implements Iterable{ constraint.filterWrongConstraints(unify); } } + + public void unifyUndConstraints(Unifier unifier) { + Vector uCons = this.filterUndConstraints(); + + } + + /** + * Aus dem ConstraintsSet [ u1, u2, ... (OderConstraint), ... uN ] werden alle + * UndConstraints, welche sich nicht innerhalb eines OderConstraints befinden, herausgefiltert + * @return [u1, ... , uN] + */ + private Vector filterUndConstraints() { + Vector ret = new Vector<>(); + for(OderConstraint con : constraintsSet){ + UndConstraint filtered = con.filterUndConstraints(); + if(filtered != null)ret.add(filtered); + } + return ret; + } } diff --git a/src/de/dhbwstuttgart/typeinference/OderConstraint.java b/src/de/dhbwstuttgart/typeinference/OderConstraint.java index 53fd06bb1..84f59d6a4 100755 --- a/src/de/dhbwstuttgart/typeinference/OderConstraint.java +++ b/src/de/dhbwstuttgart/typeinference/OderConstraint.java @@ -2,7 +2,7 @@ package de.dhbwstuttgart.typeinference; import java.util.Vector; -import de.dhbwstuttgart.logger.TypinferenzLog; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; @@ -11,6 +11,8 @@ import de.dhbwstuttgart.typeinference.unify.Unifier; public class OderConstraint{ private Vector oderConstraintPairs; + private final static Logger logger = Logger.getLogger(OderConstraint.class.getName()); + /** * Erstellt ein neues Oder Constraint und fügt bereits ein Constraint hinzu. * @param p1 @@ -81,16 +83,21 @@ public class OderConstraint{ oderConstraintPairs.add(methodConstraint); } - public void filterWrongConstraints(Unifier unify) { + void filterWrongConstraints(Unifier unifier) { Vector filteredConstraints = new Vector<>(); for(UndConstraint cons : this.getUndConstraints()){ - if(!unify.unify(cons.getConstraintPairs()).isEmpty()){ + Vector> unifierResult = unifier.apply(cons.getConstraintPairs()); + if(!unifierResult.isEmpty()){ filteredConstraints.add(cons); }else{ - TypinferenzLog.debug("Ausgesondertes Constraint: "+cons); + logger.debug("Ausgesondertes Constraint: "+cons); } } this.oderConstraintPairs = filteredConstraints; } + + UndConstraint filterUndConstraints() { + return null; + } } diff --git a/src/de/dhbwstuttgart/typeinference/UndConstraint.java b/src/de/dhbwstuttgart/typeinference/UndConstraint.java index b8f6b9ccb..6dd7ec147 100755 --- a/src/de/dhbwstuttgart/typeinference/UndConstraint.java +++ b/src/de/dhbwstuttgart/typeinference/UndConstraint.java @@ -3,6 +3,7 @@ package de.dhbwstuttgart.typeinference; import java.util.Vector; import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.unify.Unifier; /** * Stellt ein Constraint dar, welches aus mehreren Constraint-Paaren besteht. Diese gelten alle stets gleichzeitig / sind per "Und" miteinander verknüpft. @@ -36,5 +37,14 @@ public class UndConstraint extends OderConstraint { } return ret+"]"; } + + @Override + void filterWrongConstraints(Unifier unifier) { + //In einem UndConstraint gibt es keine falschen Constraints + } + @Override + UndConstraint filterUndConstraints(){ + return this; + } } diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java index 671a560d1..1a34a845f 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java @@ -5,7 +5,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; diff --git a/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java b/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java index 05cac78ec..7e86182c7 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java +++ b/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java @@ -6,7 +6,7 @@ package de.dhbwstuttgart.typeinference.unify; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; // ino.end diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unifier.java b/src/de/dhbwstuttgart/typeinference/unify/Unifier.java index 73478957c..f51eb9b9f 100644 --- a/src/de/dhbwstuttgart/typeinference/unify/Unifier.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unifier.java @@ -6,6 +6,6 @@ import de.dhbwstuttgart.typeinference.Pair; public interface Unifier { - public Vector> unify (Vector E); + public Vector> apply (Vector E); } diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index 7e3b82214..886226a56 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -7,7 +7,7 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.apache.log4j.Logger; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.MatchException; @@ -128,7 +128,7 @@ public class Unify //WAS PASSIERT MIT EINE PAAR HIER DRIN BLEIBT??? Eq_12.addElement(P); printMenge("Eq_12", Eq_12, 6); - inferencelog.debug(P.OperatorEqual()); + //inferencelog.debug(P.OperatorEqual()); } else if (P.TA1 instanceof BoundedGenericTypeVar && P.TA2 instanceof RefType) { //PL 06-06-13 @@ -224,7 +224,7 @@ public class Unify else ready = false; sigma.addElement(new Pair(r1, r2)); } - inferencelog.debug(ready); + //inferencelog.debug(ready); if (!ready) { printMenge("Sigma", sigma, 6); diff --git a/test/log4jTesting.xml b/test/log4jTesting.xml index 642079a31..dc30c2453 100755 --- a/test/log4jTesting.xml +++ b/test/log4jTesting.xml @@ -3,10 +3,10 @@ - + - + diff --git a/test/mycompiler/test/AllTests.java b/test/mycompiler/test/AllTests.java index c793951ec..c4e1235ad 100755 --- a/test/mycompiler/test/AllTests.java +++ b/test/mycompiler/test/AllTests.java @@ -13,7 +13,7 @@ import mycompiler.test.operators.AllTestsOperators; import mycompiler.test.primitiveTypes.AllTestsPrimitiveTypes; import mycompiler.test.trivial.AllTestsTrivial; -import org.apache.log4j.xml.DOMConfigurator; +import de.dhbwstuttgart.logger.xml.DOMConfigurator; public class AllTests { diff --git a/test/mycompiler/test/Log4jWrapper.java b/test/mycompiler/test/Log4jWrapper.java index 456923605..715dedb27 100755 --- a/test/mycompiler/test/Log4jWrapper.java +++ b/test/mycompiler/test/Log4jWrapper.java @@ -1,6 +1,6 @@ package mycompiler.test; -import org.apache.log4j.xml.DOMConfigurator; +import de.dhbwstuttgart.logger.xml.DOMConfigurator; /** * needed to assure one-time execution of configure script diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCall.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCall.java index fb2bf1846..aac98c000 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCall.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCall.java @@ -1,6 +1,6 @@ package mycompiler.test.inferenceByCharacteristic; -import org.apache.log4j.xml.DOMConfigurator; +import de.dhbwstuttgart.logger.xml.DOMConfigurator; import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java index 2863bf1c3..ae4f48cd9 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java @@ -4,8 +4,8 @@ import java.util.Vector; import junit.framework.TestCase; -import org.apache.log4j.Logger; -import org.apache.log4j.xml.DOMConfigurator; +import de.dhbwstuttgart.logger.Logger; +import de.dhbwstuttgart.logger.xml.DOMConfigurator; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassBody; diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java index 537464c61..e9ea300fd 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java @@ -5,8 +5,8 @@ import java.util.Vector; import junit.framework.TestCase; -import org.apache.log4j.Logger; -import org.apache.log4j.xml.DOMConfigurator; +import de.dhbwstuttgart.logger.Logger; +import de.dhbwstuttgart.logger.xml.DOMConfigurator; import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java index 757655097..7a42c8d29 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java @@ -4,7 +4,7 @@ import java.util.Vector; import junit.framework.TestCase; -import org.apache.log4j.xml.DOMConfigurator; +import de.dhbwstuttgart.logger.xml.DOMConfigurator; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/test/plugindevelopment/TypeInsertTester.java b/test/plugindevelopment/TypeInsertTester.java index aba7e5b85..1b2df5471 100644 --- a/test/plugindevelopment/TypeInsertTester.java +++ b/test/plugindevelopment/TypeInsertTester.java @@ -10,12 +10,7 @@ import java.nio.file.Files; import java.nio.file.Paths; import java.util.Vector; -import org.apache.log4j.ConsoleAppender; -import org.apache.log4j.FileAppender; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; -import org.apache.log4j.PatternLayout; -import org.apache.log4j.SimpleLayout; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; @@ -31,11 +26,14 @@ public class TypeInsertTester{ private static Logger inferencelog = Logger.getLogger("Typeinference"); static{ { + Logger.setStandardOutput(System.out); + /* // Ausgabeoptionen fuer die Logger ConsoleAppender logAppender = new ConsoleAppender(new SimpleLayout()); logAppender.setTarget("System.out"); logAppender.activateOptions(); inferencelog.addAppender(logAppender); //Bei den Tests wird der Log auch in System.out geschrieben. + */ } } static final String rootDirectory = System.getProperty("user.dir")+"/test/plugindevelopment/"; From 4e394ae12c6b2761329d146ce3e398b693071f12 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 9 Oct 2014 12:01:41 +0200 Subject: [PATCH 35/46] =?UTF-8?q?Neuer=20Testfall=20angef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TypeInsertTests/LambdaTest25.jav | 8 ++++++++ .../TypeInsertTests/LambdaTest25.java | 16 ++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest25.jav create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest25.java diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest25.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest25.jav new file mode 100644 index 000000000..a499b2bdd --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest25.jav @@ -0,0 +1,8 @@ +import java.util.Vector; + +class ImportGeneric { + + m (Vector x) { + return x.elementAt(1); + } +} diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest25.java b/test/plugindevelopment/TypeInsertTests/LambdaTest25.java new file mode 100644 index 000000000..1737aceee --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest25.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class LambdaTest25 { + private static final String TEST_FILE = "LambdaTest25.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + mustContain.add("Integer m"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} From efa79da5d509befca80a38ea76f512c9a881a3bd Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 9 Oct 2014 13:54:44 +0200 Subject: [PATCH 36/46] filterUndConstraints --- src/de/dhbwstuttgart/typeinference/ConstraintsSet.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java index 139393209..c7f052ca4 100755 --- a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java +++ b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java @@ -60,6 +60,11 @@ public class ConstraintsSet implements Iterable{ public void unifyUndConstraints(Unifier unifier) { Vector uCons = this.filterUndConstraints(); + Vector alleUndConstraints = new Vector<>(); + for(UndConstraint undConstraint : uCons){ + alleUndConstraints.addAll(undConstraint.getConstraintPairs()); + } + Vector> unifyResult = unifier.apply(alleUndConstraints); } From 1141417c0be3e520100e80d8f86896567fbbd538 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 9 Oct 2014 17:38:10 +0200 Subject: [PATCH 37/46] Weitere Aussonderung von Constraints durch Unify --- bin/.gitignore | 2 + .../dhbwstuttgart/core/ConsoleInterface.java | 4 +- src/de/dhbwstuttgart/core/MyCompiler.java | 10 +++-- src/de/dhbwstuttgart/logger/Logger.java | 44 ++++++++++++++----- src/de/dhbwstuttgart/syntaxtree/Class.java | 18 ++++---- .../dhbwstuttgart/syntaxtree/SourceFile.java | 17 +++---- .../syntaxtree/type/RefType.java | 4 +- .../syntaxtree/type/TypePlaceholder.java | 4 +- .../typeinference/ConstraintsSet.java | 20 +++++++-- .../typeinference/OderConstraint.java | 6 ++- src/de/dhbwstuttgart/typeinference/Pair.java | 2 +- .../assumptions/TypeAssumptions.java | 10 ++--- test/plugindevelopment/TypeInsertTester.java | 2 +- 13 files changed, 92 insertions(+), 51 deletions(-) diff --git a/bin/.gitignore b/bin/.gitignore index f1735d3a6..8ac1c637b 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,3 +1,5 @@ /de/ /mycompiler/ /plugindevelopment/ +/bytecode/ +/parser/ diff --git a/src/de/dhbwstuttgart/core/ConsoleInterface.java b/src/de/dhbwstuttgart/core/ConsoleInterface.java index 742f0fe61..e453b0b1c 100755 --- a/src/de/dhbwstuttgart/core/ConsoleInterface.java +++ b/src/de/dhbwstuttgart/core/ConsoleInterface.java @@ -11,7 +11,7 @@ import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; public class ConsoleInterface { private static final String directory = System.getProperty("user.dir"); - + private static final Logger log = Logger.getLogger( ConsoleInterface.class.getName() ); /** * @param args */ @@ -20,7 +20,7 @@ public class ConsoleInterface { for(String file : args){ filenames.add(file); } - Logger.setOutput(null); // sämtliches Logging unterdrücken + Logger.setStandardOutput(null); // sämtliches Logging unterdrücken run(filenames); } diff --git a/src/de/dhbwstuttgart/core/MyCompiler.java b/src/de/dhbwstuttgart/core/MyCompiler.java index 7ec12f3b9..375cd684b 100755 --- a/src/de/dhbwstuttgart/core/MyCompiler.java +++ b/src/de/dhbwstuttgart/core/MyCompiler.java @@ -66,13 +66,13 @@ public class MyCompiler implements MyCompilerAPI // Logger // ino.end // ino.attribute.codegenlog.21265.declaration - protected static Logger codegenlog = Logger.getLogger("codegen"); + //protected static Logger codegenlog = Logger.getLogger("codegen"); // ino.end // ino.attribute.inferencelog.21268.declaration - protected static Logger inferencelog = Logger.getLogger("inference"); + protected static Logger inferencelog = Logger.getLogger(MyCompiler.class.getName()); // ino.end // ino.attribute.parserlog.21271.declaration - protected static Logger parserlog = Logger.getLogger("parser"); + //protected static Logger parserlog = Logger.getLogger("parser"); // ino.end // ino.attribute.OutputDir.21274.declaration @@ -180,7 +180,7 @@ public class MyCompiler implements MyCompilerAPI } else { - parserlog.error( "SEMANTIK-CHECK-FEHLER: Parameter " + TempParameter.getName() + " muss weitere Parameter besitzen (laut Klassendefinition)" ); + //parserlog.error( "SEMANTIK-CHECK-FEHLER: Parameter " + TempParameter.getName() + " muss weitere Parameter besitzen (laut Klassendefinition)" ); //FIXME Throw exception instead of simple exit System.exit( 1 ); } @@ -512,6 +512,8 @@ public class MyCompiler implements MyCompilerAPI // ino.end // ino.method.typeReconstruction.21304.body { + Logger.setStandardOutput(System.out); //TODO: Hier noch das Log-Level richtig setzen (je nachdem ob debugt wird oder nicht) + if(m_AbstractSyntaxTree==null){ throw new NullPointerException("Es wurde noch kein Abstrakter Syntaxbaum erstellt!"); } diff --git a/src/de/dhbwstuttgart/logger/Logger.java b/src/de/dhbwstuttgart/logger/Logger.java index a640ae551..3003da8ea 100644 --- a/src/de/dhbwstuttgart/logger/Logger.java +++ b/src/de/dhbwstuttgart/logger/Logger.java @@ -2,6 +2,7 @@ package de.dhbwstuttgart.logger; import java.io.PrintStream; import java.util.HashMap; +import java.util.logging.Level; public class Logger { @@ -9,17 +10,35 @@ public class Logger { private static final HashMap LOGGER_DIRECTORY = new HashMap<>(); private String name; - private PrintStream output; - + private final java.util.logging.Logger log; + private Logger(String name, PrintStream output) { this.name = name; - this.output = output; + this.log = java.util.logging.Logger.getLogger( name ); + if(output != null)log.addHandler(new OutputHandler(output)); + log.setLevel(Level.FINE); } - public void debug(String message){ - output(message); + /** + * Logt eine Debug Message, welche zusätzlich einer bestimmten Section zugewiesen wird. + * Dadurch lässt sich die DEBUG ausgabe übersichtlicher gestalten. + * @param message + * @param section + */ + public void debug(String message, Section section){ + output(message, Level.FINE); } + public void debug(String message){ + //output(message, Level.FINE); + } + + /** + * Liefert den Logger mit dem angegebenen Namen. + * Üblicherweise wird diese Methode mit dem Namen der Klasse aufgerufen, in welcher der Logger tätig ist. + * @param name - Name der Klasse ( Ermittelbar mittels .class.getName() ) + * @return + */ public static Logger getLogger(String name) { Logger ret; if(LOGGER_DIRECTORY.containsKey(name)){ @@ -31,22 +50,23 @@ public class Logger { return ret; } - private void output(String msg){ + private void output(String msg , Level logLevel){ + log.log(logLevel, msg); + /* if(output != null){ output.println(msg); }else if(standardOutput != null){ standardOutput.println(msg); } + */ } - public void info(String string) { - // TODO Auto-generated method stub - + public void info(String message) { + output(message, Level.INFO); } - public void error(String string) { - // TODO Auto-generated method stub - + public void error(String message) { + output(message, Level.WARNING); } /** diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index 65f07318f..a23e235ae 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -10,7 +10,7 @@ import java.util.Iterator; import java.util.Vector; import de.dhbwstuttgart.logger.Logger; - +import de.dhbwstuttgart.logger.Section; import de.dhbwstuttgart.core.AClassOrInterface; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.parser.JavaClassName; @@ -44,8 +44,8 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit * Log4j - Loggerinstanzen */ protected static Logger inferencelog = Logger.getLogger("inference"); - protected static Logger codegenlog = Logger.getLogger("codegen"); - protected static Logger parserlog = Logger.getLogger("parser"); + //protected static Logger codegenlog = Logger.getLogger("codegen"); + //protected static Logger parserlog = Logger.getLogger("parser"); protected UsedId pkgName; protected Modifiers modifiers; protected String name; @@ -137,9 +137,9 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit private TypeAssumptions typeAssumptions = null;//muss mit null Initialisiert werden. Darf nur über getTypeAssumptions abgerufen werden. // ino.attribute.parserlog.23038.declaration - protected Logger parselog = Logger.getLogger("parser"); + //protected Logger parselog = Logger.getLogger("parser"); // ino.end - protected Logger typinferenzLog = Logger.getLogger("Typeinference"); + protected Logger typinferenzLog = Logger.getLogger(Class.class.getName()); private SyntaxTreeNode parent; private Vector fielddecl = new Vector(); private GenericDeclarationList genericClassParameters; @@ -267,7 +267,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } - parserlog.debug("Neue Klasse: " + name); + //parserlog.debug("Neue Klasse: " + name); } // ino.end @@ -658,7 +658,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit ////////////////////////////// inferencelog.info("Rufe TRStart()..."); - typinferenzLog.debug("Erstellte FiniteClosure: "+supportData); + typinferenzLog.debug("Erstellte FiniteClosure: "+supportData, Section.TYPEINFERENCE); ////////////////////////////// // Ab hier ... // @author A10023 - Andreas Stadelmeier: @@ -677,7 +677,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit if(gparam instanceof GenericTypeVar)oderConstraints.add(((GenericTypeVar)gparam).TYPE(assumptions)); //Constraints für die Generischen Variablen erstellen und diese dem AssumptionsSet hinzufügen } - typinferenzLog.debug("Erstellte Assumptions: "+assumptions); + typinferenzLog.debug("Erstellte Assumptions: "+assumptions, Section.TYPEINFERENCE); /* //Generiere Liste mit Expressions, welche zur Initialisierung von Feldern verwendet werden. Vector fieldInitializers = new Vector(); @@ -696,7 +696,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit for(Field f:this.getFields()){ oderConstraints.add(f.TYPE(assumptions)); } - typinferenzLog.debug("Erstellte Constraints: "+oderConstraints); + typinferenzLog.debug("Erstellte Constraints: "+oderConstraints, Section.TYPEINFERENCE); return oderConstraints; diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index d1f45761c..594825103 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -11,6 +11,7 @@ import java.util.Iterator; import java.util.Vector; import de.dhbwstuttgart.logger.Logger; +import de.dhbwstuttgart.logger.Section; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.core.AClassOrInterface; import de.dhbwstuttgart.core.MyCompiler; @@ -673,12 +674,12 @@ public class SourceFile //Assumptions der importierten Klassen sammeln: TypeAssumptions importAssumptions = this.makeBasicAssumptionsFromJRE(imports, true); globalAssumptions.add(importAssumptions); - typinferenzLog.debug("Von JRE erstellte Assumptions: "+importAssumptions); + typinferenzLog.debug("Von JRE erstellte Assumptions: "+importAssumptions, Section.TYPEINFERENCE); //FiniteClosure generieren: FC_TTO finiteClosure = this.makeFC(globalAssumptions); - typinferenzLog.debug("FiniteClosure: \n"+finiteClosure); + typinferenzLog.debug("FiniteClosure: \n"+finiteClosure, Section.TYPEINFERENCE); ConstraintsSet oderConstraints = new ConstraintsSet(); //Alle Constraints der in dieser SourceFile enthaltenen Klassen sammeln: @@ -697,7 +698,7 @@ public class SourceFile return retValue;}; oderConstraints.filterWrongConstraints(unifier); oderConstraints.unifyUndConstraints(unifier); - typinferenzLog.debug("Übriggebliebene Konstraints:\n"+oderConstraints+"\n"); + typinferenzLog.debug("Übriggebliebene Konstraints:\n"+oderConstraints+"\n", Section.TYPEINFERENCE); //Die Constraints in Pair's umwandeln (Karthesisches Produkt bilden): Vector> xConstraints = new Vector>();// = oderConstraints.getConstraints(); for(Vector uC : oderConstraints.getConstraints()){ //mit dem getConstraints-Aufruf wird das Karthesische Produkt erzeugt. @@ -707,7 +708,7 @@ public class SourceFile } xConstraints.add(cons); } - typinferenzLog.debug("Karthesisches Produkt der Constraints: "+xConstraints); + typinferenzLog.debug("Karthesisches Produkt der Constraints: "+xConstraints, Section.TYPEINFERENCE); finiteClosure.generateFullyNamedTypes(globalAssumptions); @@ -781,7 +782,7 @@ public class SourceFile result.addAll(unifyResult); // Debugoutput:Vector> - typinferenzLog.debug("Unifiziertes Ergebnis: "+result); + typinferenzLog.debug("Unifiziertes Ergebnis: "+result, Section.TYPEINFERENCE); /* // Prüfe ob eindeutige Lösung: @@ -803,7 +804,7 @@ public class SourceFile //typinferenzLog.debug(supportData.getFiniteClosure()); //typinferenzLog.debug("Typinformationen: \n"+this.getTypeInformation(this.getMethodList(), fieldInitializers)); - typinferenzLog.debug("\nJavaFiles:\n"); + typinferenzLog.debug("\nJavaFiles:\n", Section.TYPEINFERENCE); //typinferenzLog.debug(this.printJavaCode(new ResultSet(new Vector()))); @@ -818,8 +819,8 @@ public class SourceFile ret.add(reconstructionResult); //ResultSet res = new ResultSet(resultSet); - typinferenzLog.debug("JavaFile für ResultSet "+reconstructionResult+"\n"); - typinferenzLog.debug(klasse.printJavaCode(reconstructionResult)); + typinferenzLog.debug("JavaFile für ResultSet "+reconstructionResult+"\n", Section.TYPEINFERENCE); + typinferenzLog.debug(klasse.printJavaCode(reconstructionResult), Section.TYPEINFERENCE); } } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java index 85e4ba2fb..af50be029 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -56,10 +56,10 @@ public class RefType extends Type implements IMatchable private boolean primitiveFlag=false; // ino.end // ino.attribute.parserlog.26628.declaration - protected static Logger parserlog = Logger.getLogger("parser"); + //protected static Logger parserlog = Logger.getLogger("parser"); // ino.end // ino.attribute.codegenlog.26631.declaration - protected static Logger codegenlog = Logger.getLogger("codegen"); + //protected static Logger codegenlog = Logger.getLogger("codegen"); // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java b/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java index b8b20c44b..6f5fb6b3e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java @@ -6,7 +6,7 @@ package de.dhbwstuttgart.syntaxtree.type; import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import java.util.logging.Logger; +import de.dhbwstuttgart.logger.*; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.parser.JavaClassName; @@ -31,6 +31,7 @@ public class TypePlaceholder extends Type // ino.end // ino.class.TypePlaceholder.26780.body { + private static final Logger log = Logger.getLogger(TypePlaceholder.class.getName()); // ino.attribute.strNextName.26785.declaration private static String strNextName = "A"; // ino.end @@ -55,6 +56,7 @@ public class TypePlaceholder extends Type { super(parent, -1); this.name = new JavaClassName(typeName); + if(parent != null)log.debug("Erstelle TPH "+typeName+" für SyntaxTreeNode: "+parent, Section.TYPEINFERENCE); } // ino.end diff --git a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java index c7f052ca4..f67fb6d04 100755 --- a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java +++ b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java @@ -2,10 +2,12 @@ package de.dhbwstuttgart.typeinference; import java.util.Iterator; import java.util.Vector; - +import de.dhbwstuttgart.logger.Logger; +import de.dhbwstuttgart.logger.*; import de.dhbwstuttgart.typeinference.unify.Unifier; public class ConstraintsSet implements Iterable{ + private static final Logger log = Logger.getLogger(ConstraintsSet.class.getName()); private Vector constraintsSet; public ConstraintsSet(){ @@ -58,14 +60,26 @@ public class ConstraintsSet implements Iterable{ } } + /** + * Nimmt alle UndConstraints und filtert mithilfe dieser die falschen Constraints aus den OderConstraints + * @param unifier + */ public void unifyUndConstraints(Unifier unifier) { Vector uCons = this.filterUndConstraints(); Vector alleUndConstraints = new Vector<>(); for(UndConstraint undConstraint : uCons){ alleUndConstraints.addAll(undConstraint.getConstraintPairs()); } - Vector> unifyResult = unifier.apply(alleUndConstraints); - + this.filterWrongConstraints( + (pairs)->{ + Vector undConstraintsUndPairs = new Vector<>(); + undConstraintsUndPairs.addAll(pairs); + undConstraintsUndPairs.addAll(alleUndConstraints); + log.debug("Versuche Pairs auszusondern:\n"+pairs, Section.TYPEINFERENCE); + log.debug("Unifiziere:\n"+undConstraintsUndPairs, Section.TYPEINFERENCE); + Vector> unifyResult = unifier.apply(undConstraintsUndPairs); + return unifyResult; + }); } /** diff --git a/src/de/dhbwstuttgart/typeinference/OderConstraint.java b/src/de/dhbwstuttgart/typeinference/OderConstraint.java index 84f59d6a4..1f2762d4f 100755 --- a/src/de/dhbwstuttgart/typeinference/OderConstraint.java +++ b/src/de/dhbwstuttgart/typeinference/OderConstraint.java @@ -3,6 +3,7 @@ package de.dhbwstuttgart.typeinference; import java.util.Vector; import de.dhbwstuttgart.logger.Logger; +import de.dhbwstuttgart.logger.Section; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; @@ -90,13 +91,16 @@ public class OderConstraint{ if(!unifierResult.isEmpty()){ filteredConstraints.add(cons); }else{ - logger.debug("Ausgesondertes Constraint: "+cons); + logger.debug("Ausgesondertes Constraint: "+cons, Section.TYPEINFERENCE); } } this.oderConstraintPairs = filteredConstraints; } UndConstraint filterUndConstraints() { + if(this.oderConstraintPairs.size()==1){ + return this.oderConstraintPairs.firstElement(); + } return null; } diff --git a/src/de/dhbwstuttgart/typeinference/Pair.java b/src/de/dhbwstuttgart/typeinference/Pair.java index b3126aa46..114bc97ea 100755 --- a/src/de/dhbwstuttgart/typeinference/Pair.java +++ b/src/de/dhbwstuttgart/typeinference/Pair.java @@ -121,7 +121,7 @@ public class Pair if(OperatorSmallerExtends()) Operator = " Date: Thu, 9 Oct 2014 17:38:29 +0200 Subject: [PATCH 38/46] =?UTF-8?q?Logger=20angef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dhbwstuttgart/logger/OutputHandler.java | 29 +++++++++++++++++++ src/de/dhbwstuttgart/logger/Section.java | 7 +++++ 2 files changed, 36 insertions(+) create mode 100644 src/de/dhbwstuttgart/logger/OutputHandler.java create mode 100644 src/de/dhbwstuttgart/logger/Section.java diff --git a/src/de/dhbwstuttgart/logger/OutputHandler.java b/src/de/dhbwstuttgart/logger/OutputHandler.java new file mode 100644 index 000000000..fc57d7466 --- /dev/null +++ b/src/de/dhbwstuttgart/logger/OutputHandler.java @@ -0,0 +1,29 @@ +package de.dhbwstuttgart.logger; + +import java.io.PrintStream; +import java.util.logging.Handler; +import java.util.logging.LogRecord; + +public class OutputHandler extends Handler{ + + private PrintStream output; + + public OutputHandler(PrintStream output){ + this.output = output; + } + + @Override + public void publish(LogRecord record) { + output.println(record.getMessage()); + } + + @Override + public void flush() { + } + + @Override + public void close() throws SecurityException { + } + + +} diff --git a/src/de/dhbwstuttgart/logger/Section.java b/src/de/dhbwstuttgart/logger/Section.java new file mode 100644 index 000000000..9fb2c66c2 --- /dev/null +++ b/src/de/dhbwstuttgart/logger/Section.java @@ -0,0 +1,7 @@ +package de.dhbwstuttgart.logger; + +public enum Section { + TYPEINFERENCE, + PARSER, + CODEGEN; +} From 3ae2d8cfa1f94c3d8daf7cfdcbf0285ae01bd738 Mon Sep 17 00:00:00 2001 From: "Dr. Martin Pluemicke" Date: Thu, 9 Oct 2014 18:05:15 +0200 Subject: [PATCH 39/46] ANTLR Library hinzugefuegt --- .classpath | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.classpath b/.classpath index 46d57734c..e81a66d1f 100755 --- a/.classpath +++ b/.classpath @@ -5,6 +5,6 @@ - + From c62c31db6d3f6d3a76655eb19e4abfd7021f1074 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Mon, 13 Oct 2014 10:39:14 +0200 Subject: [PATCH 40/46] =?UTF-8?q?Kleine=20=C3=84nderungen=20am=20Logger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/de/dhbwstuttgart/core/MyCompiler.java | 1 + src/de/dhbwstuttgart/logger/Logger.java | 25 +++++++++++++++- .../dhbwstuttgart/logger/OutputHandler.java | 29 ------------------- 3 files changed, 25 insertions(+), 30 deletions(-) delete mode 100644 src/de/dhbwstuttgart/logger/OutputHandler.java diff --git a/src/de/dhbwstuttgart/core/MyCompiler.java b/src/de/dhbwstuttgart/core/MyCompiler.java index 375cd684b..1128140b3 100755 --- a/src/de/dhbwstuttgart/core/MyCompiler.java +++ b/src/de/dhbwstuttgart/core/MyCompiler.java @@ -95,6 +95,7 @@ public class MyCompiler implements MyCompilerAPI * Author: J�rg B�uerle
* Der private Konstruktor. Es soll von au�en kein Compiler angelegt werden * k�nnen, sondern nur eine API zur Verf�gung gestellt werden. + * @param logger Konfiguration für Debug Ausgabe TODO */ // ino.end // ino.method.MyCompiler.21283.definition diff --git a/src/de/dhbwstuttgart/logger/Logger.java b/src/de/dhbwstuttgart/logger/Logger.java index 3003da8ea..7985948d1 100644 --- a/src/de/dhbwstuttgart/logger/Logger.java +++ b/src/de/dhbwstuttgart/logger/Logger.java @@ -2,7 +2,9 @@ package de.dhbwstuttgart.logger; import java.io.PrintStream; import java.util.HashMap; +import java.util.logging.Handler; import java.util.logging.Level; +import java.util.logging.LogRecord; public class Logger { @@ -75,5 +77,26 @@ public class Logger { public static void setStandardOutput(PrintStream outputStream) { Logger.standardOutput = outputStream; } - +} + +class OutputHandler extends Handler{ + + private PrintStream output; + + public OutputHandler(PrintStream output){ + this.output = output; + } + + @Override + public void publish(LogRecord record) { + output.println(record.getMessage()); + } + + @Override + public void flush() { + } + + @Override + public void close() throws SecurityException { + } } diff --git a/src/de/dhbwstuttgart/logger/OutputHandler.java b/src/de/dhbwstuttgart/logger/OutputHandler.java deleted file mode 100644 index fc57d7466..000000000 --- a/src/de/dhbwstuttgart/logger/OutputHandler.java +++ /dev/null @@ -1,29 +0,0 @@ -package de.dhbwstuttgart.logger; - -import java.io.PrintStream; -import java.util.logging.Handler; -import java.util.logging.LogRecord; - -public class OutputHandler extends Handler{ - - private PrintStream output; - - public OutputHandler(PrintStream output){ - this.output = output; - } - - @Override - public void publish(LogRecord record) { - output.println(record.getMessage()); - } - - @Override - public void flush() { - } - - @Override - public void close() throws SecurityException { - } - - -} From aeef4aed348f3c93dc0be3e4c7cc9daf23b5a1b6 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Mon, 13 Oct 2014 10:42:14 +0200 Subject: [PATCH 41/46] .classpath angepasst --- .classpath | 2 +- bin/.gitignore | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.classpath b/.classpath index e81a66d1f..46d57734c 100755 --- a/.classpath +++ b/.classpath @@ -5,6 +5,6 @@ - + diff --git a/bin/.gitignore b/bin/.gitignore index 8ac1c637b..ba369ba7b 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,5 +1,6 @@ /de/ /mycompiler/ -/plugindevelopment/ -/bytecode/ /parser/ +/plugindevelopment/ +/syntaxTree/ +/bytecode/ From da70cad512038ffb7d7516da8ed8a7505cbf0416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pl=C3=BCmicke?= Date: Mon, 3 Nov 2014 10:40:28 +0100 Subject: [PATCH 42/46] Unifyaufruf aufgeteilt in Zusammenhangskomponenten in Sourcefile.java --- .classpath | 1 - .../JavaParserBuilder.launch | 2 +- bin/.gitignore | 5 ++ .../dhbwstuttgart/syntaxtree/SourceFile.java | 86 ++++++++++++++++++- .../typeinference/unify/Unify.java | 48 +++++++++++ 5 files changed, 138 insertions(+), 4 deletions(-) diff --git a/.classpath b/.classpath index 46d57734c..8031ed71f 100755 --- a/.classpath +++ b/.classpath @@ -5,6 +5,5 @@ - diff --git a/.externalToolBuilders/JavaParserBuilder.launch b/.externalToolBuilders/JavaParserBuilder.launch index 0db12c073..8e4b330b5 100755 --- a/.externalToolBuilders/JavaParserBuilder.launch +++ b/.externalToolBuilders/JavaParserBuilder.launch @@ -13,7 +13,7 @@ - + diff --git a/bin/.gitignore b/bin/.gitignore index f1735d3a6..a3254800e 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,3 +1,8 @@ +/bytecode/ /de/ +/log4j.xml +/log4jTesting.xml /mycompiler/ +/parser/ /plugindevelopment/ +/syntaxTree/ diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index d1f45761c..56c8d1f72 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -9,6 +9,7 @@ import java.util.HashMap; import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import java.util.stream.Stream; import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.ClassFile; @@ -776,12 +777,93 @@ public class SourceFile } */ - Vector> unifyResult = Unify.unify(constraintsClone, finiteClosure); + //IDEE: Man bildet Zusammenhangskomponenten von Paaren, die gemeinsame Variablen haben + // und unifizert nur die Zusammenhangskomponenten in Schritten 1 - 5 + + //Schritt 1: Alle Variablen in den Paaren von Elementen einsammeln + Vector> constraintsclonevars = constraintsClone.stream().map(p -> {Vector TPHs = new Vector<>(); + TPHs.addAll(p.TA1.getInvolvedTypePlaceholder()); + TPHs.addAll(p.TA2.getInvolvedTypePlaceholder()); + return TPHs;} + ).collect(Vector::new, Vector::add, Vector::addAll); + + //Schritt 2: Schnittmengen jedes Elements mit jedem Elememt von vars bilden und dann index zusammenfassen + //in indexset sind dann die Mengen von Indizes enthalten, die gemeisam unifiziert wreden müssen + Vector> indexeset = new Vector<>(); + if (constraintsclonevars != null && constraintsclonevars.size()>0) { + indexeset = Unify.schnitt(constraintsclonevars); + } + + //Schritt 3: Umwandlung der Indizes in die zugehoerigen Elemente + // In streamconstraintsclone sind die Mengen von Paar enthalten die unifiziert werden muessen + Stream> streamconstraintsclone = indexeset.stream().map(x -> x.stream() + .map(i -> constraintsClone.elementAt(i)) + .collect(Vector::new, Vector::add, Vector::addAll)); +// Vector> vecconstraintsclone = streamconstraintsclone.collect(Vector::new, Vector::add, Vector::addAll); + + //Schritt 4: Unifikation + Vector>> vecunifyResult = + streamconstraintsclone.map(x -> Unify.unify(x, finiteClosure)).collect(Vector::new, Vector::add, Vector::addAll); + + //card gibt die Cardinalitaet der unifizierten Mengen an + Vector card = vecunifyResult.stream().map(x -> x.size()).collect(Vector::new, Vector::add, Vector::addAll); + ;//.reduce(1,(a,b) -> { if ((a > 0) && (b > 0)) return (a * b); else return 1; }); + + //Schritt 5: Bildung des cartesischen Produkts + //sollte wieder entfernt werden: Weiterarbeit mit: + //[[x_1 -> t_1, x_2 -> t2], [x_1 -> t'_1, x_2 -> t'_2]] x ... x [[x_n -> t_1n], [x_n -> t2n], [x_n -> t3n]] + Vector> cardprodret_start = new Vector<>(); + cardprodret_start.add(new Vector()); + + //cart. Produkt mit kopieren + //Vector> unifyResult = vecunifyResult.stream().reduce(cardprodret_start, (x, y) -> { + //Vector> cardprodret= new Vector<>(); + //if (y.size() > 0) { + ////System.out.println(y); + //Vector> cardprodretold = x; + //cardprodret = new Vector<>(); + //for(int j = 0; j < cardprodretold.size(); j++) { + //for (int k = 0; k < y.size(); k++){ + //Vector help; + //if (y.size() == 1) help = cardprodretold.elementAt(j); //bei einem hinzuzufuegenden Element muss nicht kopiert werden + //else help = Unify.copyVectorPair(cardprodretold.elementAt(j)); + //help.addAll(y.elementAt(k)); + //cardprodret.add(help); + //} + //} + //} + //else + //return new Vector<>(); //kein unifiziertes Ergebnis, damit wird das Geseamtergebnis [] + //return cardprodret; + //}); + + //cart. Produkt mit Linkverschiebung + Vector> unifyResult = vecunifyResult.stream().reduce(cardprodret_start, (x, y) -> { + Vector> cardprodret= new Vector<>(); + if (y.size() > 0) { + //System.out.println(y); + //Vector> cardprodretold = x; + //cardprodret = new Vector<>(); + for(int j = 0; j < x.size(); j++) { + for (int k = 0; k < y.size(); k++){ + Vector help = new Vector<>(); + help.addAll(y.elementAt(k)); + help.addAll(x.elementAt(j)); + cardprodret.add(help); + } + } + } + else + return new Vector<>(); //kein unifiziertes Ergebnis, damit wird das Geseamtergebnis [] + return cardprodret; + }); + + //Vector> unifyResult = Unify.unify(constraintsClone, finiteClosure); //Dann den Ergebnissen anfügen result.addAll(unifyResult); // Debugoutput:Vector> - typinferenzLog.debug("Unifiziertes Ergebnis: "+result); + //typinferenzLog.debug("Unifiziertes Ergebnis: "+result); /* // Prüfe ob eindeutige Lösung: diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index 886226a56..cc8ffd548 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -844,6 +844,54 @@ public class Unify return Eq2Set; } + /** + * PL 2014-10-25 + * schnitt1 checkt ob die Typeplaceholders aus in den Elemeneten aus vars enthalten sind + * Rückgabe ist die Menge der Indizies von vars der Schnittmengen mit var nicht leer sind. + * @param var + * @param vars + * @param indexe + * @return + */ + static Vector schnitt1 (Vector var, Vector> vars, Vector indexe) { + int j = -1; + for (Vector varelems : vars) { + j++; + if (varelems != null) { + if (var.stream().map(x -> varelems.contains(x)).reduce(false, (a,b) -> (a || b)) + && (!indexe.contains(j))) + { + Vector rekvarelements = vars.elementAt(j); + vars.setElementAt(null, j);//Element erledigt muss nicht nochmals bearbeitet werden. + indexe.addElement(j); + indexe = schnitt1(rekvarelements, vars, indexe); + } + } + } + return indexe; + } + + /** + * Bildet Schnittmengen der Mengen von Typeplaceholders + * Rueckgabe ist die Menge der Menge von Indizies die Schnittmengen sind. + * @param vars + * @return + */ + public static Vector> schnitt (Vector> vars) { + Vector> ret = new Vector<>(); + int i = -1; + for (Vector var : vars) { + i++; + if (var != null) {//Element wurde noch bearbeitet + Vector indexe = new Vector<>(); + indexe.add(i); + ret.add(schnitt1(var, vars, indexe)); + } + } + return ret; + } + + /** * Diese Methode wird verwendet, um Zuordnungen z.B. TPH a = Integer * aus der Ergebnismenge zu entfernen, wenn im Typ in den die eingesetzt werden sollen kein TPH a vorhanden ist. From 1cb66d4f8871851f91859f78d5016ce7a79cc877 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 4 Nov 2014 13:47:05 +0100 Subject: [PATCH 43/46] Umstellung auf anderen Logger --- bin/.gitignore | 2 +- .../dhbwstuttgart/core/ConsoleInterface.java | 4 +- src/de/dhbwstuttgart/core/MyCompiler.java | 21 +- src/de/dhbwstuttgart/logger/Logger.java | 55 +- src/de/dhbwstuttgart/logger/Section.java | 3 +- .../myexception/SCClassException.java | 2 - .../dhbwstuttgart/myexception/SCExcept.java | 2 + .../myexception/SCException.java | 2 - src/de/dhbwstuttgart/parser/JavaLexer.java | 3 +- src/de/dhbwstuttgart/parser/JavaLexer.lex | 3 +- src/de/dhbwstuttgart/parser/JavaParser.java | 617 +++++++++--------- src/de/dhbwstuttgart/parser/JavaParser.jay | 41 +- src/de/dhbwstuttgart/syntaxtree/Class.java | 2 +- .../dhbwstuttgart/syntaxtree/ClassBody.java | 6 +- .../dhbwstuttgart/syntaxtree/Constructor.java | 5 - .../syntaxtree/FormalParameter.java | 4 +- src/de/dhbwstuttgart/syntaxtree/Method.java | 3 +- .../dhbwstuttgart/syntaxtree/SourceFile.java | 20 +- .../syntaxtree/statement/Block.java | 8 +- .../syntaxtree/statement/BoolLiteral.java | 4 +- .../syntaxtree/statement/CharLiteral.java | 4 +- .../syntaxtree/statement/DoubleLiteral.java | 2 + .../syntaxtree/statement/EmptyStmt.java | 4 +- .../syntaxtree/statement/FloatLiteral.java | 4 +- .../syntaxtree/statement/InstVar.java | 7 +- .../syntaxtree/statement/IntLiteral.java | 2 + .../syntaxtree/statement/LocalVarDecl.java | 3 +- .../syntaxtree/statement/LongLiteral.java | 2 + .../syntaxtree/statement/NewArray.java | 2 + .../syntaxtree/statement/Null.java | 2 + .../syntaxtree/statement/PositivExpr.java | 2 + .../syntaxtree/statement/StringLiteral.java | 2 + .../syntaxtree/statement/This.java | 3 +- .../syntaxtree/type/ParaList.java | 5 +- .../syntaxtree/type/RefType.java | 11 +- .../dhbwstuttgart/syntaxtree/type/Type.java | 10 +- .../syntaxtree/type/TypePlaceholder.java | 1 + .../typeinference/ConstraintsSet.java | 2 +- .../assumptions/TypeAssumptions.java | 5 +- .../typedeployment/TypeInsertSet.java | 4 +- .../typeinference/unify/Unify.java | 9 +- test/plugindevelopment/TypeInsertTester.java | 5 +- .../TypeInsertTests/GenericTypeVarTest.java | 3 +- .../TypeInsertTests/LambdaTest24.java | 2 +- .../TypeInsertTests/LambdaTest4.java | 2 +- .../MultipleTypesInsertTester.java | 9 + 46 files changed, 490 insertions(+), 424 deletions(-) diff --git a/bin/.gitignore b/bin/.gitignore index ba369ba7b..56a30e6a4 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,6 +1,6 @@ +/bytecode/ /de/ /mycompiler/ /parser/ /plugindevelopment/ /syntaxTree/ -/bytecode/ diff --git a/src/de/dhbwstuttgart/core/ConsoleInterface.java b/src/de/dhbwstuttgart/core/ConsoleInterface.java index e453b0b1c..6d2b5f461 100755 --- a/src/de/dhbwstuttgart/core/ConsoleInterface.java +++ b/src/de/dhbwstuttgart/core/ConsoleInterface.java @@ -6,7 +6,7 @@ import static org.junit.Assert.fail; import java.util.*; import de.dhbwstuttgart.logger.Logger; - +import de.dhbwstuttgart.logger.LoggerConfiguration; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; public class ConsoleInterface { @@ -20,7 +20,7 @@ public class ConsoleInterface { for(String file : args){ filenames.add(file); } - Logger.setStandardOutput(null); // sämtliches Logging unterdrücken + Logger.setStandardConfiguration(new LoggerConfiguration()); // sämtliches Logging unterdrücken run(filenames); } diff --git a/src/de/dhbwstuttgart/core/MyCompiler.java b/src/de/dhbwstuttgart/core/MyCompiler.java index 1128140b3..3bebd0c45 100755 --- a/src/de/dhbwstuttgart/core/MyCompiler.java +++ b/src/de/dhbwstuttgart/core/MyCompiler.java @@ -14,8 +14,7 @@ import java.io.StringReader; import java.util.Vector; import de.dhbwstuttgart.logger.Logger; - - +import de.dhbwstuttgart.logger.Section; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.JVMCodeException; @@ -142,7 +141,7 @@ public class MyCompiler implements MyCompilerAPI * @param className Klassenname der aktuell betrachteten Klasse * @param Parameter Parameter der Superklasse * @param KlassenVektor - */ + // ino.end // ino.method.wandleGeneric2RefType.21289.definition public static void wandleGeneric2RefType(Vector Parameter, Vector KlassenVektor ) @@ -220,7 +219,7 @@ public class MyCompiler implements MyCompilerAPI } //end for } //end wandleGeneric2RefType // ino.end - + */ // ino.method.parse.21292.defdescription type=javadoc @@ -513,14 +512,12 @@ public class MyCompiler implements MyCompilerAPI // ino.end // ino.method.typeReconstruction.21304.body { - Logger.setStandardOutput(System.out); //TODO: Hier noch das Log-Level richtig setzen (je nachdem ob debugt wird oder nicht) - if(m_AbstractSyntaxTree==null){ throw new NullPointerException("Es wurde noch kein Abstrakter Syntaxbaum erstellt!"); } - inferencelog.info("##########################################"); - inferencelog.info("# TypeReconstruction-Algorithmus - START #"); - inferencelog.info("##########################################\n"); + inferencelog.info("##########################################", Section.TYPEINFERENCE); + inferencelog.info("# TypeReconstruction-Algorithmus - START #", Section.TYPEINFERENCE); + inferencelog.info("##########################################\n", Section.TYPEINFERENCE); TypeAssumptions globalAssumptions = makeFunNAssumptions(); Vector result = new Vector(); @@ -529,9 +526,9 @@ public class MyCompiler implements MyCompilerAPI } - inferencelog.info("#########################################"); - inferencelog.info("# TypeReconstruction-Algorithmus - ENDE #"); - inferencelog.info("#########################################\n"); + inferencelog.info("#########################################", Section.TYPEINFERENCE); + inferencelog.info("# TypeReconstruction-Algorithmus - ENDE #", Section.TYPEINFERENCE); + inferencelog.info("#########################################\n", Section.TYPEINFERENCE); return result; } diff --git a/src/de/dhbwstuttgart/logger/Logger.java b/src/de/dhbwstuttgart/logger/Logger.java index 7985948d1..4ce36bd7c 100644 --- a/src/de/dhbwstuttgart/logger/Logger.java +++ b/src/de/dhbwstuttgart/logger/Logger.java @@ -8,17 +8,21 @@ import java.util.logging.LogRecord; public class Logger { - private static PrintStream standardOutput; + private static LoggerConfiguration standardConfiguration = new LoggerConfiguration(); private static final HashMap LOGGER_DIRECTORY = new HashMap<>(); private String name; - private final java.util.logging.Logger log; + private final HashMap logger; - private Logger(String name, PrintStream output) { + protected Logger(String name, LoggerConfiguration config) { this.name = name; - this.log = java.util.logging.Logger.getLogger( name ); - if(output != null)log.addHandler(new OutputHandler(output)); - log.setLevel(Level.FINE); + this.logger = new HashMap<>(); + config.forEach((s,o)->{ + java.util.logging.Logger log = java.util.logging.Logger.getLogger( name ); + log.setLevel(Level.FINE); + log.addHandler(new OutputHandler(o)); + logger.put(s, log); + }); } /** @@ -28,11 +32,7 @@ public class Logger { * @param section */ public void debug(String message, Section section){ - output(message, Level.FINE); - } - - public void debug(String message){ - //output(message, Level.FINE); + output(message, Level.FINE, section); } /** @@ -46,14 +46,28 @@ public class Logger { if(LOGGER_DIRECTORY.containsKey(name)){ ret = LOGGER_DIRECTORY.get(name); }else{ - ret = new Logger(name, standardOutput); + ret = new Logger(name, standardConfiguration); LOGGER_DIRECTORY.put(name, ret); } return ret; } - private void output(String msg , Level logLevel){ - log.log(logLevel, msg); + public static SectionLogger getSectionLogger(String name, Section s) { + Logger ret; + if(LOGGER_DIRECTORY.containsKey(name)){ + ret = LOGGER_DIRECTORY.get(name); + }else{ + ret = new Logger(name, standardConfiguration); + LOGGER_DIRECTORY.put(name, ret); + } + return new SectionLogger(ret,s); + } + + protected void output(String msg , Level logLevel, Section section){ + if(logger.containsKey(section)){ + java.util.logging.Logger log = logger.get(section); + log.log(logLevel, msg); + } /* if(output != null){ output.println(msg); @@ -63,20 +77,21 @@ public class Logger { */ } - public void info(String message) { - output(message, Level.INFO); + public void info(String message, Section s) { + output(message, Level.INFO, s); } - public void error(String message) { - output(message, Level.WARNING); + public void error(String message, Section s) { + output(message, Level.WARNING, s); } /** * wird hier null übergeben, so wird sämtliches Logging unterdrückt. */ - public static void setStandardOutput(PrintStream outputStream) { - Logger.standardOutput = outputStream; + public static void setStandardConfiguration(LoggerConfiguration config) { + Logger.standardConfiguration = config; } + } class OutputHandler extends Handler{ diff --git a/src/de/dhbwstuttgart/logger/Section.java b/src/de/dhbwstuttgart/logger/Section.java index 9fb2c66c2..d99907d1f 100644 --- a/src/de/dhbwstuttgart/logger/Section.java +++ b/src/de/dhbwstuttgart/logger/Section.java @@ -3,5 +3,6 @@ package de.dhbwstuttgart.logger; public enum Section { TYPEINFERENCE, PARSER, - CODEGEN; + CODEGEN, + UNIFY, FINITECLOSURE; } diff --git a/src/de/dhbwstuttgart/myexception/SCClassException.java b/src/de/dhbwstuttgart/myexception/SCClassException.java index c6d877414..f39629cd2 100755 --- a/src/de/dhbwstuttgart/myexception/SCClassException.java +++ b/src/de/dhbwstuttgart/myexception/SCClassException.java @@ -60,8 +60,6 @@ public class SCClassException extends Exception { hilfe=el.nextElement(); hilfe.fehlerausgabe(); - if(el.hasMoreElements()) - parserlog.debug(""); } } // ino.end diff --git a/src/de/dhbwstuttgart/myexception/SCExcept.java b/src/de/dhbwstuttgart/myexception/SCExcept.java index e8ad93d5c..c6bc2c623 100755 --- a/src/de/dhbwstuttgart/myexception/SCExcept.java +++ b/src/de/dhbwstuttgart/myexception/SCExcept.java @@ -68,6 +68,7 @@ public class SCExcept // ino.end // ino.method.fehlerausgabe.23868.body { + /* parserlog.error("Semantik-Check hat einen Fehler gefunden!"); parserlog.error("Fehler "+error); parserlog.error("wurde in"); @@ -78,6 +79,7 @@ public class SCExcept if(statement!=null) parserlog.error("im Statement "+statement); parserlog.error("gefunden."); + */ } // ino.end diff --git a/src/de/dhbwstuttgart/myexception/SCException.java b/src/de/dhbwstuttgart/myexception/SCException.java index 9c96f2bdc..35b13e4e5 100755 --- a/src/de/dhbwstuttgart/myexception/SCException.java +++ b/src/de/dhbwstuttgart/myexception/SCException.java @@ -43,8 +43,6 @@ public class SCException extends Exception { hilf=el.nextElement(); hilf.fehlerausgabe(); - if(el.hasMoreElements()) - parserlog.debug(""); } } // ino.end diff --git a/src/de/dhbwstuttgart/parser/JavaLexer.java b/src/de/dhbwstuttgart/parser/JavaLexer.java index 788641ace..db5eb4f22 100644 --- a/src/de/dhbwstuttgart/parser/JavaLexer.java +++ b/src/de/dhbwstuttgart/parser/JavaLexer.java @@ -7,6 +7,7 @@ ********************************************/ // user code: package de.dhbwstuttgart.parser; +import de.dhbwstuttgart.logger.Section; public class JavaLexer { @@ -1291,7 +1292,7 @@ public class JavaLexer { case -37: break; case 37: - {de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("Kommentar: "+yytext());} + {de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("Kommentar: "+yytext(), Section.PARSER);} case -38: break; case 38: diff --git a/src/de/dhbwstuttgart/parser/JavaLexer.lex b/src/de/dhbwstuttgart/parser/JavaLexer.lex index 9df37ace1..9100d64ca 100755 --- a/src/de/dhbwstuttgart/parser/JavaLexer.lex +++ b/src/de/dhbwstuttgart/parser/JavaLexer.lex @@ -9,6 +9,7 @@ // user code: package de.dhbwstuttgart.parser; +import de.dhbwstuttgart.logger.Section; %% %char @@ -167,7 +168,7 @@ null { //">>=" {this.token = new Token(JavaParser.SIGNEDSHIFTRIGHTEQUAL, yytext(), yyline, yychar);return true;} //">>>=" {this.token = new Token(JavaParser.UNSIGNEDSHIFTRIGHTEQUAL, yytext(), yyline, yychar);return true;} {ws}|\n { /* System.out.print(yytext()); */ } -\\.\n {de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("Kommentar: "+yytext());} +\\.\n {de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("Kommentar: "+yytext(), Section.PARSER);} "->" {this.token = new Token(JavaParser.LAMBDAASSIGNMENT, yytext(), yyline, yychar);return true;} diff --git a/src/de/dhbwstuttgart/parser/JavaParser.java b/src/de/dhbwstuttgart/parser/JavaParser.java index 8ab37814a..333bcb088 100644 --- a/src/de/dhbwstuttgart/parser/JavaParser.java +++ b/src/de/dhbwstuttgart/parser/JavaParser.java @@ -10,6 +10,7 @@ package de.dhbwstuttgart.parser; import de.dhbwstuttgart.core.AClassOrInterface; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.logger.Section; import de.dhbwstuttgart.syntaxtree.ImportDeclarations; import de.dhbwstuttgart.syntaxtree.Interface; import de.dhbwstuttgart.syntaxtree.SourceFile; @@ -48,7 +49,7 @@ void initUsedIdsToCheck() { //LUAR 07-05-29 Anfang für Wildcard Test public Vector testPair = new Vector(); //LUAR 07-05-29 Ende - // line 52 "-" + // line 53 "-" // %token constants //{ //ergaenzt PL 23.01.01 wieder entfernt 21.12.01 public static final int ABSTRACT = 257; @@ -682,20 +683,20 @@ public Vector testPair = new Vector(); yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]); switch (yyN) { case 1: - // line 247 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 248 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((SourceFile)yyVals[0+yyTop]); } break; case 2: - // line 251 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 252 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((SourceFile)yyVals[0+yyTop]).addImports(((ImportDeclarations)yyVals[-1+yyTop])); yyVal=((SourceFile)yyVals[0+yyTop]); } break; case 3: - // line 256 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 257 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Package*/ ((SourceFile)yyVals[0+yyTop]).setPackageName(((UsedId)yyVals[-2+yyTop])); @@ -704,7 +705,7 @@ case 3: } break; case 4: - // line 263 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 264 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Package*/ ((SourceFile)yyVals[0+yyTop]).setPackageName(((UsedId)yyVals[-1+yyTop])); @@ -712,21 +713,21 @@ case 4: } break; case 5: - // line 269 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 270 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { this.testPair.add(new Pair(((Type)yyVals[-2+yyTop]),((Type)yyVals[-1+yyTop]))); yyVal=((SourceFile)yyVals[0+yyTop]); } break; case 6: - // line 275 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 276 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Package*/ yyVal = ((UsedId)yyVals[-1+yyTop]); } break; case 7: - // line 281 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 282 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ImportDeclarations declarations=new ImportDeclarations(); declarations.addElement(((UsedId)yyVals[0+yyTop])); @@ -734,20 +735,20 @@ case 7: } break; case 8: - // line 287 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 288 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ImportDeclarations)yyVals[-1+yyTop]).addElement(((UsedId)yyVals[0+yyTop])); yyVal=((ImportDeclarations)yyVals[-1+yyTop]); } break; case 9: - // line 293 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 294 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((UsedId)yyVals[-1+yyTop]); } break; case 10: - // line 298 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 299 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { SourceFile Scfile = new SourceFile(); Scfile.addElement(((AClassOrInterface)yyVals[0+yyTop])); @@ -755,39 +756,39 @@ case 10: } break; case 11: - // line 304 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 305 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((SourceFile)yyVals[-1+yyTop]).addElement(((AClassOrInterface)yyVals[0+yyTop])); yyVal=((SourceFile)yyVals[-1+yyTop]); } break; case 12: - // line 310 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 311 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((UsedId)yyVals[0+yyTop]); } break; case 13: - // line 314 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 315 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((UsedId)yyVals[0+yyTop]); } break; case 14: - // line 319 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 320 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Class)yyVals[0+yyTop]); } break; case 15: - // line 323 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 324 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ yyVal=((Interface)yyVals[0+yyTop]); } break; case 16: - // line 330 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 331 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((UsedId)yyVals[-2+yyTop]).set_Name(((Token)yyVals[0+yyTop]).getLexem()); ((UsedId)yyVals[-2+yyTop]).setOffset(((UsedId)yyVals[-2+yyTop]).getOffset()); @@ -795,7 +796,7 @@ case 16: } break; case 17: - // line 337 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 338 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((UsedId)yyVals[-2+yyTop]).set_Name(((Token)yyVals[0+yyTop]).getLexem()); ((UsedId)yyVals[-2+yyTop]).setOffset(((UsedId)yyVals[-2+yyTop]).getOffset()); @@ -803,7 +804,7 @@ case 17: } break; case 18: - // line 343 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 344 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((UsedId)yyVals[-2+yyTop]).set_Name("*"); ((UsedId)yyVals[-2+yyTop]).setOffset(((UsedId)yyVals[-2+yyTop]).getOffset()); @@ -811,7 +812,7 @@ case 18: } break; case 19: - // line 351 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 352 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { UsedId UI = new UsedId(((Token)yyVals[0+yyTop]).getOffset()); UI.set_Name( ((Token)yyVals[0+yyTop]).getLexem() ); @@ -820,7 +821,7 @@ case 19: } break; case 20: - // line 359 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 360 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Um das hier uebersichtlicher zu halten,*/ /* gibt es einen allumfassenden Konstruktor fuer Class*/ @@ -839,7 +840,7 @@ case 20: } break; case 21: - // line 376 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 377 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-1+yyTop]).getName(), ((Modifiers)yyVals[-3+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, null, ((ClassAndParameter)yyVals[-1+yyTop]).getParaVector(), ((Token)yyVals[-2+yyTop]).getOffset()); this.initContainedTypes(); @@ -847,7 +848,7 @@ case 21: } break; case 22: - // line 382 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 383 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes, ((UsedId)yyVals[-1+yyTop]), null, ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -855,7 +856,7 @@ case 22: } break; case 23: - // line 388 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 389 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, ((UsedId)yyVals[-1+yyTop]), null, ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -863,7 +864,7 @@ case 23: } break; case 24: - // line 395 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 396 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes, ((InterfaceList)yyVals[-1+yyTop]).getTypeVector(), ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -871,7 +872,7 @@ case 24: } break; case 25: - // line 401 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 402 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, ((InterfaceList)yyVals[-1+yyTop]).getTypeVector(), ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -879,7 +880,7 @@ case 25: } break; case 26: - // line 407 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 408 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-3+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes, ((UsedId)yyVals[-2+yyTop]), ((InterfaceList)yyVals[-1+yyTop]).getTypeVector(), ((ClassAndParameter)yyVals[-3+yyTop]).getParaVector(), ((Token)yyVals[-4+yyTop]).getOffset()); this.initContainedTypes(); @@ -887,7 +888,7 @@ case 26: } break; case 27: - // line 413 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 414 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-3+yyTop]).getName(), ((Modifiers)yyVals[-5+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, ((UsedId)yyVals[-2+yyTop]), ((InterfaceList)yyVals[-1+yyTop]).getTypeVector(), ((ClassAndParameter)yyVals[-3+yyTop]).getParaVector(), ((Token)yyVals[-4+yyTop]).getOffset()); this.initContainedTypes(); @@ -895,7 +896,7 @@ case 27: } break; case 28: - // line 420 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 421 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* HOTI*/ /* Verbindet den Namen eines Interfaces mit einer optionalen Parameterliste*/ @@ -903,13 +904,13 @@ case 28: } break; case 29: - // line 426 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 427 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new InterfaceAndParameter(((Token)yyVals[-3+yyTop]).getLexem(), ((ParaList)yyVals[-1+yyTop])); } break; case 30: - // line 431 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 432 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Hilfskonstrukt, um die Grammatik ueberschaubar zu halten*/ /* Verbindet den Namen einer Klasse mit einer optionalen Parameterliste*/ @@ -917,13 +918,13 @@ case 30: } break; case 31: - // line 437 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 438 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new ClassAndParameter(((Token)yyVals[-3+yyTop]).getLexem(), ((ParaList)yyVals[-1+yyTop])); } break; case 32: - // line 442 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 443 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ Interface ic = new Interface(((InterfaceAndParameter)yyVals[-1+yyTop]).getName(), ((Token)yyVals[-2+yyTop]).getOffset()); @@ -935,7 +936,7 @@ case 32: } break; case 33: - // line 452 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 453 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Interface ic = new Interface(((InterfaceAndParameter)yyVals[-1+yyTop]).getName(), ((Modifiers)yyVals[-3+yyTop]), ((Token)yyVals[-2+yyTop]).getOffset()); ic.setInterfaceBody(((InterfaceBody)yyVals[0+yyTop])); @@ -946,7 +947,7 @@ case 33: } break; case 34: - // line 461 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 462 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Interface ic = new Interface(((InterfaceAndParameter)yyVals[-2+yyTop]).getName(), ((Token)yyVals[-3+yyTop]).getOffset()); ic.setParaList(((InterfaceAndParameter)yyVals[-2+yyTop]).getParaVector()); @@ -958,7 +959,7 @@ case 34: } break; case 35: - // line 471 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 472 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Interface ic = new Interface(((InterfaceAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((Token)yyVals[-3+yyTop]).getOffset()); ic.setParaList(((InterfaceAndParameter)yyVals[-2+yyTop]).getParaVector()); @@ -970,7 +971,7 @@ case 35: } break; case 36: - // line 482 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 483 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParaList pl = new ParaList(); /* #JB# 05.04.2005 */ @@ -978,23 +979,23 @@ case 36: pl.getParalist().addElement(new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(),null, ((Token)yyVals[0+yyTop]).getOffset())); /*pl.getParalist().addElement( new TypePlaceholder($1.getLexem()) );*/ /* ########################################################### */ - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + ((Token)yyVals[0+yyTop]).getLexem() + " TV"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + ((Token)yyVals[0+yyTop]).getLexem() + " TV", Section.PARSER); yyVal = pl; } break; case 37: - // line 493 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 494 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParaList pl = new ParaList(); RefType t = new RefType( ((Token)yyVals[-3+yyTop]).getLexem(),null,((Token)yyVals[-3+yyTop]).getOffset() ); t.set_ParaList( ((ParaList)yyVals[-1+yyTop]).get_ParaList() ); pl.getParalist().addElement(t); - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER '<' paralist '>' --> Paralist f�r " + ((Token)yyVals[-3+yyTop]).getLexem() + ": RefType"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER '<' paralist '>' --> Paralist f�r " + ((Token)yyVals[-3+yyTop]).getLexem() + ": RefType", Section.PARSER); yyVal = pl; } break; case 38: - // line 502 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 503 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParaList pl = new ParaList(); pl.getParalist().addElement(((WildcardType)yyVals[0+yyTop])); @@ -1002,7 +1003,7 @@ case 38: } break; case 39: - // line 508 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 509 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* #JB# 05.04.2005 */ @@ -1010,30 +1011,30 @@ case 39: ((ParaList)yyVals[-2+yyTop]).getParalist().addElement(new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(), null,((Token)yyVals[0+yyTop]).getOffset())); /*$1.getParalist().addElement(new TypePlaceholder($3.getLexem()));*/ /* ########################################################### */ - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER --> Paralist f�r " + ((Token)yyVals[0+yyTop]).getLexem() + ": TV"); - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist: " + ((ParaList)yyVals[-2+yyTop]).getParalist()); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER --> Paralist f�r " + ((Token)yyVals[0+yyTop]).getLexem() + ": TV", Section.PARSER); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist: " + ((ParaList)yyVals[-2+yyTop]).getParalist(), Section.PARSER); yyVal=((ParaList)yyVals[-2+yyTop]); } break; case 40: - // line 521 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 522 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { RefType t = new RefType( ((Token)yyVals[-3+yyTop]).getLexem(),null ,((Token)yyVals[-3+yyTop]).getOffset() ); t.set_ParaList( ((ParaList)yyVals[-1+yyTop]).get_ParaList() ); ((ParaList)yyVals[-5+yyTop]).getParalist().addElement(t); - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER '<' paralist '>' --> Paralist f�r " + ((Token)yyVals[-3+yyTop]).getLexem() + ": RefType"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER '<' paralist '>' --> Paralist f�r " + ((Token)yyVals[-3+yyTop]).getLexem() + ": RefType", Section.PARSER); yyVal=((ParaList)yyVals[-5+yyTop]); } break; case 41: - // line 529 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 530 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ParaList)yyVals[-2+yyTop]).getParalist().addElement(((WildcardType)yyVals[0+yyTop])); yyVal=((ParaList)yyVals[-2+yyTop]); } break; case 42: - // line 535 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 536 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*Luar 29.11.06 Offset auf -1, da keine Angabe vorhanden*/ WildcardType wc = new WildcardType(null,-1); @@ -1041,34 +1042,34 @@ case 42: } break; case 43: - // line 541 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 542 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ExtendsWildcardType ewc = new ExtendsWildcardType(((Token)yyVals[-1+yyTop]).getOffset(),((RefType)yyVals[0+yyTop])); yyVal = ewc; } break; case 44: - // line 546 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 547 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { SuperWildcardType swc = new SuperWildcardType(((Token)yyVals[-1+yyTop]).getOffset(),((RefType)yyVals[0+yyTop])); yyVal = swc; } break; case 45: - // line 552 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 553 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ClassBody CB = new ClassBody(); yyVal = CB; } break; case 46: - // line 558 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 559 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((ClassBody)yyVals[-1+yyTop]); } break; case 47: - // line 563 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 564 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Modifiers Mod = new Modifiers(); Mod.addModifier(((Modifier)yyVals[0+yyTop])); @@ -1076,20 +1077,20 @@ case 47: } break; case 48: - // line 569 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 570 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Modifiers)yyVals[-1+yyTop]).addModifier(((Modifier)yyVals[0+yyTop])); yyVal = ((Modifiers)yyVals[-1+yyTop]); } break; case 49: - // line 575 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 576 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((UsedId)yyVals[0+yyTop]); } break; case 50: - // line 580 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 581 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ InterfaceList il = new InterfaceList(); @@ -1098,27 +1099,27 @@ case 50: } break; case 51: - // line 587 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 588 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((InterfaceList)yyVals[-2+yyTop]).addInterface(((UsedId)yyVals[0+yyTop])); yyVal = ((InterfaceList)yyVals[-2+yyTop]); } break; case 52: - // line 593 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 594 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ yyVal = new InterfaceBody(); } break; case 53: - // line 598 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 599 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((InterfaceBody)yyVals[-1+yyTop]); } break; case 54: - // line 605 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 606 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ InterfaceList il = new InterfaceList(); @@ -1127,14 +1128,14 @@ case 54: } break; case 55: - // line 612 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 613 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((InterfaceList)yyVals[-2+yyTop]).addInterface(((UsedId)yyVals[0+yyTop])); yyVal = ((InterfaceList)yyVals[-2+yyTop]); } break; case 56: - // line 619 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 620 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ClassBody CB = new ClassBody(); CB.addField( ((Field)yyVals[0+yyTop]) ); @@ -1142,55 +1143,55 @@ case 56: } break; case 57: - // line 625 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 626 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ClassBody)yyVals[-1+yyTop]).addField(((Field)yyVals[0+yyTop])); yyVal = ((ClassBody)yyVals[-1+yyTop]); } break; case 58: - // line 632 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 633 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Public Pub = new Public(); yyVal=Pub; } break; case 59: - // line 637 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 638 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Protected Pro = new Protected(); yyVal=Pro; } break; case 60: - // line 642 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 643 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Private Pri = new Private(); yyVal=Pri; } break; case 61: - // line 647 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 648 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Static Sta = new Static(); yyVal=Sta; } break; case 62: - // line 652 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 653 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Abstract Abs = new Abstract(); yyVal=Abs; } break; case 63: - // line 657 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 658 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Final fin = new Final(); yyVal = fin; } break; case 64: - // line 663 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 664 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*PL 05-07-30 eingefuegt containedTypes ANFANG*/ RefType RT = new RefType(null,-1); @@ -1205,7 +1206,7 @@ case 64: } break; case 65: - // line 678 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 679 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ InterfaceBody ib = new InterfaceBody(); @@ -1214,39 +1215,39 @@ case 65: } break; case 66: - // line 685 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 686 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((InterfaceBody)yyVals[-1+yyTop]).addElement(((Field)yyVals[0+yyTop])); yyVal = ((InterfaceBody)yyVals[-1+yyTop]); } break; case 67: - // line 691 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 692 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interfaces*/ yyVal = ((UsedId)yyVals[0+yyTop]); } break; case 68: - // line 697 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 698 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Field)yyVals[0+yyTop]); } break; case 69: - // line 702 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 703 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Method)yyVals[0+yyTop]); } break; case 70: - // line 706 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 707 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Field)yyVals[0+yyTop]); } break; case 71: - // line 712 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 713 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { if (((Vector)yyVals[0+yyTop]) != null) { /*$1.set_ParaList($2.get_ParaList());*/ @@ -1258,7 +1259,7 @@ case 71: } break; case 72: - // line 723 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 724 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Vector tl = new Vector(); tl.add(((Type)yyVals[0+yyTop])); @@ -1266,21 +1267,21 @@ case 72: } break; case 73: - // line 729 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 730 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Vector)yyVals[-2+yyTop]).add(((Type)yyVals[0+yyTop])); yyVal=((Vector)yyVals[-2+yyTop]); } break; case 74: - // line 734 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 735 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Vector)yyVals[-2+yyTop]).add(((WildcardType)yyVals[0+yyTop])); yyVal=((Vector)yyVals[-2+yyTop]); } break; case 75: - // line 739 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 740 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Vector tl = new Vector(); tl.add(((WildcardType)yyVals[0+yyTop])); @@ -1288,42 +1289,42 @@ case 75: } break; case 76: - // line 747 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 748 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = null; } break; case 77: - // line 749 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 750 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((Vector)yyVals[-1+yyTop]); } break; case 78: - // line 754 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 755 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interfaces, Spezialform Konstantendef.*/ yyVal = ((Constant)yyVals[0+yyTop]); } break; case 79: - // line 759 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 760 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((Method)yyVals[0+yyTop]); } break; case 80: - // line 764 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 765 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Field)yyVals[0+yyTop]); } break; case 81: - // line 768 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 769 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Method)yyVals[0+yyTop]); } break; case 82: - // line 773 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 774 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Method STAT = new Method(((Token)yyVals[-1+yyTop]).getOffset()); DeclId DST = new DeclId(); @@ -1338,14 +1339,14 @@ case 82: } break; case 83: - // line 787 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 788 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Constructor)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); yyVal = ((Constructor)yyVals[-1+yyTop]); } break; case 84: - // line 792 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 793 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Constructor)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); ((Constructor)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); @@ -1353,7 +1354,7 @@ case 84: } break; case 85: - // line 799 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 800 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ Constant c = new Constant(((Token)yyVals[-3+yyTop]).getLexem(), ((Modifiers)yyVals[-5+yyTop])); @@ -1363,14 +1364,14 @@ case 85: } break; case 86: - // line 808 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 809 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ yyVal = ((Method)yyVals[-1+yyTop]); } break; case 87: - // line 833 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 834 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FieldDeclaration ret = new FieldDeclaration(((DeclId)yyVals[-2+yyTop]).getOffset()); ret.set_DeclId(((DeclId)yyVals[-2+yyTop])); @@ -1379,7 +1380,7 @@ case 87: } break; case 88: - // line 840 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 841 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FieldDeclaration ret = new FieldDeclaration(((DeclId)yyVals[0+yyTop]).getOffset()); ret.set_DeclId(((DeclId)yyVals[0+yyTop])); @@ -1387,27 +1388,27 @@ case 88: } break; case 89: - // line 847 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 848 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { GenericDeclarationList ret = new GenericDeclarationList(((GenericVarDeclarationList)yyVals[-1+yyTop]).getElements(),((GenericVarDeclarationList)yyVals[-1+yyTop]).getEndOffset()); yyVal = ret; } break; case 90: - // line 854 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 855 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; case 91: - // line 859 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 860 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; case 92: - // line 863 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 864 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {/*angefügt von Andreas Stadelmeier*/ ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); ((FieldDeclaration)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); @@ -1415,21 +1416,21 @@ case 92: } break; case 93: - // line 870 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 871 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; case 94: - // line 875 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 876 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + ((Type)yyVals[-2+yyTop])); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + ((Type)yyVals[-2+yyTop]), Section.PARSER); ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); yyVal = ((FieldDeclaration)yyVals[-1+yyTop]); } break; case 95: - // line 882 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 883 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); for(int i=0;i<(((FieldDeclaration)yyVals[-1+yyTop]).getDeclIdVector().size());i++) @@ -1440,27 +1441,27 @@ case 95: } break; case 96: - // line 892 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 893 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); yyVal=((Method)yyVals[-1+yyTop]); } break; case 97: - // line 899 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 900 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block Bl = new Block(); yyVal=Bl; } break; case 98: - // line 905 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 906 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[-1+yyTop]); } break; case 99: - // line 910 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 911 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Constructor CON = new Constructor(null); /*TODO: Der Parser kann sowieso nicht zwischen einem Konstruktor und einer Methode unterscheiden. Das hier kann wegfallen...*/ DeclId DIDCon = new DeclId(); @@ -1470,7 +1471,7 @@ case 99: } break; case 100: - // line 918 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 919 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Constructor CONpara = new Constructor(null); DeclId DIconpara = new DeclId(); @@ -1481,14 +1482,14 @@ case 100: } break; case 101: - // line 928 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 929 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block CBL = new Block(); yyVal=CBL; } break; case 102: - // line 933 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 934 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block CBLexpl = new Block(); CBLexpl.set_Statement(((Statement)yyVals[-1+yyTop])); @@ -1496,13 +1497,13 @@ case 102: } break; case 103: - // line 939 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 940 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[-1+yyTop]); } break; case 104: - // line 943 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 944 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block CBes = new Block(); CBes.set_Statement(((Statement)yyVals[-2+yyTop])); @@ -1514,7 +1515,7 @@ case 104: } break; case 105: - // line 954 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 955 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ExceptionList EL = new ExceptionList(); EL.set_addElem(((RefType)yyVals[0+yyTop])); @@ -1522,13 +1523,13 @@ case 105: } break; case 106: - // line 961 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 962 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((GenericTypeVar)yyVals[0+yyTop]); } break; case 107: - // line 966 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 967 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParaList p = new ParaList(); p.add_ParaList(((GenericTypeVar)yyVals[0+yyTop])); @@ -1536,20 +1537,20 @@ case 107: } break; case 108: - // line 972 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 973 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ParaList)yyVals[-2+yyTop]).add_ParaList(((GenericTypeVar)yyVals[0+yyTop])); yyVal=((ParaList)yyVals[-2+yyTop]); } break; case 109: - // line 979 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 980 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(),null,((Token)yyVals[0+yyTop]).getOffset()); } break; case 110: - // line 983 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 984 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { BoundedGenericTypeVar gtv=new BoundedGenericTypeVar(((Token)yyVals[-2+yyTop]).getLexem(), ((BoundedClassIdentifierList)yyVals[0+yyTop]),null, ((Token)yyVals[-2+yyTop]).getOffset() ,((BoundedClassIdentifierList)yyVals[0+yyTop]).getEndOffset()); /*gtv.setBounds($3);*/ @@ -1557,7 +1558,7 @@ case 110: } break; case 111: - // line 990 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 991 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Vector vec=new Vector(); vec.addElement(((RefType)yyVals[0+yyTop])); @@ -1566,7 +1567,7 @@ case 111: } break; case 112: - // line 997 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 998 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((BoundedClassIdentifierList)yyVals[-2+yyTop]).addElement(((RefType)yyVals[0+yyTop])); ((BoundedClassIdentifierList)yyVals[-2+yyTop]).addOffsetOff(((RefType)yyVals[0+yyTop])); @@ -1575,7 +1576,7 @@ case 112: } break; case 113: - // line 1005 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1006 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { GenericVarDeclarationList vec=new GenericVarDeclarationList(); vec.addElement(((GenericTypeVar)yyVals[0+yyTop])); @@ -1583,14 +1584,14 @@ case 113: } break; case 114: - // line 1011 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1012 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((GenericVarDeclarationList)yyVals[-2+yyTop]).addElement(((GenericTypeVar)yyVals[0+yyTop])); yyVal=((GenericVarDeclarationList)yyVals[-2+yyTop]); } break; case 115: - // line 1019 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1020 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-2+yyTop])); @@ -1598,14 +1599,14 @@ case 115: } break; case 116: - // line 1025 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1026 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); yyVal=((Method)yyVals[0+yyTop]); } break; case 117: - // line 1030 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1031 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); @@ -1613,7 +1614,7 @@ case 117: } break; case 118: - // line 1036 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1037 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-2+yyTop])); @@ -1622,7 +1623,7 @@ case 118: } break; case 119: - // line 1043 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1044 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); @@ -1630,7 +1631,7 @@ case 119: } break; case 120: - // line 1049 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1050 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); @@ -1639,7 +1640,7 @@ case 120: } break; case 121: - // line 1056 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1057 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); @@ -1648,7 +1649,7 @@ case 121: } break; case 122: - // line 1063 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1064 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-4+yyTop])); ((Method)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); @@ -1658,7 +1659,7 @@ case 122: } break; case 123: - // line 1071 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1072 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void Voit = new Void(((Method)yyVals[0+yyTop]),((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).setType(Voit); @@ -1666,7 +1667,7 @@ case 123: } break; case 124: - // line 1077 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1078 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voit = new Void(((Method)yyVals[0+yyTop]),((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); @@ -1675,7 +1676,7 @@ case 124: } break; case 125: - // line 1084 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1085 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voyt = new Void(((Method)yyVals[-1+yyTop]),((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).setType(voyt); @@ -1684,7 +1685,7 @@ case 125: } break; case 126: - // line 1091 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1092 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voyd = new Void(((Method)yyVals[-1+yyTop]),((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); @@ -1694,7 +1695,7 @@ case 126: } break; case 127: - // line 1099 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1100 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void Voit = new Void(((Method)yyVals[0+yyTop]),((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).setType(Voit); @@ -1703,7 +1704,7 @@ case 127: } break; case 128: - // line 1106 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1107 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voit = new Void(((Method)yyVals[0+yyTop]),((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); @@ -1713,7 +1714,7 @@ case 128: } break; case 129: - // line 1114 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1115 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voyt = new Void(((Method)yyVals[-1+yyTop]),((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).setType(voyt); @@ -1723,7 +1724,7 @@ case 129: } break; case 130: - // line 1122 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1123 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voyd = new Void(((Method)yyVals[-1+yyTop]),((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-4+yyTop])); @@ -1734,14 +1735,14 @@ case 130: } break; case 131: - // line 1132 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1133 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $1.setType(TypePlaceholder.fresh()); */ yyVal=((Method)yyVals[0+yyTop]); } break; case 132: - // line 1137 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1138 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $4.setType(TypePlaceholder.fresh());*/ ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-1+yyTop])); @@ -1749,7 +1750,7 @@ case 132: } break; case 133: - // line 1144 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1145 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-1+yyTop])); /*auskommentiert von Andreas Stadelmeier (a10023) $2.setType(TypePlaceholder.fresh());*/ @@ -1757,7 +1758,7 @@ case 133: } break; case 134: - // line 1150 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1151 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $1.setType(TypePlaceholder.fresh());*/ ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); @@ -1765,7 +1766,7 @@ case 134: } break; case 135: - // line 1156 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1157 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); /*auskommentiert von Andreas Stadelmeier (a10023) $2.setType(TypePlaceholder.fresh());*/ @@ -1774,31 +1775,31 @@ case 135: } break; case 136: - // line 1165 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1166 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; case 137: - // line 1169 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1170 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((BaseType)yyVals[-2+yyTop]).setArray(true); } break; case 138: - // line 1173 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1174 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((RefType)yyVals[0+yyTop]); } break; case 139: - // line 1177 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1178 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((RefType)yyVals[-2+yyTop]).setArray(true); } break; case 140: - // line 1181 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1182 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FieldDeclaration IVD = new FieldDeclaration(((DeclId)yyVals[0+yyTop]).getOffset()); IVD.getDeclIdVector().addElement( ((DeclId)yyVals[0+yyTop]) ); @@ -1807,20 +1808,20 @@ case 140: } break; case 141: - // line 1188 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1189 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((FieldDeclaration)yyVals[-2+yyTop]).getDeclIdVector().addElement(((DeclId)yyVals[0+yyTop])); yyVal=((FieldDeclaration)yyVals[-2+yyTop]); } break; case 142: - // line 1194 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1195 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; case 143: - // line 1199 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1200 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block Blstat = new Block(); Blstat.set_Statement(((Statement)yyVals[0+yyTop])); @@ -1828,14 +1829,14 @@ case 143: } break; case 144: - // line 1206 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1207 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Block)yyVals[-1+yyTop]).set_Statement(((Statement)yyVals[0+yyTop])); yyVal=((Block)yyVals[-1+yyTop]); } break; case 145: - // line 1212 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1213 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParameterList PL = new ParameterList(); PL.set_AddParameter(((FormalParameter)yyVals[0+yyTop])); @@ -1843,21 +1844,21 @@ case 145: } break; case 146: - // line 1218 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1219 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ParameterList)yyVals[-2+yyTop]).set_AddParameter(((FormalParameter)yyVals[0+yyTop])); yyVal = ((ParameterList)yyVals[-2+yyTop]); } break; case 147: - // line 1224 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1225 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { This THCON = new This(((Token)yyVals[-3+yyTop]).getOffset(),((Token)yyVals[-3+yyTop]).getLexem().length()); yyVal=THCON; } break; case 148: - // line 1229 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1230 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { This THCONargl = new This(((Token)yyVals[-4+yyTop]).getOffset(),((Token)yyVals[-4+yyTop]).getLexem().length()); THCONargl.set_ArgumentList(((ArgumentList)yyVals[-2+yyTop])); @@ -1865,7 +1866,7 @@ case 148: } break; case 149: - // line 1238 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1239 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { RefType RT = new RefType(null,-1); RT.set_UsedId(((UsedId)yyVals[0+yyTop])); @@ -1874,7 +1875,7 @@ case 149: } break; case 150: - // line 1245 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1246 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((RefType)yyVals[-2+yyTop]).set_UsedId(((UsedId)yyVals[0+yyTop])); ((RefType)yyVals[-2+yyTop]).setName(((RefType)yyVals[-2+yyTop]).get_UsedId().get_Name_1Element()); @@ -1882,7 +1883,7 @@ case 150: } break; case 151: - // line 1252 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1253 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Method met = new Method(((Token)yyVals[-2+yyTop]).getOffset()); /* #JB# 10.04.2005 */ @@ -1897,7 +1898,7 @@ case 151: } break; case 152: - // line 1265 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1266 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Method met_para = new Method(((Token)yyVals[-3+yyTop]).getOffset()); /* #JB# 10.04.2005 */ @@ -1913,7 +1914,7 @@ case 152: } break; case 153: - // line 1280 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1281 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { BooleanType BT = new BooleanType(null); /* #JB# 05.04.2005 */ @@ -1924,13 +1925,13 @@ case 153: } break; case 154: - // line 1289 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1290 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; case 155: - // line 1294 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1295 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { if (((Vector)yyVals[0+yyTop]) != null) { /*$1.set_ParaList($2.get_ParaList());*/ @@ -1953,9 +1954,9 @@ case 155: } break; case 156: - // line 1316 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1317 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("T->Parser->referenctype: " + ((UsedId)yyVals[0+yyTop])); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("T->Parser->referenctype: " + ((UsedId)yyVals[0+yyTop]), Section.PARSER); RefType RT = new RefType(null,((UsedId)yyVals[0+yyTop]).getOffset()); /*ausgetauscht PL 05-07-30*/ @@ -1973,25 +1974,25 @@ case 156: } break; case 157: - // line 1338 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1339 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((DeclId)yyVals[0+yyTop]); } break; case 158: - // line 1359 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1360 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((LocalVarDecl)yyVals[0+yyTop]); } break; case 159: - // line 1363 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1364 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; case 160: - // line 1368 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1369 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FormalParameter FP = new FormalParameter(((DeclId)yyVals[0+yyTop])); FP.setType(((Type)yyVals[-1+yyTop])); @@ -2000,9 +2001,9 @@ case 160: } break; case 161: - // line 1393 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1394 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + ((DeclId)yyVals[0+yyTop]).name); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + ((DeclId)yyVals[0+yyTop]).name, Section.PARSER); FormalParameter FP = new FormalParameter(((DeclId)yyVals[0+yyTop])); @@ -2011,7 +2012,7 @@ case 161: /*Type T = TypePlaceholder.fresh(); //auskommentiert von Andreas Stadelmeier*/ /* Type T = new TypePlaceholder(""); /* otth: Name wird automatisch berechnet * /*/ /* ###########################################################*/ - /*de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName());*/ + /*de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName(), Section.PARSER);*/ /*auskommentiert von Andreas Stadelmeier (a10023) FP.setType( T );*/ /*FP.set_DeclId($1);*/ @@ -2020,7 +2021,7 @@ case 161: } break; case 162: - // line 1412 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1413 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ArgumentList AL = new ArgumentList(); AL.expr.addElement(((Expr)yyVals[0+yyTop])); @@ -2028,20 +2029,20 @@ case 162: } break; case 163: - // line 1418 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1419 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ArgumentList)yyVals[-2+yyTop]).expr.addElement(((Expr)yyVals[0+yyTop])); yyVal=((ArgumentList)yyVals[-2+yyTop]); } break; case 164: - // line 1424 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1425 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; case 165: - // line 1429 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1430 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { DeclId DI = new DeclId(); /* #JB# 10.04.2005 */ @@ -2054,61 +2055,61 @@ case 165: } break; case 166: - // line 1441 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1442 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 167: - // line 1446 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1447 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((LocalVarDecl)yyVals[-1+yyTop]); } break; case 168: - // line 1451 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1452 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; case 169: - // line 1455 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1456 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((IfStmt)yyVals[0+yyTop]); } break; case 170: - // line 1459 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1460 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((IfStmt)yyVals[0+yyTop]); } break; case 171: - // line 1463 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1464 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((WhileStmt)yyVals[0+yyTop]); } break; case 172: - // line 1467 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1468 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((ForStmt)yyVals[0+yyTop]); } break; case 173: - // line 1472 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1473 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 174: - // line 1476 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1477 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((NewClass)yyVals[0+yyTop]); } break; case 175: - // line 1481 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1482 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { IntegerType IT = new IntegerType(null); /* #JB# 05.04.2005 */ @@ -2119,7 +2120,7 @@ case 175: } break; case 176: - // line 1490 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1491 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { CharacterType CT = new CharacterType(null); /* #JB# 05.04.2005 */ @@ -2130,9 +2131,9 @@ case 176: } break; case 177: - // line 1500 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1501 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!", Section.PARSER); LocalVarDecl LVD = new LocalVarDecl(((Type)yyVals[-1+yyTop]).getOffset(),((Type)yyVals[-1+yyTop]).getVariableLength()); LVD.setType(((Type)yyVals[-1+yyTop])); LVD.setDeclidVector(((FieldDeclaration)yyVals[0+yyTop]).getDeclIdVector()); @@ -2140,9 +2141,9 @@ case 177: } break; case 178: - // line 1511 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1512 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!", Section.PARSER); LocalVarDecl LVD = new LocalVarDecl(((FieldDeclaration)yyVals[0+yyTop]).getOffset(),((FieldDeclaration)yyVals[0+yyTop]).getVariableLength()); /*auskommentiert von Andreas Stadelmeier (a10023) LVD.setType(TypePlaceholder.fresh());*/ LVD.setDeclidVector(((FieldDeclaration)yyVals[0+yyTop]).getDeclIdVector()); @@ -2150,31 +2151,31 @@ case 178: } break; case 179: - // line 1521 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1522 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; case 180: - // line 1525 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1526 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((EmptyStmt)yyVals[0+yyTop]); } break; case 181: - // line 1529 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1530 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((ExprStmt)yyVals[0+yyTop]); } break; case 182: - // line 1533 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1534 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Return)yyVals[0+yyTop]); } break; case 183: - // line 1538 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1539 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { IfStmt Ifst = new IfStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Ifst.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2183,7 +2184,7 @@ case 183: } break; case 184: - // line 1546 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1547 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { IfStmt IfstElst = new IfStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); IfstElst.set_Expr(((Expr)yyVals[-4+yyTop])); @@ -2193,7 +2194,7 @@ case 184: } break; case 185: - // line 1555 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1556 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { WhileStmt Whlst = new WhileStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Whlst.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2202,7 +2203,7 @@ case 185: } break; case 186: - // line 1566 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1567 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-6+yyTop]).getOffset(),((Expr)yyVals[-6+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-6+yyTop])); @@ -2215,7 +2216,7 @@ case 186: } break; case 187: - // line 1578 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1579 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-5+yyTop])); @@ -2227,7 +2228,7 @@ case 187: } break; case 188: - // line 1589 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1590 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-5+yyTop])); @@ -2239,7 +2240,7 @@ case 188: } break; case 189: - // line 1600 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1601 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); Fst.set_head_Condition(((Expr)yyVals[-4+yyTop])); @@ -2251,7 +2252,7 @@ case 189: } break; case 190: - // line 1611 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1612 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-4+yyTop])); @@ -2262,7 +2263,7 @@ case 190: } break; case 191: - // line 1621 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1622 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-3+yyTop]).getOffset(),((Expr)yyVals[-3+yyTop]).getVariableLength()); Fst.set_head_Condition(((Expr)yyVals[-3+yyTop])); @@ -2273,7 +2274,7 @@ case 191: } break; case 192: - // line 1631 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1632 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Fst.set_head_Loop_expr(((Expr)yyVals[-2+yyTop])); @@ -2284,7 +2285,7 @@ case 192: } break; case 193: - // line 1641 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1642 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Statement)yyVals[0+yyTop]).getOffset(),((Statement)yyVals[0+yyTop]).getVariableLength()); Fst.set_body_Loop_block(((Statement)yyVals[0+yyTop])); @@ -2294,40 +2295,40 @@ case 193: } break; case 194: - // line 1650 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1651 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("conditionalexpression"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("conditionalexpression", Section.PARSER); yyVal=((Expr)yyVals[0+yyTop]); } break; case 195: - // line 1655 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1656 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Assign)yyVals[0+yyTop]); } break; case 196: - // line 1661 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1662 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { EmptyStmt Empst = new EmptyStmt(); yyVal=Empst; } break; case 197: - // line 1667 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1668 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[-1+yyTop]); } break; case 198: - // line 1672 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1673 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Return ret = new Return(-1,-1); yyVal= ret; } break; case 199: - // line 1677 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1678 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Return retexp = new Return(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); retexp.set_ReturnExpr(((Expr)yyVals[-1+yyTop])); @@ -2335,33 +2336,33 @@ case 199: } break; case 200: - // line 1684 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1685 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; case 201: - // line 1688 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1689 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((IfStmt)yyVals[0+yyTop]); } break; case 202: - // line 1692 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1693 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((WhileStmt)yyVals[0+yyTop]); } break; case 203: - // line 1697 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1698 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 204: - // line 1703 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1704 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n", Section.PARSER); Assign Ass = new Assign(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); LocalOrFieldVar LOFV = new LocalOrFieldVar(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); LOFV.set_UsedId(((UsedId)yyVals[-2+yyTop])); @@ -2369,7 +2370,7 @@ case 204: /*auskommentiert von Andreas Stadelmeier (a10023) Ass.setType(TypePlaceholder.fresh());*/ if( ((Operator)yyVals[-1+yyTop]) == null ) { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> " + ((Expr)yyVals[0+yyTop]) + " \n"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> " + ((Expr)yyVals[0+yyTop]) + " \n", Section.PARSER); Ass.set_Expr( LOFV,((Expr)yyVals[0+yyTop]) ); } else @@ -2378,7 +2379,7 @@ case 204: Bin.set_Expr1(LOFV); Bin.set_Operator(((Operator)yyVals[-1+yyTop])); Bin.set_Expr2(((Expr)yyVals[0+yyTop])); - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> Binary\n"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> Binary\n", Section.PARSER); /*auskommentiert von Andreas Stadelmeier (a10023) Bin.setType(TypePlaceholder.fresh());*/ Ass.set_Expr( LOFV, Bin ); } @@ -2386,7 +2387,7 @@ case 204: } break; case 205: - // line 1728 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1729 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Assign Ass =new Assign(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); LocalOrFieldVar LOFV = new LocalOrFieldVar(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2410,43 +2411,43 @@ case 205: } break; case 206: - // line 1751 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1752 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Assign)yyVals[0+yyTop]); } break; case 207: - // line 1755 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1756 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 208: - // line 1759 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1760 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 209: - // line 1763 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1764 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 210: - // line 1767 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1768 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 211: - // line 1771 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1772 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((MethodCall)yyVals[0+yyTop]); } break; case 212: - // line 1782 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1783 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { IfStmt IfElno = new IfStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); IfElno.set_Expr(((Expr)yyVals[-4+yyTop])); @@ -2456,7 +2457,7 @@ case 212: } break; case 213: - // line 1791 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1792 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { WhileStmt Whstno = new WhileStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Whstno.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2465,13 +2466,13 @@ case 213: } break; case 214: - // line 1799 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1800 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 215: - // line 1803 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1804 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary LogOr = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); OrOp OrO = new OrOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2483,19 +2484,19 @@ case 215: } break; case 216: - // line 1816 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1817 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=null; } break; case 217: - // line 1821 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1822 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; case 218: - // line 1825 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1826 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*Lambdabody kann auch nur aus einer Expression bestehen. In diesem Fall wird ein Block erstellt, welcher als einziges Statement ein return statment mit der expression hat.*/ /*Bsp.: Aus der Expression |var=="hallo"| wird: |{return var=="hallo";}|*/ @@ -2506,19 +2507,19 @@ case 218: } break; case 219: - // line 1835 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1836 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=null; } break; case 220: - // line 1839 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1840 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((ParameterList)yyVals[-1+yyTop]); } break; case 221: - // line 1844 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1845 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { LambdaExpression lambda = new LambdaExpression(/*((ParameSterList)$2).getOffset(),((ParameterList)$2).getVariableLength()*/0,0); if(((ParameterList)yyVals[-2+yyTop])!=null)lambda.setParameterList(((ParameterList)yyVals[-2+yyTop])); @@ -2527,54 +2528,54 @@ case 221: } break; case 222: - // line 1863 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1864 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((UsedId)yyVals[0+yyTop]); } break; case 223: - // line 1868 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1869 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=null; } break; case 224: - // line 1872 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1873 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { TimesOp TEO = new TimesOp(-1,-1); yyVal=TEO; } break; case 225: - // line 1877 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1878 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { DivideOp DEO = new DivideOp(-1,-1); yyVal=DEO; } break; case 226: - // line 1882 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1883 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ModuloOp MEO = new ModuloOp(-1,-1); yyVal=MEO; } break; case 227: - // line 1887 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1888 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PlusOp PEO = new PlusOp(-1,-1); yyVal=PEO; } break; case 228: - // line 1892 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1893 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { MinusOp MEO = new MinusOp(-1,-1); yyVal=MEO; } break; case 229: - // line 1904 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1905 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PreIncExpr PRINC = new PreIncExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); PRINC.set_Expr(((Expr)yyVals[0+yyTop])); @@ -2582,7 +2583,7 @@ case 229: } break; case 230: - // line 1911 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1912 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PreDecExpr PRDEC = new PreDecExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); PRDEC.set_Expr(((Expr)yyVals[0+yyTop])); @@ -2590,7 +2591,7 @@ case 230: } break; case 231: - // line 1918 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1919 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PostIncExpr PIE = new PostIncExpr(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); PIE.set_Expr(((Expr)yyVals[-1+yyTop])); @@ -2598,7 +2599,7 @@ case 231: } break; case 232: - // line 1925 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1926 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PostDecExpr PDE = new PostDecExpr(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); PDE.set_Expr(((Expr)yyVals[-1+yyTop])); @@ -2606,9 +2607,9 @@ case 232: } break; case 233: - // line 1933 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1934 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M1"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M1", Section.PARSER); MethodCall MC = new MethodCall(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); UsedId udidmeth = new UsedId(((UsedId)yyVals[-2+yyTop]).getOffset()); udidmeth.set_Name((String)((((UsedId)yyVals[-2+yyTop]).get_Name()).elementAt(((UsedId)yyVals[-2+yyTop]).get_Name().size()-1))); @@ -2638,9 +2639,9 @@ case 233: } break; case 234: - // line 1963 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1964 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M2"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M2", Section.PARSER); MethodCall MCarg = new MethodCall(((UsedId)yyVals[-3+yyTop]).getOffset(),((UsedId)yyVals[-3+yyTop]).getVariableLength()); UsedId udidmeth = new UsedId(((UsedId)yyVals[-3+yyTop]).getOffset()); udidmeth.set_Name((String)((((UsedId)yyVals[-3+yyTop]).get_Name()).elementAt(((UsedId)yyVals[-3+yyTop]).get_Name().size()-1))); @@ -2671,9 +2672,9 @@ case 234: } break; case 235: - // line 1994 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1995 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M3"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M3", Section.PARSER); MethodCall MCpr = new MethodCall(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); /* PL 05-08-21 primary ist kein UsedId*/ @@ -2692,9 +2693,9 @@ case 235: } break; case 236: - // line 2013 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2014 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M4"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M4", Section.PARSER); MethodCall MCPA = new MethodCall(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); /* PL 05-08-21 primary ist kein UsedId*/ @@ -2714,7 +2715,7 @@ case 236: } break; case 237: - // line 2036 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2037 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { NewClass NC = new NewClass(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); NC.set_UsedId(((UsedId)yyVals[-2+yyTop])); @@ -2724,7 +2725,7 @@ case 237: } break; case 238: - // line 2044 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2045 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { NewClass NCarg = new NewClass(((UsedId)yyVals[-3+yyTop]).getOffset(),((UsedId)yyVals[-3+yyTop]).getVariableLength()); NCarg.set_UsedId(((UsedId)yyVals[-3+yyTop])); @@ -2735,13 +2736,13 @@ case 238: } break; case 239: - // line 2054 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2055 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 240: - // line 2058 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2059 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary And = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); AndOp AndO = new AndOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2753,19 +2754,19 @@ case 240: } break; case 241: - // line 2074 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2075 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 242: - // line 2078 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2079 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 243: - // line 2082 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2083 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PositivExpr POSEX=new PositivExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryPlus UP= new UnaryPlus(); @@ -2775,7 +2776,7 @@ case 243: } break; case 244: - // line 2090 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2091 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { NegativeExpr NEGEX=new NegativeExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryMinus UM=new UnaryMinus(); @@ -2785,19 +2786,19 @@ case 244: } break; case 245: - // line 2098 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2099 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 246: - // line 2103 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2104 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 247: - // line 2107 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2108 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { if (((UsedId)yyVals[0+yyTop]).get_Name().size() > 1) { @@ -2817,37 +2818,37 @@ case 247: } break; case 248: - // line 2125 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2126 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 249: - // line 2129 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2130 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 250: - // line 2134 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2135 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 251: - // line 2139 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2140 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 253: - // line 2145 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2146 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Literal)yyVals[0+yyTop]); } break; case 254: - // line 2149 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2150 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { This T = new This(((Token)yyVals[0+yyTop]).getOffset(),((Token)yyVals[0+yyTop]).getLexem().length()); UsedId UT = new UsedId(((Token)yyVals[0+yyTop]).getOffset()); @@ -2857,23 +2858,23 @@ case 254: } break; case 255: - // line 2170 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2171 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((MethodCall)yyVals[0+yyTop]); } break; case 256: - // line 2174 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2175 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 257: - // line 2179 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2180 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {yyVal=((Expr)yyVals[0+yyTop]);} break; case 258: - // line 2181 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2182 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {NotExpr NE=new NotExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryNot UN=new UnaryNot(); NE.set_UnaryNot(UN); @@ -2882,36 +2883,36 @@ case 258: } break; case 259: - // line 2187 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2188 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {yyVal=((CastExpr)yyVals[0+yyTop]);} break; case 260: - // line 2189 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2190 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {yyVal=((Expr)yyVals[0+yyTop]);} break; case 262: - // line 2194 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2195 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {IntLiteral IL = new IntLiteral(); IL.set_Int(((Token)yyVals[0+yyTop]).String2Int()); yyVal = IL; } break; case 263: - // line 2199 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2200 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {BoolLiteral BL = new BoolLiteral(); BL.set_Bool(((Token)yyVals[0+yyTop]).String2Bool()); yyVal = BL; } break; case 264: - // line 2203 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2204 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {CharLiteral CL = new CharLiteral(); CL.set_Char(((Token)yyVals[0+yyTop]).CharInString()); yyVal=CL; } break; case 265: - // line 2208 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2209 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { StringLiteral ST = new StringLiteral(); ST.set_String(((Token)yyVals[0+yyTop]).get_String()); @@ -2919,14 +2920,14 @@ case 265: } break; case 266: - // line 2213 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2214 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { LongLiteral LL = new LongLiteral(); LL.set_Long(((Token)yyVals[0+yyTop]).String2Long()); yyVal = LL; } break; case 267: - // line 2217 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2218 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FloatLiteral FL = new FloatLiteral(); FL.set_Float(((Token)yyVals[0+yyTop]).String2Float()); @@ -2934,7 +2935,7 @@ case 267: } break; case 268: - // line 2222 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2223 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { DoubleLiteral DL = new DoubleLiteral(); DL.set_Double(((Token)yyVals[0+yyTop]).String2Double()); @@ -2942,14 +2943,14 @@ case 268: } break; case 269: - // line 2228 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2229 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Null NN = new Null(); yyVal=NN; } break; case 270: - // line 2234 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2235 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { CastExpr CaEx=new CastExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); CaEx.set_Type(((BaseType)yyVals[-2+yyTop])); @@ -2958,24 +2959,24 @@ case 270: } break; case 271: - // line 2243 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2244 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 272: - // line 2247 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2248 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { } break; case 273: - // line 2251 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2252 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 274: - // line 2255 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2256 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary EQ = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); EqualOp EO = new EqualOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2987,7 +2988,7 @@ case 274: } break; case 275: - // line 2265 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2266 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary NEQ = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); NotEqualOp NEO = new NotEqualOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2999,13 +3000,13 @@ case 275: } break; case 276: - // line 2276 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2277 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 277: - // line 2280 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2281 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary LO = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); LessOp LOO = new LessOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3017,7 +3018,7 @@ case 277: } break; case 278: - // line 2290 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2291 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary GO = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); GreaterOp GOO = new GreaterOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3029,7 +3030,7 @@ case 278: } break; case 279: - // line 2300 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2301 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary LE = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); LessEquOp LEO = new LessEquOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3041,7 +3042,7 @@ case 279: } break; case 280: - // line 2310 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2311 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary GE = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); GreaterEquOp GEO = new GreaterEquOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3053,7 +3054,7 @@ case 280: } break; case 281: - // line 2320 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2321 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { InstanceOf ISO=new InstanceOf(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); ISO.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -3062,19 +3063,19 @@ case 281: } break; case 282: - // line 2328 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2329 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 283: - // line 2333 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2334 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 284: - // line 2337 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2338 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary AD = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); PlusOp PO = new PlusOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3086,7 +3087,7 @@ case 284: } break; case 285: - // line 2347 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2348 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary MI = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); MinusOp MO = new MinusOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3098,13 +3099,13 @@ case 285: } break; case 286: - // line 2358 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2359 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 287: - // line 2362 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2363 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary ML = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); TimesOp TO = new TimesOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3116,7 +3117,7 @@ case 287: } break; case 288: - // line 2372 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2373 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary DV = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); DivideOp DO = new DivideOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3128,7 +3129,7 @@ case 288: } break; case 289: - // line 2382 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2383 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary MD = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); ModuloOp MO = new ModuloOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3139,7 +3140,7 @@ case 289: yyVal =MD; } break; - // line 3143 "-" + // line 3144 "-" } yyTop -= yyLen[yyN]; yyState = yyStates[yyTop]; diff --git a/src/de/dhbwstuttgart/parser/JavaParser.jay b/src/de/dhbwstuttgart/parser/JavaParser.jay index 80d2bd39b..e9df40200 100755 --- a/src/de/dhbwstuttgart/parser/JavaParser.jay +++ b/src/de/dhbwstuttgart/parser/JavaParser.jay @@ -8,6 +8,7 @@ package de.dhbwstuttgart.parser; import de.dhbwstuttgart.core.AClassOrInterface; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.logger.Section; import de.dhbwstuttgart.syntaxtree.ImportDeclarations; import de.dhbwstuttgart.syntaxtree.Interface; import de.dhbwstuttgart.syntaxtree.SourceFile; @@ -486,7 +487,7 @@ paralist : IDENTIFIER pl.getParalist().addElement(new GenericTypeVar($1.getLexem(),null, $1.getOffset())); //pl.getParalist().addElement( new TypePlaceholder($1.getLexem()) ); /* ########################################################### */ - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + $1.getLexem() + " TV"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + $1.getLexem() + " TV", Section.PARSER); $$ = pl; } | IDENTIFIER '<' paralist '>' @@ -495,7 +496,7 @@ paralist : IDENTIFIER RefType t = new RefType( $1.getLexem(),null,$1.getOffset() ); t.set_ParaList( $3.get_ParaList() ); pl.getParalist().addElement(t); - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER '<' paralist '>' --> Paralist f�r " + $1.getLexem() + ": RefType"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER '<' paralist '>' --> Paralist f�r " + $1.getLexem() + ": RefType", Section.PARSER); $$ = pl; } | wildcardparameter @@ -512,8 +513,8 @@ paralist : IDENTIFIER $1.getParalist().addElement(new GenericTypeVar($3.getLexem(), null,$3.getOffset())); //$1.getParalist().addElement(new TypePlaceholder($3.getLexem())); /* ########################################################### */ - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER --> Paralist f�r " + $3.getLexem() + ": TV"); - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist: " + $1.getParalist()); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER --> Paralist f�r " + $3.getLexem() + ": TV", Section.PARSER); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist: " + $1.getParalist(), Section.PARSER); $$=$1; } @@ -522,7 +523,7 @@ paralist : IDENTIFIER RefType t = new RefType( $3.getLexem(),null ,$3.getOffset() ); t.set_ParaList( $5.get_ParaList() ); $1.getParalist().addElement(t); - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER '<' paralist '>' --> Paralist f�r " + $3.getLexem() + ": RefType"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER '<' paralist '>' --> Paralist f�r " + $3.getLexem() + ": RefType", Section.PARSER); $$=$1; } | paralist ',' wildcardparameter @@ -873,7 +874,7 @@ fielddeclaration : type fielddeclarator ';' | type variabledeclarators ';' { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + $1); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + $1, Section.PARSER); $2.setType($1); $$ = $2; } @@ -1314,7 +1315,7 @@ referencelongtype : typename parameter referencetype :classorinterfacetype { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("T->Parser->referenctype: " + $1); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("T->Parser->referenctype: " + $1, Section.PARSER); RefType RT = new RefType(null,$1.getOffset()); //ausgetauscht PL 05-07-30 @@ -1385,13 +1386,13 @@ formalparameter : type variabledeclaratorid //FP.set_DeclId($5); $$=FP; - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P->Polymorphes Methodenargument hinzugefuegt: Name = " + $5.get_Name() + " Typ = " + $1.getName()); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P->Polymorphes Methodenargument hinzugefuegt: Name = " + $5.get_Name() + " Typ = " + $1.getName(), Section.PARSER); } */ | variabledeclaratorid { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + $1.name); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + $1.name, Section.PARSER); FormalParameter FP = new FormalParameter($1); @@ -1400,7 +1401,7 @@ formalparameter : type variabledeclaratorid //Type T = TypePlaceholder.fresh(); //auskommentiert von Andreas Stadelmeier // Type T = new TypePlaceholder(""); /* otth: Name wird automatisch berechnet */ // ########################################################### - //de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName()); + //de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName(), Section.PARSER); //auskommentiert von Andreas Stadelmeier (a10023) FP.setType( T ); //FP.set_DeclId($1); @@ -1498,7 +1499,7 @@ integraltype :INT localvariabledeclaration : type variabledeclarators { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!", Section.PARSER); LocalVarDecl LVD = new LocalVarDecl($1.getOffset(),$1.getVariableLength()); LVD.setType($1); LVD.setDeclidVector($2.getDeclIdVector()); @@ -1509,7 +1510,7 @@ localvariabledeclaration : type variabledeclarators /* ########################################################### */ |variabledeclarators { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!", Section.PARSER); LocalVarDecl LVD = new LocalVarDecl($1.getOffset(),$1.getVariableLength()); //auskommentiert von Andreas Stadelmeier (a10023) LVD.setType(TypePlaceholder.fresh()); LVD.setDeclidVector($1.getDeclIdVector()); @@ -1648,7 +1649,7 @@ forstatement assignmentexpression : conditionalexpression { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("conditionalexpression"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("conditionalexpression", Section.PARSER); $$=$1; } | assignment @@ -1701,7 +1702,7 @@ conditionalexpression :conditionalorexpression assignment :lefthandside assignmentoperator assignmentexpression { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n", Section.PARSER); Assign Ass = new Assign($1.getOffset(),$1.getVariableLength()); LocalOrFieldVar LOFV = new LocalOrFieldVar($1.getOffset(),$1.getVariableLength()); LOFV.set_UsedId($1); @@ -1709,7 +1710,7 @@ assignment :lefthandside assignmentoperator assignmentexpr //auskommentiert von Andreas Stadelmeier (a10023) Ass.setType(TypePlaceholder.fresh()); if( $2 == null ) { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> " + $3 + " \n"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> " + $3 + " \n", Section.PARSER); Ass.set_Expr( LOFV,$3 ); } else @@ -1718,7 +1719,7 @@ assignment :lefthandside assignmentoperator assignmentexpr Bin.set_Expr1(LOFV); Bin.set_Operator($2); Bin.set_Expr2($3); - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> Binary\n"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> Binary\n", Section.PARSER); //auskommentiert von Andreas Stadelmeier (a10023) Bin.setType(TypePlaceholder.fresh()); Ass.set_Expr( LOFV, Bin ); } @@ -1931,7 +1932,7 @@ postdecrementexpression :postfixexpression DECREMENT methodinvocation: name '(' ')' { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M1"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M1", Section.PARSER); MethodCall MC = new MethodCall($1.getOffset(),$1.getVariableLength()); UsedId udidmeth = new UsedId($1.getOffset()); udidmeth.set_Name((String)(($1.get_Name()).elementAt($1.get_Name().size()-1))); @@ -1961,7 +1962,7 @@ methodinvocation: } | name '('argumentlist')' { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M2"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M2", Section.PARSER); MethodCall MCarg = new MethodCall($1.getOffset(),$1.getVariableLength()); UsedId udidmeth = new UsedId($1.getOffset()); udidmeth.set_Name((String)(($1.get_Name()).elementAt($1.get_Name().size()-1))); @@ -1992,7 +1993,7 @@ methodinvocation: } | primary '.' IDENTIFIER '(' ')' { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M3"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M3", Section.PARSER); MethodCall MCpr = new MethodCall($1.getOffset(),$1.getVariableLength()); // PL 05-08-21 primary ist kein UsedId @@ -2011,7 +2012,7 @@ methodinvocation: } | primary '.' IDENTIFIER '('argumentlist ')' { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M4"); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M4", Section.PARSER); MethodCall MCPA = new MethodCall($1.getOffset(),$1.getVariableLength()); // PL 05-08-21 primary ist kein UsedId diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index a23e235ae..27c19a94f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -656,7 +656,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit ////////////////////////////// // Und los geht's: ////////////////////////////// - inferencelog.info("Rufe TRStart()..."); + inferencelog.info("Rufe TRStart()...", Section.TYPEINFERENCE); typinferenzLog.debug("Erstellte FiniteClosure: "+supportData, Section.TYPEINFERENCE); ////////////////////////////// diff --git a/src/de/dhbwstuttgart/syntaxtree/ClassBody.java b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java index da24d8cd8..d6de343bb 100755 --- a/src/de/dhbwstuttgart/syntaxtree/ClassBody.java +++ b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java @@ -279,7 +279,7 @@ static String string_rec(String st,Vector v) // ******************************************************************************************** // // ino.end - +/* // ino.method.istParameterOK.23200.definition public void istParameterOK( Vector Parameter, Vector KlassenVektor ) // ino.end @@ -305,7 +305,7 @@ public void istParameterOK( Vector Parameter, Vector KlassenVektor ) { if( ((RefType)TempParameter).get_ParaList().size() != KlassenVektor.elementAt(k).get_ParaList().size() ) { - parserlog.error( "SEMANTIK-CHECK-FEHLER: Parameteranzahl von\n" + TempParameter.getName() + " stimmt mit der Klassendefinition\n" + KlassenVektor.elementAt(k).getName() + " nicht �berein." ); + parserlog.error( "SEMANTIK-CHECK-FEHLER: Parameteranzahl von\n" + TempParameter.getName() + " stimmt mit der Klassendefinition\n" + KlassenVektor.elementAt(k).getName() + " nicht �berein.", Section.OLD ); System.exit( 1 ); } else @@ -346,7 +346,7 @@ public void istParameterOK( Vector Parameter, Vector KlassenVektor ) } // end otth; end if: t = RefType } // ino.end - +*/ // ino.method.toString.23203.defdescription type=javadoc /** diff --git a/src/de/dhbwstuttgart/syntaxtree/Constructor.java b/src/de/dhbwstuttgart/syntaxtree/Constructor.java index bc301e51e..01425890e 100644 --- a/src/de/dhbwstuttgart/syntaxtree/Constructor.java +++ b/src/de/dhbwstuttgart/syntaxtree/Constructor.java @@ -49,11 +49,6 @@ public class Constructor extends Method { return this.methode.getGenericMethodParameters(); } */ - @Override - public void sc_init_parameterlist(boolean ext) { - - this.methode.sc_init_parameterlist(ext); - } @Override public JavaClassName getTypeName() { diff --git a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java index d3d67c876..c98caac69 100755 --- a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java +++ b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java @@ -209,7 +209,9 @@ public class FormalParameter extends SyntaxTreeNode implements Typeable, TypeIns @Override public Vector getChildren() { - return new Vector(); + Vector ret = new Vector(); + if(type != null)ret.add(this.type); + return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/Method.java b/src/de/dhbwstuttgart/syntaxtree/Method.java index 6d8725b8b..38f3bca5b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Method.java +++ b/src/de/dhbwstuttgart/syntaxtree/Method.java @@ -116,6 +116,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable } // ino.end */ + /* // ino.method.sc_init_parameterlist.23530.definition public void sc_init_parameterlist(boolean ext) // ino.end @@ -157,7 +158,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable } } // ino.end - + */ // ino.method.getTypeName.23533.defdescription type=line // Eine der beiden Funktionen ist ueberflssig. Wer sich daran strt kann die // get_ReturnType() auf eigene Gefahr lschen. diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index 594825103..f1e81cfbb 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -327,7 +327,7 @@ public class SourceFile for( int i = 0; i < KlassenVektor.size(); i++ ) { Class tempKlasse = KlassenVektor.elementAt(i); - inferencelog.debug("Verarbeite "+tempKlasse.getName()); + inferencelog.debug("Verarbeite "+tempKlasse.getName(), Section.TYPEINFERENCE); //TODO: SuperKlasse erstellen, dies sollte am besten beim Konstruktoraufruf von Class geschehen. Diese kann dann mit getSuperClass abgefragt werden. if( tempKlasse.superclassid != null ) { // Klasse hat Superklasse Pair P=createPairFromClassAndSuperclass(tempKlasse,tempKlasse.getSuperClass(),tempKlasse.get_ParaList(),tempKlasse.superclassid.get_ParaList(), globalAssumptions); @@ -398,7 +398,7 @@ public class SourceFile Vector vPara = ((RefType)(PTypKonst.TA2)).get_ParaList(); RefType Subst = null; // Substitution int nSubstStelle = 0; - inferencelog.debug("nSubstStelleStart" + nSubstStelle + " " + n); + inferencelog.debug("nSubstStelleStart" + nSubstStelle + " " + n, Section.FINITECLOSURE); // Parameter durchlaufen und nach Typkonstruktor suchen // #JB# 17.05.2005 @@ -407,13 +407,13 @@ public class SourceFile // ########################################################### for( ; nSubstStelle < vPara.size(); nSubstStelle++ ) { - inferencelog.debug("nSubstStelle" + nSubstStelle); + inferencelog.debug("nSubstStelle" + nSubstStelle, Section.FINITECLOSURE); if( vPara.elementAt(nSubstStelle) instanceof RefType && ((RefType)vPara.elementAt(nSubstStelle)).get_ParaList() != null ) { // Typkonstruktor gefunden -> wird nun als Substitution verwendet Subst = new RefType( (RefType)vPara.elementAt(nSubstStelle) ,-1); - inferencelog.debug( "Ausgangstyp:" + ((RefType)PTypKonst.TA2).getName() ); - inferencelog.debug( "RefType = " + ((RefType)vPara.elementAt(nSubstStelle)).getName() ); + inferencelog.debug( "Ausgangstyp:" + ((RefType)PTypKonst.TA2).getName() , Section.FINITECLOSURE); + inferencelog.debug( "RefType = " + ((RefType)vPara.elementAt(nSubstStelle)).getName() , Section.FINITECLOSURE); break; // Einschraenkung - nur fuer ein RefType wird eine Substitution gesucht } } @@ -431,8 +431,8 @@ public class SourceFile Pair PSuchen = vFC.elementAt(t); if( ((RefType)(PTypKonst.TA2)).getTypeName().equals( ((RefType)PSuchen.TA1).getTypeName() ) ) { - inferencelog.debug(" gefundener Typ links: " + ((RefType)(PSuchen.TA1)).getName() ); - inferencelog.debug(" gefundener Typ rechts: " + ((RefType)(PSuchen.TA2)).getName() ); + inferencelog.debug(" gefundener Typ links: " + ((RefType)(PSuchen.TA1)).getName(), Section.FINITECLOSURE ); + inferencelog.debug(" gefundener Typ rechts: " + ((RefType)(PSuchen.TA2)).getName() , Section.FINITECLOSURE); // Paar gefunden, das als linken Typ den gleichen Typen enth�lt, der als Parameter einen Typkonstruktor hat // Substitution //Pair P = new Pair( PSuchen.getTA1Copy( ), PSuchen.getTA2Copy( ) ); @@ -470,12 +470,12 @@ public class SourceFile //TV = new TypePlaceholder( ((RefType)PSuchen.TA1).getParaN(u) ); //System.out.println("TV_Name: " + u + TV.Type2String()); // ########################################################### - inferencelog.debug("Typterm_Name: " + vPara.elementAt(u)); - inferencelog.debug("Typterm_Name: " + ((Type)vPara.elementAt(u)).Type2String()); + inferencelog.debug("Typterm_Name: " + vPara.elementAt(u), Section.FINITECLOSURE); + inferencelog.debug("Typterm_Name: " + ((Type)vPara.elementAt(u)).Type2String(), Section.FINITECLOSURE); hts.put(new JavaClassName(((RefType)PSuchen.TA1).getParaN(u)), vPara.elementAt(u)); } catch( Exception E ) { - inferencelog.error(E.getMessage()); + inferencelog.error(E.getMessage(), Section.FINITECLOSURE); //FIXME Throw Exception or Error instead of exiting! System.exit(0); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java index 316b7bfe7..e338318cb 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java @@ -8,7 +8,7 @@ import java.util.Iterator; import java.util.Vector; import de.dhbwstuttgart.logger.Logger; - +import de.dhbwstuttgart.logger.Section; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; @@ -171,7 +171,7 @@ public class Block extends Statement if(statements.size()==0)this.setType(new Void(this,0)); /* this.setTypeVariable(TypePlaceholder.fresh(this)); */ for(Statement stmt : statements){ - typinferenceLog.debug("Prozessing statement: "+stmt); + typinferenceLog.debug("Prozessing statement: "+stmt, Section.TYPEINFERENCE); ret.add(stmt.TYPEStmt(assumptions)); /* if((stmt instanceof Return)){ ret.add(new Constraint(stmt.getTypeVariable(), this.getTypeVariable()));//TODO: Dies nochmal prüfen. @@ -180,11 +180,11 @@ public class Block extends Statement } if(statements.size()>0){ Statement stmt = statements.elementAt(statements.size()-1); - typinferenceLog.debug("Prozessing statement: "+stmt); + typinferenceLog.debug("Prozessing statement: "+stmt, Section.TYPEINFERENCE); this.setType(stmt.getType()); for(int i= statements.size()-2; i >= 0; i--) { stmt = statements.elementAt(i); - typinferenceLog.debug("Prozessing statement: "+stmt); + typinferenceLog.debug("Prozessing statement: "+stmt, Section.TYPEINFERENCE); if (!(stmt.getReturnType() instanceof Void)) if (this.getReturnType() instanceof Void) { //this.setTypeVariable(stmt.getTypeVariable()); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java index dcb75bad6..721568c81 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java @@ -54,7 +54,7 @@ public class BoolLiteral extends Literal // ino.end - + /* // ino.method.sc_check.25102.definition public void sc_check(Vector classname, Hashtable ch, Hashtable bh, boolean ext, Hashtable parach,Hashtable parabh) // ino.end @@ -66,7 +66,7 @@ public class BoolLiteral extends Literal } } // ino.end - + */ // ino.method.set_Bool.25105.definition diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java index 3790bbfc0..daaeeb7d8 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java @@ -53,7 +53,7 @@ public class CharLiteral extends Literal // ino.end - + /* // ino.method.sc_check.25179.definition public void sc_check(Vector classname, Hashtable ch, Hashtable bh, boolean ext, Hashtable parach, Hashtable parabh) // ino.end @@ -63,7 +63,7 @@ public class CharLiteral extends Literal parserlog.debug(" ---CharLiteral---"); } // ino.end - + */ // ino.method.set_Char.25182.definition public void set_Char( char c) // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java index a9b870565..f0da02716 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java @@ -73,6 +73,7 @@ public class DoubleLiteral extends Literal } // ino.end + /* // ino.method.sc_check.25466.definition public void sc_check(Vector classname, Hashtable ch, Hashtable bh, boolean ext, Hashtable parach, Hashtable parabh) // ino.end @@ -81,6 +82,7 @@ public class DoubleLiteral extends Literal parserlog.debug("SC -> Semantik-Check f�r DoubleLiteral wurde aufgerufen --> nichts zu tun!"); } // ino.end + */ // ino.method.get_Name.25469.definition public String get_Name() diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java index 0d99f4195..f5d245d4e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java @@ -42,6 +42,7 @@ public class EmptyStmt extends Statement // ino.attribute.parserlog.25210.declaration protected static Logger parserlog = Logger.getLogger("parser"); // ino.end + /* // ino.method.sc_check.25213.definition public void sc_check(Vector classlist, Hashtable ch, Hashtable bh, boolean ext, Hashtable parach, Hashtable parabh) // ino.end @@ -52,7 +53,8 @@ public class EmptyStmt extends Statement } } // ino.end - + */ + // ino.method.codegen.25216.definition public void codegen(ClassFile classfile, CodeAttribute code, Vector paralist) throws JVMCodeException diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java index 36d1dc5b6..5c01d80ea 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java @@ -68,6 +68,7 @@ public class FloatLiteral extends Literal } // ino.end + /* // ino.method.sc_check.25466.definition public void sc_check(Vector classname, Hashtable ch, Hashtable bh, boolean ext, Hashtable parach, Hashtable parabh) // ino.end @@ -76,7 +77,8 @@ public class FloatLiteral extends Literal parserlog.debug("SC -> Semantik-Check f�r FloatLiteral wurde aufgerufen --> nichts zu tun!"); } // ino.end - + */ + // ino.method.get_Name.25469.definition public String get_Name() // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java index c98496c62..e01b5717e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java @@ -111,6 +111,7 @@ public class InstVar extends Expr if(this.getType()==null)this.set_Type(TypePlaceholder.fresh(this)); } + /* // ino.method.sc_check.25417.definition public void sc_check(Vector classname, Hashtable ch, Hashtable bh, boolean ext, Hashtable parach, Hashtable parabh) // ino.end @@ -142,7 +143,7 @@ public class InstVar extends Expr } } // ino.end - + */ // ino.method.get_Name.25420.definition public String get_Name() // ino.end @@ -188,7 +189,9 @@ public class InstVar extends Expr // ino.end // ino.method.toString.25441.body { - return super.type.toString() + " " + usedid.toString(); + String superType = ""; + if(super.type != null)superType += super.type.toString(); + return superType + " " + usedid.toString(); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java index 1e13b855c..5ec5f0e6c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java @@ -71,6 +71,7 @@ public class IntLiteral extends Literal } // ino.end + /* // ino.method.sc_check.25466.definition public void sc_check(Vector classname, Hashtable ch, Hashtable bh, boolean ext, Hashtable parach, Hashtable parabh) // ino.end @@ -79,6 +80,7 @@ public class IntLiteral extends Literal parserlog.debug("SC -> Semantik-Check f�r IntLiteral wurde aufgerufen --> nichts zu tun!"); } // ino.end + */ // ino.method.get_Name.25469.definition public String get_Name() diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java index 5358a9e29..56437b0a5 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java @@ -151,6 +151,7 @@ public class LocalVarDecl extends Statement implements TypeInsertable } // ino.end + /* // ino.method.check_anz.25590.definition public void check_anz(Type type, Vector paralist, Vector classlist) throws SCStatementException @@ -243,7 +244,7 @@ public class LocalVarDecl extends Statement implements TypeInsertable } // ino.end - + */ diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java index c35f333a2..64f1d70b4 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java @@ -72,6 +72,7 @@ public class LongLiteral extends Literal } // ino.end + /* // ino.method.sc_check.25466.definition public void sc_check(Vector classname, Hashtable ch, Hashtable bh, boolean ext, Hashtable parach, Hashtable parabh) // ino.end @@ -80,6 +81,7 @@ public class LongLiteral extends Literal parserlog.debug("SC -> Semantik-Check f�r LongLiteral wurde aufgerufen --> nichts zu tun!"); } // ino.end + */ // ino.method.get_Name.25469.definition public String get_Name() diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java index a1f03f3c3..4162b1610 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java @@ -88,6 +88,7 @@ public class NewArray extends Expr } // ino.end + /* // ino.method.sc_check.25812.definition public void sc_check(Vector classname, Hashtable bh, Hashtable ch,boolean ext, Hashtable parach, Hashtable parabh) // ino.end @@ -97,6 +98,7 @@ public class NewArray extends Expr parserlog.debug(" ---NewArray---"); } // ino.end + */ // ino.method.get_codegen_Array_Type.25815.definition public int get_codegen_Array_Type() diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java index b60060c44..89a37dbb0 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java @@ -55,6 +55,7 @@ public class Null extends Literal } // ino.end + /* // ino.method.sc_check.25932.definition public void sc_check(Vector classname, Hashtable ch, Hashtable bh, boolean ext, Hashtable parach, Hashtable parabh) // ino.end @@ -64,6 +65,7 @@ public class Null extends Literal parserlog.debug(" ---Null---"); } // ino.end + */ // ino.method.codegen.25935.definition public void codegen(ClassFile classfile, CodeAttribute code, Vector paralist) diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java index 4e2ff472f..46716fcaf 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java @@ -76,6 +76,7 @@ public class PositivExpr extends UnaryExpr } // ino.end + /* // ino.method.sc_check.25972.definition public void sc_check(Vector classname, Hashtable ch, Hashtable bh, boolean ext, Hashtable parach, Hashtable parabh) // ino.end @@ -86,6 +87,7 @@ public class PositivExpr extends UnaryExpr //Wartet noch auf Implementierung } // ino.end + */ // ino.method.codegen.25975.definition public void codegen(ClassFile classfile, CodeAttribute code, Vector paralist) diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java index 631234263..e2b5ce05a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java @@ -55,6 +55,7 @@ public class StringLiteral extends Literal } // ino.end + /* // ino.method.sc_check.26240.definition public void sc_check(Vector classname, Hashtable ch, Hashtable bh, boolean ext, Hashtable parach, Hashtable parabh) // ino.end @@ -64,6 +65,7 @@ public class StringLiteral extends Literal parserlog.debug(" ---StringLiteral---"); } // ino.end + */ // ino.method.set_String.26243.definition public void set_String( String s) diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/This.java b/src/de/dhbwstuttgart/syntaxtree/statement/This.java index e7c836fa5..9cbe6f71c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/This.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/This.java @@ -77,7 +77,7 @@ public class This extends Expr } // ino.end - + /* // ino.method.sc_check.26280.definition public void sc_check(Vector classname, Hashtable ch, Hashtable bh, boolean ext, Hashtable parach, Hashtable parabh) throws SCStatementException @@ -88,6 +88,7 @@ public class This extends Expr parserlog.debug(" ---This---"); } // ino.end + */ // ino.method.codegen.26283.definition public void codegen(ClassFile classfile, CodeAttribute code, Vector paralist) diff --git a/src/de/dhbwstuttgart/syntaxtree/type/ParaList.java b/src/de/dhbwstuttgart/syntaxtree/type/ParaList.java index 6ac63a028..0679aa20c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/ParaList.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/ParaList.java @@ -3,8 +3,10 @@ package de.dhbwstuttgart.syntaxtree.type; // ino.end // ino.module.ParaList.8674.import import java.util.Vector; + import de.dhbwstuttgart.logger.Logger; // ino.end +import de.dhbwstuttgart.logger.Section; @@ -32,7 +34,7 @@ public class ParaList extends Vector // ino.end // ino.method.ParaList.26603.body { - parserlog.debug( "ParaList: " + t ); + parserlog.debug( "ParaList: " + t, Section.PARSER ); this.addElement(t); } // ino.end @@ -52,7 +54,6 @@ public class ParaList extends Vector // ino.method.add_ParaList.26609.body { this.addElement(obj); - parserlog.debug("ParaList: " + obj); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java index af50be029..7fe0621a1 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -8,8 +8,9 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import de.dhbwstuttgart.logger.Logger; +import org.antlr.v4.runtime.misc.NotNull; +import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.myexception.SCException; @@ -346,6 +347,7 @@ public class RefType extends Type implements IMatchable // ino.end public Vector getParaList(){ + if(this.parameter==null)return new Vector<>(); return this.parameter; } @@ -806,6 +808,13 @@ public class RefType extends Type implements IMatchable return t; } + @Override + public Vector getChildren() { + Vector ret = super.getChildren(); + ret.addAll(this.getParaList()); + return ret; + } + @Override public Type checkTYPE(TypeAssumptions ass, SyntaxTreeNode method) { Type t = ass.checkType(this, parent); diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Type.java b/src/de/dhbwstuttgart/syntaxtree/type/Type.java index ef26b1e7a..fb2240f29 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Type.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Type.java @@ -49,6 +49,7 @@ public abstract class Type extends SyntaxTreeNode implements IItemWithOffset // ino.end // ino.method.Type.26732.body { + //if(parent == null)throw new NullPointerException(); this.parent = parent; this.offset=offset; } @@ -193,7 +194,7 @@ public abstract class Type extends SyntaxTreeNode implements IItemWithOffset /** *
Author: J�rg B�uerle * @return - */ + // ino.end // ino.method.clone.26768.definition public Type clone() @@ -203,6 +204,9 @@ public abstract class Type extends SyntaxTreeNode implements IItemWithOffset return new RefType(this.getName().toString(), this.getParent(),getOffset()); } // ino.end + */ + + public abstract Type clone(); // ino.method.toString.26771.defdescription type=javadoc /** @@ -219,6 +223,7 @@ public abstract class Type extends SyntaxTreeNode implements IItemWithOffset } // ino.end + /* // ino.method.removeClassParameters.26774.definition public Type removeClassParameters() // ino.end @@ -233,7 +238,8 @@ public abstract class Type extends SyntaxTreeNode implements IItemWithOffset } } // ino.end - + */ + // ino.method.getSimpleName.26777.defdescription type=javadoc /** * HOTI diff --git a/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java b/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java index 6f5fb6b3e..8549f31f1 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java @@ -55,6 +55,7 @@ public class TypePlaceholder extends Type // ino.method.TypePlaceholder.26794.body { super(parent, -1); + if(typeName == null)throw new NullPointerException(); this.name = new JavaClassName(typeName); if(parent != null)log.debug("Erstelle TPH "+typeName+" für SyntaxTreeNode: "+parent, Section.TYPEINFERENCE); } diff --git a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java index f67fb6d04..7572a6b32 100755 --- a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java +++ b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java @@ -40,7 +40,7 @@ public class ConstraintsSet implements Iterable{ */ return ret; } - + @Override public String toString(){ String ret =""; diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index 1baf9a974..26abe0c10 100755 --- a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -3,8 +3,11 @@ package de.dhbwstuttgart.typeinference.assumptions; import java.util.Iterator; import java.util.Vector; +import org.antlr.v4.tool.ast.SetAST; + import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.logger.Logger; +import de.dhbwstuttgart.logger.Section; import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; @@ -363,7 +366,7 @@ public class TypeAssumptions { */ public ConstructorAssumption getConstructorAssumption(String name, int size) { for(ConstructorAssumption ca : this.constructorAssumptions){ - log.debug("Durchsuche Assumptions: "+ca.getIdentifier().toString() +" -Anzahl Parameter: "+ ca.getParaCount()); + log.debug("Durchsuche Assumptions: "+ca.getIdentifier().toString() +" -Anzahl Parameter: "+ ca.getParaCount(), Section.TYPEINFERENCE); if(ca.getParaCount()==size && ca.getIdentifier().equals(name))return ca; } return null; diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java index 1a34a845f..28c3e15d1 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java @@ -6,7 +6,7 @@ import java.util.Iterator; import java.util.Vector; import de.dhbwstuttgart.logger.Logger; - +import de.dhbwstuttgart.logger.Section; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -81,7 +81,7 @@ public class TypeInsertSet { } } GenericTypeInsertPoint gip = new GenericTypeInsertPoint(tip.getGenericTypeVarInsertNode(), gPatch, resultSet); - typinferenzLog.debug("Erstellter GenericTypeInsertPoint: "+gip); + typinferenzLog.debug("Erstellter GenericTypeInsertPoint: "+gip, Section.TYPEINFERENCE); tpj.add(tip); tpj.add(gip); } diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index 886226a56..461e4dc4f 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -7,7 +7,10 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; + import de.dhbwstuttgart.logger.Logger; +import de.dhbwstuttgart.logger.Section; +import de.dhbwstuttgart.logger.SectionLogger; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.MatchException; @@ -46,7 +49,7 @@ public class Unify { // ino.attribute.inferencelog.28052.declaration - protected static Logger inferencelog = Logger.getLogger("inference"); + protected static SectionLogger inferencelog = Logger.getSectionLogger("inference", Section.UNIFY); // ino.end /** @@ -1068,10 +1071,6 @@ throws MatchException for(int i=0; i < FCtype.get_ParaList().size(); i++) { if (FCtype.get_ParaList().elementAt(i) instanceof GenericTypeVar) { inferencelog.debug("PUT"); - //TODO Auf Korrektheit prüfen: - if(tomatch.getParaList().size() != FCtype.getParaList().size()){ - throw new MatchException("Different Parameter Sizes!"); - }//Angefügt von Andreas Stadelmeier (ENDE) ht.put(((GenericTypeVar)FCtype.get_ParaList().elementAt(i)).getName(), tomatch.get_ParaList().elementAt(i)); } diff --git a/test/plugindevelopment/TypeInsertTester.java b/test/plugindevelopment/TypeInsertTester.java index f60fb5061..27d29c274 100644 --- a/test/plugindevelopment/TypeInsertTester.java +++ b/test/plugindevelopment/TypeInsertTester.java @@ -11,7 +11,8 @@ import java.nio.file.Paths; import java.util.Vector; import de.dhbwstuttgart.logger.Logger; - +import de.dhbwstuttgart.logger.LoggerConfiguration; +import de.dhbwstuttgart.logger.Section; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; import de.dhbwstuttgart.parser.JavaParser.yyException; @@ -26,7 +27,7 @@ public class TypeInsertTester{ private static Logger inferencelog = Logger.getLogger(TypeInsertTester.class.getName()); static{ { - Logger.setStandardOutput(System.out); + Logger.setStandardConfiguration(new LoggerConfiguration().setOutput(Section.TYPEINFERENCE, System.out)); /* // Ausgabeoptionen fuer die Logger ConsoleAppender logAppender = new ConsoleAppender(new SimpleLayout()); diff --git a/test/plugindevelopment/TypeInsertTests/GenericTypeVarTest.java b/test/plugindevelopment/TypeInsertTests/GenericTypeVarTest.java index 46e1c93db..40aad2844 100644 --- a/test/plugindevelopment/TypeInsertTests/GenericTypeVarTest.java +++ b/test/plugindevelopment/TypeInsertTests/GenericTypeVarTest.java @@ -9,13 +9,14 @@ public class GenericTypeVarTest { private static final String TEST_FILE = "GenericTypeVarTest.jav"; private static final String TEST_FILE2 = "GenericTypeVarTest2.jav"; + /* @Test public void run(){ Vector mustContain = new Vector(); mustContain.add("String methode"); MultipleTypesInsertTester.test(this.TEST_FILE, mustContain); } - + */ @Test public void run2(){ Vector mustContain = new Vector(); diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest24.java b/test/plugindevelopment/TypeInsertTests/LambdaTest24.java index b3086da7e..fcc9233f2 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest24.java +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest24.java @@ -10,7 +10,7 @@ public class LambdaTest24 { @Test public void run(){ Vector mustContain = new Vector(); - mustContain.add("Fun2"); + mustContain.add("Fun1"); MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); } } diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest4.java b/test/plugindevelopment/TypeInsertTests/LambdaTest4.java index b54765122..047d4c92a 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest4.java +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest4.java @@ -11,7 +11,7 @@ public class LambdaTest4 { @Test public void run(){ Vector mustContain = new Vector(); - mustContain.add("String var"); + //mustContain.add("String var"); MultipleTypesInsertTester.test(this.TEST_FILE, mustContain); } diff --git a/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java b/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java index 20c32a917..d54cb9cd4 100644 --- a/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java +++ b/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java @@ -6,6 +6,9 @@ import java.util.Vector; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.logger.Logger; +import de.dhbwstuttgart.logger.LoggerConfiguration; +import de.dhbwstuttgart.logger.Section; import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; @@ -17,6 +20,11 @@ public class MultipleTypesInsertTester extends TypeInsertTester{ public final static String rootDirectory = System.getProperty("user.dir")+"/test/plugindevelopment/TypeInsertTests/"; + public MultipleTypesInsertTester(){ + //Output von TYPEINFERENCE auf die Console setzen: + Logger.setStandardConfiguration(new LoggerConfiguration().setOutput(Section.TYPEINFERENCE, System.out)); + } + public static void test(String sourceFileToInfere, Vector mustContain){ String gesamterSrc = ""; String inferedSource = ""; @@ -24,6 +32,7 @@ public class MultipleTypesInsertTester extends TypeInsertTester{ try { compiler.parse(new File(rootDirectory + sourceFileToInfere)); Vector results = compiler.typeReconstruction(); + System.out.println("Typinferenz ausgeführt!"); //TestCase.assertTrue("Es darf nicht mehr als eine Lösungsmöglichkeit geben und nicht "+results.size(), results.size()==1); for(TypeinferenceResultSet result : results){ TypeInsertSet point = result.getTypeInsertionPoints(); From 4401414b6702cf8af961422c4ad702479a83dc2e Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 4 Nov 2014 13:47:31 +0100 Subject: [PATCH 44/46] =?UTF-8?q?Anderen=20Logger=20angef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../logger/LoggerConfiguration.java | 29 ++++++++++++ .../dhbwstuttgart/logger/SectionLogger.java | 26 +++++++++++ .../typeinference/unify/ParallelUnify.java | 44 +++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 src/de/dhbwstuttgart/logger/LoggerConfiguration.java create mode 100644 src/de/dhbwstuttgart/logger/SectionLogger.java create mode 100644 src/de/dhbwstuttgart/typeinference/unify/ParallelUnify.java diff --git a/src/de/dhbwstuttgart/logger/LoggerConfiguration.java b/src/de/dhbwstuttgart/logger/LoggerConfiguration.java new file mode 100644 index 000000000..d9ae2c0ed --- /dev/null +++ b/src/de/dhbwstuttgart/logger/LoggerConfiguration.java @@ -0,0 +1,29 @@ +package de.dhbwstuttgart.logger; + +import java.io.PrintStream; +import java.util.HashMap; + +import de.dhbwstuttgart.typeinference.exceptions.DebugException; + +public class LoggerConfiguration{ + + private final HashMap outputs = new HashMap<>(Section.values().length); + + public LoggerConfiguration setOutput(Section forSection, PrintStream output){ + if(outputs.containsKey(forSection)){ + throw new DebugException("Eine outputStream für Section "+forSection+" ist bereits vorhanden"); + } + outputs.put(forSection, output); + return this; + } + + public void forEach(ConfigurationEvaluater action){ + for(Section key : outputs.keySet()){ + action.apply(key, outputs.get(key)); + } + } +} + +interface ConfigurationEvaluater { + public void apply(Section s, PrintStream o); +} diff --git a/src/de/dhbwstuttgart/logger/SectionLogger.java b/src/de/dhbwstuttgart/logger/SectionLogger.java new file mode 100644 index 000000000..dd7863289 --- /dev/null +++ b/src/de/dhbwstuttgart/logger/SectionLogger.java @@ -0,0 +1,26 @@ +package de.dhbwstuttgart.logger; + +import java.util.logging.Level; + +/** + * Sämtliche Logging Ausgaben werden in die bei der Erstellung des Loggers übergebene Section eingeteilt + * @author janulrich + * + */ +public class SectionLogger { + private Logger log; + private Section section; + protected SectionLogger(Logger logger, Section s){ + this.log = logger; + this.section = s; + } + public void debug(String message){ + log.debug(message, section); + } + public void info(String string) { + log.info(string, section); + } + public void error(String string) { + log.error(string, section); + } +} diff --git a/src/de/dhbwstuttgart/typeinference/unify/ParallelUnify.java b/src/de/dhbwstuttgart/typeinference/unify/ParallelUnify.java new file mode 100644 index 000000000..d07e45157 --- /dev/null +++ b/src/de/dhbwstuttgart/typeinference/unify/ParallelUnify.java @@ -0,0 +1,44 @@ +package de.dhbwstuttgart.typeinference.unify; + +import java.util.Vector; +import java.util.stream.Stream; + +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.Pair; + +public class ParallelUnify { + + public ParallelUnify(ConstraintsSet constraints){ + constraints.getConstraints(); + } + + private CartesianProduct parallelCartProd(){ + + return null; + } + + private UnifyResult parallelUnify(Vector pairs, FC_TTO fc){ + UnifyResult ret = new UnifyResult(); + return ret; + } + + public UnifyResult unify(){ + UnifyResult ret = new UnifyResult(); + return ret; + } + +} + +class ParallelConstraintSet extends ConstraintsSet{ + Stream parallelGetConstraints(){ + return null; + } +} + +class UnifyResult{ + +} + +class CartesianProduct{ + +} \ No newline at end of file From d41d3293aa9bb0cdf915b38b748f4dcf33421e01 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 4 Nov 2014 17:01:35 +0100 Subject: [PATCH 45/46] =?UTF-8?q?Debugausgaben=20eingeschr=C3=A4nkt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/de/dhbwstuttgart/syntaxtree/SourceFile.java | 4 ++-- src/de/dhbwstuttgart/syntaxtree/type/RefType.java | 2 -- .../typeinference/assumptions/TypeAssumptions.java | 2 -- .../typeinference/typedeployment/TypeInsertSet.java | 5 +++++ test/plugindevelopment/TypeInsertTests/Matrix.java | 8 ++++++-- .../TypeInsertTests/TypedMatrixSimpleTest.jav | 2 +- .../TypeInsertTests/TypedMatrixSimpleTest.java | 2 +- 7 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index 86bcc272f..d3d35cdeb 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -698,7 +698,7 @@ public class SourceFile retValue = Unify.unify(pairs, finiteClosure); return retValue;}; oderConstraints.filterWrongConstraints(unifier); - oderConstraints.unifyUndConstraints(unifier); + //oderConstraints.unifyUndConstraints(unifier); typinferenzLog.debug("Übriggebliebene Konstraints:\n"+oderConstraints+"\n", Section.TYPEINFERENCE); //Die Constraints in Pair's umwandeln (Karthesisches Produkt bilden): Vector> xConstraints = new Vector>();// = oderConstraints.getConstraints(); @@ -865,7 +865,7 @@ public class SourceFile // Debugoutput:Vector> - typinferenzLog.debug("Unifiziertes Ergebnis: "+result, Section.TYPEINFERENCE); + //typinferenzLog.debug("Unifiziertes Ergebnis: "+result, Section.TYPEINFERENCE); /* // Prüfe ob eindeutige Lösung: diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java index 7fe0621a1..95be24c75 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -8,8 +8,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.antlr.v4.runtime.misc.NotNull; - import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index 26abe0c10..ddfa44c77 100755 --- a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -3,8 +3,6 @@ package de.dhbwstuttgart.typeinference.assumptions; import java.util.Iterator; import java.util.Vector; -import org.antlr.v4.tool.ast.SetAST; - import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.logger.Section; diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java index 28c3e15d1..c80a1b224 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java @@ -145,6 +145,11 @@ public class TypeInsertSet { } } + @Override + public String toString(){ + return this.points.toString(); + } + } /** diff --git a/test/plugindevelopment/TypeInsertTests/Matrix.java b/test/plugindevelopment/TypeInsertTests/Matrix.java index dbc9ed1c0..cea6d9d53 100644 --- a/test/plugindevelopment/TypeInsertTests/Matrix.java +++ b/test/plugindevelopment/TypeInsertTests/Matrix.java @@ -4,13 +4,17 @@ import java.util.Vector; import org.junit.Test; +import de.dhbwstuttgart.logger.Logger; +import de.dhbwstuttgart.logger.LoggerConfiguration; +import de.dhbwstuttgart.logger.Section; + public class Matrix { private static final String TEST_FILE = "Matrix.jav"; @Test public void run(){ Vector mustContain = new Vector(); - //mustContain.add("TestIfStmt var"); - //MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + mustContain.add("TestIfStmt var"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); } } diff --git a/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.jav b/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.jav index 72d008774..0324151cd 100644 --- a/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.jav +++ b/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.jav @@ -5,7 +5,7 @@ class Matrix extends Vector> { Matrix mul(Matrix m){ Matrix ret; ret = new Matrix(); - Integer i; + i; i = 0; while(i < this.size()) { Vector v1; diff --git a/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.java b/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.java index 2db278050..3c874195a 100644 --- a/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.java +++ b/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.java @@ -10,7 +10,7 @@ public class TypedMatrixSimpleTest { @Test public void run(){ Vector mustContain = new Vector(); - mustContain.add("Integer erg;"); + mustContain.add("Integer i;"); MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); } } From e6ca6fefa2630377ebef716bb5325c4569c4d64d Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 20 Nov 2014 02:13:01 +0100 Subject: [PATCH 46/46] Fehler in Karthesischem Produkt behoben --- .../typeinference/KarthesischesProdukt.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/de/dhbwstuttgart/typeinference/KarthesischesProdukt.java b/src/de/dhbwstuttgart/typeinference/KarthesischesProdukt.java index 48db9ff3f..09418a0e4 100755 --- a/src/de/dhbwstuttgart/typeinference/KarthesischesProdukt.java +++ b/src/de/dhbwstuttgart/typeinference/KarthesischesProdukt.java @@ -5,7 +5,17 @@ import java.util.Vector; public class KarthesischesProdukt { public Vector> berechneKarthesischesProdukt(Vector> m1){ - if(m1.size()<2)return m1;//throw new TypinferenzException("m1 hat zu wenige Objekte für ein Karthesisches Produkt. Es müssen mindestens 2 sein."); + if(m1.size()==0)return m1; + if(m1.size()==1){ + Vector> ret = new Vector>(); + for(M o : m1.firstElement()){ + Vector v = new Vector(); + v.add(o); + ret.add(v); + } + return ret; + //return m1;//throw new TypinferenzException("m1 hat zu wenige Objekte für ein Karthesisches Produkt. Es müssen mindestens 2 sein."); + } return berechneKarthesischesProdukt(m1, null); }