[12 - Tree Grammar] Add type check

This commit is contained in:
2020-06-13 19:16:35 +02:00
parent 04c18d4fdf
commit 54d6ea874e
10 changed files with 1726 additions and 173 deletions

78
.idea/workspace.xml generated
View File

@@ -2,22 +2,16 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="a11aa5c4-505d-4bfb-9e81-72367c118bbe" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/modules.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/runConfigurations/Run_Antlr_builder.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/runConfigurations/Run_Antlr_builder.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/AntlrXTreeGrammarMain.java" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/AntlrXTreeGrammarMain.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/AssignCount.g" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/AssignCount.g" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/AssignCount.java" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/AssignCount.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/AssignCount.tokens" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/AssignCount.tokens" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XLexer.java" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XLexer.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XParser.java" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XParser.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XTreeGrammar.g" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XTreeGrammar.g" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XTreeGrammar.java" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XTreeGrammar.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XTreeGrammar.tokens" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XTreeGrammar.tokens" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/AssignCountTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/AssignCountTest.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/ParseTreeTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/ParseTreeTest.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/TokenStreamTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/TokenStreamTest.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/TreeGrammarTreeTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/TreeGrammarTreeTest.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr X Uebersetzer-Leer/src/de/dhbw/compiler/antlrxcompiler/AntlrXCompiler.java" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr X Uebersetzer-Leer/src/de/dhbw/compiler/antlrxcompiler/AntlrXCompiler.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr X Uebersetzer-Leer/src/de/dhbw/compiler/antlrxcompiler/X.g" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr X Uebersetzer-Leer/src/de/dhbw/compiler/antlrxcompiler/X.g" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr X Uebersetzer-Leer/src/de/dhbw/compiler/antlrxcompiler/XOptimizer.g" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr X Uebersetzer-Leer/src/de/dhbw/compiler/antlrxcompiler/XOptimizer.g" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr X Uebersetzer-Leer/src/de/dhbw/compiler/antlrxcompiler/XTypeCheck.g" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr X Uebersetzer-Leer/src/de/dhbw/compiler/antlrxcompiler/XTypeCheck.g" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr X Uebersetzer-Leer/src/de/dhbw/compiler/antlrxcompiler/XTypeCheck.java" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr X Uebersetzer-Leer/src/de/dhbw/compiler/antlrxcompiler/XTypeCheck.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr X Uebersetzer-Leer/src/de/dhbw/compiler/antlrxcompiler/XTypeCheck.tokens" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr X Uebersetzer-Leer/src/de/dhbw/compiler/antlrxcompiler/XTypeCheck.tokens" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr X Uebersetzer-Leer/src/de/dhbw/compiler/antlrxcompiler/test/OptimizerTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr X Uebersetzer-Leer/src/de/dhbw/compiler/antlrxcompiler/test/OptimizerTest.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr X Uebersetzer-Leer/src/de/dhbw/compiler/antlrxcompiler/test/ParseTreeTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr X Uebersetzer-Leer/src/de/dhbw/compiler/antlrxcompiler/test/ParseTreeTest.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CC-Praxis-Antlr X Uebersetzer-Leer/src/de/dhbw/compiler/antlrxcompiler/test/TypeCheckTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/CC-Praxis-Antlr X Uebersetzer-Leer/src/de/dhbw/compiler/antlrxcompiler/test/TypeCheckTest.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -43,7 +37,7 @@
<property name="project.structure.proportion" value="0.15429688" />
<property name="project.structure.side.proportion" value="0.2" />
</component>
<component name="RunManager" selected="JUnit.TestAntlrXAssignCount1">
<component name="RunManager" selected="JUnit.TestAntlrXTypeCheck">
<configuration name="AntlrXTreeGrammarMain" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="de.dhbw.compiler.antlrxtreegrammar.AntlrXTreeGrammarMain" />
<module name="CC-Praxis-Antlr Baumgrammatiken-Leer" />
@@ -144,19 +138,22 @@
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="TestAntlrXScanner1.tokenStringConst" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="CC-Praxis-Antlr Parser fuer X-Leer" />
<configuration name="TestAntlrXTypeCheck" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="CC-Praxis-Antlr X Uebersetzer-Leer" />
<useClassPathOnly />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="de.dhbw.compiler.antlrxparser.test.*" />
<option name="PATTERN" value="de.dhbw.compiler.antlrxcompiler.test.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<option name="PACKAGE_NAME" value="de.dhbw.compiler.antlrxparser.test" />
<option name="MAIN_CLASS_NAME" value="de.dhbw.compiler.antlrxparser.test.TestAntlrXScanner1" />
<option name="METHOD_NAME" value="tokenStringConst" />
<option name="TEST_OBJECT" value="method" />
<option name="PACKAGE_NAME" value="de.dhbw.compiler.antlrxcompiler.test" />
<option name="MAIN_CLASS_NAME" value="de.dhbw.compiler.antlrxcompiler.test.TestAntlrXTypeCheck" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="class" />
<option name="PARAMETERS" value="" />
<method v="2">
<option name="RunConfigurationTask" enabled="true" run_configuration_name="Run Antlr Builder" run_configuration_type="Application" />
<option name="Make" enabled="true" />
</method>
</configuration>
@@ -166,17 +163,17 @@
<item itemvalue="JUnit.TestAntlrXScanner1" />
<item itemvalue="JUnit.TestAntlrXScanner1.tokenASSIGN" />
<item itemvalue="JUnit.TestAntlrXParser1" />
<item itemvalue="JUnit.TestAntlrXScanner1.tokenStringConst" />
<item itemvalue="JUnit.TestAntlrXAssignCount" />
<item itemvalue="JUnit.TestAntlrXAssignCount1" />
<item itemvalue="JUnit.TestAntlrXTypeCheck" />
</list>
<recent_temporary>
<list>
<item itemvalue="JUnit.TestAntlrXTypeCheck" />
<item itemvalue="JUnit.TestAntlrXAssignCount1" />
<item itemvalue="JUnit.TestAntlrXAssignCount" />
<item itemvalue="Application.AntlrXTreeGrammarMain" />
<item itemvalue="JUnit.TestAntlrXParser1" />
<item itemvalue="JUnit.TestAntlrXScanner1.tokenStringConst" />
</list>
</recent_temporary>
</component>
@@ -197,7 +194,8 @@
<workItem from="1591771652663" duration="1715000" />
<workItem from="1591962621113" duration="4935000" />
<workItem from="1591970247448" duration="49000" />
<workItem from="1591970308877" duration="300000" />
<workItem from="1591970308877" duration="728000" />
<workItem from="1592059055121" duration="9317000" />
</task>
<servers />
</component>
@@ -213,11 +211,11 @@
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="570" y="121" key="#TestAntlrXScanner1.tokenASSIGN/0.0.1920.1040@0.0.1920.1040" timestamp="1591175187591" />
<state x="-1471" y="200" width="1471" height="691" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1591969874169">
<state x="-1471" y="200" width="1471" height="691" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1592066371011">
<screen x="-1920" y="0" width="1920" height="1040" />
</state>
<state x="184" y="112" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1440.900@0.0.1440.900" timestamp="1591172899381" />
<state x="-1471" y="200" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1591969874169" />
<state x="-1471" y="200" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1592066371011" />
<state x="-37" y="200" width="1471" height="691" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1591184444701" />
<state x="92" y="92" width="1736" height="856" key="#com.intellij.execution.junit2.states.ComparisonFailureState$DiffDialog" timestamp="1591185724270">
<screen x="0" y="0" width="1920" height="1040" />
@@ -232,38 +230,38 @@
</state>
<state x="1003" y="171" key="#com.intellij.ide.macro.MacrosDialog/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1591969389618" />
<state x="700" y="183" key="#com.intellij.ide.macro.MacrosDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1591184444196" />
<state x="690" y="267" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog" timestamp="1591969353358">
<state x="690" y="267" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog" timestamp="1592059799792">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="690" y="267" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1591969353358" />
<state x="690" y="267" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1592059799792" />
<state x="700" y="233" key="FileChooserDialogImpl" timestamp="1591968457509">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="700" y="233" key="FileChooserDialogImpl/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1591968457509" />
<state x="700" y="233" key="FileChooserDialogImpl/0.0.1920.1040@0.0.1920.1040" timestamp="1591184758908" />
<state width="1877" height="178" key="GridCell.Tab.0.bottom" timestamp="1591970233761">
<state width="1877" height="321" key="GridCell.Tab.0.bottom" timestamp="1592068345609">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1398" height="245" key="GridCell.Tab.0.bottom/0.0.1440.900@0.0.1440.900" timestamp="1591173185826" />
<state width="1877" height="178" key="GridCell.Tab.0.bottom/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1591970233761" />
<state width="1877" height="321" key="GridCell.Tab.0.bottom/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1592068345609" />
<state width="916" height="398" key="GridCell.Tab.0.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1591188037708" />
<state width="1877" height="178" key="GridCell.Tab.0.center" timestamp="1591970233761">
<state width="1877" height="321" key="GridCell.Tab.0.center" timestamp="1592068345609">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1398" height="245" key="GridCell.Tab.0.center/0.0.1440.900@0.0.1440.900" timestamp="1591173185825" />
<state width="1877" height="178" key="GridCell.Tab.0.center/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1591970233761" />
<state width="1877" height="321" key="GridCell.Tab.0.center/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1592068345609" />
<state width="916" height="398" key="GridCell.Tab.0.center/0.0.1920.1040@0.0.1920.1040" timestamp="1591188037708" />
<state width="1877" height="178" key="GridCell.Tab.0.left" timestamp="1591970233761">
<state width="1877" height="321" key="GridCell.Tab.0.left" timestamp="1592068345609">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1398" height="245" key="GridCell.Tab.0.left/0.0.1440.900@0.0.1440.900" timestamp="1591173185825" />
<state width="1877" height="178" key="GridCell.Tab.0.left/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1591970233761" />
<state width="1877" height="321" key="GridCell.Tab.0.left/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1592068345609" />
<state width="916" height="398" key="GridCell.Tab.0.left/0.0.1920.1040@0.0.1920.1040" timestamp="1591188037708" />
<state width="1877" height="178" key="GridCell.Tab.0.right" timestamp="1591970233761">
<state width="1877" height="321" key="GridCell.Tab.0.right" timestamp="1592068345609">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1398" height="245" key="GridCell.Tab.0.right/0.0.1440.900@0.0.1440.900" timestamp="1591173185826" />
<state width="1877" height="178" key="GridCell.Tab.0.right/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1591970233761" />
<state width="1877" height="321" key="GridCell.Tab.0.right/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1592068345609" />
<state width="916" height="398" key="GridCell.Tab.0.right/0.0.1920.1040@0.0.1920.1040" timestamp="1591188037708" />
<state x="447" y="180" width="688" height="753" key="NewModule_or_Project.wizard" timestamp="1591968463391">
<screen x="0" y="0" width="1920" height="1040" />
@@ -280,9 +278,9 @@
</state>
<state x="208" y="31" key="SettingsEditor/0.0.1440.900@0.0.1440.900" timestamp="1591172804318" />
<state x="277" y="36" key="SettingsEditor/0.0.1920.1040@0.0.1920.1040" timestamp="1591184318089" />
<state x="623" y="225" width="672" height="678" key="search.everywhere.popup" timestamp="1591969820924">
<state x="623" y="225" width="672" height="678" key="search.everywhere.popup" timestamp="1592063655606">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="623" y="225" width="672" height="678" key="search.everywhere.popup/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1591969820924" />
<state x="623" y="225" width="672" height="678" key="search.everywhere.popup/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1592063655606" />
</component>
</project>