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

com.neotys.neoload.model.v3.binding.serializer.ConditionParser Maven / Gradle / Ivy

// Generated from com/neotys/neoload/model/v3/binding/serializer/Condition.g4 by ANTLR 4.7.1
package com.neotys.neoload.model.v3.binding.serializer;
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 ConditionParser extends Parser {
	static { RuntimeMetaData.checkVersion("4.7.1", RuntimeMetaData.VERSION); }

	protected static final DFA[] _decisionToDFA;
	protected static final PredictionContextCache _sharedContextCache =
		new PredictionContextCache();
	public static final int
		T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9, 
		T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17, 
		T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, WHITE_SPACE=24, 
		STRING=25, WORD=26, ESC_CHAR=27, SINGLE_QUOTE_STRING=28, DOUBLE_QUOTE_STRING=29;
	public static final int
		RULE_condition = 0, RULE_operator = 1, RULE_operand1 = 2, RULE_operand2 = 3;
	public static final String[] ruleNames = {
		"condition", "operator", "operand1", "operand2"
	};

	private static final String[] _LITERAL_NAMES = {
		null, "'equals'", "'=='", "'not_equals'", "'!='", "'contains'", "'not_contains'", 
		"'starts_with'", "'not_starts_with'", "'ends_with'", "'not_ends_with'", 
		"'match_regexp'", "'not_match_regexp'", "'greater'", "'>'", "'greater_equal'", 
		"'>='", "'less'", "'<'", "'less_equal'", "'<='", "'exists'", "'not_exists'", 
		"'find_regexp'", "' '"
	};
	private static final String[] _SYMBOLIC_NAMES = {
		null, null, null, null, null, null, null, null, null, null, null, null, 
		null, null, null, null, null, null, null, null, null, null, null, null, 
		"WHITE_SPACE", "STRING", "WORD", "ESC_CHAR", "SINGLE_QUOTE_STRING", "DOUBLE_QUOTE_STRING"
	};
	public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);

	/**
	 * @deprecated Use {@link #VOCABULARY} instead.
	 */
	@Deprecated
	public static final String[] tokenNames;
	static {
		tokenNames = new String[_SYMBOLIC_NAMES.length];
		for (int i = 0; i < tokenNames.length; i++) {
			tokenNames[i] = VOCABULARY.getLiteralName(i);
			if (tokenNames[i] == null) {
				tokenNames[i] = VOCABULARY.getSymbolicName(i);
			}

			if (tokenNames[i] == null) {
				tokenNames[i] = "";
			}
		}
	}

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

	@Override

	public Vocabulary getVocabulary() {
		return VOCABULARY;
	}

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

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

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

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

	public ConditionParser(TokenStream input) {
		super(input);
		_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
	}
	public static class ConditionContext extends ParserRuleContext {
		public Operand1Context operand1() {
			return getRuleContext(Operand1Context.class,0);
		}
		public OperatorContext operator() {
			return getRuleContext(OperatorContext.class,0);
		}
		public Operand2Context operand2() {
			return getRuleContext(Operand2Context.class,0);
		}
		public ConditionContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_condition; }
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof ConditionVisitor ) return ((ConditionVisitor)visitor).visitCondition(this);
			else return visitor.visitChildren(this);
		}
	}

	public final ConditionContext condition() throws RecognitionException {
		ConditionContext _localctx = new ConditionContext(_ctx, getState());
		enterRule(_localctx, 0, RULE_condition);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(8);
			operand1();
			setState(9);
			operator();
			setState(11);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==STRING) {
				{
				setState(10);
				operand2();
				}
			}

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

	public static class OperatorContext extends ParserRuleContext {
		public OperatorContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_operator; }
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof ConditionVisitor ) return ((ConditionVisitor)visitor).visitOperator(this);
			else return visitor.visitChildren(this);
		}
	}

	public final OperatorContext operator() throws RecognitionException {
		OperatorContext _localctx = new OperatorContext(_ctx, getState());
		enterRule(_localctx, 2, RULE_operator);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(13);
			_la = _input.LA(1);
			if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__1) | (1L << T__2) | (1L << T__3) | (1L << T__4) | (1L << T__5) | (1L << T__6) | (1L << T__7) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__15) | (1L << T__16) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22))) != 0)) ) {
			_errHandler.recoverInline(this);
			}
			else {
				if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
				_errHandler.reportMatch(this);
				consume();
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Operand1Context extends ParserRuleContext {
		public TerminalNode STRING() { return getToken(ConditionParser.STRING, 0); }
		public Operand1Context(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_operand1; }
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof ConditionVisitor ) return ((ConditionVisitor)visitor).visitOperand1(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Operand1Context operand1() throws RecognitionException {
		Operand1Context _localctx = new Operand1Context(_ctx, getState());
		enterRule(_localctx, 4, RULE_operand1);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(15);
			match(STRING);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Operand2Context extends ParserRuleContext {
		public TerminalNode STRING() { return getToken(ConditionParser.STRING, 0); }
		public Operand2Context(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_operand2; }
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof ConditionVisitor ) return ((ConditionVisitor)visitor).visitOperand2(this);
			else return visitor.visitChildren(this);
		}
	}

	public final Operand2Context operand2() throws RecognitionException {
		Operand2Context _localctx = new Operand2Context(_ctx, getState());
		enterRule(_localctx, 6, RULE_operand2);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(17);
			match(STRING);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static final String _serializedATN =
		"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\37\26\4\2\t\2\4\3"+
		"\t\3\4\4\t\4\4\5\t\5\3\2\3\2\3\2\5\2\16\n\2\3\3\3\3\3\4\3\4\3\5\3\5\3"+
		"\5\2\2\6\2\4\6\b\2\3\3\2\3\31\2\22\2\n\3\2\2\2\4\17\3\2\2\2\6\21\3\2\2"+
		"\2\b\23\3\2\2\2\n\13\5\6\4\2\13\r\5\4\3\2\f\16\5\b\5\2\r\f\3\2\2\2\r\16"+
		"\3\2\2\2\16\3\3\2\2\2\17\20\t\2\2\2\20\5\3\2\2\2\21\22\7\33\2\2\22\7\3"+
		"\2\2\2\23\24\7\33\2\2\24\t\3\2\2\2\3\r";
	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