diff --git a/.idea/$CACHE_FILE$ b/.idea/$CACHE_FILE$ deleted file mode 100644 index bfe6214..0000000 --- a/.idea/$CACHE_FILE$ +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 73f69e0..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -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/ diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index 664f8f1..0000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index 79ee123..0000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index a7ec339..85ffa8e 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,5 +1,8 @@ + + diff --git a/.idea/modules.xml b/.idea/modules.xml index 91a2701..f77fb4f 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -3,10 +3,6 @@ - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/Run_Antlr_builder.xml b/.idea/runConfigurations/Run_Antlr_builder.xml index b5f2a09..dd6be14 100644 --- a/.idea/runConfigurations/Run_Antlr_builder.xml +++ b/.idea/runConfigurations/Run_Antlr_builder.xml @@ -1,12 +1,9 @@ - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 94a25f7..35eb1dd 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..8ce76e9 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1591172713288 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CC-Praxis-Antlr Parser fuer X-Leer/CC-Praxis-Antlr Parser fuer X-Leer.iml b/CC-Praxis-Antlr Parser fuer X-Leer/CC-Praxis-Antlr Parser fuer X-Leer.iml new file mode 100644 index 0000000..fb8e866 --- /dev/null +++ b/CC-Praxis-Antlr Parser fuer X-Leer/CC-Praxis-Antlr Parser fuer X-Leer.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file 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 91bfb0e..4e892a5 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-06-03 10:07:23 +// $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-06-03 10:22:37 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 5ba896a..6584c8e 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-06-03 10:07:22 +// $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-06-03 10:22:37 package de.dhbw.compiler.antlrxparser; import org.antlr.runtime.*; 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 new file mode 100644 index 0000000..5e3d994 --- /dev/null +++ b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/AntlrX.tokens @@ -0,0 +1,68 @@ +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 new file mode 100644 index 0000000..e12f960 Binary files /dev/null and b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/AntlrXParserMain.class 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 new file mode 100644 index 0000000..63a754d --- /dev/null +++ b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/X.g @@ -0,0 +1,44 @@ +/* ********************************************** + * 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; + FLOATCONST; + 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; // Lese alle möglichen Zeichen ein -> Zahlen in ID -> bleibt weiterhin ID + }: 'a'..'z' | 'A'..'Z' | '0'..'9')*; +INTCONST: ('0'..'9')+; +FLOATCONST: INTCONST '.' INTCONST; + +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$DFA4.class b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/XLexer$DFA4.class new file mode 100644 index 0000000..b4f107b Binary files /dev/null and b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/XLexer$DFA4.class differ 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 new file mode 100644 index 0000000..05cc11e Binary files /dev/null and b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/XLexer.class 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 new file mode 100644 index 0000000..e82c7e5 Binary files /dev/null and b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/XParser$program_return.class 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 new file mode 100644 index 0000000..6aa6859 Binary files /dev/null and b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/XParser.class 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 new file mode 100644 index 0000000..175ae62 Binary files /dev/null and b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/ParseTreeTest.class 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 new file mode 100644 index 0000000..225fb2f Binary files /dev/null and b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXParser.class 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 new file mode 100644 index 0000000..635ea3c Binary files /dev/null and b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXParser1.class 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 new file mode 100644 index 0000000..97138a5 Binary files /dev/null and b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXParser2.class 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 new file mode 100644 index 0000000..9b60b02 Binary files /dev/null and b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXScanner1.class 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 new file mode 100644 index 0000000..8fcbdcd Binary files /dev/null and b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXScanner2.class 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 new file mode 100644 index 0000000..528ce41 Binary files /dev/null and b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestAntlrXScanner3.class 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 new file mode 100644 index 0000000..3bbea5c Binary files /dev/null and b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TestToken.class 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 new file mode 100644 index 0000000..4d92506 Binary files /dev/null and b/out/production/CC-Praxis-Antlr Parser fuer X-Leer/de/dhbw/compiler/antlrxparser/test/TokenStreamTest.class differ