diff --git a/.gitignore b/.gitignore index 5b08b20..a506433 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,9 @@ # IntelliJ folders **/.idea/ +**/.out/ +/.out/ +# Exclude run configuration +!/.idea/runConfiguration # IntelliJ files **/*.iml @@ -17,3 +21,4 @@ # macOS files .DS_Store + diff --git a/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/X.g b/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/X.g index a208f90..8445090 100644 --- a/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/X.g +++ b/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/X.g @@ -32,7 +32,7 @@ tokens { // Lexer stuff ID: ('a'..'z' | 'A'..'Z') (options { - greedy = true; + greedy = true; // Lese alle möglichen Zeichen ein -> Zahlen in ID -> bleibt weiterhin ID }: 'a'..'z' | 'A'..'Z' | '0'..'9')*; INTCONST: ('0'..'9')+; diff --git a/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/XLexer.java b/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/XLexer.java index 985f3b1..aa10a1b 100644 --- a/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/XLexer.java +++ b/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/XLexer.java @@ -1,4 +1,4 @@ -// $ANTLR 3.5.2 /Users/kreis/git/gitea.humenius.me/dhbw-compilerbau/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/X.g 2020-05-27 12:40:05 +// $ANTLR 3.5.2 /Users/kreis/git/gitea.humenius.me/dhbw-compilerbau/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/X.g 2020-05-27 16:02:18 package de.dhbw.compiler.antlrxparser; import org.antlr.runtime.*; diff --git a/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/XParser.java b/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/XParser.java index 00a6ac2..483228e 100644 --- a/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/XParser.java +++ b/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/XParser.java @@ -1,4 +1,4 @@ -// $ANTLR 3.5.2 /Users/kreis/git/gitea.humenius.me/dhbw-compilerbau/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/X.g 2020-05-27 12:40:05 +// $ANTLR 3.5.2 /Users/kreis/git/gitea.humenius.me/dhbw-compilerbau/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/X.g 2020-05-27 16:02:17 package de.dhbw.compiler.antlrxparser; import org.antlr.runtime.*; diff --git a/X.tokens b/X.tokens deleted file mode 100644 index 39cd892..0000000 --- a/X.tokens +++ /dev/null @@ -1,7 +0,0 @@ -T__9=9 -DECL=4 -DECLLIST=5 -INVALID=6 -STATLIST=7 -UMINUS=8 -'TODO'=9 diff --git a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/AntlrX.tokens b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/AntlrX.tokens deleted file mode 100644 index 5e3d994..0000000 --- a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/AntlrX.tokens +++ /dev/null @@ -1,68 +0,0 @@ -T__20=20 -T__21=21 -T__22=22 -T__23=23 -T__24=24 -T__25=25 -T__26=26 -T__27=27 -T__28=28 -T__29=29 -T__30=30 -T__31=31 -T__32=32 -T__33=33 -T__34=34 -T__35=35 -T__36=36 -T__37=37 -T__38=38 -T__39=39 -T__40=40 -T__41=41 -T__42=42 -T__43=43 -T__44=44 -T__45=45 -COMMENT=4 -DECL=5 -DECLLIST=6 -DIGIT=7 -FLOATCONST=8 -ID=9 -INTCONST=10 -INVALID=11 -LETTER=12 -OTHER=13 -POSDIGIT=14 -STATLIST=15 -STRINGCONST=16 -UMINUS=17 -WS=18 -ZERO=19 -'('=20 -')'=21 -'*'=22 -'+'=23 -'-'=24 -'.'=25 -'/'=26 -':'=27 -':='=28 -';'=29 -'<'=30 -'='=31 -'>'=32 -'begin'=33 -'else'=34 -'end'=35 -'float'=36 -'for'=37 -'if'=38 -'int'=39 -'print'=40 -'program'=41 -'read'=42 -'string'=43 -'then'=44 -'while'=45 diff --git a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/AntlrXParserMain.class b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/AntlrXParserMain.class deleted file mode 100644 index e12f960..0000000 Binary files a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/AntlrXParserMain.class and /dev/null differ diff --git a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/X.g b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/X.g deleted file mode 100644 index a208f90..0000000 --- a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/X.g +++ /dev/null @@ -1,42 +0,0 @@ -/* ********************************************** - * Duale Hochschule Baden-Württemberg Karlsruhe - * Prof. Dr. Jörn Eisenbiegler - * - * Vorlesung Übersetzerbau - * Praxis ANTLR-Parser für X - * - Grammatik für Scanner und Parser - * - * ********************************************** - */ - -grammar X; - -options { - language = Java; - output = AST; - ASTLabelType = CommonTree; - backtrack = true; -} - -// AST-Tokens -tokens { - ID; - INTCONST; - WS; -} - -@parser::header {package de.dhbw.compiler.antlrxparser;} -@lexer::header {package de.dhbw.compiler.antlrxparser;} - -// Anmerkung: Es müssen Lexer- UND Parser-Regeln stehen, da sonst das Generieren nicht funktionieren -// Lexer stuff -ID: ('a'..'z' | 'A'..'Z') - (options { - greedy = true; - }: 'a'..'z' | 'A'..'Z' | '0'..'9')*; -INTCONST: ('0'..'9')+; - -WS: ('\t' | ' ' | '\r' | '\n' | '\f')+ { skip(); }; - -// Parser stuff -program: 'TODO'; diff --git a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/XLexer.class b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/XLexer.class deleted file mode 100644 index c51ff04..0000000 Binary files a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/XLexer.class and /dev/null differ diff --git a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/XParser$program_return.class b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/XParser$program_return.class deleted file mode 100644 index 64a145f..0000000 Binary files a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/XParser$program_return.class and /dev/null differ diff --git a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/XParser.class b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/XParser.class deleted file mode 100644 index 9cabe2f..0000000 Binary files a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/XParser.class and /dev/null differ diff --git a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/ParseTreeTest.class b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/ParseTreeTest.class deleted file mode 100644 index 175ae62..0000000 Binary files a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/ParseTreeTest.class and /dev/null differ diff --git a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXParser.class b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXParser.class deleted file mode 100644 index 225fb2f..0000000 Binary files a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXParser.class and /dev/null differ diff --git a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXParser1.class b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXParser1.class deleted file mode 100644 index 635ea3c..0000000 Binary files a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXParser1.class and /dev/null differ diff --git a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXParser2.class b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXParser2.class deleted file mode 100644 index 97138a5..0000000 Binary files a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXParser2.class and /dev/null differ diff --git a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXScanner1.class b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXScanner1.class deleted file mode 100644 index 9b60b02..0000000 Binary files a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXScanner1.class and /dev/null differ diff --git a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXScanner2.class b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXScanner2.class deleted file mode 100644 index 8fcbdcd..0000000 Binary files a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXScanner2.class and /dev/null differ diff --git a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXScanner3.class b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXScanner3.class deleted file mode 100644 index 528ce41..0000000 Binary files a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXScanner3.class and /dev/null differ diff --git a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestToken.class b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestToken.class deleted file mode 100644 index 3bbea5c..0000000 Binary files a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestToken.class and /dev/null differ diff --git a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TokenStreamTest.class b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TokenStreamTest.class deleted file mode 100644 index 4d92506..0000000 Binary files a/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TokenStreamTest.class and /dev/null differ