// $ANTLR 2.7.3 (20040901-1): "Scigol.g" -> "ScigolParser.java"$

  package scigol;

import antlr.TokenBuffer;
import antlr.TokenStreamException;
import antlr.TokenStreamIOException;
import antlr.ANTLRException;
import antlr.LLkParser;
import antlr.Token;
import antlr.TokenStream;
import antlr.RecognitionException;
import antlr.NoViableAltException;
import antlr.MismatchedTokenException;
import antlr.SemanticException;
import antlr.ParserSharedInputState;
import antlr.collections.impl.BitSet;
import antlr.collections.AST;
import java.util.Hashtable;
import antlr.ASTFactory;
import antlr.ASTPair;
import antlr.collections.impl.ASTArray;

public class ScigolParser extends antlr.LLkParser       implements ScigolTokenTypes
 {


  public CombinedSharedInputState istate()
  {
    return ((ParserSharedInputStateWrapper)getInputState()).state;
  }
  

protected ScigolParser(TokenBuffer tokenBuf, int k) {
  super(tokenBuf,k);
  tokenNames = _tokenNames;
  buildTokenTypeASTClassMap();
  astFactory = new ASTFactory(getTokenTypeToASTClassMap());
}

public ScigolParser(TokenBuffer tokenBuf) {
  this(tokenBuf,2);
}

protected ScigolParser(TokenStream lexer, int k) {
  super(lexer,k);
  tokenNames = _tokenNames;
  buildTokenTypeASTClassMap();
  astFactory = new ASTFactory(getTokenTypeToASTClassMap());
}

public ScigolParser(TokenStream lexer) {
  this(lexer,2);
}

public ScigolParser(ParserSharedInputState state) {
  super(state,2);
  tokenNames = _tokenNames;
  buildTokenTypeASTClassMap();
  astFactory = new ASTFactory(getTokenTypeToASTClassMap());
}

	public final void program() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST program_AST = null;
		
		{
		boolean synPredMatched4 = false;
		if (((LA(1)==LCURLY) && (_tokenSet_0.member(LA(2))))) {
			int _m4 = mark();
			synPredMatched4 = true;
			inputState.guessing++;
			try {
				{
				match(LCURLY);
				}
			}
			catch (RecognitionException pe) {
				synPredMatched4 = false;
			}
			rewind(_m4);
			inputState.guessing--;
		}
		if ( synPredMatched4 ) {
			namespaceBody();
			astFactory.addASTChild(currentAST, returnAST);
		}
		else if ((_tokenSet_1.member(LA(1))) && (_tokenSet_2.member(LA(2)))) {
			expression();
			astFactory.addASTChild(currentAST, returnAST);
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		}
		{
		switch ( LA(1)) {
		case SEMI:
		{
			match(SEMI);
			break;
		}
		case EOF:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		match(Token.EOF_TYPE);
		program_AST = (AST)currentAST.root;
		returnAST = program_AST;
	}
	
	public final void namespaceBody() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST namespaceBody_AST = null;
		
		AST tmp3_AST = null;
		tmp3_AST = astFactory.create(LT(1));
		astFactory.addASTChild(currentAST, tmp3_AST);
		match(LCURLY);
		{
		_loop9:
		do {
			if ((LA(1)==LITERAL_using)) {
				usingDecl();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				break _loop9;
			}
			
		} while (true);
		}
		{
		switch ( LA(1)) {
		case DOTDOT:
		case LIT_TRUE:
		case LIT_FALSE:
		case LIT_NULL:
		case LCURLY:
		case LITERAL_namespace:
		case IDENT:
		case STRING_LITERAL:
		case LITERAL_typeof:
		case LPAREN:
		case LITERAL_assert:
		case LITERAL_debug:
		case LITERAL_logger:
		case PLUS:
		case MINUS:
		case INC:
		case DEC:
		case LNOT:
		case LITERAL_not:
		case HASH:
		case BAR:
		case SCOPE_ESCAPE:
		case LISTSTART:
		case LITERAL_try:
		case NUM_INT:
		case NUM_DINT:
		case NUM_REAL:
		case NUM_SREAL:
		case CHAR_LITERAL:
		case LBRACK:
		case ANNOT_START:
		case LITERAL_let:
		case LITERAL_class:
		case LITERAL_interface:
		case LITERAL_func:
		case LITERAL_vector:
		case LITERAL_matrix:
		case LITERAL_range:
		case LITERAL_list:
		case LITERAL_map:
		case LITERAL_bool:
		case LITERAL_byte:
		case LITERAL_char:
		case LITERAL_int:
		case LITERAL_dint:
		case LITERAL_real:
		case LITERAL_sreal:
		case LITERAL_string:
		case LITERAL_type:
		case LITERAL_num:
		case LITERAL_any:
		case LITERAL_object:
		case LITERAL_if:
		case LITERAL_do:
		case LITERAL_while:
		case LITERAL_for:
		case LITERAL_foreach:
		case LITERAL_throw:
		{
			expression();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case SEMI:
		case RCURLY:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		{
		_loop13:
		do {
			if ((LA(1)==SEMI)) {
				match(SEMI);
				{
				switch ( LA(1)) {
				case DOTDOT:
				case LIT_TRUE:
				case LIT_FALSE:
				case LIT_NULL:
				case LCURLY:
				case LITERAL_namespace:
				case IDENT:
				case STRING_LITERAL:
				case LITERAL_typeof:
				case LPAREN:
				case LITERAL_assert:
				case LITERAL_debug:
				case LITERAL_logger:
				case PLUS:
				case MINUS:
				case INC:
				case DEC:
				case LNOT:
				case LITERAL_not:
				case HASH:
				case BAR:
				case SCOPE_ESCAPE:
				case LISTSTART:
				case LITERAL_try:
				case NUM_INT:
				case NUM_DINT:
				case NUM_REAL:
				case NUM_SREAL:
				case CHAR_LITERAL:
				case LBRACK:
				case ANNOT_START:
				case LITERAL_let:
				case LITERAL_class:
				case LITERAL_interface:
				case LITERAL_func:
				case LITERAL_vector:
				case LITERAL_matrix:
				case LITERAL_range:
				case LITERAL_list:
				case LITERAL_map:
				case LITERAL_bool:
				case LITERAL_byte:
				case LITERAL_char:
				case LITERAL_int:
				case LITERAL_dint:
				case LITERAL_real:
				case LITERAL_sreal:
				case LITERAL_string:
				case LITERAL_type:
				case LITERAL_num:
				case LITERAL_any:
				case LITERAL_object:
				case LITERAL_if:
				case LITERAL_do:
				case LITERAL_while:
				case LITERAL_for:
				case LITERAL_foreach:
				case LITERAL_throw:
				{
					expression();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case SEMI:
				case RCURLY:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else {
				break _loop13;
			}
			
		} while (true);
		}
		match(RCURLY);
		namespaceBody_AST = (AST)currentAST.root;
		returnAST = namespaceBody_AST;
	}
	
	public final void expression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST expression_AST = null;
		
		switch ( LA(1)) {
		case LITERAL_namespace:
		{
			namespaceScope();
			astFactory.addASTChild(currentAST, returnAST);
			expression_AST = (AST)currentAST.root;
			break;
		}
		case ANNOT_START:
		case LITERAL_let:
		{
			declaration();
			astFactory.addASTChild(currentAST, returnAST);
			expression_AST = (AST)currentAST.root;
			break;
		}
		case DOTDOT:
		case LIT_TRUE:
		case LIT_FALSE:
		case LIT_NULL:
		case LCURLY:
		case IDENT:
		case STRING_LITERAL:
		case LITERAL_typeof:
		case LPAREN:
		case PLUS:
		case MINUS:
		case INC:
		case DEC:
		case LNOT:
		case LITERAL_not:
		case HASH:
		case BAR:
		case SCOPE_ESCAPE:
		case LISTSTART:
		case LITERAL_try:
		case NUM_INT:
		case NUM_DINT:
		case NUM_REAL:
		case NUM_SREAL:
		case CHAR_LITERAL:
		case LBRACK:
		case LITERAL_vector:
		case LITERAL_matrix:
		case LITERAL_range:
		case LITERAL_list:
		case LITERAL_map:
		case LITERAL_bool:
		case LITERAL_byte:
		case LITERAL_char:
		case LITERAL_int:
		case LITERAL_dint:
		case LITERAL_real:
		case LITERAL_sreal:
		case LITERAL_string:
		case LITERAL_type:
		case LITERAL_num:
		case LITERAL_any:
		case LITERAL_object:
		{
			assignmentExpression();
			astFactory.addASTChild(currentAST, returnAST);
			expression_AST = (AST)currentAST.root;
			break;
		}
		case LITERAL_if:
		{
			ifExpression();
			astFactory.addASTChild(currentAST, returnAST);
			expression_AST = (AST)currentAST.root;
			break;
		}
		case LITERAL_do:
		case LITERAL_while:
		{
			whileExpression();
			astFactory.addASTChild(currentAST, returnAST);
			expression_AST = (AST)currentAST.root;
			break;
		}
		case LITERAL_for:
		{
			forExpression();
			astFactory.addASTChild(currentAST, returnAST);
			expression_AST = (AST)currentAST.root;
			break;
		}
		case LITERAL_foreach:
		{
			foreachExpression();
			astFactory.addASTChild(currentAST, returnAST);
			expression_AST = (AST)currentAST.root;
			break;
		}
		case LITERAL_throw:
		{
			throwExpression();
			astFactory.addASTChild(currentAST, returnAST);
			expression_AST = (AST)currentAST.root;
			break;
		}
		case LITERAL_assert:
		{
			assertExpression();
			astFactory.addASTChild(currentAST, returnAST);
			expression_AST = (AST)currentAST.root;
			break;
		}
		case LITERAL_debug:
		{
			debugExpression();
			astFactory.addASTChild(currentAST, returnAST);
			expression_AST = (AST)currentAST.root;
			break;
		}
		case LITERAL_logger:
		{
			logCall();
			astFactory.addASTChild(currentAST, returnAST);
			expression_AST = (AST)currentAST.root;
			break;
		}
		default:
			boolean synPredMatched22 = false;
			if (((LA(1)==LITERAL_func) && (LA(2)==LPAREN))) {
				int _m22 = mark();
				synPredMatched22 = true;
				inputState.guessing++;
				try {
					{
					funcLiteralPrefix();
					}
				}
				catch (RecognitionException pe) {
					synPredMatched22 = false;
				}
				rewind(_m22);
				inputState.guessing--;
			}
			if ( synPredMatched22 ) {
				functionLiteral();
				astFactory.addASTChild(currentAST, returnAST);
				expression_AST = (AST)currentAST.root;
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_4.member(LA(2)))) {
				complexTypeLiteral();
				astFactory.addASTChild(currentAST, returnAST);
				expression_AST = (AST)currentAST.root;
			}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		returnAST = expression_AST;
	}
	
	public final void namespaceScope() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST namespaceScope_AST = null;
		
		AST tmp6_AST = null;
		tmp6_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp6_AST);
		match(LITERAL_namespace);
		namespaceName();
		astFactory.addASTChild(currentAST, returnAST);
		namespaceBody();
		astFactory.addASTChild(currentAST, returnAST);
		namespaceScope_AST = (AST)currentAST.root;
		returnAST = namespaceScope_AST;
	}
	
	public final void namespaceName() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST namespaceName_AST = null;
		
		AST tmp7_AST = null;
		tmp7_AST = astFactory.create(LT(1));
		astFactory.addASTChild(currentAST, tmp7_AST);
		match(IDENT);
		{
		_loop16:
		do {
			if ((LA(1)==DOT)) {
				AST tmp8_AST = null;
				tmp8_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp8_AST);
				match(DOT);
				AST tmp9_AST = null;
				tmp9_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp9_AST);
				match(IDENT);
			}
			else {
				break _loop16;
			}
			
		} while (true);
		}
		namespaceName_AST = (AST)currentAST.root;
		returnAST = namespaceName_AST;
	}
	
	public final void usingDecl() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST usingDecl_AST = null;
		
		AST tmp10_AST = null;
		tmp10_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp10_AST);
		match(LITERAL_using);
		namespaceName();
		astFactory.addASTChild(currentAST, returnAST);
		{
		switch ( LA(1)) {
		case LITERAL_as:
		{
			AST tmp11_AST = null;
			tmp11_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp11_AST);
			match(LITERAL_as);
			AST tmp12_AST = null;
			tmp12_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp12_AST);
			match(IDENT);
			break;
		}
		case SEMI:
		case LITERAL_from:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		{
		switch ( LA(1)) {
		case LITERAL_from:
		{
			AST tmp13_AST = null;
			tmp13_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp13_AST);
			match(LITERAL_from);
			AST tmp14_AST = null;
			tmp14_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp14_AST);
			match(STRING_LITERAL);
			break;
		}
		case SEMI:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		match(SEMI);
		usingDecl_AST = (AST)currentAST.root;
		returnAST = usingDecl_AST;
	}
	
	public final void declaration() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST declaration_AST = null;
		
		{
		_loop138:
		do {
			if ((LA(1)==ANNOT_START)) {
				annotation();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				break _loop138;
			}
			
		} while (true);
		}
		AST tmp16_AST = null;
		tmp16_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp16_AST);
		match(LITERAL_let);
		{
		switch ( LA(1)) {
		case LITERAL_const:
		{
			AST tmp17_AST = null;
			tmp17_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp17_AST);
			match(LITERAL_const);
			break;
		}
		case IDENT:
		case LITERAL_static:
		case LITERAL_final:
		case LITERAL_public:
		case LITERAL_private:
		case LITERAL_protected:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		{
		switch ( LA(1)) {
		case LITERAL_static:
		case LITERAL_final:
		case LITERAL_public:
		case LITERAL_private:
		case LITERAL_protected:
		{
			declModifiers();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case IDENT:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		AST tmp18_AST = null;
		tmp18_AST = astFactory.create(LT(1));
		astFactory.addASTChild(currentAST, tmp18_AST);
		match(IDENT);
		{
		switch ( LA(1)) {
		case COLON:
		{
			{
			AST tmp19_AST = null;
			tmp19_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp19_AST);
			match(COLON);
			typeExpression();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case ASSIGN:
			{
				AST tmp20_AST = null;
				tmp20_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp20_AST);
				match(ASSIGN);
				expression();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case EOF:
			case SEMI:
			case RCURLY:
			case RPAREN:
			case COMMA:
			case BAR:
			case COLON:
			case RBRACK:
			case GIVES:
			case LITERAL_then:
			case LITERAL_else:
			case LITERAL_do:
			case LITERAL_while:
			case LITERAL_by:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			}
			break;
		}
		case ASSIGN:
		{
			{
			AST tmp21_AST = null;
			tmp21_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp21_AST);
			match(ASSIGN);
			expression();
			astFactory.addASTChild(currentAST, returnAST);
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		declaration_AST = (AST)currentAST.root;
		returnAST = declaration_AST;
	}
	
	public final void funcLiteralPrefix() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST funcLiteralPrefix_AST = null;
		
		funcSignature();
		astFactory.addASTChild(currentAST, returnAST);
		{
		switch ( LA(1)) {
		case LCURLY:
		{
			AST tmp22_AST = null;
			tmp22_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp22_AST);
			match(LCURLY);
			break;
		}
		case LITERAL_pre:
		{
			AST tmp23_AST = null;
			tmp23_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp23_AST);
			match(LITERAL_pre);
			break;
		}
		case LITERAL_post:
		{
			AST tmp24_AST = null;
			tmp24_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp24_AST);
			match(LITERAL_post);
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		funcLiteralPrefix_AST = (AST)currentAST.root;
		returnAST = funcLiteralPrefix_AST;
	}
	
	public final void functionLiteral() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST functionLiteral_AST = null;
		
		{
		funcSignature();
		astFactory.addASTChild(currentAST, returnAST);
		functionLiteralBody();
		astFactory.addASTChild(currentAST, returnAST);
		}
		if ( inputState.guessing==0 ) {
			functionLiteral_AST = (AST)currentAST.root;
			
			functionLiteral_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(LIT_FUNC,"LIT_FUNC")).add(functionLiteral_AST));
			//!!! maybe thereis a way to set the location of the LIT_FUNC?
			
			
			currentAST.root = functionLiteral_AST;
			currentAST.child = functionLiteral_AST!=null &&functionLiteral_AST.getFirstChild()!=null ?
				functionLiteral_AST.getFirstChild() : functionLiteral_AST;
			currentAST.advanceChildToEnd();
		}
		functionLiteral_AST = (AST)currentAST.root;
		returnAST = functionLiteral_AST;
	}
	
	public final void complexTypeLiteral() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST complexTypeLiteral_AST = null;
		
		switch ( LA(1)) {
		case LITERAL_func:
		{
			funcType();
			astFactory.addASTChild(currentAST, returnAST);
			complexTypeLiteral_AST = (AST)currentAST.root;
			break;
		}
		case LITERAL_class:
		{
			classType();
			astFactory.addASTChild(currentAST, returnAST);
			complexTypeLiteral_AST = (AST)currentAST.root;
			break;
		}
		case LITERAL_interface:
		{
			interfaceType();
			astFactory.addASTChild(currentAST, returnAST);
			complexTypeLiteral_AST = (AST)currentAST.root;
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		returnAST = complexTypeLiteral_AST;
	}
	
	public final void assignmentExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST assignmentExpression_AST = null;
		
		conditionalExpression();
		astFactory.addASTChild(currentAST, returnAST);
		{
		switch ( LA(1)) {
		case ASSIGN:
		{
			AST tmp25_AST = null;
			tmp25_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp25_AST);
			match(ASSIGN);
			conditionalExpression();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case EOF:
		case SEMI:
		case RCURLY:
		case RPAREN:
		case COMMA:
		case BAR:
		case COLON:
		case RBRACK:
		case GIVES:
		case LITERAL_then:
		case LITERAL_else:
		case LITERAL_do:
		case LITERAL_while:
		case LITERAL_by:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		assignmentExpression_AST = (AST)currentAST.root;
		returnAST = assignmentExpression_AST;
	}
	
	public final void ifExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST ifExpression_AST = null;
		
		boolean synPredMatched229 = false;
		if (((LA(1)==LITERAL_if) && (_tokenSet_1.member(LA(2))))) {
			int _m229 = mark();
			synPredMatched229 = true;
			inputState.guessing++;
			try {
				{
				match(LITERAL_if);
				expression();
				match(LITERAL_then);
				}
			}
			catch (RecognitionException pe) {
				synPredMatched229 = false;
			}
			rewind(_m229);
			inputState.guessing--;
		}
		if ( synPredMatched229 ) {
			ifThenExpression();
			astFactory.addASTChild(currentAST, returnAST);
			ifExpression_AST = (AST)currentAST.root;
		}
		else if ((LA(1)==LITERAL_if) && (LA(2)==LPAREN)) {
			ifParenExpression();
			astFactory.addASTChild(currentAST, returnAST);
			ifExpression_AST = (AST)currentAST.root;
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		returnAST = ifExpression_AST;
	}
	
	public final void whileExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST whileExpression_AST = null;
		
		switch ( LA(1)) {
		case LITERAL_while:
		{
			whileDoExpression();
			astFactory.addASTChild(currentAST, returnAST);
			whileExpression_AST = (AST)currentAST.root;
			break;
		}
		case LITERAL_do:
		{
			doWhileExpression();
			astFactory.addASTChild(currentAST, returnAST);
			whileExpression_AST = (AST)currentAST.root;
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		returnAST = whileExpression_AST;
	}
	
	public final void forExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST forExpression_AST = null;
		
		AST tmp26_AST = null;
		tmp26_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp26_AST);
		match(LITERAL_for);
		match(LPAREN);
		forDeclPart();
		astFactory.addASTChild(currentAST, returnAST);
		match(SEMI);
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		match(SEMI);
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		match(RPAREN);
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		forExpression_AST = (AST)currentAST.root;
		returnAST = forExpression_AST;
	}
	
	public final void foreachExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST foreachExpression_AST = null;
		
		AST tmp31_AST = null;
		tmp31_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp31_AST);
		match(LITERAL_foreach);
		match(LPAREN);
		AST tmp33_AST = null;
		tmp33_AST = astFactory.create(LT(1));
		astFactory.addASTChild(currentAST, tmp33_AST);
		match(IDENT);
		match(COLON);
		typeExpression();
		astFactory.addASTChild(currentAST, returnAST);
		match(LITERAL_in);
		foreachRangeExpr();
		astFactory.addASTChild(currentAST, returnAST);
		match(RPAREN);
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		foreachExpression_AST = (AST)currentAST.root;
		returnAST = foreachExpression_AST;
	}
	
	public final void throwExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST throwExpression_AST = null;
		
		AST tmp37_AST = null;
		tmp37_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp37_AST);
		match(LITERAL_throw);
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		throwExpression_AST = (AST)currentAST.root;
		returnAST = throwExpression_AST;
	}
	
	public final void assertExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST assertExpression_AST = null;
		
		AST tmp38_AST = null;
		tmp38_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp38_AST);
		match(LITERAL_assert);
		match(LPAREN);
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		{
		match(COMMA);
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		}
		match(RPAREN);
		assertExpression_AST = (AST)currentAST.root;
		returnAST = assertExpression_AST;
	}
	
	public final void debugExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST debugExpression_AST = null;
		
		AST tmp42_AST = null;
		tmp42_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp42_AST);
		match(LITERAL_debug);
		match(LPAREN);
		{
		if ((LA(1)==IDENT) && (LA(2)==COMMA)) {
			AST tmp44_AST = null;
			tmp44_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp44_AST);
			match(IDENT);
			AST tmp45_AST = null;
			tmp45_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp45_AST);
			match(COMMA);
		}
		else if ((_tokenSet_1.member(LA(1))) && (_tokenSet_5.member(LA(2)))) {
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		}
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		match(RPAREN);
		debugExpression_AST = (AST)currentAST.root;
		returnAST = debugExpression_AST;
	}
	
	public final void logCall() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST logCall_AST = null;
		
		AST tmp47_AST = null;
		tmp47_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp47_AST);
		match(LITERAL_logger);
		match(LPAREN);
		{
		if ((LA(1)==IDENT) && (LA(2)==COMMA)) {
			AST tmp49_AST = null;
			tmp49_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp49_AST);
			match(IDENT);
			AST tmp50_AST = null;
			tmp50_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp50_AST);
			match(COMMA);
		}
		else if ((_tokenSet_1.member(LA(1))) && (_tokenSet_5.member(LA(2)))) {
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		}
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		match(RPAREN);
		logCall_AST = (AST)currentAST.root;
		returnAST = logCall_AST;
	}
	
	public final void funcSignature() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST funcSignature_AST = null;
		Token  f = null;
		AST f_AST = null;
		
		{
		f = LT(1);
		f_AST = astFactory.create(f);
		astFactory.makeASTRoot(currentAST, f_AST);
		match(LITERAL_func);
		match(LPAREN);
		formalParamList();
		astFactory.addASTChild(currentAST, returnAST);
		{
		switch ( LA(1)) {
		case GIVES:
		{
			AST tmp53_AST = null;
			tmp53_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp53_AST);
			match(GIVES);
			typeExpression();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case RPAREN:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		match(RPAREN);
		}
		if ( inputState.guessing==0 ) {
			f_AST.setType(FUNC);
		}
		funcSignature_AST = (AST)currentAST.root;
		returnAST = funcSignature_AST;
	}
	
	public final void typeExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST typeExpression_AST = null;
		
		switch ( LA(1)) {
		case LITERAL_class:
		case LITERAL_interface:
		case LITERAL_func:
		{
			complexTypeLiteral();
			astFactory.addASTChild(currentAST, returnAST);
			typeExpression_AST = (AST)currentAST.root;
			break;
		}
		case LIT_TRUE:
		case LIT_FALSE:
		case LIT_NULL:
		case LCURLY:
		case IDENT:
		case STRING_LITERAL:
		case LITERAL_typeof:
		case LPAREN:
		case BAR:
		case SCOPE_ESCAPE:
		case LISTSTART:
		case LITERAL_try:
		case NUM_INT:
		case NUM_DINT:
		case NUM_REAL:
		case NUM_SREAL:
		case CHAR_LITERAL:
		case LBRACK:
		case LITERAL_vector:
		case LITERAL_matrix:
		case LITERAL_range:
		case LITERAL_list:
		case LITERAL_map:
		case LITERAL_bool:
		case LITERAL_byte:
		case LITERAL_char:
		case LITERAL_int:
		case LITERAL_dint:
		case LITERAL_real:
		case LITERAL_sreal:
		case LITERAL_string:
		case LITERAL_type:
		case LITERAL_num:
		case LITERAL_any:
		case LITERAL_object:
		{
			applicationSelectionExpression();
			astFactory.addASTChild(currentAST, returnAST);
			typeExpression_AST = (AST)currentAST.root;
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		returnAST = typeExpression_AST;
	}
	
	public final void applicationSelectionExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST applicationSelectionExpression_AST = null;
		
		primaryExpression();
		astFactory.addASTChild(currentAST, returnAST);
		{
		_loop75:
		do {
			switch ( LA(1)) {
			case DOT:
			{
				{
				AST tmp55_AST = null;
				tmp55_AST = astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp55_AST);
				match(DOT);
				AST tmp56_AST = null;
				tmp56_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp56_AST);
				match(IDENT);
				}
				break;
			}
			case LPAREN:
			{
				if ( inputState.guessing==0 ) {
					applicationSelectionExpression_AST = (AST)currentAST.root;
					
					applicationSelectionExpression_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(APPLICATION,"APP")).add(applicationSelectionExpression_AST)); 
					//!!! maybe thereis a way to set the location of the APP?
					
					currentAST.root = applicationSelectionExpression_AST;
					currentAST.child = applicationSelectionExpression_AST!=null &&applicationSelectionExpression_AST.getFirstChild()!=null ?
						applicationSelectionExpression_AST.getFirstChild() : applicationSelectionExpression_AST;
					currentAST.advanceChildToEnd();
				}
				applicationParens();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			default:
			{
				break _loop75;
			}
			}
		} while (true);
		}
		applicationSelectionExpression_AST = (AST)currentAST.root;
		returnAST = applicationSelectionExpression_AST;
	}
	
	public final void typeofExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST typeofExpression_AST = null;
		
		AST tmp57_AST = null;
		tmp57_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp57_AST);
		match(LITERAL_typeof);
		match(LPAREN);
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		match(RPAREN);
		typeofExpression_AST = (AST)currentAST.root;
		returnAST = typeofExpression_AST;
	}
	
	public final void conditionalExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST conditionalExpression_AST = null;
		
		logicalOrExpression();
		astFactory.addASTChild(currentAST, returnAST);
		conditionalExpression_AST = (AST)currentAST.root;
		returnAST = conditionalExpression_AST;
	}
	
	public final void logicalOrExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST logicalOrExpression_AST = null;
		
		logicalAndExpression();
		astFactory.addASTChild(currentAST, returnAST);
		{
		_loop38:
		do {
			if ((LA(1)==LITERAL_or)) {
				AST tmp60_AST = null;
				tmp60_AST = astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp60_AST);
				match(LITERAL_or);
				logicalAndExpression();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				break _loop38;
			}
			
		} while (true);
		}
		logicalOrExpression_AST = (AST)currentAST.root;
		returnAST = logicalOrExpression_AST;
	}
	
	public final void logicalAndExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST logicalAndExpression_AST = null;
		
		equalityExpression();
		astFactory.addASTChild(currentAST, returnAST);
		{
		_loop41:
		do {
			if ((LA(1)==LITERAL_and)) {
				AST tmp61_AST = null;
				tmp61_AST = astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp61_AST);
				match(LITERAL_and);
				equalityExpression();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				break _loop41;
			}
			
		} while (true);
		}
		logicalAndExpression_AST = (AST)currentAST.root;
		returnAST = logicalAndExpression_AST;
	}
	
	public final void equalityExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST equalityExpression_AST = null;
		
		isExpression();
		astFactory.addASTChild(currentAST, returnAST);
		{
		_loop45:
		do {
			if ((LA(1)==NOT_EQUAL||LA(1)==EQUAL)) {
				{
				switch ( LA(1)) {
				case NOT_EQUAL:
				{
					AST tmp62_AST = null;
					tmp62_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp62_AST);
					match(NOT_EQUAL);
					break;
				}
				case EQUAL:
				{
					AST tmp63_AST = null;
					tmp63_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp63_AST);
					match(EQUAL);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				isExpression();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				break _loop45;
			}
			
		} while (true);
		}
		equalityExpression_AST = (AST)currentAST.root;
		returnAST = equalityExpression_AST;
	}
	
	public final void isExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST isExpression_AST = null;
		
		relationalExpression();
		astFactory.addASTChild(currentAST, returnAST);
		{
		_loop49:
		do {
			if ((LA(1)==LITERAL_is||LA(1)==LITERAL_isnt)) {
				{
				switch ( LA(1)) {
				case LITERAL_is:
				{
					AST tmp64_AST = null;
					tmp64_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp64_AST);
					match(LITERAL_is);
					break;
				}
				case LITERAL_isnt:
				{
					AST tmp65_AST = null;
					tmp65_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp65_AST);
					match(LITERAL_isnt);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				typeExpression();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				break _loop49;
			}
			
		} while (true);
		}
		isExpression_AST = (AST)currentAST.root;
		returnAST = isExpression_AST;
	}
	
	public final void relationalExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST relationalExpression_AST = null;
		
		rangeExpression();
		astFactory.addASTChild(currentAST, returnAST);
		{
		_loop53:
		do {
			if (((LA(1) >= LTHAN && LA(1) <= GTE))) {
				{
				switch ( LA(1)) {
				case LTHAN:
				{
					AST tmp66_AST = null;
					tmp66_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp66_AST);
					match(LTHAN);
					break;
				}
				case GTHAN:
				{
					AST tmp67_AST = null;
					tmp67_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp67_AST);
					match(GTHAN);
					break;
				}
				case LTE:
				{
					AST tmp68_AST = null;
					tmp68_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp68_AST);
					match(LTE);
					break;
				}
				case GTE:
				{
					AST tmp69_AST = null;
					tmp69_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp69_AST);
					match(GTE);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				rangeExpression();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				break _loop53;
			}
			
		} while (true);
		}
		relationalExpression_AST = (AST)currentAST.root;
		returnAST = relationalExpression_AST;
	}
	
	public final void rangeExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST rangeExpression_AST = null;
		
		switch ( LA(1)) {
		case LIT_TRUE:
		case LIT_FALSE:
		case LIT_NULL:
		case LCURLY:
		case IDENT:
		case STRING_LITERAL:
		case LITERAL_typeof:
		case LPAREN:
		case PLUS:
		case MINUS:
		case INC:
		case DEC:
		case LNOT:
		case LITERAL_not:
		case HASH:
		case BAR:
		case SCOPE_ESCAPE:
		case LISTSTART:
		case LITERAL_try:
		case NUM_INT:
		case NUM_DINT:
		case NUM_REAL:
		case NUM_SREAL:
		case CHAR_LITERAL:
		case LBRACK:
		case LITERAL_vector:
		case LITERAL_matrix:
		case LITERAL_range:
		case LITERAL_list:
		case LITERAL_map:
		case LITERAL_bool:
		case LITERAL_byte:
		case LITERAL_char:
		case LITERAL_int:
		case LITERAL_dint:
		case LITERAL_real:
		case LITERAL_sreal:
		case LITERAL_string:
		case LITERAL_type:
		case LITERAL_num:
		case LITERAL_any:
		case LITERAL_object:
		{
			additiveExpression();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case DOTDOT:
			{
				AST tmp70_AST = null;
				tmp70_AST = astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp70_AST);
				match(DOTDOT);
				additiveExpression();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case EOF:
			case SEMI:
			case RCURLY:
			case RPAREN:
			case COMMA:
			case ASSIGN:
			case LITERAL_or:
			case LITERAL_and:
			case NOT_EQUAL:
			case EQUAL:
			case LITERAL_is:
			case LITERAL_isnt:
			case LTHAN:
			case GTHAN:
			case LTE:
			case GTE:
			case BAR:
			case COLON:
			case RBRACK:
			case GIVES:
			case LITERAL_then:
			case LITERAL_else:
			case LITERAL_do:
			case LITERAL_while:
			case LITERAL_by:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			rangeExpression_AST = (AST)currentAST.root;
			break;
		}
		case DOTDOT:
		{
			AST tmp71_AST = null;
			tmp71_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp71_AST);
			match(DOTDOT);
			rangeExpression_AST = (AST)currentAST.root;
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		returnAST = rangeExpression_AST;
	}
	
	public final void additiveExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST additiveExpression_AST = null;
		
		multiplicativeExpression();
		astFactory.addASTChild(currentAST, returnAST);
		{
		_loop59:
		do {
			if ((LA(1)==PLUS||LA(1)==MINUS)) {
				{
				switch ( LA(1)) {
				case PLUS:
				{
					AST tmp72_AST = null;
					tmp72_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp72_AST);
					match(PLUS);
					break;
				}
				case MINUS:
				{
					AST tmp73_AST = null;
					tmp73_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp73_AST);
					match(MINUS);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				multiplicativeExpression();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				break _loop59;
			}
			
		} while (true);
		}
		additiveExpression_AST = (AST)currentAST.root;
		returnAST = additiveExpression_AST;
	}
	
	public final void multiplicativeExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST multiplicativeExpression_AST = null;
		
		powerExpression();
		astFactory.addASTChild(currentAST, returnAST);
		{
		_loop63:
		do {
			if (((LA(1) >= STAR && LA(1) <= MOD))) {
				{
				switch ( LA(1)) {
				case STAR:
				{
					AST tmp74_AST = null;
					tmp74_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp74_AST);
					match(STAR);
					break;
				}
				case DIV:
				{
					AST tmp75_AST = null;
					tmp75_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp75_AST);
					match(DIV);
					break;
				}
				case MOD:
				{
					AST tmp76_AST = null;
					tmp76_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp76_AST);
					match(MOD);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				powerExpression();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				break _loop63;
			}
			
		} while (true);
		}
		multiplicativeExpression_AST = (AST)currentAST.root;
		returnAST = multiplicativeExpression_AST;
	}
	
	public final void powerExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST powerExpression_AST = null;
		
		unaryExpression();
		astFactory.addASTChild(currentAST, returnAST);
		{
		_loop66:
		do {
			if ((LA(1)==HAT)) {
				AST tmp77_AST = null;
				tmp77_AST = astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp77_AST);
				match(HAT);
				unaryExpression();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				break _loop66;
			}
			
		} while (true);
		}
		powerExpression_AST = (AST)currentAST.root;
		returnAST = powerExpression_AST;
	}
	
	public final void unaryExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST unaryExpression_AST = null;
		
		switch ( LA(1)) {
		case INC:
		{
			AST tmp78_AST = null;
			tmp78_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp78_AST);
			match(INC);
			unaryExpression();
			astFactory.addASTChild(currentAST, returnAST);
			unaryExpression_AST = (AST)currentAST.root;
			break;
		}
		case DEC:
		{
			AST tmp79_AST = null;
			tmp79_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp79_AST);
			match(DEC);
			unaryExpression();
			astFactory.addASTChild(currentAST, returnAST);
			unaryExpression_AST = (AST)currentAST.root;
			break;
		}
		case MINUS:
		{
			AST tmp80_AST = null;
			tmp80_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp80_AST);
			match(MINUS);
			if ( inputState.guessing==0 ) {
				tmp80_AST.setType(UNARY_MINUS);
			}
			unaryExpression();
			astFactory.addASTChild(currentAST, returnAST);
			unaryExpression_AST = (AST)currentAST.root;
			break;
		}
		case PLUS:
		{
			AST tmp81_AST = null;
			tmp81_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp81_AST);
			match(PLUS);
			if ( inputState.guessing==0 ) {
				tmp81_AST.setType(UNARY_PLUS);
			}
			unaryExpression();
			astFactory.addASTChild(currentAST, returnAST);
			unaryExpression_AST = (AST)currentAST.root;
			break;
		}
		case LIT_TRUE:
		case LIT_FALSE:
		case LIT_NULL:
		case LCURLY:
		case IDENT:
		case STRING_LITERAL:
		case LITERAL_typeof:
		case LPAREN:
		case LNOT:
		case LITERAL_not:
		case HASH:
		case BAR:
		case SCOPE_ESCAPE:
		case LISTSTART:
		case LITERAL_try:
		case NUM_INT:
		case NUM_DINT:
		case NUM_REAL:
		case NUM_SREAL:
		case CHAR_LITERAL:
		case LBRACK:
		case LITERAL_vector:
		case LITERAL_matrix:
		case LITERAL_range:
		case LITERAL_list:
		case LITERAL_map:
		case LITERAL_bool:
		case LITERAL_byte:
		case LITERAL_char:
		case LITERAL_int:
		case LITERAL_dint:
		case LITERAL_real:
		case LITERAL_sreal:
		case LITERAL_string:
		case LITERAL_type:
		case LITERAL_num:
		case LITERAL_any:
		case LITERAL_object:
		{
			unaryExpressionNotPlusMinus();
			astFactory.addASTChild(currentAST, returnAST);
			unaryExpression_AST = (AST)currentAST.root;
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		returnAST = unaryExpression_AST;
	}
	
	public final void unaryExpressionNotPlusMinus() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST unaryExpressionNotPlusMinus_AST = null;
		
		switch ( LA(1)) {
		case LNOT:
		case LITERAL_not:
		{
			{
			switch ( LA(1)) {
			case LNOT:
			{
				AST tmp82_AST = null;
				tmp82_AST = astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp82_AST);
				match(LNOT);
				break;
			}
			case LITERAL_not:
			{
				AST tmp83_AST = null;
				tmp83_AST = astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp83_AST);
				match(LITERAL_not);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			unaryExpression();
			astFactory.addASTChild(currentAST, returnAST);
			unaryExpressionNotPlusMinus_AST = (AST)currentAST.root;
			break;
		}
		case HASH:
		{
			AST tmp84_AST = null;
			tmp84_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp84_AST);
			match(HASH);
			postfixExpression();
			astFactory.addASTChild(currentAST, returnAST);
			unaryExpressionNotPlusMinus_AST = (AST)currentAST.root;
			break;
		}
		case LIT_TRUE:
		case LIT_FALSE:
		case LIT_NULL:
		case LCURLY:
		case IDENT:
		case STRING_LITERAL:
		case LITERAL_typeof:
		case LPAREN:
		case BAR:
		case SCOPE_ESCAPE:
		case LISTSTART:
		case LITERAL_try:
		case NUM_INT:
		case NUM_DINT:
		case NUM_REAL:
		case NUM_SREAL:
		case CHAR_LITERAL:
		case LBRACK:
		case LITERAL_vector:
		case LITERAL_matrix:
		case LITERAL_range:
		case LITERAL_list:
		case LITERAL_map:
		case LITERAL_bool:
		case LITERAL_byte:
		case LITERAL_char:
		case LITERAL_int:
		case LITERAL_dint:
		case LITERAL_real:
		case LITERAL_sreal:
		case LITERAL_string:
		case LITERAL_type:
		case LITERAL_num:
		case LITERAL_any:
		case LITERAL_object:
		{
			postfixExpression();
			astFactory.addASTChild(currentAST, returnAST);
			unaryExpressionNotPlusMinus_AST = (AST)currentAST.root;
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		returnAST = unaryExpressionNotPlusMinus_AST;
	}
	
	public final void postfixExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST postfixExpression_AST = null;
		Token  incrmt = null;
		AST incrmt_AST = null;
		Token  decrmt = null;
		AST decrmt_AST = null;
		
		applicationSelectionExpression();
		astFactory.addASTChild(currentAST, returnAST);
		{
		switch ( LA(1)) {
		case INC:
		{
			incrmt = LT(1);
			incrmt_AST = astFactory.create(incrmt);
			astFactory.makeASTRoot(currentAST, incrmt_AST);
			match(INC);
			if ( inputState.guessing==0 ) {
				incrmt_AST.setType(POST_INC);
			}
			break;
		}
		case DEC:
		{
			decrmt = LT(1);
			decrmt_AST = astFactory.create(decrmt);
			astFactory.makeASTRoot(currentAST, decrmt_AST);
			match(DEC);
			if ( inputState.guessing==0 ) {
				decrmt_AST.setType(POST_DEC);
			}
			break;
		}
		case PRIME:
		{
			AST tmp85_AST = null;
			tmp85_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp85_AST);
			match(PRIME);
			break;
		}
		case EOF:
		case DOTDOT:
		case SEMI:
		case RCURLY:
		case RPAREN:
		case COMMA:
		case ASSIGN:
		case LITERAL_or:
		case LITERAL_and:
		case NOT_EQUAL:
		case EQUAL:
		case LITERAL_is:
		case LITERAL_isnt:
		case LTHAN:
		case GTHAN:
		case LTE:
		case GTE:
		case PLUS:
		case MINUS:
		case STAR:
		case DIV:
		case MOD:
		case HAT:
		case BAR:
		case COLON:
		case RBRACK:
		case GIVES:
		case LITERAL_then:
		case LITERAL_else:
		case LITERAL_do:
		case LITERAL_while:
		case LITERAL_by:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		postfixExpression_AST = (AST)currentAST.root;
		returnAST = postfixExpression_AST;
	}
	
	public final void primaryExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST primaryExpression_AST = null;
		
		switch ( LA(1)) {
		case LIT_TRUE:
		case LIT_FALSE:
		case LIT_NULL:
		case STRING_LITERAL:
		case NUM_INT:
		case NUM_DINT:
		case NUM_REAL:
		case NUM_SREAL:
		case CHAR_LITERAL:
		{
			constant();
			astFactory.addASTChild(currentAST, returnAST);
			primaryExpression_AST = (AST)currentAST.root;
			break;
		}
		case LCURLY:
		{
			expressionList();
			astFactory.addASTChild(currentAST, returnAST);
			primaryExpression_AST = (AST)currentAST.root;
			break;
		}
		case LITERAL_try:
		{
			exceptionBlock();
			astFactory.addASTChild(currentAST, returnAST);
			primaryExpression_AST = (AST)currentAST.root;
			break;
		}
		case LPAREN:
		{
			listOrParenExpr();
			astFactory.addASTChild(currentAST, returnAST);
			primaryExpression_AST = (AST)currentAST.root;
			break;
		}
		case LISTSTART:
		{
			listLiteral();
			astFactory.addASTChild(currentAST, returnAST);
			primaryExpression_AST = (AST)currentAST.root;
			break;
		}
		case BAR:
		{
			AST tmp86_AST = null;
			tmp86_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp86_AST);
			match(BAR);
			expression();
			astFactory.addASTChild(currentAST, returnAST);
			match(BAR);
			primaryExpression_AST = (AST)currentAST.root;
			break;
		}
		case IDENT:
		case SCOPE_ESCAPE:
		{
			{
			_loop80:
			do {
				if ((LA(1)==SCOPE_ESCAPE)) {
					AST tmp88_AST = null;
					tmp88_AST = astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp88_AST);
					match(SCOPE_ESCAPE);
				}
				else {
					break _loop80;
				}
				
			} while (true);
			}
			AST tmp89_AST = null;
			tmp89_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp89_AST);
			match(IDENT);
			primaryExpression_AST = (AST)currentAST.root;
			break;
		}
		case LITERAL_typeof:
		{
			typeofExpression();
			astFactory.addASTChild(currentAST, returnAST);
			primaryExpression_AST = (AST)currentAST.root;
			break;
		}
		case LITERAL_vector:
		case LITERAL_matrix:
		case LITERAL_range:
		case LITERAL_list:
		case LITERAL_map:
		case LITERAL_bool:
		case LITERAL_byte:
		case LITERAL_char:
		case LITERAL_int:
		case LITERAL_dint:
		case LITERAL_real:
		case LITERAL_sreal:
		case LITERAL_string:
		case LITERAL_type:
		case LITERAL_num:
		case LITERAL_any:
		case LITERAL_object:
		{
			builtInType();
			astFactory.addASTChild(currentAST, returnAST);
			primaryExpression_AST = (AST)currentAST.root;
			break;
		}
		default:
			boolean synPredMatched78 = false;
			if (((LA(1)==LBRACK) && (_tokenSet_1.member(LA(2))))) {
				int _m78 = mark();
				synPredMatched78 = true;
				inputState.guessing++;
				try {
					{
					map();
					}
				}
				catch (RecognitionException pe) {
					synPredMatched78 = false;
				}
				rewind(_m78);
				inputState.guessing--;
			}
			if ( synPredMatched78 ) {
				map();
				astFactory.addASTChild(currentAST, returnAST);
				primaryExpression_AST = (AST)currentAST.root;
			}
			else if ((LA(1)==LBRACK) && (_tokenSet_6.member(LA(2)))) {
				matrix();
				astFactory.addASTChild(currentAST, returnAST);
				primaryExpression_AST = (AST)currentAST.root;
			}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		returnAST = primaryExpression_AST;
	}
	
	public final void applicationParens() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST applicationParens_AST = null;
		
		{
		AST tmp90_AST = null;
		tmp90_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp90_AST);
		match(LPAREN);
		{
		switch ( LA(1)) {
		case DOTDOT:
		case LIT_TRUE:
		case LIT_FALSE:
		case LIT_NULL:
		case LCURLY:
		case LITERAL_namespace:
		case IDENT:
		case STRING_LITERAL:
		case LITERAL_typeof:
		case LPAREN:
		case LITERAL_assert:
		case LITERAL_debug:
		case LITERAL_logger:
		case PLUS:
		case MINUS:
		case INC:
		case DEC:
		case LNOT:
		case LITERAL_not:
		case HASH:
		case BAR:
		case SCOPE_ESCAPE:
		case LISTSTART:
		case LITERAL_try:
		case NUM_INT:
		case NUM_DINT:
		case NUM_REAL:
		case NUM_SREAL:
		case CHAR_LITERAL:
		case LBRACK:
		case ANNOT_START:
		case LITERAL_let:
		case LITERAL_class:
		case LITERAL_interface:
		case LITERAL_func:
		case LITERAL_vector:
		case LITERAL_matrix:
		case LITERAL_range:
		case LITERAL_list:
		case LITERAL_map:
		case LITERAL_bool:
		case LITERAL_byte:
		case LITERAL_char:
		case LITERAL_int:
		case LITERAL_dint:
		case LITERAL_real:
		case LITERAL_sreal:
		case LITERAL_string:
		case LITERAL_type:
		case LITERAL_num:
		case LITERAL_any:
		case LITERAL_object:
		case LITERAL_if:
		case LITERAL_do:
		case LITERAL_while:
		case LITERAL_for:
		case LITERAL_foreach:
		case LITERAL_throw:
		{
			argValue();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case RPAREN:
		case COMMA:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		{
		_loop96:
		do {
			if ((LA(1)==COMMA)) {
				AST tmp91_AST = null;
				tmp91_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp91_AST);
				match(COMMA);
				{
				switch ( LA(1)) {
				case DOTDOT:
				case LIT_TRUE:
				case LIT_FALSE:
				case LIT_NULL:
				case LCURLY:
				case LITERAL_namespace:
				case IDENT:
				case STRING_LITERAL:
				case LITERAL_typeof:
				case LPAREN:
				case LITERAL_assert:
				case LITERAL_debug:
				case LITERAL_logger:
				case PLUS:
				case MINUS:
				case INC:
				case DEC:
				case LNOT:
				case LITERAL_not:
				case HASH:
				case BAR:
				case SCOPE_ESCAPE:
				case LISTSTART:
				case LITERAL_try:
				case NUM_INT:
				case NUM_DINT:
				case NUM_REAL:
				case NUM_SREAL:
				case CHAR_LITERAL:
				case LBRACK:
				case ANNOT_START:
				case LITERAL_let:
				case LITERAL_class:
				case LITERAL_interface:
				case LITERAL_func:
				case LITERAL_vector:
				case LITERAL_matrix:
				case LITERAL_range:
				case LITERAL_list:
				case LITERAL_map:
				case LITERAL_bool:
				case LITERAL_byte:
				case LITERAL_char:
				case LITERAL_int:
				case LITERAL_dint:
				case LITERAL_real:
				case LITERAL_sreal:
				case LITERAL_string:
				case LITERAL_type:
				case LITERAL_num:
				case LITERAL_any:
				case LITERAL_object:
				case LITERAL_if:
				case LITERAL_do:
				case LITERAL_while:
				case LITERAL_for:
				case LITERAL_foreach:
				case LITERAL_throw:
				{
					argValue();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case RPAREN:
				case COMMA:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else {
				break _loop96;
			}
			
		} while (true);
		}
		match(RPAREN);
		}
		applicationParens_AST = (AST)currentAST.root;
		returnAST = applicationParens_AST;
	}
	
	public final void constant() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST constant_AST = null;
		
		switch ( LA(1)) {
		case NUM_INT:
		{
			AST tmp93_AST = null;
			tmp93_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp93_AST);
			match(NUM_INT);
			constant_AST = (AST)currentAST.root;
			break;
		}
		case NUM_DINT:
		{
			AST tmp94_AST = null;
			tmp94_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp94_AST);
			match(NUM_DINT);
			constant_AST = (AST)currentAST.root;
			break;
		}
		case NUM_REAL:
		{
			AST tmp95_AST = null;
			tmp95_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp95_AST);
			match(NUM_REAL);
			constant_AST = (AST)currentAST.root;
			break;
		}
		case NUM_SREAL:
		{
			AST tmp96_AST = null;
			tmp96_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp96_AST);
			match(NUM_SREAL);
			constant_AST = (AST)currentAST.root;
			break;
		}
		case LIT_TRUE:
		{
			AST tmp97_AST = null;
			tmp97_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp97_AST);
			match(LIT_TRUE);
			constant_AST = (AST)currentAST.root;
			break;
		}
		case LIT_FALSE:
		{
			AST tmp98_AST = null;
			tmp98_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp98_AST);
			match(LIT_FALSE);
			constant_AST = (AST)currentAST.root;
			break;
		}
		case LIT_NULL:
		{
			AST tmp99_AST = null;
			tmp99_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp99_AST);
			match(LIT_NULL);
			constant_AST = (AST)currentAST.root;
			break;
		}
		case CHAR_LITERAL:
		{
			AST tmp100_AST = null;
			tmp100_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp100_AST);
			match(CHAR_LITERAL);
			constant_AST = (AST)currentAST.root;
			break;
		}
		case STRING_LITERAL:
		{
			AST tmp101_AST = null;
			tmp101_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp101_AST);
			match(STRING_LITERAL);
			constant_AST = (AST)currentAST.root;
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		returnAST = constant_AST;
	}
	
	public final void map() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST map_AST = null;
		Token  lb = null;
		AST lb_AST = null;
		
		lb = LT(1);
		lb_AST = astFactory.create(lb);
		astFactory.makeASTRoot(currentAST, lb_AST);
		match(LBRACK);
		if ( inputState.guessing==0 ) {
			lb_AST.setType(MAP);
		}
		mapping();
		astFactory.addASTChild(currentAST, returnAST);
		{
		_loop106:
		do {
			if ((LA(1)==SEMI)) {
				{
				int _cnt105=0;
				_loop105:
				do {
					if ((LA(1)==SEMI)) {
						match(SEMI);
					}
					else {
						if ( _cnt105>=1 ) { break _loop105; } else {throw new NoViableAltException(LT(1), getFilename());}
					}
					
					_cnt105++;
				} while (true);
				}
				mapping();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				break _loop106;
			}
			
		} while (true);
		}
		match(RBRACK);
		map_AST = (AST)currentAST.root;
		returnAST = map_AST;
	}
	
	public final void matrix() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST matrix_AST = null;
		Token  lb = null;
		AST lb_AST = null;
		
		if ( inputState.guessing==0 ) {
			istate().inMatrix = true;
		}
		lb = LT(1);
		lb_AST = astFactory.create(lb);
		astFactory.makeASTRoot(currentAST, lb_AST);
		match(LBRACK);
		if ( inputState.guessing==0 ) {
			lb_AST.setType(MATRIX);
		}
		row();
		astFactory.addASTChild(currentAST, returnAST);
		{
		_loop112:
		do {
			if ((LA(1)==SEMI)) {
				{
				int _cnt111=0;
				_loop111:
				do {
					if ((LA(1)==SEMI)) {
						AST tmp104_AST = null;
						tmp104_AST = astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp104_AST);
						match(SEMI);
					}
					else {
						if ( _cnt111>=1 ) { break _loop111; } else {throw new NoViableAltException(LT(1), getFilename());}
					}
					
					_cnt111++;
				} while (true);
				}
				row();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				break _loop112;
			}
			
		} while (true);
		}
		match(RBRACK);
		if ( inputState.guessing==0 ) {
			istate().inMatrix = false;
		}
		matrix_AST = (AST)currentAST.root;
		returnAST = matrix_AST;
	}
	
	public final void expressionList() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST expressionList_AST = null;
		Token  lc = null;
		AST lc_AST = null;
		
		{
		lc = LT(1);
		lc_AST = astFactory.create(lc);
		astFactory.makeASTRoot(currentAST, lc_AST);
		match(LCURLY);
		if ( inputState.guessing==0 ) {
			lc_AST.setType(EXPRLIST);
		}
		{
		switch ( LA(1)) {
		case DOTDOT:
		case LIT_TRUE:
		case LIT_FALSE:
		case LIT_NULL:
		case LCURLY:
		case LITERAL_namespace:
		case IDENT:
		case STRING_LITERAL:
		case LITERAL_typeof:
		case LPAREN:
		case LITERAL_assert:
		case LITERAL_debug:
		case LITERAL_logger:
		case PLUS:
		case MINUS:
		case INC:
		case DEC:
		case LNOT:
		case LITERAL_not:
		case HASH:
		case BAR:
		case SCOPE_ESCAPE:
		case LISTSTART:
		case LITERAL_try:
		case NUM_INT:
		case NUM_DINT:
		case NUM_REAL:
		case NUM_SREAL:
		case CHAR_LITERAL:
		case LBRACK:
		case ANNOT_START:
		case LITERAL_let:
		case LITERAL_class:
		case LITERAL_interface:
		case LITERAL_func:
		case LITERAL_vector:
		case LITERAL_matrix:
		case LITERAL_range:
		case LITERAL_list:
		case LITERAL_map:
		case LITERAL_bool:
		case LITERAL_byte:
		case LITERAL_char:
		case LITERAL_int:
		case LITERAL_dint:
		case LITERAL_real:
		case LITERAL_sreal:
		case LITERAL_string:
		case LITERAL_type:
		case LITERAL_num:
		case LITERAL_any:
		case LITERAL_object:
		case LITERAL_if:
		case LITERAL_do:
		case LITERAL_while:
		case LITERAL_for:
		case LITERAL_foreach:
		case LITERAL_throw:
		{
			expression();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case SEMI:
		case RCURLY:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		{
		_loop131:
		do {
			if ((LA(1)==SEMI)) {
				match(SEMI);
				{
				switch ( LA(1)) {
				case DOTDOT:
				case LIT_TRUE:
				case LIT_FALSE:
				case LIT_NULL:
				case LCURLY:
				case LITERAL_namespace:
				case IDENT:
				case STRING_LITERAL:
				case LITERAL_typeof:
				case LPAREN:
				case LITERAL_assert:
				case LITERAL_debug:
				case LITERAL_logger:
				case PLUS:
				case MINUS:
				case INC:
				case DEC:
				case LNOT:
				case LITERAL_not:
				case HASH:
				case BAR:
				case SCOPE_ESCAPE:
				case LISTSTART:
				case LITERAL_try:
				case NUM_INT:
				case NUM_DINT:
				case NUM_REAL:
				case NUM_SREAL:
				case CHAR_LITERAL:
				case LBRACK:
				case ANNOT_START:
				case LITERAL_let:
				case LITERAL_class:
				case LITERAL_interface:
				case LITERAL_func:
				case LITERAL_vector:
				case LITERAL_matrix:
				case LITERAL_range:
				case LITERAL_list:
				case LITERAL_map:
				case LITERAL_bool:
				case LITERAL_byte:
				case LITERAL_char:
				case LITERAL_int:
				case LITERAL_dint:
				case LITERAL_real:
				case LITERAL_sreal:
				case LITERAL_string:
				case LITERAL_type:
				case LITERAL_num:
				case LITERAL_any:
				case LITERAL_object:
				case LITERAL_if:
				case LITERAL_do:
				case LITERAL_while:
				case LITERAL_for:
				case LITERAL_foreach:
				case LITERAL_throw:
				{
					expression();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case SEMI:
				case RCURLY:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else {
				break _loop131;
			}
			
		} while (true);
		}
		match(RCURLY);
		}
		expressionList_AST = (AST)currentAST.root;
		returnAST = expressionList_AST;
	}
	
	public final void exceptionBlock() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST exceptionBlock_AST = null;
		
		AST tmp108_AST = null;
		tmp108_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp108_AST);
		match(LITERAL_try);
		expressionList();
		astFactory.addASTChild(currentAST, returnAST);
		AST tmp109_AST = null;
		tmp109_AST = astFactory.create(LT(1));
		astFactory.addASTChild(currentAST, tmp109_AST);
		match(LITERAL_catch);
		match(LPAREN);
		{
		switch ( LA(1)) {
		case IDENT:
		{
			AST tmp111_AST = null;
			tmp111_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp111_AST);
			match(IDENT);
			match(COLON);
			typeExpression();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case RPAREN:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		match(RPAREN);
		expressionList();
		astFactory.addASTChild(currentAST, returnAST);
		exceptionBlock_AST = (AST)currentAST.root;
		returnAST = exceptionBlock_AST;
	}
	
	public final void listOrParenExpr() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST listOrParenExpr_AST = null;
		int count=0;
		
		match(LPAREN);
		{
		switch ( LA(1)) {
		case DOTDOT:
		case LIT_TRUE:
		case LIT_FALSE:
		case LIT_NULL:
		case LCURLY:
		case LITERAL_namespace:
		case IDENT:
		case STRING_LITERAL:
		case LITERAL_typeof:
		case LPAREN:
		case LITERAL_assert:
		case LITERAL_debug:
		case LITERAL_logger:
		case PLUS:
		case MINUS:
		case INC:
		case DEC:
		case LNOT:
		case LITERAL_not:
		case HASH:
		case BAR:
		case SCOPE_ESCAPE:
		case LISTSTART:
		case LITERAL_try:
		case NUM_INT:
		case NUM_DINT:
		case NUM_REAL:
		case NUM_SREAL:
		case CHAR_LITERAL:
		case LBRACK:
		case ANNOT_START:
		case LITERAL_let:
		case LITERAL_class:
		case LITERAL_interface:
		case LITERAL_func:
		case LITERAL_vector:
		case LITERAL_matrix:
		case LITERAL_range:
		case LITERAL_list:
		case LITERAL_map:
		case LITERAL_bool:
		case LITERAL_byte:
		case LITERAL_char:
		case LITERAL_int:
		case LITERAL_dint:
		case LITERAL_real:
		case LITERAL_sreal:
		case LITERAL_string:
		case LITERAL_type:
		case LITERAL_num:
		case LITERAL_any:
		case LITERAL_object:
		case LITERAL_if:
		case LITERAL_do:
		case LITERAL_while:
		case LITERAL_for:
		case LITERAL_foreach:
		case LITERAL_throw:
		{
			expression();
			astFactory.addASTChild(currentAST, returnAST);
			if ( inputState.guessing==0 ) {
				count++;
			}
			{
			_loop84:
			do {
				if ((LA(1)==COMMA)) {
					match(COMMA);
					expression();
					astFactory.addASTChild(currentAST, returnAST);
					if ( inputState.guessing==0 ) {
						count++;
					}
				}
				else {
					break _loop84;
				}
				
			} while (true);
			}
			break;
		}
		case RPAREN:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		match(RPAREN);
		if ( inputState.guessing==0 ) {
			listOrParenExpr_AST = (AST)currentAST.root;
			
			if (count != 1) {
			listOrParenExpr_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(LIST,"LIST")).add(listOrParenExpr_AST));
			}
			
			currentAST.root = listOrParenExpr_AST;
			currentAST.child = listOrParenExpr_AST!=null &&listOrParenExpr_AST.getFirstChild()!=null ?
				listOrParenExpr_AST.getFirstChild() : listOrParenExpr_AST;
			currentAST.advanceChildToEnd();
		}
		listOrParenExpr_AST = (AST)currentAST.root;
		returnAST = listOrParenExpr_AST;
	}
	
	public final void listLiteral() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST listLiteral_AST = null;
		
		match(LISTSTART);
		{
		switch ( LA(1)) {
		case DOTDOT:
		case LIT_TRUE:
		case LIT_FALSE:
		case LIT_NULL:
		case LCURLY:
		case LITERAL_namespace:
		case IDENT:
		case STRING_LITERAL:
		case LITERAL_typeof:
		case LPAREN:
		case LITERAL_assert:
		case LITERAL_debug:
		case LITERAL_logger:
		case PLUS:
		case MINUS:
		case INC:
		case DEC:
		case LNOT:
		case LITERAL_not:
		case HASH:
		case BAR:
		case SCOPE_ESCAPE:
		case LISTSTART:
		case LITERAL_try:
		case NUM_INT:
		case NUM_DINT:
		case NUM_REAL:
		case NUM_SREAL:
		case CHAR_LITERAL:
		case LBRACK:
		case ANNOT_START:
		case LITERAL_let:
		case LITERAL_class:
		case LITERAL_interface:
		case LITERAL_func:
		case LITERAL_vector:
		case LITERAL_matrix:
		case LITERAL_range:
		case LITERAL_list:
		case LITERAL_map:
		case LITERAL_bool:
		case LITERAL_byte:
		case LITERAL_char:
		case LITERAL_int:
		case LITERAL_dint:
		case LITERAL_real:
		case LITERAL_sreal:
		case LITERAL_string:
		case LITERAL_type:
		case LITERAL_num:
		case LITERAL_any:
		case LITERAL_object:
		case LITERAL_if:
		case LITERAL_do:
		case LITERAL_while:
		case LITERAL_for:
		case LITERAL_foreach:
		case LITERAL_throw:
		{
			expression();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop88:
			do {
				if ((LA(1)==COMMA)) {
					match(COMMA);
					expression();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop88;
				}
				
			} while (true);
			}
			break;
		}
		case RPAREN:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		match(RPAREN);
		if ( inputState.guessing==0 ) {
			listLiteral_AST = (AST)currentAST.root;
			listLiteral_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(LIST,"LIST")).add(listLiteral_AST));
			currentAST.root = listLiteral_AST;
			currentAST.child = listLiteral_AST!=null &&listLiteral_AST.getFirstChild()!=null ?
				listLiteral_AST.getFirstChild() : listLiteral_AST;
			currentAST.advanceChildToEnd();
		}
		listLiteral_AST = (AST)currentAST.root;
		returnAST = listLiteral_AST;
	}
	
	public final void builtInType() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST builtInType_AST = null;
		
		{
		switch ( LA(1)) {
		case LITERAL_vector:
		{
			AST tmp120_AST = null;
			tmp120_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp120_AST);
			match(LITERAL_vector);
			break;
		}
		case LITERAL_matrix:
		{
			AST tmp121_AST = null;
			tmp121_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp121_AST);
			match(LITERAL_matrix);
			break;
		}
		case LITERAL_range:
		{
			AST tmp122_AST = null;
			tmp122_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp122_AST);
			match(LITERAL_range);
			break;
		}
		case LITERAL_list:
		{
			AST tmp123_AST = null;
			tmp123_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp123_AST);
			match(LITERAL_list);
			break;
		}
		case LITERAL_map:
		{
			AST tmp124_AST = null;
			tmp124_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp124_AST);
			match(LITERAL_map);
			break;
		}
		case LITERAL_bool:
		{
			AST tmp125_AST = null;
			tmp125_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp125_AST);
			match(LITERAL_bool);
			break;
		}
		case LITERAL_byte:
		{
			AST tmp126_AST = null;
			tmp126_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp126_AST);
			match(LITERAL_byte);
			break;
		}
		case LITERAL_char:
		{
			AST tmp127_AST = null;
			tmp127_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp127_AST);
			match(LITERAL_char);
			break;
		}
		case LITERAL_int:
		{
			AST tmp128_AST = null;
			tmp128_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp128_AST);
			match(LITERAL_int);
			break;
		}
		case LITERAL_dint:
		{
			AST tmp129_AST = null;
			tmp129_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp129_AST);
			match(LITERAL_dint);
			break;
		}
		case LITERAL_real:
		{
			AST tmp130_AST = null;
			tmp130_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp130_AST);
			match(LITERAL_real);
			break;
		}
		case LITERAL_sreal:
		{
			AST tmp131_AST = null;
			tmp131_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp131_AST);
			match(LITERAL_sreal);
			break;
		}
		case LITERAL_string:
		{
			AST tmp132_AST = null;
			tmp132_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp132_AST);
			match(LITERAL_string);
			break;
		}
		case LITERAL_type:
		{
			AST tmp133_AST = null;
			tmp133_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp133_AST);
			match(LITERAL_type);
			break;
		}
		case LITERAL_num:
		{
			AST tmp134_AST = null;
			tmp134_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp134_AST);
			match(LITERAL_num);
			break;
		}
		case LITERAL_any:
		{
			AST tmp135_AST = null;
			tmp135_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp135_AST);
			match(LITERAL_any);
			break;
		}
		case LITERAL_object:
		{
			AST tmp136_AST = null;
			tmp136_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp136_AST);
			match(LITERAL_object);
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		if ( inputState.guessing==0 ) {
			builtInType_AST = (AST)currentAST.root;
			
			builtInType_AST.setType(BUILTIN_TYPE);
			
		}
		builtInType_AST = (AST)currentAST.root;
		returnAST = builtInType_AST;
	}
	
	public final void argValue() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST argValue_AST = null;
		
		boolean synPredMatched99 = false;
		if (((LA(1)==IDENT) && (LA(2)==ASSIGN))) {
			int _m99 = mark();
			synPredMatched99 = true;
			inputState.guessing++;
			try {
				{
				match(IDENT);
				match(ASSIGN);
				}
			}
			catch (RecognitionException pe) {
				synPredMatched99 = false;
			}
			rewind(_m99);
			inputState.guessing--;
		}
		if ( synPredMatched99 ) {
			{
			AST tmp137_AST = null;
			tmp137_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp137_AST);
			match(IDENT);
			match(ASSIGN);
			expression();
			astFactory.addASTChild(currentAST, returnAST);
			if ( inputState.guessing==0 ) {
				argValue_AST = (AST)currentAST.root;
				argValue_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(NAMED_ARG,"NAMED_ARG")).add(argValue_AST));
				currentAST.root = argValue_AST;
				currentAST.child = argValue_AST!=null &&argValue_AST.getFirstChild()!=null ?
					argValue_AST.getFirstChild() : argValue_AST;
				currentAST.advanceChildToEnd();
			}
			}
			argValue_AST = (AST)currentAST.root;
		}
		else if ((_tokenSet_1.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
			expression();
			astFactory.addASTChild(currentAST, returnAST);
			argValue_AST = (AST)currentAST.root;
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		returnAST = argValue_AST;
	}
	
	public final void mapping() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST mapping_AST = null;
		
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		AST tmp139_AST = null;
		tmp139_AST = astFactory.create(LT(1));
		astFactory.addASTChild(currentAST, tmp139_AST);
		match(GIVES);
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		mapping_AST = (AST)currentAST.root;
		returnAST = mapping_AST;
	}
	
	public final void row() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST row_AST = null;
		
		rowelement();
		astFactory.addASTChild(currentAST, returnAST);
		{
		_loop116:
		do {
			if ((_tokenSet_8.member(LA(1)))) {
				{
				switch ( LA(1)) {
				case COMMA:
				{
					match(COMMA);
					break;
				}
				case LIT_TRUE:
				case LIT_FALSE:
				case LIT_NULL:
				case IDENT:
				case STRING_LITERAL:
				case LPAREN:
				case HAT:
				case NUM_INT:
				case NUM_DINT:
				case NUM_REAL:
				case NUM_SREAL:
				case CHAR_LITERAL:
				case LITERAL_class:
				case LITERAL_interface:
				case LITERAL_func:
				case LITERAL_vector:
				case LITERAL_matrix:
				case LITERAL_range:
				case LITERAL_list:
				case LITERAL_map:
				case LITERAL_bool:
				case LITERAL_byte:
				case LITERAL_char:
				case LITERAL_int:
				case LITERAL_dint:
				case LITERAL_real:
				case LITERAL_sreal:
				case LITERAL_string:
				case LITERAL_type:
				case LITERAL_num:
				case LITERAL_any:
				case LITERAL_object:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				rowelement();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				break _loop116;
			}
			
		} while (true);
		}
		row_AST = (AST)currentAST.root;
		returnAST = row_AST;
	}
	
	public final void rowelement() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST rowelement_AST = null;
		
		switch ( LA(1)) {
		case LIT_TRUE:
		case LIT_FALSE:
		case LIT_NULL:
		case STRING_LITERAL:
		case NUM_INT:
		case NUM_DINT:
		case NUM_REAL:
		case NUM_SREAL:
		case CHAR_LITERAL:
		{
			constant();
			astFactory.addASTChild(currentAST, returnAST);
			rowelement_AST = (AST)currentAST.root;
			break;
		}
		case LITERAL_class:
		case LITERAL_interface:
		case LITERAL_func:
		case LITERAL_vector:
		case LITERAL_matrix:
		case LITERAL_range:
		case LITERAL_list:
		case LITERAL_map:
		case LITERAL_bool:
		case LITERAL_byte:
		case LITERAL_char:
		case LITERAL_int:
		case LITERAL_dint:
		case LITERAL_real:
		case LITERAL_sreal:
		case LITERAL_string:
		case LITERAL_type:
		case LITERAL_num:
		case LITERAL_any:
		case LITERAL_object:
		{
			typeLiteral();
			astFactory.addASTChild(currentAST, returnAST);
			rowelement_AST = (AST)currentAST.root;
			break;
		}
		case IDENT:
		case HAT:
		{
			{
			_loop119:
			do {
				if ((LA(1)==HAT)) {
					AST tmp141_AST = null;
					tmp141_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp141_AST);
					match(HAT);
				}
				else {
					break _loop119;
				}
				
			} while (true);
			}
			AST tmp142_AST = null;
			tmp142_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp142_AST);
			match(IDENT);
			{
			AST tmp143_AST = null;
			tmp143_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp143_AST);
			match(DOT);
			AST tmp144_AST = null;
			tmp144_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp144_AST);
			match(IDENT);
			}
			rowelement_AST = (AST)currentAST.root;
			break;
		}
		case LPAREN:
		{
			match(LPAREN);
			expression();
			astFactory.addASTChild(currentAST, returnAST);
			match(RPAREN);
			rowelement_AST = (AST)currentAST.root;
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		returnAST = rowelement_AST;
	}
	
	public final void typeLiteral() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST typeLiteral_AST = null;
		
		switch ( LA(1)) {
		case LITERAL_vector:
		case LITERAL_matrix:
		case LITERAL_range:
		case LITERAL_list:
		case LITERAL_map:
		case LITERAL_bool:
		case LITERAL_byte:
		case LITERAL_char:
		case LITERAL_int:
		case LITERAL_dint:
		case LITERAL_real:
		case LITERAL_sreal:
		case LITERAL_string:
		case LITERAL_type:
		case LITERAL_num:
		case LITERAL_any:
		case LITERAL_object:
		{
			builtInType();
			astFactory.addASTChild(currentAST, returnAST);
			typeLiteral_AST = (AST)currentAST.root;
			break;
		}
		case LITERAL_class:
		case LITERAL_interface:
		case LITERAL_func:
		{
			complexTypeLiteral();
			astFactory.addASTChild(currentAST, returnAST);
			typeLiteral_AST = (AST)currentAST.root;
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		returnAST = typeLiteral_AST;
	}
	
	public final void functionLiteralBody() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST functionLiteralBody_AST = null;
		
		{
		switch ( LA(1)) {
		case LITERAL_pre:
		{
			AST tmp147_AST = null;
			tmp147_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp147_AST);
			match(LITERAL_pre);
			expressionList();
			astFactory.addASTChild(currentAST, returnAST);
			match(SEMI);
			break;
		}
		case LCURLY:
		case LITERAL_post:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		{
		switch ( LA(1)) {
		case LITERAL_post:
		{
			AST tmp149_AST = null;
			tmp149_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp149_AST);
			match(LITERAL_post);
			expressionList();
			astFactory.addASTChild(currentAST, returnAST);
			match(SEMI);
			break;
		}
		case LCURLY:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		expressionList();
		astFactory.addASTChild(currentAST, returnAST);
		functionLiteralBody_AST = (AST)currentAST.root;
		returnAST = functionLiteralBody_AST;
	}
	
	public final void annotation() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST annotation_AST = null;
		
		AST tmp151_AST = null;
		tmp151_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp151_AST);
		match(ANNOT_START);
		AST tmp152_AST = null;
		tmp152_AST = astFactory.create(LT(1));
		astFactory.addASTChild(currentAST, tmp152_AST);
		match(IDENT);
		{
		_loop134:
		do {
			if ((LA(1)==DOT)) {
				match(DOT);
				AST tmp154_AST = null;
				tmp154_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp154_AST);
				match(IDENT);
			}
			else {
				break _loop134;
			}
			
		} while (true);
		}
		{
		switch ( LA(1)) {
		case LPAREN:
		{
			applicationParens();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case RBRACK:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		match(RBRACK);
		annotation_AST = (AST)currentAST.root;
		returnAST = annotation_AST;
	}
	
	public final void declModifiers() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST declModifiers_AST = null;
		
		{
		if (((LA(1) >= LITERAL_public && LA(1) <= LITERAL_protected)) && (LA(2)==IDENT)) {
			accessModifier();
			astFactory.addASTChild(currentAST, returnAST);
		}
		else if ((LA(1)==LITERAL_static||LA(1)==LITERAL_final) && (LA(2)==IDENT)) {
			{
			switch ( LA(1)) {
			case LITERAL_static:
			{
				AST tmp156_AST = null;
				tmp156_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp156_AST);
				match(LITERAL_static);
				break;
			}
			case LITERAL_final:
			{
				AST tmp157_AST = null;
				tmp157_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp157_AST);
				match(LITERAL_final);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
		}
		else if ((LA(1)==LITERAL_static||LA(1)==LITERAL_final) && ((LA(2) >= LITERAL_public && LA(2) <= LITERAL_protected))) {
			{
			{
			switch ( LA(1)) {
			case LITERAL_static:
			{
				AST tmp158_AST = null;
				tmp158_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp158_AST);
				match(LITERAL_static);
				break;
			}
			case LITERAL_final:
			{
				AST tmp159_AST = null;
				tmp159_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp159_AST);
				match(LITERAL_final);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			accessModifier();
			astFactory.addASTChild(currentAST, returnAST);
			}
		}
		else if (((LA(1) >= LITERAL_public && LA(1) <= LITERAL_protected)) && (LA(2)==LITERAL_static||LA(2)==LITERAL_final)) {
			{
			accessModifier();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case LITERAL_static:
			{
				AST tmp160_AST = null;
				tmp160_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp160_AST);
				match(LITERAL_static);
				break;
			}
			case LITERAL_final:
			{
				AST tmp161_AST = null;
				tmp161_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp161_AST);
				match(LITERAL_final);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			}
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		}
		if ( inputState.guessing==0 ) {
			declModifiers_AST = (AST)currentAST.root;
			declModifiers_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(MODIFIERS,"MODIFIERS")).add(declModifiers_AST));
			currentAST.root = declModifiers_AST;
			currentAST.child = declModifiers_AST!=null &&declModifiers_AST.getFirstChild()!=null ?
				declModifiers_AST.getFirstChild() : declModifiers_AST;
			currentAST.advanceChildToEnd();
		}
		declModifiers_AST = (AST)currentAST.root;
		returnAST = declModifiers_AST;
	}
	
	public final void accessModifier() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST accessModifier_AST = null;
		
		{
		switch ( LA(1)) {
		case LITERAL_public:
		{
			AST tmp162_AST = null;
			tmp162_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp162_AST);
			match(LITERAL_public);
			break;
		}
		case LITERAL_private:
		{
			AST tmp163_AST = null;
			tmp163_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp163_AST);
			match(LITERAL_private);
			break;
		}
		case LITERAL_protected:
		{
			AST tmp164_AST = null;
			tmp164_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp164_AST);
			match(LITERAL_protected);
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		accessModifier_AST = (AST)currentAST.root;
		returnAST = accessModifier_AST;
	}
	
	public final void funcType() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST funcType_AST = null;
		Token  f = null;
		AST f_AST = null;
		
		{
		f = LT(1);
		f_AST = astFactory.create(f);
		astFactory.makeASTRoot(currentAST, f_AST);
		match(LITERAL_func);
		match(LPAREN);
		paramTypeList();
		astFactory.addASTChild(currentAST, returnAST);
		{
		switch ( LA(1)) {
		case GIVES:
		{
			AST tmp166_AST = null;
			tmp166_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp166_AST);
			match(GIVES);
			typeExpression();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case RPAREN:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		match(RPAREN);
		}
		if ( inputState.guessing==0 ) {
			f_AST.setType(FUNC);
		}
		funcType_AST = (AST)currentAST.root;
		returnAST = funcType_AST;
	}
	
	public final void classType() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST classType_AST = null;
		
		{
		AST tmp168_AST = null;
		tmp168_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp168_AST);
		match(LITERAL_class);
		{
		switch ( LA(1)) {
		case COLON:
		{
			classBase();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case LCURLY:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		match(LCURLY);
		{
		switch ( LA(1)) {
		case IDENT:
		case LITERAL_let:
		case LITERAL_static:
		case LITERAL_final:
		case LITERAL_override:
		case LITERAL_public:
		case LITERAL_private:
		case LITERAL_protected:
		case LITERAL_func:
		{
			memberOrConstructor();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case SEMI:
		case RCURLY:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		{
		_loop160:
		do {
			if ((LA(1)==SEMI)) {
				match(SEMI);
				{
				switch ( LA(1)) {
				case IDENT:
				case LITERAL_let:
				case LITERAL_static:
				case LITERAL_final:
				case LITERAL_override:
				case LITERAL_public:
				case LITERAL_private:
				case LITERAL_protected:
				case LITERAL_func:
				{
					memberOrConstructor();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case SEMI:
				case RCURLY:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else {
				break _loop160;
			}
			
		} while (true);
		}
		match(RCURLY);
		}
		classType_AST = (AST)currentAST.root;
		returnAST = classType_AST;
	}
	
	public final void interfaceType() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST interfaceType_AST = null;
		
		{
		AST tmp172_AST = null;
		tmp172_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp172_AST);
		match(LITERAL_interface);
		{
		switch ( LA(1)) {
		case COLON:
		{
			classBase();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case LCURLY:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		match(LCURLY);
		{
		switch ( LA(1)) {
		case IDENT:
		case LITERAL_let:
		case LITERAL_static:
		case LITERAL_final:
		case LITERAL_override:
		case LITERAL_public:
		case LITERAL_private:
		case LITERAL_protected:
		{
			member();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case SEMI:
		case RCURLY:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		{
		_loop175:
		do {
			if ((LA(1)==SEMI)) {
				match(SEMI);
				{
				switch ( LA(1)) {
				case IDENT:
				case LITERAL_let:
				case LITERAL_static:
				case LITERAL_final:
				case LITERAL_override:
				case LITERAL_public:
				case LITERAL_private:
				case LITERAL_protected:
				{
					member();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case SEMI:
				case RCURLY:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else {
				break _loop175;
			}
			
		} while (true);
		}
		match(RCURLY);
		}
		interfaceType_AST = (AST)currentAST.root;
		returnAST = interfaceType_AST;
	}
	
	public final void classBase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST classBase_AST = null;
		
		AST tmp176_AST = null;
		tmp176_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp176_AST);
		match(COLON);
		typeExpression();
		astFactory.addASTChild(currentAST, returnAST);
		{
		_loop163:
		do {
			if ((LA(1)==COMMA)) {
				match(COMMA);
				typeExpression();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				break _loop163;
			}
			
		} while (true);
		}
		classBase_AST = (AST)currentAST.root;
		returnAST = classBase_AST;
	}
	
	public final void memberOrConstructor() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST memberOrConstructor_AST = null;
		
		{
		switch ( LA(1)) {
		case LITERAL_let:
		{
			match(LITERAL_let);
			break;
		}
		case IDENT:
		case LITERAL_static:
		case LITERAL_final:
		case LITERAL_override:
		case LITERAL_public:
		case LITERAL_private:
		case LITERAL_protected:
		case LITERAL_func:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		{
		if ((_tokenSet_9.member(LA(1))) && (_tokenSet_10.member(LA(2)))) {
			classMember();
			astFactory.addASTChild(currentAST, returnAST);
		}
		else if (((LA(1) >= LITERAL_public && LA(1) <= LITERAL_func)) && (_tokenSet_11.member(LA(2)))) {
			classConstructor();
			astFactory.addASTChild(currentAST, returnAST);
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		}
		memberOrConstructor_AST = (AST)currentAST.root;
		returnAST = memberOrConstructor_AST;
	}
	
	public final void member() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST member_AST = null;
		
		{
		switch ( LA(1)) {
		case LITERAL_let:
		{
			match(LITERAL_let);
			break;
		}
		case IDENT:
		case LITERAL_static:
		case LITERAL_final:
		case LITERAL_override:
		case LITERAL_public:
		case LITERAL_private:
		case LITERAL_protected:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		classMember();
		astFactory.addASTChild(currentAST, returnAST);
		member_AST = (AST)currentAST.root;
		returnAST = member_AST;
	}
	
	public final void classMember() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST classMember_AST = null;
		
		{
		switch ( LA(1)) {
		case LITERAL_static:
		case LITERAL_final:
		case LITERAL_override:
		case LITERAL_public:
		case LITERAL_private:
		case LITERAL_protected:
		{
			memberModifiers();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case IDENT:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		AST tmp180_AST = null;
		tmp180_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp180_AST);
		match(IDENT);
		{
		switch ( LA(1)) {
		case COLON:
		{
			AST tmp181_AST = null;
			tmp181_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp181_AST);
			match(COLON);
			typeExpression();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case SEMI:
		case RCURLY:
		case ASSIGN:
		case LITERAL_property:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		{
		switch ( LA(1)) {
		case ASSIGN:
		case LITERAL_property:
		{
			memberInitializer();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case SEMI:
		case RCURLY:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		classMember_AST = (AST)currentAST.root;
		returnAST = classMember_AST;
	}
	
	public final void classConstructor() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST classConstructor_AST = null;
		
		{
		switch ( LA(1)) {
		case LITERAL_public:
		case LITERAL_private:
		case LITERAL_protected:
		{
			ctorModifiers();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case LITERAL_func:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		functionLiteral();
		astFactory.addASTChild(currentAST, returnAST);
		if ( inputState.guessing==0 ) {
			classConstructor_AST = (AST)currentAST.root;
			
			classConstructor_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(CTOR,"CTOR")).add(classConstructor_AST)); 
			//!!! maybe there is a way to set the location of the CTOR?
			
			currentAST.root = classConstructor_AST;
			currentAST.child = classConstructor_AST!=null &&classConstructor_AST.getFirstChild()!=null ?
				classConstructor_AST.getFirstChild() : classConstructor_AST;
			currentAST.advanceChildToEnd();
		}
		classConstructor_AST = (AST)currentAST.root;
		returnAST = classConstructor_AST;
	}
	
	public final void ctorModifiers() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST ctorModifiers_AST = null;
		
		{
		accessModifier();
		astFactory.addASTChild(currentAST, returnAST);
		{
		switch ( LA(1)) {
		case LITERAL_implicit:
		{
			AST tmp182_AST = null;
			tmp182_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp182_AST);
			match(LITERAL_implicit);
			break;
		}
		case LITERAL_func:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		}
		if ( inputState.guessing==0 ) {
			ctorModifiers_AST = (AST)currentAST.root;
			ctorModifiers_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(MODIFIERS,"MODIFIERS")).add(ctorModifiers_AST));
			currentAST.root = ctorModifiers_AST;
			currentAST.child = ctorModifiers_AST!=null &&ctorModifiers_AST.getFirstChild()!=null ?
				ctorModifiers_AST.getFirstChild() : ctorModifiers_AST;
			currentAST.advanceChildToEnd();
		}
		ctorModifiers_AST = (AST)currentAST.root;
		returnAST = ctorModifiers_AST;
	}
	
	public final void memberModifiers() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST memberModifiers_AST = null;
		
		{
		if (((LA(1) >= LITERAL_public && LA(1) <= LITERAL_protected)) && (LA(2)==IDENT)) {
			accessModifier();
			astFactory.addASTChild(currentAST, returnAST);
		}
		else if ((_tokenSet_12.member(LA(1))) && (LA(2)==IDENT)) {
			{
			switch ( LA(1)) {
			case LITERAL_static:
			{
				AST tmp183_AST = null;
				tmp183_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp183_AST);
				match(LITERAL_static);
				break;
			}
			case LITERAL_override:
			{
				AST tmp184_AST = null;
				tmp184_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp184_AST);
				match(LITERAL_override);
				break;
			}
			case LITERAL_final:
			{
				AST tmp185_AST = null;
				tmp185_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp185_AST);
				match(LITERAL_final);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
		}
		else if ((_tokenSet_12.member(LA(1))) && ((LA(2) >= LITERAL_public && LA(2) <= LITERAL_protected))) {
			{
			{
			switch ( LA(1)) {
			case LITERAL_static:
			{
				AST tmp186_AST = null;
				tmp186_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp186_AST);
				match(LITERAL_static);
				break;
			}
			case LITERAL_override:
			{
				AST tmp187_AST = null;
				tmp187_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp187_AST);
				match(LITERAL_override);
				break;
			}
			case LITERAL_final:
			{
				AST tmp188_AST = null;
				tmp188_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp188_AST);
				match(LITERAL_final);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			accessModifier();
			astFactory.addASTChild(currentAST, returnAST);
			}
		}
		else if (((LA(1) >= LITERAL_public && LA(1) <= LITERAL_protected)) && (_tokenSet_12.member(LA(2)))) {
			{
			accessModifier();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case LITERAL_static:
			{
				AST tmp189_AST = null;
				tmp189_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp189_AST);
				match(LITERAL_static);
				break;
			}
			case LITERAL_override:
			{
				AST tmp190_AST = null;
				tmp190_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp190_AST);
				match(LITERAL_override);
				break;
			}
			case LITERAL_final:
			{
				AST tmp191_AST = null;
				tmp191_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp191_AST);
				match(LITERAL_final);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			}
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		}
		if ( inputState.guessing==0 ) {
			memberModifiers_AST = (AST)currentAST.root;
			memberModifiers_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(MODIFIERS,"MODIFIERS")).add(memberModifiers_AST));
			currentAST.root = memberModifiers_AST;
			currentAST.child = memberModifiers_AST!=null &&memberModifiers_AST.getFirstChild()!=null ?
				memberModifiers_AST.getFirstChild() : memberModifiers_AST;
			currentAST.advanceChildToEnd();
		}
		memberModifiers_AST = (AST)currentAST.root;
		returnAST = memberModifiers_AST;
	}
	
	public final void memberInitializer() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST memberInitializer_AST = null;
		
		switch ( LA(1)) {
		case ASSIGN:
		{
			{
			AST tmp192_AST = null;
			tmp192_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp192_AST);
			match(ASSIGN);
			expression();
			astFactory.addASTChild(currentAST, returnAST);
			}
			memberInitializer_AST = (AST)currentAST.root;
			break;
		}
		case LITERAL_property:
		{
			propertyDeclaration();
			astFactory.addASTChild(currentAST, returnAST);
			memberInitializer_AST = (AST)currentAST.root;
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		returnAST = memberInitializer_AST;
	}
	
	public final void propertyDeclaration() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST propertyDeclaration_AST = null;
		
		match(LITERAL_property);
		{
		switch ( LA(1)) {
		case LPAREN:
		{
			AST tmp194_AST = null;
			tmp194_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp194_AST);
			match(LPAREN);
			formalParamList();
			astFactory.addASTChild(currentAST, returnAST);
			match(RPAREN);
			break;
		}
		case LCURLY:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		AST tmp196_AST = null;
		tmp196_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp196_AST);
		match(LCURLY);
		accessorFunc();
		astFactory.addASTChild(currentAST, returnAST);
		{
		if ((LA(1)==SEMI) && (LA(2)==IDENT)) {
			match(SEMI);
			accessorFunc();
			astFactory.addASTChild(currentAST, returnAST);
		}
		else if ((LA(1)==SEMI||LA(1)==RCURLY) && (LA(2)==SEMI||LA(2)==RCURLY)) {
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		}
		{
		switch ( LA(1)) {
		case SEMI:
		{
			match(SEMI);
			break;
		}
		case RCURLY:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		match(RCURLY);
		if ( inputState.guessing==0 ) {
			propertyDeclaration_AST = (AST)currentAST.root;
			propertyDeclaration_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(PROP,"PROP")).add(propertyDeclaration_AST));
			currentAST.root = propertyDeclaration_AST;
			currentAST.child = propertyDeclaration_AST!=null &&propertyDeclaration_AST.getFirstChild()!=null ?
				propertyDeclaration_AST.getFirstChild() : propertyDeclaration_AST;
			currentAST.advanceChildToEnd();
		}
		propertyDeclaration_AST = (AST)currentAST.root;
		returnAST = propertyDeclaration_AST;
	}
	
	public final void formalParamList() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST formalParamList_AST = null;
		
		{
		{
		switch ( LA(1)) {
		case IDENT:
		{
			formalParam();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case RPAREN:
		case COMMA:
		case GIVES:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		{
		_loop222:
		do {
			if ((LA(1)==COMMA)) {
				match(COMMA);
				formalParam();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				break _loop222;
			}
			
		} while (true);
		}
		}
		formalParamList_AST = (AST)currentAST.root;
		returnAST = formalParamList_AST;
	}
	
	public final void accessorFunc() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST accessorFunc_AST = null;
		
		AST tmp201_AST = null;
		tmp201_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp201_AST);
		match(IDENT);
		{
		switch ( LA(1)) {
		case ASSIGN:
		{
			match(ASSIGN);
			{
			boolean synPredMatched192 = false;
			if (((_tokenSet_13.member(LA(1))) && (_tokenSet_14.member(LA(2))))) {
				int _m192 = mark();
				synPredMatched192 = true;
				inputState.guessing++;
				try {
					{
					switch ( LA(1)) {
					case LCURLY:
					{
						match(LCURLY);
						break;
					}
					case LITERAL_pre:
					{
						match(LITERAL_pre);
						break;
					}
					case LITERAL_post:
					{
						match(LITERAL_post);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				catch (RecognitionException pe) {
					synPredMatched192 = false;
				}
				rewind(_m192);
				inputState.guessing--;
			}
			if ( synPredMatched192 ) {
				functionLiteralBody();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_1.member(LA(1))) && (_tokenSet_5.member(LA(2)))) {
				expression();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			break;
		}
		case SEMI:
		case RCURLY:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		accessorFunc_AST = (AST)currentAST.root;
		returnAST = accessorFunc_AST;
	}
	
	public final void paramTypeList() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST paramTypeList_AST = null;
		
		{
		{
		switch ( LA(1)) {
		case LIT_TRUE:
		case LIT_FALSE:
		case LIT_NULL:
		case LCURLY:
		case IDENT:
		case STRING_LITERAL:
		case LITERAL_typeof:
		case LPAREN:
		case BAR:
		case SCOPE_ESCAPE:
		case LISTSTART:
		case LITERAL_try:
		case NUM_INT:
		case NUM_DINT:
		case NUM_REAL:
		case NUM_SREAL:
		case CHAR_LITERAL:
		case LBRACK:
		case LITERAL_class:
		case LITERAL_interface:
		case LITERAL_func:
		case LITERAL_vector:
		case LITERAL_matrix:
		case LITERAL_range:
		case LITERAL_list:
		case LITERAL_map:
		case LITERAL_bool:
		case LITERAL_byte:
		case LITERAL_char:
		case LITERAL_int:
		case LITERAL_dint:
		case LITERAL_real:
		case LITERAL_sreal:
		case LITERAL_string:
		case LITERAL_type:
		case LITERAL_num:
		case LITERAL_any:
		case LITERAL_object:
		{
			paramType();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case RPAREN:
		case COMMA:
		case GIVES:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		{
		_loop212:
		do {
			if ((LA(1)==COMMA)) {
				match(COMMA);
				paramType();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				break _loop212;
			}
			
		} while (true);
		}
		}
		paramTypeList_AST = (AST)currentAST.root;
		returnAST = paramTypeList_AST;
	}
	
	public final void paramType() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST paramType_AST = null;
		
		typeExpression();
		astFactory.addASTChild(currentAST, returnAST);
		{
		switch ( LA(1)) {
		case ASSIGN:
		{
			AST tmp204_AST = null;
			tmp204_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp204_AST);
			match(ASSIGN);
			expression();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case RPAREN:
		case COMMA:
		case GIVES:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		paramType_AST = (AST)currentAST.root;
		returnAST = paramType_AST;
	}
	
	public final void formalParam() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST formalParam_AST = null;
		
		AST tmp205_AST = null;
		tmp205_AST = astFactory.create(LT(1));
		astFactory.addASTChild(currentAST, tmp205_AST);
		match(IDENT);
		match(COLON);
		typeExpression();
		astFactory.addASTChild(currentAST, returnAST);
		{
		switch ( LA(1)) {
		case ASSIGN:
		{
			AST tmp207_AST = null;
			tmp207_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp207_AST);
			match(ASSIGN);
			expression();
			astFactory.addASTChild(currentAST, returnAST);
			break;
		}
		case RPAREN:
		case COMMA:
		case GIVES:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		formalParam_AST = (AST)currentAST.root;
		returnAST = formalParam_AST;
	}
	
	public final void ifThenExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST ifThenExpression_AST = null;
		
		AST tmp208_AST = null;
		tmp208_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp208_AST);
		match(LITERAL_if);
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		match(LITERAL_then);
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		{
		boolean synPredMatched234 = false;
		if (((LA(1)==SEMI||LA(1)==LITERAL_else) && (_tokenSet_15.member(LA(2))))) {
			int _m234 = mark();
			synPredMatched234 = true;
			inputState.guessing++;
			try {
				{
				{
				switch ( LA(1)) {
				case SEMI:
				{
					match(SEMI);
					break;
				}
				case LITERAL_else:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				match(LITERAL_else);
				}
			}
			catch (RecognitionException pe) {
				synPredMatched234 = false;
			}
			rewind(_m234);
			inputState.guessing--;
		}
		if ( synPredMatched234 ) {
			ifElsePart();
			astFactory.addASTChild(currentAST, returnAST);
		}
		else if ((_tokenSet_16.member(LA(1))) && (_tokenSet_17.member(LA(2)))) {
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		}
		ifThenExpression_AST = (AST)currentAST.root;
		returnAST = ifThenExpression_AST;
	}
	
	public final void ifParenExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST ifParenExpression_AST = null;
		
		AST tmp210_AST = null;
		tmp210_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp210_AST);
		match(LITERAL_if);
		match(LPAREN);
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		match(RPAREN);
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		{
		boolean synPredMatched239 = false;
		if (((LA(1)==SEMI||LA(1)==LITERAL_else) && (_tokenSet_15.member(LA(2))))) {
			int _m239 = mark();
			synPredMatched239 = true;
			inputState.guessing++;
			try {
				{
				{
				switch ( LA(1)) {
				case SEMI:
				{
					match(SEMI);
					break;
				}
				case LITERAL_else:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				match(LITERAL_else);
				}
			}
			catch (RecognitionException pe) {
				synPredMatched239 = false;
			}
			rewind(_m239);
			inputState.guessing--;
		}
		if ( synPredMatched239 ) {
			ifElsePart();
			astFactory.addASTChild(currentAST, returnAST);
		}
		else if ((_tokenSet_16.member(LA(1))) && (_tokenSet_17.member(LA(2)))) {
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		}
		ifParenExpression_AST = (AST)currentAST.root;
		returnAST = ifParenExpression_AST;
	}
	
	public final void ifElsePart() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST ifElsePart_AST = null;
		
		{
		switch ( LA(1)) {
		case SEMI:
		{
			match(SEMI);
			break;
		}
		case LITERAL_else:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		match(LITERAL_else);
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		ifElsePart_AST = (AST)currentAST.root;
		returnAST = ifElsePart_AST;
	}
	
	public final void whileDoExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST whileDoExpression_AST = null;
		
		boolean synPredMatched246 = false;
		if (((LA(1)==LITERAL_while) && (_tokenSet_1.member(LA(2))))) {
			int _m246 = mark();
			synPredMatched246 = true;
			inputState.guessing++;
			try {
				{
				match(LITERAL_while);
				expression();
				match(LITERAL_do);
				}
			}
			catch (RecognitionException pe) {
				synPredMatched246 = false;
			}
			rewind(_m246);
			inputState.guessing--;
		}
		if ( synPredMatched246 ) {
			AST tmp215_AST = null;
			tmp215_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp215_AST);
			match(LITERAL_while);
			expression();
			astFactory.addASTChild(currentAST, returnAST);
			match(LITERAL_do);
			expression();
			astFactory.addASTChild(currentAST, returnAST);
			whileDoExpression_AST = (AST)currentAST.root;
		}
		else if ((LA(1)==LITERAL_while) && (LA(2)==LPAREN)) {
			AST tmp217_AST = null;
			tmp217_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp217_AST);
			match(LITERAL_while);
			match(LPAREN);
			expression();
			astFactory.addASTChild(currentAST, returnAST);
			match(RPAREN);
			expression();
			astFactory.addASTChild(currentAST, returnAST);
			whileDoExpression_AST = (AST)currentAST.root;
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		returnAST = whileDoExpression_AST;
	}
	
	public final void doWhileExpression() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST doWhileExpression_AST = null;
		
		AST tmp220_AST = null;
		tmp220_AST = astFactory.create(LT(1));
		astFactory.makeASTRoot(currentAST, tmp220_AST);
		match(LITERAL_do);
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		match(LITERAL_while);
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		doWhileExpression_AST = (AST)currentAST.root;
		returnAST = doWhileExpression_AST;
	}
	
	public final void forDeclPart() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST forDeclPart_AST = null;
		
		boolean synPredMatched251 = false;
		if (((LA(1)==IDENT||LA(1)==LITERAL_let) && (LA(2)==IDENT||LA(2)==COLON))) {
			int _m251 = mark();
			synPredMatched251 = true;
			inputState.guessing++;
			try {
				{
				{
				switch ( LA(1)) {
				case LITERAL_let:
				{
					match(LITERAL_let);
					break;
				}
				case IDENT:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				match(IDENT);
				match(COLON);
				}
			}
			catch (RecognitionException pe) {
				synPredMatched251 = false;
			}
			rewind(_m251);
			inputState.guessing--;
		}
		if ( synPredMatched251 ) {
			{
			switch ( LA(1)) {
			case LITERAL_let:
			{
				AST tmp222_AST = null;
				tmp222_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp222_AST);
				match(LITERAL_let);
				break;
			}
			case IDENT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			AST tmp223_AST = null;
			tmp223_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp223_AST);
			match(IDENT);
			AST tmp224_AST = null;
			tmp224_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp224_AST);
			match(COLON);
			typeExpression();
			astFactory.addASTChild(currentAST, returnAST);
			AST tmp225_AST = null;
			tmp225_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp225_AST);
			match(ASSIGN);
			expression();
			astFactory.addASTChild(currentAST, returnAST);
			forDeclPart_AST = (AST)currentAST.root;
		}
		else if ((_tokenSet_1.member(LA(1))) && (_tokenSet_5.member(LA(2)))) {
			expression();
			astFactory.addASTChild(currentAST, returnAST);
			forDeclPart_AST = (AST)currentAST.root;
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		returnAST = forDeclPart_AST;
	}
	
	public final void foreachRangeExpr() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST foreachRangeExpr_AST = null;
		
		expression();
		astFactory.addASTChild(currentAST, returnAST);
		{
		switch ( LA(1)) {
		case COLON:
		{
			AST tmp226_AST = null;
			tmp226_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp226_AST);
			match(COLON);
			expression();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case LITERAL_by:
			{
				match(LITERAL_by);
				expression();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case RPAREN:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			break;
		}
		case RPAREN:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		foreachRangeExpr_AST = (AST)currentAST.root;
		returnAST = foreachRangeExpr_AST;
	}
	
	
	public static final String[] _tokenNames = {
		"<0>",
		"EOF",
		"<2>",
		"NULL_TREE_LOOKAHEAD",
		"DOT",
		"DOTDOT",
		"UNARY_MINUS",
		"UNARY_PLUS",
		"EXPRLIST",
		"INITLIST",
		"MATRIX",
		"LIST",
		"MAP",
		"FUNC",
		"POST_INC",
		"POST_DEC",
		"APPLICATION",
		"NAMED_ARG",
		"\"true\"",
		"\"false\"",
		"\"null\"",
		"LIT_FUNC",
		"MODIFIERS",
		"BUILTIN_TYPE",
		"CTOR",
		"PROP",
		"LCURLY",
		";",
		"\"namespace\"",
		"}",
		"an identifier",
		"\"using\"",
		"\"as\"",
		"\"from\"",
		"a string literal",
		"\"pre\"",
		"\"post\"",
		"\"typeof\"",
		"LPAREN",
		"RPAREN",
		"\"assert\"",
		"COMMA",
		"\"debug\"",
		"\"logger\"",
		"ASSIGN",
		"\"or\"",
		"\"and\"",
		"NOT_EQUAL",
		"EQUAL",
		"\"is\"",
		"\"isnt\"",
		"LTHAN",
		"GTHAN",
		"LTE",
		"GTE",
		"PLUS",
		"MINUS",
		"STAR",
		"DIV",
		"MOD",
		"HAT",
		"INC",
		"DEC",
		"LNOT",
		"\"not\"",
		"HASH",
		"PRIME",
		"BAR",
		"SCOPE_ESCAPE",
		"'(",
		"\"try\"",
		"\"catch\"",
		"COLON",
		"a numeric literal",
		"NUM_DINT",
		"NUM_REAL",
		"NUM_SREAL",
		"a char literal",
		"LBRACK",
		"RBRACK",
		"->",
		"ANNOT_START",
		"\"let\"",
		"\"const\"",
		"\"static\"",
		"\"final\"",
		"\"class\"",
		"\"interface\"",
		"\"property\"",
		"\"override\"",
		"\"implicit\"",
		"\"public\"",
		"\"private\"",
		"\"protected\"",
		"\"func\"",
		"\"vector\"",
		"\"matrix\"",
		"\"range\"",
		"\"list\"",
		"\"map\"",
		"\"bool\"",
		"\"byte\"",
		"\"char\"",
		"\"int\"",
		"\"dint\"",
		"\"real\"",
		"\"sreal\"",
		"\"string\"",
		"\"type\"",
		"\"num\"",
		"\"any\"",
		"\"object\"",
		"\"if\"",
		"\"then\"",
		"\"else\"",
		"\"do\"",
		"\"while\"",
		"\"for\"",
		"\"foreach\"",
		"\"in\"",
		"\"by\"",
		"\"throw\"",
		"QUESTION",
		"SL",
		"BAND",
		"FROM",
		"LINE_BREAK",
		"NON_LINE_BREAK_WS",
		"WS",
		"SL_COMMENT",
		"ML_COMMENT",
		"STRING_OR_CHAR_LITERAL",
		"a string literal",
		"a multi-line string literal",
		"NON_BACKQUOTE_STRING",
		"CHAR_LIT_SUFFIX",
		"ESC",
		"HEX_DIGIT",
		"VOCAB",
		"DOT_FLOAT_EXP",
		"EXPONENT",
		"REAL_SUFFIX"
	};
	
	protected void buildTokenTypeASTClassMap() {
		tokenTypeToASTClassMap=null;
	};
	
	private static final long[] mk_tokenSet_0() {
		long[] data = { -2197741890779217888L, 178455134173822587L, 0L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
	private static final long[] mk_tokenSet_1() {
		long[] data = { -2197741893597790176L, 178455134173822587L, 0L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
	private static final long[] mk_tokenSet_2() {
		long[] data = { -2317200129998L, 178455135117016959L, 0L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
	private static final long[] mk_tokenSet_3() {
		long[] data = { 0L, 1086324736L, 0L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
	private static final long[] mk_tokenSet_4() {
		long[] data = { 274945015808L, 256L, 0L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
	private static final long[] mk_tokenSet_5() {
		long[] data = { -2317200130000L, 178455135117016959L, 0L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
	private static final long[] mk_tokenSet_6() {
		long[] data = { 1152921797740199936L, 281473915567616L, 0L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
	private static final long[] mk_tokenSet_7() {
		long[] data = { -118176874448L, 178455135117016959L, 0L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
	private static final long[] mk_tokenSet_8() {
		long[] data = { 1152923996763455488L, 281473915567616L, 0L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
	private static final long[] mk_tokenSet_9() {
		long[] data = { 1073741824L, 976224256L, 0L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
	private static final long[] mk_tokenSet_10() {
		long[] data = { 17593930874880L, 993001728L, 0L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());
	private static final long[] mk_tokenSet_11() {
		long[] data = { 274877906944L, 1140850688L, 0L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11());
	private static final long[] mk_tokenSet_12() {
		long[] data = { 0L, 36700160L, 0L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_12 = new BitSet(mk_tokenSet_12());
	private static final long[] mk_tokenSet_13() {
		long[] data = { 103146323968L, 0L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_13 = new BitSet(mk_tokenSet_13());
	private static final long[] mk_tokenSet_14() {
		long[] data = { -2197741892926701536L, 178455134173822587L, 0L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_14 = new BitSet(mk_tokenSet_14());
	private static final long[] mk_tokenSet_15() {
		long[] data = { -2197741893597790176L, 179581034080665211L, 0L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_15 = new BitSet(mk_tokenSet_15());
	private static final long[] mk_tokenSet_16() {
		long[] data = { 2749450158082L, 80501843339346184L, 0L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_16 = new BitSet(mk_tokenSet_16());
	private static final long[] mk_tokenSet_17() {
		long[] data = { -15097659342L, 288230376084078591L, 0L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_17 = new BitSet(mk_tokenSet_17());
	
	}
