initial commit, abstract syntax tree as defined on 24.04.2024
This commit is contained in:
parent
c6c77579ce
commit
7c91cee342
8
Source/.idea/.gitignore
generated
vendored
Normal file
8
Source/.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
11
Source/.idea/Source.iml
generated
Normal file
11
Source/.idea/Source.iml
generated
Normal file
@ -0,0 +1,11 @@
|
||||
<?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$">
|
||||
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
6
Source/.idea/misc.xml
generated
Normal file
6
Source/.idea/misc.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
8
Source/.idea/modules.xml
generated
Normal file
8
Source/.idea/modules.xml
generated
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/Source.iml" filepath="$PROJECT_DIR$/.idea/Source.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
124
Source/.idea/uiDesigner.xml
generated
Normal file
124
Source/.idea/uiDesigner.xml
generated
Normal file
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
6
Source/.idea/vcs.xml
generated
Normal file
6
Source/.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
4
Source/abstractSyntaxTree/Comment/CommentComment.java
Normal file
4
Source/abstractSyntaxTree/Comment/CommentComment.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Comment;
|
||||
|
||||
public class CommentComment {
|
||||
}
|
8
Source/abstractSyntaxTree/Comment/IComment.java
Normal file
8
Source/abstractSyntaxTree/Comment/IComment.java
Normal file
@ -0,0 +1,8 @@
|
||||
package abstractSyntaxTree.Comment;
|
||||
|
||||
public interface IComment {
|
||||
// typeCheck method
|
||||
// get type
|
||||
|
||||
// visit method for code generation
|
||||
}
|
4
Source/abstractSyntaxTree/Datatype/BoolDatatype.java
Normal file
4
Source/abstractSyntaxTree/Datatype/BoolDatatype.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Datatype;
|
||||
|
||||
public class BoolDatatype implements IDatatype{
|
||||
}
|
4
Source/abstractSyntaxTree/Datatype/CharDatatype.java
Normal file
4
Source/abstractSyntaxTree/Datatype/CharDatatype.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Datatype;
|
||||
|
||||
public class CharDatatype implements IDatatype{
|
||||
}
|
8
Source/abstractSyntaxTree/Datatype/IDatatype.java
Normal file
8
Source/abstractSyntaxTree/Datatype/IDatatype.java
Normal file
@ -0,0 +1,8 @@
|
||||
package abstractSyntaxTree.Datatype;
|
||||
|
||||
public interface IDatatype {
|
||||
// typeCheck method
|
||||
// get type
|
||||
|
||||
// visit method for code generation
|
||||
}
|
4
Source/abstractSyntaxTree/Datatype/IntDatatype.java
Normal file
4
Source/abstractSyntaxTree/Datatype/IntDatatype.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Datatype;
|
||||
|
||||
public class IntDatatype implements IDatatype{
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Expression;
|
||||
|
||||
public class AssignExpression implements IExpression{
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Expression;
|
||||
|
||||
public class BinaryExpression implements IExpression{
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Expression;
|
||||
|
||||
public class CompareExpression implements IExpression{
|
||||
}
|
4
Source/abstractSyntaxTree/Expression/FieldAccess.java
Normal file
4
Source/abstractSyntaxTree/Expression/FieldAccess.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Expression;
|
||||
|
||||
public class FieldAccess implements IExpression{
|
||||
}
|
8
Source/abstractSyntaxTree/Expression/IExpression.java
Normal file
8
Source/abstractSyntaxTree/Expression/IExpression.java
Normal file
@ -0,0 +1,8 @@
|
||||
package abstractSyntaxTree.Expression;
|
||||
|
||||
public interface IExpression {
|
||||
// typeCheck method
|
||||
// get type
|
||||
|
||||
// visit method for code generation
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Expression;
|
||||
|
||||
public class InstVarExpression implements IExpression{
|
||||
}
|
4
Source/abstractSyntaxTree/Expression/MethodCall.java
Normal file
4
Source/abstractSyntaxTree/Expression/MethodCall.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Expression;
|
||||
|
||||
public class MethodCall implements IExpression{
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Expression;
|
||||
|
||||
public class UnaryExpression implements IExpression{
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Expression;
|
||||
|
||||
public class VarRefExpression implements IExpression{
|
||||
}
|
8
Source/abstractSyntaxTree/Modifier/IModifier.java
Normal file
8
Source/abstractSyntaxTree/Modifier/IModifier.java
Normal file
@ -0,0 +1,8 @@
|
||||
package abstractSyntaxTree.Modifier;
|
||||
|
||||
public interface IModifier {
|
||||
// typeCheck method
|
||||
// get type
|
||||
|
||||
// visit method for code generation
|
||||
}
|
4
Source/abstractSyntaxTree/Modifier/PrivateModifier.java
Normal file
4
Source/abstractSyntaxTree/Modifier/PrivateModifier.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Modifier;
|
||||
|
||||
public class PrivateModifier implements IModifier{
|
||||
}
|
4
Source/abstractSyntaxTree/Modifier/PublicModifier.java
Normal file
4
Source/abstractSyntaxTree/Modifier/PublicModifier.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Modifier;
|
||||
|
||||
public class PublicModifier implements IModifier{
|
||||
}
|
4
Source/abstractSyntaxTree/Object/ClassObject.java
Normal file
4
Source/abstractSyntaxTree/Object/ClassObject.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Object;
|
||||
|
||||
public class ClassObject implements IObject{
|
||||
}
|
4
Source/abstractSyntaxTree/Object/FieldDeclObject.java
Normal file
4
Source/abstractSyntaxTree/Object/FieldDeclObject.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Object;
|
||||
|
||||
public class FieldDeclObject implements IObject{
|
||||
}
|
8
Source/abstractSyntaxTree/Object/IObject.java
Normal file
8
Source/abstractSyntaxTree/Object/IObject.java
Normal file
@ -0,0 +1,8 @@
|
||||
package abstractSyntaxTree.Object;
|
||||
|
||||
public interface IObject {
|
||||
// typeCheck method
|
||||
// get type
|
||||
|
||||
// visit method for code generation
|
||||
}
|
4
Source/abstractSyntaxTree/Object/MethodeDeclObject.java
Normal file
4
Source/abstractSyntaxTree/Object/MethodeDeclObject.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Object;
|
||||
|
||||
public class MethodeDeclObject implements IObject{
|
||||
}
|
4
Source/abstractSyntaxTree/Object/NewObject.java
Normal file
4
Source/abstractSyntaxTree/Object/NewObject.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Object;
|
||||
|
||||
public class NewObject implements IObject{
|
||||
}
|
4
Source/abstractSyntaxTree/Object/ThisObject.java
Normal file
4
Source/abstractSyntaxTree/Object/ThisObject.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Object;
|
||||
|
||||
public class ThisObject implements IObject{
|
||||
}
|
4
Source/abstractSyntaxTree/Object/VoidObject.java
Normal file
4
Source/abstractSyntaxTree/Object/VoidObject.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Object;
|
||||
|
||||
public class VoidObject implements IObject{
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Statement;
|
||||
|
||||
public class AssignmentStatement implements IStatement{
|
||||
}
|
4
Source/abstractSyntaxTree/Statement/BlockStatement.java
Normal file
4
Source/abstractSyntaxTree/Statement/BlockStatement.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Statement;
|
||||
|
||||
public class BlockStatement implements IStatement{
|
||||
}
|
4
Source/abstractSyntaxTree/Statement/BreakStatement.java
Normal file
4
Source/abstractSyntaxTree/Statement/BreakStatement.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Statement;
|
||||
|
||||
public class BreakStatement implements IStatement{
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Statement;
|
||||
|
||||
public class ContinueStatement implements IStatement{
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Statement;
|
||||
|
||||
public class DoWhileStatement implements IStatement{
|
||||
}
|
4
Source/abstractSyntaxTree/Statement/EmptyStatement.java
Normal file
4
Source/abstractSyntaxTree/Statement/EmptyStatement.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Statement;
|
||||
|
||||
public class EmptyStatement implements IStatement{
|
||||
}
|
4
Source/abstractSyntaxTree/Statement/ForStatement.java
Normal file
4
Source/abstractSyntaxTree/Statement/ForStatement.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Statement;
|
||||
|
||||
public class ForStatement implements IStatement{
|
||||
}
|
8
Source/abstractSyntaxTree/Statement/IStatement.java
Normal file
8
Source/abstractSyntaxTree/Statement/IStatement.java
Normal file
@ -0,0 +1,8 @@
|
||||
package abstractSyntaxTree.Statement;
|
||||
|
||||
public interface IStatement {
|
||||
// typeCheck method
|
||||
// get type
|
||||
|
||||
// visit method for code generation
|
||||
}
|
4
Source/abstractSyntaxTree/Statement/IfElseStatement.java
Normal file
4
Source/abstractSyntaxTree/Statement/IfElseStatement.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Statement;
|
||||
|
||||
public class IfElseStatement implements IStatement{
|
||||
}
|
4
Source/abstractSyntaxTree/Statement/IfStatement.java
Normal file
4
Source/abstractSyntaxTree/Statement/IfStatement.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Statement;
|
||||
|
||||
public class IfStatement implements IStatement{
|
||||
}
|
4
Source/abstractSyntaxTree/Statement/ReturnStatement.java
Normal file
4
Source/abstractSyntaxTree/Statement/ReturnStatement.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Statement;
|
||||
|
||||
public class ReturnStatement implements IStatement{
|
||||
}
|
6
Source/abstractSyntaxTree/Statement/SwitchStatement.java
Normal file
6
Source/abstractSyntaxTree/Statement/SwitchStatement.java
Normal file
@ -0,0 +1,6 @@
|
||||
package abstractSyntaxTree.Statement;
|
||||
|
||||
import java.sql.Statement;
|
||||
|
||||
public class SwitchStatement implements IStatement {
|
||||
}
|
4
Source/abstractSyntaxTree/Statement/WhileStatement.java
Normal file
4
Source/abstractSyntaxTree/Statement/WhileStatement.java
Normal file
@ -0,0 +1,4 @@
|
||||
package abstractSyntaxTree.Statement;
|
||||
|
||||
public class WhileStatement implements IStatement{
|
||||
}
|
Loading…
Reference in New Issue
Block a user