Add .gitignore

This commit is contained in:
2020-05-18 12:24:43 +02:00
parent dba220ceb8
commit ffd623e674
37 changed files with 21 additions and 406 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
.DS_Store

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="**/*.cup|**/*.lex" kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${container}"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"/>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ÜB-Praxis-JFlex Scanner für AS 3"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${project}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc}${project_path}\lib\jflexant.xml"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,clean"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc}${project_path}"/>
<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
</launchConfiguration>

View File

@@ -0,0 +1,19 @@
# IntelliJ folders
/.idea/
# IntelliJ files
*.iml
# Java Compiler output
/bin/
# Eclipse files
.classpath
.project
# Eclipse folders
/.externalToolBuilders/
/.settings/
# macOS files
.DS_Store

View File

@@ -1,8 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

View File

@@ -1,10 +0,0 @@
<component name="libraryTable">
<library name="lib">
<CLASSES>
<root url="file://$PROJECT_DIR$/lib" />
</CLASSES>
<JAVADOC />
<SOURCES />
<jarDirectory url="file://$PROJECT_DIR$/lib" recursive="false" />
</library>
</component>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8.0_181" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/ÜB-Praxis-Abstiegsparser für X-Leer.iml" filepath="$PROJECT_DIR$/ÜB-Praxis-Abstiegsparser für X-Leer.iml" />
</modules>
</component>
</project>

View File

@@ -1,124 +0,0 @@
<?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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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.png" 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>

View File

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

View File

@@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ÜB-Praxis-Abstiegsparser für X-Leer</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/JFlex Ant AS [Builder].launch</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>pi.eclipse.cle.CupLexNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>

View File

@@ -1,11 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7

View File

@@ -1,5 +0,0 @@
//src/de/dhbw/compiler/JFlexASScanner/JFlexASScanner.lex/lex-code-method=0
//src/de/dhbw/compiler/JFlexASScanner/JFlexASScanner.lex/lex-comply-jlex=false
//src/de/dhbw/compiler/JFlexASScanner/JFlexASScanner.lex/lex-output=src
//src/de/dhbw/compiler/JFlexASScanner/JFlexASScanner.lex/lex-skip-min=false
eclipse.preferences.version=1

View File

@@ -1,148 +0,0 @@
/* **********************************************
* Duale Hochschule Baden-Württemberg Karlsruhe
* Prof. Dr. Jörn Eisenbiegler
*
* Vorlesung Übersetzerbau
* Praxis X Abstiegsparser
* - Scanner-Definition
*
* **********************************************
*/
package de.dhbw.compiler.xparser;
%%
%class JFlexXScanner
%type Token
%function nextToken
%unicode
%line
%column
%public
%final
%xstate INT, FRACTION, EXPVZ, EXP, STRING
%{
private int intvalue=0;
private String textvalue ="";
private int fracvalue=0;
private int fraclength=0;
private int expvalue=0;
private int expsign=1;
private int startline =0;
private int startcolumn =0;
private String stringvalue="";
%}
%%
read { return new Token(Token.READ, yytext(), yyline+1, yycolumn+1); }
print { return new Token(Token.PRINT, yytext(), yyline+1, yycolumn+1); }
int { return new Token(Token.INT, yytext(), yyline+1, yycolumn+1); }
float { return new Token(Token.FLOAT, yytext(), yyline+1, yycolumn+1); }
string { return new Token(Token.STRING, yytext(), yyline+1, yycolumn+1); }
\+ { return new Token(Token.PLUS, yytext(), yyline+1, yycolumn+1); }
\- { return new Token(Token.MINUS, yytext(), yyline+1, yycolumn+1); }
\* { return new Token(Token.MULT, yytext(), yyline+1, yycolumn+1); }
\/ { return new Token(Token.DIV, yytext(), yyline+1, yycolumn+1); }
:= { return new Token(Token.ASSIGN, yytext(), yyline+1, yycolumn+1); }
\( { return new Token(Token.LBR, yytext(), yyline+1, yycolumn+1); }
\) { return new Token(Token.RBR, yytext(), yyline+1, yycolumn+1); }
\< { return new Token(Token.LESS, yytext(), yyline+1, yycolumn+1); }
> { return new Token(Token.MORE, yytext(), yyline+1, yycolumn+1); }
= { return new Token(Token.EQUALS, yytext(), yyline+1, yycolumn+1); }
if { return new Token(Token.IF, yytext(), yyline+1, yycolumn+1); }
then { return new Token(Token.THEN, yytext(), yyline+1, yycolumn+1); }
else { return new Token(Token.ELSE, yytext(), yyline+1, yycolumn+1); }
while { return new Token(Token.WHILE, yytext(), yyline+1, yycolumn+1); }
for { return new Token(Token.FOR, yytext(), yyline+1, yycolumn+1); }
; { return new Token(Token.SEMICOLON, yytext(), yyline+1, yycolumn+1); }
begin { return new Token(Token.BEGIN, yytext(), yyline+1, yycolumn+1); }
end { return new Token(Token.END, yytext(), yyline+1, yycolumn+1); }
program { return new Token(Token.PROGRAM, yytext(), yyline+1, yycolumn+1); }
\. { return new Token(Token.DOT, yytext(), yyline+1, yycolumn+1); }
: { return new Token(Token.COLON, yytext(), yyline+1, yycolumn+1); }
[a-zA-Z][a-zA-Z0-9]* { return new Token(Token.ID, yytext(), yyline+1, yycolumn+1); }
0 { return new IntConstToken(Token.INTCONST, yytext(), yyline+1, yycolumn+1, 0); }
0/\. { yybegin(INT); textvalue=yytext(); startline=yyline+1; startcolumn=yycolumn+1;
intvalue=yytext().charAt(0)-'0'; fracvalue=0; fraclength=0; expvalue=0; }
[1-9] { yybegin(INT); textvalue=yytext(); startline=yyline+1; startcolumn=yycolumn+1;
intvalue=yytext().charAt(0)-'0'; fracvalue=0; fraclength=0; expvalue=0; }
\" { yybegin(STRING); textvalue="\""; stringvalue=""; startline=yyline+1; startcolumn=yycolumn+1; }
(\/\*)~(\*\/) { /* eat comments */ }
[\ \t\b\f\r\n]+ { /* eat whitespace */ }
<<EOF>> { return new Token(Token.EOF, yytext(), yyline+1, yycolumn+1); }
[^] { return new Token(Token.INVALID, yytext(), yyline+1, yycolumn+1); }
<STRING> {
[a-zA-Z \.:] { textvalue+=yytext(); stringvalue+=yytext(); }
\\\" { textvalue+="\\\""; stringvalue+="\""; }
\" { yybegin(YYINITIAL); return new StringConstToken(Token.STRINGCONST, textvalue+"\"", startline, startcolumn, stringvalue); }
[^] { yybegin(YYINITIAL); return new Token(Token.INVALID, textvalue+yytext(), startline, startcolumn); }
<<EOF>> { yybegin(YYINITIAL); return new Token(Token.INVALID, textvalue, startline, startcolumn); }
}
<INT> {
[0-9] { intvalue = 10*intvalue + yytext().charAt(0)-'0';
textvalue+=yytext();}
\. { yybegin(FRACTION);
textvalue+=yytext();}
[eE]/-?[0-9] { yybegin(EXPVZ); textvalue += yytext(); }
[^] { yybegin(YYINITIAL);
yypushback(1);
return new IntConstToken(Token.INTCONST, textvalue, startline, startcolumn, intvalue); }
<<EOF>> { yybegin(YYINITIAL);
yypushback(1);
return new IntConstToken(Token.INTCONST, textvalue, startline, startcolumn, intvalue);}
}
<FRACTION> {
[0-9] { fracvalue= 10*fracvalue+ yytext().charAt(0)-'0';
fraclength++;
textvalue+=yytext();}
[eE]/-?[0-9] { yybegin(EXPVZ);
textvalue+=yytext();}
[^] { yybegin(YYINITIAL);
yypushback(1);
return new FloatConstToken(Token.FLOATCONST, textvalue, startline, startcolumn,intvalue+fracvalue/Math.pow(10,fraclength)); }
<<EOF>> { yybegin(YYINITIAL);
yypushback(1);
return new FloatConstToken(Token.FLOATCONST, textvalue, startline, startcolumn,intvalue+fracvalue/Math.pow(10,fraclength)); }
}
<EXPVZ> {
-0|0 { yybegin(YYINITIAL);
return new FloatConstToken(Token.FLOATCONST, textvalue+yytext(), startline, startcolumn,intvalue+fracvalue/Math.pow(10,fraclength)); }
-[1-9] { yybegin(EXP); expvalue=yytext().charAt(1)-'0'; expsign=-1; textvalue+=yytext(); }
[1-9] { yybegin(EXP); expvalue=yytext().charAt(0)-'0'; expsign=1; textvalue+=yytext(); }
[^] { yybegin(YYINITIAL);
yypushback(1);
return new Token(Token.INVALID, textvalue, startline, startcolumn); }
<<EOF>> { yybegin(YYINITIAL);
yypushback(1);
return new Token(Token.INVALID, textvalue, startline, startcolumn); }
}
<EXP> {
[0-9] { expvalue = 10* expvalue + yytext().charAt(0)-'0'; textvalue+=yytext(); }
[^] { yybegin(YYINITIAL);
yypushback(1);
return new FloatConstToken(Token.FLOATCONST, textvalue, startline, startcolumn, (intvalue+fracvalue/Math.pow(10,fraclength))*Math.pow(10,expvalue*expsign)); }
<<EOF>> { yybegin(YYINITIAL);
yypushback(1);
return new FloatConstToken(Token.FLOATCONST, textvalue, startline, startcolumn, (intvalue+fracvalue/Math.pow(10,fraclength))*Math.pow(10,expvalue*expsign)); }
}

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/bin" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="jdk" jdkName="JavaSE-1.7" jdkType="JavaSDK" />
<orderEntry type="module-library">
<library name="junit4">
<CLASSES>
<root url="jar://$APPLICATION_HOME_DIR$/lib/junit-4.12.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="library" name="lib" level="project" />
</component>
</module>