You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by jo...@apache.org on 2011/08/01 17:25:50 UTC

svn commit: r1152824 [17/21] - in /uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker: ./ action/ batch/ condition/ engine/ kernel/ kernel/constraint/ kernel/expression/ kernel/expression/bool...

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/parser/TextMarkerParser.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/parser/TextMarkerParser.java?rev=1152824&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/parser/TextMarkerParser.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/parser/TextMarkerParser.java Mon Aug  1 15:24:44 2011
@@ -0,0 +1,16810 @@
+// $ANTLR 3.2 Sep 23, 2009 12:02:23 D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g 2011-04-27 10:13:31
+
+package org.apache.uima.tm.textmarker.parser;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Stack;
+
+import org.antlr.runtime.BaseRecognizer;
+import org.antlr.runtime.BitSet;
+import org.antlr.runtime.CommonToken;
+import org.antlr.runtime.DFA;
+import org.antlr.runtime.EarlyExitException;
+import org.antlr.runtime.FailedPredicateException;
+import org.antlr.runtime.IntStream;
+import org.antlr.runtime.MismatchedSetException;
+import org.antlr.runtime.NoViableAltException;
+import org.antlr.runtime.Parser;
+import org.antlr.runtime.RecognitionException;
+import org.antlr.runtime.RecognizerSharedState;
+import org.antlr.runtime.Token;
+import org.antlr.runtime.TokenStream;
+import org.apache.uima.cas.CAS;
+import org.apache.uima.cas.CASException;
+import org.apache.uima.cas.Type;
+import org.apache.uima.jcas.tcas.DocumentAnnotation;
+import org.apache.uima.resource.metadata.TypeSystemDescription;
+import org.apache.uima.tm.textmarker.action.AbstractTextMarkerAction;
+import org.apache.uima.tm.textmarker.action.ActionFactory;
+import org.apache.uima.tm.textmarker.condition.AbstractTextMarkerCondition;
+import org.apache.uima.tm.textmarker.condition.ConditionFactory;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerAutomataBlock;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerAutomataFactory;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerBlock;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerModule;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerScriptBlock;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerScriptFactory;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerStatement;
+import org.apache.uima.tm.textmarker.kernel.expression.ExpressionFactory;
+import org.apache.uima.tm.textmarker.kernel.expression.TextMarkerExpression;
+import org.apache.uima.tm.textmarker.kernel.expression.bool.BooleanExpression;
+import org.apache.uima.tm.textmarker.kernel.expression.list.BooleanListExpression;
+import org.apache.uima.tm.textmarker.kernel.expression.list.ListExpression;
+import org.apache.uima.tm.textmarker.kernel.expression.list.NumberListExpression;
+import org.apache.uima.tm.textmarker.kernel.expression.list.StringListExpression;
+import org.apache.uima.tm.textmarker.kernel.expression.list.TypeListExpression;
+import org.apache.uima.tm.textmarker.kernel.expression.number.NumberExpression;
+import org.apache.uima.tm.textmarker.kernel.expression.resource.WordListExpression;
+import org.apache.uima.tm.textmarker.kernel.expression.resource.WordTableExpression;
+import org.apache.uima.tm.textmarker.kernel.expression.string.StringExpression;
+import org.apache.uima.tm.textmarker.kernel.expression.string.StringFunctionFactory;
+import org.apache.uima.tm.textmarker.kernel.expression.type.TypeExpression;
+import org.apache.uima.tm.textmarker.kernel.extensions.TextMarkerExternalFactory;
+import org.apache.uima.tm.textmarker.kernel.rule.ComposedRuleElement;
+import org.apache.uima.tm.textmarker.kernel.rule.RuleElement;
+import org.apache.uima.tm.textmarker.kernel.rule.TextMarkerRule;
+import org.apache.uima.tm.textmarker.kernel.rule.TextMarkerRuleElement;
+import org.apache.uima.tm.textmarker.kernel.rule.quantifier.RuleElementQuantifier;
+
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+public class TextMarkerParser extends Parser {
+    public static final String[] tokenNames = new String[] {
+        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "DocComment", "Annotation", "ListIdentifier", "TRIE", "CONTAINS", "DECLARE", "WORDLIST", "WORDTABLE", "AND", "CONTEXTCOUNT", "COUNT", "TOTALCOUNT", "CURRENTCOUNT", "INLIST", "ISINTAG", "LAST", "MOFN", "NEAR", "OR", "PARTOF", "PARTOFNEQ", "POSITION", "REGEXP", "SCORE", "VOTE", "IF", "FEATURE", "PARSE", "CREATE", "GATHER", "FILL", "ATTRIBUTE", "COLOR", "DEL", "LOG", "MARK", "MARKSCORE", "MARKONCE", "MARKFAST", "MARKTABLE", "MARKLAST", "REPLACE", "RETAINMARKUP", "RETAINTYPE", "FILTERMARKUP", "FILTERTYPE", "CALL", "EXEC", "ASSIGN", "SETFEATURE", "GETFEATURE", "UNMARK", "UNMARKALL", "TRANSFER", "EXPAND", "BEFORE", "AFTER", "IS", "STARTSWITH", "ENDSWITH", "NOT", "ADD", "REMOVE", "REMOVEDUPLICATE", "MERGE", "GET", "GETLIST", "SIZE", "MATCHEDTEXT", "REMOVESTRING", "CLEAR", "THEN", "BasicAnnotationType", "LogLevel", "OldColor", "PackageString", "ScriptString", "EngineString", "BlockString", "AutomataBlockString", "TypeString", "IntStrin
 g", "DoubleString", "StringString", "BooleanString", "TypeSystemString", "SymbolString", "CONDITION", "ACTION", "BOOLEANLIST", "INTLIST", "DOUBLELIST", "STRINGLIST", "TYPELIST", "EXP", "LOGN", "SIN", "COS", "TAN", "XOR", "TRUE", "FALSE", "HexDigit", "IntegerTypeSuffix", "HexLiteral", "DecimalLiteral", "OctalLiteral", "Exponent", "FloatTypeSuffix", "FloatingPointLiteral", "EscapeSequence", "CharacterLiteral", "StringLiteral", "RessourceLiteral", "UnicodeEscape", "OctalEscape", "Letter", "JavaIDDigit", "Identifier", "LPAREN", "RPAREN", "LBRACK", "RBRACK", "LCURLY", "RCURLY", "CIRCUMFLEX", "AT", "DOT", "COLON", "COMMA", "SEMI", "PLUS", "MINUS", "STAR", "SLASH", "VBAR", "AMPER", "LESS", "GREATER", "ASSIGN_EQUAL", "PERCENT", "QUESTION", "EQUAL", "NOTEQUAL", "ALT_NOTEQUAL", "LESSEQUAL", "GREATEREQUAL", "WS", "COMMENT", "LINE_COMMENT"
+    };
+    public static final int STAR=137;
+    public static final int FloatTypeSuffix=112;
+    public static final int OctalLiteral=110;
+    public static final int FILTERMARKUP=48;
+    public static final int LOG=38;
+    public static final int CONTAINS=8;
+    public static final int REMOVE=66;
+    public static final int GREATEREQUAL=150;
+    public static final int MARKFAST=42;
+    public static final int MATCHEDTEXT=72;
+    public static final int CONDITION=91;
+    public static final int COUNT=14;
+    public static final int LOGN=99;
+    public static final int NOT=64;
+    public static final int EOF=-1;
+    public static final int Identifier=122;
+    public static final int ACTION=92;
+    public static final int CLEAR=74;
+    public static final int NOTEQUAL=147;
+    public static final int ENDSWITH=63;
+    public static final int DOUBLELIST=95;
+    public static final int VBAR=139;
+    public static final int RPAREN=124;
+    public static final int CREATE=32;
+    public static final int GREATER=142;
+    public static final int SIN=100;
+    public static final int EXP=98;
+    public static final int CURRENTCOUNT=16;
+    public static final int COS=101;
+    public static final int TAN=102;
+    public static final int TYPELIST=97;
+    public static final int LESS=141;
+    public static final int REGEXP=26;
+    public static final int GET=69;
+    public static final int UNMARK=55;
+    public static final int PARTOF=23;
+    public static final int LAST=19;
+    public static final int COMMENT=152;
+    public static final int REMOVEDUPLICATE=67;
+    public static final int UNMARKALL=56;
+    public static final int RBRACK=126;
+    public static final int NEAR=21;
+    public static final int LINE_COMMENT=153;
+    public static final int IntegerTypeSuffix=107;
+    public static final int MARKSCORE=40;
+    public static final int REMOVESTRING=73;
+    public static final int TRANSFER=57;
+    public static final int LCURLY=127;
+    public static final int TRIE=7;
+    public static final int FILTERTYPE=49;
+    public static final int RETAINMARKUP=46;
+    public static final int STRINGLIST=96;
+    public static final int MARKONCE=41;
+    public static final int ScriptString=80;
+    public static final int EngineString=81;
+    public static final int WS=151;
+    public static final int WORDTABLE=11;
+    public static final int WORDLIST=10;
+    public static final int AutomataBlockString=83;
+    public static final int FloatingPointLiteral=113;
+    public static final int INTLIST=94;
+    public static final int OR=22;
+    public static final int JavaIDDigit=121;
+    public static final int CALL=50;
+    public static final int Annotation=5;
+    public static final int FALSE=105;
+    public static final int LESSEQUAL=149;
+    public static final int RessourceLiteral=117;
+    public static final int VOTE=28;
+    public static final int Letter=120;
+    public static final int EscapeSequence=114;
+    public static final int SIZE=71;
+    public static final int BasicAnnotationType=76;
+    public static final int LBRACK=125;
+    public static final int CharacterLiteral=115;
+    public static final int DEL=37;
+    public static final int ATTRIBUTE=35;
+    public static final int TypeString=84;
+    public static final int Exponent=111;
+    public static final int ASSIGN_EQUAL=143;
+    public static final int RETAINTYPE=47;
+    public static final int AND=12;
+    public static final int TypeSystemString=89;
+    public static final int EXPAND=58;
+    public static final int BlockString=82;
+    public static final int IntString=85;
+    public static final int HexDigit=106;
+    public static final int COLOR=36;
+    public static final int POSITION=25;
+    public static final int LPAREN=123;
+    public static final int IF=29;
+    public static final int AT=130;
+    public static final int LogLevel=77;
+    public static final int SLASH=138;
+    public static final int THEN=75;
+    public static final int FILL=34;
+    public static final int COMMA=133;
+    public static final int IS=61;
+    public static final int GETLIST=70;
+    public static final int REPLACE=45;
+    public static final int AMPER=140;
+    public static final int EQUAL=146;
+    public static final int GATHER=33;
+    public static final int INLIST=17;
+    public static final int PLUS=135;
+    public static final int BooleanString=88;
+    public static final int GETFEATURE=54;
+    public static final int DOT=131;
+    public static final int ListIdentifier=6;
+    public static final int PARTOFNEQ=24;
+    public static final int ADD=65;
+    public static final int BOOLEANLIST=93;
+    public static final int MARKTABLE=43;
+    public static final int HexLiteral=108;
+    public static final int XOR=103;
+    public static final int MARK=39;
+    public static final int PERCENT=144;
+    public static final int PackageString=79;
+    public static final int PARSE=31;
+    public static final int OldColor=78;
+    public static final int MERGE=68;
+    public static final int MARKLAST=44;
+    public static final int CONTEXTCOUNT=13;
+    public static final int BEFORE=59;
+    public static final int EXEC=51;
+    public static final int AFTER=60;
+    public static final int MINUS=136;
+    public static final int DecimalLiteral=109;
+    public static final int TRUE=104;
+    public static final int SEMI=134;
+    public static final int FEATURE=30;
+    public static final int SymbolString=90;
+    public static final int StringString=87;
+    public static final int StringLiteral=116;
+    public static final int COLON=132;
+    public static final int SCORE=27;
+    public static final int QUESTION=145;
+    public static final int UnicodeEscape=118;
+    public static final int STARTSWITH=62;
+    public static final int RCURLY=128;
+    public static final int ASSIGN=52;
+    public static final int TOTALCOUNT=15;
+    public static final int DECLARE=9;
+    public static final int ISINTAG=18;
+    public static final int DocComment=4;
+    public static final int MOFN=20;
+    public static final int SETFEATURE=53;
+    public static final int OctalEscape=119;
+    public static final int DoubleString=86;
+    public static final int CIRCUMFLEX=129;
+    public static final int ALT_NOTEQUAL=148;
+
+    // delegates
+    // delegators
+
+
+        public TextMarkerParser(TokenStream input) {
+            this(input, new RecognizerSharedState());
+        }
+        public TextMarkerParser(TokenStream input, RecognizerSharedState state) {
+            super(input, state);
+             
+        }
+        
+
+    public String[] getTokenNames() { return TextMarkerParser.tokenNames; }
+    public String getGrammarFileName() { return "D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g"; }
+
+
+    private List vars = new ArrayList();	
+    private int level = 0;
+    private TextMarkerScriptFactory factory = new TextMarkerScriptFactory();
+    private TextMarkerScriptFactory automataFactory = new TextMarkerAutomataFactory();
+    private TextMarkerExternalFactory external;
+
+
+    public void setExternalFactory(TextMarkerExternalFactory factory) {
+    	external = factory;
+    }
+
+    public void emitErrorMessage(String msg) {
+    		System.out.println(msg);
+    	}
+    	public void reportError(RecognitionException e) {
+    		System.out.println(e);
+    	}
+
+    	//public void addVariable(String var, IntStream input) throws NoViableAltException {
+    	//	if(!vars.contains(var)) {
+    	//		vars.add(var);
+    	//	} else {
+    	//		throw new NoViableAltException("already declared \"" + var + "\"", 3, 0, input);
+    	//	}
+    	//}
+    	public void addVariable(TextMarkerBlock parent, String name, String type) {
+    		parent.getEnvironment().addVariable(name, type);
+    	}
+    	
+    	public boolean ownsVariable(TextMarkerBlock parent, String name) {
+    		return parent.getEnvironment().ownsVariable(name);
+    	}
+    	public boolean isVariable(TextMarkerBlock parent, String name) {
+    		return parent.getEnvironment().isVariable(name);
+    	}
+    	
+    	public void setValue(TextMarkerBlock parent, String name, Object value) {
+    		if(value != null) {
+    			parent.getEnvironment().setVariableValue(name, value);
+    		}
+    	}
+    	
+    	public boolean ownsVariableOfType(TextMarkerBlock parent, String name, String type) {
+    		return parent.getEnvironment().ownsVariableOfType(name,type);
+    	}
+    	
+    	public boolean isVariableOfType(TextMarkerBlock parent, String name, String type) {
+    		return parent.getEnvironment().isVariableOfType(name,type);
+    	}
+    	
+    	public void addType(TextMarkerBlock parent, String type) {
+    	}
+    	
+    	public void addType(TextMarkerBlock parent, String name, String parentType, List featuresTypes, List featuresNames) {
+        	}
+    	
+    	public boolean isType(TextMarkerBlock parent, String type) {
+    		return parent.getEnvironment().getType(type) != null || type.equals("Document");
+    	}
+    	
+    	public void checkVariable(String var, IntStream input) throws NoViableAltException {
+    		if(!vars.contains(var)) {
+    			throw new NoViableAltException("not declared \"" + var + "\"", 3, 0, input);
+    		}
+    	}
+    	
+    	public void addImportTypeSystem(TextMarkerBlock parent, String descriptor) {
+    		//parent.getEnvironment().addTypeSystem(descriptor);
+    	}
+    	public void addImportScript(TextMarkerBlock parent, String namespace) {
+    		parent.getScript().addScript(namespace, null);
+    	}
+    	public void addImportEngine(TextMarkerBlock parent, String namespace) {
+    		parent.getScript().addEngine(namespace, null);
+    	}
+    	
+    	
+    	protected static final int[] getBounds(Token t) {
+        		if (t instanceof CommonToken) {
+        			CommonToken ct = (CommonToken) t;
+        			int[] bounds = {ct.getStartIndex(), ct.getStopIndex()}; 
+        			return bounds;
+        		}
+        		return null;
+        	}
+    	
+    	private CAS cas;
+    	private TypeSystemDescription localTSD;
+    	private String[] resourcePaths;
+    	
+    	public void setCAS(CAS cas) {
+    		this.cas = cas;
+    	}
+    	
+    	public void setResourcePaths(String[] resourcePaths) {
+    		this.resourcePaths = resourcePaths;
+    	}
+    	
+    	 public void setLocalTSD(TypeSystemDescription localTSD) {
+          		this.localTSD = localTSD;
+       	 }
+
+
+
+    // $ANTLR start "file_input"
+    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:185:1: file_input[String moduleName] returns [TextMarkerModule module] : p= packageDeclaration gs= globalStatements s= statements EOF ;
+    public final TextMarkerModule file_input(String moduleName) throws RecognitionException {
+        TextMarkerModule module = null;
+
+        String p = null;
+
+        List<TextMarkerStatement> gs = null;
+
+        List<TextMarkerStatement> s = null;
+
+
+
+        TextMarkerScriptBlock rootBlock = null;
+        List<TextMarkerStatement> stmts = new ArrayList<TextMarkerStatement>();
+
+        try {
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:190:2: (p= packageDeclaration gs= globalStatements s= statements EOF )
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:191:2: p= packageDeclaration gs= globalStatements s= statements EOF
+            {
+            pushFollow(FOLLOW_packageDeclaration_in_file_input76);
+            p=packageDeclaration();
+
+            state._fsp--;
+            if (state.failed) return module;
+            if ( state.backtracking==0 ) {
+
+              	rootBlock = factory.createRootScriptBlock(moduleName, p, cas, localTSD);
+                     	
+                      try {
+                      	Type documentType = cas.getJCas().getCasType(DocumentAnnotation.type);
+                      	rootBlock.getEnvironment().addType("Document", documentType);
+                      	Type annotationType = cas.getJCas().getCasType(org.apache.uima.jcas.tcas.Annotation.type);
+                      	rootBlock.getEnvironment().addType("Annotation", annotationType);
+                      	rootBlock.getEnvironment().setResourcePaths(resourcePaths);
+                      	} catch (CASException e) {
+                      		e.printStackTrace();
+                     	}
+              	rootBlock.setElements(stmts);
+              	module = new TextMarkerModule(rootBlock);
+              	rootBlock.setScript(module);
+              	
+            }
+            if ( state.backtracking==0 ) {
+              blockDeclaration_stack.push(new blockDeclaration_scope());((blockDeclaration_scope)blockDeclaration_stack.peek()).env = rootBlock;
+            }
+            pushFollow(FOLLOW_globalStatements_in_file_input92);
+            gs=globalStatements();
+
+            state._fsp--;
+            if (state.failed) return module;
+            if ( state.backtracking==0 ) {
+              stmts.addAll(gs);
+            }
+            pushFollow(FOLLOW_statements_in_file_input101);
+            s=statements();
+
+            state._fsp--;
+            if (state.failed) return module;
+            if ( state.backtracking==0 ) {
+              stmts.addAll(s);
+            }
+            match(input,EOF,FOLLOW_EOF_in_file_input109); if (state.failed) return module;
+
+            }
+
+        }
+
+        	catch (RecognitionException exception1) {
+        		emitErrorMessage(exception1.toString());
+        	}
+        	catch (Throwable exception2) {
+        		emitErrorMessage(exception2.toString());
+        	}
+        finally {
+        }
+        return module;
+    }
+    // $ANTLR end "file_input"
+
+
+    // $ANTLR start "packageDeclaration"
+    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:216:1: packageDeclaration returns [String pack = \"\"] : PackageString p= dottedIdentifier SEMI ;
+    public final String packageDeclaration() throws RecognitionException {
+        String pack =  "";
+
+        String p = null;
+
+
+        try {
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:217:2: ( PackageString p= dottedIdentifier SEMI )
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:217:4: PackageString p= dottedIdentifier SEMI
+            {
+            match(input,PackageString,FOLLOW_PackageString_in_packageDeclaration124); if (state.failed) return pack;
+            pushFollow(FOLLOW_dottedIdentifier_in_packageDeclaration130);
+            p=dottedIdentifier();
+
+            state._fsp--;
+            if (state.failed) return pack;
+            match(input,SEMI,FOLLOW_SEMI_in_packageDeclaration132); if (state.failed) return pack;
+            if ( state.backtracking==0 ) {
+              pack = p;
+            }
+
+            }
+
+        }
+
+        	catch (RecognitionException exception1) {
+        		emitErrorMessage(exception1.toString());
+        	}
+        	catch (Throwable exception2) {
+        		emitErrorMessage(exception2.toString());
+        	}
+        finally {
+        }
+        return pack;
+    }
+    // $ANTLR end "packageDeclaration"
+
+
+    // $ANTLR start "statements"
+    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:220:1: statements returns [List<TextMarkerStatement> stmts = new ArrayList<TextMarkerStatement>()] : (stmt= statement )* ;
+    public final List<TextMarkerStatement> statements() throws RecognitionException {
+        List<TextMarkerStatement> stmts =  new ArrayList<TextMarkerStatement>();
+
+        TextMarkerStatement stmt = null;
+
+
+        try {
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:221:2: ( (stmt= statement )* )
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:222:2: (stmt= statement )*
+            {
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:222:2: (stmt= statement )*
+            loop1:
+            do {
+                int alt1=2;
+                int LA1_0 = input.LA(1);
+
+                if ( ((LA1_0>=DECLARE && LA1_0<=WORDTABLE)||LA1_0==BasicAnnotationType||(LA1_0>=BlockString && LA1_0<=BooleanString)||(LA1_0>=CONDITION && LA1_0<=TYPELIST)||LA1_0==StringLiteral||(LA1_0>=Identifier && LA1_0<=LPAREN)) ) {
+                    alt1=1;
+                }
+
+
+                switch (alt1) {
+            	case 1 :
+            	    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:222:3: stmt= statement
+            	    {
+            	    pushFollow(FOLLOW_statement_in_statements155);
+            	    stmt=statement();
+
+            	    state._fsp--;
+            	    if (state.failed) return stmts;
+            	    if(stmt != null) {stmts.add(stmt);}
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop1;
+                }
+            } while (true);
+
+
+            }
+
+        }
+
+        	catch (RecognitionException exception1) {
+        		emitErrorMessage(exception1.toString());
+        	}
+        	catch (Throwable exception2) {
+        		emitErrorMessage(exception2.toString());
+        	}
+        finally {
+        }
+        return stmts;
+    }
+    // $ANTLR end "statements"
+
+
+    // $ANTLR start "globalStatements"
+    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:225:1: globalStatements returns [List<TextMarkerStatement> stmts = new ArrayList<TextMarkerStatement>()] : (morestmts= globalStatement )* ;
+    public final List<TextMarkerStatement> globalStatements() throws RecognitionException {
+        List<TextMarkerStatement> stmts =  new ArrayList<TextMarkerStatement>();
+
+        List<TextMarkerStatement> morestmts = null;
+
+
+        try {
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:226:2: ( (morestmts= globalStatement )* )
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:227:2: (morestmts= globalStatement )*
+            {
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:227:2: (morestmts= globalStatement )*
+            loop2:
+            do {
+                int alt2=2;
+                int LA2_0 = input.LA(1);
+
+                if ( ((LA2_0>=ScriptString && LA2_0<=EngineString)||LA2_0==TypeSystemString) ) {
+                    alt2=1;
+                }
+
+
+                switch (alt2) {
+            	case 1 :
+            	    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:227:3: morestmts= globalStatement
+            	    {
+            	    pushFollow(FOLLOW_globalStatement_in_globalStatements180);
+            	    morestmts=globalStatement();
+
+            	    state._fsp--;
+            	    if (state.failed) return stmts;
+            	    if ( state.backtracking==0 ) {
+            	      if(morestmts != null) {stmts.addAll(morestmts);}
+            	    }
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop2;
+                }
+            } while (true);
+
+
+            }
+
+        }
+
+        	catch (RecognitionException exception1) {
+        		emitErrorMessage(exception1.toString());
+        	}
+        	catch (Throwable exception2) {
+        		emitErrorMessage(exception2.toString());
+        	}
+        finally {
+        }
+        return stmts;
+    }
+    // $ANTLR end "globalStatements"
+
+
+    // $ANTLR start "globalStatement"
+    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:230:1: globalStatement returns [List<TextMarkerStatement> stmts = new ArrayList<TextMarkerStatement>()] : stmtImport= importStatement ;
+    public final List<TextMarkerStatement> globalStatement() throws RecognitionException {
+        List<TextMarkerStatement> stmts =  new ArrayList<TextMarkerStatement>();
+
+        TextMarkerStatement stmtImport = null;
+
+
+        try {
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:231:2: (stmtImport= importStatement )
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:232:2: stmtImport= importStatement
+            {
+            pushFollow(FOLLOW_importStatement_in_globalStatement204);
+            stmtImport=importStatement();
+
+            state._fsp--;
+            if (state.failed) return stmts;
+            if ( state.backtracking==0 ) {
+              stmts.add(stmtImport);
+            }
+
+            }
+
+        }
+
+        	catch (RecognitionException exception1) {
+        		emitErrorMessage(exception1.toString());
+        	}
+        	catch (Throwable exception2) {
+        		emitErrorMessage(exception2.toString());
+        	}
+        finally {
+        }
+        return stmts;
+    }
+    // $ANTLR end "globalStatement"
+
+
+    // $ANTLR start "statement"
+    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:235:1: statement returns [TextMarkerStatement stmt = null] : (stmtDecl= declaration | stmtVariable= variableDeclaration | stmtRule= simpleStatement | stmtBlock= blockDeclaration | stmtAutomata= automataDeclaration ) ;
+    public final TextMarkerStatement statement() throws RecognitionException {
+        TextMarkerStatement stmt =  null;
+
+        TextMarkerStatement stmtDecl = null;
+
+        TextMarkerStatement stmtVariable = null;
+
+        TextMarkerRule stmtRule = null;
+
+        TextMarkerBlock stmtBlock = null;
+
+        TextMarkerBlock stmtAutomata = null;
+
+
+        try {
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:236:2: ( (stmtDecl= declaration | stmtVariable= variableDeclaration | stmtRule= simpleStatement | stmtBlock= blockDeclaration | stmtAutomata= automataDeclaration ) )
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:237:2: (stmtDecl= declaration | stmtVariable= variableDeclaration | stmtRule= simpleStatement | stmtBlock= blockDeclaration | stmtAutomata= automataDeclaration )
+            {
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:237:2: (stmtDecl= declaration | stmtVariable= variableDeclaration | stmtRule= simpleStatement | stmtBlock= blockDeclaration | stmtAutomata= automataDeclaration )
+            int alt3=5;
+            switch ( input.LA(1) ) {
+            case DECLARE:
+                {
+                alt3=1;
+                }
+                break;
+            case WORDLIST:
+            case WORDTABLE:
+            case TypeString:
+            case IntString:
+            case DoubleString:
+            case StringString:
+            case BooleanString:
+            case CONDITION:
+            case ACTION:
+            case BOOLEANLIST:
+            case INTLIST:
+            case DOUBLELIST:
+            case STRINGLIST:
+            case TYPELIST:
+                {
+                alt3=2;
+                }
+                break;
+            case BasicAnnotationType:
+            case StringLiteral:
+            case Identifier:
+            case LPAREN:
+                {
+                alt3=3;
+                }
+                break;
+            case BlockString:
+                {
+                alt3=4;
+                }
+                break;
+            case AutomataBlockString:
+                {
+                alt3=5;
+                }
+                break;
+            default:
+                if (state.backtracking>0) {state.failed=true; return stmt;}
+                NoViableAltException nvae =
+                    new NoViableAltException("", 3, 0, input);
+
+                throw nvae;
+            }
+
+            switch (alt3) {
+                case 1 :
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:237:4: stmtDecl= declaration
+                    {
+                    pushFollow(FOLLOW_declaration_in_statement230);
+                    stmtDecl=declaration();
+
+                    state._fsp--;
+                    if (state.failed) return stmt;
+                    if ( state.backtracking==0 ) {
+                      stmt = stmtDecl;
+                    }
+
+                    }
+                    break;
+                case 2 :
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:238:4: stmtVariable= variableDeclaration
+                    {
+                    pushFollow(FOLLOW_variableDeclaration_in_statement241);
+                    stmtVariable=variableDeclaration();
+
+                    state._fsp--;
+                    if (state.failed) return stmt;
+                    if ( state.backtracking==0 ) {
+                      stmt = stmtVariable;
+                    }
+
+                    }
+                    break;
+                case 3 :
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:239:4: stmtRule= simpleStatement
+                    {
+                    pushFollow(FOLLOW_simpleStatement_in_statement252);
+                    stmtRule=simpleStatement();
+
+                    state._fsp--;
+                    if (state.failed) return stmt;
+                    if ( state.backtracking==0 ) {
+                      stmt = stmtRule;
+                    }
+
+                    }
+                    break;
+                case 4 :
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:240:4: stmtBlock= blockDeclaration
+                    {
+                    pushFollow(FOLLOW_blockDeclaration_in_statement263);
+                    stmtBlock=blockDeclaration();
+
+                    state._fsp--;
+                    if (state.failed) return stmt;
+                    if ( state.backtracking==0 ) {
+                      stmt = stmtBlock;
+                    }
+
+                    }
+                    break;
+                case 5 :
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:241:4: stmtAutomata= automataDeclaration
+                    {
+                    pushFollow(FOLLOW_automataDeclaration_in_statement274);
+                    stmtAutomata=automataDeclaration();
+
+                    state._fsp--;
+                    if (state.failed) return stmt;
+                    if ( state.backtracking==0 ) {
+                      stmt = stmtBlock;
+                    }
+
+                    }
+                    break;
+
+            }
+
+
+            }
+
+        }
+
+        	catch (RecognitionException exception1) {
+        		emitErrorMessage(exception1.toString());
+        	}
+        	catch (Throwable exception2) {
+        		emitErrorMessage(exception2.toString());
+        	}
+        finally {
+        }
+        return stmt;
+    }
+    // $ANTLR end "statement"
+
+
+    // $ANTLR start "variableDeclaration"
+    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:245:1: variableDeclaration returns [TextMarkerStatement stmt = null] : (type= IntString {...}?id= Identifier ( COMMA {...}?id= Identifier )* ( ASSIGN_EQUAL value1= numberExpression )? SEMI | type= DoubleString {...}?id= Identifier ( COMMA {...}?id= Identifier )* ( ASSIGN_EQUAL value2= numberExpression )? SEMI | type= StringString {...}?id= Identifier ( COMMA {...}?id= Identifier )* ( ASSIGN_EQUAL value3= stringExpression )? SEMI | type= BooleanString {...}?id= Identifier ( COMMA {...}?id= Identifier )* ( ASSIGN_EQUAL value4= booleanExpression )? SEMI | type= TypeString {...}?id= Identifier ( COMMA {...}?id= Identifier )* ( ASSIGN_EQUAL value5= annotationType )? SEMI | type= WORDLIST {...}?name= Identifier ( ASSIGN_EQUAL list= wordListExpression )? SEMI | type= WORDTABLE {...}?name= Identifier ( ASSIGN_EQUAL table= wordTableExpression )? SEMI | type
 = BOOLEANLIST {...}?name= Identifier ( ASSIGN_EQUAL bl= booleanListExpression )? SEMI | type= STRINGLIST {...}?name= Identifier ( ASSIGN_EQUAL sl= stringListExpression )? SEMI | type= INTLIST {...}?name= Identifier ( ASSIGN_EQUAL il= numberListExpression )? SEMI | type= DOUBLELIST {...}?name= Identifier ( ASSIGN_EQUAL dl= numberListExpression )? SEMI | type= TYPELIST {...}?name= Identifier ( ASSIGN_EQUAL tl= typeListExpression )? SEMI | stmt1= conditionDeclaration | stmt2= actionDeclaration );
+    public final TextMarkerStatement variableDeclaration() throws RecognitionException {
+        TextMarkerStatement stmt =  null;
+
+        Token type=null;
+        Token id=null;
+        Token name=null;
+        NumberExpression value1 = null;
+
+        NumberExpression value2 = null;
+
+        StringExpression value3 = null;
+
+        BooleanExpression value4 = null;
+
+        Token value5 = null;
+
+        WordListExpression list = null;
+
+        WordTableExpression table = null;
+
+        BooleanListExpression bl = null;
+
+        StringListExpression sl = null;
+
+        NumberListExpression il = null;
+
+        NumberListExpression dl = null;
+
+        TypeListExpression tl = null;
+
+        TextMarkerStatement stmt1 = null;
+
+        TextMarkerStatement stmt2 = null;
+
+
+        try {
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:246:2: (type= IntString {...}?id= Identifier ( COMMA {...}?id= Identifier )* ( ASSIGN_EQUAL value1= numberExpression )? SEMI | type= DoubleString {...}?id= Identifier ( COMMA {...}?id= Identifier )* ( ASSIGN_EQUAL value2= numberExpression )? SEMI | type= StringString {...}?id= Identifier ( COMMA {...}?id= Identifier )* ( ASSIGN_EQUAL value3= stringExpression )? SEMI | type= BooleanString {...}?id= Identifier ( COMMA {...}?id= Identifier )* ( ASSIGN_EQUAL value4= booleanExpression )? SEMI | type= TypeString {...}?id= Identifier ( COMMA {...}?id= Identifier )* ( ASSIGN_EQUAL value5= annotationType )? SEMI | type= WORDLIST {...}?name= Identifier ( ASSIGN_EQUAL list= wordListExpression )? SEMI | type= WORDTABLE {...}?name= Identifier ( ASSIGN_EQUAL table= wordTableExpression )? SEMI | type= BOOLEANLIST {...}?name= Identifier ( ASSIGN_EQUAL bl= 
 booleanListExpression )? SEMI | type= STRINGLIST {...}?name= Identifier ( ASSIGN_EQUAL sl= stringListExpression )? SEMI | type= INTLIST {...}?name= Identifier ( ASSIGN_EQUAL il= numberListExpression )? SEMI | type= DOUBLELIST {...}?name= Identifier ( ASSIGN_EQUAL dl= numberListExpression )? SEMI | type= TYPELIST {...}?name= Identifier ( ASSIGN_EQUAL tl= typeListExpression )? SEMI | stmt1= conditionDeclaration | stmt2= actionDeclaration )
+            int alt21=14;
+            switch ( input.LA(1) ) {
+            case IntString:
+                {
+                alt21=1;
+                }
+                break;
+            case DoubleString:
+                {
+                alt21=2;
+                }
+                break;
+            case StringString:
+                {
+                alt21=3;
+                }
+                break;
+            case BooleanString:
+                {
+                alt21=4;
+                }
+                break;
+            case TypeString:
+                {
+                alt21=5;
+                }
+                break;
+            case WORDLIST:
+                {
+                alt21=6;
+                }
+                break;
+            case WORDTABLE:
+                {
+                alt21=7;
+                }
+                break;
+            case BOOLEANLIST:
+                {
+                alt21=8;
+                }
+                break;
+            case STRINGLIST:
+                {
+                alt21=9;
+                }
+                break;
+            case INTLIST:
+                {
+                alt21=10;
+                }
+                break;
+            case DOUBLELIST:
+                {
+                alt21=11;
+                }
+                break;
+            case TYPELIST:
+                {
+                alt21=12;
+                }
+                break;
+            case CONDITION:
+                {
+                alt21=13;
+                }
+                break;
+            case ACTION:
+                {
+                alt21=14;
+                }
+                break;
+            default:
+                if (state.backtracking>0) {state.failed=true; return stmt;}
+                NoViableAltException nvae =
+                    new NoViableAltException("", 21, 0, input);
+
+                throw nvae;
+            }
+
+            switch (alt21) {
+                case 1 :
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:247:2: type= IntString {...}?id= Identifier ( COMMA {...}?id= Identifier )* ( ASSIGN_EQUAL value1= numberExpression )? SEMI
+                    {
+                    type=(Token)match(input,IntString,FOLLOW_IntString_in_variableDeclaration299); if (state.failed) return stmt;
+                    if ( !((!ownsVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, input.LT(1).getText()))) ) {
+                        if (state.backtracking>0) {state.failed=true; return stmt;}
+                        throw new FailedPredicateException(input, "variableDeclaration", "!ownsVariable($blockDeclaration::env, input.LT(1).getText())");
+                    }
+                    id=(Token)match(input,Identifier,FOLLOW_Identifier_in_variableDeclaration308); if (state.failed) return stmt;
+                    if ( state.backtracking==0 ) {
+                      addVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, id.getText(), type.getText());
+                    }
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:249:3: ( COMMA {...}?id= Identifier )*
+                    loop4:
+                    do {
+                        int alt4=2;
+                        int LA4_0 = input.LA(1);
+
+                        if ( (LA4_0==COMMA) ) {
+                            alt4=1;
+                        }
+
+
+                        switch (alt4) {
+                    	case 1 :
+                    	    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:249:4: COMMA {...}?id= Identifier
+                    	    {
+                    	    match(input,COMMA,FOLLOW_COMMA_in_variableDeclaration315); if (state.failed) return stmt;
+                    	    if ( !((!ownsVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, input.LT(1).getText()))) ) {
+                    	        if (state.backtracking>0) {state.failed=true; return stmt;}
+                    	        throw new FailedPredicateException(input, "variableDeclaration", "!ownsVariable($blockDeclaration::env, input.LT(1).getText())");
+                    	    }
+                    	    id=(Token)match(input,Identifier,FOLLOW_Identifier_in_variableDeclaration323); if (state.failed) return stmt;
+                    	    if ( state.backtracking==0 ) {
+                    	      addVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, id.getText(), type.getText());
+                    	    }
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    break loop4;
+                        }
+                    } while (true);
+
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:250:6: ( ASSIGN_EQUAL value1= numberExpression )?
+                    int alt5=2;
+                    int LA5_0 = input.LA(1);
+
+                    if ( (LA5_0==ASSIGN_EQUAL) ) {
+                        alt5=1;
+                    }
+                    switch (alt5) {
+                        case 1 :
+                            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:250:7: ASSIGN_EQUAL value1= numberExpression
+                            {
+                            match(input,ASSIGN_EQUAL,FOLLOW_ASSIGN_EQUAL_in_variableDeclaration333); if (state.failed) return stmt;
+                            pushFollow(FOLLOW_numberExpression_in_variableDeclaration339);
+                            value1=numberExpression();
+
+                            state._fsp--;
+                            if (state.failed) return stmt;
+
+                            }
+                            break;
+
+                    }
+
+                    if ( state.backtracking==0 ) {
+                      setValue(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, id.getText(), value1);
+                    }
+                    match(input,SEMI,FOLLOW_SEMI_in_variableDeclaration346); if (state.failed) return stmt;
+
+                    }
+                    break;
+                case 2 :
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:252:2: type= DoubleString {...}?id= Identifier ( COMMA {...}?id= Identifier )* ( ASSIGN_EQUAL value2= numberExpression )? SEMI
+                    {
+                    type=(Token)match(input,DoubleString,FOLLOW_DoubleString_in_variableDeclaration356); if (state.failed) return stmt;
+                    if ( !((!ownsVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, input.LT(1).getText()))) ) {
+                        if (state.backtracking>0) {state.failed=true; return stmt;}
+                        throw new FailedPredicateException(input, "variableDeclaration", "!ownsVariable($blockDeclaration::env, input.LT(1).getText())");
+                    }
+                    id=(Token)match(input,Identifier,FOLLOW_Identifier_in_variableDeclaration365); if (state.failed) return stmt;
+                    if ( state.backtracking==0 ) {
+                      addVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, id.getText(), type.getText());
+                    }
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:254:3: ( COMMA {...}?id= Identifier )*
+                    loop6:
+                    do {
+                        int alt6=2;
+                        int LA6_0 = input.LA(1);
+
+                        if ( (LA6_0==COMMA) ) {
+                            alt6=1;
+                        }
+
+
+                        switch (alt6) {
+                    	case 1 :
+                    	    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:254:4: COMMA {...}?id= Identifier
+                    	    {
+                    	    match(input,COMMA,FOLLOW_COMMA_in_variableDeclaration372); if (state.failed) return stmt;
+                    	    if ( !((!ownsVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, input.LT(1).getText()))) ) {
+                    	        if (state.backtracking>0) {state.failed=true; return stmt;}
+                    	        throw new FailedPredicateException(input, "variableDeclaration", "!ownsVariable($blockDeclaration::env, input.LT(1).getText())");
+                    	    }
+                    	    id=(Token)match(input,Identifier,FOLLOW_Identifier_in_variableDeclaration380); if (state.failed) return stmt;
+                    	    if ( state.backtracking==0 ) {
+                    	      addVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, id.getText(), type.getText());
+                    	    }
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    break loop6;
+                        }
+                    } while (true);
+
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:255:7: ( ASSIGN_EQUAL value2= numberExpression )?
+                    int alt7=2;
+                    int LA7_0 = input.LA(1);
+
+                    if ( (LA7_0==ASSIGN_EQUAL) ) {
+                        alt7=1;
+                    }
+                    switch (alt7) {
+                        case 1 :
+                            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:255:8: ASSIGN_EQUAL value2= numberExpression
+                            {
+                            match(input,ASSIGN_EQUAL,FOLLOW_ASSIGN_EQUAL_in_variableDeclaration391); if (state.failed) return stmt;
+                            pushFollow(FOLLOW_numberExpression_in_variableDeclaration397);
+                            value2=numberExpression();
+
+                            state._fsp--;
+                            if (state.failed) return stmt;
+
+                            }
+                            break;
+
+                    }
+
+                    if ( state.backtracking==0 ) {
+                      setValue(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, id.getText(), value2);
+                    }
+                    match(input,SEMI,FOLLOW_SEMI_in_variableDeclaration403); if (state.failed) return stmt;
+
+                    }
+                    break;
+                case 3 :
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:257:2: type= StringString {...}?id= Identifier ( COMMA {...}?id= Identifier )* ( ASSIGN_EQUAL value3= stringExpression )? SEMI
+                    {
+                    type=(Token)match(input,StringString,FOLLOW_StringString_in_variableDeclaration413); if (state.failed) return stmt;
+                    if ( !((!ownsVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, input.LT(1).getText()))) ) {
+                        if (state.backtracking>0) {state.failed=true; return stmt;}
+                        throw new FailedPredicateException(input, "variableDeclaration", "!ownsVariable($blockDeclaration::env, input.LT(1).getText())");
+                    }
+                    id=(Token)match(input,Identifier,FOLLOW_Identifier_in_variableDeclaration422); if (state.failed) return stmt;
+                    if ( state.backtracking==0 ) {
+                      addVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, id.getText(), type.getText());
+                    }
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:259:3: ( COMMA {...}?id= Identifier )*
+                    loop8:
+                    do {
+                        int alt8=2;
+                        int LA8_0 = input.LA(1);
+
+                        if ( (LA8_0==COMMA) ) {
+                            alt8=1;
+                        }
+
+
+                        switch (alt8) {
+                    	case 1 :
+                    	    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:259:4: COMMA {...}?id= Identifier
+                    	    {
+                    	    match(input,COMMA,FOLLOW_COMMA_in_variableDeclaration429); if (state.failed) return stmt;
+                    	    if ( !((!ownsVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, input.LT(1).getText()))) ) {
+                    	        if (state.backtracking>0) {state.failed=true; return stmt;}
+                    	        throw new FailedPredicateException(input, "variableDeclaration", "!ownsVariable($blockDeclaration::env, input.LT(1).getText())");
+                    	    }
+                    	    id=(Token)match(input,Identifier,FOLLOW_Identifier_in_variableDeclaration437); if (state.failed) return stmt;
+                    	    if ( state.backtracking==0 ) {
+                    	      addVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, id.getText(), type.getText());
+                    	    }
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    break loop8;
+                        }
+                    } while (true);
+
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:260:7: ( ASSIGN_EQUAL value3= stringExpression )?
+                    int alt9=2;
+                    int LA9_0 = input.LA(1);
+
+                    if ( (LA9_0==ASSIGN_EQUAL) ) {
+                        alt9=1;
+                    }
+                    switch (alt9) {
+                        case 1 :
+                            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:260:8: ASSIGN_EQUAL value3= stringExpression
+                            {
+                            match(input,ASSIGN_EQUAL,FOLLOW_ASSIGN_EQUAL_in_variableDeclaration448); if (state.failed) return stmt;
+                            pushFollow(FOLLOW_stringExpression_in_variableDeclaration454);
+                            value3=stringExpression();
+
+                            state._fsp--;
+                            if (state.failed) return stmt;
+
+                            }
+                            break;
+
+                    }
+
+                    if ( state.backtracking==0 ) {
+                      setValue(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, id.getText(), value3);
+                    }
+                    match(input,SEMI,FOLLOW_SEMI_in_variableDeclaration460); if (state.failed) return stmt;
+
+                    }
+                    break;
+                case 4 :
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:262:2: type= BooleanString {...}?id= Identifier ( COMMA {...}?id= Identifier )* ( ASSIGN_EQUAL value4= booleanExpression )? SEMI
+                    {
+                    type=(Token)match(input,BooleanString,FOLLOW_BooleanString_in_variableDeclaration470); if (state.failed) return stmt;
+                    if ( !((!ownsVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, input.LT(1).getText()))) ) {
+                        if (state.backtracking>0) {state.failed=true; return stmt;}
+                        throw new FailedPredicateException(input, "variableDeclaration", "!ownsVariable($blockDeclaration::env, input.LT(1).getText())");
+                    }
+                    id=(Token)match(input,Identifier,FOLLOW_Identifier_in_variableDeclaration479); if (state.failed) return stmt;
+                    if ( state.backtracking==0 ) {
+                      addVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, id.getText(), type.getText());
+                    }
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:264:3: ( COMMA {...}?id= Identifier )*
+                    loop10:
+                    do {
+                        int alt10=2;
+                        int LA10_0 = input.LA(1);
+
+                        if ( (LA10_0==COMMA) ) {
+                            alt10=1;
+                        }
+
+
+                        switch (alt10) {
+                    	case 1 :
+                    	    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:264:4: COMMA {...}?id= Identifier
+                    	    {
+                    	    match(input,COMMA,FOLLOW_COMMA_in_variableDeclaration486); if (state.failed) return stmt;
+                    	    if ( !((!ownsVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, input.LT(1).getText()))) ) {
+                    	        if (state.backtracking>0) {state.failed=true; return stmt;}
+                    	        throw new FailedPredicateException(input, "variableDeclaration", "!ownsVariable($blockDeclaration::env, input.LT(1).getText())");
+                    	    }
+                    	    id=(Token)match(input,Identifier,FOLLOW_Identifier_in_variableDeclaration494); if (state.failed) return stmt;
+                    	    if ( state.backtracking==0 ) {
+                    	      addVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, id.getText(), type.getText());
+                    	    }
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    break loop10;
+                        }
+                    } while (true);
+
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:265:7: ( ASSIGN_EQUAL value4= booleanExpression )?
+                    int alt11=2;
+                    int LA11_0 = input.LA(1);
+
+                    if ( (LA11_0==ASSIGN_EQUAL) ) {
+                        alt11=1;
+                    }
+                    switch (alt11) {
+                        case 1 :
+                            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:265:8: ASSIGN_EQUAL value4= booleanExpression
+                            {
+                            match(input,ASSIGN_EQUAL,FOLLOW_ASSIGN_EQUAL_in_variableDeclaration505); if (state.failed) return stmt;
+                            pushFollow(FOLLOW_booleanExpression_in_variableDeclaration511);
+                            value4=booleanExpression();
+
+                            state._fsp--;
+                            if (state.failed) return stmt;
+
+                            }
+                            break;
+
+                    }
+
+                    if ( state.backtracking==0 ) {
+                      setValue(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, id.getText(), value4);
+                    }
+                    match(input,SEMI,FOLLOW_SEMI_in_variableDeclaration517); if (state.failed) return stmt;
+
+                    }
+                    break;
+                case 5 :
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:267:2: type= TypeString {...}?id= Identifier ( COMMA {...}?id= Identifier )* ( ASSIGN_EQUAL value5= annotationType )? SEMI
+                    {
+                    type=(Token)match(input,TypeString,FOLLOW_TypeString_in_variableDeclaration527); if (state.failed) return stmt;
+                    if ( !((!ownsVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, input.LT(1).getText()))) ) {
+                        if (state.backtracking>0) {state.failed=true; return stmt;}
+                        throw new FailedPredicateException(input, "variableDeclaration", "!ownsVariable($blockDeclaration::env, input.LT(1).getText())");
+                    }
+                    id=(Token)match(input,Identifier,FOLLOW_Identifier_in_variableDeclaration536); if (state.failed) return stmt;
+                    if ( state.backtracking==0 ) {
+                      addVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, id.getText(), type.getText());
+                    }
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:269:3: ( COMMA {...}?id= Identifier )*
+                    loop12:
+                    do {
+                        int alt12=2;
+                        int LA12_0 = input.LA(1);
+
+                        if ( (LA12_0==COMMA) ) {
+                            alt12=1;
+                        }
+
+
+                        switch (alt12) {
+                    	case 1 :
+                    	    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:269:4: COMMA {...}?id= Identifier
+                    	    {
+                    	    match(input,COMMA,FOLLOW_COMMA_in_variableDeclaration543); if (state.failed) return stmt;
+                    	    if ( !((!ownsVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, input.LT(1).getText()))) ) {
+                    	        if (state.backtracking>0) {state.failed=true; return stmt;}
+                    	        throw new FailedPredicateException(input, "variableDeclaration", "!ownsVariable($blockDeclaration::env, input.LT(1).getText())");
+                    	    }
+                    	    id=(Token)match(input,Identifier,FOLLOW_Identifier_in_variableDeclaration551); if (state.failed) return stmt;
+                    	    if ( state.backtracking==0 ) {
+                    	      addVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, id.getText(), type.getText());
+                    	    }
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    break loop12;
+                        }
+                    } while (true);
+
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:270:7: ( ASSIGN_EQUAL value5= annotationType )?
+                    int alt13=2;
+                    int LA13_0 = input.LA(1);
+
+                    if ( (LA13_0==ASSIGN_EQUAL) ) {
+                        alt13=1;
+                    }
+                    switch (alt13) {
+                        case 1 :
+                            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:270:8: ASSIGN_EQUAL value5= annotationType
+                            {
+                            match(input,ASSIGN_EQUAL,FOLLOW_ASSIGN_EQUAL_in_variableDeclaration562); if (state.failed) return stmt;
+                            pushFollow(FOLLOW_annotationType_in_variableDeclaration568);
+                            value5=annotationType();
+
+                            state._fsp--;
+                            if (state.failed) return stmt;
+
+                            }
+                            break;
+
+                    }
+
+                    if ( state.backtracking==0 ) {
+                      setValue(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, id.getText(), value5);
+                    }
+                    match(input,SEMI,FOLLOW_SEMI_in_variableDeclaration574); if (state.failed) return stmt;
+
+                    }
+                    break;
+                case 6 :
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:272:2: type= WORDLIST {...}?name= Identifier ( ASSIGN_EQUAL list= wordListExpression )? SEMI
+                    {
+                    type=(Token)match(input,WORDLIST,FOLLOW_WORDLIST_in_variableDeclaration585); if (state.failed) return stmt;
+                    if ( !((!isVariableOfType(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, input.LT(1).getText(), type.getText()))) ) {
+                        if (state.backtracking>0) {state.failed=true; return stmt;}
+                        throw new FailedPredicateException(input, "variableDeclaration", "!isVariableOfType($blockDeclaration::env, input.LT(1).getText(), type.getText())");
+                    }
+                    name=(Token)match(input,Identifier,FOLLOW_Identifier_in_variableDeclaration597); if (state.failed) return stmt;
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:274:20: ( ASSIGN_EQUAL list= wordListExpression )?
+                    int alt14=2;
+                    int LA14_0 = input.LA(1);
+
+                    if ( (LA14_0==ASSIGN_EQUAL) ) {
+                        alt14=1;
+                    }
+                    switch (alt14) {
+                        case 1 :
+                            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:274:21: ASSIGN_EQUAL list= wordListExpression
+                            {
+                            match(input,ASSIGN_EQUAL,FOLLOW_ASSIGN_EQUAL_in_variableDeclaration600); if (state.failed) return stmt;
+                            pushFollow(FOLLOW_wordListExpression_in_variableDeclaration606);
+                            list=wordListExpression();
+
+                            state._fsp--;
+                            if (state.failed) return stmt;
+
+                            }
+                            break;
+
+                    }
+
+                    match(input,SEMI,FOLLOW_SEMI_in_variableDeclaration610); if (state.failed) return stmt;
+                    if ( state.backtracking==0 ) {
+                      addVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, name.getText(), type.getText());if(list != null){setValue(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, name.getText(), list);}
+                    }
+
+                    }
+                    break;
+                case 7 :
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:276:2: type= WORDTABLE {...}?name= Identifier ( ASSIGN_EQUAL table= wordTableExpression )? SEMI
+                    {
+                    type=(Token)match(input,WORDTABLE,FOLLOW_WORDTABLE_in_variableDeclaration624); if (state.failed) return stmt;
+                    if ( !((!isVariableOfType(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, input.LT(1).getText(), type.getText()))) ) {
+                        if (state.backtracking>0) {state.failed=true; return stmt;}
+                        throw new FailedPredicateException(input, "variableDeclaration", "!isVariableOfType($blockDeclaration::env, input.LT(1).getText(), type.getText())");
+                    }
+                    name=(Token)match(input,Identifier,FOLLOW_Identifier_in_variableDeclaration636); if (state.failed) return stmt;
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:278:20: ( ASSIGN_EQUAL table= wordTableExpression )?
+                    int alt15=2;
+                    int LA15_0 = input.LA(1);
+
+                    if ( (LA15_0==ASSIGN_EQUAL) ) {
+                        alt15=1;
+                    }
+                    switch (alt15) {
+                        case 1 :
+                            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:278:21: ASSIGN_EQUAL table= wordTableExpression
+                            {
+                            match(input,ASSIGN_EQUAL,FOLLOW_ASSIGN_EQUAL_in_variableDeclaration639); if (state.failed) return stmt;
+                            pushFollow(FOLLOW_wordTableExpression_in_variableDeclaration645);
+                            table=wordTableExpression();
+
+                            state._fsp--;
+                            if (state.failed) return stmt;
+
+                            }
+                            break;
+
+                    }
+
+                    match(input,SEMI,FOLLOW_SEMI_in_variableDeclaration649); if (state.failed) return stmt;
+                    if ( state.backtracking==0 ) {
+                      addVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, name.getText(), type.getText());if(table != null){setValue(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, name.getText(), table);}
+                    }
+
+                    }
+                    break;
+                case 8 :
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:280:2: type= BOOLEANLIST {...}?name= Identifier ( ASSIGN_EQUAL bl= booleanListExpression )? SEMI
+                    {
+                    type=(Token)match(input,BOOLEANLIST,FOLLOW_BOOLEANLIST_in_variableDeclaration661); if (state.failed) return stmt;
+                    if ( !((!isVariableOfType(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, input.LT(1).getText(), type.getText()))) ) {
+                        if (state.backtracking>0) {state.failed=true; return stmt;}
+                        throw new FailedPredicateException(input, "variableDeclaration", "!isVariableOfType($blockDeclaration::env, input.LT(1).getText(), type.getText())");
+                    }
+                    name=(Token)match(input,Identifier,FOLLOW_Identifier_in_variableDeclaration673); if (state.failed) return stmt;
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:282:20: ( ASSIGN_EQUAL bl= booleanListExpression )?
+                    int alt16=2;
+                    int LA16_0 = input.LA(1);
+
+                    if ( (LA16_0==ASSIGN_EQUAL) ) {
+                        alt16=1;
+                    }
+                    switch (alt16) {
+                        case 1 :
+                            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:282:21: ASSIGN_EQUAL bl= booleanListExpression
+                            {
+                            match(input,ASSIGN_EQUAL,FOLLOW_ASSIGN_EQUAL_in_variableDeclaration676); if (state.failed) return stmt;
+                            pushFollow(FOLLOW_booleanListExpression_in_variableDeclaration682);
+                            bl=booleanListExpression();
+
+                            state._fsp--;
+                            if (state.failed) return stmt;
+
+                            }
+                            break;
+
+                    }
+
+                    match(input,SEMI,FOLLOW_SEMI_in_variableDeclaration686); if (state.failed) return stmt;
+                    if ( state.backtracking==0 ) {
+                      addVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, name.getText(), type.getText());if(bl != null){setValue(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, name.getText(), bl);}
+                    }
+
+                    }
+                    break;
+                case 9 :
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:284:2: type= STRINGLIST {...}?name= Identifier ( ASSIGN_EQUAL sl= stringListExpression )? SEMI
+                    {
+                    type=(Token)match(input,STRINGLIST,FOLLOW_STRINGLIST_in_variableDeclaration699); if (state.failed) return stmt;
+                    if ( !((!isVariableOfType(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, input.LT(1).getText(), type.getText()))) ) {
+                        if (state.backtracking>0) {state.failed=true; return stmt;}
+                        throw new FailedPredicateException(input, "variableDeclaration", "!isVariableOfType($blockDeclaration::env, input.LT(1).getText(), type.getText())");
+                    }
+                    name=(Token)match(input,Identifier,FOLLOW_Identifier_in_variableDeclaration711); if (state.failed) return stmt;
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:286:20: ( ASSIGN_EQUAL sl= stringListExpression )?
+                    int alt17=2;
+                    int LA17_0 = input.LA(1);
+
+                    if ( (LA17_0==ASSIGN_EQUAL) ) {
+                        alt17=1;
+                    }
+                    switch (alt17) {
+                        case 1 :
+                            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:286:21: ASSIGN_EQUAL sl= stringListExpression
+                            {
+                            match(input,ASSIGN_EQUAL,FOLLOW_ASSIGN_EQUAL_in_variableDeclaration714); if (state.failed) return stmt;
+                            pushFollow(FOLLOW_stringListExpression_in_variableDeclaration720);
+                            sl=stringListExpression();
+
+                            state._fsp--;
+                            if (state.failed) return stmt;
+
+                            }
+                            break;
+
+                    }
+
+                    match(input,SEMI,FOLLOW_SEMI_in_variableDeclaration724); if (state.failed) return stmt;
+                    if ( state.backtracking==0 ) {
+                      addVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, name.getText(), type.getText());if(sl != null){setValue(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, name.getText(), sl);}
+                    }
+
+                    }
+                    break;
+                case 10 :
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:288:2: type= INTLIST {...}?name= Identifier ( ASSIGN_EQUAL il= numberListExpression )? SEMI
+                    {
+                    type=(Token)match(input,INTLIST,FOLLOW_INTLIST_in_variableDeclaration737); if (state.failed) return stmt;
+                    if ( !((!isVariableOfType(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, input.LT(1).getText(), type.getText()))) ) {
+                        if (state.backtracking>0) {state.failed=true; return stmt;}
+                        throw new FailedPredicateException(input, "variableDeclaration", "!isVariableOfType($blockDeclaration::env, input.LT(1).getText(), type.getText())");
+                    }
+                    name=(Token)match(input,Identifier,FOLLOW_Identifier_in_variableDeclaration749); if (state.failed) return stmt;
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:290:20: ( ASSIGN_EQUAL il= numberListExpression )?
+                    int alt18=2;
+                    int LA18_0 = input.LA(1);
+
+                    if ( (LA18_0==ASSIGN_EQUAL) ) {
+                        alt18=1;
+                    }
+                    switch (alt18) {
+                        case 1 :
+                            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:290:21: ASSIGN_EQUAL il= numberListExpression
+                            {
+                            match(input,ASSIGN_EQUAL,FOLLOW_ASSIGN_EQUAL_in_variableDeclaration752); if (state.failed) return stmt;
+                            pushFollow(FOLLOW_numberListExpression_in_variableDeclaration758);
+                            il=numberListExpression();
+
+                            state._fsp--;
+                            if (state.failed) return stmt;
+
+                            }
+                            break;
+
+                    }
+
+                    match(input,SEMI,FOLLOW_SEMI_in_variableDeclaration762); if (state.failed) return stmt;
+                    if ( state.backtracking==0 ) {
+                      addVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, name.getText(), type.getText());if(il != null){setValue(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, name.getText(), il);}
+                    }
+
+                    }
+                    break;
+                case 11 :
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:292:2: type= DOUBLELIST {...}?name= Identifier ( ASSIGN_EQUAL dl= numberListExpression )? SEMI
+                    {
+                    type=(Token)match(input,DOUBLELIST,FOLLOW_DOUBLELIST_in_variableDeclaration775); if (state.failed) return stmt;
+                    if ( !((!isVariableOfType(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, input.LT(1).getText(), type.getText()))) ) {
+                        if (state.backtracking>0) {state.failed=true; return stmt;}
+                        throw new FailedPredicateException(input, "variableDeclaration", "!isVariableOfType($blockDeclaration::env, input.LT(1).getText(), type.getText())");
+                    }
+                    name=(Token)match(input,Identifier,FOLLOW_Identifier_in_variableDeclaration787); if (state.failed) return stmt;
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:294:20: ( ASSIGN_EQUAL dl= numberListExpression )?
+                    int alt19=2;
+                    int LA19_0 = input.LA(1);
+
+                    if ( (LA19_0==ASSIGN_EQUAL) ) {
+                        alt19=1;
+                    }
+                    switch (alt19) {
+                        case 1 :
+                            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:294:21: ASSIGN_EQUAL dl= numberListExpression
+                            {
+                            match(input,ASSIGN_EQUAL,FOLLOW_ASSIGN_EQUAL_in_variableDeclaration790); if (state.failed) return stmt;
+                            pushFollow(FOLLOW_numberListExpression_in_variableDeclaration796);
+                            dl=numberListExpression();
+
+                            state._fsp--;
+                            if (state.failed) return stmt;
+
+                            }
+                            break;
+
+                    }
+
+                    match(input,SEMI,FOLLOW_SEMI_in_variableDeclaration800); if (state.failed) return stmt;
+                    if ( state.backtracking==0 ) {
+                      addVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, name.getText(), type.getText());if(dl != null){setValue(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, name.getText(), dl);}
+                    }
+
+                    }
+                    break;
+                case 12 :
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:296:2: type= TYPELIST {...}?name= Identifier ( ASSIGN_EQUAL tl= typeListExpression )? SEMI
+                    {
+                    type=(Token)match(input,TYPELIST,FOLLOW_TYPELIST_in_variableDeclaration813); if (state.failed) return stmt;
+                    if ( !((!isVariableOfType(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, input.LT(1).getText(), type.getText()))) ) {
+                        if (state.backtracking>0) {state.failed=true; return stmt;}
+                        throw new FailedPredicateException(input, "variableDeclaration", "!isVariableOfType($blockDeclaration::env, input.LT(1).getText(), type.getText())");
+                    }
+                    name=(Token)match(input,Identifier,FOLLOW_Identifier_in_variableDeclaration825); if (state.failed) return stmt;
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:298:20: ( ASSIGN_EQUAL tl= typeListExpression )?
+                    int alt20=2;
+                    int LA20_0 = input.LA(1);
+
+                    if ( (LA20_0==ASSIGN_EQUAL) ) {
+                        alt20=1;
+                    }
+                    switch (alt20) {
+                        case 1 :
+                            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:298:21: ASSIGN_EQUAL tl= typeListExpression
+                            {
+                            match(input,ASSIGN_EQUAL,FOLLOW_ASSIGN_EQUAL_in_variableDeclaration828); if (state.failed) return stmt;
+                            pushFollow(FOLLOW_typeListExpression_in_variableDeclaration834);
+                            tl=typeListExpression();
+
+                            state._fsp--;
+                            if (state.failed) return stmt;
+
+                            }
+                            break;
+
+                    }
+
+                    match(input,SEMI,FOLLOW_SEMI_in_variableDeclaration838); if (state.failed) return stmt;
+                    if ( state.backtracking==0 ) {
+                      addVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, name.getText(), type.getText());if(tl != null){setValue(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, name.getText(), tl);}
+                    }
+
+                    }
+                    break;
+                case 13 :
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:300:2: stmt1= conditionDeclaration
+                    {
+                    pushFollow(FOLLOW_conditionDeclaration_in_variableDeclaration851);
+                    stmt1=conditionDeclaration();
+
+                    state._fsp--;
+                    if (state.failed) return stmt;
+                    if ( state.backtracking==0 ) {
+                      stmt = stmt1;
+                    }
+
+                    }
+                    break;
+                case 14 :
+                    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:302:2: stmt2= actionDeclaration
+                    {
+                    pushFollow(FOLLOW_actionDeclaration_in_variableDeclaration863);
+                    stmt2=actionDeclaration();
+
+                    state._fsp--;
+                    if (state.failed) return stmt;
+                    if ( state.backtracking==0 ) {
+                      stmt = stmt2;
+                    }
+
+                    }
+                    break;
+
+            }
+        }
+
+        	catch (RecognitionException exception1) {
+        		emitErrorMessage(exception1.toString());
+        	}
+        	catch (Throwable exception2) {
+        		emitErrorMessage(exception2.toString());
+        	}
+        finally {
+        }
+        return stmt;
+    }
+    // $ANTLR end "variableDeclaration"
+
+
+    // $ANTLR start "conditionDeclaration"
+    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:306:1: conditionDeclaration returns [TextMarkerStatement stmt = null] : type= CONDITION id= Identifier ASSIGN_EQUAL LPAREN cons= conditions RPAREN SEMI ;
+    public final TextMarkerStatement conditionDeclaration() throws RecognitionException {
+        TextMarkerStatement stmt =  null;
+
+        Token type=null;
+        Token id=null;
+        List<AbstractTextMarkerCondition> cons = null;
+
+
+        try {
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:307:5: (type= CONDITION id= Identifier ASSIGN_EQUAL LPAREN cons= conditions RPAREN SEMI )
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:308:5: type= CONDITION id= Identifier ASSIGN_EQUAL LPAREN cons= conditions RPAREN SEMI
+            {
+            type=(Token)match(input,CONDITION,FOLLOW_CONDITION_in_conditionDeclaration892); if (state.failed) return stmt;
+            id=(Token)match(input,Identifier,FOLLOW_Identifier_in_conditionDeclaration898); if (state.failed) return stmt;
+            match(input,ASSIGN_EQUAL,FOLLOW_ASSIGN_EQUAL_in_conditionDeclaration900); if (state.failed) return stmt;
+            match(input,LPAREN,FOLLOW_LPAREN_in_conditionDeclaration902); if (state.failed) return stmt;
+            pushFollow(FOLLOW_conditions_in_conditionDeclaration908);
+            cons=conditions();
+
+            state._fsp--;
+            if (state.failed) return stmt;
+            match(input,RPAREN,FOLLOW_RPAREN_in_conditionDeclaration910); if (state.failed) return stmt;
+            match(input,SEMI,FOLLOW_SEMI_in_conditionDeclaration912); if (state.failed) return stmt;
+            if ( state.backtracking==0 ) {
+              addVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, id.getText(), type.getText());
+                  AbstractTextMarkerCondition condition = ConditionFactory.createConditionAnd(cons,((blockDeclaration_scope)blockDeclaration_stack.peek()).env);
+                  setValue(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, id.getText(), condition);
+            }
+
+            }
+
+        }
+
+        	catch (RecognitionException exception1) {
+        		emitErrorMessage(exception1.toString());
+        	}
+        	catch (Throwable exception2) {
+        		emitErrorMessage(exception2.toString());
+        	}
+        finally {
+        }
+        return stmt;
+    }
+    // $ANTLR end "conditionDeclaration"
+
+
+    // $ANTLR start "actionDeclaration"
+    // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:315:1: actionDeclaration returns [TextMarkerStatement stmt = null] : type= ACTION id= Identifier ASSIGN_EQUAL LPAREN a= actions RPAREN SEMI ;
+    public final TextMarkerStatement actionDeclaration() throws RecognitionException {
+        TextMarkerStatement stmt =  null;
+
+        Token type=null;
+        Token id=null;
+        List<AbstractTextMarkerAction> a = null;
+
+
+        try {
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:316:5: (type= ACTION id= Identifier ASSIGN_EQUAL LPAREN a= actions RPAREN SEMI )
+            // D:\\work\\workspace-tm\\org.apache.uima.tm.textmarker.engine\\src\\de\\uniwue\\tm\\textmarker\\parser\\TextMarkerParser.g:317:5: type= ACTION id= Identifier ASSIGN_EQUAL LPAREN a= actions RPAREN SEMI
+            {
+            type=(Token)match(input,ACTION,FOLLOW_ACTION_in_actionDeclaration948); if (state.failed) return stmt;
+            id=(Token)match(input,Identifier,FOLLOW_Identifier_in_actionDeclaration954); if (state.failed) return stmt;
+            match(input,ASSIGN_EQUAL,FOLLOW_ASSIGN_EQUAL_in_actionDeclaration956); if (state.failed) return stmt;
+            match(input,LPAREN,FOLLOW_LPAREN_in_actionDeclaration958); if (state.failed) return stmt;
+            pushFollow(FOLLOW_actions_in_actionDeclaration964);
+            a=actions();
+
+            state._fsp--;
+            if (state.failed) return stmt;
+            match(input,RPAREN,FOLLOW_RPAREN_in_actionDeclaration966); if (state.failed) return stmt;
+            match(input,SEMI,FOLLOW_SEMI_in_actionDeclaration968); if (state.failed) return stmt;
+            if ( state.backtracking==0 ) {
+              addVariable(((blockDeclaration_scope)blockDeclaration_stack.peek()).env, id.getText(), type.getText());

[... 15134 lines stripped ...]