[12 - Tree Grammar] Add "empty" XTreeGrammar and fix test imports
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1,14 +1,3 @@
|
||||
/* **********************************************
|
||||
* Duale Hochschule Baden-W<>rttemberg Karlsruhe
|
||||
* Prof. Dr. J<>rn Eisenbiegler
|
||||
*
|
||||
* Vorlesung <20>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);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -16,16 +16,15 @@ import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
|
||||
import de.dhbw.compiler.antlrxtreegrammar.XLexer;
|
||||
import de.dhbw.compiler.antlrxtreegrammar.XParser;
|
||||
import de.dhbw.compiler.antlrxtreegrammar.XTreeGrammar;
|
||||
import org.antlr.runtime.ANTLRInputStream;
|
||||
import org.antlr.runtime.CommonTokenStream;
|
||||
import org.antlr.runtime.ParserRuleReturnScope;
|
||||
import org.antlr.runtime.tree.CommonTree;
|
||||
import org.antlr.runtime.tree.CommonTreeNodeStream;
|
||||
|
||||
import de.dhbw.compiler.antlrxtreegrammar.XLexer;
|
||||
import de.dhbw.compiler.antlrxtreegrammar.XParser;
|
||||
import de.dhbw.compiler.antlrxtreegrammar.XTreeGrammar;
|
||||
|
||||
public abstract class TreeGrammarTreeTest {
|
||||
|
||||
protected void testTreeGrammarTree(String in, String expected) throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user