All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ovirt.api.metamodel.analyzer.ExpressionParser Maven / Gradle / Ivy

// Generated from org/ovirt/api/metamodel/analyzer/Expression.g4 by ANTLR 4.2.2
package org.ovirt.api.metamodel.analyzer;

import java.math.BigInteger;
import java.util.List;

import org.ovirt.api.metamodel.concepts.Name;
import org.ovirt.api.metamodel.concepts.Expression;

import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.misc.*;
import org.antlr.v4.runtime.tree.*;
import java.util.List;
import java.util.Iterator;
import java.util.ArrayList;

@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
public class ExpressionParser extends Parser {
	protected static final DFA[] _decisionToDFA;
	protected static final PredictionContextCache _sharedContextCache =
		new PredictionContextCache();
	public static final int
		T__25=1, T__24=2, T__23=3, T__22=4, T__21=5, T__20=6, T__19=7, T__18=8, 
		T__17=9, T__16=10, T__15=11, T__14=12, T__13=13, T__12=14, T__11=15, T__10=16, 
		T__9=17, T__8=18, T__7=19, T__6=20, T__5=21, T__4=22, T__3=23, T__2=24, 
		T__1=25, T__0=26, INTEGER=27, IDENTIFIER=28, WHITE_SPACE=29, BLOCK_COMMENT=30, 
		LINE_COMMENT=31;
	public static final String[] tokenNames = {
		"", "'/'", "'true'", "'return'", "'!='", "'||'", "';'", "'&&'", 
		"'<='", "'null'", "'('", "'*'", "','", "'false'", "'.'", "'['", "'>='", 
		"'<'", "'=='", "']'", "'assert'", "'>'", "'!'", "'%'", "')'", "'+'", "'-'", 
		"INTEGER", "IDENTIFIER", "WHITE_SPACE", "BLOCK_COMMENT", "LINE_COMMENT"
	};
	public static final int
		RULE_statements = 0, RULE_statement = 1, RULE_expression = 2, RULE_booleanExpression = 3, 
		RULE_booleanTerm = 4, RULE_booleanFactor = 5, RULE_booleanPrimary = 6, 
		RULE_booleanAtom = 7, RULE_relationalExpression = 8, RULE_arithmeticExpression = 9, 
		RULE_arithmethicTerm = 10, RULE_arithmethicFactor = 11, RULE_arithmeticPrimary = 12, 
		RULE_arithmeticAtom = 13, RULE_call = 14, RULE_callParameters = 15, RULE_literal = 16, 
		RULE_identifier = 17, RULE_integer = 18;
	public static final String[] ruleNames = {
		"statements", "statement", "expression", "booleanExpression", "booleanTerm", 
		"booleanFactor", "booleanPrimary", "booleanAtom", "relationalExpression", 
		"arithmeticExpression", "arithmethicTerm", "arithmethicFactor", "arithmeticPrimary", 
		"arithmeticAtom", "call", "callParameters", "literal", "identifier", "integer"
	};

	@Override
	public String getGrammarFileName() { return "Expression.g4"; }

	@Override
	public String[] getTokenNames() { return tokenNames; }

	@Override
	public String[] getRuleNames() { return ruleNames; }

	@Override
	public String getSerializedATN() { return _serializedATN; }

	@Override
	public ATN getATN() { return _ATN; }

	public ExpressionParser(TokenStream input) {
		super(input);
		_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
	}
	public static class StatementsContext extends ParserRuleContext {
		public List result;
		public StatementContext statement(int i) {
			return getRuleContext(StatementContext.class,i);
		}
		public List statement() {
			return getRuleContexts(StatementContext.class);
		}
		public StatementsContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_statements; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterStatements(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitStatements(this);
		}
	}

	public final StatementsContext statements() throws RecognitionException {
		StatementsContext _localctx = new StatementsContext(_ctx, getState());
		enterRule(_localctx, 0, RULE_statements);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(41);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << 2) | (1L << 3) | (1L << 6) | (1L << 9) | (1L << 10) | (1L << 13) | (1L << 20) | (1L << 22) | (1L << 25) | (1L << 26) | (1L << INTEGER) | (1L << IDENTIFIER))) != 0)) {
				{
				{
				setState(38); statement();
				}
				}
				setState(43);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class StatementContext extends ParserRuleContext {
		public Expression result;
		public StatementContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_statement; }
	 
		public StatementContext() { }
		public void copyFrom(StatementContext ctx) {
			super.copyFrom(ctx);
			this.result = ctx.result;
		}
	}
	public static class StatementReturnContext extends StatementContext {
		public ExpressionContext expression() {
			return getRuleContext(ExpressionContext.class,0);
		}
		public StatementReturnContext(StatementContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterStatementReturn(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitStatementReturn(this);
		}
	}
	public static class StatementAssertContext extends StatementContext {
		public BooleanExpressionContext booleanExpression() {
			return getRuleContext(BooleanExpressionContext.class,0);
		}
		public StatementAssertContext(StatementContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterStatementAssert(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitStatementAssert(this);
		}
	}
	public static class StatementCallContext extends StatementContext {
		public ExpressionContext expression() {
			return getRuleContext(ExpressionContext.class,0);
		}
		public StatementCallContext(StatementContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterStatementCall(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitStatementCall(this);
		}
	}

	public final StatementContext statement() throws RecognitionException {
		StatementContext _localctx = new StatementContext(_ctx, getState());
		enterRule(_localctx, 2, RULE_statement);
		int _la;
		try {
			setState(57);
			switch (_input.LA(1)) {
			case 20:
				_localctx = new StatementAssertContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(44); match(20);
				setState(45); booleanExpression();
				setState(46); match(6);
				}
				break;
			case 3:
				_localctx = new StatementReturnContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(48); match(3);
				setState(50);
				_la = _input.LA(1);
				if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << 2) | (1L << 9) | (1L << 10) | (1L << 13) | (1L << 22) | (1L << 25) | (1L << 26) | (1L << INTEGER) | (1L << IDENTIFIER))) != 0)) {
					{
					setState(49); expression();
					}
				}

				setState(52); match(6);
				}
				break;
			case 2:
			case 6:
			case 9:
			case 10:
			case 13:
			case 22:
			case 25:
			case 26:
			case INTEGER:
			case IDENTIFIER:
				_localctx = new StatementCallContext(_localctx);
				enterOuterAlt(_localctx, 3);
				{
				setState(54);
				_la = _input.LA(1);
				if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << 2) | (1L << 9) | (1L << 10) | (1L << 13) | (1L << 22) | (1L << 25) | (1L << 26) | (1L << INTEGER) | (1L << IDENTIFIER))) != 0)) {
					{
					setState(53); expression();
					}
				}

				setState(56); match(6);
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ExpressionContext extends ParserRuleContext {
		public Expression result;
		public ArithmeticExpressionContext arithmeticExpression() {
			return getRuleContext(ArithmeticExpressionContext.class,0);
		}
		public BooleanExpressionContext booleanExpression() {
			return getRuleContext(BooleanExpressionContext.class,0);
		}
		public ExpressionContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_expression; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterExpression(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitExpression(this);
		}
	}

	public final ExpressionContext expression() throws RecognitionException {
		ExpressionContext _localctx = new ExpressionContext(_ctx, getState());
		enterRule(_localctx, 4, RULE_expression);
		try {
			setState(61);
			switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) {
			case 1:
				enterOuterAlt(_localctx, 1);
				{
				setState(59); booleanExpression();
				}
				break;

			case 2:
				enterOuterAlt(_localctx, 2);
				{
				setState(60); arithmeticExpression();
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class BooleanExpressionContext extends ParserRuleContext {
		public Expression result;
		public BooleanTermContext booleanTerm() {
			return getRuleContext(BooleanTermContext.class,0);
		}
		public BooleanExpressionContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_booleanExpression; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterBooleanExpression(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitBooleanExpression(this);
		}
	}

	public final BooleanExpressionContext booleanExpression() throws RecognitionException {
		BooleanExpressionContext _localctx = new BooleanExpressionContext(_ctx, getState());
		enterRule(_localctx, 6, RULE_booleanExpression);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(63); booleanTerm(0);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class BooleanTermContext extends ParserRuleContext {
		public Expression result;
		public BooleanTermContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_booleanTerm; }
	 
		public BooleanTermContext() { }
		public void copyFrom(BooleanTermContext ctx) {
			super.copyFrom(ctx);
			this.result = ctx.result;
		}
	}
	public static class BooleanUnaryTermContext extends BooleanTermContext {
		public BooleanFactorContext booleanFactor() {
			return getRuleContext(BooleanFactorContext.class,0);
		}
		public BooleanUnaryTermContext(BooleanTermContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterBooleanUnaryTerm(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitBooleanUnaryTerm(this);
		}
	}
	public static class BooleanBinaryTermContext extends BooleanTermContext {
		public BooleanTermContext left;
		public BooleanFactorContext right;
		public BooleanFactorContext booleanFactor() {
			return getRuleContext(BooleanFactorContext.class,0);
		}
		public BooleanTermContext booleanTerm() {
			return getRuleContext(BooleanTermContext.class,0);
		}
		public BooleanBinaryTermContext(BooleanTermContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterBooleanBinaryTerm(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitBooleanBinaryTerm(this);
		}
	}

	public final BooleanTermContext booleanTerm() throws RecognitionException {
		return booleanTerm(0);
	}

	private BooleanTermContext booleanTerm(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		BooleanTermContext _localctx = new BooleanTermContext(_ctx, _parentState);
		BooleanTermContext _prevctx = _localctx;
		int _startState = 8;
		enterRecursionRule(_localctx, 8, RULE_booleanTerm, _p);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			{
			_localctx = new BooleanUnaryTermContext(_localctx);
			_ctx = _localctx;
			_prevctx = _localctx;

			setState(66); booleanFactor(0);
			}
			_ctx.stop = _input.LT(-1);
			setState(73);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,5,_ctx);
			while ( _alt!=2 && _alt!=ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					{
					_localctx = new BooleanBinaryTermContext(new BooleanTermContext(_parentctx, _parentState));
					((BooleanBinaryTermContext)_localctx).left = _prevctx;
					pushNewRecursionContext(_localctx, _startState, RULE_booleanTerm);
					setState(68);
					if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
					setState(69); match(5);
					setState(70); ((BooleanBinaryTermContext)_localctx).right = booleanFactor(0);
					}
					} 
				}
				setState(75);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,5,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class BooleanFactorContext extends ParserRuleContext {
		public Expression result;
		public BooleanFactorContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_booleanFactor; }
	 
		public BooleanFactorContext() { }
		public void copyFrom(BooleanFactorContext ctx) {
			super.copyFrom(ctx);
			this.result = ctx.result;
		}
	}
	public static class BooleanBinaryFactorContext extends BooleanFactorContext {
		public BooleanFactorContext left;
		public BooleanPrimaryContext right;
		public BooleanFactorContext booleanFactor() {
			return getRuleContext(BooleanFactorContext.class,0);
		}
		public BooleanPrimaryContext booleanPrimary() {
			return getRuleContext(BooleanPrimaryContext.class,0);
		}
		public BooleanBinaryFactorContext(BooleanFactorContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterBooleanBinaryFactor(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitBooleanBinaryFactor(this);
		}
	}
	public static class BooleanUnaryFactorContext extends BooleanFactorContext {
		public BooleanPrimaryContext booleanPrimary() {
			return getRuleContext(BooleanPrimaryContext.class,0);
		}
		public BooleanUnaryFactorContext(BooleanFactorContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterBooleanUnaryFactor(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitBooleanUnaryFactor(this);
		}
	}

	public final BooleanFactorContext booleanFactor() throws RecognitionException {
		return booleanFactor(0);
	}

	private BooleanFactorContext booleanFactor(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		BooleanFactorContext _localctx = new BooleanFactorContext(_ctx, _parentState);
		BooleanFactorContext _prevctx = _localctx;
		int _startState = 10;
		enterRecursionRule(_localctx, 10, RULE_booleanFactor, _p);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			{
			_localctx = new BooleanUnaryFactorContext(_localctx);
			_ctx = _localctx;
			_prevctx = _localctx;

			setState(77); booleanPrimary();
			}
			_ctx.stop = _input.LT(-1);
			setState(84);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,6,_ctx);
			while ( _alt!=2 && _alt!=ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					{
					_localctx = new BooleanBinaryFactorContext(new BooleanFactorContext(_parentctx, _parentState));
					((BooleanBinaryFactorContext)_localctx).left = _prevctx;
					pushNewRecursionContext(_localctx, _startState, RULE_booleanFactor);
					setState(79);
					if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
					setState(80); match(7);
					setState(81); ((BooleanBinaryFactorContext)_localctx).right = booleanPrimary();
					}
					} 
				}
				setState(86);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,6,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class BooleanPrimaryContext extends ParserRuleContext {
		public Expression result;
		public BooleanPrimaryContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_booleanPrimary; }
	 
		public BooleanPrimaryContext() { }
		public void copyFrom(BooleanPrimaryContext ctx) {
			super.copyFrom(ctx);
			this.result = ctx.result;
		}
	}
	public static class BooleanPrimaryNegationContext extends BooleanPrimaryContext {
		public BooleanPrimaryContext booleanPrimary() {
			return getRuleContext(BooleanPrimaryContext.class,0);
		}
		public BooleanPrimaryNegationContext(BooleanPrimaryContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterBooleanPrimaryNegation(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitBooleanPrimaryNegation(this);
		}
	}
	public static class BooleanPrimaryAtomContext extends BooleanPrimaryContext {
		public BooleanAtomContext booleanAtom() {
			return getRuleContext(BooleanAtomContext.class,0);
		}
		public BooleanPrimaryAtomContext(BooleanPrimaryContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterBooleanPrimaryAtom(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitBooleanPrimaryAtom(this);
		}
	}

	public final BooleanPrimaryContext booleanPrimary() throws RecognitionException {
		BooleanPrimaryContext _localctx = new BooleanPrimaryContext(_ctx, getState());
		enterRule(_localctx, 12, RULE_booleanPrimary);
		try {
			setState(90);
			switch (_input.LA(1)) {
			case 2:
			case 9:
			case 10:
			case 13:
			case 25:
			case 26:
			case INTEGER:
			case IDENTIFIER:
				_localctx = new BooleanPrimaryAtomContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(87); booleanAtom();
				}
				break;
			case 22:
				_localctx = new BooleanPrimaryNegationContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(88); match(22);
				setState(89); booleanPrimary();
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class BooleanAtomContext extends ParserRuleContext {
		public Expression result;
		public ArithmeticAtomContext arithmeticAtom() {
			return getRuleContext(ArithmeticAtomContext.class,0);
		}
		public RelationalExpressionContext relationalExpression() {
			return getRuleContext(RelationalExpressionContext.class,0);
		}
		public BooleanAtomContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_booleanAtom; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterBooleanAtom(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitBooleanAtom(this);
		}
	}

	public final BooleanAtomContext booleanAtom() throws RecognitionException {
		BooleanAtomContext _localctx = new BooleanAtomContext(_ctx, getState());
		enterRule(_localctx, 14, RULE_booleanAtom);
		try {
			setState(94);
			switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) {
			case 1:
				enterOuterAlt(_localctx, 1);
				{
				setState(92); arithmeticAtom(0);
				}
				break;

			case 2:
				enterOuterAlt(_localctx, 2);
				{
				setState(93); relationalExpression();
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class RelationalExpressionContext extends ParserRuleContext {
		public Expression result;
		public ArithmeticExpressionContext left;
		public Token operator;
		public ArithmeticExpressionContext right;
		public List arithmeticExpression() {
			return getRuleContexts(ArithmeticExpressionContext.class);
		}
		public ArithmeticExpressionContext arithmeticExpression(int i) {
			return getRuleContext(ArithmeticExpressionContext.class,i);
		}
		public RelationalExpressionContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_relationalExpression; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterRelationalExpression(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitRelationalExpression(this);
		}
	}

	public final RelationalExpressionContext relationalExpression() throws RecognitionException {
		RelationalExpressionContext _localctx = new RelationalExpressionContext(_ctx, getState());
		enterRule(_localctx, 16, RULE_relationalExpression);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(96); ((RelationalExpressionContext)_localctx).left = arithmeticExpression();
			setState(97);
			((RelationalExpressionContext)_localctx).operator = _input.LT(1);
			_la = _input.LA(1);
			if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << 4) | (1L << 8) | (1L << 16) | (1L << 17) | (1L << 18) | (1L << 21))) != 0)) ) {
				((RelationalExpressionContext)_localctx).operator = (Token)_errHandler.recoverInline(this);
			}
			consume();
			setState(98); ((RelationalExpressionContext)_localctx).right = arithmeticExpression();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ArithmeticExpressionContext extends ParserRuleContext {
		public Expression result;
		public ArithmethicTermContext arithmethicTerm() {
			return getRuleContext(ArithmethicTermContext.class,0);
		}
		public ArithmeticExpressionContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_arithmeticExpression; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterArithmeticExpression(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitArithmeticExpression(this);
		}
	}

	public final ArithmeticExpressionContext arithmeticExpression() throws RecognitionException {
		ArithmeticExpressionContext _localctx = new ArithmeticExpressionContext(_ctx, getState());
		enterRule(_localctx, 18, RULE_arithmeticExpression);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(100); arithmethicTerm(0);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ArithmethicTermContext extends ParserRuleContext {
		public Expression result;
		public ArithmethicTermContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_arithmethicTerm; }
	 
		public ArithmethicTermContext() { }
		public void copyFrom(ArithmethicTermContext ctx) {
			super.copyFrom(ctx);
			this.result = ctx.result;
		}
	}
	public static class ArithmeticUnaryTermContext extends ArithmethicTermContext {
		public ArithmethicFactorContext arithmethicFactor() {
			return getRuleContext(ArithmethicFactorContext.class,0);
		}
		public ArithmeticUnaryTermContext(ArithmethicTermContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterArithmeticUnaryTerm(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitArithmeticUnaryTerm(this);
		}
	}
	public static class ArithmeticBinaryTermContext extends ArithmethicTermContext {
		public ArithmethicTermContext left;
		public Token operator;
		public ArithmethicFactorContext right;
		public ArithmethicFactorContext arithmethicFactor() {
			return getRuleContext(ArithmethicFactorContext.class,0);
		}
		public ArithmethicTermContext arithmethicTerm() {
			return getRuleContext(ArithmethicTermContext.class,0);
		}
		public ArithmeticBinaryTermContext(ArithmethicTermContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterArithmeticBinaryTerm(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitArithmeticBinaryTerm(this);
		}
	}

	public final ArithmethicTermContext arithmethicTerm() throws RecognitionException {
		return arithmethicTerm(0);
	}

	private ArithmethicTermContext arithmethicTerm(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		ArithmethicTermContext _localctx = new ArithmethicTermContext(_ctx, _parentState);
		ArithmethicTermContext _prevctx = _localctx;
		int _startState = 20;
		enterRecursionRule(_localctx, 20, RULE_arithmethicTerm, _p);
		int _la;
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			{
			_localctx = new ArithmeticUnaryTermContext(_localctx);
			_ctx = _localctx;
			_prevctx = _localctx;

			setState(103); arithmethicFactor(0);
			}
			_ctx.stop = _input.LT(-1);
			setState(110);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,9,_ctx);
			while ( _alt!=2 && _alt!=ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					{
					_localctx = new ArithmeticBinaryTermContext(new ArithmethicTermContext(_parentctx, _parentState));
					((ArithmeticBinaryTermContext)_localctx).left = _prevctx;
					pushNewRecursionContext(_localctx, _startState, RULE_arithmethicTerm);
					setState(105);
					if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
					setState(106);
					((ArithmeticBinaryTermContext)_localctx).operator = _input.LT(1);
					_la = _input.LA(1);
					if ( !(_la==25 || _la==26) ) {
						((ArithmeticBinaryTermContext)_localctx).operator = (Token)_errHandler.recoverInline(this);
					}
					consume();
					setState(107); ((ArithmeticBinaryTermContext)_localctx).right = arithmethicFactor(0);
					}
					} 
				}
				setState(112);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,9,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class ArithmethicFactorContext extends ParserRuleContext {
		public Expression result;
		public ArithmethicFactorContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_arithmethicFactor; }
	 
		public ArithmethicFactorContext() { }
		public void copyFrom(ArithmethicFactorContext ctx) {
			super.copyFrom(ctx);
			this.result = ctx.result;
		}
	}
	public static class ArithmeticUnaryFactorContext extends ArithmethicFactorContext {
		public ArithmeticPrimaryContext arithmeticPrimary() {
			return getRuleContext(ArithmeticPrimaryContext.class,0);
		}
		public ArithmeticUnaryFactorContext(ArithmethicFactorContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterArithmeticUnaryFactor(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitArithmeticUnaryFactor(this);
		}
	}
	public static class ArithmeticBinaryFactorContext extends ArithmethicFactorContext {
		public ArithmethicFactorContext left;
		public Token operator;
		public ArithmeticPrimaryContext right;
		public ArithmethicFactorContext arithmethicFactor() {
			return getRuleContext(ArithmethicFactorContext.class,0);
		}
		public ArithmeticPrimaryContext arithmeticPrimary() {
			return getRuleContext(ArithmeticPrimaryContext.class,0);
		}
		public ArithmeticBinaryFactorContext(ArithmethicFactorContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterArithmeticBinaryFactor(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitArithmeticBinaryFactor(this);
		}
	}

	public final ArithmethicFactorContext arithmethicFactor() throws RecognitionException {
		return arithmethicFactor(0);
	}

	private ArithmethicFactorContext arithmethicFactor(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		ArithmethicFactorContext _localctx = new ArithmethicFactorContext(_ctx, _parentState);
		ArithmethicFactorContext _prevctx = _localctx;
		int _startState = 22;
		enterRecursionRule(_localctx, 22, RULE_arithmethicFactor, _p);
		int _la;
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			{
			_localctx = new ArithmeticUnaryFactorContext(_localctx);
			_ctx = _localctx;
			_prevctx = _localctx;

			setState(114); arithmeticPrimary();
			}
			_ctx.stop = _input.LT(-1);
			setState(121);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,10,_ctx);
			while ( _alt!=2 && _alt!=ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					{
					_localctx = new ArithmeticBinaryFactorContext(new ArithmethicFactorContext(_parentctx, _parentState));
					((ArithmeticBinaryFactorContext)_localctx).left = _prevctx;
					pushNewRecursionContext(_localctx, _startState, RULE_arithmethicFactor);
					setState(116);
					if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
					setState(117);
					((ArithmeticBinaryFactorContext)_localctx).operator = _input.LT(1);
					_la = _input.LA(1);
					if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << 1) | (1L << 11) | (1L << 23))) != 0)) ) {
						((ArithmeticBinaryFactorContext)_localctx).operator = (Token)_errHandler.recoverInline(this);
					}
					consume();
					setState(118); ((ArithmeticBinaryFactorContext)_localctx).right = arithmeticPrimary();
					}
					} 
				}
				setState(123);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,10,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class ArithmeticPrimaryContext extends ParserRuleContext {
		public Expression result;
		public ArithmeticPrimaryContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_arithmeticPrimary; }
	 
		public ArithmeticPrimaryContext() { }
		public void copyFrom(ArithmeticPrimaryContext ctx) {
			super.copyFrom(ctx);
			this.result = ctx.result;
		}
	}
	public static class ArithmeticPrimarySignContext extends ArithmeticPrimaryContext {
		public Token sign;
		public ArithmeticPrimaryContext arithmeticPrimary() {
			return getRuleContext(ArithmeticPrimaryContext.class,0);
		}
		public ArithmeticPrimarySignContext(ArithmeticPrimaryContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterArithmeticPrimarySign(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitArithmeticPrimarySign(this);
		}
	}
	public static class ArithmeticPrimaryAtomContext extends ArithmeticPrimaryContext {
		public ArithmeticAtomContext arithmeticAtom() {
			return getRuleContext(ArithmeticAtomContext.class,0);
		}
		public ArithmeticPrimaryAtomContext(ArithmeticPrimaryContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterArithmeticPrimaryAtom(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitArithmeticPrimaryAtom(this);
		}
	}

	public final ArithmeticPrimaryContext arithmeticPrimary() throws RecognitionException {
		ArithmeticPrimaryContext _localctx = new ArithmeticPrimaryContext(_ctx, getState());
		enterRule(_localctx, 24, RULE_arithmeticPrimary);
		int _la;
		try {
			setState(127);
			switch (_input.LA(1)) {
			case 2:
			case 9:
			case 10:
			case 13:
			case INTEGER:
			case IDENTIFIER:
				_localctx = new ArithmeticPrimaryAtomContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(124); arithmeticAtom(0);
				}
				break;
			case 25:
			case 26:
				_localctx = new ArithmeticPrimarySignContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(125);
				((ArithmeticPrimarySignContext)_localctx).sign = _input.LT(1);
				_la = _input.LA(1);
				if ( !(_la==25 || _la==26) ) {
					((ArithmeticPrimarySignContext)_localctx).sign = (Token)_errHandler.recoverInline(this);
				}
				consume();
				setState(126); arithmeticPrimary();
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ArithmeticAtomContext extends ParserRuleContext {
		public Expression result;
		public ArithmeticAtomContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_arithmeticAtom; }
	 
		public ArithmeticAtomContext() { }
		public void copyFrom(ArithmeticAtomContext ctx) {
			super.copyFrom(ctx);
			this.result = ctx.result;
		}
	}
	public static class ArithmeticAtomCallContext extends ArithmeticAtomContext {
		public ArithmeticAtomContext arithmeticAtom() {
			return getRuleContext(ArithmeticAtomContext.class,0);
		}
		public CallContext call() {
			return getRuleContext(CallContext.class,0);
		}
		public ArithmeticAtomCallContext(ArithmeticAtomContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterArithmeticAtomCall(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitArithmeticAtomCall(this);
		}
	}
	public static class ArithmeticAtomLiteralContext extends ArithmeticAtomContext {
		public LiteralContext literal() {
			return getRuleContext(LiteralContext.class,0);
		}
		public ArithmeticAtomLiteralContext(ArithmeticAtomContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterArithmeticAtomLiteral(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitArithmeticAtomLiteral(this);
		}
	}
	public static class ArithmeticAtomIdContext extends ArithmeticAtomContext {
		public ArithmeticAtomContext arithmeticAtom() {
			return getRuleContext(ArithmeticAtomContext.class,0);
		}
		public IdentifierContext identifier() {
			return getRuleContext(IdentifierContext.class,0);
		}
		public ArithmeticAtomIdContext(ArithmeticAtomContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterArithmeticAtomId(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitArithmeticAtomId(this);
		}
	}
	public static class ArithmeticAtomArrayContext extends ArithmeticAtomContext {
		public ArithmeticAtomContext arithmeticAtom() {
			return getRuleContext(ArithmeticAtomContext.class,0);
		}
		public ArithmeticExpressionContext arithmeticExpression() {
			return getRuleContext(ArithmeticExpressionContext.class,0);
		}
		public ArithmeticAtomArrayContext(ArithmeticAtomContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterArithmeticAtomArray(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitArithmeticAtomArray(this);
		}
	}
	public static class ArithmeticAtomParenthesizedContext extends ArithmeticAtomContext {
		public ExpressionContext expression() {
			return getRuleContext(ExpressionContext.class,0);
		}
		public ArithmeticAtomParenthesizedContext(ArithmeticAtomContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterArithmeticAtomParenthesized(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitArithmeticAtomParenthesized(this);
		}
	}

	public final ArithmeticAtomContext arithmeticAtom() throws RecognitionException {
		return arithmeticAtom(0);
	}

	private ArithmeticAtomContext arithmeticAtom(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		ArithmeticAtomContext _localctx = new ArithmeticAtomContext(_ctx, _parentState);
		ArithmeticAtomContext _prevctx = _localctx;
		int _startState = 26;
		enterRecursionRule(_localctx, 26, RULE_arithmeticAtom, _p);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			setState(137);
			switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) {
			case 1:
				{
				_localctx = new ArithmeticAtomLiteralContext(_localctx);
				_ctx = _localctx;
				_prevctx = _localctx;

				setState(130); literal();
				}
				break;

			case 2:
				{
				_localctx = new ArithmeticAtomIdContext(_localctx);
				_ctx = _localctx;
				_prevctx = _localctx;
				setState(131); identifier();
				}
				break;

			case 3:
				{
				_localctx = new ArithmeticAtomCallContext(_localctx);
				_ctx = _localctx;
				_prevctx = _localctx;
				setState(132); call();
				}
				break;

			case 4:
				{
				_localctx = new ArithmeticAtomParenthesizedContext(_localctx);
				_ctx = _localctx;
				_prevctx = _localctx;
				setState(133); match(10);
				setState(134); expression();
				setState(135); match(24);
				}
				break;
			}
			_ctx.stop = _input.LT(-1);
			setState(152);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,14,_ctx);
			while ( _alt!=2 && _alt!=ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					setState(150);
					switch ( getInterpreter().adaptivePredict(_input,13,_ctx) ) {
					case 1:
						{
						_localctx = new ArithmeticAtomIdContext(new ArithmeticAtomContext(_parentctx, _parentState));
						pushNewRecursionContext(_localctx, _startState, RULE_arithmeticAtom);
						setState(139);
						if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)");
						setState(140); match(14);
						setState(141); identifier();
						}
						break;

					case 2:
						{
						_localctx = new ArithmeticAtomCallContext(new ArithmeticAtomContext(_parentctx, _parentState));
						pushNewRecursionContext(_localctx, _startState, RULE_arithmeticAtom);
						setState(142);
						if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
						setState(143); match(14);
						setState(144); call();
						}
						break;

					case 3:
						{
						_localctx = new ArithmeticAtomArrayContext(new ArithmeticAtomContext(_parentctx, _parentState));
						pushNewRecursionContext(_localctx, _startState, RULE_arithmeticAtom);
						setState(145);
						if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
						setState(146); match(15);
						setState(147); arithmeticExpression();
						setState(148); match(19);
						}
						break;
					}
					} 
				}
				setState(154);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,14,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class CallContext extends ParserRuleContext {
		public Expression result;
		public CallParametersContext callParameters() {
			return getRuleContext(CallParametersContext.class,0);
		}
		public IdentifierContext identifier() {
			return getRuleContext(IdentifierContext.class,0);
		}
		public CallContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_call; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterCall(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitCall(this);
		}
	}

	public final CallContext call() throws RecognitionException {
		CallContext _localctx = new CallContext(_ctx, getState());
		enterRule(_localctx, 28, RULE_call);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(155); identifier();
			setState(156); match(10);
			setState(158);
			_la = _input.LA(1);
			if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << 2) | (1L << 9) | (1L << 10) | (1L << 13) | (1L << 22) | (1L << 25) | (1L << 26) | (1L << INTEGER) | (1L << IDENTIFIER))) != 0)) {
				{
				setState(157); callParameters();
				}
			}

			setState(160); match(24);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class CallParametersContext extends ParserRuleContext {
		public List result;
		public ExpressionContext expression(int i) {
			return getRuleContext(ExpressionContext.class,i);
		}
		public List expression() {
			return getRuleContexts(ExpressionContext.class);
		}
		public CallParametersContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_callParameters; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterCallParameters(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitCallParameters(this);
		}
	}

	public final CallParametersContext callParameters() throws RecognitionException {
		CallParametersContext _localctx = new CallParametersContext(_ctx, getState());
		enterRule(_localctx, 30, RULE_callParameters);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(162); expression();
			setState(167);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==12) {
				{
				{
				setState(163); match(12);
				setState(164); expression();
				}
				}
				setState(169);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class LiteralContext extends ParserRuleContext {
		public Object result;
		public LiteralContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_literal; }
	 
		public LiteralContext() { }
		public void copyFrom(LiteralContext ctx) {
			super.copyFrom(ctx);
			this.result = ctx.result;
		}
	}
	public static class LiteralNumericContext extends LiteralContext {
		public IntegerContext integer() {
			return getRuleContext(IntegerContext.class,0);
		}
		public LiteralNumericContext(LiteralContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterLiteralNumeric(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitLiteralNumeric(this);
		}
	}
	public static class LiteralNullContext extends LiteralContext {
		public LiteralNullContext(LiteralContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterLiteralNull(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitLiteralNull(this);
		}
	}
	public static class LiteralBooleanContext extends LiteralContext {
		public LiteralBooleanContext(LiteralContext ctx) { copyFrom(ctx); }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterLiteralBoolean(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitLiteralBoolean(this);
		}
	}

	public final LiteralContext literal() throws RecognitionException {
		LiteralContext _localctx = new LiteralContext(_ctx, getState());
		enterRule(_localctx, 32, RULE_literal);
		int _la;
		try {
			setState(173);
			switch (_input.LA(1)) {
			case 2:
			case 13:
				_localctx = new LiteralBooleanContext(_localctx);
				enterOuterAlt(_localctx, 1);
				{
				setState(170);
				_la = _input.LA(1);
				if ( !(_la==2 || _la==13) ) {
				_errHandler.recoverInline(this);
				}
				consume();
				}
				break;
			case INTEGER:
				_localctx = new LiteralNumericContext(_localctx);
				enterOuterAlt(_localctx, 2);
				{
				setState(171); integer();
				}
				break;
			case 9:
				_localctx = new LiteralNullContext(_localctx);
				enterOuterAlt(_localctx, 3);
				{
				setState(172); match(9);
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class IdentifierContext extends ParserRuleContext {
		public Name name;
		public TerminalNode IDENTIFIER() { return getToken(ExpressionParser.IDENTIFIER, 0); }
		public IdentifierContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_identifier; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterIdentifier(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitIdentifier(this);
		}
	}

	public final IdentifierContext identifier() throws RecognitionException {
		IdentifierContext _localctx = new IdentifierContext(_ctx, getState());
		enterRule(_localctx, 34, RULE_identifier);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(175); match(IDENTIFIER);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class IntegerContext extends ParserRuleContext {
		public BigInteger value;
		public TerminalNode INTEGER() { return getToken(ExpressionParser.INTEGER, 0); }
		public IntegerContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_integer; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).enterInteger(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ExpressionListener ) ((ExpressionListener)listener).exitInteger(this);
		}
	}

	public final IntegerContext integer() throws RecognitionException {
		IntegerContext _localctx = new IntegerContext(_ctx, getState());
		enterRule(_localctx, 36, RULE_integer);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(177); match(INTEGER);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
		switch (ruleIndex) {
		case 4: return booleanTerm_sempred((BooleanTermContext)_localctx, predIndex);

		case 5: return booleanFactor_sempred((BooleanFactorContext)_localctx, predIndex);

		case 10: return arithmethicTerm_sempred((ArithmethicTermContext)_localctx, predIndex);

		case 11: return arithmethicFactor_sempred((ArithmethicFactorContext)_localctx, predIndex);

		case 13: return arithmeticAtom_sempred((ArithmeticAtomContext)_localctx, predIndex);
		}
		return true;
	}
	private boolean booleanTerm_sempred(BooleanTermContext _localctx, int predIndex) {
		switch (predIndex) {
		case 0: return precpred(_ctx, 1);
		}
		return true;
	}
	private boolean arithmethicTerm_sempred(ArithmethicTermContext _localctx, int predIndex) {
		switch (predIndex) {
		case 2: return precpred(_ctx, 1);
		}
		return true;
	}
	private boolean arithmeticAtom_sempred(ArithmeticAtomContext _localctx, int predIndex) {
		switch (predIndex) {
		case 4: return precpred(_ctx, 3);

		case 5: return precpred(_ctx, 2);

		case 6: return precpred(_ctx, 1);
		}
		return true;
	}
	private boolean booleanFactor_sempred(BooleanFactorContext _localctx, int predIndex) {
		switch (predIndex) {
		case 1: return precpred(_ctx, 1);
		}
		return true;
	}
	private boolean arithmethicFactor_sempred(ArithmethicFactorContext _localctx, int predIndex) {
		switch (predIndex) {
		case 3: return precpred(_ctx, 1);
		}
		return true;
	}

	public static final String _serializedATN =
		"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3!\u00b6\4\2\t\2\4"+
		"\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+
		"\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
		"\4\23\t\23\4\24\t\24\3\2\7\2*\n\2\f\2\16\2-\13\2\3\3\3\3\3\3\3\3\3\3\3"+
		"\3\5\3\65\n\3\3\3\3\3\5\39\n\3\3\3\5\3<\n\3\3\4\3\4\5\4@\n\4\3\5\3\5\3"+
		"\6\3\6\3\6\3\6\3\6\3\6\7\6J\n\6\f\6\16\6M\13\6\3\7\3\7\3\7\3\7\3\7\3\7"+
		"\7\7U\n\7\f\7\16\7X\13\7\3\b\3\b\3\b\5\b]\n\b\3\t\3\t\5\ta\n\t\3\n\3\n"+
		"\3\n\3\n\3\13\3\13\3\f\3\f\3\f\3\f\3\f\3\f\7\fo\n\f\f\f\16\fr\13\f\3\r"+
		"\3\r\3\r\3\r\3\r\3\r\7\rz\n\r\f\r\16\r}\13\r\3\16\3\16\3\16\5\16\u0082"+
		"\n\16\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\5\17\u008c\n\17\3\17\3\17"+
		"\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\7\17\u0099\n\17\f\17\16"+
		"\17\u009c\13\17\3\20\3\20\3\20\5\20\u00a1\n\20\3\20\3\20\3\21\3\21\3\21"+
		"\7\21\u00a8\n\21\f\21\16\21\u00ab\13\21\3\22\3\22\3\22\5\22\u00b0\n\22"+
		"\3\23\3\23\3\24\3\24\3\24\2\7\n\f\26\30\34\25\2\4\6\b\n\f\16\20\22\24"+
		"\26\30\32\34\36 \"$&\2\6\6\2\6\6\n\n\22\24\27\27\3\2\33\34\5\2\3\3\r\r"+
		"\31\31\4\2\4\4\17\17\u00b9\2+\3\2\2\2\4;\3\2\2\2\6?\3\2\2\2\bA\3\2\2\2"+
		"\nC\3\2\2\2\fN\3\2\2\2\16\\\3\2\2\2\20`\3\2\2\2\22b\3\2\2\2\24f\3\2\2"+
		"\2\26h\3\2\2\2\30s\3\2\2\2\32\u0081\3\2\2\2\34\u008b\3\2\2\2\36\u009d"+
		"\3\2\2\2 \u00a4\3\2\2\2\"\u00af\3\2\2\2$\u00b1\3\2\2\2&\u00b3\3\2\2\2"+
		"(*\5\4\3\2)(\3\2\2\2*-\3\2\2\2+)\3\2\2\2+,\3\2\2\2,\3\3\2\2\2-+\3\2\2"+
		"\2./\7\26\2\2/\60\5\b\5\2\60\61\7\b\2\2\61<\3\2\2\2\62\64\7\5\2\2\63\65"+
		"\5\6\4\2\64\63\3\2\2\2\64\65\3\2\2\2\65\66\3\2\2\2\66<\7\b\2\2\679\5\6"+
		"\4\28\67\3\2\2\289\3\2\2\29:\3\2\2\2:<\7\b\2\2;.\3\2\2\2;\62\3\2\2\2;"+
		"8\3\2\2\2<\5\3\2\2\2=@\5\b\5\2>@\5\24\13\2?=\3\2\2\2?>\3\2\2\2@\7\3\2"+
		"\2\2AB\5\n\6\2B\t\3\2\2\2CD\b\6\1\2DE\5\f\7\2EK\3\2\2\2FG\f\3\2\2GH\7"+
		"\7\2\2HJ\5\f\7\2IF\3\2\2\2JM\3\2\2\2KI\3\2\2\2KL\3\2\2\2L\13\3\2\2\2M"+
		"K\3\2\2\2NO\b\7\1\2OP\5\16\b\2PV\3\2\2\2QR\f\3\2\2RS\7\t\2\2SU\5\16\b"+
		"\2TQ\3\2\2\2UX\3\2\2\2VT\3\2\2\2VW\3\2\2\2W\r\3\2\2\2XV\3\2\2\2Y]\5\20"+
		"\t\2Z[\7\30\2\2[]\5\16\b\2\\Y\3\2\2\2\\Z\3\2\2\2]\17\3\2\2\2^a\5\34\17"+
		"\2_a\5\22\n\2`^\3\2\2\2`_\3\2\2\2a\21\3\2\2\2bc\5\24\13\2cd\t\2\2\2de"+
		"\5\24\13\2e\23\3\2\2\2fg\5\26\f\2g\25\3\2\2\2hi\b\f\1\2ij\5\30\r\2jp\3"+
		"\2\2\2kl\f\3\2\2lm\t\3\2\2mo\5\30\r\2nk\3\2\2\2or\3\2\2\2pn\3\2\2\2pq"+
		"\3\2\2\2q\27\3\2\2\2rp\3\2\2\2st\b\r\1\2tu\5\32\16\2u{\3\2\2\2vw\f\3\2"+
		"\2wx\t\4\2\2xz\5\32\16\2yv\3\2\2\2z}\3\2\2\2{y\3\2\2\2{|\3\2\2\2|\31\3"+
		"\2\2\2}{\3\2\2\2~\u0082\5\34\17\2\177\u0080\t\3\2\2\u0080\u0082\5\32\16"+
		"\2\u0081~\3\2\2\2\u0081\177\3\2\2\2\u0082\33\3\2\2\2\u0083\u0084\b\17"+
		"\1\2\u0084\u008c\5\"\22\2\u0085\u008c\5$\23\2\u0086\u008c\5\36\20\2\u0087"+
		"\u0088\7\f\2\2\u0088\u0089\5\6\4\2\u0089\u008a\7\32\2\2\u008a\u008c\3"+
		"\2\2\2\u008b\u0083\3\2\2\2\u008b\u0085\3\2\2\2\u008b\u0086\3\2\2\2\u008b"+
		"\u0087\3\2\2\2\u008c\u009a\3\2\2\2\u008d\u008e\f\5\2\2\u008e\u008f\7\20"+
		"\2\2\u008f\u0099\5$\23\2\u0090\u0091\f\4\2\2\u0091\u0092\7\20\2\2\u0092"+
		"\u0099\5\36\20\2\u0093\u0094\f\3\2\2\u0094\u0095\7\21\2\2\u0095\u0096"+
		"\5\24\13\2\u0096\u0097\7\25\2\2\u0097\u0099\3\2\2\2\u0098\u008d\3\2\2"+
		"\2\u0098\u0090\3\2\2\2\u0098\u0093\3\2\2\2\u0099\u009c\3\2\2\2\u009a\u0098"+
		"\3\2\2\2\u009a\u009b\3\2\2\2\u009b\35\3\2\2\2\u009c\u009a\3\2\2\2\u009d"+
		"\u009e\5$\23\2\u009e\u00a0\7\f\2\2\u009f\u00a1\5 \21\2\u00a0\u009f\3\2"+
		"\2\2\u00a0\u00a1\3\2\2\2\u00a1\u00a2\3\2\2\2\u00a2\u00a3\7\32\2\2\u00a3"+
		"\37\3\2\2\2\u00a4\u00a9\5\6\4\2\u00a5\u00a6\7\16\2\2\u00a6\u00a8\5\6\4"+
		"\2\u00a7\u00a5\3\2\2\2\u00a8\u00ab\3\2\2\2\u00a9\u00a7\3\2\2\2\u00a9\u00aa"+
		"\3\2\2\2\u00aa!\3\2\2\2\u00ab\u00a9\3\2\2\2\u00ac\u00b0\t\5\2\2\u00ad"+
		"\u00b0\5&\24\2\u00ae\u00b0\7\13\2\2\u00af\u00ac\3\2\2\2\u00af\u00ad\3"+
		"\2\2\2\u00af\u00ae\3\2\2\2\u00b0#\3\2\2\2\u00b1\u00b2\7\36\2\2\u00b2%"+
		"\3\2\2\2\u00b3\u00b4\7\35\2\2\u00b4\'\3\2\2\2\24+\648;?KV\\`p{\u0081\u008b"+
		"\u0098\u009a\u00a0\u00a9\u00af";
	public static final ATN _ATN =
		new ATNDeserializer().deserialize(_serializedATN.toCharArray());
	static {
		_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
		for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
			_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy