From a9d5c76b7805efc0408e291a666c12a83d96517f Mon Sep 17 00:00:00 2001 From: Humenius Date: Fri, 12 Jun 2020 16:05:58 +0200 Subject: [PATCH] [12 - Tree Grammar] Add "empty" XTreeGrammar and fix test imports --- .../compiler/antlrxtreegrammar/XLexer.java | 298 ++-- .../compiler/antlrxtreegrammar/XParser.java | 212 +-- .../compiler/antlrxtreegrammar/XTreeGrammar.g | 30 +- .../antlrxtreegrammar/XTreeGrammar.java | 1302 ++++++++++++++++- .../antlrxtreegrammar/XTreeGrammar.tokens | 2 - .../test/AssignCountTest.java | 7 +- .../antlrxtreegrammar/test/ParseTreeTest.java | 6 +- .../test/TokenStreamTest.java | 6 +- .../test/TreeGrammarTreeTest.java | 9 +- 9 files changed, 1574 insertions(+), 298 deletions(-) diff --git a/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XLexer.java b/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XLexer.java index dc06015..4dcc7dc 100644 --- a/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XLexer.java +++ b/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XLexer.java @@ -1,4 +1,4 @@ -// $ANTLR 3.5.2 C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g 2019-05-23 11:52:00 +// $ANTLR 3.5.2 C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g 2020-06-12 16:02:36 package de.dhbw.compiler.antlrxtreegrammar; import org.antlr.runtime.*; @@ -67,15 +67,15 @@ public class XLexer extends Lexer { public XLexer(CharStream input, RecognizerSharedState state) { super(input,state); } - @Override public String getGrammarFileName() { return "C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g"; } + @Override public String getGrammarFileName() { return "C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g"; } // $ANTLR start "T__20" public final void mT__20() throws RecognitionException { try { int _type = T__20; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:9:7: ( '(' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:9:9: '(' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:9:7: ( '(' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:9:9: '(' { match('('); if (state.failed) return; } @@ -94,8 +94,8 @@ public class XLexer extends Lexer { try { int _type = T__21; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:10:7: ( ')' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:10:9: ')' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:10:7: ( ')' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:10:9: ')' { match(')'); if (state.failed) return; } @@ -114,8 +114,8 @@ public class XLexer extends Lexer { try { int _type = T__22; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:11:7: ( '*' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:11:9: '*' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:11:7: ( '*' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:11:9: '*' { match('*'); if (state.failed) return; } @@ -134,8 +134,8 @@ public class XLexer extends Lexer { try { int _type = T__23; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:12:7: ( '+' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:12:9: '+' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:12:7: ( '+' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:12:9: '+' { match('+'); if (state.failed) return; } @@ -154,8 +154,8 @@ public class XLexer extends Lexer { try { int _type = T__24; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:13:7: ( '-' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:13:9: '-' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:13:7: ( '-' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:13:9: '-' { match('-'); if (state.failed) return; } @@ -174,8 +174,8 @@ public class XLexer extends Lexer { try { int _type = T__25; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:14:7: ( '.' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:14:9: '.' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:14:7: ( '.' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:14:9: '.' { match('.'); if (state.failed) return; } @@ -194,8 +194,8 @@ public class XLexer extends Lexer { try { int _type = T__26; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:15:7: ( '/' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:15:9: '/' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:15:7: ( '/' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:15:9: '/' { match('/'); if (state.failed) return; } @@ -214,8 +214,8 @@ public class XLexer extends Lexer { try { int _type = T__27; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:16:7: ( ':' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:16:9: ':' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:16:7: ( ':' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:16:9: ':' { match(':'); if (state.failed) return; } @@ -234,8 +234,8 @@ public class XLexer extends Lexer { try { int _type = T__28; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:17:7: ( ':=' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:17:9: ':=' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:17:7: ( ':=' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:17:9: ':=' { match(":="); if (state.failed) return; @@ -255,8 +255,8 @@ public class XLexer extends Lexer { try { int _type = T__29; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:18:7: ( ';' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:18:9: ';' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:18:7: ( ';' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:18:9: ';' { match(';'); if (state.failed) return; } @@ -275,8 +275,8 @@ public class XLexer extends Lexer { try { int _type = T__30; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:19:7: ( '<' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:19:9: '<' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:19:7: ( '<' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:19:9: '<' { match('<'); if (state.failed) return; } @@ -295,8 +295,8 @@ public class XLexer extends Lexer { try { int _type = T__31; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:20:7: ( '=' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:20:9: '=' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:20:7: ( '=' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:20:9: '=' { match('='); if (state.failed) return; } @@ -315,8 +315,8 @@ public class XLexer extends Lexer { try { int _type = T__32; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:21:7: ( '>' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:21:9: '>' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:21:7: ( '>' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:21:9: '>' { match('>'); if (state.failed) return; } @@ -335,8 +335,8 @@ public class XLexer extends Lexer { try { int _type = T__33; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:22:7: ( 'begin' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:22:9: 'begin' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:22:7: ( 'begin' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:22:9: 'begin' { match("begin"); if (state.failed) return; @@ -356,8 +356,8 @@ public class XLexer extends Lexer { try { int _type = T__34; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:23:7: ( 'else' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:23:9: 'else' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:23:7: ( 'else' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:23:9: 'else' { match("else"); if (state.failed) return; @@ -377,8 +377,8 @@ public class XLexer extends Lexer { try { int _type = T__35; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:24:7: ( 'end' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:24:9: 'end' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:24:7: ( 'end' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:24:9: 'end' { match("end"); if (state.failed) return; @@ -398,8 +398,8 @@ public class XLexer extends Lexer { try { int _type = T__36; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:25:7: ( 'float' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:25:9: 'float' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:25:7: ( 'float' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:25:9: 'float' { match("float"); if (state.failed) return; @@ -419,8 +419,8 @@ public class XLexer extends Lexer { try { int _type = T__37; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:26:7: ( 'for' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:26:9: 'for' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:26:7: ( 'for' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:26:9: 'for' { match("for"); if (state.failed) return; @@ -440,8 +440,8 @@ public class XLexer extends Lexer { try { int _type = T__38; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:27:7: ( 'if' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:27:9: 'if' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:27:7: ( 'if' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:27:9: 'if' { match("if"); if (state.failed) return; @@ -461,8 +461,8 @@ public class XLexer extends Lexer { try { int _type = T__39; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:28:7: ( 'int' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:28:9: 'int' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:28:7: ( 'int' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:28:9: 'int' { match("int"); if (state.failed) return; @@ -482,8 +482,8 @@ public class XLexer extends Lexer { try { int _type = T__40; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:29:7: ( 'print' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:29:9: 'print' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:29:7: ( 'print' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:29:9: 'print' { match("print"); if (state.failed) return; @@ -503,8 +503,8 @@ public class XLexer extends Lexer { try { int _type = T__41; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:30:7: ( 'program' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:30:9: 'program' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:30:7: ( 'program' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:30:9: 'program' { match("program"); if (state.failed) return; @@ -524,8 +524,8 @@ public class XLexer extends Lexer { try { int _type = T__42; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:31:7: ( 'read' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:31:9: 'read' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:31:7: ( 'read' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:31:9: 'read' { match("read"); if (state.failed) return; @@ -545,8 +545,8 @@ public class XLexer extends Lexer { try { int _type = T__43; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:32:7: ( 'string' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:32:9: 'string' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:32:7: ( 'string' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:32:9: 'string' { match("string"); if (state.failed) return; @@ -566,8 +566,8 @@ public class XLexer extends Lexer { try { int _type = T__44; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:33:7: ( 'then' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:33:9: 'then' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:33:7: ( 'then' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:33:9: 'then' { match("then"); if (state.failed) return; @@ -587,8 +587,8 @@ public class XLexer extends Lexer { try { int _type = T__45; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:34:7: ( 'while' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:34:9: 'while' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:34:7: ( 'while' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:34:9: 'while' { match("while"); if (state.failed) return; @@ -608,10 +608,10 @@ public class XLexer extends Lexer { try { int _type = WS; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:32:3: ( ( '\\t' | ' ' | '\\r' | '\\n' | '\\f' )+ ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:32:9: ( '\\t' | ' ' | '\\r' | '\\n' | '\\f' )+ + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:32:3: ( ( '\\t' | ' ' | '\\r' | '\\n' | '\\f' )+ ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:32:9: ( '\\t' | ' ' | '\\r' | '\\n' | '\\f' )+ { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:32:9: ( '\\t' | ' ' | '\\r' | '\\n' | '\\f' )+ + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:32:9: ( '\\t' | ' ' | '\\r' | '\\n' | '\\f' )+ int cnt1=0; loop1: while (true) { @@ -623,7 +623,7 @@ public class XLexer extends Lexer { switch (alt1) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: { if ( (input.LA(1) >= '\t' && input.LA(1) <= '\n')||(input.LA(1) >= '\f' && input.LA(1) <= '\r')||input.LA(1)==' ' ) { input.consume(); @@ -664,12 +664,12 @@ public class XLexer extends Lexer { try { int _type = COMMENT; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:33:8: ( '/*' ( . )* '*/' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:33:10: '/*' ( . )* '*/' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:33:8: ( '/*' ( . )* '*/' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:33:10: '/*' ( . )* '*/' { match("/*"); if (state.failed) return; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:33:15: ( . )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:33:15: ( . )* loop2: while (true) { int alt2=2; @@ -690,7 +690,7 @@ public class XLexer extends Lexer { switch (alt2) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:33:15: . + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:33:15: . { matchAny(); if (state.failed) return; } @@ -718,8 +718,8 @@ public class XLexer extends Lexer { // $ANTLR start "LETTER" public final void mLETTER() throws RecognitionException { try { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:36:16: ( 'a' .. 'z' | 'A' .. 'Z' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:36:16: ( 'a' .. 'z' | 'A' .. 'Z' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: { if ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z')||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) { input.consume(); @@ -743,8 +743,8 @@ public class XLexer extends Lexer { // $ANTLR start "POSDIGIT" public final void mPOSDIGIT() throws RecognitionException { try { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:37:18: ( '1' .. '9' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:37:18: ( '1' .. '9' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: { if ( (input.LA(1) >= '1' && input.LA(1) <= '9') ) { input.consume(); @@ -768,8 +768,8 @@ public class XLexer extends Lexer { // $ANTLR start "ZERO" public final void mZERO() throws RecognitionException { try { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:38:14: ( '0' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:38:20: '0' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:38:14: ( '0' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:38:20: '0' { match('0'); if (state.failed) return; } @@ -784,8 +784,8 @@ public class XLexer extends Lexer { // $ANTLR start "DIGIT" public final void mDIGIT() throws RecognitionException { try { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:39:15: ( '0' .. '9' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:39:15: ( '0' .. '9' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: { if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) { input.consume(); @@ -809,7 +809,7 @@ public class XLexer extends Lexer { // $ANTLR start "OTHER" public final void mOTHER() throws RecognitionException { try { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:40:15: ( ' ' | '.' | ':' | '\\\\\"' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:40:15: ( ' ' | '.' | ':' | '\\\\\"' ) int alt3=4; switch ( input.LA(1) ) { case ' ': @@ -840,25 +840,25 @@ public class XLexer extends Lexer { } switch (alt3) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:40:20: ' ' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:40:20: ' ' { match(' '); if (state.failed) return; } break; case 2 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:40:26: '.' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:40:26: '.' { match('.'); if (state.failed) return; } break; case 3 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:40:32: ':' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:40:32: ':' { match(':'); if (state.failed) return; } break; case 4 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:40:38: '\\\\\"' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:40:38: '\\\\\"' { match("\\\""); if (state.failed) return; @@ -878,7 +878,7 @@ public class XLexer extends Lexer { try { int _type = INTCONST; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:43:9: ( ZERO | ( POSDIGIT ( DIGIT )* ) ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:43:9: ( ZERO | ( POSDIGIT ( DIGIT )* ) ) int alt5=2; int LA5_0 = input.LA(1); if ( (LA5_0=='0') ) { @@ -897,21 +897,21 @@ public class XLexer extends Lexer { switch (alt5) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:43:11: ZERO + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:43:11: ZERO { mZERO(); if (state.failed) return; } break; case 2 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:43:18: ( POSDIGIT ( DIGIT )* ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:43:18: ( POSDIGIT ( DIGIT )* ) { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:43:18: ( POSDIGIT ( DIGIT )* ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:43:19: POSDIGIT ( DIGIT )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:43:18: ( POSDIGIT ( DIGIT )* ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:43:19: POSDIGIT ( DIGIT )* { mPOSDIGIT(); if (state.failed) return; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:43:28: ( DIGIT )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:43:28: ( DIGIT )* loop4: while (true) { int alt4=2; @@ -922,7 +922,7 @@ public class XLexer extends Lexer { switch (alt4) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: { if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) { input.consume(); @@ -962,16 +962,16 @@ public class XLexer extends Lexer { try { int _type = FLOATCONST; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:11: ( ( INTCONST ( '.' ( DIGIT )* )? ( 'e' | 'E' ) ( '+' | '-' )? INTCONST )=> INTCONST ( '.' ( DIGIT )* )? ( 'e' | 'E' ) ( '+' | '-' )? INTCONST | INTCONST ( '.' ( DIGIT )* )? ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:11: ( ( INTCONST ( '.' ( DIGIT )* )? ( 'e' | 'E' ) ( '+' | '-' )? INTCONST )=> INTCONST ( '.' ( DIGIT )* )? ( 'e' | 'E' ) ( '+' | '-' )? INTCONST | INTCONST ( '.' ( DIGIT )* )? ) int alt11=2; alt11 = dfa11.predict(input); switch (alt11) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:16: ( INTCONST ( '.' ( DIGIT )* )? ( 'e' | 'E' ) ( '+' | '-' )? INTCONST )=> INTCONST ( '.' ( DIGIT )* )? ( 'e' | 'E' ) ( '+' | '-' )? INTCONST + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:16: ( INTCONST ( '.' ( DIGIT )* )? ( 'e' | 'E' ) ( '+' | '-' )? INTCONST )=> INTCONST ( '.' ( DIGIT )* )? ( 'e' | 'E' ) ( '+' | '-' )? INTCONST { mINTCONST(); if (state.failed) return; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:84: ( '.' ( DIGIT )* )? + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:84: ( '.' ( DIGIT )* )? int alt7=2; int LA7_0 = input.LA(1); if ( (LA7_0=='.') ) { @@ -979,10 +979,10 @@ public class XLexer extends Lexer { } switch (alt7) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:85: '.' ( DIGIT )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:85: '.' ( DIGIT )* { match('.'); if (state.failed) return; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:89: ( DIGIT )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:89: ( DIGIT )* loop6: while (true) { int alt6=2; @@ -993,7 +993,7 @@ public class XLexer extends Lexer { switch (alt6) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: { if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) { input.consume(); @@ -1028,7 +1028,7 @@ public class XLexer extends Lexer { recover(mse); throw mse; } - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:107: ( '+' | '-' )? + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:107: ( '+' | '-' )? int alt8=2; int LA8_0 = input.LA(1); if ( (LA8_0=='+'||LA8_0=='-') ) { @@ -1036,7 +1036,7 @@ public class XLexer extends Lexer { } switch (alt8) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: { if ( input.LA(1)=='+'||input.LA(1)=='-' ) { input.consume(); @@ -1058,11 +1058,11 @@ public class XLexer extends Lexer { } break; case 2 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:46:16: INTCONST ( '.' ( DIGIT )* )? + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:46:16: INTCONST ( '.' ( DIGIT )* )? { mINTCONST(); if (state.failed) return; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:46:25: ( '.' ( DIGIT )* )? + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:46:25: ( '.' ( DIGIT )* )? int alt10=2; int LA10_0 = input.LA(1); if ( (LA10_0=='.') ) { @@ -1070,10 +1070,10 @@ public class XLexer extends Lexer { } switch (alt10) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:46:26: '.' ( DIGIT )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:46:26: '.' ( DIGIT )* { match('.'); if (state.failed) return; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:46:30: ( DIGIT )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:46:30: ( DIGIT )* loop9: while (true) { int alt9=2; @@ -1084,7 +1084,7 @@ public class XLexer extends Lexer { switch (alt9) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: { if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) { input.consume(); @@ -1127,11 +1127,11 @@ public class XLexer extends Lexer { try { int _type = STRINGCONST; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:48:12: ( '\\\"' ( LETTER | DIGIT | OTHER )* '\\\"' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:48:16: '\\\"' ( LETTER | DIGIT | OTHER )* '\\\"' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:48:12: ( '\\\"' ( LETTER | DIGIT | OTHER )* '\\\"' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:48:16: '\\\"' ( LETTER | DIGIT | OTHER )* '\\\"' { match('\"'); if (state.failed) return; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:48:21: ( LETTER | DIGIT | OTHER )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:48:21: ( LETTER | DIGIT | OTHER )* loop12: while (true) { int alt12=4; @@ -1217,21 +1217,21 @@ public class XLexer extends Lexer { } switch (alt12) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:48:22: LETTER + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:48:22: LETTER { mLETTER(); if (state.failed) return; } break; case 2 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:48:29: DIGIT + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:48:29: DIGIT { mDIGIT(); if (state.failed) return; } break; case 3 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:48:35: OTHER + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:48:35: OTHER { mOTHER(); if (state.failed) return; @@ -1260,12 +1260,12 @@ public class XLexer extends Lexer { try { int _type = ID; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:50:3: ( LETTER ( LETTER | DIGIT )* ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:50:11: LETTER ( LETTER | DIGIT )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:50:3: ( LETTER ( LETTER | DIGIT )* ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:50:11: LETTER ( LETTER | DIGIT )* { mLETTER(); if (state.failed) return; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:50:18: ( LETTER | DIGIT )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:50:18: ( LETTER | DIGIT )* loop13: while (true) { int alt13=2; @@ -1276,7 +1276,7 @@ public class XLexer extends Lexer { switch (alt13) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: { if ( (input.LA(1) >= '0' && input.LA(1) <= '9')||(input.LA(1) >= 'A' && input.LA(1) <= 'Z')||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) { input.consume(); @@ -1312,8 +1312,8 @@ public class XLexer extends Lexer { try { int _type = INVALID; int _channel = DEFAULT_TOKEN_CHANNEL; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:52:8: ( . ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:52:11: . + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:52:8: ( . ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:52:11: . { matchAny(); if (state.failed) return; } @@ -1329,236 +1329,236 @@ public class XLexer extends Lexer { @Override public void mTokens() throws RecognitionException { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:8: ( T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | T__39 | T__40 | T__41 | T__42 | T__43 | T__44 | T__45 | WS | COMMENT | INTCONST | FLOATCONST | STRINGCONST | ID | INVALID ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:8: ( T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | T__39 | T__40 | T__41 | T__42 | T__43 | T__44 | T__45 | WS | COMMENT | INTCONST | FLOATCONST | STRINGCONST | ID | INVALID ) int alt14=33; alt14 = dfa14.predict(input); switch (alt14) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:10: T__20 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:10: T__20 { mT__20(); if (state.failed) return; } break; case 2 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:16: T__21 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:16: T__21 { mT__21(); if (state.failed) return; } break; case 3 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:22: T__22 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:22: T__22 { mT__22(); if (state.failed) return; } break; case 4 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:28: T__23 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:28: T__23 { mT__23(); if (state.failed) return; } break; case 5 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:34: T__24 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:34: T__24 { mT__24(); if (state.failed) return; } break; case 6 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:40: T__25 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:40: T__25 { mT__25(); if (state.failed) return; } break; case 7 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:46: T__26 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:46: T__26 { mT__26(); if (state.failed) return; } break; case 8 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:52: T__27 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:52: T__27 { mT__27(); if (state.failed) return; } break; case 9 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:58: T__28 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:58: T__28 { mT__28(); if (state.failed) return; } break; case 10 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:64: T__29 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:64: T__29 { mT__29(); if (state.failed) return; } break; case 11 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:70: T__30 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:70: T__30 { mT__30(); if (state.failed) return; } break; case 12 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:76: T__31 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:76: T__31 { mT__31(); if (state.failed) return; } break; case 13 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:82: T__32 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:82: T__32 { mT__32(); if (state.failed) return; } break; case 14 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:88: T__33 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:88: T__33 { mT__33(); if (state.failed) return; } break; case 15 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:94: T__34 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:94: T__34 { mT__34(); if (state.failed) return; } break; case 16 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:100: T__35 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:100: T__35 { mT__35(); if (state.failed) return; } break; case 17 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:106: T__36 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:106: T__36 { mT__36(); if (state.failed) return; } break; case 18 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:112: T__37 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:112: T__37 { mT__37(); if (state.failed) return; } break; case 19 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:118: T__38 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:118: T__38 { mT__38(); if (state.failed) return; } break; case 20 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:124: T__39 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:124: T__39 { mT__39(); if (state.failed) return; } break; case 21 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:130: T__40 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:130: T__40 { mT__40(); if (state.failed) return; } break; case 22 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:136: T__41 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:136: T__41 { mT__41(); if (state.failed) return; } break; case 23 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:142: T__42 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:142: T__42 { mT__42(); if (state.failed) return; } break; case 24 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:148: T__43 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:148: T__43 { mT__43(); if (state.failed) return; } break; case 25 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:154: T__44 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:154: T__44 { mT__44(); if (state.failed) return; } break; case 26 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:160: T__45 + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:160: T__45 { mT__45(); if (state.failed) return; } break; case 27 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:166: WS + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:166: WS { mWS(); if (state.failed) return; } break; case 28 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:169: COMMENT + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:169: COMMENT { mCOMMENT(); if (state.failed) return; } break; case 29 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:177: INTCONST + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:177: INTCONST { mINTCONST(); if (state.failed) return; } break; case 30 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:186: FLOATCONST + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:186: FLOATCONST { mFLOATCONST(); if (state.failed) return; } break; case 31 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:197: STRINGCONST + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:197: STRINGCONST { mSTRINGCONST(); if (state.failed) return; } break; case 32 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:209: ID + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:209: ID { mID(); if (state.failed) return; } break; case 33 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:212: INVALID + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:1:212: INVALID { mINVALID(); if (state.failed) return; @@ -1570,12 +1570,12 @@ public class XLexer extends Lexer { // $ANTLR start synpred1_X public final void synpred1_X_fragment() throws RecognitionException { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:16: ( INTCONST ( '.' ( DIGIT )* )? ( 'e' | 'E' ) ( '+' | '-' )? INTCONST ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:17: INTCONST ( '.' ( DIGIT )* )? ( 'e' | 'E' ) ( '+' | '-' )? INTCONST + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:16: ( INTCONST ( '.' ( DIGIT )* )? ( 'e' | 'E' ) ( '+' | '-' )? INTCONST ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:17: INTCONST ( '.' ( DIGIT )* )? ( 'e' | 'E' ) ( '+' | '-' )? INTCONST { mINTCONST(); if (state.failed) return; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:26: ( '.' ( DIGIT )* )? + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:26: ( '.' ( DIGIT )* )? int alt16=2; int LA16_0 = input.LA(1); if ( (LA16_0=='.') ) { @@ -1583,10 +1583,10 @@ public class XLexer extends Lexer { } switch (alt16) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:27: '.' ( DIGIT )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:27: '.' ( DIGIT )* { match('.'); if (state.failed) return; - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:31: ( DIGIT )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:31: ( DIGIT )* loop15: while (true) { int alt15=2; @@ -1597,7 +1597,7 @@ public class XLexer extends Lexer { switch (alt15) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: { if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) { input.consume(); @@ -1632,7 +1632,7 @@ public class XLexer extends Lexer { recover(mse); throw mse; } - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:49: ( '+' | '-' )? + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:45:49: ( '+' | '-' )? int alt17=2; int LA17_0 = input.LA(1); if ( (LA17_0=='+'||LA17_0=='-') ) { @@ -1640,7 +1640,7 @@ public class XLexer extends Lexer { } switch (alt17) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g: { if ( input.LA(1)=='+'||input.LA(1)=='-' ) { input.consume(); diff --git a/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XParser.java b/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XParser.java index aad73ef..2f58225 100644 --- a/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XParser.java +++ b/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XParser.java @@ -1,4 +1,4 @@ -// $ANTLR 3.5.2 C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g 2019-05-23 11:51:59 +// $ANTLR 3.5.2 C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g 2020-06-12 16:02:36 package de.dhbw.compiler.antlrxtreegrammar; import org.antlr.runtime.*; @@ -87,7 +87,7 @@ public class XParser extends Parser { return adaptor; } @Override public String[] getTokenNames() { return XParser.tokenNames; } - @Override public String getGrammarFileName() { return "C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g"; } + @Override public String getGrammarFileName() { return "C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g"; } public static class decl_return extends ParserRuleReturnScope { @@ -98,7 +98,7 @@ public class XParser extends Parser { // $ANTLR start "decl" - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:55:1: decl : ( ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' -> ^( DECL ID $type) | 'read' ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' -> ^( DECL ID $type 'read' ) | 'print' ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' -> ^( DECL ID $type 'print' ) | 'read' 'print' ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' -> ^( DECL ID $type 'read' 'print' ) ); + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:55:1: decl : ( ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' -> ^( DECL ID $type) | 'read' ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' -> ^( DECL ID $type 'read' ) | 'print' ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' -> ^( DECL ID $type 'print' ) | 'read' 'print' ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' -> ^( DECL ID $type 'read' 'print' ) ); public final XParser.decl_return decl() throws RecognitionException { XParser.decl_return retval = new XParser.decl_return(); retval.start = input.LT(1); @@ -150,7 +150,7 @@ public class XParser extends Parser { RewriteRuleTokenStream stream_43=new RewriteRuleTokenStream(adaptor,"token 43"); try { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:55:5: ( ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' -> ^( DECL ID $type) | 'read' ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' -> ^( DECL ID $type 'read' ) | 'print' ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' -> ^( DECL ID $type 'print' ) | 'read' 'print' ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' -> ^( DECL ID $type 'read' 'print' ) ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:55:5: ( ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' -> ^( DECL ID $type) | 'read' ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' -> ^( DECL ID $type 'read' ) | 'print' ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' -> ^( DECL ID $type 'print' ) | 'read' 'print' ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' -> ^( DECL ID $type 'read' 'print' ) ) int alt5=4; switch ( input.LA(1) ) { case ID: @@ -194,7 +194,7 @@ public class XParser extends Parser { } switch (alt5) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:55:14: ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:55:14: ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' { ID1=(Token)match(input,ID,FOLLOW_ID_in_decl395); stream_ID.add(ID1); @@ -202,7 +202,7 @@ public class XParser extends Parser { char_literal2=(Token)match(input,27,FOLLOW_27_in_decl397); stream_27.add(char_literal2); - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:55:21: (type= 'int' |type= 'float' |type= 'string' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:55:21: (type= 'int' |type= 'float' |type= 'string' ) int alt1=3; switch ( input.LA(1) ) { case 39: @@ -227,7 +227,7 @@ public class XParser extends Parser { } switch (alt1) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:55:22: type= 'int' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:55:22: type= 'int' { type=(Token)match(input,39,FOLLOW_39_in_decl402); stream_39.add(type); @@ -235,7 +235,7 @@ public class XParser extends Parser { } break; case 2 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:55:35: type= 'float' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:55:35: type= 'float' { type=(Token)match(input,36,FOLLOW_36_in_decl408); stream_36.add(type); @@ -243,7 +243,7 @@ public class XParser extends Parser { } break; case 3 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:55:50: type= 'string' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:55:50: type= 'string' { type=(Token)match(input,43,FOLLOW_43_in_decl414); stream_43.add(type); @@ -270,7 +270,7 @@ public class XParser extends Parser { root_0 = (CommonTree)adaptor.nil(); // 55:69: -> ^( DECL ID $type) { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:55:72: ^( DECL ID $type) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:55:72: ^( DECL ID $type) { CommonTree root_1 = (CommonTree)adaptor.nil(); root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(DECL, "DECL"), root_1); @@ -287,7 +287,7 @@ public class XParser extends Parser { } break; case 2 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:56:14: 'read' ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:56:14: 'read' ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' { string_literal4=(Token)match(input,42,FOLLOW_42_in_decl443); stream_42.add(string_literal4); @@ -298,7 +298,7 @@ public class XParser extends Parser { char_literal6=(Token)match(input,27,FOLLOW_27_in_decl447); stream_27.add(char_literal6); - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:56:28: (type= 'int' |type= 'float' |type= 'string' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:56:28: (type= 'int' |type= 'float' |type= 'string' ) int alt2=3; switch ( input.LA(1) ) { case 39: @@ -323,7 +323,7 @@ public class XParser extends Parser { } switch (alt2) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:56:29: type= 'int' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:56:29: type= 'int' { type=(Token)match(input,39,FOLLOW_39_in_decl452); stream_39.add(type); @@ -331,7 +331,7 @@ public class XParser extends Parser { } break; case 2 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:56:42: type= 'float' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:56:42: type= 'float' { type=(Token)match(input,36,FOLLOW_36_in_decl458); stream_36.add(type); @@ -339,7 +339,7 @@ public class XParser extends Parser { } break; case 3 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:56:57: type= 'string' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:56:57: type= 'string' { type=(Token)match(input,43,FOLLOW_43_in_decl464); stream_43.add(type); @@ -353,7 +353,7 @@ public class XParser extends Parser { stream_29.add(char_literal7); // AST REWRITE - // elements: 42, type, ID + // elements: ID, type, 42 // token labels: type // rule labels: retval // token list labels: @@ -366,7 +366,7 @@ public class XParser extends Parser { root_0 = (CommonTree)adaptor.nil(); // 56:76: -> ^( DECL ID $type 'read' ) { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:56:79: ^( DECL ID $type 'read' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:56:79: ^( DECL ID $type 'read' ) { CommonTree root_1 = (CommonTree)adaptor.nil(); root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(DECL, "DECL"), root_1); @@ -384,7 +384,7 @@ public class XParser extends Parser { } break; case 3 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:57:14: 'print' ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:57:14: 'print' ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' { string_literal8=(Token)match(input,40,FOLLOW_40_in_decl495); stream_40.add(string_literal8); @@ -395,7 +395,7 @@ public class XParser extends Parser { char_literal10=(Token)match(input,27,FOLLOW_27_in_decl499); stream_27.add(char_literal10); - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:57:29: (type= 'int' |type= 'float' |type= 'string' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:57:29: (type= 'int' |type= 'float' |type= 'string' ) int alt3=3; switch ( input.LA(1) ) { case 39: @@ -420,7 +420,7 @@ public class XParser extends Parser { } switch (alt3) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:57:30: type= 'int' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:57:30: type= 'int' { type=(Token)match(input,39,FOLLOW_39_in_decl504); stream_39.add(type); @@ -428,7 +428,7 @@ public class XParser extends Parser { } break; case 2 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:57:43: type= 'float' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:57:43: type= 'float' { type=(Token)match(input,36,FOLLOW_36_in_decl510); stream_36.add(type); @@ -436,7 +436,7 @@ public class XParser extends Parser { } break; case 3 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:57:58: type= 'string' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:57:58: type= 'string' { type=(Token)match(input,43,FOLLOW_43_in_decl516); stream_43.add(type); @@ -450,7 +450,7 @@ public class XParser extends Parser { stream_29.add(char_literal11); // AST REWRITE - // elements: ID, 40, type + // elements: type, 40, ID // token labels: type // rule labels: retval // token list labels: @@ -463,7 +463,7 @@ public class XParser extends Parser { root_0 = (CommonTree)adaptor.nil(); // 57:77: -> ^( DECL ID $type 'print' ) { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:57:80: ^( DECL ID $type 'print' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:57:80: ^( DECL ID $type 'print' ) { CommonTree root_1 = (CommonTree)adaptor.nil(); root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(DECL, "DECL"), root_1); @@ -481,7 +481,7 @@ public class XParser extends Parser { } break; case 4 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:58:14: 'read' 'print' ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:58:14: 'read' 'print' ID ':' (type= 'int' |type= 'float' |type= 'string' ) ';' { string_literal12=(Token)match(input,42,FOLLOW_42_in_decl547); stream_42.add(string_literal12); @@ -495,7 +495,7 @@ public class XParser extends Parser { char_literal15=(Token)match(input,27,FOLLOW_27_in_decl553); stream_27.add(char_literal15); - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:58:36: (type= 'int' |type= 'float' |type= 'string' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:58:36: (type= 'int' |type= 'float' |type= 'string' ) int alt4=3; switch ( input.LA(1) ) { case 39: @@ -520,7 +520,7 @@ public class XParser extends Parser { } switch (alt4) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:58:37: type= 'int' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:58:37: type= 'int' { type=(Token)match(input,39,FOLLOW_39_in_decl558); stream_39.add(type); @@ -528,7 +528,7 @@ public class XParser extends Parser { } break; case 2 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:58:50: type= 'float' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:58:50: type= 'float' { type=(Token)match(input,36,FOLLOW_36_in_decl564); stream_36.add(type); @@ -536,7 +536,7 @@ public class XParser extends Parser { } break; case 3 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:58:65: type= 'string' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:58:65: type= 'string' { type=(Token)match(input,43,FOLLOW_43_in_decl570); stream_43.add(type); @@ -550,7 +550,7 @@ public class XParser extends Parser { stream_29.add(char_literal16); // AST REWRITE - // elements: ID, type, 40, 42 + // elements: 42, type, 40, ID // token labels: type // rule labels: retval // token list labels: @@ -563,7 +563,7 @@ public class XParser extends Parser { root_0 = (CommonTree)adaptor.nil(); // 58:84: -> ^( DECL ID $type 'read' 'print' ) { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:58:87: ^( DECL ID $type 'read' 'print' ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:58:87: ^( DECL ID $type 'read' 'print' ) { CommonTree root_1 = (CommonTree)adaptor.nil(); root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(DECL, "DECL"), root_1); @@ -610,7 +610,7 @@ public class XParser extends Parser { // $ANTLR start "decllist" - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:60:1: decllist : ( decl )* -> ^( DECLLIST ( decl )* ) ; + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:60:1: decllist : ( decl )* -> ^( DECLLIST ( decl )* ) ; public final XParser.decllist_return decllist() throws RecognitionException { XParser.decllist_return retval = new XParser.decllist_return(); retval.start = input.LT(1); @@ -622,10 +622,10 @@ public class XParser extends Parser { RewriteRuleSubtreeStream stream_decl=new RewriteRuleSubtreeStream(adaptor,"rule decl"); try { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:60:9: ( ( decl )* -> ^( DECLLIST ( decl )* ) ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:60:15: ( decl )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:60:9: ( ( decl )* -> ^( DECLLIST ( decl )* ) ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:60:15: ( decl )* { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:60:15: ( decl )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:60:15: ( decl )* loop6: while (true) { int alt6=2; @@ -636,7 +636,7 @@ public class XParser extends Parser { switch (alt6) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:60:15: decl + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:60:15: decl { pushFollow(FOLLOW_decl_in_decllist599); decl17=decl(); @@ -664,11 +664,11 @@ public class XParser extends Parser { root_0 = (CommonTree)adaptor.nil(); // 60:22: -> ^( DECLLIST ( decl )* ) { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:60:25: ^( DECLLIST ( decl )* ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:60:25: ^( DECLLIST ( decl )* ) { CommonTree root_1 = (CommonTree)adaptor.nil(); root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(DECLLIST, "DECLLIST"), root_1); - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:60:36: ( decl )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:60:36: ( decl )* while ( stream_decl.hasNext() ) { adaptor.addChild(root_1, stream_decl.nextTree()); } @@ -711,7 +711,7 @@ public class XParser extends Parser { // $ANTLR start "expr" - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:63:1: expr : multexpr ( ( '+' ^| '-' ^) multexpr )* ; + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:63:1: expr : multexpr ( ( '+' ^| '-' ^) multexpr )* ; public final XParser.expr_return expr() throws RecognitionException { XParser.expr_return retval = new XParser.expr_return(); retval.start = input.LT(1); @@ -727,8 +727,8 @@ public class XParser extends Parser { CommonTree char_literal20_tree=null; try { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:63:5: ( multexpr ( ( '+' ^| '-' ^) multexpr )* ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:63:15: multexpr ( ( '+' ^| '-' ^) multexpr )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:63:5: ( multexpr ( ( '+' ^| '-' ^) multexpr )* ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:63:15: multexpr ( ( '+' ^| '-' ^) multexpr )* { root_0 = (CommonTree)adaptor.nil(); @@ -739,7 +739,7 @@ public class XParser extends Parser { adaptor.addChild(root_0, multexpr18.getTree()); - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:63:24: ( ( '+' ^| '-' ^) multexpr )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:63:24: ( ( '+' ^| '-' ^) multexpr )* loop8: while (true) { int alt8=2; @@ -750,9 +750,9 @@ public class XParser extends Parser { switch (alt8) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:63:25: ( '+' ^| '-' ^) multexpr + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:63:25: ( '+' ^| '-' ^) multexpr { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:63:25: ( '+' ^| '-' ^) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:63:25: ( '+' ^| '-' ^) int alt7=2; int LA7_0 = input.LA(1); if ( (LA7_0==23) ) { @@ -770,7 +770,7 @@ public class XParser extends Parser { switch (alt7) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:63:26: '+' ^ + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:63:26: '+' ^ { char_literal19=(Token)match(input,23,FOLLOW_23_in_expr630); char_literal19_tree = (CommonTree)adaptor.create(char_literal19); @@ -779,7 +779,7 @@ public class XParser extends Parser { } break; case 2 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:63:33: '-' ^ + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:63:33: '-' ^ { char_literal20=(Token)match(input,24,FOLLOW_24_in_expr635); char_literal20_tree = (CommonTree)adaptor.create(char_literal20); @@ -833,7 +833,7 @@ public class XParser extends Parser { // $ANTLR start "multexpr" - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:64:1: multexpr : simpleexpr ( ( '*' ^| '/' ^) simpleexpr )* ; + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:64:1: multexpr : simpleexpr ( ( '*' ^| '/' ^) simpleexpr )* ; public final XParser.multexpr_return multexpr() throws RecognitionException { XParser.multexpr_return retval = new XParser.multexpr_return(); retval.start = input.LT(1); @@ -849,8 +849,8 @@ public class XParser extends Parser { CommonTree char_literal24_tree=null; try { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:64:9: ( simpleexpr ( ( '*' ^| '/' ^) simpleexpr )* ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:64:14: simpleexpr ( ( '*' ^| '/' ^) simpleexpr )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:64:9: ( simpleexpr ( ( '*' ^| '/' ^) simpleexpr )* ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:64:14: simpleexpr ( ( '*' ^| '/' ^) simpleexpr )* { root_0 = (CommonTree)adaptor.nil(); @@ -861,7 +861,7 @@ public class XParser extends Parser { adaptor.addChild(root_0, simpleexpr22.getTree()); - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:64:25: ( ( '*' ^| '/' ^) simpleexpr )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:64:25: ( ( '*' ^| '/' ^) simpleexpr )* loop10: while (true) { int alt10=2; @@ -872,9 +872,9 @@ public class XParser extends Parser { switch (alt10) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:64:26: ( '*' ^| '/' ^) simpleexpr + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:64:26: ( '*' ^| '/' ^) simpleexpr { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:64:26: ( '*' ^| '/' ^) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:64:26: ( '*' ^| '/' ^) int alt9=2; int LA9_0 = input.LA(1); if ( (LA9_0==22) ) { @@ -892,7 +892,7 @@ public class XParser extends Parser { switch (alt9) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:64:27: '*' ^ + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:64:27: '*' ^ { char_literal23=(Token)match(input,22,FOLLOW_22_in_multexpr654); char_literal23_tree = (CommonTree)adaptor.create(char_literal23); @@ -901,7 +901,7 @@ public class XParser extends Parser { } break; case 2 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:64:34: '/' ^ + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:64:34: '/' ^ { char_literal24=(Token)match(input,26,FOLLOW_26_in_multexpr659); char_literal24_tree = (CommonTree)adaptor.create(char_literal24); @@ -955,7 +955,7 @@ public class XParser extends Parser { // $ANTLR start "simpleexpr" - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:65:1: simpleexpr : ( '(' ! expr ')' !| INTCONST | '-' INTCONST -> ^( UMINUS INTCONST ) | FLOATCONST | '-' FLOATCONST -> ^( UMINUS FLOATCONST ) | ID | STRINGCONST ); + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:65:1: simpleexpr : ( '(' ! expr ')' !| INTCONST | '-' INTCONST -> ^( UMINUS INTCONST ) | FLOATCONST | '-' FLOATCONST -> ^( UMINUS FLOATCONST ) | ID | STRINGCONST ); public final XParser.simpleexpr_return simpleexpr() throws RecognitionException { XParser.simpleexpr_return retval = new XParser.simpleexpr_return(); retval.start = input.LT(1); @@ -989,7 +989,7 @@ public class XParser extends Parser { RewriteRuleTokenStream stream_INTCONST=new RewriteRuleTokenStream(adaptor,"token INTCONST"); try { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:65:11: ( '(' ! expr ')' !| INTCONST | '-' INTCONST -> ^( UMINUS INTCONST ) | FLOATCONST | '-' FLOATCONST -> ^( UMINUS FLOATCONST ) | ID | STRINGCONST ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:65:11: ( '(' ! expr ')' !| INTCONST | '-' INTCONST -> ^( UMINUS INTCONST ) | FLOATCONST | '-' FLOATCONST -> ^( UMINUS FLOATCONST ) | ID | STRINGCONST ) int alt11=7; switch ( input.LA(1) ) { case 20: @@ -1048,7 +1048,7 @@ public class XParser extends Parser { } switch (alt11) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:65:15: '(' ! expr ')' ! + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:65:15: '(' ! expr ')' ! { root_0 = (CommonTree)adaptor.nil(); @@ -1064,7 +1064,7 @@ public class XParser extends Parser { } break; case 2 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:66:15: INTCONST + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:66:15: INTCONST { root_0 = (CommonTree)adaptor.nil(); @@ -1076,7 +1076,7 @@ public class XParser extends Parser { } break; case 3 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:66:26: '-' INTCONST + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:66:26: '-' INTCONST { char_literal30=(Token)match(input,24,FOLLOW_24_in_simpleexpr700); stream_24.add(char_literal30); @@ -1097,7 +1097,7 @@ public class XParser extends Parser { root_0 = (CommonTree)adaptor.nil(); // 66:39: -> ^( UMINUS INTCONST ) { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:66:42: ^( UMINUS INTCONST ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:66:42: ^( UMINUS INTCONST ) { CommonTree root_1 = (CommonTree)adaptor.nil(); root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(UMINUS, "UMINUS"), root_1); @@ -1113,7 +1113,7 @@ public class XParser extends Parser { } break; case 4 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:67:15: FLOATCONST + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:67:15: FLOATCONST { root_0 = (CommonTree)adaptor.nil(); @@ -1125,7 +1125,7 @@ public class XParser extends Parser { } break; case 5 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:67:28: '-' FLOATCONST + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:67:28: '-' FLOATCONST { char_literal33=(Token)match(input,24,FOLLOW_24_in_simpleexpr730); stream_24.add(char_literal33); @@ -1146,7 +1146,7 @@ public class XParser extends Parser { root_0 = (CommonTree)adaptor.nil(); // 67:43: -> ^( UMINUS FLOATCONST ) { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:67:46: ^( UMINUS FLOATCONST ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:67:46: ^( UMINUS FLOATCONST ) { CommonTree root_1 = (CommonTree)adaptor.nil(); root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(UMINUS, "UMINUS"), root_1); @@ -1162,7 +1162,7 @@ public class XParser extends Parser { } break; case 6 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:68:15: ID + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:68:15: ID { root_0 = (CommonTree)adaptor.nil(); @@ -1174,7 +1174,7 @@ public class XParser extends Parser { } break; case 7 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:68:20: STRINGCONST + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:68:20: STRINGCONST { root_0 = (CommonTree)adaptor.nil(); @@ -1214,7 +1214,7 @@ public class XParser extends Parser { // $ANTLR start "assignstat" - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:71:1: assignstat : ID ':=' ^ expr ; + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:71:1: assignstat : ID ':=' ^ expr ; public final XParser.assignstat_return assignstat() throws RecognitionException { XParser.assignstat_return retval = new XParser.assignstat_return(); retval.start = input.LT(1); @@ -1229,8 +1229,8 @@ public class XParser extends Parser { CommonTree string_literal38_tree=null; try { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:71:11: ( ID ':=' ^ expr ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:71:15: ID ':=' ^ expr + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:71:11: ( ID ':=' ^ expr ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:71:15: ID ':=' ^ expr { root_0 = (CommonTree)adaptor.nil(); @@ -1278,7 +1278,7 @@ public class XParser extends Parser { // $ANTLR start "cond" - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:74:1: cond : expr ( '<' ^| '>' ^| '=' ^) expr ; + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:74:1: cond : expr ( '<' ^| '>' ^| '=' ^) expr ; public final XParser.cond_return cond() throws RecognitionException { XParser.cond_return retval = new XParser.cond_return(); retval.start = input.LT(1); @@ -1296,8 +1296,8 @@ public class XParser extends Parser { CommonTree char_literal43_tree=null; try { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:74:5: ( expr ( '<' ^| '>' ^| '=' ^) expr ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:74:15: expr ( '<' ^| '>' ^| '=' ^) expr + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:74:5: ( expr ( '<' ^| '>' ^| '=' ^) expr ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:74:15: expr ( '<' ^| '>' ^| '=' ^) expr { root_0 = (CommonTree)adaptor.nil(); @@ -1308,7 +1308,7 @@ public class XParser extends Parser { adaptor.addChild(root_0, expr40.getTree()); - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:74:20: ( '<' ^| '>' ^| '=' ^) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:74:20: ( '<' ^| '>' ^| '=' ^) int alt12=3; switch ( input.LA(1) ) { case 30: @@ -1333,7 +1333,7 @@ public class XParser extends Parser { } switch (alt12) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:74:21: '<' ^ + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:74:21: '<' ^ { char_literal41=(Token)match(input,30,FOLLOW_30_in_cond794); char_literal41_tree = (CommonTree)adaptor.create(char_literal41); @@ -1342,7 +1342,7 @@ public class XParser extends Parser { } break; case 2 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:74:27: '>' ^ + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:74:27: '>' ^ { char_literal42=(Token)match(input,32,FOLLOW_32_in_cond798); char_literal42_tree = (CommonTree)adaptor.create(char_literal42); @@ -1351,7 +1351,7 @@ public class XParser extends Parser { } break; case 3 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:74:33: '=' ^ + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:74:33: '=' ^ { char_literal43=(Token)match(input,31,FOLLOW_31_in_cond802); char_literal43_tree = (CommonTree)adaptor.create(char_literal43); @@ -1397,7 +1397,7 @@ public class XParser extends Parser { // $ANTLR start "condstat" - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:77:1: condstat : 'if' ^ cond 'then' ! stat ( options {greedy=true; } : 'else' ! stat )? ; + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:77:1: condstat : 'if' ^ cond 'then' ! stat ( options {greedy=true; } : 'else' ! stat )? ; public final XParser.condstat_return condstat() throws RecognitionException { XParser.condstat_return retval = new XParser.condstat_return(); retval.start = input.LT(1); @@ -1416,8 +1416,8 @@ public class XParser extends Parser { CommonTree string_literal49_tree=null; try { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:77:9: ( 'if' ^ cond 'then' ! stat ( options {greedy=true; } : 'else' ! stat )? ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:77:15: 'if' ^ cond 'then' ! stat ( options {greedy=true; } : 'else' ! stat )? + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:77:9: ( 'if' ^ cond 'then' ! stat ( options {greedy=true; } : 'else' ! stat )? ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:77:15: 'if' ^ cond 'then' ! stat ( options {greedy=true; } : 'else' ! stat )? { root_0 = (CommonTree)adaptor.nil(); @@ -1439,7 +1439,7 @@ public class XParser extends Parser { adaptor.addChild(root_0, stat48.getTree()); - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:77:40: ( options {greedy=true; } : 'else' ! stat )? + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:77:40: ( options {greedy=true; } : 'else' ! stat )? int alt13=2; int LA13_0 = input.LA(1); if ( (LA13_0==34) ) { @@ -1447,7 +1447,7 @@ public class XParser extends Parser { } switch (alt13) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:77:65: 'else' ! stat + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:77:65: 'else' ! stat { string_literal49=(Token)match(input,34,FOLLOW_34_in_condstat839); pushFollow(FOLLOW_stat_in_condstat842); @@ -1490,7 +1490,7 @@ public class XParser extends Parser { // $ANTLR start "whilestat" - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:80:1: whilestat : 'while' '(' cond ')' stat -> ^( 'while' cond stat ) ; + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:80:1: whilestat : 'while' '(' cond ')' stat -> ^( 'while' cond stat ) ; public final XParser.whilestat_return whilestat() throws RecognitionException { XParser.whilestat_return retval = new XParser.whilestat_return(); retval.start = input.LT(1); @@ -1513,8 +1513,8 @@ public class XParser extends Parser { RewriteRuleSubtreeStream stream_cond=new RewriteRuleSubtreeStream(adaptor,"rule cond"); try { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:80:10: ( 'while' '(' cond ')' stat -> ^( 'while' cond stat ) ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:80:15: 'while' '(' cond ')' stat + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:80:10: ( 'while' '(' cond ')' stat -> ^( 'while' cond stat ) ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:80:15: 'while' '(' cond ')' stat { string_literal51=(Token)match(input,45,FOLLOW_45_in_whilestat855); stream_45.add(string_literal51); @@ -1548,7 +1548,7 @@ public class XParser extends Parser { root_0 = (CommonTree)adaptor.nil(); // 80:41: -> ^( 'while' cond stat ) { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:80:44: ^( 'while' cond stat ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:80:44: ^( 'while' cond stat ) { CommonTree root_1 = (CommonTree)adaptor.nil(); root_1 = (CommonTree)adaptor.becomeRoot(stream_45.nextNode(), root_1); @@ -1591,7 +1591,7 @@ public class XParser extends Parser { // $ANTLR start "forstat" - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:81:1: forstat : 'for' ^ '(' ! assignstat ';' ! cond ';' ! assignstat ')' ! stat ; + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:81:1: forstat : 'for' ^ '(' ! assignstat ';' ! cond ';' ! assignstat ')' ! stat ; public final XParser.forstat_return forstat() throws RecognitionException { XParser.forstat_return retval = new XParser.forstat_return(); retval.start = input.LT(1); @@ -1615,8 +1615,8 @@ public class XParser extends Parser { CommonTree char_literal63_tree=null; try { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:81:8: ( 'for' ^ '(' ! assignstat ';' ! cond ';' ! assignstat ')' ! stat ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:81:15: 'for' ^ '(' ! assignstat ';' ! cond ';' ! assignstat ')' ! stat + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:81:8: ( 'for' ^ '(' ! assignstat ';' ! cond ';' ! assignstat ')' ! stat ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:81:15: 'for' ^ '(' ! assignstat ';' ! cond ';' ! assignstat ')' ! stat { root_0 = (CommonTree)adaptor.nil(); @@ -1682,7 +1682,7 @@ public class XParser extends Parser { // $ANTLR start "stat" - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:84:1: stat : ( assignstat | condstat | whilestat | forstat | statlist ); + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:84:1: stat : ( assignstat | condstat | whilestat | forstat | statlist ); public final XParser.stat_return stat() throws RecognitionException { XParser.stat_return retval = new XParser.stat_return(); retval.start = input.LT(1); @@ -1697,7 +1697,7 @@ public class XParser extends Parser { try { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:84:5: ( assignstat | condstat | whilestat | forstat | statlist ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:84:5: ( assignstat | condstat | whilestat | forstat | statlist ) int alt14=5; switch ( input.LA(1) ) { case ID: @@ -1732,7 +1732,7 @@ public class XParser extends Parser { } switch (alt14) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:84:15: assignstat + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:84:15: assignstat { root_0 = (CommonTree)adaptor.nil(); @@ -1746,7 +1746,7 @@ public class XParser extends Parser { } break; case 2 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:84:28: condstat + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:84:28: condstat { root_0 = (CommonTree)adaptor.nil(); @@ -1760,7 +1760,7 @@ public class XParser extends Parser { } break; case 3 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:84:39: whilestat + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:84:39: whilestat { root_0 = (CommonTree)adaptor.nil(); @@ -1774,7 +1774,7 @@ public class XParser extends Parser { } break; case 4 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:84:51: forstat + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:84:51: forstat { root_0 = (CommonTree)adaptor.nil(); @@ -1788,7 +1788,7 @@ public class XParser extends Parser { } break; case 5 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:84:61: statlist + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:84:61: statlist { root_0 = (CommonTree)adaptor.nil(); @@ -1830,7 +1830,7 @@ public class XParser extends Parser { // $ANTLR start "statlist" - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:86:1: statlist : 'begin' ( stat ';' )* 'end' -> ^( STATLIST ( stat )* ) ; + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:86:1: statlist : 'begin' ( stat ';' )* 'end' -> ^( STATLIST ( stat )* ) ; public final XParser.statlist_return statlist() throws RecognitionException { XParser.statlist_return retval = new XParser.statlist_return(); retval.start = input.LT(1); @@ -1851,13 +1851,13 @@ public class XParser extends Parser { RewriteRuleSubtreeStream stream_stat=new RewriteRuleSubtreeStream(adaptor,"rule stat"); try { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:86:9: ( 'begin' ( stat ';' )* 'end' -> ^( STATLIST ( stat )* ) ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:86:18: 'begin' ( stat ';' )* 'end' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:86:9: ( 'begin' ( stat ';' )* 'end' -> ^( STATLIST ( stat )* ) ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:86:18: 'begin' ( stat ';' )* 'end' { string_literal70=(Token)match(input,33,FOLLOW_33_in_statlist951); stream_33.add(string_literal70); - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:86:26: ( stat ';' )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:86:26: ( stat ';' )* loop15: while (true) { int alt15=2; @@ -1868,7 +1868,7 @@ public class XParser extends Parser { switch (alt15) { case 1 : - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:86:27: stat ';' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:86:27: stat ';' { pushFollow(FOLLOW_stat_in_statlist954); stat71=stat(); @@ -1902,11 +1902,11 @@ public class XParser extends Parser { root_0 = (CommonTree)adaptor.nil(); // 86:45: -> ^( STATLIST ( stat )* ) { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:86:48: ^( STATLIST ( stat )* ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:86:48: ^( STATLIST ( stat )* ) { CommonTree root_1 = (CommonTree)adaptor.nil(); root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(STATLIST, "STATLIST"), root_1); - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:86:59: ( stat )* + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:86:59: ( stat )* while ( stream_stat.hasNext() ) { adaptor.addChild(root_1, stream_stat.nextTree()); } @@ -1949,7 +1949,7 @@ public class XParser extends Parser { // $ANTLR start "program" - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:89:1: program : 'program' ID ';' decllist statlist '.' EOF -> ^( 'program' ID decllist statlist ) ; + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:89:1: program : 'program' ID ';' decllist statlist '.' EOF -> ^( 'program' ID decllist statlist ) ; public final XParser.program_return program() throws RecognitionException { XParser.program_return retval = new XParser.program_return(); retval.start = input.LT(1); @@ -1978,8 +1978,8 @@ public class XParser extends Parser { RewriteRuleSubtreeStream stream_statlist=new RewriteRuleSubtreeStream(adaptor,"rule statlist"); try { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:89:8: ( 'program' ID ';' decllist statlist '.' EOF -> ^( 'program' ID decllist statlist ) ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:89:15: 'program' ID ';' decllist statlist '.' EOF + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:89:8: ( 'program' ID ';' decllist statlist '.' EOF -> ^( 'program' ID decllist statlist ) ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:89:15: 'program' ID ';' decllist statlist '.' EOF { string_literal74=(Token)match(input,41,FOLLOW_41_in_program983); stream_41.add(string_literal74); @@ -2007,7 +2007,7 @@ public class XParser extends Parser { stream_EOF.add(EOF80); // AST REWRITE - // elements: 41, statlist, ID, decllist + // elements: 41, decllist, ID, statlist // token labels: // rule labels: retval // token list labels: @@ -2019,7 +2019,7 @@ public class XParser extends Parser { root_0 = (CommonTree)adaptor.nil(); // 89:58: -> ^( 'program' ID decllist statlist ) { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_cc\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:89:61: ^( 'program' ID decllist statlist ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\X.g:89:61: ^( 'program' ID decllist statlist ) { CommonTree root_1 = (CommonTree)adaptor.nil(); root_1 = (CommonTree)adaptor.becomeRoot(stream_41.nextNode(), root_1); diff --git a/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XTreeGrammar.g b/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XTreeGrammar.g index af309e2..9149f44 100644 --- a/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XTreeGrammar.g +++ b/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XTreeGrammar.g @@ -1,14 +1,3 @@ -/* ********************************************** - * 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 - * - * ********************************************** - */ - tree grammar XTreeGrammar; options { @@ -20,7 +9,24 @@ options { @header {package de.dhbw.compiler.antlrxtreegrammar;} +decl: ^(DECL ID ('int' | 'float' | 'string') 'read'? 'print'?); +decllist: ^(DECLLIST decl*); -program: 'todo'; +expr: ^(('+' | '-' | '*' | '/') expr expr) + | ^(UMINUS (INTCONST | FLOATCONST)) + | INTCONST | FLOATCONST | STRINGCONST | ID; +assignstat: ^(':=' ID expr); + +cond: ^(('<' | '>' | '=') expr expr); +condstat: ^('if' cond stat stat?); + +whilestat: ^('while' cond stat); +forstat: ^('for' assignstat cond assignstat stat); + +stat: assignstat | condstat | whilestat | forstat | statlist; + +statlist: ^(STATLIST stat*); + +program: ^('program' ID decllist statlist); diff --git a/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XTreeGrammar.java b/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XTreeGrammar.java index d7a6a25..6ab77cf 100644 --- a/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XTreeGrammar.java +++ b/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XTreeGrammar.java @@ -1,4 +1,4 @@ -// $ANTLR 3.5.2 C:\\Users\\eisenbiegler\\Dropbox\\workspace_üb\\ÜB-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g 2019-02-19 10:21:04 +// $ANTLR 3.5.2 C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g 2020-06-12 16:02:49 package de.dhbw.compiler.antlrxtreegrammar; import org.antlr.runtime.*; @@ -16,8 +16,7 @@ public class XTreeGrammar extends TreeParser { "POSDIGIT", "STATLIST", "STRINGCONST", "UMINUS", "WS", "ZERO", "'('", "')'", "'*'", "'+'", "'-'", "'.'", "'/'", "':'", "':='", "';'", "'<'", "'='", "'>'", "'begin'", "'else'", "'end'", "'float'", "'for'", "'if'", - "'int'", "'print'", "'program'", "'read'", "'string'", "'then'", "'while'", - "'todo'" + "'int'", "'print'", "'program'", "'read'", "'string'", "'then'", "'while'" }; public static final int EOF=-1; public static final int T__20=20; @@ -62,7 +61,6 @@ public class XTreeGrammar extends TreeParser { public static final int UMINUS=17; public static final int WS=18; public static final int ZERO=19; - public static final int T__46=46; // delegates public TreeParser[] getDelegates() { @@ -88,7 +86,1202 @@ public class XTreeGrammar extends TreeParser { return adaptor; } @Override public String[] getTokenNames() { return XTreeGrammar.tokenNames; } - @Override public String getGrammarFileName() { return "C:\\Users\\eisenbiegler\\Dropbox\\workspace_üb\\ÜB-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g"; } + @Override public String getGrammarFileName() { return "C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g"; } + + + public static class decl_return extends TreeRuleReturnScope { + CommonTree tree; + @Override + public CommonTree getTree() { return tree; } + }; + + + // $ANTLR start "decl" + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:12:1: decl : ^( DECL ID ( 'int' | 'float' | 'string' ) ( 'read' )? ( 'print' )? ) ; + public final XTreeGrammar.decl_return decl() throws RecognitionException { + XTreeGrammar.decl_return retval = new XTreeGrammar.decl_return(); + retval.start = input.LT(1); + + CommonTree root_0 = null; + + CommonTree _first_0 = null; + CommonTree _last = null; + + + CommonTree DECL1=null; + CommonTree ID2=null; + CommonTree set3=null; + CommonTree string_literal4=null; + CommonTree string_literal5=null; + + CommonTree DECL1_tree=null; + CommonTree ID2_tree=null; + CommonTree set3_tree=null; + CommonTree string_literal4_tree=null; + CommonTree string_literal5_tree=null; + + try { + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:12:5: ( ^( DECL ID ( 'int' | 'float' | 'string' ) ( 'read' )? ( 'print' )? ) ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:12:13: ^( DECL ID ( 'int' | 'float' | 'string' ) ( 'read' )? ( 'print' )? ) + { + root_0 = (CommonTree)adaptor.nil(); + + + _last = (CommonTree)input.LT(1); + { + CommonTree _save_last_1 = _last; + CommonTree _first_1 = null; + CommonTree root_1 = (CommonTree)adaptor.nil(); + _last = (CommonTree)input.LT(1); + DECL1=(CommonTree)match(input,DECL,FOLLOW_DECL_in_decl65); + DECL1_tree = (CommonTree)adaptor.dupNode(DECL1); + + + root_1 = (CommonTree)adaptor.becomeRoot(DECL1_tree, root_1); + + match(input, Token.DOWN, null); + _last = (CommonTree)input.LT(1); + ID2=(CommonTree)match(input,ID,FOLLOW_ID_in_decl67); + ID2_tree = (CommonTree)adaptor.dupNode(ID2); + + + adaptor.addChild(root_1, ID2_tree); + + _last = (CommonTree)input.LT(1); + set3=(CommonTree)input.LT(1); + if ( input.LA(1)==36||input.LA(1)==39||input.LA(1)==43 ) { + input.consume(); + set3_tree = (CommonTree)adaptor.dupNode(set3); + + + adaptor.addChild(root_1, set3_tree); + + state.errorRecovery=false; + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + throw mse; + } + + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:12:52: ( 'read' )? + int alt1=2; + int LA1_0 = input.LA(1); + if ( (LA1_0==42) ) { + alt1=1; + } + switch (alt1) { + case 1 : + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:12:52: 'read' + { + _last = (CommonTree)input.LT(1); + string_literal4=(CommonTree)match(input,42,FOLLOW_42_in_decl81); + string_literal4_tree = (CommonTree)adaptor.dupNode(string_literal4); + + + adaptor.addChild(root_1, string_literal4_tree); + + } + break; + + } + + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:12:60: ( 'print' )? + int alt2=2; + int LA2_0 = input.LA(1); + if ( (LA2_0==40) ) { + alt2=1; + } + switch (alt2) { + case 1 : + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:12:60: 'print' + { + _last = (CommonTree)input.LT(1); + string_literal5=(CommonTree)match(input,40,FOLLOW_40_in_decl84); + string_literal5_tree = (CommonTree)adaptor.dupNode(string_literal5); + + + adaptor.addChild(root_1, string_literal5_tree); + + } + break; + + } + + match(input, Token.UP, null); + adaptor.addChild(root_0, root_1); + _last = _save_last_1; + } + + + } + + retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + // do for sure before leaving + } + return retval; + } + // $ANTLR end "decl" + + + public static class decllist_return extends TreeRuleReturnScope { + CommonTree tree; + @Override + public CommonTree getTree() { return tree; } + }; + + + // $ANTLR start "decllist" + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:13:1: decllist : ^( DECLLIST ( decl )* ) ; + public final XTreeGrammar.decllist_return decllist() throws RecognitionException { + XTreeGrammar.decllist_return retval = new XTreeGrammar.decllist_return(); + retval.start = input.LT(1); + + CommonTree root_0 = null; + + CommonTree _first_0 = null; + CommonTree _last = null; + + + CommonTree DECLLIST6=null; + TreeRuleReturnScope decl7 =null; + + CommonTree DECLLIST6_tree=null; + + try { + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:13:9: ( ^( DECLLIST ( decl )* ) ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:13:13: ^( DECLLIST ( decl )* ) + { + root_0 = (CommonTree)adaptor.nil(); + + + _last = (CommonTree)input.LT(1); + { + CommonTree _save_last_1 = _last; + CommonTree _first_1 = null; + CommonTree root_1 = (CommonTree)adaptor.nil(); + _last = (CommonTree)input.LT(1); + DECLLIST6=(CommonTree)match(input,DECLLIST,FOLLOW_DECLLIST_in_decllist95); + DECLLIST6_tree = (CommonTree)adaptor.dupNode(DECLLIST6); + + + root_1 = (CommonTree)adaptor.becomeRoot(DECLLIST6_tree, root_1); + + if ( input.LA(1)==Token.DOWN ) { + match(input, Token.DOWN, null); + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:13:24: ( decl )* + loop3: + while (true) { + int alt3=2; + int LA3_0 = input.LA(1); + if ( (LA3_0==DECL) ) { + alt3=1; + } + + switch (alt3) { + case 1 : + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:13:24: decl + { + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_decl_in_decllist97); + decl7=decl(); + state._fsp--; + + adaptor.addChild(root_1, decl7.getTree()); + + } + break; + + default : + break loop3; + } + } + + match(input, Token.UP, null); + } + adaptor.addChild(root_0, root_1); + _last = _save_last_1; + } + + + } + + retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + // do for sure before leaving + } + return retval; + } + // $ANTLR end "decllist" + + + public static class expr_return extends TreeRuleReturnScope { + CommonTree tree; + @Override + public CommonTree getTree() { return tree; } + }; + + + // $ANTLR start "expr" + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:15:1: expr : ( ^( ( '+' | '-' | '*' | '/' ) expr expr ) | ^( UMINUS ( INTCONST | FLOATCONST ) ) | INTCONST | FLOATCONST | STRINGCONST | ID ); + public final XTreeGrammar.expr_return expr() throws RecognitionException { + XTreeGrammar.expr_return retval = new XTreeGrammar.expr_return(); + retval.start = input.LT(1); + + CommonTree root_0 = null; + + CommonTree _first_0 = null; + CommonTree _last = null; + + + CommonTree set8=null; + CommonTree UMINUS11=null; + CommonTree set12=null; + CommonTree INTCONST13=null; + CommonTree FLOATCONST14=null; + CommonTree STRINGCONST15=null; + CommonTree ID16=null; + TreeRuleReturnScope expr9 =null; + TreeRuleReturnScope expr10 =null; + + CommonTree set8_tree=null; + CommonTree UMINUS11_tree=null; + CommonTree set12_tree=null; + CommonTree INTCONST13_tree=null; + CommonTree FLOATCONST14_tree=null; + CommonTree STRINGCONST15_tree=null; + CommonTree ID16_tree=null; + + try { + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:15:5: ( ^( ( '+' | '-' | '*' | '/' ) expr expr ) | ^( UMINUS ( INTCONST | FLOATCONST ) ) | INTCONST | FLOATCONST | STRINGCONST | ID ) + int alt4=6; + switch ( input.LA(1) ) { + case 22: + case 23: + case 24: + case 26: + { + alt4=1; + } + break; + case UMINUS: + { + alt4=2; + } + break; + case INTCONST: + { + alt4=3; + } + break; + case FLOATCONST: + { + alt4=4; + } + break; + case STRINGCONST: + { + alt4=5; + } + break; + case ID: + { + alt4=6; + } + break; + default: + NoViableAltException nvae = + new NoViableAltException("", 4, 0, input); + throw nvae; + } + switch (alt4) { + case 1 : + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:15:13: ^( ( '+' | '-' | '*' | '/' ) expr expr ) + { + root_0 = (CommonTree)adaptor.nil(); + + + _last = (CommonTree)input.LT(1); + { + CommonTree _save_last_1 = _last; + CommonTree _first_1 = null; + CommonTree root_1 = (CommonTree)adaptor.nil(); + set8=(CommonTree)input.LT(1); + if ( (input.LA(1) >= 22 && input.LA(1) <= 24)||input.LA(1)==26 ) { + input.consume(); + set8_tree = (CommonTree)adaptor.dupNode(set8); + + + root_1 = (CommonTree)adaptor.becomeRoot(set8_tree, root_1); + + state.errorRecovery=false; + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + throw mse; + } + + match(input, Token.DOWN, null); + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_expr_in_expr129); + expr9=expr(); + state._fsp--; + + adaptor.addChild(root_1, expr9.getTree()); + + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_expr_in_expr131); + expr10=expr(); + state._fsp--; + + adaptor.addChild(root_1, expr10.getTree()); + + match(input, Token.UP, null); + adaptor.addChild(root_0, root_1); + _last = _save_last_1; + } + + + } + break; + case 2 : + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:16:15: ^( UMINUS ( INTCONST | FLOATCONST ) ) + { + root_0 = (CommonTree)adaptor.nil(); + + + _last = (CommonTree)input.LT(1); + { + CommonTree _save_last_1 = _last; + CommonTree _first_1 = null; + CommonTree root_1 = (CommonTree)adaptor.nil(); + _last = (CommonTree)input.LT(1); + UMINUS11=(CommonTree)match(input,UMINUS,FOLLOW_UMINUS_in_expr149); + UMINUS11_tree = (CommonTree)adaptor.dupNode(UMINUS11); + + + root_1 = (CommonTree)adaptor.becomeRoot(UMINUS11_tree, root_1); + + match(input, Token.DOWN, null); + _last = (CommonTree)input.LT(1); + set12=(CommonTree)input.LT(1); + if ( input.LA(1)==FLOATCONST||input.LA(1)==INTCONST ) { + input.consume(); + set12_tree = (CommonTree)adaptor.dupNode(set12); + + + adaptor.addChild(root_1, set12_tree); + + state.errorRecovery=false; + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + throw mse; + } + + match(input, Token.UP, null); + adaptor.addChild(root_0, root_1); + _last = _save_last_1; + } + + + } + break; + case 3 : + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:17:15: INTCONST + { + root_0 = (CommonTree)adaptor.nil(); + + + _last = (CommonTree)input.LT(1); + INTCONST13=(CommonTree)match(input,INTCONST,FOLLOW_INTCONST_in_expr174); + INTCONST13_tree = (CommonTree)adaptor.dupNode(INTCONST13); + + + adaptor.addChild(root_0, INTCONST13_tree); + + } + break; + case 4 : + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:17:26: FLOATCONST + { + root_0 = (CommonTree)adaptor.nil(); + + + _last = (CommonTree)input.LT(1); + FLOATCONST14=(CommonTree)match(input,FLOATCONST,FOLLOW_FLOATCONST_in_expr178); + FLOATCONST14_tree = (CommonTree)adaptor.dupNode(FLOATCONST14); + + + adaptor.addChild(root_0, FLOATCONST14_tree); + + } + break; + case 5 : + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:17:39: STRINGCONST + { + root_0 = (CommonTree)adaptor.nil(); + + + _last = (CommonTree)input.LT(1); + STRINGCONST15=(CommonTree)match(input,STRINGCONST,FOLLOW_STRINGCONST_in_expr182); + STRINGCONST15_tree = (CommonTree)adaptor.dupNode(STRINGCONST15); + + + adaptor.addChild(root_0, STRINGCONST15_tree); + + } + break; + case 6 : + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:17:53: ID + { + root_0 = (CommonTree)adaptor.nil(); + + + _last = (CommonTree)input.LT(1); + ID16=(CommonTree)match(input,ID,FOLLOW_ID_in_expr186); + ID16_tree = (CommonTree)adaptor.dupNode(ID16); + + + adaptor.addChild(root_0, ID16_tree); + + } + break; + + } + retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + // do for sure before leaving + } + return retval; + } + // $ANTLR end "expr" + + + public static class assignstat_return extends TreeRuleReturnScope { + CommonTree tree; + @Override + public CommonTree getTree() { return tree; } + }; + + + // $ANTLR start "assignstat" + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:19:1: assignstat : ^( ':=' ID expr ) ; + public final XTreeGrammar.assignstat_return assignstat() throws RecognitionException { + XTreeGrammar.assignstat_return retval = new XTreeGrammar.assignstat_return(); + retval.start = input.LT(1); + + CommonTree root_0 = null; + + CommonTree _first_0 = null; + CommonTree _last = null; + + + CommonTree string_literal17=null; + CommonTree ID18=null; + TreeRuleReturnScope expr19 =null; + + CommonTree string_literal17_tree=null; + CommonTree ID18_tree=null; + + try { + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:19:11: ( ^( ':=' ID expr ) ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:19:13: ^( ':=' ID expr ) + { + root_0 = (CommonTree)adaptor.nil(); + + + _last = (CommonTree)input.LT(1); + { + CommonTree _save_last_1 = _last; + CommonTree _first_1 = null; + CommonTree root_1 = (CommonTree)adaptor.nil(); + _last = (CommonTree)input.LT(1); + string_literal17=(CommonTree)match(input,28,FOLLOW_28_in_assignstat194); + string_literal17_tree = (CommonTree)adaptor.dupNode(string_literal17); + + + root_1 = (CommonTree)adaptor.becomeRoot(string_literal17_tree, root_1); + + match(input, Token.DOWN, null); + _last = (CommonTree)input.LT(1); + ID18=(CommonTree)match(input,ID,FOLLOW_ID_in_assignstat196); + ID18_tree = (CommonTree)adaptor.dupNode(ID18); + + + adaptor.addChild(root_1, ID18_tree); + + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_expr_in_assignstat198); + expr19=expr(); + state._fsp--; + + adaptor.addChild(root_1, expr19.getTree()); + + match(input, Token.UP, null); + adaptor.addChild(root_0, root_1); + _last = _save_last_1; + } + + + } + + retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + // do for sure before leaving + } + return retval; + } + // $ANTLR end "assignstat" + + + public static class cond_return extends TreeRuleReturnScope { + CommonTree tree; + @Override + public CommonTree getTree() { return tree; } + }; + + + // $ANTLR start "cond" + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:21:1: cond : ^( ( '<' | '>' | '=' ) expr expr ) ; + public final XTreeGrammar.cond_return cond() throws RecognitionException { + XTreeGrammar.cond_return retval = new XTreeGrammar.cond_return(); + retval.start = input.LT(1); + + CommonTree root_0 = null; + + CommonTree _first_0 = null; + CommonTree _last = null; + + + CommonTree set20=null; + TreeRuleReturnScope expr21 =null; + TreeRuleReturnScope expr22 =null; + + CommonTree set20_tree=null; + + try { + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:21:5: ( ^( ( '<' | '>' | '=' ) expr expr ) ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:21:13: ^( ( '<' | '>' | '=' ) expr expr ) + { + root_0 = (CommonTree)adaptor.nil(); + + + _last = (CommonTree)input.LT(1); + { + CommonTree _save_last_1 = _last; + CommonTree _first_1 = null; + CommonTree root_1 = (CommonTree)adaptor.nil(); + set20=(CommonTree)input.LT(1); + if ( (input.LA(1) >= 30 && input.LA(1) <= 32) ) { + input.consume(); + set20_tree = (CommonTree)adaptor.dupNode(set20); + + + root_1 = (CommonTree)adaptor.becomeRoot(set20_tree, root_1); + + state.errorRecovery=false; + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + throw mse; + } + + match(input, Token.DOWN, null); + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_expr_in_cond225); + expr21=expr(); + state._fsp--; + + adaptor.addChild(root_1, expr21.getTree()); + + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_expr_in_cond227); + expr22=expr(); + state._fsp--; + + adaptor.addChild(root_1, expr22.getTree()); + + match(input, Token.UP, null); + adaptor.addChild(root_0, root_1); + _last = _save_last_1; + } + + + } + + retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + // do for sure before leaving + } + return retval; + } + // $ANTLR end "cond" + + + public static class condstat_return extends TreeRuleReturnScope { + CommonTree tree; + @Override + public CommonTree getTree() { return tree; } + }; + + + // $ANTLR start "condstat" + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:22:1: condstat : ^( 'if' cond stat ( stat )? ) ; + public final XTreeGrammar.condstat_return condstat() throws RecognitionException { + XTreeGrammar.condstat_return retval = new XTreeGrammar.condstat_return(); + retval.start = input.LT(1); + + CommonTree root_0 = null; + + CommonTree _first_0 = null; + CommonTree _last = null; + + + CommonTree string_literal23=null; + TreeRuleReturnScope cond24 =null; + TreeRuleReturnScope stat25 =null; + TreeRuleReturnScope stat26 =null; + + CommonTree string_literal23_tree=null; + + try { + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:22:9: ( ^( 'if' cond stat ( stat )? ) ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:22:13: ^( 'if' cond stat ( stat )? ) + { + root_0 = (CommonTree)adaptor.nil(); + + + _last = (CommonTree)input.LT(1); + { + CommonTree _save_last_1 = _last; + CommonTree _first_1 = null; + CommonTree root_1 = (CommonTree)adaptor.nil(); + _last = (CommonTree)input.LT(1); + string_literal23=(CommonTree)match(input,38,FOLLOW_38_in_condstat237); + string_literal23_tree = (CommonTree)adaptor.dupNode(string_literal23); + + + root_1 = (CommonTree)adaptor.becomeRoot(string_literal23_tree, root_1); + + match(input, Token.DOWN, null); + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_cond_in_condstat239); + cond24=cond(); + state._fsp--; + + adaptor.addChild(root_1, cond24.getTree()); + + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_stat_in_condstat241); + stat25=stat(); + state._fsp--; + + adaptor.addChild(root_1, stat25.getTree()); + + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:22:30: ( stat )? + int alt5=2; + int LA5_0 = input.LA(1); + if ( (LA5_0==STATLIST||LA5_0==28||(LA5_0 >= 37 && LA5_0 <= 38)||LA5_0==45) ) { + alt5=1; + } + switch (alt5) { + case 1 : + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:22:30: stat + { + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_stat_in_condstat243); + stat26=stat(); + state._fsp--; + + adaptor.addChild(root_1, stat26.getTree()); + + } + break; + + } + + match(input, Token.UP, null); + adaptor.addChild(root_0, root_1); + _last = _save_last_1; + } + + + } + + retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + // do for sure before leaving + } + return retval; + } + // $ANTLR end "condstat" + + + public static class whilestat_return extends TreeRuleReturnScope { + CommonTree tree; + @Override + public CommonTree getTree() { return tree; } + }; + + + // $ANTLR start "whilestat" + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:24:1: whilestat : ^( 'while' cond stat ) ; + public final XTreeGrammar.whilestat_return whilestat() throws RecognitionException { + XTreeGrammar.whilestat_return retval = new XTreeGrammar.whilestat_return(); + retval.start = input.LT(1); + + CommonTree root_0 = null; + + CommonTree _first_0 = null; + CommonTree _last = null; + + + CommonTree string_literal27=null; + TreeRuleReturnScope cond28 =null; + TreeRuleReturnScope stat29 =null; + + CommonTree string_literal27_tree=null; + + try { + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:24:10: ( ^( 'while' cond stat ) ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:24:13: ^( 'while' cond stat ) + { + root_0 = (CommonTree)adaptor.nil(); + + + _last = (CommonTree)input.LT(1); + { + CommonTree _save_last_1 = _last; + CommonTree _first_1 = null; + CommonTree root_1 = (CommonTree)adaptor.nil(); + _last = (CommonTree)input.LT(1); + string_literal27=(CommonTree)match(input,45,FOLLOW_45_in_whilestat254); + string_literal27_tree = (CommonTree)adaptor.dupNode(string_literal27); + + + root_1 = (CommonTree)adaptor.becomeRoot(string_literal27_tree, root_1); + + match(input, Token.DOWN, null); + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_cond_in_whilestat256); + cond28=cond(); + state._fsp--; + + adaptor.addChild(root_1, cond28.getTree()); + + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_stat_in_whilestat258); + stat29=stat(); + state._fsp--; + + adaptor.addChild(root_1, stat29.getTree()); + + match(input, Token.UP, null); + adaptor.addChild(root_0, root_1); + _last = _save_last_1; + } + + + } + + retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + // do for sure before leaving + } + return retval; + } + // $ANTLR end "whilestat" + + + public static class forstat_return extends TreeRuleReturnScope { + CommonTree tree; + @Override + public CommonTree getTree() { return tree; } + }; + + + // $ANTLR start "forstat" + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:25:1: forstat : ^( 'for' assignstat cond assignstat stat ) ; + public final XTreeGrammar.forstat_return forstat() throws RecognitionException { + XTreeGrammar.forstat_return retval = new XTreeGrammar.forstat_return(); + retval.start = input.LT(1); + + CommonTree root_0 = null; + + CommonTree _first_0 = null; + CommonTree _last = null; + + + CommonTree string_literal30=null; + TreeRuleReturnScope assignstat31 =null; + TreeRuleReturnScope cond32 =null; + TreeRuleReturnScope assignstat33 =null; + TreeRuleReturnScope stat34 =null; + + CommonTree string_literal30_tree=null; + + try { + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:25:8: ( ^( 'for' assignstat cond assignstat stat ) ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:25:13: ^( 'for' assignstat cond assignstat stat ) + { + root_0 = (CommonTree)adaptor.nil(); + + + _last = (CommonTree)input.LT(1); + { + CommonTree _save_last_1 = _last; + CommonTree _first_1 = null; + CommonTree root_1 = (CommonTree)adaptor.nil(); + _last = (CommonTree)input.LT(1); + string_literal30=(CommonTree)match(input,37,FOLLOW_37_in_forstat269); + string_literal30_tree = (CommonTree)adaptor.dupNode(string_literal30); + + + root_1 = (CommonTree)adaptor.becomeRoot(string_literal30_tree, root_1); + + match(input, Token.DOWN, null); + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_assignstat_in_forstat271); + assignstat31=assignstat(); + state._fsp--; + + adaptor.addChild(root_1, assignstat31.getTree()); + + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_cond_in_forstat273); + cond32=cond(); + state._fsp--; + + adaptor.addChild(root_1, cond32.getTree()); + + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_assignstat_in_forstat275); + assignstat33=assignstat(); + state._fsp--; + + adaptor.addChild(root_1, assignstat33.getTree()); + + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_stat_in_forstat277); + stat34=stat(); + state._fsp--; + + adaptor.addChild(root_1, stat34.getTree()); + + match(input, Token.UP, null); + adaptor.addChild(root_0, root_1); + _last = _save_last_1; + } + + + } + + retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + // do for sure before leaving + } + return retval; + } + // $ANTLR end "forstat" + + + public static class stat_return extends TreeRuleReturnScope { + CommonTree tree; + @Override + public CommonTree getTree() { return tree; } + }; + + + // $ANTLR start "stat" + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:27:1: stat : ( assignstat | condstat | whilestat | forstat | statlist ); + public final XTreeGrammar.stat_return stat() throws RecognitionException { + XTreeGrammar.stat_return retval = new XTreeGrammar.stat_return(); + retval.start = input.LT(1); + + CommonTree root_0 = null; + + CommonTree _first_0 = null; + CommonTree _last = null; + + + TreeRuleReturnScope assignstat35 =null; + TreeRuleReturnScope condstat36 =null; + TreeRuleReturnScope whilestat37 =null; + TreeRuleReturnScope forstat38 =null; + TreeRuleReturnScope statlist39 =null; + + + try { + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:27:5: ( assignstat | condstat | whilestat | forstat | statlist ) + int alt6=5; + switch ( input.LA(1) ) { + case 28: + { + alt6=1; + } + break; + case 38: + { + alt6=2; + } + break; + case 45: + { + alt6=3; + } + break; + case 37: + { + alt6=4; + } + break; + case STATLIST: + { + alt6=5; + } + break; + default: + NoViableAltException nvae = + new NoViableAltException("", 6, 0, input); + throw nvae; + } + switch (alt6) { + case 1 : + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:27:13: assignstat + { + root_0 = (CommonTree)adaptor.nil(); + + + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_assignstat_in_stat291); + assignstat35=assignstat(); + state._fsp--; + + adaptor.addChild(root_0, assignstat35.getTree()); + + } + break; + case 2 : + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:27:26: condstat + { + root_0 = (CommonTree)adaptor.nil(); + + + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_condstat_in_stat295); + condstat36=condstat(); + state._fsp--; + + adaptor.addChild(root_0, condstat36.getTree()); + + } + break; + case 3 : + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:27:37: whilestat + { + root_0 = (CommonTree)adaptor.nil(); + + + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_whilestat_in_stat299); + whilestat37=whilestat(); + state._fsp--; + + adaptor.addChild(root_0, whilestat37.getTree()); + + } + break; + case 4 : + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:27:49: forstat + { + root_0 = (CommonTree)adaptor.nil(); + + + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_forstat_in_stat303); + forstat38=forstat(); + state._fsp--; + + adaptor.addChild(root_0, forstat38.getTree()); + + } + break; + case 5 : + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:27:59: statlist + { + root_0 = (CommonTree)adaptor.nil(); + + + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_statlist_in_stat307); + statlist39=statlist(); + state._fsp--; + + adaptor.addChild(root_0, statlist39.getTree()); + + } + break; + + } + retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + // do for sure before leaving + } + return retval; + } + // $ANTLR end "stat" + + + public static class statlist_return extends TreeRuleReturnScope { + CommonTree tree; + @Override + public CommonTree getTree() { return tree; } + }; + + + // $ANTLR start "statlist" + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:29:1: statlist : ^( STATLIST ( stat )* ) ; + public final XTreeGrammar.statlist_return statlist() throws RecognitionException { + XTreeGrammar.statlist_return retval = new XTreeGrammar.statlist_return(); + retval.start = input.LT(1); + + CommonTree root_0 = null; + + CommonTree _first_0 = null; + CommonTree _last = null; + + + CommonTree STATLIST40=null; + TreeRuleReturnScope stat41 =null; + + CommonTree STATLIST40_tree=null; + + try { + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:29:9: ( ^( STATLIST ( stat )* ) ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:29:13: ^( STATLIST ( stat )* ) + { + root_0 = (CommonTree)adaptor.nil(); + + + _last = (CommonTree)input.LT(1); + { + CommonTree _save_last_1 = _last; + CommonTree _first_1 = null; + CommonTree root_1 = (CommonTree)adaptor.nil(); + _last = (CommonTree)input.LT(1); + STATLIST40=(CommonTree)match(input,STATLIST,FOLLOW_STATLIST_in_statlist317); + STATLIST40_tree = (CommonTree)adaptor.dupNode(STATLIST40); + + + root_1 = (CommonTree)adaptor.becomeRoot(STATLIST40_tree, root_1); + + if ( input.LA(1)==Token.DOWN ) { + match(input, Token.DOWN, null); + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:29:24: ( stat )* + loop7: + while (true) { + int alt7=2; + int LA7_0 = input.LA(1); + if ( (LA7_0==STATLIST||LA7_0==28||(LA7_0 >= 37 && LA7_0 <= 38)||LA7_0==45) ) { + alt7=1; + } + + switch (alt7) { + case 1 : + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:29:24: stat + { + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_stat_in_statlist319); + stat41=stat(); + state._fsp--; + + adaptor.addChild(root_1, stat41.getTree()); + + } + break; + + default : + break loop7; + } + } + + match(input, Token.UP, null); + } + adaptor.addChild(root_0, root_1); + _last = _save_last_1; + } + + + } + + retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + // do for sure before leaving + } + return retval; + } + // $ANTLR end "statlist" public static class program_return extends TreeRuleReturnScope { @@ -99,7 +1292,7 @@ public class XTreeGrammar extends TreeParser { // $ANTLR start "program" - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_üb\\ÜB-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:24:1: program : 'todo' ; + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:31:1: program : ^( 'program' ID decllist statlist ) ; public final XTreeGrammar.program_return program() throws RecognitionException { XTreeGrammar.program_return retval = new XTreeGrammar.program_return(); retval.start = input.LT(1); @@ -110,23 +1303,60 @@ public class XTreeGrammar extends TreeParser { CommonTree _last = null; - CommonTree string_literal1=null; + CommonTree string_literal42=null; + CommonTree ID43=null; + TreeRuleReturnScope decllist44 =null; + TreeRuleReturnScope statlist45 =null; - CommonTree string_literal1_tree=null; + CommonTree string_literal42_tree=null; + CommonTree ID43_tree=null; try { - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_üb\\ÜB-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:24:8: ( 'todo' ) - // C:\\Users\\eisenbiegler\\Dropbox\\workspace_üb\\ÜB-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:24:15: 'todo' + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:31:8: ( ^( 'program' ID decllist statlist ) ) + // C:\\Development\\Schule\\Compilerbau\\CC-Praxis-Antlr Baumgrammatiken-Leer\\src\\de\\dhbw\\compiler\\antlrxtreegrammar\\XTreeGrammar.g:31:13: ^( 'program' ID decllist statlist ) { root_0 = (CommonTree)adaptor.nil(); _last = (CommonTree)input.LT(1); - string_literal1=(CommonTree)match(input,46,FOLLOW_46_in_program67); - string_literal1_tree = (CommonTree)adaptor.dupNode(string_literal1); + { + CommonTree _save_last_1 = _last; + CommonTree _first_1 = null; + CommonTree root_1 = (CommonTree)adaptor.nil(); + _last = (CommonTree)input.LT(1); + string_literal42=(CommonTree)match(input,41,FOLLOW_41_in_program332); + string_literal42_tree = (CommonTree)adaptor.dupNode(string_literal42); - adaptor.addChild(root_0, string_literal1_tree); + root_1 = (CommonTree)adaptor.becomeRoot(string_literal42_tree, root_1); + + match(input, Token.DOWN, null); + _last = (CommonTree)input.LT(1); + ID43=(CommonTree)match(input,ID,FOLLOW_ID_in_program334); + ID43_tree = (CommonTree)adaptor.dupNode(ID43); + + + adaptor.addChild(root_1, ID43_tree); + + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_decllist_in_program336); + decllist44=decllist(); + state._fsp--; + + adaptor.addChild(root_1, decllist44.getTree()); + + _last = (CommonTree)input.LT(1); + pushFollow(FOLLOW_statlist_in_program338); + statlist45=statlist(); + state._fsp--; + + adaptor.addChild(root_1, statlist45.getTree()); + + match(input, Token.UP, null); + adaptor.addChild(root_0, root_1); + _last = _save_last_1; + } + } @@ -148,5 +1378,49 @@ public class XTreeGrammar extends TreeParser { - public static final BitSet FOLLOW_46_in_program67 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_DECL_in_decl65 = new BitSet(new long[]{0x0000000000000004L}); + public static final BitSet FOLLOW_ID_in_decl67 = new BitSet(new long[]{0x0000089000000000L}); + public static final BitSet FOLLOW_set_in_decl69 = new BitSet(new long[]{0x0000050000000008L}); + public static final BitSet FOLLOW_42_in_decl81 = new BitSet(new long[]{0x0000010000000008L}); + public static final BitSet FOLLOW_40_in_decl84 = new BitSet(new long[]{0x0000000000000008L}); + public static final BitSet FOLLOW_DECLLIST_in_decllist95 = new BitSet(new long[]{0x0000000000000004L}); + public static final BitSet FOLLOW_decl_in_decllist97 = new BitSet(new long[]{0x0000000000000028L}); + public static final BitSet FOLLOW_set_in_expr113 = new BitSet(new long[]{0x0000000000000004L}); + public static final BitSet FOLLOW_expr_in_expr129 = new BitSet(new long[]{0x0000000005C30700L}); + public static final BitSet FOLLOW_expr_in_expr131 = new BitSet(new long[]{0x0000000000000008L}); + public static final BitSet FOLLOW_UMINUS_in_expr149 = new BitSet(new long[]{0x0000000000000004L}); + public static final BitSet FOLLOW_set_in_expr151 = new BitSet(new long[]{0x0000000000000008L}); + public static final BitSet FOLLOW_INTCONST_in_expr174 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_FLOATCONST_in_expr178 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_STRINGCONST_in_expr182 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ID_in_expr186 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_28_in_assignstat194 = new BitSet(new long[]{0x0000000000000004L}); + public static final BitSet FOLLOW_ID_in_assignstat196 = new BitSet(new long[]{0x0000000005C30700L}); + public static final BitSet FOLLOW_expr_in_assignstat198 = new BitSet(new long[]{0x0000000000000008L}); + public static final BitSet FOLLOW_set_in_cond213 = new BitSet(new long[]{0x0000000000000004L}); + public static final BitSet FOLLOW_expr_in_cond225 = new BitSet(new long[]{0x0000000005C30700L}); + public static final BitSet FOLLOW_expr_in_cond227 = new BitSet(new long[]{0x0000000000000008L}); + public static final BitSet FOLLOW_38_in_condstat237 = new BitSet(new long[]{0x0000000000000004L}); + public static final BitSet FOLLOW_cond_in_condstat239 = new BitSet(new long[]{0x0000206010008000L}); + public static final BitSet FOLLOW_stat_in_condstat241 = new BitSet(new long[]{0x0000206010008008L}); + public static final BitSet FOLLOW_stat_in_condstat243 = new BitSet(new long[]{0x0000000000000008L}); + public static final BitSet FOLLOW_45_in_whilestat254 = new BitSet(new long[]{0x0000000000000004L}); + public static final BitSet FOLLOW_cond_in_whilestat256 = new BitSet(new long[]{0x0000206010008000L}); + public static final BitSet FOLLOW_stat_in_whilestat258 = new BitSet(new long[]{0x0000000000000008L}); + public static final BitSet FOLLOW_37_in_forstat269 = new BitSet(new long[]{0x0000000000000004L}); + public static final BitSet FOLLOW_assignstat_in_forstat271 = new BitSet(new long[]{0x00000001C0000000L}); + public static final BitSet FOLLOW_cond_in_forstat273 = new BitSet(new long[]{0x0000000010000000L}); + public static final BitSet FOLLOW_assignstat_in_forstat275 = new BitSet(new long[]{0x0000206010008000L}); + public static final BitSet FOLLOW_stat_in_forstat277 = new BitSet(new long[]{0x0000000000000008L}); + public static final BitSet FOLLOW_assignstat_in_stat291 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_condstat_in_stat295 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_whilestat_in_stat299 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_forstat_in_stat303 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_statlist_in_stat307 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_STATLIST_in_statlist317 = new BitSet(new long[]{0x0000000000000004L}); + public static final BitSet FOLLOW_stat_in_statlist319 = new BitSet(new long[]{0x0000206010008008L}); + public static final BitSet FOLLOW_41_in_program332 = new BitSet(new long[]{0x0000000000000004L}); + public static final BitSet FOLLOW_ID_in_program334 = new BitSet(new long[]{0x0000000000000040L}); + public static final BitSet FOLLOW_decllist_in_program336 = new BitSet(new long[]{0x0000000000008000L}); + public static final BitSet FOLLOW_statlist_in_program338 = new BitSet(new long[]{0x0000000000000008L}); } diff --git a/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XTreeGrammar.tokens b/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XTreeGrammar.tokens index 7eb8fc1..bdfd911 100644 --- a/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XTreeGrammar.tokens +++ b/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/XTreeGrammar.tokens @@ -40,7 +40,6 @@ STRINGCONST=16 UMINUS=17 WS=18 ZERO=19 -T__46=46 '('=20 ')'=21 '*'=22 @@ -67,4 +66,3 @@ T__46=46 'string'=43 'then'=44 'while'=45 -'todo'=46 diff --git a/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/AssignCountTest.java b/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/AssignCountTest.java index 18f4890..8b5f862 100644 --- a/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/AssignCountTest.java +++ b/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/AssignCountTest.java @@ -16,6 +16,8 @@ import static org.junit.Assert.assertEquals; import java.io.ByteArrayInputStream; +import de.dhbw.compiler.antlrxtreegrammar.XLexer; +import de.dhbw.compiler.antlrxtreegrammar.XParser; import org.antlr.runtime.ANTLRInputStream; import org.antlr.runtime.CommonTokenStream; import org.antlr.runtime.ParserRuleReturnScope; @@ -23,9 +25,6 @@ import org.antlr.runtime.tree.CommonTree; import org.antlr.runtime.tree.CommonTreeNodeStream; import de.dhbw.compiler.antlrxtreegrammar.AssignCount; -import de.dhbw.compiler.antlrxtreegrammar.XLexer; -import de.dhbw.compiler.antlrxtreegrammar.XParser; -import de.dhbw.compiler.antlrxtreegrammar.XTreeGrammar; public abstract class AssignCountTest { @@ -33,7 +32,7 @@ public abstract class AssignCountTest { ANTLRInputStream input = new ANTLRInputStream(new ByteArrayInputStream(in.getBytes())); XLexer scanner = new XLexer(input); CommonTokenStream tokens = new CommonTokenStream(scanner); - XParser parser = new XParser(tokens); + XParser parser = new XParser(tokens); ParserRuleReturnScope result = parser.program(); CommonTree out = (CommonTree) result.getTree(); diff --git a/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/ParseTreeTest.java b/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/ParseTreeTest.java index b28a34d..7f6de6f 100644 --- a/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/ParseTreeTest.java +++ b/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/ParseTreeTest.java @@ -16,12 +16,12 @@ import static org.junit.Assert.assertEquals; import java.io.ByteArrayInputStream; +import de.dhbw.compiler.antlrxtreegrammar.XLexer; +import de.dhbw.compiler.antlrxtreegrammar.XParser; import org.antlr.runtime.ANTLRInputStream; import org.antlr.runtime.CommonTokenStream; import org.antlr.runtime.ParserRuleReturnScope; import org.antlr.runtime.tree.CommonTree; -import de.dhbw.compiler.antlrxtreegrammar.XLexer; -import de.dhbw.compiler.antlrxtreegrammar.XParser; public abstract class ParseTreeTest { @@ -29,7 +29,7 @@ public abstract class ParseTreeTest { ANTLRInputStream input = new ANTLRInputStream(new ByteArrayInputStream(in.getBytes())); XLexer scanner = new XLexer(input); CommonTokenStream tokens = new CommonTokenStream(scanner); - XParser parser = new XParser(tokens); + XParser parser = new XParser(tokens); ParserRuleReturnScope result = parser.program(); CommonTree out = (CommonTree) result.getTree(); diff --git a/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/TokenStreamTest.java b/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/TokenStreamTest.java index 1e658bd..0824bf5 100644 --- a/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/TokenStreamTest.java +++ b/CC-Praxis-Antlr Baumgrammatiken-Leer/src/de/dhbw/compiler/antlrxtreegrammar/test/TokenStreamTest.java @@ -16,11 +16,11 @@ import static org.junit.Assert.assertEquals; import java.io.ByteArrayInputStream; +import de.dhbw.compiler.antlrxtreegrammar.XLexer; +import de.dhbw.compiler.antlrxtreegrammar.XParser; import org.antlr.runtime.ANTLRInputStream; import org.antlr.runtime.CommonToken; import org.antlr.runtime.Token; -import de.dhbw.compiler.antlrxtreegrammar.XLexer; -import de.dhbw.compiler.antlrxtreegrammar.XParser; public abstract class TokenStreamTest { @@ -28,7 +28,7 @@ public abstract class TokenStreamTest { protected int getType(String name) { int res = -9; - for(res=0 ; res=XParser.tokenNames.length) { name = "'"+name.toLowerCase()+"'"; for(res=0 ; res