Javadoc generieren und Aufräumen: Sämtliche codegen-Methoden und Hilfsklassen zu Generierung von Bytecode löschen. Unnötige Tests entfernen. ANTLR-Package entfernen

This commit is contained in:
JanUlrich 2015-05-12 19:49:27 +02:00
parent ae40372a8b
commit 2b47b8e5bf
482 changed files with 837 additions and 31071 deletions

View File

@ -1,5 +1,5 @@
eclipse.preferences.version=1
encoding//src/de/dhbwstuttgart/core/MyCompiler.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/<project>=ISO-8859-1

View File

@ -1,6 +0,0 @@
class FieldTest{
String var;
String methode(String para1){
return var;
}
}

View File

@ -1,32 +0,0 @@
public class TestForStmt {
public void m1() {
i;
for (i=0;i<5;i++) {
}
}
public void m2() {
i;
for (i=0;i<5;i++) {
j;
j="abc";
}
j;
j=3;
}
public m3() {
i;
for (i=0;i<5;i++) {
j;
for (j=0;j<5;j++) {
return i==j;
}
}
}
}

View File

@ -1,27 +0,0 @@
import de.dhbwstuttgart.typeinference.Menge;
public class TestIfStmt {
public m1() {
a;
if (a) {
return a;
}
else
return false;
}
public m2() {
a;
c;
a = new Menge<Integer>();
if (a.isEmpty()) {
c="empty";
}
else if (a.size()==1) {
c="almost empty";
}
else
return a;
}
}

View File

@ -1,12 +0,0 @@
public class TestInferenceAcrossBlocks{
public m(a){
if(a==true){
return 3;
}
else {
x;
return x;
}
}
}

View File

@ -1,18 +0,0 @@
public class TestSimpleBlocks{
public m(a){
{
d;
d = 'a';
{
c;
c = d;
}
{
c;
c = d==a;
}
}
return a;
}
}

View File

@ -1,7 +0,0 @@
public class TestSimpleVariable {
public m() {
c;
}
}

View File

@ -1,11 +0,0 @@
public class TestSwitchStmt {
public m(a) {
switch (a) {
case 1: return a++; break;
case 2: return a--; break;
default: return a;
}
}

View File

@ -1,14 +0,0 @@
public class TestTryCatchBlock {
public m() {
try {
return new TestTryCatchBlock();
}
catch (e) {
return null;
}
}
}

View File

@ -1,12 +0,0 @@
public class TestUndeterminedReturnNegative {
public m1(a) {
if (a) {
a=false;
}
else
return false;
}
}

View File

@ -1,11 +0,0 @@
public class TestUninitializedVariable {
public void m1() {
a;
a++;
}
<T extends java.lang.Number> void m2(T a) {
}
}

View File

@ -1,9 +0,0 @@
public class TestWhileStmt {
public m1() {
i;
while (true)
i++;
}
}

View File

@ -1,9 +0,0 @@
public class TestOwnClassMember {
Integer a;
public void m1(b) {
b += a;
}
}

View File

@ -1,12 +0,0 @@
public class TestOwnClassMethod {
Integer a;
public void m1(b) {
a += b;
}
public void m2(c, d) {
c.m1(d);
}
}

View File

@ -1,12 +0,0 @@
import java.io.OutputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.BufferedOutputStream;
import java.sql.Connection;
class TestStandardLibInheritanceInference{
foo(x){
x.close();
}
}

View File

@ -1,11 +0,0 @@
import java.lang.System;
import java.io.PrintStream;
public class TestStandardLibMember {
public m1() {
a;
a=System.out;
a.println();
}
}

View File

@ -1,20 +0,0 @@
import java.util.HashMap;
import de.dhbwstuttgart.typeinference.Menge;
public class TestStandardLibMethod {
public m1() {
a;
a = new HashMap<String,Integer>();
a.put("2",-1);
}
public m2(Menge<Menge<Integer>> m){
k;
k = 0;
ret;
ret = m.elementAt(k).elementAt(k).intValue();
return ret;
}
}

View File

@ -3,6 +3,8 @@ package de.dhbwstuttgart.JvmDisassembler;
import java.util.*;
import java.io.*;
import de.dhbwstuttgart.typeinference.Menge;
//GenricsTest.java Testfile fuer jvmDisassembler
class jvmDisassembler {
@ -133,7 +135,7 @@ class jvmDisassembler {
int constant_pool_count = makePosShort(d.readShort());
System.out.println("constant_pool_count = " + constant_pool_count);
Menge<String> const_pool = new Menge<String>(constant_pool_count);
Menge<String> const_pool = new Menge<String>();
const_pool.addElement(""); // Konstatenpool beginnt bei 1, Stelle 0 auffuellen
System.out.println("constant_pool =\n{");

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="antlr-4.4-complete.jar"/>
<classpathentry kind="output" path=""/>
</classpath>

View File

@ -1,107 +0,0 @@
/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

View File

@ -1 +0,0 @@
antlr

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="antlr-4.4-complete" level="project" />
</component>
</module>

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
</project>

View File

@ -1,3 +0,0 @@
<component name="CopyrightManager">
<settings default="" />
</component>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
</project>

View File

@ -1,9 +0,0 @@
<component name="libraryTable">
<library name="antlr-4.4-complete">
<CLASSES>
<root url="jar://$PROJECT_DIR$/antlr-4.4-complete.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
</project>

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/antlr.iml" filepath="$PROJECT_DIR$/.idea/antlr.iml" />
</modules>
</component>
</project>

View File

@ -1,5 +0,0 @@
<component name="DependencyValidationManager">
<state>
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</state>
</component>

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@ -1,572 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="0c4899e3-58fa-4483-8624-ca65ed9ee7c8" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/antlr.iml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/compiler.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/encodings.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/misc.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/modules.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/copyright/profiles_settings.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/scopes/scope_settings.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
</list>
<ignored path="antlr.iws" />
<ignored path=".idea/workspace.xml" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
<component name="CreatePatchCommitExecutor">
<option name="PATCH_PATH" value="" />
</component>
<component name="DaemonCodeAnalyzer">
<disable_hints />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
<component name="FavoritesManager">
<favorites_list name="antlr" />
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="Test.java" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/Test.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.2642487" vertical-offset="0" max-vertical-offset="965">
<caret line="17" column="0" selection-start-line="17" selection-start-column="0" selection-end-line="17" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="ParseTreeWalker.class" pinned="false" current="false" current-in-tab="false">
<entry file="jar://$PROJECT_DIR$/antlr-4.4-complete.jar!/org/antlr/v4/runtime/tree/ParseTreeWalker.class">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-3.0" vertical-offset="0" max-vertical-offset="315">
<caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Java8BaseListener.java" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Java8BaseListener.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="28080">
<caret line="19" column="72" selection-start-line="19" selection-start-column="72" selection-end-line="19" selection-end-column="72" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Java8Parser.java" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Java8Parser.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-4.740741" vertical-offset="23422" max-vertical-offset="123525">
<caret line="1744" column="24" selection-start-line="1744" selection-start-column="24" selection-end-line="1744" selection-end-column="24" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Java8Parser.class" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Java8Parser.class">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="30480">
<caret line="4" column="13" selection-start-line="4" selection-start-column="13" selection-end-line="4" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Java8Lexer.java" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Java8Lexer.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="7875">
<caret line="12" column="13" selection-start-line="12" selection-start-column="13" selection-end-line="12" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FindManager">
<FindUsagesManager>
<setting name="OPEN_NEW_TAB" value="true" />
</FindUsagesManager>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="changedFiles">
<list>
<option value="$PROJECT_DIR$/Test.java" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="1" />
<option name="y" value="19" />
<option name="width" value="1918" />
<option name="height" value="1060" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectReloadState">
<option name="STATE" value="0" />
</component>
<component name="ProjectView">
<navigator currentView="Scope" currentSubView="Project Files" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
</navigator>
<panes>
<pane id="PackagesPane" />
<pane id="Scope">
<subPane subId="Project Files">
<PATH>
<PATH_ELEMENT USER_OBJECT="Root">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
<PATH_ELEMENT USER_OBJECT="antlr">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="antlr" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="External Libraries" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ExternalLibrariesNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="antlr" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="antlr" />
<option name="myItemType" value="com.android.tools.idea.gradle.projectView.AndroidPsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="GoToClass.includeLibraries" value="false" />
<property name="GoToClass.toSaveIncludeLibraries" value="false" />
<property name="GoToFile.includeJavaFiles" value="false" />
<property name="MemberChooser.sorted" value="false" />
<property name="MemberChooser.showClasses" value="true" />
<property name="MemberChooser.copyJavadoc" value="false" />
<property name="recentsLimit" value="5" />
<property name="LayoutCode.rearrangeEntries" value="false" />
<property name="options.lastSelected" value="preferences.keymap" />
<property name="options.splitter.main.proportions" value="0.3" />
<property name="options.splitter.details.proportions" value="0.2" />
<property name="options.searchVisible" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/antlr-4.4-complete.jar!/" />
<property name="project.structure.last.edited" value="Modules" />
<property name="project.structure.proportion" value="0.15" />
<property name="project.structure.side.proportion" value="0.2" />
</component>
<component name="RunManager">
<configuration default="true" type="JUnit" factoryName="JUnit">
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<envs />
<patterns />
<method />
</configuration>
<configuration default="true" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" value="javadebug" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
<method />
</configuration>
<configuration default="true" type="AndroidRunConfigurationType" factoryName="Android Application">
<module name="" />
<option name="ACTIVITY_CLASS" value="" />
<option name="MODE" value="default_activity" />
<option name="DEPLOY" value="true" />
<option name="ARTIFACT_NAME" value="" />
<option name="TARGET_SELECTION_MODE" value="EMULATOR" />
<option name="USE_LAST_SELECTED_DEVICE" value="false" />
<option name="PREFERRED_AVD" value="" />
<option name="USE_COMMAND_LINE" value="true" />
<option name="COMMAND_LINE" value="" />
<option name="WIPE_USER_DATA" value="false" />
<option name="DISABLE_BOOT_ANIMATION" value="false" />
<option name="NETWORK_SPEED" value="full" />
<option name="NETWORK_LATENCY" value="none" />
<option name="CLEAR_LOGCAT" value="false" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
<option name="FILTER_LOGCAT_AUTOMATICALLY" value="true" />
<method />
</configuration>
<configuration default="true" type="AndroidTestRunConfigurationType" factoryName="Android Tests">
<module name="" />
<option name="TESTING_TYPE" value="0" />
<option name="INSTRUMENTATION_RUNNER_CLASS" value="" />
<option name="METHOD_NAME" value="" />
<option name="CLASS_NAME" value="" />
<option name="PACKAGE_NAME" value="" />
<option name="TARGET_SELECTION_MODE" value="EMULATOR" />
<option name="USE_LAST_SELECTED_DEVICE" value="false" />
<option name="PREFERRED_AVD" value="" />
<option name="USE_COMMAND_LINE" value="true" />
<option name="COMMAND_LINE" value="" />
<option name="WIPE_USER_DATA" value="false" />
<option name="DISABLE_BOOT_ANIMATION" value="false" />
<option name="NETWORK_SPEED" value="full" />
<option name="NETWORK_LATENCY" value="none" />
<option name="CLEAR_LOGCAT" value="false" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
<option name="FILTER_LOGCAT_AUTOMATICALLY" value="true" />
<method />
</configuration>
<configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
<module name="" />
<option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
<option name="PROGRAM_PARAMETERS" />
<method />
</configuration>
<configuration default="true" type="Applet" factoryName="Applet">
<module name="" />
<option name="MAIN_CLASS_NAME" />
<option name="HTML_FILE_NAME" />
<option name="HTML_USED" value="false" />
<option name="WIDTH" value="400" />
<option name="HEIGHT" value="300" />
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
<option name="VM_PARAMETERS" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<method />
</configuration>
<configuration default="true" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="" />
<envs />
<method />
</configuration>
<configuration default="true" type="TestNG" factoryName="TestNG">
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SUITE_NAME" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="GROUP_NAME" />
<option name="TEST_OBJECT" value="CLASS" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="OUTPUT_DIRECTORY" />
<option name="ANNOTATION_TYPE" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<option name="USE_DEFAULT_REPORTERS" value="false" />
<option name="PROPERTIES_FILE" />
<envs />
<properties />
<listeners />
<method />
</configuration>
<list size="0" />
<configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
<Host>localhost</Host>
<Port>5050</Port>
</configuration>
</component>
<component name="ShelveChangesManager" show_recycled="false" />
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="0c4899e3-58fa-4483-8624-ca65ed9ee7c8" name="Default" comment="" />
<created>1409770188585</created>
<updated>1409770188585</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="1" y="19" width="1918" height="1060" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Palette&#9;" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3296371" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.12460897" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="Vcs.Log.UiProperties">
<option name="RECENTLY_FILTERED_USER_GROUPS">
<collection />
</option>
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
<collection />
</option>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="VcsManagerConfiguration">
<option name="myTodoPanelSettings">
<TodoPanelSettings />
</option>
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<option name="time" value="1" />
</breakpoint-manager>
</component>
<component name="antWorkspaceConfiguration">
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
<option name="FILTER_TARGETS" value="false" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/Test.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="285">
<caret line="13" column="0" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Java8Lexer.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="7875">
<caret line="12" column="13" selection-start-line="12" selection-start-column="13" selection-end-line="12" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Test.class">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="210">
<caret line="8" column="1" selection-start-line="8" selection-start-column="1" selection-end-line="8" selection-end-column="1" />
<folding>
<element signature="e#0#290#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Java8Parser.class">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="30480">
<caret line="4" column="13" selection-start-line="4" selection-start-column="13" selection-end-line="4" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/antlr-4.4-complete.jar!/org/antlr/v4/runtime/tree/ParseTreeWalker.class">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-3.0" vertical-offset="0" max-vertical-offset="315">
<caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Java8BaseListener.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="28080">
<caret line="19" column="72" selection-start-line="19" selection-start-column="72" selection-end-line="19" selection-end-column="72" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Java8Parser.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-4.740741" vertical-offset="23422" max-vertical-offset="123525">
<caret line="1744" column="24" selection-start-line="1744" selection-start-column="24" selection-end-line="1744" selection-end-column="24" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Test.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.2642487" vertical-offset="0" max-vertical-offset="965">
<caret line="17" column="0" selection-start-line="17" selection-start-column="0" selection-end-line="17" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>
<state key="ArtifactsStructureConfigurable.UI">
<settings>
<artifact-editor />
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="FacetStructureConfigurable.UI">
<settings>
<last-edited>No facets are configured</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="GlobalLibrariesConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="JdkListConfigurable.UI">
<settings>
<last-edited>1.8</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ModuleStructureConfigurable.UI">
<settings>
<last-edited>antlr</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
<option value="0.6" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>1.8</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectLibrariesConfigurable.UI">
<settings>
<last-edited>antlr-4.4-complete</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>AntlrTest</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

File diff suppressed because it is too large Load Diff

View File

@ -1,201 +0,0 @@
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

View File

@ -1,723 +0,0 @@
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;
/**
* 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 <T> The return type of the visit operation. Use {@link Void} for
* operations with no return type.
*/
public class Java8BaseVisitor<T> extends AbstractParseTreeVisitor<T> implements Java8Visitor<T> {
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitMemberDeclaration(@NotNull Java8Parser.MemberDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitDefaultValue(@NotNull Java8Parser.DefaultValueContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitAnnotationTypeElementDeclaration(@NotNull Java8Parser.AnnotationTypeElementDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitType(@NotNull Java8Parser.TypeContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitAnnotationTypeBody(@NotNull Java8Parser.AnnotationTypeBodyContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitGenericInterfaceMethodDeclaration(@NotNull Java8Parser.GenericInterfaceMethodDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitClassBodyDeclaration(@NotNull Java8Parser.ClassBodyDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitBlock(@NotNull Java8Parser.BlockContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitEnumBodyDeclarations(@NotNull Java8Parser.EnumBodyDeclarationsContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitForUpdate(@NotNull Java8Parser.ForUpdateContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitEnhancedForControl(@NotNull Java8Parser.EnhancedForControlContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitAnnotationConstantRest(@NotNull Java8Parser.AnnotationConstantRestContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitExplicitGenericInvocation(@NotNull Java8Parser.ExplicitGenericInvocationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitNonWildcardTypeArgumentsOrDiamond(@NotNull Java8Parser.NonWildcardTypeArgumentsOrDiamondContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitExpressionList(@NotNull Java8Parser.ExpressionListContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitAnnotationTypeElementRest(@NotNull Java8Parser.AnnotationTypeElementRestContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitClassOrInterfaceType(@NotNull Java8Parser.ClassOrInterfaceTypeContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitTypeBound(@NotNull Java8Parser.TypeBoundContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitVariableDeclaratorId(@NotNull Java8Parser.VariableDeclaratorIdContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitPrimary(@NotNull Java8Parser.PrimaryContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitClassCreatorRest(@NotNull Java8Parser.ClassCreatorRestContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitInterfaceBodyDeclaration(@NotNull Java8Parser.InterfaceBodyDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitTypeArguments(@NotNull Java8Parser.TypeArgumentsContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitAnnotationName(@NotNull Java8Parser.AnnotationNameContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitFinallyBlock(@NotNull Java8Parser.FinallyBlockContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitTypeParameters(@NotNull Java8Parser.TypeParametersContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitLastFormalParameter(@NotNull Java8Parser.LastFormalParameterContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitConstructorBody(@NotNull Java8Parser.ConstructorBodyContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitLiteral(@NotNull Java8Parser.LiteralContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitAnnotationMethodOrConstantRest(@NotNull Java8Parser.AnnotationMethodOrConstantRestContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitCatchClause(@NotNull Java8Parser.CatchClauseContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitVariableDeclarator(@NotNull Java8Parser.VariableDeclaratorContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitTypeList(@NotNull Java8Parser.TypeListContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitEnumConstants(@NotNull Java8Parser.EnumConstantsContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitClassBody(@NotNull Java8Parser.ClassBodyContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitCreatedName(@NotNull Java8Parser.CreatedNameContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitEnumDeclaration(@NotNull Java8Parser.EnumDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitFormalParameter(@NotNull Java8Parser.FormalParameterContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitParExpression(@NotNull Java8Parser.ParExpressionContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitAnnotation(@NotNull Java8Parser.AnnotationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitVariableInitializer(@NotNull Java8Parser.VariableInitializerContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitElementValueArrayInitializer(@NotNull Java8Parser.ElementValueArrayInitializerContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitCreator(@NotNull Java8Parser.CreatorContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitArrayCreatorRest(@NotNull Java8Parser.ArrayCreatorRestContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitExpression(@NotNull Java8Parser.ExpressionContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitConstantExpression(@NotNull Java8Parser.ConstantExpressionContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitQualifiedNameList(@NotNull Java8Parser.QualifiedNameListContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitConstructorDeclaration(@NotNull Java8Parser.ConstructorDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitForControl(@NotNull Java8Parser.ForControlContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitSuperSuffix(@NotNull Java8Parser.SuperSuffixContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitVariableDeclarators(@NotNull Java8Parser.VariableDeclaratorsContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitCatchType(@NotNull Java8Parser.CatchTypeContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitClassOrInterfaceModifier(@NotNull Java8Parser.ClassOrInterfaceModifierContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitEnumConstantName(@NotNull Java8Parser.EnumConstantNameContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitModifier(@NotNull Java8Parser.ModifierContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitInnerCreator(@NotNull Java8Parser.InnerCreatorContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitExplicitGenericInvocationSuffix(@NotNull Java8Parser.ExplicitGenericInvocationSuffixContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitVariableModifier(@NotNull Java8Parser.VariableModifierContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitElementValuePair(@NotNull Java8Parser.ElementValuePairContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitArrayInitializer(@NotNull Java8Parser.ArrayInitializerContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitElementValue(@NotNull Java8Parser.ElementValueContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitConstDeclaration(@NotNull Java8Parser.ConstDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitResource(@NotNull Java8Parser.ResourceContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitQualifiedName(@NotNull Java8Parser.QualifiedNameContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitResourceSpecification(@NotNull Java8Parser.ResourceSpecificationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitFormalParameterList(@NotNull Java8Parser.FormalParameterListContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitAnnotationTypeDeclaration(@NotNull Java8Parser.AnnotationTypeDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitCompilationUnit(@NotNull Java8Parser.CompilationUnitContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitAnnotationMethodRest(@NotNull Java8Parser.AnnotationMethodRestContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitSwitchBlockStatementGroup(@NotNull Java8Parser.SwitchBlockStatementGroupContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitTypeParameter(@NotNull Java8Parser.TypeParameterContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitInterfaceBody(@NotNull Java8Parser.InterfaceBodyContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitMethodDeclaration(@NotNull Java8Parser.MethodDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitMethodBody(@NotNull Java8Parser.MethodBodyContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitTypeDeclaration(@NotNull Java8Parser.TypeDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitGenericConstructorDeclaration(@NotNull Java8Parser.GenericConstructorDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitClassDeclaration(@NotNull Java8Parser.ClassDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitEnumConstant(@NotNull Java8Parser.EnumConstantContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitStatement(@NotNull Java8Parser.StatementContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitImportDeclaration(@NotNull Java8Parser.ImportDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitPrimitiveType(@NotNull Java8Parser.PrimitiveTypeContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitInterfaceDeclaration(@NotNull Java8Parser.InterfaceDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitLocalVariableDeclarationStatement(@NotNull Java8Parser.LocalVariableDeclarationStatementContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitBlockStatement(@NotNull Java8Parser.BlockStatementContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitFieldDeclaration(@NotNull Java8Parser.FieldDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitConstantDeclarator(@NotNull Java8Parser.ConstantDeclaratorContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitResources(@NotNull Java8Parser.ResourcesContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitStatementExpression(@NotNull Java8Parser.StatementExpressionContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitInterfaceMethodDeclaration(@NotNull Java8Parser.InterfaceMethodDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitPackageDeclaration(@NotNull Java8Parser.PackageDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitElementValuePairs(@NotNull Java8Parser.ElementValuePairsContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitLocalVariableDeclaration(@NotNull Java8Parser.LocalVariableDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitNonWildcardTypeArguments(@NotNull Java8Parser.NonWildcardTypeArgumentsContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitInterfaceMemberDeclaration(@NotNull Java8Parser.InterfaceMemberDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitSwitchLabel(@NotNull Java8Parser.SwitchLabelContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitForInit(@NotNull Java8Parser.ForInitContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitFormalParameters(@NotNull Java8Parser.FormalParametersContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitArguments(@NotNull Java8Parser.ArgumentsContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitGenericMethodDeclaration(@NotNull Java8Parser.GenericMethodDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitTypeArgumentsOrDiamond(@NotNull Java8Parser.TypeArgumentsOrDiamondContext ctx) { return visitChildren(ctx); }
}

View File

@ -1,517 +0,0 @@
package de.dhbwstuttgart.antlr;
// 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);
}
}
}

View File

@ -1,201 +0,0 @@
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

File diff suppressed because it is too large Load Diff

View File

@ -1,621 +0,0 @@
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;
/**
* This interface defines a complete generic visitor for a parse tree produced
* by {@link Java8Parser}.
*
* @param <T> The return type of the visit operation. Use {@link Void} for
* operations with no return type.
*/
public interface Java8Visitor<T> extends ParseTreeVisitor<T> {
/**
* 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);
}

View File

@ -1,93 +0,0 @@
package de.dhbwstuttgart.antlr;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import de.dhbwstuttgart.typeinference.Menge;
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;
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 {
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
//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<SyntaxTreeNode> {
@Override
public SyntaxTreeNode visitCompilationUnit(CompilationUnitContext ctx) {
Menge<Class> classDefinitions = new Menge<>();
for(TypeDeclarationContext tDecl : ctx.typeDeclaration()){
Class cl = (Class) visit(tDecl);
classDefinitions.add(cl);
}
return new SourceFile(classDefinitions);
}
@Override
public Class visitTypeDeclaration(TypeDeclarationContext ctx) {
Class ret = (Class) visit(ctx.classDeclaration());
return ret;
}
@Override
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) {
Menge<GenericTypeVar> list = new Menge<>();
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 = null;//new GenericTypeVar(name, parent, offset);
return ret;
}
}

View File

@ -1,3 +0,0 @@
all:
java -jar ./antlr-4.4-complete.jar -no-listener -visitor Java8.g4

View File

@ -1,61 +0,0 @@
// ino.module.Attribute.8529.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.Attribute.8529.import
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
// ino.end
import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.myexception.JVMCodeException;
// ino.class.Attribute.21446.declaration
public abstract class Attribute implements ClassFileMember
// ino.end
// ino.class.Attribute.21446.body
{
// ino.attribute.codegenlog.21449.decldescription type=line
// Logger fuer Code-Gen
// ino.end
// ino.attribute.codegenlog.21449.declaration
protected static Logger codegenlog = Logger.getLogger("codegen");
// ino.end
// ino.attribute.attribute_name_index.21452.declaration
private short attribute_name_index;
// ino.end
// ino.method.get_attribute_name_index.21455.definition
public short get_attribute_name_index()
// ino.end
// ino.method.get_attribute_name_index.21455.body
{
return this.attribute_name_index;
}
// ino.end
// ino.method.set_attribute_name_index.21458.definition
public void set_attribute_name_index(short t)
// ino.end
// ino.method.set_attribute_name_index.21458.body
{
this.attribute_name_index = t;
}
// ino.end
// ino.method.codegen.21461.declaration
@Override
public abstract void codegen(ClassFile classfile, OutputStream f)
throws JVMCodeException, IOException;
// ino.end
// ino.method.get_attributes_length.21464.declaration
public abstract int get_attributes_length();
// ino.end
}
// ino.end

View File

@ -1,91 +0,0 @@
// ino.module.AttributeInfo.8530.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.AttributeInfo.8530.import
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.lang.reflect.Array;
import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.myexception.JVMCodeException;
// ino.class.AttributeInfo.21467.declaration
public class AttributeInfo extends Attribute
// ino.end
// ino.class.AttributeInfo.21467.body
{
// ino.attribute.info.21471.declaration
private byte[] info = {};
// ino.end
// ino.method.get_info.21474.definition
public byte[] get_info()
// ino.end
// ino.method.get_info.21474.body
{
return this.info;
}
// ino.end
// ino.method.get_info_Menge.21477.definition
public Menge<Byte> get_info_Menge()
// ino.end
// ino.method.get_info_Menge.21477.body
{
Menge<Byte> ret = new Menge<Byte>();
for (int i = 0; i < Array.getLength(info); i++)
ret.addElement(new Byte(info[i]));
return ret;
}
// ino.end
// ino.method.get_attributes_length.21480.definition
public int get_attributes_length()
// ino.end
// ino.method.get_attributes_length.21480.body
{
return Array.getLength(info);
}
// ino.end
// ino.method.set_info.21483.definition
public void set_info(byte[] t)
// ino.end
// ino.method.set_info.21483.body
{
this.info = t;
}
// ino.end
// ino.method.set_info.21486.definition
public void set_info(Menge t)
// ino.end
// ino.method.set_info.21486.body
{
byte[] set = new byte[t.size()];
for (int i = 0; i < t.size(); i++)
Array.setByte(set, i, ((Byte) t.elementAt(i)).byteValue());
this.info = set;
}
// ino.end
// ino.method.codegen.21489.definition
@Override
public void codegen(ClassFile classfile, OutputStream f)
throws JVMCodeException, java.io.IOException
// ino.end
// ino.method.codegen.21489.body
{
classfile.writeShort(f, get_attribute_name_index());
classfile.writeInt(f, Array.getLength(info));
if (info != null) classfile.writeByteArray(f, info);
codegenlog.debug("Attribute_Name_Index= " + get_attribute_name_index()
+ ", Length= " + Array.getLength(info) + " ");
}
// ino.end
}
// ino.end

View File

@ -1,60 +0,0 @@
// ino.module.CONSTANT_Class_info.8533.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.CONSTANT_Class_info.8533.import
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
// ino.end
// ino.class.CONSTANT_Class_info.21763.declaration
public class CONSTANT_Class_info extends CPInfo
// ino.end
// ino.class.CONSTANT_Class_info.21763.body
{
// ino.attribute.name_index.21767.declaration
private short name_index;
// ino.end
// ino.method.get_name_index.21770.definition
public short get_name_index()
// ino.end
// ino.method.get_name_index.21770.body
{
return this.name_index;
}
// ino.end
// ino.method.set_name_index.21773.definition
public void set_name_index(short i)
// ino.end
// ino.method.set_name_index.21773.body
{
this.name_index = i;
}
// ino.end
// ino.method.codegen.21776.definition
@Override
public void codegen(ClassFile classfile, OutputStream f)
throws IOException
// ino.end
// ino.method.codegen.21776.body
{
classfile.writeByte(f, get_tag());
classfile.writeShort(f, name_index);
}
// ino.end
// ino.method.toString.21779.definition
public String toString()
// ino.end
// ino.method.toString.21779.body
{
return "ClassInfo: name_index=" + name_index;
}
// ino.end
}
// ino.end

View File

@ -1,71 +0,0 @@
// ino.module.CONSTANT_Double_info.8534.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.CONSTANT_Double_info.8534.import
import java.io.FileOutputStream;
import java.io.IOException;
// ino.end
import java.io.OutputStream;
// ino.class.CONSTANT_Double_info.21782.declaration
public class CONSTANT_Double_info extends CPInfo
// ino.end
// ino.class.CONSTANT_Double_info.21782.body
{
// ino.attribute.high_bytes.21786.declaration
private int high_bytes;
// ino.end
// ino.attribute.low_bytes.21789.declaration
private int low_bytes;
// ino.end
// ino.method.get_high_bytes.21792.definition
public int get_high_bytes()
// ino.end
// ino.method.get_high_bytes.21792.body
{ return this.high_bytes; }
// ino.end
// ino.method.get_low_bytes.21795.definition
public int get_low_bytes()
// ino.end
// ino.method.get_low_bytes.21795.body
{ return this.low_bytes; }
// ino.end
// ino.method.set_high_bytes.21798.definition
public void set_high_bytes(int t)
// ino.end
// ino.method.set_high_bytes.21798.body
{ this.high_bytes = t; }
// ino.end
// ino.method.set_low_bytes.21801.definition
public void set_low_bytes(int t)
// ino.end
// ino.method.set_low_bytes.21801.body
{ this.low_bytes = t; }
// ino.end
// ino.method.codegen.21804.definition
@Override
public void codegen(ClassFile classfile, OutputStream f)
throws IOException
// ino.end
// ino.method.codegen.21804.body
{
classfile.writeByte(f, get_tag());
classfile.writeInt(f, high_bytes);
classfile.writeInt(f, low_bytes);
}
// ino.end
// ino.method.toString.21807.definition
public String toString()
// ino.end
// ino.method.toString.21807.body
{
return "Double_Info: high_bytes=" + high_bytes + ", low_bytes=" + low_bytes;
}
// ino.end
}
// ino.end

View File

@ -1,83 +0,0 @@
// ino.module.CONSTANT_Fieldref_info.8535.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.CONSTANT_Fieldref_info.8535.import
import java.io.FileOutputStream;
import java.io.IOException;
// ino.end
import java.io.OutputStream;
// ino.class.CONSTANT_Fieldref_info.21810.declaration
public class CONSTANT_Fieldref_info extends CPInfo
// ino.end
// ino.class.CONSTANT_Fieldref_info.21810.body
{
// ino.attribute.class_index.21814.declaration
private short class_index;
// ino.end
// ino.attribute.name_and_type_index.21817.declaration
private short name_and_type_index;
// ino.end
// ino.method.get_class_index.21820.definition
public short get_class_index()
// ino.end
// ino.method.get_class_index.21820.body
{
return this.class_index;
}
// ino.end
// ino.method.get_name_and_type_index.21823.definition
public short get_name_and_type_index()
// ino.end
// ino.method.get_name_and_type_index.21823.body
{
return this.name_and_type_index;
}
// ino.end
// ino.method.set_class_index.21826.definition
public void set_class_index(short i)
// ino.end
// ino.method.set_class_index.21826.body
{
this.class_index = i;
}
// ino.end
// ino.method.set_name_and_type_index.21829.definition
public void set_name_and_type_index(short i)
// ino.end
// ino.method.set_name_and_type_index.21829.body
{
this.name_and_type_index = i;
}
// ino.end
// ino.method.codegen.21832.definition
@Override
public void codegen(ClassFile classfile, OutputStream f)
throws IOException
// ino.end
// ino.method.codegen.21832.body
{
classfile.writeByte(f, get_tag());
classfile.writeShort(f, class_index);
classfile.writeShort(f, name_and_type_index);
}
// ino.end
// ino.method.toString.21835.definition
public String toString()
// ino.end
// ino.method.toString.21835.body
{
return "Fieldref_info: Class_index="+ class_index
+ ", Name_and_type_index=" + name_and_type_index;
}
// ino.end
}
// ino.end

View File

@ -1,52 +0,0 @@
// ino.module.CONSTANT_Float_info.8536.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.CONSTANT_Float_info.8536.import
import java.io.IOException;
// ino.end
import java.io.OutputStream;
// ino.class.CONSTANT_Float_info.21838.declaration
public class CONSTANT_Float_info extends CPInfo
// ino.end
// ino.class.CONSTANT_Float_info.21838.body
{
// ino.attribute.bytes.21842.declaration
private int bytes;
// ino.end
// ino.method.get_bytes.21845.definition
public int get_bytes()
// ino.end
// ino.method.get_bytes.21845.body
{ return this.bytes; }
// ino.end
// ino.method.set_bytes.21848.definition
public void set_bytes(int t)
// ino.end
// ino.method.set_bytes.21848.body
{ this.bytes = t; }
// ino.end
// ino.method.codegen.21851.definition
@Override
public void codegen(ClassFile classfile, OutputStream f)
throws IOException
// ino.end
// ino.method.codegen.21851.body
{
classfile.writeByte(f, get_tag());
classfile.writeInt(f, bytes);
}
// ino.end
// ino.method.toString.21854.definition
public String toString()
// ino.end
// ino.method.toString.21854.body
{
return "Float_Info: size=" + bytes;
}
// ino.end
}
// ino.end

View File

@ -1,56 +0,0 @@
// ino.module.CONSTANT_Integer_info.8537.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.CONSTANT_Integer_info.8537.import
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
// ino.end
// ino.class.CONSTANT_Integer_info.21857.declaration
public class CONSTANT_Integer_info extends CPInfo
// ino.end
// ino.class.CONSTANT_Integer_info.21857.body
{
// ino.attribute.bytes.21861.declaration
private int bytes;
// ino.end
// ino.method.get_bytes.21864.definition
public int get_bytes()
// ino.end
// ino.method.get_bytes.21864.body
{ return this.bytes; }
// ino.end
// ino.method.set_bytes.21867.definition
public void set_bytes(int t)
// ino.end
// ino.method.set_bytes.21867.body
{ this.bytes = t; }
// ino.end
// ino.method.codegen.21870.definition
@Override
public void codegen(ClassFile classfile, OutputStream f)
throws IOException
// ino.end
// ino.method.codegen.21870.body
{
classfile.writeByte(f, get_tag());
classfile.writeInt(f, bytes);
}
// ino.end
// ino.method.toString.21873.definition
public String toString()
// ino.end
// ino.method.toString.21873.body
{
return "Integer_Info: bytes=" + bytes;
}
// ino.end
}
// ino.end

View File

@ -1,84 +0,0 @@
// ino.module.CONSTANT_InterfaceMethodref_info.8538.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.CONSTANT_InterfaceMethodref_info.8538.import
import java.io.FileOutputStream;
import java.io.IOException;
// ino.end
import java.io.OutputStream;
// ino.class.CONSTANT_InterfaceMethodref_info.21876.declaration
public class CONSTANT_InterfaceMethodref_info extends CPInfo
// ino.end
// ino.class.CONSTANT_InterfaceMethodref_info.21876.body
{
// ino.attribute.class_index.21880.declaration
private short class_index;
// ino.end
// ino.attribute.name_and_type_index.21883.declaration
private short name_and_type_index;
// ino.end
// ino.method.get_class_index.21886.definition
public short get_class_index()
// ino.end
// ino.method.get_class_index.21886.body
{
return this.class_index;
}
// ino.end
// ino.method.get_name_and_type_index.21889.definition
public short get_name_and_type_index()
// ino.end
// ino.method.get_name_and_type_index.21889.body
{
return this.name_and_type_index;
}
// ino.end
// ino.method.set_class_index.21892.definition
public void set_class_index(short t)
// ino.end
// ino.method.set_class_index.21892.body
{
this.class_index = t;
}
// ino.end
// ino.method.set_name_and_type_index.21895.definition
public void set_name_and_type_index(short t)
// ino.end
// ino.method.set_name_and_type_index.21895.body
{
this.name_and_type_index = t;
}
// ino.end
// ino.method.codegen.21898.definition
@Override
public void codegen(ClassFile classfile, OutputStream f)
throws IOException
// ino.end
// ino.method.codegen.21898.body
{
classfile.writeByte(f, get_tag());
classfile.writeShort(f, class_index);
classfile.writeShort(f, name_and_type_index);
}
// ino.end
@Override
// ino.method.toString.21901.definition
public String toString()
// ino.end
// ino.method.toString.21901.body
{
return "InterfaceMethodRef_info: class_index=" + class_index
+ ", name_and_type_index=" + name_and_type_index;
}
// ino.end
}
// ino.end

View File

@ -1,83 +0,0 @@
// ino.module.CONSTANT_Long_info.8539.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.CONSTANT_Long_info.8539.import
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
// ino.end
// ino.class.CONSTANT_Long_info.21904.declaration
public class CONSTANT_Long_info extends CPInfo
// ino.end
// ino.class.CONSTANT_Long_info.21904.body
{
// ino.attribute.high_bytes.21908.declaration
private int high_bytes;
// ino.end
// ino.attribute.low_bytes.21911.declaration
private int low_bytes;
// ino.end
// ino.method.get_high_bytes.21914.definition
public int get_high_bytes()
// ino.end
// ino.method.get_high_bytes.21914.body
{
return this.high_bytes;
}
// ino.end
// ino.method.get_low_bytes.21917.definition
public int get_low_bytes()
// ino.end
// ino.method.get_low_bytes.21917.body
{
return this.low_bytes;
}
// ino.end
// ino.method.set_high_bytes.21920.definition
public void set_high_bytes(int t)
// ino.end
// ino.method.set_high_bytes.21920.body
{
this.high_bytes = t;
}
// ino.end
// ino.method.set_low_bytes.21923.definition
public void set_low_bytes(int t)
// ino.end
// ino.method.set_low_bytes.21923.body
{
this.low_bytes = t;
}
// ino.end
// ino.method.codegen.21926.definition
@Override
public void codegen(ClassFile classfile, OutputStream f)
throws IOException
// ino.end
// ino.method.codegen.21926.body
{
classfile.writeByte(f, get_tag());
classfile.writeInt(f, high_bytes);
classfile.writeInt(f, low_bytes);
}
// ino.end
// ino.method.toString.21929.definition
public String toString()
// ino.end
// ino.method.toString.21929.body
{
return "Long_Info: high_bytes=" + high_bytes
+ ", low_bytes=" + low_bytes;
}
// ino.end
}
// ino.end

View File

@ -1,83 +0,0 @@
// ino.module.CONSTANT_Methodref_info.8540.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.CONSTANT_Methodref_info.8540.import
import java.io.FileOutputStream;
import java.io.IOException;
// ino.end
import java.io.OutputStream;
// ino.class.CONSTANT_Methodref_info.21932.declaration
public class CONSTANT_Methodref_info extends CPInfo
// ino.end
// ino.class.CONSTANT_Methodref_info.21932.body
{
// ino.attribute.class_index.21936.declaration
private short class_index;
// ino.end
// ino.attribute.name_and_type_index.21939.declaration
private short name_and_type_index;
// ino.end
// ino.method.get_class_index.21942.definition
public short get_class_index()
// ino.end
// ino.method.get_class_index.21942.body
{
return this.class_index;
}
// ino.end
// ino.method.get_name_and_type_index.21945.definition
public short get_name_and_type_index()
// ino.end
// ino.method.get_name_and_type_index.21945.body
{
return this.name_and_type_index;
}
// ino.end
// ino.method.set_class_index.21948.definition
public void set_class_index(short t)
// ino.end
// ino.method.set_class_index.21948.body
{
this.class_index = t;
}
// ino.end
// ino.method.set_name_and_type_index.21951.definition
public void set_name_and_type_index(short t)
// ino.end
// ino.method.set_name_and_type_index.21951.body
{
this.name_and_type_index = t;
}
// ino.end
// ino.method.codegen.21954.definition
@Override
public void codegen(ClassFile classfile, OutputStream f)
throws IOException
// ino.end
// ino.method.codegen.21954.body
{
classfile.writeByte(f, get_tag());
classfile.writeShort(f, class_index);
classfile.writeShort(f, name_and_type_index);
}
// ino.end
// ino.method.toString.21957.definition
public String toString()
// ino.end
// ino.method.toString.21957.body
{
return "MethodRef_Info: class_index=" + class_index
+ ", name_and_type_index=" + name_and_type_index;
}
// ino.end
}
// ino.end

View File

@ -1,83 +0,0 @@
// ino.module.CONSTANT_NameAndType_info.8541.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.CONSTANT_NameAndType_info.8541.import
import java.io.FileOutputStream;
import java.io.IOException;
// ino.end
import java.io.OutputStream;
// ino.class.CONSTANT_NameAndType_info.21960.declaration
public class CONSTANT_NameAndType_info extends CPInfo
// ino.end
// ino.class.CONSTANT_NameAndType_info.21960.body
{
// ino.attribute.name_index.21964.declaration
private short name_index;
// ino.end
// ino.attribute.descriptor_index.21967.declaration
private short descriptor_index;
// ino.end
// ino.method.get_name_index.21970.definition
public short get_name_index()
// ino.end
// ino.method.get_name_index.21970.body
{
return this.name_index;
}
// ino.end
// ino.method.get_descriptor_index.21973.definition
public short get_descriptor_index()
// ino.end
// ino.method.get_descriptor_index.21973.body
{
return this.descriptor_index;
}
// ino.end
// ino.method.set_name_index.21976.definition
public void set_name_index(short t)
// ino.end
// ino.method.set_name_index.21976.body
{
this.name_index = t;
}
// ino.end
// ino.method.set_descriptor_index.21979.definition
public void set_descriptor_index(short t)
// ino.end
// ino.method.set_descriptor_index.21979.body
{
this.descriptor_index = t;
}
// ino.end
// ino.method.codegen.21982.definition
@Override
public void codegen(ClassFile classfile, OutputStream f)
throws IOException
// ino.end
// ino.method.codegen.21982.body
{
classfile.writeByte(f, get_tag());
classfile.writeShort(f, name_index);
classfile.writeShort(f, descriptor_index);
}
// ino.end
// ino.method.toString.21985.definition
public String toString()
// ino.end
// ino.method.toString.21985.body
{
return "NameAndType_Info: name_index=" + name_index
+ ", descriptor_index=" + descriptor_index;
}
// ino.end
}
// ino.end

View File

@ -1,59 +0,0 @@
// ino.module.CONSTANT_String_info.8542.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.CONSTANT_String_info.8542.import
import java.io.FileOutputStream;
import java.io.IOException;
// ino.end
import java.io.OutputStream;
// ino.class.CONSTANT_String_info.21988.declaration
public class CONSTANT_String_info extends CPInfo
// ino.end
// ino.class.CONSTANT_String_info.21988.body
{
// ino.attribute.string_index.21992.declaration
private short string_index;
// ino.end
// ino.method.get_string_index.21995.definition
public short get_string_index()
// ino.end
// ino.method.get_string_index.21995.body
{
return this.string_index;
}
// ino.end
// ino.method.set_string_index.21998.definition
public void set_string_index(short t)
// ino.end
// ino.method.set_string_index.21998.body
{
this.string_index = t;
}
// ino.end
// ino.method.codegen.22001.definition
@Override
public void codegen(ClassFile classfile, OutputStream f)
throws IOException
// ino.end
// ino.method.codegen.22001.body
{
classfile.writeByte(f, get_tag());
classfile.writeShort(f, string_index);
}
// ino.end
// ino.method.toString.22004.definition
public String toString()
// ino.end
// ino.method.toString.22004.body
{
return "StringInfo: string_index="+ string_index;
}
// ino.end
}
// ino.end

View File

@ -1,65 +0,0 @@
// ino.module.CONSTANT_Utf8_info.8543.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.CONSTANT_Utf8_info.8543.import
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.reflect.Array;
// ino.end
// ino.class.CONSTANT_Utf8_info.22007.declaration
public class CONSTANT_Utf8_info extends CPInfo
// ino.end
// ino.class.CONSTANT_Utf8_info.22007.body
{
// ino.attribute.bytes.22011.declaration
private byte[] bytes;
// ino.end
// ino.method.get_bytes.22014.definition
public byte[] get_bytes()
// ino.end
// ino.method.get_bytes.22014.body
{
return this.bytes;
}
// ino.end
// ino.method.set_bytes.22017.definition
public void set_bytes(byte[] t)
// ino.end
// ino.method.set_bytes.22017.body
{
this.bytes = t;
}
// ino.end
// ino.method.codegen.22020.definition
@Override
public void codegen(ClassFile classfile, OutputStream f)
throws IOException
// ino.end
// ino.method.codegen.22020.body
{
classfile.writeByte(f, get_tag());
classfile.writeShort(f, (short) Array.getLength(bytes));
if (bytes != null) classfile.writeByteArray(f, bytes);
}
// ino.end
// ino.method.toString.22023.definition
public String toString()
// ino.end
// ino.method.toString.22023.body
{
if (bytes == null)
return "UTF-8 Konstante: size="+ Array.getLength(bytes) ;
else
return "UTF-8 Konstante: " + new String(bytes);
}
// ino.end
}
// ino.end

View File

@ -1,58 +0,0 @@
// ino.module.CPInfo.8544.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.CPInfo.8544.import
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import de.dhbwstuttgart.logger.Logger;
// ino.end
// ino.class.CPInfo.22026.declaration
public abstract class CPInfo implements ClassFileMember
// ino.end
// ino.class.CPInfo.22026.body
{
// ino.attribute.codegenlog.22029.decldescription type=line
// Logger fuer Code-Gen
// ino.end
// ino.attribute.codegenlog.22029.declaration
protected static Logger codegenlog = Logger.getLogger("codegen");
// ino.end
// ino.attribute.tag.22032.declaration
private byte tag;
// ino.end
// ino.method.get_tag.22035.definition
public byte get_tag()
// ino.end
// ino.method.get_tag.22035.body
{
return this.tag;
}
// ino.end
// ino.method.set_tag.22038.definition
public void set_tag(byte t)
// ino.end
// ino.method.set_tag.22038.body
{
this.tag = t;
}
// ino.end
// ino.method.codegen.22041.declaration
@Override
public abstract void codegen(ClassFile classfile, OutputStream f)
throws IOException;
// ino.end
// ino.method.toString.22044.declaration
public abstract String toString();
// ino.end
}
// ino.end

View File

@ -1,862 +0,0 @@
//key_Menge funktioniert nicht PL 14-03-21
//muss angeschaut werden
// ino.module.ClassFile.8531.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.ClassFile.8531.import
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.reflect.Array;
import de.dhbwstuttgart.typeinference.Menge;
// ino.end
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;
import de.dhbwstuttgart.syntaxtree.SourceFile;
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.
* Generiert bei der Bytegenerierung Header, Constantenpool, usw.
*
* @author hama, scju
*
*/
// ino.end
// ino.class.ClassFile.21492.declaration
public class ClassFile
// ino.end
// ino.class.ClassFile.21492.body
{
public boolean hamaAload0 = false; //hama: ¿½gt in Konstruktor und set Methode ein aload_0 ein wird ¿½r StoreSomethingParmCon ben�tigt
// ino.attribute.codegenlog.21495.decldescription type=line
// Logger fuer Code-Gen
// ino.end
// ino.attribute.codegenlog.21495.declaration
protected static Logger codegenlog = Logger.getLogger("codegen");
// ino.end
// ino.attribute.magic.21498.decldescription type=line
// Header fuer Java Version 1.5.0_05
// ino.end
// ino.attribute.magic.21498.declaration
private static int magic = 0xcafebabe;
// ino.end
// ino.attribute.minor_version.21501.declaration
public static short minor_version = 0;
// ino.end
// ino.attribute.major_version.21504.declaration
public static short major_version = 0x31;
// ino.end
// ino.attribute.constant_pool.21507.declaration
private Menge<CPInfo> constant_pool = new Menge<CPInfo>();
// ino.end
// ino.attribute.access_flags.21510.declaration
private short access_flags;
// ino.end
// ino.attribute.this_class.21513.declaration
private short this_class;
// ino.end
// ino.attribute.super_class.21516.declaration
private short super_class;
// ino.end
// ino.attribute.fields.21519.declaration
private Menge<FieldInfo> fields = new Menge<FieldInfo>();
// ino.end
// ino.attribute.methods.21522.declaration
private Menge<MethodInfo> methods = new Menge<MethodInfo>();
// ino.end
// ino.attribute.attributes.21525.declaration
private Menge<Attribute> attributes = new Menge<Attribute>();
// ino.end
// ino.attribute.interfaces.21528.declaration
private Menge<Short> interfaces = new Menge<Short>();
// ino.end
// ino.attribute.key_Menge.21531.declaration
private Menge<Key> key_Menge = new Menge<Key>();
// ino.end
// ino.attribute.class_block.21534.declaration
private Menge<Assign> class_block = new Menge<Assign>();
// ino.end
// ino.attribute.class_name.21537.declaration
private String class_name = new String("OUTPUT");//DEFAULTWERT PL 14-03-21 eingefuegt
// ino.end
// ino.attribute.super_class_name.21540.declaration
private String super_class_name = new String();
// ino.end
// ino.attribute.constructor_founded.21543.declaration
private boolean constructor_founded = false;
// ino.end
// ino.attribute.ConstantValueID.21546.decldescription type=line
// Wird fuer Konstante benoetigt (UTF-8 Eintrag mit
// "ConstantValue"), lediglich ein Mal pro Klasse
// ino.end
// ino.attribute.ConstantValueID.21546.declaration
private short ConstantValueID = 0;
// ino.end
// ino.attribute.SignatureID.21549.decldescription type=line
// Wird fuer Signaturen (Generics) benoetigt
// Wiederrum nur ein UTF-8 Eintrag in der
// Konstantentabelle ("Signature")
// ino.end
// ino.attribute.SignatureID.21549.declaration
private short SignatureID = 0;
// ino.end
// ino.method.ClassFile.21552.defdescription type=javadoc
/**
* Default Konstruktor
*/
// ino.end
// ino.method.ClassFile.21552.definition
public ClassFile()
// ino.end
// ino.method.ClassFile.21552.body
{
}
// ino.end
// ino.method.ClassFile.21555.defdescription type=javadoc
/**
* Konstruktor, um Klasseninfos direkt aus dem Interface zu laden
*/
// ino.end
// ino.method.ClassFile.21555.definition
public ClassFile(Interface ic, SourceFile sf)
// ino.end
// ino.method.ClassFile.21555.body
{
// Modifier wird auf den Wert 0x601 festgelegt (INTERFACE+ABSTRACT+PUBLIC)
// Andere Werte machen hier keinen Sinn!
String pkgName = "";
if (sf.getPackageName() != null) {
pkgName = sf.getPackageName().get_codegen_UsedId() + "/";
}
this.add_interface(ic.getName(), pkgName, "java/lang/Object", (short) 0x601);
}
// ino.end
// ino.method.add_CONSTANT_Utf8_info.21558.definition
public int add_CONSTANT_Utf8_info(String name)
// ino.end
// ino.method.add_CONSTANT_Utf8_info.21558.body
{
Key utf8_key = new Key(JVMCode.CONSTANT_Utf8, name);
if(!this.key_Menge.contains(utf8_key)) {
CONSTANT_Utf8_info utf8_info = new CONSTANT_Utf8_info();
utf8_info.set_tag(JVMCode.CONSTANT_Utf8);
utf8_info.set_bytes(name.getBytes());
this.key_Menge.addElement(utf8_key);
this.constant_pool.addElement(utf8_info);
}
return (this.key_Menge.indexOf(utf8_key)+1);
}
// ino.end
// ino.method.add_CONSTANT_Class_info.21561.definition
public int add_CONSTANT_Class_info(String name)
// ino.end
// ino.method.add_CONSTANT_Class_info.21561.body
{
Key class_key = new Key(JVMCode.CONSTANT_Class, name);
if(!this.key_Menge.contains(class_key)) {
CONSTANT_Class_info class_info = new CONSTANT_Class_info();
class_info.set_tag(JVMCode.CONSTANT_Class);
class_info.set_name_index((short)this.add_CONSTANT_Utf8_info(name));
this.key_Menge.addElement(class_key);
this.constant_pool.addElement(class_info);
}
return (this.key_Menge.indexOf(class_key)+1);
}
// ino.end
// ino.method.add_CONSTANT_NameAndType_info.21564.definition
public int add_CONSTANT_NameAndType_info(String name, String param_type)
// ino.end
// ino.method.add_CONSTANT_NameAndType_info.21564.body
{
Key name_type_key = new Key(JVMCode.CONSTANT_NameAndType, name + param_type);
if(!this.key_Menge.contains(name_type_key))
{
CONSTANT_NameAndType_info name_type = new CONSTANT_NameAndType_info();
name_type.set_tag(JVMCode.CONSTANT_NameAndType);
name_type.set_name_index((short)this.add_CONSTANT_Utf8_info(name));
name_type.set_descriptor_index((short)this.add_CONSTANT_Utf8_info(param_type));
this.key_Menge.addElement(name_type_key);
this.constant_pool.addElement(name_type);
}
return this.key_Menge.indexOf(name_type_key) + 1;
}
// ino.end
// ino.method.add_CONSTANT_Integer_info.21567.definition
public int add_CONSTANT_Integer_info(int i)
// ino.end
// ino.method.add_CONSTANT_Integer_info.21567.body
{
Key key = new Key(JVMCode.CONSTANT_Integer, "" + i);
if(!this.key_Menge.contains(key)) {
CONSTANT_Integer_info info = new CONSTANT_Integer_info();
info.set_tag(JVMCode.CONSTANT_Integer);
info.set_bytes(i);
this.key_Menge.addElement(key);
this.constant_pool.addElement(info);
}
return (this.key_Menge.indexOf(key)+1);
}
// ino.end
// ino.method.add_CONSTANT_String_info.21570.definition
public int add_CONSTANT_String_info(String s)
// ino.end
// ino.method.add_CONSTANT_String_info.21570.body
{
Key key = new Key(JVMCode.CONSTANT_String, s);
if(!this.key_Menge.contains(key)) {
CONSTANT_String_info info = new CONSTANT_String_info();
info.set_tag(JVMCode.CONSTANT_String);
info.set_string_index((short)this.add_CONSTANT_Utf8_info(s));
this.key_Menge.addElement(key);
this.constant_pool.addElement(info);
}
return (this.key_Menge.indexOf(key)+1);
}
// ino.end
// ino.method.add_class.21573.defdescription type=javadoc
/**
* Fuegt Informationen ueber eine neue Klasse ein. Gleichzeitig
* wird ein Default-Konstruktor angelegt.
*/
// ino.end
// ino.method.add_class.21573.definition
public void add_class(String name, String pkgName, String super_name, short acc_flag)
// ino.end
// ino.method.add_class.21573.body
{
codegenlog.debug("Klasse hinzugefuegt: " + name + ", Package: " + pkgName
+ ", Superklasse: " + super_name + ", Accessflags: " + acc_flag);
addClassInfo(name, pkgName, super_name, acc_flag);
this.add_method_ref(super_name, "<init>", "()V");
}
// ino.end
// ino.method.add_interface.21576.defdescription type=javadoc
/**
* Fuegt Informationen ueber ein neues Interface ein.
*/
// ino.end
// ino.method.add_interface.21576.definition
public void add_interface(String name, String pkgName, String super_name, short acc_flag)
// ino.end
// ino.method.add_interface.21576.body
{
codegenlog.debug("Interface hinzugefuegt: " + name + ", Package: " + pkgName
+ ", Superklasse: " + super_name + ", Accessflags: " + acc_flag);
addClassInfo(name, pkgName, super_name, acc_flag);
}
// ino.end
// ino.method.addClassInfo.21579.defdescription type=javadoc
/**
* Fuegt Informationen ueber Access-Flags, Superklasse usw. ein
*/
// ino.end
// ino.method.addClassInfo.21579.definition
private void addClassInfo(String name, String pkgName, String super_name, short acc_flag)
// ino.end
// ino.method.addClassInfo.21579.body
{
//feda 15.05.2007
//Eine Klasse hat immer den Access Modifier Super 0x0020
short tempAcc_super = 32;
acc_flag +=tempAcc_super;
access_flags = acc_flag;
class_name = name;
super_class_name = super_name;
this.this_class = (short)add_CONSTANT_Class_info(pkgName+name);
this.super_class = (short)add_CONSTANT_Class_info(super_name);
}
// ino.end
// ino.method.addSuperInterfaces.21582.defdescription type=javadoc
/**
* Fuegt die erweiterten (bei Interfaces) implementierten (bei Klassen)
* Interfaces ein.
*/
// ino.end
// ino.method.addSuperInterfaces.21582.definition
public void addSuperInterfaces(Menge<UsedId> superif)
// ino.end
// ino.method.addSuperInterfaces.21582.body
{
if (superif == null) return;
for (int i=0; i< superif.size(); i++) {
UsedId uid = superif.elementAt(i);
interfaces.addElement((short) add_CONSTANT_Class_info(uid.get_codegen_UsedId()));
}
}
// ino.end
// ino.method.addGenerics.21585.defdescription type=javadoc
/**
* Fuegt ggf. Generics in den Klassendefintion selbst
* hinzu.
*/
// ino.end
// ino.method.addGenerics.21585.definition
public void addGenerics(Menge<Type> para, UsedId superClass, Menge<UsedId> superIf)
// ino.end
// ino.method.addGenerics.21585.body
{
if (para == null || para.size() == 0) return;
SignatureInfo si = new SignatureInfo(para, superClass, superIf, this);
attributes.addElement(si);
}
// ino.end
// ino.method.add_method.21588.definition
public void add_method(String name, String param_type, ParameterList param,
Type type, Block block, short acc_flag, Menge paralist, boolean isAbstract)
throws JVMCodeException
// ino.end
// ino.method.add_method.21588.body
{
Menge<Attribute> method_attributes = new Menge<Attribute>();
// Sofern eine Signatur (Generic) in der Beschreibung der Methode vorkommt,
// Signatur generieren.
if(SignatureInfo.needsSignature( param, type))
method_attributes.addElement(new SignatureInfo(param, type, this));
codegenlog.debug("Methode hinzugefuegt: " + name + ", Parameter-Typ: " + param_type
+ ", Accessflags: " + acc_flag);
CodeAttribute code = new CodeAttribute(class_name, acc_flag);
code.set_attribute_name_index((short)this.add_CONSTANT_Utf8_info("Code"));
if(name.equals("<init>"))
{
code.add_code(JVMCode.aload_0);
code.add_code(JVMCode.invokespecial);
//hama: habe die obere original Zeile auskommentiert.
//Ich bekomme mit der obigen Zeile ein Fehler in der Verlinkung des
//ConstantPool (mit der unteren Zeile nicht)
//code.add_code_short(this.add_method_ref(super_class_name, name, param_type));
code.add_code_short(this.add_method_ref(super_class_name, name, "()V"));
for(int i = 0; i < class_block.size(); i++)
{
class_block.elementAt(i).codegen(this, code, paralist);
}
if(param != null) param.codegen(this, code);
//hama: in dem Use Case StoreSomething wird vom Compiler ein
//aload_0 zuwening im Konstruktor erzeugt. Deshalb schreibe ich
//es hier hard rein.
//Test Workaround: Das eigentliche Problem: "Warum fehlt das aload_0" ist
//noch nicht behoben. Au�erdem stimmt das hier nur ¿½r den einen Use Case
//in allen anderen ¿½llen wird ¿½lschlicher Weise das aload_0 einef�gt.
if(this.hamaAload0 == true)
{
byte b2 = 42;
Byte b1 = new Byte(b2);
code.add_code(b1);
codegenlog.warn("hama: Class ClassFile: !!!!!!!!!!!!!!!!!!!!ACHTUNG experimentell aload_0 in Konstrukor eingef�gt!!!");
}
//hama: bis hier experimentell
if(block != null)
{
block.codegen(this, code, paralist);
}
code.add_code(JVMCode.return_);
}
else
{
if(param != null)
{
param.codegen(this, code);
}
//hama: in dem Use Case StoreSomething wird vom Compiler ein
//aload_0 zuwening in der set Methode erzeugt. Deshalb schreibe ich
//es hier hard rein.
//Test Workaround: Das eigentliche Problem: "Warum fehlt das aload_0" ist
//noch nicht behoben. Au�erdem stimmt das hier nur ¿½r den einen Use Case
//in allen anderen ¿½llen einer Set Methode wird ¿½lschlicher Weise das
//aload_0 einef�gt.
if(this.hamaAload0 == true)
{
if(name.equals("set"))
{
byte b2 = 42;
Byte b1 = new Byte(b2);
code.add_code(b1);
codegenlog.warn("hama: Class ClassFile: !!!!!!!!!!!!!!!!!!!!ACHTUNG experimentell aload_0 in die set Methode eingef�gt!!!");
}
}
//hama: bis hier experimentell.
if(block != null)
{
block.codegen(this, code, paralist);
}
if(type != null && type.getName().equals("void"))
{
code.add_code(JVMCode.return_);
}
}
// Code nur hinzufuegen, wenn nicht abstract (Interface!)
if (!isAbstract) method_attributes.addElement(code);
// Methodeninformationen zusammenstellen
MethodInfo method = new MethodInfo();
//feda Accessflag muss beim <init> 1 = Public sein.
if(name.equals("<init>"))
{
acc_flag = 1;
}
method.set_access_flags(acc_flag);
method.set_name_index((short)add_CONSTANT_Utf8_info(name));
method.set_descriptor_index((short)add_CONSTANT_Utf8_info(param_type));
method.set_attributes(method_attributes);
if(!this.methods.contains(method))
{
methods.addElement(method);
}
}
// ino.end
// ino.method.add_method_ref.21591.definition
public int add_method_ref(String cl_name, String name, String param_type)
// ino.end
// ino.method.add_method_ref.21591.body
{
// Bei fully qualified names wichtig!
if (cl_name.contains(".")) cl_name = cl_name.replace(".", "/");
codegenlog.debug("Methodenreferenz hinzugefuegt: " + name + ", Klasse: " + cl_name
+ ", Paramter-Typ: " + param_type);
Key methodref_key = new Key(JVMCode.CONSTANT_Methodref, cl_name + name + param_type);
if(!this.key_Menge.contains(methodref_key))
{
CONSTANT_Methodref_info methodref = new CONSTANT_Methodref_info();
methodref.set_tag(JVMCode.CONSTANT_Methodref);
methodref.set_class_index((short)this.add_CONSTANT_Class_info(cl_name));
methodref.set_name_and_type_index((short)this.add_CONSTANT_NameAndType_info(name, param_type));
this.key_Menge.addElement(methodref_key);
this.constant_pool.addElement(methodref);
}
return this.key_Menge.indexOf(methodref_key)+1;
}
// ino.end
// ino.method.getConstantValueID.21594.defdescription type=javadoc
/**
* Gibt den NameIndex auf die UTF-8 Konstante "ConstantValue" zurueck,
* der fuer die Definition von Konstanten benoetigt wird.
*/
// ino.end
// ino.method.getConstantValueID.21594.definition
public short getConstantValueID()
// ino.end
// ino.method.getConstantValueID.21594.body
{
if (ConstantValueID == 0) {
ConstantValueID = (short) add_CONSTANT_Utf8_info("ConstantValue");
}
return ConstantValueID;
}
// ino.end
// ino.method.getSignatureID.21597.defdescription type=javadoc
/**
* Gibt den NameIndex auf die UTF-8 Konstante "Signature" zurueck,
* der fuer die Definition von Konstanten benoetigt wird.
*/
// ino.end
// ino.method.getSignatureID.21597.definition
public short getSignatureID()
// ino.end
// ino.method.getSignatureID.21597.body
{
if (SignatureID == 0) {
SignatureID = (short) add_CONSTANT_Utf8_info("Signature");
}
return SignatureID;
}
// ino.end
// ino.method.add_field.21600.definition
public void add_field(String name, String type, short acc_flag, Attribute attr)
// ino.end
// ino.method.add_field.21600.body
{
codegenlog.debug("Field hinzugefuegt: " + name + ", Typ: " + type + " ," +
"Accessflags: " + acc_flag);
FieldInfo field = new FieldInfo();
field.set_Name(name);
field.set_Type(type);
field.set_Class_Name(class_name);
field.set_access_flags(acc_flag);
field.set_name_index((short)this.add_CONSTANT_Utf8_info(name));
field.set_descriptor_index((short)this.add_CONSTANT_Utf8_info(type));
if (attr != null) {
Menge<Attribute> vec = new Menge<Attribute>();
vec.addElement(attr);
field.set_attributes(vec);
}
fields.addElement(field);
}
// ino.end
// ino.method.add_field_ref.21603.definition
public int add_field_ref(String name, String cl_name, String type)
throws JVMCodeException
// ino.end
// ino.method.add_field_ref.21603.body
{
if(cl_name==null) cl_name = class_name;
if(type==null) {
int index = -1;
for(int i=0; i < fields.size();i++)
if(name.equals(fields.elementAt(i).get_Name())) { index = i; break; }
if(index == -1) throw new JVMCodeException("JVMCodeException: ClassFile: int add_field_ref(String name, String cla_name, String atype)");
FieldInfo field = fields.elementAt(index);
type = field.get_Type();
cl_name = field.get_Class_Name();
codegenlog.debug("Fieldref hinzugefuegt: " + name + ", Klassenname: " + cl_name
+ ", Accessflags: " + field.get_access_flags());
Key fieldref_key = new Key(JVMCode.CONSTANT_Fieldref, cl_name + name + type);
if(!this.key_Menge.contains(fieldref_key)) {
CONSTANT_Fieldref_info fieldref = new CONSTANT_Fieldref_info();
fieldref.set_tag(JVMCode.CONSTANT_Fieldref);
fieldref.set_class_index((short)this.add_CONSTANT_Class_info(cl_name));
fieldref.set_name_and_type_index((short)this.add_CONSTANT_NameAndType_info(name, type));
this.key_Menge.addElement(fieldref_key);
this.constant_pool.addElement(fieldref);
}
return (this.key_Menge.indexOf(fieldref_key)+1);
}
else {
codegenlog.debug("Fieldref hinzugefuegt: " + name + ", Klassenname: " + cl_name
+ ", Typ: " + type);
Key fieldref_key = new Key(JVMCode.CONSTANT_Fieldref, cl_name + name + type);
if(!this.key_Menge.contains(fieldref_key)) {
CONSTANT_Fieldref_info fieldref = new CONSTANT_Fieldref_info();
fieldref.set_tag(JVMCode.CONSTANT_Fieldref);
fieldref.set_class_index((short)this.add_CONSTANT_Class_info(cl_name));
fieldref.set_name_and_type_index((short)this.add_CONSTANT_NameAndType_info(name, type));
this.key_Menge.addElement(fieldref_key);
this.constant_pool.addElement(fieldref);
}
return (this.key_Menge.indexOf(fieldref_key)+1);
}
}
// ino.end
// ino.method.set_constant_pool.21606.definition
public void set_constant_pool(Menge<CPInfo> t)
// ino.end
// ino.method.set_constant_pool.21606.body
{ this.constant_pool = t; }
// ino.end
// ino.method.set_access_flags.21609.definition
public void set_access_flags(short t)
// ino.end
// ino.method.set_access_flags.21609.body
{ this.access_flags = t; }
// ino.end
// ino.method.set_this_class.21612.definition
public void set_this_class(short t)
// ino.end
// ino.method.set_this_class.21612.body
{ this.this_class = t; }
// ino.end
// ino.method.set_super_class.21615.definition
public void set_super_class(short t)
// ino.end
// ino.method.set_super_class.21615.body
{ this.super_class = t; }
// ino.end
// ino.method.set_fields.21618.definition
public void set_fields(Menge<FieldInfo> t)
// ino.end
// ino.method.set_fields.21618.body
{ this.fields = t; }
// ino.end
// ino.method.set_methods.21621.definition
public void set_methods(Menge<MethodInfo> t)
// ino.end
// ino.method.set_methods.21621.body
{ this.methods = t; }
// ino.end
// ino.method.set_attributes.21624.definition
public void set_attributes(Menge<Attribute> t)
// ino.end
// ino.method.set_attributes.21624.body
{ this.attributes = t; }
// ino.end
public void set_class_name(String cn) {
this.class_name = cn;
}
// ino.method.set_constructor_founded.21627.definition
public void set_constructor_founded(boolean t)
// ino.end
// ino.method.set_constructor_founded.21627.body
{ this.constructor_founded = t; }
// ino.end
// ino.method.add_classblock_Element.21630.definition
public void add_classblock_Element(Assign a)
// ino.end
// ino.method.add_classblock_Element.21630.body
{ class_block.addElement(a); }
// ino.end
// ino.method.get_constant_pool.21633.definition
public Menge<CPInfo> get_constant_pool()
// ino.end
// ino.method.get_constant_pool.21633.body
{ return this.constant_pool; }
// ino.end
// ino.method.get_access_flags.21636.definition
public short get_access_flags()
// ino.end
// ino.method.get_access_flags.21636.body
{ return this.access_flags; }
// ino.end
// ino.method.get_this_class.21639.definition
public short get_this_class()
// ino.end
// ino.method.get_this_class.21639.body
{ return this.this_class; }
// ino.end
// ino.method.get_super_class.21642.definition
public short get_super_class()
// ino.end
// ino.method.get_super_class.21642.body
{ return this.super_class; }
// ino.end
// ino.method.get_fields.21645.definition
public Menge<FieldInfo> get_fields()
// ino.end
// ino.method.get_fields.21645.body
{ return this.fields; }
// ino.end
// ino.method.get_methods.21648.definition
public Menge<MethodInfo> get_methods()
// ino.end
// ino.method.get_methods.21648.body
{ return this.methods; }
// ino.end
// ino.method.get_attributes.21651.definition
public Menge<Attribute> get_attributes()
// ino.end
// ino.method.get_attributes.21651.body
{ return this.attributes; }
// ino.end
// ino.method.get_key_Menge.21654.definition
public Menge<Key> get_key_Menge()
// ino.end
// ino.method.get_key_Menge.21654.body
{ return this.key_Menge; }
// ino.end
// ino.method.get_constructor_founded.21657.definition
public boolean get_constructor_founded()
// ino.end
// ino.method.get_constructor_founded.21657.body
{ return this.constructor_founded; }
// ino.end
// ino.method.get_constant_pool_element.21660.definition
public short get_constant_pool_element(byte b, String id)
// ino.end
// ino.method.get_constant_pool_element.21660.body
{ return (short)this.key_Menge.indexOf(new Key(b, id)); }
// ino.end
// ino.method.get_class_block.21663.definition
public Menge<Assign> get_class_block()
// ino.end
// ino.method.get_class_block.21663.body
{ return this.class_block; }
// ino.end
// ino.method.codegen.21666.definition
public void codegen()
throws JVMCodeException
// ino.end
// ino.method.codegen.21666.body
{
try
{
codegenlog.info("Generieren der Klasse: " + class_name);
// Datei vorbereiten
//File file = new File(MyCompiler.getAPI().getOutputDir()
File file = new File ("/Users/pl/ResearchPapers/PIZZA+/Intersection_Types/"
//File file = new File ("/Users/pl/ResearchPapers/PIZZA+/JVM_Generics/Testfiles/"
+ class_name + ".class");
FileOutputStream f = new FileOutputStream(file);
// Schreiben der Header-Infos
writeInt(f, magic);
writeShort(f, minor_version);
writeShort(f, major_version);
codegenlog.debug("Header: magic=" + Integer.toHexString(magic));
codegenlog.debug("Header: minor_version=" + minor_version);
codegenlog.debug("Header: major_version=" + major_version);
codegenlog.info("Verarbeite Konstanten-Pool: " + (constant_pool.size()+1));
// Constant-Pool verarbeiten
writeShort(f, (short)(constant_pool.size() + 1));
for(int i = 0; i < constant_pool.size(); i++)
{
codegenlog.debug((i+1) +". " +
constant_pool.elementAt(i).toString());
constant_pool.elementAt(i).codegen(this, f);
}
// Informationen ueber die Klasse selbst verarbeiten
writeShort(f, access_flags);
writeShort(f, this_class);
writeShort(f, super_class);
codegenlog.debug("Klasseninfos: access_flags=" + access_flags);
codegenlog.debug("Klasseninfos: this_class=" + this_class);
codegenlog.debug("Klasseninfos: super_class=" + super_class);
// Interfaces verarbeiten
codegenlog.info("Verarbeite Interfaces: " + interfaces.size());
writeShort(f, (short)interfaces.size());
for (int i=0; i<interfaces.size(); i++) {
writeShort(f, interfaces.elementAt(i));
}
// Felder verarbeiten
codegenlog.info("Verarbeite Fields: " + fields.size());
writeShort(f, (short)fields.size());
for(int i = 0; i < fields.size(); i++)
{
fields.elementAt(i).codegen(this, f);
}
// Methodenvektor
codegenlog.info("Verarbeite Methodenliste: " + methods.size());
writeShort(f, (short)methods.size());
for(int i = 0; i < methods.size(); i++)
{
codegenlog.debug("Verarbeite Methode " + (i+1));
methods.elementAt(i).codegen(this, f);
}
// Attribut-Vektor
codegenlog.info("Verarbeite Attribute: " + attributes.size());
writeShort(f, (short)attributes.size());
for(int i = 0; i < attributes.size(); i++)
{
attributes.elementAt(i).codegen(this, f);
}
}
catch (java.io.IOException e)
{
codegenlog.fatal("Fehler beim Schreiben der ClassFile", e);
}
}
// ino.end
// ino.method.writeInt.21669.definition
public void writeInt(OutputStream f, int i)
throws IOException
// ino.end
// ino.method.writeInt.21669.body
{
f.write(((i >>> 24) & 255));
f.write(((i >>> 16) & 255));
f.write(((i >>> 8) & 255));
f.write((i & 255));
}
// ino.end
// ino.method.writeShort.21672.definition
public void writeShort(OutputStream f, short i)
throws IOException
// ino.end
// ino.method.writeShort.21672.body
{
f.write((i >>> 8) & 255);
f.write(i & 255);
}
// ino.end
// ino.method.writeByte.21675.definition
public void writeByte(OutputStream f, byte i)
throws IOException
// ino.end
// ino.method.writeByte.21675.body
{
f.write(i);
}
// ino.end
// ino.method.writeByteArray.21678.definition
public void writeByteArray(OutputStream f, byte[] b)
throws IOException
// ino.end
// ino.method.writeByteArray.21678.body
{
for(int i = 0; i < Array.getLength(b); i++) f.write(b[i]);
}
// ino.end
}
// ino.end

View File

@ -1,10 +0,0 @@
package de.dhbwstuttgart.bytecode;
import java.io.IOException;
import java.io.OutputStream;
import de.dhbwstuttgart.myexception.JVMCodeException;
public interface ClassFileMember {
public void codegen(ClassFile cf, OutputStream out) throws JVMCodeException, IOException;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,58 +0,0 @@
// ino.module.ExceptionTable.8545.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.ExceptionTable.8545.import
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import de.dhbwstuttgart.logger.Logger;
// ino.end
// ino.class.ExceptionTable.22047.declaration
public class ExceptionTable implements ClassFileMember
// ino.end
// ino.class.ExceptionTable.22047.body
{
// ino.attribute.codegenlog.22050.decldescription type=line
// Logger fuer Code-Gen
// ino.end
// ino.attribute.codegenlog.22050.declaration
protected static Logger codegenlog = Logger.getLogger("codegen");
// ino.end
// ino.attribute.start_pc.22053.declaration
private short start_pc;
// ino.end
// ino.attribute.end_pc.22056.declaration
private short end_pc;
// ino.end
// ino.attribute.handler_pc.22059.declaration
private short handler_pc;
// ino.end
// ino.attribute.catch_type.22062.declaration
private short catch_type;
// ino.end
// ino.method.codegen.22065.definition
@Override
public void codegen(ClassFile classfile, OutputStream f)
throws IOException
// ino.end
// ino.method.codegen.22065.body
{
classfile.writeShort(f, start_pc);
classfile.writeShort(f, end_pc);
classfile.writeShort(f, handler_pc);
classfile.writeShort(f, catch_type);
codegenlog.debug("Exception-Table: start_pc=" + start_pc
+ ", end_pc=" + end_pc + ", handler_pc=" + handler_pc
+ ", catch_type=" + catch_type);
}
// ino.end
}
// ino.end

View File

@ -1,203 +0,0 @@
// ino.module.FieldInfo.8546.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.FieldInfo.8546.import
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.logger.Logger;
// ino.end
import de.dhbwstuttgart.myexception.JVMCodeException;
// ino.class.FieldInfo.22068.declaration
public class FieldInfo implements ClassFileMember
// ino.end
// ino.class.FieldInfo.22068.body
{
// ino.attribute.codegenlog.22071.decldescription type=line
// Logger fuer Code-Gen
// ino.end
// ino.attribute.codegenlog.22071.declaration
protected static Logger codegenlog = Logger.getLogger("codegen");
// ino.end
// ino.attribute.name.22074.declaration
private String name;
// ino.end
// ino.attribute.type.22077.declaration
private String type;
// ino.end
// ino.attribute.class_name.22080.declaration
private String class_name;
// ino.end
// ino.attribute.access_flags.22083.declaration
private short access_flags;
// ino.end
// ino.attribute.name_index.22086.declaration
private short name_index;
// ino.end
// ino.attribute.descriptor_index.22089.declaration
private short descriptor_index;
// ino.end
// ino.attribute.attributes.22092.declaration
private Menge<Attribute> attributes = new Menge<Attribute>(); // attribute
// ino.end
// ino.method.get_Name.22095.definition
public String get_Name()
// ino.end
// ino.method.get_Name.22095.body
{
return this.name;
}
// ino.end
// ino.method.get_Type.22098.definition
public String get_Type()
// ino.end
// ino.method.get_Type.22098.body
{
return this.type;
}
// ino.end
// ino.method.get_Class_Name.22101.definition
public String get_Class_Name()
// ino.end
// ino.method.get_Class_Name.22101.body
{
return this.class_name;
}
// ino.end
// ino.method.get_access_flags.22104.definition
public short get_access_flags()
// ino.end
// ino.method.get_access_flags.22104.body
{
return this.access_flags;
}
// ino.end
// ino.method.get_name_index.22107.definition
public short get_name_index()
// ino.end
// ino.method.get_name_index.22107.body
{
return this.name_index;
}
// ino.end
// ino.method.get_descriptor_index.22110.definition
public short get_descriptor_index()
// ino.end
// ino.method.get_descriptor_index.22110.body
{
return this.descriptor_index;
}
// ino.end
// ino.method.get_attributes.22113.definition
public Menge<Attribute> get_attributes()
// ino.end
// ino.method.get_attributes.22113.body
{
return this.attributes;
}
// ino.end
// ino.method.set_Name.22116.definition
public void set_Name(String t)
// ino.end
// ino.method.set_Name.22116.body
{
this.name = t;
}
// ino.end
// ino.method.set_Type.22119.definition
public void set_Type(String t)
// ino.end
// ino.method.set_Type.22119.body
{
this.type = t;
}
// ino.end
// ino.method.set_Class_Name.22122.definition
public void set_Class_Name(String t)
// ino.end
// ino.method.set_Class_Name.22122.body
{
this.class_name = t;
}
// ino.end
// ino.method.set_access_flags.22125.definition
public void set_access_flags(short t)
// ino.end
// ino.method.set_access_flags.22125.body
{
this.access_flags = t;
}
// ino.end
// ino.method.set_name_index.22128.definition
public void set_name_index(short t)
// ino.end
// ino.method.set_name_index.22128.body
{
this.name_index = t;
}
// ino.end
// ino.method.set_descriptor_index.22131.definition
public void set_descriptor_index(short t)
// ino.end
// ino.method.set_descriptor_index.22131.body
{
this.descriptor_index = t;
}
// ino.end
// ino.method.set_attributes.22134.definition
public void set_attributes(Menge<Attribute> t)
// ino.end
// ino.method.set_attributes.22134.body
{
this.attributes = t;
}
// ino.end
// ino.method.codegen.22137.definition
@Override
public void codegen(ClassFile classfile, OutputStream f)
throws IOException, JVMCodeException
// ino.end
// ino.method.codegen.22137.body
{
classfile.writeShort(f, access_flags);
classfile.writeShort(f, name_index);
classfile.writeShort(f, descriptor_index);
codegenlog.debug("FieldInfo: acc_flag=" + access_flags
+ ", name_index=" + name_index + ", descriptor_index="
+ descriptor_index + ", attributes_count=" + attributes.size());
classfile.writeShort(f, (short) attributes.size()); // attributes_count=0
for (int i = 0; i < attributes.size(); i++) { // attributes
attributes.elementAt(i).codegen(classfile, f);
}
}
// ino.end
}
// ino.end

File diff suppressed because it is too large Load Diff

View File

@ -1,125 +0,0 @@
// ino.module.Key.8548.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.Key.8548.import
import java.io.FileOutputStream;
import java.io.OutputStream;
import de.dhbwstuttgart.logger.Logger;
// ino.end
// ino.class.Key.22890.declaration
public class Key implements ClassFileMember
// ino.end
// ino.class.Key.22890.body
{
// ino.attribute.tag.22893.declaration
private byte tag;
// ino.end
// ino.attribute.a.22896.declaration
private String a;
// ino.end
// ino.attribute.codegenlog.22899.decldescription type=line
// Logger fuer Code-Gen
// ino.end
// ino.attribute.codegenlog.22899.declaration
protected static Logger codegenlog = Logger.getLogger("codegen");
// ino.end
// ino.method.Key.22902.definition
public Key(byte t, String a)
// ino.end
// ino.method.Key.22902.body
{
this.tag = t;
this.a = a;
}
// ino.end
// ino.method.equals.22905.definition
public boolean equals(Object obj)
// ino.end
// ino.method.equals.22905.body
{
if (obj instanceof Key) {
Key key_object = (Key) obj;
if (this.tag == key_object.get_tag()
&& this.a.equals(key_object.get_a()))
return true;
}
return false;
}
// ino.end
// ino.method.get_tag.22908.definition
public byte get_tag()
// ino.end
// ino.method.get_tag.22908.body
{
return tag;
}
// ino.end
// ino.method.get_a.22911.definition
public String get_a()
// ino.end
// ino.method.get_a.22911.body
{
return a;
}
// ino.end
// ino.method.set_tag.22914.definition
public void set_tag(byte t)
// ino.end
// ino.method.set_tag.22914.body
{
this.tag = t;
}
// ino.end
// ino.method.set_a.22917.definition
public void set_a(String s)
// ino.end
// ino.method.set_a.22917.body
{
this.a = s;
}
// ino.end
// ino.method.codegen.22920.definition
@Override
public void codegen(ClassFile classfile, OutputStream f)
// ino.end
// ino.method.codegen.22920.body
{
String tag_string = new String();
if (tag == (byte) 1)
tag_string = "CONSTANT_Utf8";
else if (tag == JVMCode.CONSTANT_Integer)
tag_string = "CONSTANT_Integer";
else if (tag == JVMCode.CONSTANT_Float)
tag_string = "CONSTANT_Float";
else if (tag == JVMCode.CONSTANT_Long)
tag_string = "CONSTANT_Long";
else if (tag == JVMCode.CONSTANT_Double)
tag_string = "CONSTANT_Double";
else if (tag == JVMCode.CONSTANT_Class)
tag_string = "CONSTANT_Class";
else if (tag == JVMCode.CONSTANT_String)
tag_string = "CONSTANT_String";
else if (tag == JVMCode.CONSTANT_Fieldref)
tag_string = "CONSTANT_Fieldref";
else if (tag == JVMCode.CONSTANT_Methodref)
tag_string = "CONSTANT_Methodref";
else if (tag == JVMCode.CONSTANT_InterfaceMethodref)
tag_string = "CONSTANT_InterfaceMethodref";
else if (tag == JVMCode.CONSTANT_NameAndType)
tag_string = "CONSTANT_NameAndType";
codegenlog.debug(tag_string + " " + a);
}
// ino.end
}
// ino.end

View File

@ -1,138 +0,0 @@
// ino.module.MethodInfo.8549.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.MethodInfo.8549.import
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.logger.Logger;
// ino.end
import de.dhbwstuttgart.myexception.JVMCodeException;
// ino.class.MethodInfo.22923.declaration
public class MethodInfo implements ClassFileMember
// ino.end
// ino.class.MethodInfo.22923.body
{
// ino.attribute.codegenlog.22926.decldescription type=line
// Logger fuer Code-Gen
// ino.end
// ino.attribute.codegenlog.22926.declaration
protected static Logger codegenlog = Logger.getLogger("codegen");
// ino.end
// ino.attribute.access_flags.22929.declaration
private short access_flags;
// ino.end
// ino.attribute.name_index.22932.declaration
private short name_index;
// ino.end
// ino.attribute.descriptor_index.22935.declaration
private short descriptor_index;
// ino.end
// ino.attribute.attributes.22938.declaration
private Menge<Attribute> attributes = new Menge<Attribute>();
// ino.end
// ino.method.get_access_flags.22941.definition
public short get_access_flags()
// ino.end
// ino.method.get_access_flags.22941.body
{
return this.access_flags;
}
// ino.end
// ino.method.get_name_index.22944.definition
public short get_name_index()
// ino.end
// ino.method.get_name_index.22944.body
{
return this.name_index;
}
// ino.end
// ino.method.get_descriptor_index.22947.definition
public short get_descriptor_index()
// ino.end
// ino.method.get_descriptor_index.22947.body
{
return this.descriptor_index;
}
// ino.end
// ino.method.get_attributes.22950.definition
public Menge<Attribute> get_attributes()
// ino.end
// ino.method.get_attributes.22950.body
{
return this.attributes;
}
// ino.end
// ino.method.set_access_flags.22953.definition
public void set_access_flags(short t)
// ino.end
// ino.method.set_access_flags.22953.body
{
this.access_flags = t;
}
// ino.end
// ino.method.set_name_index.22956.definition
public void set_name_index(short t)
// ino.end
// ino.method.set_name_index.22956.body
{
this.name_index = t;
}
// ino.end
// ino.method.set_descriptor_index.22959.definition
public void set_descriptor_index(short t)
// ino.end
// ino.method.set_descriptor_index.22959.body
{
this.descriptor_index = t;
}
// ino.end
// ino.method.set_attributes.22962.definition
public void set_attributes(Menge<Attribute> t)
// ino.end
// ino.method.set_attributes.22962.body
{
this.attributes = t;
}
// ino.end
// ino.method.codegen.22965.definition
public void codegen(ClassFile classfile, OutputStream f)
throws JVMCodeException, IOException
// ino.end
// ino.method.codegen.22965.body
{
classfile.writeShort(f, access_flags);
classfile.writeShort(f, name_index);
classfile.writeShort(f, descriptor_index);
classfile.writeShort(f, (short) attributes.size());
codegenlog.debug("MethodInfo: acc_flag=" + access_flags
+ ", name_index=" + name_index + ", descriptor_index="
+ descriptor_index + ", attributes_count=" + attributes.size());
if (attributes != null)
for (int i = 0; i < attributes.size(); i++) {
attributes.elementAt(i).codegen(classfile, f);
}
}
// ino.end
}
// ino.end

View File

@ -1,276 +0,0 @@
// ino.module.SignatureInfo.8550.package
package de.dhbwstuttgart.bytecode;
// ino.end
// ino.module.SignatureInfo.8550.import
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.logger.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;
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
/**
* Generiert die Attribute eines Fields, einer Methode oder einer Klasse/Interface
* zur Integration der Signatur (Generics).
* @author SCJU
*/
// ino.end
// ino.class.SignatureInfo.22968.declaration
public class SignatureInfo extends Attribute
// ino.end
// ino.class.SignatureInfo.22968.body
{
// ino.attribute.signatureID.22972.decldescription type=line
// UTF-8 Konstante mit der Signatur selbst
// ino.end
// ino.attribute.signatureID.22972.declaration
private short signatureID = 0;
// ino.end
// ino.attribute.codegenlog.22975.decldescription type=line
// Logger fuer Code-Gen
// ino.end
// ino.attribute.codegenlog.22975.declaration
protected static Logger codegenlog = Logger.getLogger("codegen");
// ino.end
public SignatureInfo(short sid) {
signatureID = sid;
}
// ino.method.SignatureInfo.22978.defdescription type=javadoc
/**
* Konstruktor fuer die Signatur einer Klasse bzw. eines Interfaces.
*/
// ino.end
// ino.method.SignatureInfo.22978.definition
public SignatureInfo(Menge<Type> vec, UsedId superclass, Menge<UsedId> superIf, ClassFile cf)
// ino.end
// ino.method.SignatureInfo.22978.body
{
StringBuffer sb = new StringBuffer();
sb.append("<");
set_attribute_name_index(cf.getSignatureID());
// Parameterliste verarbeiten, falls vorhanden
Type type;
for (int i=0; i<vec.size(); i++) {
type = vec.elementAt(i);
if (type instanceof BoundedGenericTypeVar)
sb.append(((BoundedGenericTypeVar)type).getSignatureDefinition());
else if (type instanceof GenericTypeVar)
sb.append(type.getName()+ ":"+ JVMCode.get_codegen_Type( "Object", null));
}
sb.append(">");
if (superclass == null && (superIf == null || superIf.size() == 0)) {
// Falls keine Superclassen oder Interfaces angegeben wurden,
// wird per Definition wird nochmals "Ljava/lang/Object;" angehaengt
sb.append(JVMCode.get_codegen_Type("Object", null));
} else {
if (superclass != null) sb.append(superclass.getSignatureUsedId());
if (superIf != null && superIf.size() > 0) {
for (int i=0; i<superIf.size(); i++) {
sb.append(superIf.elementAt(i).getSignatureUsedId());
}
}
}
set_attribute_name_index(cf.getSignatureID());
signatureID = (short) cf.add_CONSTANT_Utf8_info(sb.toString());
codegenlog.debug("Signatur fuer Klasse erstellt: " + sb.toString());
}
// ino.end
// ino.method.SignatureInfo.22981.defdescription type=javadoc
/**
* Konstruktor fuer eine Signatur einer Instanzvariable.
* @throws JVMCodeException
*/
// ino.end
// ino.method.SignatureInfo.22981.definition
public SignatureInfo(Type type, ClassFile cf)
throws JVMCodeException
// ino.end
// ino.method.SignatureInfo.22981.body
{
String cmplType = "";
if (type instanceof RefType) {
RefType rf = (RefType) type;
if (rf.get_ParaList().size() == 0)
throw new JVMCodeException("Signatur kann nicht generiert werden - keine Typinformationen!");
cmplType = rf.getSignatureType(null);
} else if (type instanceof GenericTypeVar || type instanceof BoundedGenericTypeVar) {
cmplType = ((GenericTypeVar)type).getSignatureType(null);
} else {
throw new JVMCodeException("Signatur kann fuer unbekannten Typ " + type.getClass().getName()
+ " nicht generiert werden!");
}
set_attribute_name_index(cf.getSignatureID());
signatureID = (short) cf.add_CONSTANT_Utf8_info(cmplType);
codegenlog.debug("Signatur fuer Variable erstellt: " + cmplType);
}
// ino.end
// ino.method.SignatureInfo.22984.defdescription type=javadoc
/**
* Konstruktor fuer eine Methodensignatur.
* @throws JVMCodeException
*/
// ino.end
// ino.method.SignatureInfo.22984.definition
public SignatureInfo(ParameterList param, Type type, ClassFile cf)
throws JVMCodeException
// ino.end
// ino.method.SignatureInfo.22984.body
{
if (param == null && type == null)
throw new JVMCodeException("Signatur kann nicht generiert werden - keine Typinformationen!");
StringBuffer sig = new StringBuffer();
// Falls RueckgabeWert vom Typ BoundedGenericTypeVar ist, muss vorher schon die
// Definition erfolgen!
if (type instanceof BoundedGenericTypeVar) {
sig.append("<");
sig.append(((BoundedGenericTypeVar)type).getSignatureDefinition());
sig.append(">");
}
sig.append("(");
// Parameterliste verarbeiten, falls vorhanden
if (param != null) {
for (int i=0; i<param.getParameterCount(); i++) {
sig.append(param.getParameterAt(i).getType().getSignatureType(null));
}
}
// RueckgabeTyp
sig.append(")");
sig.append(type.getSignatureType(null));
set_attribute_name_index(cf.getSignatureID());
signatureID = (short) cf.add_CONSTANT_Utf8_info(sig.toString());
codegenlog.debug("Signatur fuer Methode erstellt: " + sig.toString());
}
// ino.end
// ino.method.codegen.22987.definition
public void codegen(ClassFile classfile, OutputStream f)
throws JVMCodeException, IOException
// ino.end
// ino.method.codegen.22987.body
{
// Verweis auf Signature
classfile.writeShort(f, get_attribute_name_index());
// Laenge des Verweises auf Konstantenpool, per Definition 2
classfile.writeInt(f, get_attributes_length());
// Verweis auf den Konstantenpool
classfile.writeShort(f, signatureID);
}
// ino.end
// ino.method.needsSignature.22990.defdescription type=javadoc
/**
* Gibt zurueck, ob eine Signaturdefinition fuer den Typ erforderlich ist.
*/
// ino.end
// ino.method.needsSignature.22990.definition
public static boolean needsSignature(Type typ)
// ino.end
// ino.method.needsSignature.22990.body
{
if (typ == null) return false;
// Fuer GenericTypeVars wird in jedem Fall eine Signatur benoetigt
if (typ instanceof GenericTypeVar || typ instanceof BoundedGenericTypeVar) return true;
// Falls nicht RefType, brauchen wir keine Signatur
if (!(typ instanceof RefType)) return false;
RefType rf = (RefType) typ;
// Die Definition eines Generics ist zwingend erforderlich.
if (rf.get_ParaList() == null || rf.get_ParaList().size() == 0) return false;
return true;
}
// ino.end
// ino.method.needsSignature.22993.defdescription type=javadoc
/**
* Gibt zurueck, ob eine Signaturdefinition fuer die Methode erforderlich ist.
*/
// ino.end
// ino.method.needsSignature.22993.definition
public static boolean needsSignature(ParameterList param, Type type)
// ino.end
// ino.method.needsSignature.22993.body
{
// Fuer Rueckgabetyp erforderlich???
if (needsSignature(type)) return true;
// Parameter testen
boolean needed = false;
if (param == null) return false;
for (int i=0; (i<param.formalparameter.size()) && (!needed); i++) {
needed = needsSignature(param.formalparameter.elementAt(i).getType());
if (needed) return true;
}
return needed;
}
// ino.end
// ino.method.get_attributes_length.22996.definition
public int get_attributes_length()
// ino.end
// ino.method.get_attributes_length.22996.body
{
// Laenge des Verweises auf den Konstantenpool,
// per Definition 2.
return 2;
}
// ino.end
// @Override
// public void codegen(ClassFile classfile, OutputStream f)
// throws JVMCodeException, IOException {
// throw new NotImplementedException();
// }
}
// ino.end

View File

@ -7,6 +7,7 @@ import java.util.*;
import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.logger.LoggerConfiguration;
import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException;
public class ConsoleInterface {
@ -20,7 +21,7 @@ public class ConsoleInterface {
for(String file : args){
filenames.add(file);
}
Logger.setStandardConfiguration(new LoggerConfiguration()); // sämtliches Logging unterdrücken
Logger.setStandardConfiguration(new LoggerConfiguration()); // sämtliches Logging unterdrücken
run(filenames);
}
@ -28,7 +29,7 @@ public class ConsoleInterface {
public static void run(Menge<String> filenames){
Menge<TypeinferenceResultSet> resultSet = null;
MyCompilerAPI compiler = MyCompiler.getAPI();
MyCompilerAPI compiler = MyCompiler.getAPI(new LoggerConfiguration());
try{
/////////////////////////
// Parsen:
@ -47,7 +48,7 @@ public class ConsoleInterface {
///////////////////////
// Ausgabe:
///////////////////////
if(resultSet == null)System.out.println("Keine Lösung!");
if(resultSet == null)System.out.println("Keine Lösung!");
ArrayList<String> resultJavaCodes = new ArrayList<String>();
for(TypeinferenceResultSet result : resultSet){
String javaCode = result.getInterferedClass().printJavaCode(result);
@ -55,7 +56,7 @@ public class ConsoleInterface {
}
for(String out : resultJavaCodes){
System.out.println("\nMögliche Typisierung:\n\n");
System.out.println("\nMögliche Typisierung:\n\n");
System.out.println(out);
}
}catch(Exception e){

View File

@ -16,7 +16,6 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.logger.LoggerConfiguration;
import de.dhbwstuttgart.logger.Section;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.myexception.CTypeReconstructionException;
import de.dhbwstuttgart.myexception.JVMCodeException;
import de.dhbwstuttgart.parser.JavaParser;
@ -83,7 +82,7 @@ public class MyCompiler implements MyCompilerAPI
// ino.attribute.m_AbstractSyntaxTree.21280.decldescription type=javadoc
/**
* Der abstrake Syntaxbaum
* <br/>Autor: J�rg ¿½uerle
* <br/>Autor: J�rg ¯Â¿Â½uerle
*/
// ino.end
// ino.attribute.m_AbstractSyntaxTree.21280.declaration
@ -92,10 +91,10 @@ public class MyCompiler implements MyCompilerAPI
// ino.method.MyCompiler.21283.defdescription type=javadoc
/**
* Author: J�rg ¿½uerle<br/>
* 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
* Author: J�rg ¯Â¿Â½uerle<br/>
* 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
@ -109,8 +108,8 @@ public class MyCompiler implements MyCompilerAPI
// ino.method.getAPI.21286.defdescription type=javadoc
/**
* Author: J�rg ¿½uerle<br/>
* Stellt eine neue Instanz der CompilerAPI zur Verf�gung.
* Author: JÃrg ¤uerle<br/>
* Stellt eine neue Instanz der CompilerAPI zur Verf�gung.
* Diese Methode sollte von der IDE aus aufgerufen werden,
* um eine Quellcode-Datei zu kompilieren.
* @return Die Compiler-API
@ -132,8 +131,8 @@ public class MyCompiler implements MyCompilerAPI
/**
* Author: Thomas Ott<br/>
* Ersetzt in der Superklassenparameterliste einer Klasse, diejenigen
* <code>GenericTypeVars</code>, zu denen es eine Klasse gibt, die gleich hei�t.
* Beim Parsen werden n�mlich vom Jay nur GenericTypeVars erzeugt und keine
* <code>GenericTypeVars</code>, zu denen es eine Klasse gibt, die gleich hei�t.
* Beim Parsen werden n�mlich vom Jay nur GenericTypeVars erzeugt und keine
* RefTypes. Dies wird durch diese Methode nachgeholt.<br/>
* Bsp.: class JoergsTolleKlasse<A> extends MartinsSuperklasse<Integer, B>
* <br/>Wie man an diesem Beispiel sieht, kann nur eine Superklasse instantiierte
@ -153,7 +152,7 @@ public class MyCompiler implements MyCompilerAPI
//wandleGeneric2RefType SOLLTE NICHT NUR FUER LISTEN
//VON TYPEN FUNKTIONIEREN PL 05-01-19
// otth: GenericTypeVar in Superklassenparameterlisten in RefTypes mit Parameterlsite = NULL umwandeln,
// falls: f�r GenericTypeVar existiert eine gleichnamige Klasse
// falls: f�r GenericTypeVar existiert eine gleichnamige Klasse
if(Parameter == null) return;
for( int i = 0; i < Parameter.size(); i++)
@ -165,7 +164,7 @@ public class MyCompiler implements MyCompilerAPI
if ( TempParameter instanceof GenericTypeVar)
{
inferencelog.debug("Generic, WANDLE: " + TempParameter.getName());
// existiert f�r GenericTypeVar eine deklarierte Klasse
// existiert f�r GenericTypeVar eine deklarierte Klasse
for( int k = 0; k < KlassenVektor.size(); k++)
{
if( KlassenVektor.elementAt(k).getSimpleName().equals(TempParameter.getSimpleName()) )
@ -228,9 +227,9 @@ public class MyCompiler implements MyCompilerAPI
/**
* Parst den Quellcode und baut den abstrakten Syntaxbaum auf. Danach wird
* automatisch der von Thomas Ott implementierte Algorithmus
* <code>NewTVar(jclass)</code> (siehe Algorithmus 5.17 TRProg, Martin Pl�micke)
* <code>NewTVar(jclass)</code> (siehe Algorithmus 5.17 TRProg, Martin Pl�micke)
* aufgerufen.
* <br/>Author: J�rg ¿½uerle
* <br/>Author: J�rg ¯Â¿Â½uerle
* @param reader
* @throws IOException
* @throws JavaParser.yyException
@ -248,7 +247,7 @@ public class MyCompiler implements MyCompilerAPI
parserlog.info("#########################################\n");
//////////////////////////////////////
// Alte Daten l�schen:
// Alte Daten l�schen:
//////////////////////////////////////
m_AbstractSyntaxTree = null;
@ -268,7 +267,7 @@ public class MyCompiler implements MyCompilerAPI
//PL 05-07-31 verschoben nach SourceFile.java in Methode typeReconstruction
// otth: TypePlaceholders in Superklassenparameterlisten in RefTypes mit Parameterlsite = NULL umwandeln,
// falls: f�r TypePlaceholder existiert eine gleichnamige Klasse
// falls: f�r TypePlaceholder existiert eine gleichnamige Klasse
// Superklasse suchen
//for( int i = 0; i < srcFile.KlassenVektor.size(); i++ )
//{
@ -309,10 +308,10 @@ public class MyCompiler implements MyCompilerAPI
if ( tempKlassBody != null )
{
strKlasse = tempKlasse.getName();
parserlog.debug("T->Felddeklarationen f�r die Klasse:" + strKlasse);
parserlog.debug("T->Felddeklarationen f�r die Klasse:" + strKlasse);
parserlog.debug( "------------------------------------");
// Schleife �ber alle fielddeclarations
// Schleife �ber alle fielddeclarations
tempMengeFieldDecl = tempKlassBody.getFields();
for( int k = 0; k < tempMengeFieldDecl.size(); k++ )
{
@ -321,7 +320,7 @@ public class MyCompiler implements MyCompilerAPI
{
//parserlog.debug("T->Konstruktor: " + ((DeclId)tempFieldDecl.get_Name().elementAt(0)).get_Name() + " - ReturnType: " + tempFieldDecl.getTypeName());
// pr�fen, ob Construktorname == Klassenname - falls nein: Construktor in Methode umwandeln !!!
// pr�fen, ob Construktorname == Klassenname - falls nein: Construktor in Methode umwandeln !!!
String strConstName = ((DeclId)tempFieldDecl.get_Name().elementAt(0)).get_Name(); // Konstruktorname
if ( !strConstName.equals( strKlasse ) )
{
@ -336,9 +335,9 @@ public class MyCompiler implements MyCompilerAPI
Methode.set_ExceptionList( Konstruktor.get_ExceptionList() );
Methode.setReturnType( Konstruktor.getReturnType() );
Methode.setDeclIdMenge( Konstruktor.getDeclIdMenge() );
// types_in_parameterlist wird wohl erst sp�ter und intern gef�llt
// types_in_parameterlist wird wohl erst sp�ter und intern gef�llt
// R�ckgabetyp = Objekt der Klasse 'TypePlaceholder'
// R�ckgabetyp = Objekt der Klasse 'TypePlaceholder'
// #JB# 31.03.2005
// ###########################################################
@ -359,7 +358,7 @@ public class MyCompiler implements MyCompilerAPI
// Debugg-Infos
parserlog.debug("");
parserlog.debug("T->NEUE Felddeklarationen f�r die Klasse:" + strKlasse);
parserlog.debug("T->NEUE Felddeklarationen f�r die Klasse:" + strKlasse);
parserlog.debug( "-----------------------------------------");
for( int k = 0; k < tempMengeFieldDecl.size(); k++ )
{
@ -389,14 +388,14 @@ public class MyCompiler implements MyCompilerAPI
tempMethod = (Method)tempFieldDecl;
tempReturn = tempMethod.getReturnType();
// Funktionen ohne definierten R�ckgabetyp suchen!!!
// Funktionen ohne definierten R�ckgabetyp suchen!!!
if( tempReturn instanceof TypePlaceholder )
{
// Methode mit nicht-definiertem R�ckgabetyp gefunden!
// Methode mit nicht-definiertem R�ckgabetyp gefunden!
// #JB# 31.03.2005
// ###########################################################
// Wird bereits �ber fresh() gemacht!!
// Wird bereits �ber fresh() gemacht!!
//tempReturn.setName( TypePlaceholder.makeNewName() );
// ###########################################################
parserlog.debug("");
@ -425,7 +424,7 @@ public class MyCompiler implements MyCompilerAPI
// #JB# 31.03.2005
// ###########################################################
// Wird bereits �ber fresh() gemacht!!
// Wird bereits �ber fresh() gemacht!!
//tempType.setName( TypePlaceholder.makeNewName() );
// ###########################################################
}
@ -458,7 +457,7 @@ public class MyCompiler implements MyCompilerAPI
/////////////////////////////////////////////////////////////////////////////////////////////////
// ino.method.init.21295.defdescription type=javadoc
/**
* Author: J�rg ¿½uerle<br/>
* Author: J�rg ¯Â¿Â½uerle<br/>
* Initialisiert den Compiler
*/
// ino.end
@ -476,11 +475,11 @@ public class MyCompiler implements MyCompilerAPI
// ino.method.parse.21298.defdescription type=javadoc
/**
* Author: J�rg ¿½uerle<br/>
* Author: J�rg ¯Â¿Â½uerle<br/>
* Ruft die Parse-Methode.
* @param file Die Quellcode-Datei
* @throws FileNotFoundException Wenn die Quellcode-Datei nicht existiert.
* @throws IOException Wenn was schief l�uft.
* @throws IOException Wenn was schief l�uft.
* @throws JavaParser.yyException Wenn ein Fehler beim Parsen auftritt.
*/
// ino.end
@ -500,9 +499,9 @@ public class MyCompiler implements MyCompilerAPI
// ino.method.typeReconstruction.21304.defdescription type=javadoc
/**
* Author: J�rg ¿½uerle<br/>
* Author: J�rg ¯Â¿Â½uerle<br/>
* Ruft den Typrekonstruktionsalgorithmus auf.
* @return Die Menge aller m�glichen Typkombinationen
* @return Die Menge aller m�glichen Typkombinationen
* @throws NullPointerException Wenn noch kein abstrakter Syntaxbaum vorhanden
* ist. @throws CTypeReconstructionException Wenn ein Fehler bei der
* Typrekonstruktion auftritt.
@ -538,13 +537,13 @@ public class MyCompiler implements MyCompilerAPI
/**
* Erstellt die FunN-Assumptions
* Fun0-FunN (momentan für N = 6)
* Fun0-FunN (momentan für N = 6)
* @return
*/
private TypeAssumptions makeFunNAssumptions(){
TypeAssumptions ret = new TypeAssumptions();
//Basic Assumptions für die FunN Interfaces:
//Basic Assumptions für die FunN Interfaces:
//TODO: Hier mehr als Fun1-Fun5 implementieren
for(int i = 0; i<6; i++){
FunNInterface funN = new FunNInterface(i);
@ -556,8 +555,8 @@ public class MyCompiler implements MyCompilerAPI
}
/**
* Author: J�rg ¿½uerle<br/>
* Generiert den Bytecode und das Class-File f�r den Syntaxbaum.
* Author: J�rg ¯Â¿Â½uerle<br/>
* Generiert den Bytecode und das Class-File f�r den Syntaxbaum.
* @throws NullPointerException Wenn noch kein abstrakter Syntaxbaum vorhanden
* ist.
@ -583,7 +582,7 @@ public class MyCompiler implements MyCompilerAPI
// ino.method.main.21313.defdescription type=javadoc
/**
* Die Main-Funktion, �ber die der Compiler auch per Konsole gestartet
* Die Main-Funktion, �ber die der Compiler auch per Konsole gestartet
* werden kann.
* @param args Klassendatei
*/
@ -696,7 +695,7 @@ public class MyCompiler implements MyCompilerAPI
for( int i = 0; i < containedTypes.size(); i++)
{
Type tempParameter = (Type)(containedTypes.elementAt(i));
// Nat�rlich nur RefTypes updaten
// Nat�rlich nur RefTypes updaten
if(tempParameter instanceof RefType){
RefType typ=(RefType)tempParameter;
UsedId fullyQualifiedName=UsedId.createFromQualifiedName(typ.getTypeName(),typ.getOffset());
@ -717,9 +716,9 @@ public class MyCompiler implements MyCompilerAPI
// ino.end
*/
/**
* @author Arne Lüdtke
* @author Arne Lüdtke
* Ersetzt alle GTVs durch TPHs mit gleichem Namen. Arbeitet Rekursiv.
* ACHTUNG: BACKDOOR CREATE!!! Nur für Testzwecke verwenden.
* ACHTUNG: BACKDOOR CREATE!!! Nur für Testzwecke verwenden.
* @param T - Typ, bei welchem die GTVs ersetzt werden sollen.
*/
public static Type makeGenericTypeVars2TypePlaceHolders(Type T)
@ -811,12 +810,12 @@ public class MyCompiler implements MyCompilerAPI
StringReader srcreader = new StringReader(fileData.toString());
//Den aus der Datei ausgelesenen Quellcode zu einem Syntaxbaum parsen:
this.m_AbstractSyntaxTree.add(parse2SyntaxTree(srcreader)); // Alle Dateien nacheinander hintereinander anhängen...
this.m_AbstractSyntaxTree.add(parse2SyntaxTree(srcreader)); // Alle Dateien nacheinander hintereinander anhängen...
}
/*
String gesamterSrc = "";
//Hier werden alle übergebenen Dateinamen abgearbeitet:
//Hier werden alle übergebenen Dateinamen abgearbeitet:
for(String filename : filenames){
try {
StringBuffer fileData = new StringBuffer();
@ -829,15 +828,15 @@ public class MyCompiler implements MyCompilerAPI
fileData.append(readData);
}
reader.close();
gesamterSrc += fileData.toString() + "\n"; // Alle Dateien nacheinander hintereinander anhängen...
gesamterSrc += fileData.toString() + "\n"; // Alle Dateien nacheinander hintereinander anhängen...
} catch (Exception e) {
e.printStackTrace();
throw new TypinferenzException("Die übergebenen Dateien konnten nicht zum Parsen eingelesen werden.");
throw new TypinferenzException("Die übergebenen Dateien konnten nicht zum Parsen eingelesen werden.");
}
}
try {
// und anschließend zum Parsen übergeben.
// und anschließend zum Parsen übergeben.
this.parse(gesamterSrc.toString());
} catch (Exception e) {
e.printStackTrace();
@ -853,12 +852,5 @@ public class MyCompiler implements MyCompilerAPI
this.m_AbstractSyntaxTree.add(ret);
return ret;
}
@Override
public Menge<ClassFile> codeGeneration(ResultSet result)
throws NullPointerException, JVMCodeException {
// TODO Auto-generated method stub
return null;
}
}
// ino.end

View File

@ -8,7 +8,6 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.myexception.CTypeReconstructionException;
import de.dhbwstuttgart.myexception.JVMCodeException;
import de.dhbwstuttgart.parser.JavaParser;
@ -24,7 +23,7 @@ import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException;
* IDE als Compiler-API zum Kompilieren einer Quellcode-Datei
* dienen und stellt somit die Schnittstelle zur Studienarbeit
* von Markus Melzer (Eclipse-Plugin) dar.
* @author Jörg uerle
* @author JÃrg ¤uerle
* @version $Date: 2013/09/09 11:04:24 $
*/
// ino.end
@ -36,7 +35,7 @@ public interface MyCompilerAPI
// ino.method.init.21331.decldescription type=javadoc
/**
* Author: Jörg uerle<br/>
* Author: JÃrg ¤uerle<br/>
* Initialisiert den Compiler
*/
// ino.end
@ -46,11 +45,11 @@ public interface MyCompilerAPI
// ino.method.parse.21334.decldescription type=javadoc
/**
* Author: Jörg uerle<br/>
* Author: JÃrg ¤uerle<br/>
* Parst eine Quellcodedatei und baut den abstrakten Syntaxbaum auf.
* @param file Die Quellcode-Datei
* @throws FileNotFoundException Wenn die Quellcode-Datei nicht existiert.
* @throws IOException Wenn was schief läuft.
* @throws IOException Wenn was schief läuft.
* @throws JavaParser.yyException Wenn ein Fehler beim Parsen auftritt.
*/
// ino.end
@ -61,10 +60,10 @@ public interface MyCompilerAPI
// ino.method.parse.21337.decldescription type=javadoc
/**
* Author: Jörg uerle<br/>
* Author: JÃrg ¤uerle<br/>
* Parst einen String und baut den abstrakten Syntaxbaum auf.
* @param srcCode Der zu parsende Quellcode
* @throws IOException Wenn was schief läuft.
* @throws IOException Wenn was schief läuft.
* @throws JavaParser.yyException Wenn ein Fehler beim Parsen auftritt.
// ino.end
@ -76,9 +75,9 @@ public interface MyCompilerAPI
// ino.method.typeReconstruction.21340.decldescription type=javadoc
/**
* Author: Jörg uerle<br/>
* Author: JÃrg ¤uerle<br/>
* Ruft den Typrekonstruktionsalgorithmus auf.
* @return Die Menge aller möglichen Typkombinationen
* @return Die Menge aller mÃglichen Typkombinationen
* @throws NullPointerException Wenn noch kein abstrakter Syntaxbaum vorhanden
* ist. @throws CTypeReconstructionException Wenn ein Fehler bei der
* Typrekonstruktion auftritt.
@ -89,20 +88,6 @@ public interface MyCompilerAPI
throws NullPointerException, TypeinferenceException;
// ino.end
// ino.method.codeGeneration.21346.decldescription type=javadoc
/**
* Author: Jörg Bäuerle<br/>
* Generiert den Bytecode und das Class-File für den Syntaxbaum.
* @param syntaxTree Der Syntaxbaum
* @throws NullPointerException Wenn noch kein abstrakter Syntaxbaum vorhanden
* ist. @throws JVMCodeException
*/
// ino.end
// ino.method.codeGeneration.21346.declaration
public Menge<ClassFile> codeGeneration(ResultSet result)
throws NullPointerException, JVMCodeException;
// ino.end
// ino.method.setOutputDir.21349.decldescription type=javadoc
/**
* Author: Juergen Schmiing <br>
@ -124,7 +109,7 @@ public interface MyCompilerAPI
// ino.end
/**
* Parst zusammenhängende JavaKlassen in verschiedenen Dateien.
* Parst zusammenhängende JavaKlassen in verschiedenen Dateien.
* @param filenames - Eine Liste von Quellcodedateien, welche gseparst werden sollen
*/
public void parse(Menge<String> filenames) throws ParserError;

View File

@ -34,8 +34,8 @@ public class Logger {
*/
/**
* Logt eine Debug Message, welche zusätzlich einer bestimmten Section zugewiesen wird.
* Dadurch lässt sich die DEBUG ausgabe übersichtlicher gestalten.
* 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
*/
@ -45,7 +45,7 @@ public class Logger {
/**
* Liefert den Logger mit dem angegebenen Namen.
* Üblicherweise wird diese Methode mit dem Namen der Klasse aufgerufen, in welcher der Logger tätig ist.
* Üblicherweise wird diese Methode mit dem Namen der Klasse aufgerufen, in welcher der Logger tätig ist.
* @param name - Name der Klasse ( Ermittelbar mittels <Klasse>.class.getName() )
* @return
*/
@ -94,7 +94,7 @@ public class Logger {
}
/**
* wird hier null übergeben, so wird sämtliches Logging unterdrückt.
* wird hier null übergeben, so wird ¤mtliches Logging unterdrückt.
*/
public static void setStandardConfiguration(LoggerConfiguration config) {
Logger.standardConfiguration = config;

View File

@ -12,7 +12,7 @@ public class LoggerConfiguration{
public LoggerConfiguration setOutput(Section forSection, PrintStream output){
if(outputs.containsKey(forSection)){
//throw new DebugException("Eine outputStream für Section "+forSection+" ist bereits vorhanden");
//throw new DebugException("Eine outputStream für Section "+forSection+" ist bereits vorhanden");
if(outputs.get(forSection).equals(output)){
//do nothing
}else{

View File

@ -3,7 +3,7 @@ package de.dhbwstuttgart.logger;
import java.util.logging.Level;
/**
* Sämtliche Logging Ausgaben werden in die bei der Erstellung des Loggers übergebene Section eingeteilt
* Sämtliche Logging Ausgaben werden in die bei der Erstellung des Loggers übergebene Section eingeteilt
* @author janulrich
*
*/

View File

@ -9,7 +9,7 @@ import de.dhbwstuttgart.core.IItemWithOffset;
// ino.class.CTypeReconstructionException.23746.description type=javadoc
/**
* @author J�rg ¿½uerle
* @author J�rg ¯Â¿Â½uerle
* @version $Date: 2006/06/13 10:37:31 $
*/
// ino.end

View File

@ -66,7 +66,7 @@ public class JavaClassName {
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 false;//Spezialfall, nicht beide Typen müssen eindeutig mit Packagenamen angegeben werden
}
return true;
}

View File

@ -1,7 +1,7 @@
/********************************************
* file: JavaLexer.lex *
* *
* enth�lt die JLex-Spezifikation f�r die *
* enth�lt die JLex-Spezifikation f�r die *
* Generierung des lexical analyzers *
* *
********************************************/

View File

@ -46,7 +46,7 @@ void initUsedIdsToCheck() {
}
//PL 05-07-30 eingefuegt. ENDE
//LUAR 07-05-29 Anfang für Wildcard Test
//LUAR 07-05-29 Anfang für Wildcard Test
public Menge<Pair> testPair = new Menge<Pair>();
//LUAR 07-05-29 Ende
// line 53 "-"
@ -817,7 +817,7 @@ case 19:
{
UsedId UI = new UsedId(((Token)yyVals[0+yyTop]).getOffset());
UI.set_Name( ((Token)yyVals[0+yyTop]).getLexem() );
UI.setOffset(((Token)yyVals[0+yyTop]).getOffset());/*hinzugef�gt hoth: 07.04.2006*/
UI.setOffset(((Token)yyVals[0+yyTop]).getOffset());/*hinzugef�gt hoth: 07.04.2006*/
yyVal = UI;
}
break;
@ -980,7 +980,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()) );*/
/* ########################################################### */
de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + ((Token)yyVals[0+yyTop]).getLexem() + " TV", Section.PARSER);
de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + ((Token)yyVals[0+yyTop]).getLexem() + " TV", Section.PARSER);
yyVal = pl;
}
break;
@ -991,7 +991,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);
de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER '<' paralist '>' --> Paralist f�r " + ((Token)yyVals[-3+yyTop]).getLexem() + ": RefType", Section.PARSER);
de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER '<' paralist '>' --> Paralist f�r " + ((Token)yyVals[-3+yyTop]).getLexem() + ": RefType", Section.PARSER);
yyVal = pl;
}
break;
@ -1012,7 +1012,7 @@ 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", Section.PARSER);
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]);
}
@ -1023,7 +1023,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);
de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER '<' paralist '>' --> Paralist f�r " + ((Token)yyVals[-3+yyTop]).getLexem() + ": RefType", Section.PARSER);
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;
@ -1252,7 +1252,7 @@ case 71:
{
if (((Menge)yyVals[0+yyTop]) != null) {
/*$1.set_ParaList($2.get_ParaList());*/
((UsedId)yyVals[-1+yyTop]).set_ParaList(((Menge)yyVals[0+yyTop]));/*Änderung von Andreas Stadelmeier. Type statt GenericVarType*/
((UsedId)yyVals[-1+yyTop]).set_ParaList(((Menge)yyVals[0+yyTop]));/*Änderung von Andreas Stadelmeier. Type statt GenericVarType*/
/* otth: originale (also diese) Parameterliste retten */
/*((UsedId)$1).vParaOrg = new Menge<Type>( $2.get_ParaList() );*/
}
@ -1410,7 +1410,7 @@ case 91:
break;
case 92:
// line 863 "./../src/de/dhbwstuttgart/parser/JavaParser.jay"
{/*angefügt von Andreas Stadelmeier*/
{/*angefügt von Andreas Stadelmeier*/
((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop]));
((FieldDeclaration)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop]));
yyVal=((FieldDeclaration)yyVals[-1+yyTop]);
@ -1906,7 +1906,7 @@ case 153:
/* #JB# 10.04.2005 */
/* ########################################################### */
met.setLineNumber(((Token)yyVals[-2+yyTop]).getLineNumber());
met.setOffset(((Token)yyVals[-2+yyTop]).getOffset());/*hinzugef�gt hoth: 07.04.2006*/
met.setOffset(((Token)yyVals[-2+yyTop]).getOffset());/*hinzugef�gt hoth: 07.04.2006*/
/* ########################################################### */
DeclId DImethod = new DeclId();
DImethod.set_Name(((Token)yyVals[-2+yyTop]).getLexem());
@ -1921,7 +1921,7 @@ case 154:
/* #JB# 10.04.2005 */
/* ########################################################### */
met_para.setLineNumber(((Token)yyVals[-3+yyTop]).getLineNumber());
met_para.setOffset(((Token)yyVals[-3+yyTop]).getOffset());/*hinzugef�gt hoth: 07.04.2006*/
met_para.setOffset(((Token)yyVals[-3+yyTop]).getOffset());/*hinzugef�gt hoth: 07.04.2006*/
/* ########################################################### */
DeclId Dimet_para = new DeclId();
Dimet_para.set_Name(((Token)yyVals[-3+yyTop]).getLexem());
@ -1990,7 +1990,7 @@ case 161:
{
FormalParameter FP = new FormalParameter(((DeclId)yyVals[0+yyTop]));
FP.setType(((Type)yyVals[-1+yyTop]));
/*FP.set_DeclId($2); //auskommentiert von Andreas Stadelmeier. DeclId wird nun dem Konstruktor von FormalParameter übergeben.*/
/*FP.set_DeclId($2); //auskommentiert von Andreas Stadelmeier. DeclId wird nun dem Konstruktor von FormalParameter übergeben.*/
yyVal=FP;
}
break;
@ -2042,7 +2042,7 @@ case 166:
/* #JB# 10.04.2005 */
/* ########################################################### */
DI.setLineNumber(((Token)yyVals[0+yyTop]).getLineNumber());
DI.setOffset(((Token)yyVals[0+yyTop]).getOffset());/*hinzugef�gt hoth: 07.04.2006*/
DI.setOffset(((Token)yyVals[0+yyTop]).getOffset());/*hinzugef�gt hoth: 07.04.2006*/
/* ########################################################### */
DI.set_Name(((Token)yyVals[0+yyTop]).getLexem());
yyVal=DI;

View File

@ -16,7 +16,7 @@ public class Token
private int m_LineNumber;
// ino.end
// ino.attribute.m_Offset.24871.declaration
private int m_Offset;//hinzugefügt hoth: 14.04.2006
private int m_Offset;//hinzugefügt hoth: 14.04.2006
// ino.end
@ -54,7 +54,7 @@ public class Token
// ino.end
// ino.method.Token.24883.defdescription type=line
// hinzugefügt hoth: 14.04.2006
// hinzugefügt hoth: 14.04.2006
// ino.end
// ino.method.Token.24883.definition
Token (int tok, String s, int lineNumber, int charOffset)
@ -69,7 +69,7 @@ public class Token
// ino.end
// ino.method.Token.24886.defdescription type=line
// hinzugefügt hoth: 14.04.2006
// hinzugefügt hoth: 14.04.2006
// ino.end
// ino.method.Token.24886.definition
Token (int tok, char c, int lineNumber, int charOffset)

View File

@ -125,7 +125,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
// ino.attribute.containedTypes.23032.decldescription type=line
// PL 05-07-30 eingefuegt. Vektor aller Typdeklarationen, die in der Klasse
// vorkommen. Wird in der Studienarbeit von Andreas Stadelmeier nur für Verifizierung der Tests eingesetzt.
// vorkommen. Wird in der Studienarbeit von Andreas Stadelmeier nur für Verifizierung der Tests eingesetzt.
// ino.end
// ino.attribute.containedTypes.23032.declaration
private Menge<Type> containedTypes = new Menge<Type>();
@ -134,7 +134,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
private Menge<UsedId> usedIdsToCheck = new Menge<UsedId>();
// ino.end
private TypeAssumptions typeAssumptions = null;//muss mit null Initialisiert werden. Darf nur über getTypeAssumptions abgerufen werden.
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");
@ -157,14 +157,14 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
superclassid=null;
}
this.offset = offset;
if(!name.equals("Object"))//Alle Klassen außer Object erben von Object:
if(!name.equals("Object"))//Alle Klassen außer Object erben von Object:
this.superClass = new Class("Object", -1).getType();
}
// ino.end
/**
* Erstellt eine Klasse, welche nur für die Assumptions verwendet wird.
* Sie enthält keine unnötigen Informationen, wie Offset oder ClassBody.
* 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
@ -285,8 +285,8 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
/**
* @author Andreas Stadelmeier, a10023
* Fügt der Klasse eine Feld hinzu.
* Prüft dabei, ob es sich um einen Constructor handelt und wandelt diesen direkt um.
* Fügt der Klasse eine Feld hinzu.
* Prüft dabei, ob es sich um einen Constructor handelt und wandelt diesen direkt um.
* @param feld
*/
public void addField(Field i)
@ -328,7 +328,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
// ino.method.complete_paralist.23062.body
{
//Diese Funktion vervollt�ndigt die Parameterliste ¿½r vererbte Klassen
//Diese Funktion vervollt�ndigt die Parameterliste ¯Â¿Â½r vererbte Klassen
Menge<Type> child = paralist;
paralist = (Menge<Type>)superclassid.get_ParaList();
@ -344,7 +344,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
/**
* Generiert die ClassFile für diese Klasse.
* Generiert die ClassFile für diese Klasse.
* @param typeinferenceResult - Das ResultSet einer Typinferierung oder null, falls alle Typen eindeutig feststehen.
* @return
* @throws JVMCodeException
@ -371,7 +371,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
// pkgName = sf.getPackageName().get_codegen_UsedId() + "/";
//}
//geändert von Andreas Stadelmeier: pkgName wird nicht mehr aus dem SourceFile ausgelesen:
//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(), superClass, getAccessFlags());
@ -409,36 +409,36 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
// ino.end
/**
* Setzt den ClassBody dieser Klasse. Wird zum Parsen benötigt.
* Der ClassBody enthält mtliche Felder dieser Klasse.
* Mit dem Aufruf dieser Methode werden alle Felder des ClassBody in diese Class übertragen.
* (Nur einmal während des Parsens aufrufen!)
* Setzt den ClassBody dieser Klasse. Wird zum Parsen benÃtigt.
* Der ClassBody enthält ¤mtliche Felder dieser Klasse.
* Mit dem Aufruf dieser Methode werden alle Felder des ClassBody in diese Class übertragen.
* (Nur einmal während des Parsens aufrufen!)
*/
public void set_ClassBody(ClassBody body)
{
Menge<Field> tempFields=body.getFields();
for(Field f : this.getFields()){
if(f instanceof Method){ //Wenn es sich um eine Methode handelt ist eine zusätzliche Prüfung erfoderlich: (Ist es ein Konstruktor?)
if(f instanceof Method){ //Wenn es sich um eine Methode handelt ist eine zusätzliche Prüfung erfoderlich: (Ist es ein Konstruktor?)
Method m = (Method)f;
/*
* Ermitteln ob es sich bei der Methode um einen Konstruktor handelt:
* (Parser kann nicht zwischen Methode und Konstruktor unterscheiden.
* Denn für einen Konstruktor gelten besondere Regeln:
* Denn für einen Konstruktor gelten besondere Regeln:
* -Typ des Blocks eines Konstruktor ist void (kein Return-Statement)
* -Rückgabetyp der Methode/Konstruktors ist der Typ der Klasse
* -Rückgabetyp der Methode/Konstruktors ist der Typ der Klasse
* -Ein Konstruktor kann nicht aufgerufen werden (nur mit new)
*/
if(m.get_Method_Name().equals("<init>"))throw new TypeinferenceException("<init> ist kein gültiger Methodenname", m);
if(m.get_Method_Name().equals("<init>"))throw new TypeinferenceException("<init> ist kein gültiger Methodenname", m);
if((m.get_Method_Name().equals(this.getName()))) {
Constructor constructor = new Constructor(m);
tempFields.add(constructor); //Den Konstruktor anstatt der Methode anfügen
tempFields.add(constructor); //Den Konstruktor anstatt der Methode anfügen
}else{
//Handelt es sich um keinen Konstruktor, dann die Methode unverändert den Feldern hinzufügen:
//Handelt es sich um keinen Konstruktor, dann die Methode unverändert den Feldern hinzufügen:
tempFields.add(m);
}
}else{
tempFields.add(f); //Ansonsten das Feld anfügen...
tempFields.add(f); //Ansonsten das Feld anfügen...
}
}
@ -640,14 +640,14 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
/////////////////////////////////////////////////////////////////////////
// ino.method.TRProg.23110.defdescription type=javadoc
/**
* Ausgangspunkt f�r den Typrekonstruktionsalgorithmus. Hier werden zun�chst
* Ausgangspunkt f�r den Typrekonstruktionsalgorithmus. Hier werden zun�chst
* die Mengen von Typannahmen V_fields_methods und V_i erstellt, die als Eingabe
* f�r den Algorithmus dienen.<br/>
* (siehe Algorithmus 5.17 TRProg, Martin Pl�micke)
* <br/>Author: J�rg ¿½uerle
* f�r den Algorithmus dienen.<br/>
* (siehe Algorithmus 5.17 TRProg, Martin Pl�micke)
* <br/>Author: J�rg ¯Â¿Â½uerle
* @param supportData
* @param globalAssumptions
* @return Liste aller bisher berechneten, m�glichen Typkombinationen
* @return Liste aller bisher berechneten, m�glichen Typkombinationen
* @throws CTypeReconstructionException
*/
// ino.end
@ -671,16 +671,16 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
//////////////////////////////
//Erzeuge Assumptions:
TypeAssumptions assumptions = this.getPrivateFieldAssumptions();
//Globale Assumptions anfügen:
//Globale Assumptions anfügen:
assumptions.add(globalAssumptions);
ConstraintsSet oderConstraints = new ConstraintsSet();
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
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.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
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, Section.TYPEINFERENCE);
@ -709,7 +709,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
/*
CReconstructionTupleSet retTupleSet = this.TRStart(methodList, V, V_fields_methods, supportData);
inferencelog.debug("Bin aus TRStart() zur�ck in TRProg().");
inferencelog.debug("Bin aus TRStart() zur�ck in TRProg().");
//////////////////////////////
// Neu Ergebnismenge A aller
// Typannahmen erzeugen:
@ -717,12 +717,12 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
inferencelog.debug("Erstelle Ergebnismenge...");
Menge<CTypeReconstructionResult> newA = new Menge<CTypeReconstructionResult>();
// Alle bisherigen M�glichkeiten an Typkombinationen durchgehen:
// Alle bisherigen M�glichkeiten an Typkombinationen durchgehen:
Menge<CTypeReconstructionResult> oldA = supportData.getA();
for(int i=0; i<oldA.size(); i++){
CTypeReconstructionResult oneReconResult = oldA.elementAt(i);
// Und mit den neuen m�glichen Typkombinationen vereinigen:
// Und mit den neuen m�glichen Typkombinationen vereinigen:
Iterator<CReconstructionTuple> retTupleIt = retTupleSet.getIterator();
while(retTupleIt.hasNext()){
CReconstructionTuple possibleTuple = retTupleIt.next();
@ -745,7 +745,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
}
newReconResult.addGenericTypeVars(this.getName(), genericsList);
//Hinzuf�gen:
//Hinzuf�gen:
newA.addElement(newReconResult);
}
}
@ -761,7 +761,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
if(this.methodList != null) return this.methodList;
//TODO: Unnötige Berechnungen im folgenden Code rauskürzen:
//TODO: UnnÃtige Berechnungen im folgenden Code rauskürzen:
//////////////////////////////
// Die Eingabedaten bauen:
//////////////////////////////
@ -774,7 +774,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
//////////////////////////////
// Alle Felder durchgehen:
// Zuerst alle Attribute, dann Methoden
// ge�ndert: hoth 06.04.2006
// ge�ndert: hoth 06.04.2006
//////////////////////////////
for(Field field : this.getFields())
@ -813,7 +813,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
methodList.addElement(method);
// F�r V_fields_methods:
// F�r V_fields_methods:
CMethodTypeAssumption methodAssum = new CMethodTypeAssumption(this.getType(), method.get_Method_Name(), method.getReturnType(), method.getParameterCount(),method.getLineNumber(),method.getOffset(),new Menge<Integer>(),method.getGenericMethodParameters()); // Typannahme bauen...
@ -826,7 +826,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
method.setOverloadedID(methodAssum.getHashSetKey().getOverloadedMethodID());
// F�r die V_i:
// F�r die V_i:
CTypeAssumptionSet localAssum = new CTypeAssumptionSet();
// Bauen...
@ -834,7 +834,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
if(parameterList!=null){
for(int i=0; i<parameterList.sc_get_Formalparalist().size(); i++){
FormalParameter para = parameterList.sc_get_Formalparalist().elementAt(i);
// F�r V_fields_methods:
// F�r V_fields_methods:
CParaTypeAssumption paraAssum = new CParaTypeAssumption(this.getName(), method.get_Method_Name(), method.getParameterCount(), method.getOverloadedID(),para.getIdentifier(), para.getType(), para.getLineNumber(),para.getOffset(),new Menge<Integer>());
//fuege Offsets fuer Parameter hinzu, hoth: 06.04.2006
Class.isFirstLocalVarDecl=false;
@ -847,13 +847,13 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
// F�r die V_i:
// F�r die V_i:
CLocalVarTypeAssumption varAssum = new CLocalVarTypeAssumption(this.getName(), method.get_Method_Name(), method.getParameterCount(), method.getOverloadedID(),"1", para.getIdentifier(),para.getType(), para.getLineNumber(),para.getOffset(),new Menge<Integer>());
localAssum.addElement(varAssum);
rememberLocals.addElement(varAssum);
}
}
// ...und hinzuf�gen:
// ...und hinzuf�gen:
V.addElement(localAssum);
}
@ -866,15 +866,15 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
*/
/**
* Ermittelt alle privaten Felder und Methoden der Klasse und Erstellt eine Assumption für diese.
* Bemerkung: Momentan werden noch alle Felder dieser Klasse zurückgegeben.
* Ermittelt alle privaten Felder und Methoden der Klasse und Erstellt eine Assumption für diese.
* Bemerkung: Momentan werden noch alle Felder dieser Klasse zurückgegeben.
* @return Die erstellten TypeAssumptions
*/
private TypeAssumptions getPrivateFieldAssumptions() {
if(this.typeAssumptions != null)return this.typeAssumptions; //Das sorgt dafür, dass die Assumptions nur einmalig generiert werden.
if(this.typeAssumptions != null)return this.typeAssumptions; //Das sorgt dafür, dass die Assumptions nur einmalig generiert werden.
TypeAssumptions assumptions = new TypeAssumptions(this.getName());
//this.getMethodList(); //Diese Funktion muss zuerst ausgeführt werden.
//Assumption für this, also die aktuelle Klasse: (ist nicht mehr nötig, da jedes AssumptionSet einer Klasse (dem namen einer Klasse) zugewiesen ist.
//this.getMethodList(); //Diese Funktion muss zuerst ausgeführt werden.
//Assumption für this, also die aktuelle Klasse: (ist nicht mehr nÃtig, da jedes AssumptionSet einer Klasse (dem namen einer Klasse) zugewiesen ist.
//CLocalVarTypeAssumption thisAssumption = new CLocalVarTypeAssumption(this.name, name, 0, 0, name, "this", new RefType(name,0), 0, 0, null);
//assumptions.setThisV(thisAssumption);
@ -882,20 +882,20 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
if(!field.isPublic())assumptions.add(field.createTypeAssumptions(this));
}
//Eine Assumption für den Standardkonstruktor:
// (Ein Standardkonstruktor wird immer angefügt, da es momentan keine statischen Klassen gibt)
//auskommentiert, da der Standardkonstruktor beim Parser-Postprocessing angefügt wird.
//if(assumptions.getMethodAssumptions(this.getName(), "<init>").size()==0){ //Falls kein Konstruktor für diese Klasse definiert wurde:
//Eine Assumption für den Standardkonstruktor:
// (Ein Standardkonstruktor wird immer angefügt, da es momentan keine statischen Klassen gibt)
//auskommentiert, da der Standardkonstruktor beim Parser-Postprocessing angefügt wird.
//if(assumptions.getMethodAssumptions(this.getName(), "<init>").size()==0){ //Falls kein Konstruktor für diese Klasse definiert wurde:
// assumptions.addMethodAssumption(new RefType(this.getName(),0), "<init>", new RefType(this.getName(),0), new Menge<CParaTypeAssumption>());
//}
this.typeAssumptions = assumptions; //Diese müssen anschließend nicht wieder generiert werden.
this.typeAssumptions = assumptions; //Diese müssen anschließend nicht wieder generiert werden.
return assumptions;
}
/*
public ConstraintsSet TYPE(Menge<Method> methodList, Menge<Expr> fielddeclarationList, TypeAssumptions assumptions){
ConstraintsSet ret = new ConstraintsSet();
// Die Felddeklarationen werden zu den Assumptions hinzugefügt und gelten danach r jede Methode.
// Die Felddeklarationen werden zu den Assumptions hinzugefügt und gelten danach ¼r jede Methode.
//TypeAssumptions assumptionsPlusFieldAssumptions = new TypeAssumptions(assumptions);
for(Expr expr : fielddeclarationList){
//ret.add(expr.TYPEStmt(assumptionsPlusFieldAssumptions));
@ -912,9 +912,9 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
// ino.method.RetType.23119.defdescription type=javadoc
/**
* Liefert den berechneten R�ckgabetyp ¿½r die �bergebene Methode zur�ck.<br/>
* (siehe Algorithmus RetType, Martin Pl�micke)
* <br/>Author: J�rg ¿½uerle
* Liefert den berechneten R�ckgabetyp ¯Â¿Â½r die �bergebene Methode zur�ck.<br/>
* (siehe Algorithmus RetType, Martin Pl�micke)
* <br/>Author: J�rg ¯Â¿Â½uerle
* @param me
* @param V
* @return
@ -936,7 +936,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
*/
// ino.method.toString.23125.defdescription type=javadoc
/**
* <br/>Author: Martin Pl�micke
* <br/>Author: Martin Pl�micke
* @return
*/
// ino.end
@ -954,7 +954,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
// ino.method.wandleRefTypeAttributes2GenericAttributes.23128.defdescription type=javadoc
/**
* Alle Methoden der Klassen überprüfen, ob sie als
* Alle Methoden der Klassen überprüfen, ob sie als
* RefType deklarierte Attribute haben, die aber GenericTypeVars sind
* und ggf. ersetzen
*
@ -1043,7 +1043,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
/**
* Generiert den JavaCode dieser Klasse im Falle für das übergebene resultSet.
* Generiert den JavaCode dieser Klasse im Falle für das übergebene resultSet.
* Dem ResultSet entsprechend werden in diesem Java-Code die TypePlaceholder durch die in ResultSet stehenden Typen ersetzt.
* @return Java-Sourcefile
*/
@ -1073,7 +1073,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
classBodyCode.attach(bodyString);
//Zuerst die generischen Parameter für diese Klasse berechnen:
//Zuerst die generischen Parameter für diese Klasse berechnen:
//this.createGenericTypeVars(classBodyCode.getUnresolvedTPH());
if(this.genericClassParameters != null && this.genericClassParameters.size()>0){
@ -1094,9 +1094,9 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
}
/**
* Errechnet die Generischen Parameter der Klasse für diese Klasse.
* Die berechneten Variablen werden anschließend in die this.genericTypeVars eingesetzt. Dabei werden alte genericTypeVars überschrieben.
* @param tphs : Alle übriggebliebenen TypePLaceholder
* Errechnet die Generischen Parameter der Klasse für diese Klasse.
* Die berechneten Variablen werden anschließend in die this.genericTypeVars eingesetzt. Dabei werden alte genericTypeVars überschrieben.
* @param tphs : Alle übriggebliebenen TypePLaceholder
private void createGenericTypeVars(Menge<TypePlaceholder> tphs){
this.genericClassParameters = new GenericDeclarationList(new Menge<GenericTypeVar>());
@ -1107,8 +1107,8 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
}
*/
/**
* Errechnet die Generischen Parameter der Klasse für diese Klasse.
* Die berechneten Variablen werden anschließend in die this.genericTypeVars eingesetzt. Dabei werden alte genericTypeVars überschrieben.
* Errechnet die Generischen Parameter der Klasse für diese Klasse.
* Die berechneten Variablen werden anschließend in die this.genericTypeVars eingesetzt. Dabei werden alte genericTypeVars überschrieben.
* @param reconstructionResult
public void createGenericTypeVars(TypeinferenceResultSet reconstructionResult){
@ -1193,7 +1193,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
}
this.fielddecl = tempFields;
//Prüfen ob ein Konstruktor vorhanden ist:
//Prüfen ob ein Konstruktor vorhanden ist:
boolean constructorVorhanden = false;
for(Field f : this.getFields()){
if(f instanceof Constructor){
@ -1201,7 +1201,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
break;
}
}
if(!constructorVorhanden){//Falls kein Konstruktor vorhanden ist, muss noch der Standardkonstruktor angefügt werden:
if(!constructorVorhanden){//Falls kein Konstruktor vorhanden ist, muss noch der Standardkonstruktor angefügt werden:
Constructor standardKonstruktor = new Constructor(Method.createEmptyMethod(this.getName().toString(), this));
this.addField(standardKonstruktor);
}
@ -1289,7 +1289,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
@Override
public int getGenericVarDeclarationOffset(){
// Falls Generische Parameterliste vorhanden, hier Wert der Liste zurückgegebn
// Falls Generische Parameterliste vorhanden, hier Wert der Liste zurückgegebn
if(this.genericClassParameters != null){
return this.genericClassParameters.getEndOffset();
}else{
@ -1299,7 +1299,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
/**
* Die Super Klasse dieser Klasse.
* @return null für Klasse Object
* @return null für Klasse Object
*/
public Type getSuperClass(){
return this.superClass;

View File

@ -10,11 +10,6 @@ import de.dhbwstuttgart.logger.Logger;
// ino.end
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.myexception.JVMCodeException;
import de.dhbwstuttgart.myexception.SCClassBodyException;
import de.dhbwstuttgart.myexception.SCExcept;
@ -72,27 +67,6 @@ Paratyp gesetzt."); }
*/
// ino.end
// ino.method.codegen.23176.definition
public void codegen(ClassFile classfile, Menge paralist)
throws JVMCodeException
// ino.end
// ino.method.codegen.23176.body
{
for(int i=0 ; i < fielddecl.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);
}
}
}
// ino.end
@ -103,7 +77,7 @@ Paratyp gesetzt."); }
/**
* @author Andreas Stadelmeier, a10023
* Fügt der Klasse eine Feld hinzu.
* Fügt der Klasse eine Feld hinzu.
* @param feld
*/
public void addField(Field i)
@ -305,7 +279,7 @@ public void istParameterOK( Menge Parameter, Menge<Class> 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.", Section.OLD );
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
@ -332,7 +306,7 @@ public void istParameterOK( Menge Parameter, Menge<Class> KlassenVektor )
}
else
{
// Tylose Variablen d�rfen nicht deklariert sein
// Tylose Variablen d�rfen nicht deklariert sein
for( int k = 0; k < KlassenVektor.size(); k++)
{
if( KlassenVektor.elementAt(k).getName().equals(TempParameter.getName()) )
@ -350,7 +324,7 @@ public void istParameterOK( Menge Parameter, Menge<Class> KlassenVektor )
// ino.method.toString.23203.defdescription type=javadoc
/**
* <br/>Author: Martin Pl�micke
* <br/>Author: Martin Pl�micke
* @return
*/
// ino.end

View File

@ -18,8 +18,8 @@ public class ClassHelper
/**
* HOTI
* Diese Methode sucht in der Klassendefinition nach einen GTV, die
* so heißt wie die im RefType definierte Variable. Wenn sie diese gefunden
* hat, wird sie zurückgeben. Wenn dies nicht der Fall war, schaut sie, falls
* so heißt wie die im RefType definierte Variable. Wenn sie diese gefunden
* hat, wird sie zurückgeben. Wenn dies nicht der Fall war, schaut sie, falls
* angegeben in den Methodenparametern nach. Findet sie dort auch nichts, liefert
* die Methode <b>null</b>.
* @param type

View File

@ -4,10 +4,6 @@ package de.dhbwstuttgart.syntaxtree;
// ino.module.Constant.8556.import
import de.dhbwstuttgart.typeinference.Menge;
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.parser.JavaClassName;
@ -18,7 +14,7 @@ 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 de.dhbwstuttgart.typeinference.exceptions.NotImplementedException;
// ino.class.Constant.23212.description type=javadoc
/**
@ -159,32 +155,7 @@ public class Constant extends Method
this.mod = modifiers;
}
// ino.end
// ino.method.codegen.23258.definition
public void codegen(ClassFile classfile, Menge paralist)
throws JVMCodeException
// ino.end
// ino.method.codegen.23258.body
{
// Zugehoerigen Typ (I, Z, C, Ljava/lang/String;) fuer den Typ ermitteln
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!");
}
// Attribut fuer Wertzuweisung erstellen
short index = (short) ((Literal)getValue()).ConstantCodegen(classfile);
AttributeInfo attrinfo = new AttributeInfo();
attrinfo.set_attribute_name_index(classfile.getConstantValueID());
attrinfo.set_info(JVMCode.shortToBytes(index));
// Field hinzufuegen
classfile.add_field(name, bcgType, mod.calculate_access_flags(), attrinfo);
}
// ino.end
// ino.method.getOffset.23261.definition
public int getOffset()

View File

@ -2,7 +2,6 @@ package de.dhbwstuttgart.syntaxtree;
import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.myexception.JVMCodeException;
import de.dhbwstuttgart.parser.JavaClassName;
import de.dhbwstuttgart.syntaxtree.misc.DeclId;

View File

@ -2,7 +2,6 @@ package de.dhbwstuttgart.syntaxtree;
import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.myexception.JVMCodeException;
import de.dhbwstuttgart.syntaxtree.misc.DeclId;
import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar;
@ -50,8 +49,6 @@ public abstract class Field extends GTVDeclarationContext implements TypeInserta
return typ;
}
public abstract void codegen(ClassFile classfile, Menge paralist)
throws JVMCodeException;
@Override
public Menge<GenericTypeVar> getGenericParameter() {
@ -79,7 +76,7 @@ public abstract class Field extends GTVDeclarationContext implements TypeInserta
public Menge<DeclId> getDeclIdMenge()
{
// otth: ganzer Vektor zur�ckgeben, um ihn zu kopieren (vgl. MyCompiler - Konstruktor in Methode umwandeln)
// otth: ganzer Vektor zur�ckgeben, um ihn zu kopieren (vgl. MyCompiler - Konstruktor in Methode umwandeln)
return declid;
}
@ -95,7 +92,7 @@ public abstract class Field extends GTVDeclarationContext implements TypeInserta
public abstract JavaCodeResult printJavaCode(ResultSet resultSet);
/**
* Diese Methode generiert die Assumptions für dieses Feld der Klasse classmember
* Diese Methode generiert die Assumptions für dieses Feld der Klasse classmember
* @param classmember
* @return
*/
@ -150,7 +147,7 @@ public abstract class Field extends GTVDeclarationContext implements TypeInserta
@Override
public int getGenericVarDeclarationOffset(){
// Falls Generische Parameterliste vorhanden, hier Wert der Liste zurückgegebn
// Falls Generische Parameterliste vorhanden, hier Wert der Liste zurückgegebn
if(this.genericParameters != null){
return this.genericParameters.getEndOffset();
}else{

View File

@ -2,7 +2,6 @@ package de.dhbwstuttgart.syntaxtree;
import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.myexception.JVMCodeException;
import de.dhbwstuttgart.syntaxtree.misc.DeclId;
import de.dhbwstuttgart.syntaxtree.statement.Expr;
@ -21,7 +20,7 @@ import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions;
import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException;
/**
* Eine Feldinitialisation steht für eine Felddeklaration mit gleichzeitiger Wertzuweisung
* Eine Feldinitialisation steht für eine Felddeklaration mit gleichzeitiger Wertzuweisung
* Beispiel: 'public Feld FeldVar = FeldWert;'
* @author janulrich
*
@ -33,8 +32,8 @@ public class FieldDeclaration extends Field{
//private Menge<GenericTypeVar> parameter;
/**
* Dieser Konstruktor der FieldDeclaration erstellt den Syntaxknoten vollständig.
* Kein nachträgliches hinzfügen von Informationen oder aufrufen von parserPostProcessing ist notwendig.
* Dieser Konstruktor der FieldDeclaration erstellt den Syntaxknoten vollständig.
* Kein nachträgliches hinzfügen von Informationen oder aufrufen von parserPostProcessing ist notwendig.
*/
public FieldDeclaration(String name, Type typ){
super(0);//Dieser Deklarator wird nicht vom Parser aufgerufen. Dadurch gibt es auch keinen Offset
@ -57,12 +56,6 @@ public class FieldDeclaration extends Field{
return this.get_Name().elementAt(0).name;
}
@Override
public void codegen(ClassFile classfile, Menge paralist)
throws JVMCodeException {
// TODO Auto-generated method stub
}
@Override
public String toString()
@ -88,7 +81,7 @@ public class FieldDeclaration extends Field{
//////////////////////////////
TypeAssumptions assumptions = new TypeAssumptions();
/*
* Der Feld-Assumption muss ein TPH als Typ hinzugefügt werden, falls er Typlos initialisiert wurde. Dies kann auch der Type-Algorithmus der Inst/FieldVar - Klasse machen.
* Der Feld-Assumption muss ein TPH als Typ hinzugefügt werden, falls er Typlos initialisiert wurde. Dies kann auch der Type-Algorithmus der Inst/FieldVar - Klasse machen.
* Wird das Feld mit einem Typ initialisiert so muss dieser auch in die Assumptions.
*/
if(this.getType() == null)throw new TypeinferenceException("Der Typ eines Feldes darf nicht null sein", this);
@ -117,7 +110,7 @@ public class FieldDeclaration extends Field{
@Override
public ConstraintsSet TYPE(TypeAssumptions publicAssumptions) {
if(this.wert == null && (this.getType() == null || this.getType() instanceof TypePlaceholder))
throw new TypeinferenceException("Typlose Felder müssen mit Wert initialisiert werden", this);
throw new TypeinferenceException("Typlose Felder müssen mit Wert initialisiert werden", this);
ConstraintsSet ret = new ConstraintsSet();
TypeAssumptions localAssumptions = publicAssumptions.clone();
@ -151,7 +144,7 @@ public class FieldDeclaration extends Field{
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:
//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().TYPE(localAssumptions,this), thisType));
}
@ -161,7 +154,7 @@ public class FieldDeclaration extends Field{
@Override
public void wandleRefTypeAttributes2GenericAttributes(Menge<Type> paralist){
super.wandleRefTypeAttributes2GenericAttributes(paralist);
if(this.getWert()!=null)this.getWert().wandleRefTypeAttributes2GenericAttributes(paralist, new Menge<GenericTypeVar>()); //FieldDeclaration hat keine Generischen Variablen, daher leere Liste übergeben
if(this.getWert()!=null)this.getWert().wandleRefTypeAttributes2GenericAttributes(paralist, new Menge<GenericTypeVar>()); //FieldDeclaration hat keine Generischen Variablen, daher leere Liste übergeben
}
}

View File

@ -7,8 +7,6 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.logger.Logger;
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;
@ -43,7 +41,7 @@ public class FormalParameter extends SyntaxTreeNode implements Typeable, TypeIns
@Override
public boolean equals(Object object) {
//if(!super.equals(object))return false; //Nicht die Position im SyntaxBaum prüfen.
//if(!super.equals(object))return false; //Nicht die Position im SyntaxBaum prüfen.
if(!(object instanceof FormalParameter))return false;
FormalParameter equals = (FormalParameter)object;
if((this.type==null)!=(equals.type == null))return false;
@ -56,7 +54,7 @@ public class FormalParameter extends SyntaxTreeNode implements Typeable, TypeIns
// ino.method.setType.23404.defdescription type=javadoc
/**
* <br/>Author: J�rg ¿½uerle
* <br/>Author: J�rg ¯Â¿Â½uerle
* @param t
*/
// ino.end
@ -115,16 +113,6 @@ public class FormalParameter extends SyntaxTreeNode implements Typeable, TypeIns
// ino.end
// ino.method.codegen.23419.definition
public void codegen(ClassFile classfile, CodeAttribute code)
// ino.end
// ino.method.codegen.23419.body
{
code.add_local(declid.get_Name(), this.getType());
}
// ino.end
// ino.method.getOffset.23422.defdescription type=javadoc
/**
* <br/>Author: Thomas Hornberger 09.04.2006
@ -142,7 +130,7 @@ public class FormalParameter extends SyntaxTreeNode implements Typeable, TypeIns
// ino.method.getLineNumber.23425.defdescription type=javadoc
/**
* <br/>Author: J�rg ¿½uerle
* <br/>Author: J�rg ¯Â¿Â½uerle
* @return
*/
// ino.end
@ -158,7 +146,7 @@ public class FormalParameter extends SyntaxTreeNode implements Typeable, TypeIns
// ino.method.getTypeLineNumber.23431.defdescription type=javadoc
/**
* <br>Author: J�rg ¿½uerle
* <br>Author: J�rg ¯Â¿Â½uerle
* @return
*/
// ino.end

View File

@ -6,7 +6,7 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar;
/**
* Wird von allen Klassen implementiert, welche generische Parameter halten können. (Class, Method und Field)
* Wird von allen Klassen implementiert, welche generische Parameter halten kÃnnen. (Class, Method und Field)
* @author janulrich
*
*/

View File

@ -14,7 +14,7 @@ import de.dhbwstuttgart.syntaxtree.misc.UsedId;
* HOTI 4.5.06
* Auch wenn es nicht so aussieht, hat diese Klasse einen Sinn :-)
* Der Parser kann keine Generischen Typen darstellen, damit trotzdem
* an amap Stellen die Typsicherheit gewährleistet ist, hier eine Kapselung...
* an amap Stellen die Typsicherheit gewährleistet ist, hier eine Kapselung...
*/
// ino.end
// ino.class.ImportDeclarations.23434.declaration

View File

@ -5,7 +5,6 @@ package de.dhbwstuttgart.syntaxtree;
// ino.module.Interface.8582.import
import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.core.AClassOrInterface;
import de.dhbwstuttgart.myexception.JVMCodeException;
import de.dhbwstuttgart.syntaxtree.misc.UsedId;

View File

@ -5,7 +5,6 @@ package de.dhbwstuttgart.syntaxtree;
// ino.module.InterfaceBody.8583.import
import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.myexception.JVMCodeException;
import de.dhbwstuttgart.syntaxtree.modifier.Modifiers;
@ -98,43 +97,6 @@ public class InterfaceBody
}
// ino.end
// ino.method.codegen.24011.definition
public void codegen(ClassFile cf, Menge paralist)
throws JVMCodeException
// ino.end
// ino.method.codegen.24011.body
{
// Constanten verarbeiten
for (int i=0; i < ConstantVektor.size(); i++) {
ConstantVektor.elementAt(i).codegen(cf, paralist);
}
// Methodenheader verarbeiten
for (int i=0; i < MethodVektor.size(); i++) {
Method m = MethodVektor.elementAt(i);
Modifiers mod = m.getDeclIdMenge().elementAt(0).get_Modifiers();
if (mod != null){
mod.ensureAbstract();
mod.ensurePublic();
} else {
mod = new Modifiers();
mod.ensureAbstract();
mod.ensurePublic();
m.getDeclIdMenge().elementAt(0).set_Modifiers(mod);
}
// Sicherstellen, dass kein Bytecode innerhalb
// der Methode generiert wird.
m.setAbstract(true);
m.codegen(cf, paralist);
}
}
// ino.end
}
// ino.end

View File

@ -9,7 +9,6 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.core.IItemWithOffset;
import de.dhbwstuttgart.core.MyCompiler;
import de.dhbwstuttgart.myexception.JVMCodeException;
@ -86,7 +85,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable
// ino.attribute.m_LineNumber.23512.declaration
private int m_LineNumber = MyCompiler.NO_LINENUMBER;
// ino.end
private int m_Offset = -1; //hinzugef�gt hoth: 07.04.2006
private int m_Offset = -1; //hinzugef�gt hoth: 07.04.2006
// ino.attribute.inferencelog.23515.declaration
protected static Logger inferencelog = Logger.getLogger("inference");
// ino.end
@ -311,33 +310,6 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable
// ino.method.get_codegen_Param_Type.23572.definition
public String get_codegen_Param_Type(Menge paralist)
// ino.end
// ino.method.get_codegen_Param_Type.23572.body
{
String ret = new String();
if(this.getParameterList() == null)
{
ret += "()";
}
else
{
ret += this.getParameterList().get_codegen_ParameterList(paralist);
}
if(this.getType() == null)
{
ret += "V";
}
else
{
ret += this.getType().get_codegen_Type(paralist);
}
return ret;
}
// ino.end
// ino.method.get_Method_Name.23575.definition
public String get_Method_Name()
@ -359,16 +331,6 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable
// ino.end
// ino.method.codegen.23581.definition
public void codegen(ClassFile classfile, Menge paralist)
throws JVMCodeException
// ino.end
// ino.method.codegen.23581.body
{
classfile.add_method(declid.firstElement().get_Name(), this.get_codegen_Param_Type(paralist), this.getParameterList(), this.getType(), block, declid.firstElement().get_access_flags(), paralist, isAbstract);
}
// ino.end
// ino.method.getLineNumber.23584.definition
public int getLineNumber()
@ -389,7 +351,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable
// ino.end
// ino.method.getOffset.23590.defdescription type=line
// hinzugef�gt hoth: 07.04.2006
// hinzugef�gt hoth: 07.04.2006
// ino.end
// ino.method.getOffset.23590.definition
public int getOffset()
@ -410,7 +372,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable
// ino.end
// ino.method.setOffset.23596.defdescription type=line
// hinzugef�gt hoth: 07.04.2006
// hinzugef�gt hoth: 07.04.2006
// ino.end
// ino.method.setOffset.23596.definition
public void setOffset(int Offset)
@ -439,7 +401,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable
// ino.method.toString.23605.defdescription type=javadoc
/**
* <br/>Author: Martin Pl�micke
* <br/>Author: Martin Pl�micke
* @return
*/
// ino.end
@ -529,8 +491,8 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable
public ConstraintsSet TYPE(TypeAssumptions ass) {
ConstraintsSet ret = new ConstraintsSet();
TypeAssumptions localAss = new TypeAssumptions();
localAss.add(ass); //Die globalen Assumptions anhängen
//Generische Parameterdeklarationen den Assumptions anfügen:
localAss.add(ass); //Die globalen Assumptions anhängen
//Generische Parameterdeklarationen den Assumptions anfügen:
for(GenericTypeVar gtv : this.getGenericParameter()){
localAss.add(gtv.createAssumptions());
}
@ -549,7 +511,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable
this.returntype = replaceType;
}
*/
//Die Parameter zu den Assumptions hinzufügen:
//Die Parameter zu den Assumptions hinzufügen:
if(this.parameterlist!=null)for(FormalParameter param : this.parameterlist){
param.setType(param.getType().checkTYPE(localAss, this));
@ -567,7 +529,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable
localAss.addAssumption(new ParameterAssumption(param));
}
ret.add(this.block.TYPEStmt(localAss));
//eine Verknüpfung mit der Type Assumption aus dem Assumption Set und dem ermittelten Typ der Methode:
//eine Verknüpfung mit der Type Assumption aus dem Assumption Set und dem ermittelten Typ der Methode:
ret.add(new SingleConstraint(this.block.getType().TYPE(localAss, this), this.returntype.TYPE(localAss, this)));
return ret;
}
@ -629,7 +591,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable
//methodList.addElement(method);
//F�r V_fields_methods:
//F�r V_fields_methods:
CMethodTypeAssumption methodAssum = new CMethodTypeAssumption(classmember.getType(), this.get_Method_Name(), this.getType(), this.getParameterCount(),this.getLineNumber(),this.getOffset(),new Menge<Integer>(),this.getGenericMethodParameters()); // Typannahme bauen...
@ -642,7 +604,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable
this.setOverloadedID(methodAssum.getHashSetKey().getOverloadedMethodID());
//F�r die V_i:
//F�r die V_i:
CTypeAssumptionSet localAssum = new CTypeAssumptionSet();
//Bauen...
@ -650,7 +612,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable
if(parameterList!=null){
for(int i=0; i<parameterList.sc_get_Formalparalist().size(); i++){
FormalParameter para = parameterList.sc_get_Formalparalist().elementAt(i);
// F�r V_fields_methods:
// F�r V_fields_methods:
CParaTypeAssumption paraAssum = new CParaTypeAssumption(classmember.getName(), this.get_Method_Name(), this.getParameterCount(), this.getOverloadedID(),para.get_Name(), para.getType(), para.getLineNumber(),para.getOffset(),new Menge<Integer>());
//fuege Offsets fuer Parameter hinzu, hoth: 06.04.2006
Class.isFirstLocalVarDecl=false;
@ -660,15 +622,15 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable
methodAssum.addParaAssumption(paraAssum);
// F�r die V_i:
// F�r die V_i:
CLocalVarTypeAssumption varAssum = new CLocalVarTypeAssumption(classmember.getName(), this.get_Method_Name(), this.getParameterCount(), this.getOverloadedID(),"1", para.get_Name(),para.getType(), para.getLineNumber(),para.getOffset(),new Menge<Integer>());
localAssum.addElement(varAssum);
//rememberLocals.addElement(varAssum);
}
}
//...und hinzuf�gen:
//...und hinzuf�gen:
assumptions.add(localAssum);//Assumptions für lokale Variablen den Assumptions hinzufügen
assumptions.add(localAssum);//Assumptions für lokale Variablen den Assumptions hinzufügen
//Hier wird der Typ der als Assumption eingetragen wird in die Variable assumedType dieser Klasse geschrieben:
if(this.assumedType == null) // Falls der Typ nicht schon gesetzt ist. Das ist der Fall, falls die Methode ein Konstruktor ist
@ -682,7 +644,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable
@Override
public void parserPostProcessing(SyntaxTreeNode parent){
if(this.getType()==null)this.setType(TypePlaceholder.fresh(this));
//Bei dem Elterntyp der Methode darf es sich nur um eine Klasse handeln, daher Cast ohne Prüfung:
//Bei dem Elterntyp der Methode darf es sich nur um eine Klasse handeln, daher Cast ohne Prüfung:
//Class parentClass = (Class)parent;
if(this.returntype == null)this.returntype = TypePlaceholder.fresh(this);
super.parserPostProcessing(parent);
@ -714,7 +676,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable
// Methode und Block teilen sich einen ReturnType:
//this.block.setType(t);
this.returntype = t;
this.returntype.parent = this; //TODO: Dieser Hack sollte nicht nötig sein. (Parser ändern)
this.returntype.parent = this; //TODO: Dieser Hack sollte nicht nÃtig sein. (Parser ändern)
}
/**

View File

@ -7,8 +7,6 @@ import de.dhbwstuttgart.typeinference.Menge;
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;
@ -39,39 +37,6 @@ public class ParameterList extends SyntaxTreeNode implements Iterable<FormalPara
}
// ino.end
// ino.method.get_codegen_ParameterList.23629.definition
public String get_codegen_ParameterList(Menge paralist)
// ino.end
// ino.method.get_codegen_ParameterList.23629.body
{
String ret = "(";
for(int i=0 ; i < this.formalparameter.size() ; i++)
{
//feda 13.06.2007 Array behandlung bei Parametern in Methoden
if (this.formalparameter.elementAt(i).getType() instanceof BaseType) {
BaseType BT = (BaseType)this.formalparameter.elementAt(i).getType();
if (BT.IsArray() == true) {
ret += "[";
}
}
if (this.formalparameter.elementAt(i).getType() instanceof RefType) {
RefType RT = (RefType)this.formalparameter.elementAt(i).getType();
if (RT.IsArray() == true) {
ret += "[";
}
}
ret += this.formalparameter.elementAt(i).getType().get_codegen_Type(paralist);
}
return ret + ")";
}
// ino.end
// ino.method.getParameterAt.23632.definition
public FormalParameter getParameterAt(int i)
// ino.end
@ -93,19 +58,10 @@ public class ParameterList extends SyntaxTreeNode implements Iterable<FormalPara
}
// ino.end
// ino.method.codegen.23638.definition
public void codegen(ClassFile classfile, CodeAttribute code)
// ino.end
// ino.method.codegen.23638.body
{
for(int i = 0; i < formalparameter.size(); i++)
formalparameter.elementAt(i).codegen(classfile, code);
}
// ino.end
// ino.method.getParameterCount.23641.defdescription type=javadoc
/**
* Author: J�rg ¿½uerle<br/>
* Author: ¯Â¿Â½rg ¯Â¿Â½uerle<br/>
* @return Die Anzahl der Parameter
*/
// ino.end
@ -132,7 +88,7 @@ public class ParameterList extends SyntaxTreeNode implements Iterable<FormalPara
public String toString(){
if(formalparameter == null)return "[]"; //"Leere Parameterliste";
//String ret = "ParameterListe, "+formalparameter.size()+" Einträge [ ";
//String ret = "ParameterListe, "+formalparameter.size()+" Einträge [ ";
String ret = " [ ";
for(FormalParameter param : this.formalparameter){
ret += param.toString()+", ";

View File

@ -13,7 +13,6 @@ import java.util.stream.Stream;
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;
import de.dhbwstuttgart.myexception.CTypeReconstructionException;
@ -74,9 +73,9 @@ public class SourceFile
/**
* @autor HOTI
* Wenn dieses Flag auf <b>true</b> gesetzt ist, wird immer als Superklasse Object
* mit rein geladen. Dies hat natürlich zur Folge, dass man in der GUI jeden Typ
* auswählen muss, weil ALLES in Java von Object erbt. Sobald die GUI das über eine
* Checkbox o.ä. ausblendbar macht kann es aktiviert werden. Ebenso beeinflusst es
* mit rein geladen. Dies hat natürlich zur Folge, dass man in der GUI jeden Typ
* auswählen muss, weil ALLES in Java von Object erbt. Sobald die GUI das über eine
* Checkbox o.ä. ausblendbar macht kann es aktiviert werden. Ebenso beeinflusst es
* die superclass von allen Class-Objekten. (Wenn true ist jede Class automatisch
* wenn nicht anders eingegeben Subclass von Object (Wie es sein muss))
*/
@ -87,7 +86,7 @@ public class SourceFile
// ino.attribute.READ_BASE_TYPE_SUPERCLASSES_FROM_JRE.21364.decldescription type=javadoc
/**
* Wenn dieses Flag auf <b>false</b> ist, werden für alle Basisklassen (definiert
* Wenn dieses Flag auf <b>false</b> ist, werden für alle Basisklassen (definiert
* durch die Hashtable baseTypeTranslationTable) KEINE Superklassen geladen. D.h.
* Integer hat bspw. nicht die Superklasse Number sondern OBJECT.
* Dies verursacht bei den Int-Operationen ein Problem
@ -100,7 +99,7 @@ public class SourceFile
/**
* @autor PL
* Wenn dieses Flag auf <b>false</b> ist, werden für alle importierten Klassen
* Wenn dieses Flag auf <b>false</b> ist, werden für alle importierten Klassen
* KEINE Superklassen geladen.
*/
private static final boolean READ_IMPORTED_SUPERCLASSES_FROM_JRE = false;
@ -128,7 +127,7 @@ public class SourceFile
// ino.end
/**
* Die SourceFile repräsntiert eine zu einem Syntaxbaum eingelesene Java-Datei.
* Die SourceFile repräsntiert eine zu einem Syntaxbaum eingelesene Java-Datei.
* SourceFile stellt dabei den Wurzelknoten des Syntaxbaumes dar.
*/
public SourceFile(){
@ -178,12 +177,12 @@ public class SourceFile
// ino.end
// ino.attribute.baseTypeTranslationTable.21385.decldescription type=javadoc
/**
* Table zum Übersetzen der nicht implementierten Base-Types:
* Überall im Compiler wird statt bspw. int Integer verwendet
* Table zum Übersetzen der nicht implementierten Base-Types:
* Überall im Compiler wird statt bspw. int Integer verwendet
* d.h. 1+2 liefert ein Integer
* Deshalb benötigen wir hier eine Tabelle, mit der man die von
* Deshalb benÃtigen wir hier eine Tabelle, mit der man die von
* der JRE gelieferten Base-Typen (int,char, etc) und die Objekt-
* Typen umwandeln können
* Typen umwandeln kÃnnen
*/
// ino.end
// ino.attribute.baseTypeTranslationTable.21385.declaration
@ -295,7 +294,7 @@ public class SourceFile
// ino.method.makeFC.21403.defdescription type=javadoc
/**
* Erstellt die Finite Closure
* @return FC_TTO-Object, welches die Finite Closure repräsentiert
* @return FC_TTO-Object, welches die Finite Closure repräsentiert
*/
// ino.end
// ino.method.makeFC.21403.definition
@ -311,7 +310,7 @@ public class SourceFile
globalAssumptions.add(this.getPublicFieldAssumptions());
// 1. Menge <= in FC aufnehmen --> Iteration ueber alle Klassen
Menge<Type> ignoreTypes = new Menge<>(); //Enthält die Typen, welche nicht in der FC als Supertypen enthalten sein sollen.
Menge<Type> ignoreTypes = new Menge<>(); //Enthält die Typen, welche nicht in der FC als Supertypen enthalten sein sollen.
ignoreTypes.add(new RefType("Long",null,-1).TYPE(globalAssumptions, parent).getType());
ignoreTypes.add(new RefType("Float",null,-1).TYPE(globalAssumptions, parent).getType());
ignoreTypes.add(new RefType("Double",null,-1).TYPE(globalAssumptions, parent).getType());
@ -327,10 +326,10 @@ public class SourceFile
//System.out.println("FCPair: "+p);
if(! t1.equals(t2)){//Um FC_TTO darf kein T <. T stehen.
Type superTypeFromAssumptions = ass.getTypeFor(t2, t2).getType(); //In den Assumptions den SuperTyp nachschlagen
if(superTypeFromAssumptions != null && ! ignoreTypes.contains(superTypeFromAssumptions)){//Die Superklasse eines Typs nur anfügen, wenn er auch in den Assumptions vorkommt.
if(superTypeFromAssumptions != null && ! ignoreTypes.contains(superTypeFromAssumptions)){//Die Superklasse eines Typs nur anfügen, wenn er auch in den Assumptions vorkommt.
vFC.add(p);
}
basicAssumptionsClassMenge.add(cAss.getAssumedClass());//Klasse ohne die Superklasse anfügen
basicAssumptionsClassMenge.add(cAss.getAssumedClass());//Klasse ohne die Superklasse anfügen
}else{
//System.out.println("Wurde nicht aufgenommen");
}
@ -403,7 +402,7 @@ public class SourceFile
// konkret: rechte Seite von FC nach Typkonstruktoren in der Parameterliste durchsuchen
for( int n = 0; n < vFC.size(); n++ )
{
// Elemente in FC k�nnen nur Pair's sein --> Cast ohne Abfrage
// Elemente in FC k�nnen nur Pair's sein --> Cast ohne Abfrage
Pair PTypKonst = vFC.elementAt(n);
// Parameter des rechten Typausdrucks des betrachteten Paars extrahieren
@ -445,7 +444,7 @@ public class SourceFile
{
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
// 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( ) );
//linker Typterm bleibt gleich
@ -498,7 +497,7 @@ public class SourceFile
// new RefType( (RefType)vPara.elementAt(u) ),
// false ); // rechte Seite substituieren
//Es genuegt die rechte Seite zu substituieren, da
//die linke Seite ein Typterm ausschlie�lich mit
//die linke Seite ein Typterm ausschlie�lich mit
//Typvariablen ist
}
//Unify.SubstHashtableGeneric(((RefType)P.TA1), hts); //funktioniert nicht
@ -597,7 +596,7 @@ public class SourceFile
}
} // end for: linke Seite suchen
} // end if: Element ist RefType
} // end for: Transitivit�ten berechnen
} // end for: Transitivit�ten berechnen
//PL HIER REFLEXIVE HUELLE EINFUEGEN
// 05-01-07
@ -658,13 +657,13 @@ public class SourceFile
/////////////////////////////////////////////////////////////////////////
// ino.method.typeReconstruction.21406.defdescription type=javadoc
/**
* Tyrekonstruktionsalgorithmus: ruft f�r jede Klasse den Algorithmus TRProg auf.
* Dessen Ergebnismenge A, die Menge aller Typannahmen, f�r eine Klasse dient als
* Eingabe f�r TRProg der ¿½chsten Klasse. Am Ende enth�lt A alle ¿½glichen
* Typkombinationen f�r alle Klassen zusammen.
* <br>Author: J�rg ¿½uerle
* @return Liste aller m�glichen Typkombinationen
* @throws CTypeReconstructionException Wenn was schief l�uft
* Tyrekonstruktionsalgorithmus: ruft f�r jede Klasse den Algorithmus TRProg auf.
* Dessen Ergebnismenge A, die Menge aller Typannahmen, f�r eine Klasse dient als
* Eingabe f�r TRProg der ¯Â¿Â½chsten Klasse. Am Ende enth�lt A alle ¯Â¿Â½glichen
* Typkombinationen f�r alle Klassen zusammen.
* <br>Author: J�rg ¯Â¿Â½uerle
* @return Liste aller m�glichen Typkombinationen
* @throws CTypeReconstructionException Wenn was schief l�uft
*/
// ino.end
// ino.method.typeReconstruction.21406.definition
@ -678,7 +677,7 @@ public class SourceFile
//Logger initialisieren:
Logger typinferenzLog = Logger.getLogger("Typeinference");
//Alle Assumptions für diese SourceFile sammeln:
//Alle Assumptions für diese SourceFile sammeln:
for(Class klasse : this.KlassenVektor){
globalAssumptions.add(klasse.getPublicFieldAssumptions());
}
@ -703,14 +702,14 @@ public class SourceFile
//Karthesisches Produkt bilden:
////////////////
//Unmögliche ConstraintsSets aussortieren durch Unifizierung
//UnmÃgliche ConstraintsSets aussortieren durch Unifizierung
Unifier unifier = (pairs)->{
Menge<Menge<Pair>> retValue = new Menge<>();
retValue = Unify.unify(pairs, finiteClosure);
return retValue;};
//oderConstraints.filterWrongConstraints(unifier);
oderConstraints.unifyUndConstraints(unifier);
typinferenzLog.debug("Übriggebliebene Konstraints:\n"+oderConstraints+"\n", Section.TYPEINFERENCE);
typinferenzLog.debug("Übriggebliebene Konstraints:\n"+oderConstraints+"\n", Section.TYPEINFERENCE);
//Die Constraints in Pair's umwandeln (Karthesisches Produkt bilden):
Menge<Menge<Pair>> xConstraints = oderConstraints.cartesianProduct();
/*
@ -731,10 +730,10 @@ public class SourceFile
//////////////////////////////
boolean unifyFail = true;
for(Menge<Pair> constraints : xConstraints){
//Alle durch das Karthesische Produkt entstandenen Möglichkeiten durchgehen:
//Alle durch das Karthesische Produkt entstandenen MÃglichkeiten durchgehen:
Menge<Menge<Pair>> result = new Menge<Menge<Pair>>();
//Alle FunN-Typen werden per clone-methode in RefTypes verwandelt. (Die clone Methode in FunN darf nicht überschrieben werden.
//Alle FunN-Typen werden per clone-methode in RefTypes verwandelt. (Die clone Methode in FunN darf nicht überschrieben werden.
for(Pair p : constraints){
if(p.TA1 instanceof FunN){
p.TA1 = p.TA1.clone();
@ -802,7 +801,7 @@ public class SourceFile
).collect(Menge::new, Menge::add, Menge::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
//in indexset sind dann die Mengen von Indizes enthalten, die gemeisam unifiziert wreden müssen
Menge<Menge<Integer>> indexeset = new Menge<>();
if (constraintsclonevars != null && constraintsclonevars.size()>0) {
indexeset = Unify.schnitt(constraintsclonevars);
@ -880,7 +879,7 @@ public class SourceFile
});
//Menge<Menge<Pair>> unifyResult = Unify.unify(constraintsClone, finiteClosure);
//Dann den Ergebnissen anfügen
//Dann den Ergebnissen anfügen
result.addAll(unifyResult);
// Debugoutput:Menge<Menge<Pair>>
@ -888,10 +887,10 @@ public class SourceFile
//typinferenzLog.debug("Unifiziertes Ergebnis: "+result, Section.TYPEINFERENCE);
/*
// Prüfe ob eindeutige sung:
// Prüfe ob eindeutige sung:
if(result.size()>1 && !Unify.hasSolvedForm(result.elementAt(0))){
typinferenzLog.debug("Keine eindeutige Lösung!");
typinferenzLog.debug("Keine eindeutige Lösung!");
}else if(result.size()>1){
@ -912,9 +911,9 @@ public class SourceFile
//typinferenzLog.debug(this.printJavaCode(new ResultSet(new Menge<Pair>())));
//Für jede Klasse in diesem SourceFile gilt das selbe ResultSet:
//Für jede Klasse in diesem SourceFile gilt das selbe ResultSet:
for(Class klasse : this.KlassenVektor){
//Der Unifikationsalgorithmus kann wiederum auch mehrere Lösungen errechnen, diese werden im folgenden durchlaufen:
//Der Unifikationsalgorithmus kann wiederum auch mehrere LÃsungen errechnen, diese werden im folgenden durchlaufen:
for(Menge<Pair> resultSet : result){
unifyFail = false; //Ein Unifiziertes Ergebnis ist entstanden (es kann auch leer sein, das bedeutet nur, dass die Constraints mindestens in einem Fall Sinn ergaben)
//Add Result set as a new ReconstructionResult to ret:
@ -922,7 +921,7 @@ public class SourceFile
ret.add(reconstructionResult);
//ResultSet res = new ResultSet(resultSet);
typinferenzLog.debug("JavaFile für ResultSet "+reconstructionResult+"\n", Section.TYPEINFERENCE);
typinferenzLog.debug("JavaFile für ResultSet "+reconstructionResult+"\n", Section.TYPEINFERENCE);
typinferenzLog.debug(klasse.printJavaCode(reconstructionResult), Section.TYPEINFERENCE);
}
@ -934,8 +933,8 @@ public class SourceFile
return ret;
/*
// HOTI: Nur zur Info.Ich habe den Loglevel auf Info geschaltet, damit
// in der GUI (Eclipse-Plugin) die Console nicht zugemüllt wird.
// Wers braucht kanns natürlich ausschalten
// in der GUI (Eclipse-Plugin) die Console nicht zugemüllt wird.
// Wers braucht kanns natürlich ausschalten
// inferencelog.setLevel(Level.INFO);
@ -966,7 +965,7 @@ public class SourceFile
this.KlassenVektor);
}
// HOTI 04-13-06 Alle Methoden der Klassen überprüfen, ob sie als
// HOTI 04-13-06 Alle Methoden der Klassen überprüfen, ob sie als
// RefType deklarierte Attribute haben, die aber GenericTypeVars sind
// Bsp.:
// bei public E elementAt(i){...} wird E vorerst als RefType erkannt
@ -1014,10 +1013,10 @@ public class SourceFile
inferencelog.info("Rufe \"SourceFile.makeFC()\"...");
inferencelog.info("������������������������������������");
inferencelog.info("������������������������������������");
FC_TTO finiteClosure = this.makeFC();
inferencelog.info("������������������������������������");
inferencelog.info("Bin aus \"SourceFile.makeFC()\" zur�ck.");
inferencelog.info("������������������������������������");
inferencelog.info("Bin aus \"SourceFile.makeFC()\" zur�ck.");
this.removeBasicAssumptions();
// PL 05-08-02
@ -1031,19 +1030,19 @@ public class SourceFile
Interface intf = intf_it.next();
// HOTI In diesem Moment gibt es nur _eine_ potentielle CTypeReconstructionResult, d.h.
// dort nnen die Definitionen der Interfaces (Methodintersectiontypes, FieldDecls) abgelegt werden
// dort ƒÂnnen die Definitionen der Interfaces (Methodintersectiontypes, FieldDecls) abgelegt werden
//intf.addThisToAssumptions(basics);
}
// Fuer jede Klasse die Assumptions der öffentlichen Felder zusammentragen:
// Fuer jede Klasse die Assumptions der Ãffentlichen Felder zusammentragen:
TypeAssumptions publicFieldsAssumptions = new TypeAssumptions();
for(Class cl : KlassenVektor){
publicFieldsAssumptions.add(cl.getPublicFieldAssumptions());
}
// Die BasicAssumptions anfügen:
// Die BasicAssumptions anfügen:
publicFieldsAssumptions.add(this.getBasicAssumptions());
// Fuer jede Klasse separat den TRA aufrufen
@ -1064,7 +1063,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
@Deprecated //angefügt von Andreas Stadelmeier. Grund: Die Funktion wurde neu als makeBasicAssumptionsFromJRE angelegt
private TypeAssumptions getBasicAssumptions() {
TypeAssumptions ret = new TypeAssumptions(null);
@ -1077,7 +1076,7 @@ public class SourceFile
mod.addModifier(new Public());
// Für jede einzelne Klasse
// Für jede einzelne Klasse
while (imports.size()>0) {
UsedId importDecl = imports.get(0);
@ -1209,9 +1208,9 @@ public class SourceFile
}*/
/**
* Erstellt die Assumptions der standardmäßig importierten Packages (java.lang.) sowie der von imports übergebenen Klassen zusammen.
* 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.
* @param withSuptypes - Gibt an, ob auch die subklassen der Packages den Assumptions angefügt werden sollen.
* @return
*/
private TypeAssumptions makeBasicAssumptionsFromJRE(Menge<UsedId> imports, boolean withSubtypes)
@ -1228,10 +1227,10 @@ public class SourceFile
Modifiers mod = new Modifiers();
mod.addModifier(new Public());
//Für Object:
//Für Object:
imports.add(new UsedId("java.lang.Object",-1));
// Für jede einzelne Klasse
// Für jede einzelne Klasse
while (imports.size()>0) {
UsedId importDecl = imports.get(0);
@ -1394,7 +1393,7 @@ public class SourceFile
return new Class("java.lang.Object",new Modifiers(), 0);
}
Menge<String> supertypeGenPara = new Menge<>();//Die Generischen Parameter für die Superklasse berechnen:
Menge<String> supertypeGenPara = new Menge<>();//Die Generischen Parameter für die Superklasse berechnen:
java.lang.reflect.TypeVariable[] superclassTVS=s.getTypeParameters();
for(int tvi=0;tvi<superclassTVS.length;tvi++){
supertypeGenPara.addElement(superclassTVS[tvi].getName());
@ -1404,7 +1403,7 @@ public class SourceFile
ret = new Class(s.getName(),ss.getType(),new Modifiers(),supertypeGenPara);
ass.addClassAssumption(new ClassAssumption(ss)); //Die beiden SuperKlassen den Assumptions anfügen...
ass.addClassAssumption(new ClassAssumption(ss)); //Die beiden SuperKlassen den Assumptions anfügen...
ass.addClassAssumption(new ClassAssumption(ret));
return ret;
@ -1439,7 +1438,7 @@ 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.
/* auskommentiert, da die Klassen von Sun in der Open JDK 1.8 nicht unterstützt werden.
if(type instanceof TypeVariableImpl){
TypeVariableImpl tvi=((TypeVariableImpl)type);
return(new GenericTypeVar(jreSpiderRegistry.get(tvi.getName()).getName().toString(),parentClass,-1));
@ -1467,10 +1466,10 @@ public class SourceFile
// ino.method.makeBasicAssumptions.21418.defdescription type=javadoc
/**
* Erzeugt die Anfangsinformationen �ber bereits bekannte Klassen.
* <br/>Achtung Workaround: Die RefTypes m�ssen sp�ter noch durch BaseTypes
* Erzeugt die Anfangsinformationen �ber bereits bekannte Klassen.
* <br/>Achtung Workaround: Die RefTypes m�ssen sp�ter noch durch BaseTypes
* ersetzt werden. <br>
* Author: J�rg ¿½uerle
* Author: J�rg ¯Â¿Â½uerle
*
* @return A priori Typinformationen
* @throws ClassNotFoundException
@ -1599,7 +1598,7 @@ public class SourceFile
// Menge bauen:
//------------------------
foo.addClassName("java.lang.Menge"); //PL 05-08-01 eingefuegt
TypePlaceholder E = TypePlaceholder.fresh(); // Sp�ter ersetzen durch GenericTypeVar
TypePlaceholder E = TypePlaceholder.fresh(); // Sp�ter ersetzen durch GenericTypeVar
Menge<GenericTypeVar> typeGenPara = new Menge<GenericTypeVar>();
typeGenPara.addElement(new GenericTypeVar(E.getName(),-1));
foo.addGenericTypeVars("java.lang.Menge", typeGenPara);
@ -1641,7 +1640,7 @@ public class SourceFile
*/
TypeAssumptions ret = new TypeAssumptions();
//Basic Assumptions für die FunN Interfaces:
//Basic Assumptions für die FunN Interfaces:
//TODO: Hier mehr als Fun1-Fun5 implementieren
for(int i = 0; i<6; i++){
FunNInterface funN = new FunNInterface(i);
@ -1649,7 +1648,7 @@ public class SourceFile
}
return ret; //TODO: Diese TypeAssumptions mit basic-Assumptions füllen
return ret; //TODO: Diese TypeAssumptions mit basic-Assumptions füllen
}
// ino.end
@ -1666,8 +1665,8 @@ public class SourceFile
// ino.method.removeBasicAssumptions.21424.defdescription type=javadoc
/**
* L�scht die Anfangsinformation wieder aus dem Klassenvektor
* <br/>Author: J�rg ¿½uerle
* L�scht die Anfangsinformation wieder aus dem Klassenvektor
* <br/>Author: J�rg ¯Â¿Â½uerle
*/
// ino.end
// ino.method.removeBasicAssumptions.21424.definition
@ -1687,11 +1686,11 @@ public class SourceFile
// ino.method.getPackageName.21427.defdescription type=javadoc
/**
* Erzeugt f�r jede Klasse einen Menge, in den Referenzen auf die GenericTypeVars
* Erzeugt f�r jede Klasse einen Menge, in den Referenzen auf die GenericTypeVars
* dieser Klasse gespeichert werden. Diese Mengeen werden unter den Klassennamen
* in der
* Ergebnisdatenstruktur abgelegt. Au�erdem werden alle Klassennamen gespeichert.
* <br/>Author: J�rg ¿½uerle
* Ergebnisdatenstruktur abgelegt. Au�erdem werden alle Klassennamen gespeichert.
* <br/>Author: J�rg ¯Â¿Â½uerle
* @param res
* /
* /*private void addClassNamesAndGenericsToRR(CTypeReconstructionResult res){

View File

@ -21,11 +21,11 @@ public abstract class SyntaxTreeNode implements IItemWithOffset{
/**
* Wird nach dem Parsen aufgerufen.
* Erfüllt folgenden Aufgaben:
* 1. Füllt fehlende Typangaben mit TPHs auf.
* 2. Verknüpft die Knoten des Syntaxbaums. (setzt Parent)
* Erfüllt folgenden Aufgaben:
* 1. Füllt fehlende Typangaben mit TPHs auf.
* 2. Verknüpft die Knoten des Syntaxbaums. (setzt Parent)
* 3. Wechselt RefTypes gegebenenfalls mit GenericTypeVars aus.
* 4. Führt einen Teil des Syntaxckecks durch.
* 4. Führt einen Teil des Syntaxckecks durch.
*
*/
public void parserPostProcessing(SyntaxTreeNode parent) {
@ -63,13 +63,13 @@ public abstract class SyntaxTreeNode implements IItemWithOffset{
SyntaxTreeNode equal = (SyntaxTreeNode)object;
if(!equal.getDescription().equals(this.getDescription()))return false;
if(this.getParent()!=null)
if(!this.getParent().equals(equal.getParent()))return false; //auch das Elternelement überprüfen.
if(!this.getParent().equals(equal.getParent()))return false; //auch das Elternelement überprüfen.
return true;
}
/**
* Methode zur Generierung der TypeInsertPoints
* @param insertSet - Generierte InsertPoints werden dem insertSet angefügt
* @param insertSet - Generierte InsertPoints werden dem insertSet angefügt
* @param result - Das ResultSet auf dessen Basis die InsertPoints generiert werden
*/
public void addTypeInsertPoints(TypeInsertSet insertSet,ResultSet result) {
@ -77,7 +77,7 @@ public abstract class SyntaxTreeNode implements IItemWithOffset{
node.addTypeInsertPoints(insertSet, result);
}
TypeInsertPoint tip = null; //Der TypInsertPoint für diesen Knoten
TypeInsertPoint tip = null; //Der TypInsertPoint für diesen Knoten
//Fall der Knoten ein TypeInsertable ist, kann direkt der TypeInsertPoint generiert werden.
if(this instanceof TypeInsertable){
TypeInsertable that = (TypeInsertable)this;
@ -87,7 +87,7 @@ public abstract class SyntaxTreeNode implements IItemWithOffset{
insertSet.add(tip);//ret.addAll(((TypePlaceholder)t).getTypeInsertPoints(result));
}
/*
//Für den Fall, dass dieser Knoten Generische Variablen halten kann.
//Für den Fall, dass dieser Knoten Generische Variablen halten kann.
if(that instanceof Generic && that.getOffset()>=0){
//Alle unresolvedTPHs ermitteln und GenericTypeVarInsertPoints bilden:
Menge<TypePlaceholder> uTPHs = insertSet.getUnresolvedTPHs();

View File

@ -7,17 +7,6 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.logger.Logger;
// ino.end
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;
@ -54,7 +43,7 @@ public class DeclId
// ino.attribute.m_LineNumber.23295.declaration
private int m_LineNumber = MyCompiler.NO_LINENUMBER;
// ino.end
private int m_Offset = -1; //hinzugef�gt hoth: 07.04.2006
private int m_Offset = -1; //hinzugef�gt hoth: 07.04.2006
// ino.attribute.codegenlog.23298.decldescription type=line
// Logger fuer Code-Gen
// ino.end
@ -177,87 +166,7 @@ public class DeclId
// ino.method.codegen_InstVarDecl.23337.defdescription type=javadoc
/**
* Generieren einer Instanzvariable im Bytecode.
* Fuegt ggf. eine Signatur hinzu (Generics).
*/
// ino.end
// ino.method.codegen_InstVarDecl.23337.definition
public void codegen_InstVarDecl(ClassFile classfile, Type type, Menge paralist)
throws JVMCodeException
// ino.end
// ino.method.codegen_InstVarDecl.23337.body
{
String codegen_type;
Attribute attr = null;
// Spezialbehandlung fuer Konstanten ....
// Eine Unterscheidung im Parser wuerde Konflikte erzeugen
// da die Definition von Fields und Konstanten sehr aehnlich ist.
if (modifiers != null && modifiers.includesModifier(new Final())) {
Constant ct = new Constant(name, modifiers);
ct.setType(type);
if (!(wert instanceof Expr))
throw new JVMCodeException("Das Generieren einer Konstante dieses Typs wird nicht unterstützt!");
ct.setValue((Expr) wert);
ct.codegen( classfile, paralist);
return;
}
// Ueberpruefung auf Generics (Signaturen!)
if (SignatureInfo.needsSignature(type)) attr = new SignatureInfo(type, classfile);
if (type instanceof RefType)
codegen_type = ((RefType)type).get_codegen_Type(null);
else
codegen_type = JVMCode.get_codegen_Type(type.getName().toString(), paralist);
// Instanzvariable genenerieren
classfile.add_field(name, codegen_type, get_access_flags(), attr);
// Wertzuweisung ggf. hinzufuegen
if(wert != null) {
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().toString(),getOffset()), (Expr)wert);
classfile.add_classblock_Element(assign);
}
else throw new JVMCodeException("Wertzuweisung der Instanzvariable kann nicht uebersetzt werden!");
}
}
// ino.end
// ino.method.codegen_LocalVarDecl.23340.definition
public void codegen_LocalVarDecl(ClassFile classfile, CodeAttribute code, Type type, Menge paralist)
throws JVMCodeException
// ino.end
// ino.method.codegen_LocalVarDecl.23340.body
{
code.add_local(name, type);
if(wert != null)
{
if(wert instanceof Expr)
{
Assign assign = new Assign(getOffset(),name.length());
assign.set_Expr(new LocalOrFieldVar(name,getOffset()), (Expr)wert);
assign.codegen(classfile, code, paralist);
}
else
{
throw new JVMCodeException("JVMCodeException: DeclId: void codegen(ClassFile classfile, Type type)");
}
}
}
// ino.end
// ino.method.getLineNumber.23343.definition
public int getLineNumber()
// ino.end
@ -277,7 +186,7 @@ public class DeclId
// ino.end
// ino.method.getOffset.23349.defdescription type=line
// hinzugef�gt hoth: 07.04.2006
// hinzugef�gt hoth: 07.04.2006
// ino.end
// ino.method.getOffset.23349.definition
public int getOffset()
@ -289,7 +198,7 @@ public class DeclId
// ino.end
// ino.method.setOffset.23352.defdescription type=line
// hinzugef�gt hoth: 07.04.2006
// hinzugef�gt hoth: 07.04.2006
// ino.end
// ino.method.setOffset.23352.definition
public void setOffset(int Offset)
@ -302,7 +211,7 @@ public class DeclId
// ino.method.toString.23355.defdescription type=javadoc
/**
* <br/>Author: Martin Pl�micke
* <br/>Author: Martin Pl�micke
* @return
*/
// ino.end

View File

@ -5,7 +5,6 @@ package de.dhbwstuttgart.syntaxtree.misc;
import java.util.Iterator;
import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.bytecode.JVMCode;
import de.dhbwstuttgart.core.IItemWithOffset;
import de.dhbwstuttgart.parser.JavaClassName;
import de.dhbwstuttgart.syntaxtree.type.Type;
@ -31,7 +30,7 @@ public class UsedId implements IItemWithOffset
// ino.attribute.vParaOrg.23672.declaration
public Menge<Type> vParaOrg = null; // otth: originale Parameterliste
// ino.end
private int m_Offset = -1; //hinzugef�gt hoth: 07.04.2006
private int m_Offset = -1; //hinzugef�gt hoth: 07.04.2006
// ino.method.UsedId.23675.definition
public UsedId(int offset)
@ -49,7 +48,7 @@ public class UsedId implements IItemWithOffset
}
// ino.method.getOffset.23678.defdescription type=line
// hinzugef�gt hoth: 07.04.2006
// hinzugef�gt hoth: 07.04.2006
// ino.end
// ino.method.getOffset.23678.definition
public int getOffset()
@ -70,7 +69,7 @@ public class UsedId implements IItemWithOffset
// ino.end
// ino.method.setOffset.23684.defdescription type=line
// hinzugef�gt hoth: 07.04.2006
// hinzugef�gt hoth: 07.04.2006
// ino.end
// ino.method.setOffset.23684.definition
public void setOffset(int Offset)
@ -178,34 +177,6 @@ public class UsedId implements IItemWithOffset
}
// ino.end
// ino.method.getSignatureUsedId.23717.definition
public String getSignatureUsedId()
// ino.end
// ino.method.getSignatureUsedId.23717.body
{
String basis = JVMCode.get_codegen_Type(getQualifiedName().toString(),null);
if (paralist == null || paralist.size() ==0)
return basis;
StringBuffer sb = new StringBuffer();
// Basistyp, ; entfernen
basis = basis.substring(0, basis.length() -1);
sb.append(basis);
sb.append("<");
for(int i = 0; i< paralist.size(); i++) {
sb.append(paralist.elementAt(i).get_codegen_Type(null));
}
sb.append(">;");
return sb.toString();
}
// ino.end
// ino.method.removeLast.23720.definition
@ -219,7 +190,7 @@ public class UsedId implements IItemWithOffset
// ino.method.toString.23723.defdescription type=javadoc
/**
* <br/>Author: Martin Pl�micke
* <br/>Author: Martin Pl�micke
* @return
*/
// ino.end
@ -228,7 +199,7 @@ public class UsedId implements IItemWithOffset
// ino.end
// ino.method.toString.23723.body
{
return this.get_Name_1Element();//name.toString(); //geändert von Andreas Stadelmeier
return this.get_Name_1Element();//name.toString(); //geändert von Andreas Stadelmeier
/*String s = "";
for(int i = 0; i<name.size();i++)
{

View File

@ -7,8 +7,6 @@ import java.util.Hashtable;
import java.util.Iterator;
import de.dhbwstuttgart.typeinference.Menge;
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;
@ -41,11 +39,6 @@ public abstract class AddOp extends Operator
}
// ino.end
// ino.method.codegen.24095.declaration
public abstract void codegen(ClassFile classfile, CodeAttribute code, Expr expr, boolean neg, Menge paralist)
throws JVMCodeException;
// ino.end
@Override
protected Hashtable<RefType,RefType> getOperatorTypes() {
Hashtable<RefType, RefType> types = new Hashtable<RefType, RefType>();

View File

@ -4,9 +4,6 @@ package de.dhbwstuttgart.syntaxtree.operator;
// ino.module.DivideOp.8596.import
import de.dhbwstuttgart.typeinference.Menge;
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;
@ -29,19 +26,6 @@ public class DivideOp extends MulOp
}
// ino.end
// ino.method.codegen.24115.definition
public void codegen(ClassFile classfile, CodeAttribute code, Expr expr, boolean neg, Menge paralist)
throws JVMCodeException
// ino.end
// ino.method.codegen.24115.body
{
Expr expr1 = ((Binary)expr).get_Expr1();
Expr expr2 = ((Binary)expr).get_Expr2();
expr1.codegen(classfile, code, paralist);
expr2.codegen(classfile, code, paralist);
code.add_code(JVMCode.ndiv(expr1.getTypeName()));
}
// ino.end

View File

@ -5,9 +5,6 @@ package de.dhbwstuttgart.syntaxtree.operator;
import java.util.Iterator;
import de.dhbwstuttgart.typeinference.Menge;
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.SyntaxTreeNode;
@ -34,50 +31,6 @@ public class EqualOp extends RelOp
super(offset, variableLength);
}
// ino.end
// ino.method.codegen.24125.definition
public void codegen(ClassFile classfile, CodeAttribute code, Expr expr, boolean not, Menge paralist)
throws JVMCodeException
// ino.end
// ino.method.codegen.24125.body
{
Expr expr1 = ((Binary)expr).get_Expr1();
Expr expr2 = ((Binary)expr).get_Expr2();
int type1 = JVMCode.get_nType(expr1.getTypeName());
int type2 = JVMCode.get_nType(expr2.getTypeName());
expr1.codegen(classfile, code, paralist);
expr2.codegen(classfile, code, paralist);
if((expr1 instanceof Null) || (expr2 instanceof Null))
if(type1==4 || type2==4)
if(!not) code.add_code(JVMCode.ifnonnull);
else code.add_code(JVMCode.ifnull);
else throw new JVMCodeException("JVMCodeException: EqualOp: void codegen(ClassFile classfile, Code_attribute code, Expr expr, boolean not)");
else if(!not) code.add_code(JVMCode.if_ncmpne(expr1.getTypeName()));
else code.add_code(JVMCode.if_ncmpeq(expr1.getTypeName()));
code.add_code_short((short)7);
code.add_code(JVMCode.iconst_1);
code.add_code(JVMCode.goto_);
code.add_code_short((short)4);
code.add_code(JVMCode.iconst_0);
}
// ino.end
// ino.method.if_codegen.24128.definition
public void if_codegen(ClassFile classfile, CodeAttribute code, String type, boolean not)
throws JVMCodeException
// ino.end
// ino.method.if_codegen.24128.body
{
if(type.equals("null"))
if(!not) code.add_code(JVMCode.ifnonnull);
else code.add_code(JVMCode.ifnull);
else
if(!not) code.add_code(JVMCode.if_ncmpne(type));
else code.add_code(JVMCode.if_ncmpeq(type));
}
// ino.end
}
// ino.end

View File

@ -4,9 +4,6 @@ package de.dhbwstuttgart.syntaxtree.operator;
// ino.module.GreaterEquOp.8598.import
import de.dhbwstuttgart.typeinference.Menge;
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;
@ -28,38 +25,6 @@ public class GreaterEquOp extends RelOp
super(offset,variableLength);
}
// ino.end
// ino.method.codegen.24141.definition
public void codegen(ClassFile classfile, CodeAttribute code, Expr expr, boolean not, Menge paralist)
throws JVMCodeException
// ino.end
// ino.method.codegen.24141.body
{
Expr expr1 = ((Binary)expr).get_Expr1();
Expr expr2 = ((Binary)expr).get_Expr2();
expr1.codegen(classfile, code, paralist);
expr2.codegen(classfile, code, paralist);
if(!not) code.add_code(JVMCode.if_icmplt);
else code.add_code(JVMCode.if_icmpge);
code.add_code_short((short)7);
code.add_code(JVMCode.iconst_1);
code.add_code(JVMCode.goto_);
code.add_code_short((short)4);
code.add_code(JVMCode.iconst_0);
}
// ino.end
// ino.method.if_codegen.24144.definition
public void if_codegen(ClassFile classfile, CodeAttribute code, String type, boolean not)
throws JVMCodeException
// ino.end
// ino.method.if_codegen.24144.body
{
if(!not) code.add_code(JVMCode.if_icmplt);
else code.add_code(JVMCode.if_icmpge);
}
// ino.end
}
// ino.end

View File

@ -4,9 +4,6 @@ package de.dhbwstuttgart.syntaxtree.operator;
// ino.module.GreaterOp.8599.import
import de.dhbwstuttgart.typeinference.Menge;
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;
@ -28,36 +25,5 @@ public class GreaterOp extends RelOp
}
// ino.end
// ino.method.codegen.24154.definition
public void codegen(ClassFile classfile, CodeAttribute code, Expr expr, boolean not, Menge paralist)
throws JVMCodeException
// ino.end
// ino.method.codegen.24154.body
{
Expr expr1 = ((Binary)expr).get_Expr1();
Expr expr2 = ((Binary)expr).get_Expr2();
expr1.codegen(classfile, code, paralist);
expr2.codegen(classfile, code, paralist);
if(!not) code.add_code(JVMCode.if_icmple);
else code.add_code(JVMCode.if_icmpgt);
code.add_code_short(7);
code.add_code(JVMCode.iconst_1);
code.add_code(JVMCode.goto_);
code.add_code_short(4);
code.add_code(JVMCode.iconst_0);
}
// ino.end
// ino.method.if_codegen.24157.definition
public void if_codegen(ClassFile classfile, CodeAttribute code, String type, boolean not)
throws JVMCodeException
// ino.end
// ino.method.if_codegen.24157.body
{
if(!not) code.add_code(JVMCode.if_icmple);
else code.add_code(JVMCode.if_icmpgt);
}
// ino.end
}
// ino.end

View File

@ -4,9 +4,6 @@ package de.dhbwstuttgart.syntaxtree.operator;
// ino.module.LessEquOp.8600.import
import de.dhbwstuttgart.typeinference.Menge;
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;
@ -28,36 +25,5 @@ public class LessEquOp extends RelOp
}
// ino.end
// ino.method.codegen.24167.definition
public void codegen(ClassFile classfile, CodeAttribute code, Expr expr, boolean not, Menge paralist)
throws JVMCodeException
// ino.end
// ino.method.codegen.24167.body
{
Expr expr1 = ((Binary)expr).get_Expr1();
Expr expr2 = ((Binary)expr).get_Expr2();
expr1.codegen(classfile, code, paralist);
expr2.codegen(classfile, code , paralist);
if(!not) code.add_code(JVMCode.if_icmpgt);
else code.add_code(JVMCode.if_icmple);
code.add_code_short((short)7);
code.add_code(JVMCode.iconst_1);
code.add_code(JVMCode.goto_);
code.add_code_short((short)4);
code.add_code(JVMCode.iconst_0);
}
// ino.end
// ino.method.if_codegen.24170.definition
public void if_codegen(ClassFile classfile, CodeAttribute code, String type, boolean not)
throws JVMCodeException
// ino.end
// ino.method.if_codegen.24170.body
{
if(!not) code.add_code(JVMCode.if_icmpgt);
else code.add_code(JVMCode.if_icmple);
}
// ino.end
}
// ino.end

View File

@ -4,9 +4,6 @@ package de.dhbwstuttgart.syntaxtree.operator;
// ino.module.LessOp.8601.import
import de.dhbwstuttgart.typeinference.Menge;
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;
@ -28,36 +25,5 @@ public class LessOp extends RelOp
}
// ino.end
// ino.method.codegen.24180.definition
public void codegen(ClassFile classfile, CodeAttribute code, Expr expr, boolean not, Menge paralist)
throws JVMCodeException
// ino.end
// ino.method.codegen.24180.body
{
Expr expr1 = ((Binary)expr).get_Expr1();
Expr expr2 = ((Binary)expr).get_Expr2();
expr1.codegen(classfile, code, paralist);
expr2.codegen(classfile, code, paralist);
if(!not) code.add_code(JVMCode.if_icmpge);
else code.add_code(JVMCode.if_icmplt);
code.add_code_short((short)7);
code.add_code(JVMCode.iconst_1);
code.add_code(JVMCode.goto_);
code.add_code_short((short)4);
code.add_code(JVMCode.iconst_0);
}
// ino.end
// ino.method.if_codegen.24183.definition
public void if_codegen(ClassFile classfile, CodeAttribute code, String type, boolean not)
throws JVMCodeException
// ino.end
// ino.method.if_codegen.24183.body
{
if(!not) code.add_code(JVMCode.if_icmpge);
else code.add_code(JVMCode.if_icmplt);
}
// ino.end
}
// ino.end

Some files were not shown because too many files have changed in this diff Show More