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

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

// Generated from com/neotys/neoload/model/v3/binding/serializer/sla/SlaThreshold.g4 by ANTLR 4.7.1
package com.neotys.neoload.model.v3.binding.serializer.sla;
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 SlaThresholdParser 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, T__23=24, 
		T__24=25, T__25=26, T__26=27, T__27=28, INTEGER=29, DOUBLE=30, WHITESPACE=31;
	public static final int
		RULE_threshold = 0, RULE_kpi = 1, RULE_percentile = 2, RULE_condition = 3, 
		RULE_severity = 4, RULE_operator = 5, RULE_value = 6, RULE_unit = 7, RULE_scope = 8;
	public static final String[] ruleNames = {
		"threshold", "kpi", "percentile", "condition", "severity", "operator", 
		"value", "unit", "scope"
	};

	private static final String[] _LITERAL_NAMES = {
		null, "'avg-elt-per-sec'", "'avg-page-resp-time'", "'avg-request-per-sec'", 
		"'avg-request-resp-time'", "'avg-resp-time'", "'avg-throughput-per-sec'", 
		"'avg-transaction-resp-time'", "'count'", "'error-rate'", "'errors-per-sec'", 
		"'errors-count'", "'perc-transaction-resp-time'", "'throughput'", "'(p'", 
		"')'", "'warn'", "'fail'", "'<='", "'>='", "'=='", "'ms'", "'s'", "'Mbps'", 
		"'MB'", "'%'", "'/s'", "'per test'", "'per interval'"
	};
	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, 
		null, null, null, null, null, "INTEGER", "DOUBLE", "WHITESPACE"
	};
	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 "SlaThreshold.g4"; }

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

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

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

	public SlaThresholdParser(TokenStream input) {
		super(input);
		_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
	}
	public static class ThresholdContext extends ParserRuleContext {
		public KpiContext kpi() {
			return getRuleContext(KpiContext.class,0);
		}
		public List condition() {
			return getRuleContexts(ConditionContext.class);
		}
		public ConditionContext condition(int i) {
			return getRuleContext(ConditionContext.class,i);
		}
		public TerminalNode EOF() { return getToken(SlaThresholdParser.EOF, 0); }
		public PercentileContext percentile() {
			return getRuleContext(PercentileContext.class,0);
		}
		public ScopeContext scope() {
			return getRuleContext(ScopeContext.class,0);
		}
		public ThresholdContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_threshold; }
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof SlaThresholdVisitor ) return ((SlaThresholdVisitor)visitor).visitThreshold(this);
			else return visitor.visitChildren(this);
		}
	}

	public final ThresholdContext threshold() throws RecognitionException {
		ThresholdContext _localctx = new ThresholdContext(_ctx, getState());
		enterRule(_localctx, 0, RULE_threshold);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(18);
			kpi();
			setState(20);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==T__13) {
				{
				setState(19);
				percentile();
				}
			}

			setState(22);
			condition();
			setState(24);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==T__15 || _la==T__16) {
				{
				setState(23);
				condition();
				}
			}

			setState(27);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==T__26 || _la==T__27) {
				{
				setState(26);
				scope();
				}
			}

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

	public static class KpiContext extends ParserRuleContext {
		public KpiContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_kpi; }
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof SlaThresholdVisitor ) return ((SlaThresholdVisitor)visitor).visitKpi(this);
			else return visitor.visitChildren(this);
		}
	}

	public final KpiContext kpi() throws RecognitionException {
		KpiContext _localctx = new KpiContext(_ctx, getState());
		enterRule(_localctx, 2, RULE_kpi);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(31);
			_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))) != 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 PercentileContext extends ParserRuleContext {
		public TerminalNode INTEGER() { return getToken(SlaThresholdParser.INTEGER, 0); }
		public PercentileContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_percentile; }
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof SlaThresholdVisitor ) return ((SlaThresholdVisitor)visitor).visitPercentile(this);
			else return visitor.visitChildren(this);
		}
	}

	public final PercentileContext percentile() throws RecognitionException {
		PercentileContext _localctx = new PercentileContext(_ctx, getState());
		enterRule(_localctx, 4, RULE_percentile);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(33);
			match(T__13);
			setState(34);
			match(INTEGER);
			setState(35);
			match(T__14);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ConditionContext extends ParserRuleContext {
		public SeverityContext severity() {
			return getRuleContext(SeverityContext.class,0);
		}
		public OperatorContext operator() {
			return getRuleContext(OperatorContext.class,0);
		}
		public ValueContext value() {
			return getRuleContext(ValueContext.class,0);
		}
		public UnitContext unit() {
			return getRuleContext(UnitContext.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 SlaThresholdVisitor ) return ((SlaThresholdVisitor)visitor).visitCondition(this);
			else return visitor.visitChildren(this);
		}
	}

	public final ConditionContext condition() throws RecognitionException {
		ConditionContext _localctx = new ConditionContext(_ctx, getState());
		enterRule(_localctx, 6, RULE_condition);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(37);
			severity();
			setState(38);
			operator();
			setState(39);
			value();
			setState(41);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25))) != 0)) {
				{
				setState(40);
				unit();
				}
			}

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

	public static class SeverityContext extends ParserRuleContext {
		public SeverityContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_severity; }
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof SlaThresholdVisitor ) return ((SlaThresholdVisitor)visitor).visitSeverity(this);
			else return visitor.visitChildren(this);
		}
	}

	public final SeverityContext severity() throws RecognitionException {
		SeverityContext _localctx = new SeverityContext(_ctx, getState());
		enterRule(_localctx, 8, RULE_severity);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(43);
			_la = _input.LA(1);
			if ( !(_la==T__15 || _la==T__16) ) {
			_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 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 SlaThresholdVisitor ) return ((SlaThresholdVisitor)visitor).visitOperator(this);
			else return visitor.visitChildren(this);
		}
	}

	public final OperatorContext operator() throws RecognitionException {
		OperatorContext _localctx = new OperatorContext(_ctx, getState());
		enterRule(_localctx, 10, RULE_operator);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(45);
			_la = _input.LA(1);
			if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__17) | (1L << T__18) | (1L << T__19))) != 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 ValueContext extends ParserRuleContext {
		public TerminalNode INTEGER() { return getToken(SlaThresholdParser.INTEGER, 0); }
		public TerminalNode DOUBLE() { return getToken(SlaThresholdParser.DOUBLE, 0); }
		public ValueContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_value; }
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof SlaThresholdVisitor ) return ((SlaThresholdVisitor)visitor).visitValue(this);
			else return visitor.visitChildren(this);
		}
	}

	public final ValueContext value() throws RecognitionException {
		ValueContext _localctx = new ValueContext(_ctx, getState());
		enterRule(_localctx, 12, RULE_value);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(47);
			_la = _input.LA(1);
			if ( !(_la==INTEGER || _la==DOUBLE) ) {
			_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 UnitContext extends ParserRuleContext {
		public UnitContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_unit; }
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof SlaThresholdVisitor ) return ((SlaThresholdVisitor)visitor).visitUnit(this);
			else return visitor.visitChildren(this);
		}
	}

	public final UnitContext unit() throws RecognitionException {
		UnitContext _localctx = new UnitContext(_ctx, getState());
		enterRule(_localctx, 14, RULE_unit);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(49);
			_la = _input.LA(1);
			if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25))) != 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 ScopeContext extends ParserRuleContext {
		public ScopeContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_scope; }
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof SlaThresholdVisitor ) return ((SlaThresholdVisitor)visitor).visitScope(this);
			else return visitor.visitChildren(this);
		}
	}

	public final ScopeContext scope() throws RecognitionException {
		ScopeContext _localctx = new ScopeContext(_ctx, getState());
		enterRule(_localctx, 16, RULE_scope);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(51);
			_la = _input.LA(1);
			if ( !(_la==T__26 || _la==T__27) ) {
			_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 final String _serializedATN =
		"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3!8\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\3\2\3\2\5\2\27"+
		"\n\2\3\2\3\2\5\2\33\n\2\3\2\5\2\36\n\2\3\2\3\2\3\3\3\3\3\4\3\4\3\4\3\4"+
		"\3\5\3\5\3\5\3\5\5\5,\n\5\3\6\3\6\3\7\3\7\3\b\3\b\3\t\3\t\3\n\3\n\3\n"+
		"\2\2\13\2\4\6\b\n\f\16\20\22\2\b\3\2\3\17\3\2\22\23\3\2\24\26\3\2\37 "+
		"\3\2\27\34\3\2\35\36\2\62\2\24\3\2\2\2\4!\3\2\2\2\6#\3\2\2\2\b\'\3\2\2"+
		"\2\n-\3\2\2\2\f/\3\2\2\2\16\61\3\2\2\2\20\63\3\2\2\2\22\65\3\2\2\2\24"+
		"\26\5\4\3\2\25\27\5\6\4\2\26\25\3\2\2\2\26\27\3\2\2\2\27\30\3\2\2\2\30"+
		"\32\5\b\5\2\31\33\5\b\5\2\32\31\3\2\2\2\32\33\3\2\2\2\33\35\3\2\2\2\34"+
		"\36\5\22\n\2\35\34\3\2\2\2\35\36\3\2\2\2\36\37\3\2\2\2\37 \7\2\2\3 \3"+
		"\3\2\2\2!\"\t\2\2\2\"\5\3\2\2\2#$\7\20\2\2$%\7\37\2\2%&\7\21\2\2&\7\3"+
		"\2\2\2\'(\5\n\6\2()\5\f\7\2)+\5\16\b\2*,\5\20\t\2+*\3\2\2\2+,\3\2\2\2"+
		",\t\3\2\2\2-.\t\3\2\2.\13\3\2\2\2/\60\t\4\2\2\60\r\3\2\2\2\61\62\t\5\2"+
		"\2\62\17\3\2\2\2\63\64\t\6\2\2\64\21\3\2\2\2\65\66\t\7\2\2\66\23\3\2\2"+
		"\2\6\26\32\35+";
	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