
org.graphwalker.dsl.yed.YEdEdgeParser Maven / Gradle / Ivy
// Generated from org/graphwalker/dsl/yed/YEdEdgeParser.g4 by ANTLR 4.5
package org.graphwalker.dsl.yed;
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 YEdEdgeParser extends Parser {
static { RuntimeMetaData.checkVersion("4.5", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
DOT=1, SLASH=2, COLON=3, SEMICOLON=4, COMMA=5, ASSIGN=6, BLOCKED=7, SHARED=8,
INIT=9, START=10, REQTAG=11, WEIGHT=12, NestedBrackets=13, Identifier=14,
String=15, Value=16, COMMENT=17, LINE_COMMENT=18, WHITESPACE=19, ANY=20;
public static final int
RULE_parse = 0, RULE_field = 1, RULE_actions = 2, RULE_action = 3, RULE_reqtags = 4,
RULE_reqtagList = 5, RULE_reqtag = 6, RULE_guard = 7, RULE_blocked = 8,
RULE_names = 9, RULE_name = 10, RULE_weight = 11;
public static final String[] ruleNames = {
"parse", "field", "actions", "action", "reqtags", "reqtagList", "reqtag",
"guard", "blocked", "names", "name", "weight"
};
private static final String[] _LITERAL_NAMES = {
null, "'.'", "'/'", "':'", "';'", "','", "'='", "'BLOCKED'", "'SHARED'",
"'INIT'", null, "'REQTAG'"
};
private static final String[] _SYMBOLIC_NAMES = {
null, "DOT", "SLASH", "COLON", "SEMICOLON", "COMMA", "ASSIGN", "BLOCKED",
"SHARED", "INIT", "START", "REQTAG", "WEIGHT", "NestedBrackets", "Identifier",
"String", "Value", "COMMENT", "LINE_COMMENT", "WHITESPACE", "ANY"
};
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 "YEdEdgeParser.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public ATN getATN() { return _ATN; }
public YEdEdgeParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
public static class ParseContext extends ParserRuleContext {
public java.util.Set fields = new java.util.HashSet();;
public TerminalNode EOF() { return getToken(YEdEdgeParser.EOF, 0); }
public List field() {
return getRuleContexts(FieldContext.class);
}
public FieldContext field(int i) {
return getRuleContext(FieldContext.class,i);
}
public ParseContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parse; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).enterParse(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).exitParse(this);
}
}
public final ParseContext parse() throws RecognitionException {
ParseContext _localctx = new ParseContext(_ctx, getState());
enterRule(_localctx, 0, RULE_parse);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(27);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,0,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(24);
field();
}
}
}
setState(29);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,0,_ctx);
}
setState(30);
match(EOF);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class FieldContext extends ParserRuleContext {
public NamesContext names() {
return getRuleContext(NamesContext.class,0);
}
public GuardContext guard() {
return getRuleContext(GuardContext.class,0);
}
public ActionsContext actions() {
return getRuleContext(ActionsContext.class,0);
}
public BlockedContext blocked() {
return getRuleContext(BlockedContext.class,0);
}
public ReqtagsContext reqtags() {
return getRuleContext(ReqtagsContext.class,0);
}
public WeightContext weight() {
return getRuleContext(WeightContext.class,0);
}
public TerminalNode WHITESPACE() { return getToken(YEdEdgeParser.WHITESPACE, 0); }
public FieldContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_field; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).enterField(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).exitField(this);
}
}
public final FieldContext field() throws RecognitionException {
FieldContext _localctx = new FieldContext(_ctx, getState());
enterRule(_localctx, 2, RULE_field);
try {
setState(57);
switch ( getInterpreter().adaptivePredict(_input,1,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(32);
if (!(!((ParseContext)getInvokingContext(0)).fields.contains("names"))) throw new FailedPredicateException(this, "!$parse::fields.contains(\"names\")");
setState(33);
names();
((ParseContext)getInvokingContext(0)).fields.add("names");
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(36);
if (!(!((ParseContext)getInvokingContext(0)).fields.contains("guard"))) throw new FailedPredicateException(this, "!$parse::fields.contains(\"guard\")");
setState(37);
guard();
((ParseContext)getInvokingContext(0)).fields.add("guard");
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(40);
if (!(!((ParseContext)getInvokingContext(0)).fields.contains("actions"))) throw new FailedPredicateException(this, "!$parse::fields.contains(\"actions\")");
setState(41);
actions();
((ParseContext)getInvokingContext(0)).fields.add("actions");
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(44);
if (!(!((ParseContext)getInvokingContext(0)).fields.contains("blocked"))) throw new FailedPredicateException(this, "!$parse::fields.contains(\"blocked\")");
setState(45);
blocked();
((ParseContext)getInvokingContext(0)).fields.add("blocked");
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(48);
if (!(!((ParseContext)getInvokingContext(0)).fields.contains("reqtags"))) throw new FailedPredicateException(this, "!$parse::fields.contains(\"reqtags\")");
setState(49);
reqtags();
((ParseContext)getInvokingContext(0)).fields.add("reqtags");
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(52);
if (!(!((ParseContext)getInvokingContext(0)).fields.contains("weight"))) throw new FailedPredicateException(this, "!$parse::fields.contains(\"weight\")");
setState(53);
weight();
((ParseContext)getInvokingContext(0)).fields.add("weight");
}
break;
case 7:
enterOuterAlt(_localctx, 7);
{
setState(56);
match(WHITESPACE);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ActionsContext extends ParserRuleContext {
public TerminalNode SLASH() { return getToken(YEdEdgeParser.SLASH, 0); }
public List action() {
return getRuleContexts(ActionContext.class);
}
public ActionContext action(int i) {
return getRuleContext(ActionContext.class,i);
}
public ActionsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_actions; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).enterActions(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).exitActions(this);
}
}
public final ActionsContext actions() throws RecognitionException {
ActionsContext _localctx = new ActionsContext(_ctx, getState());
enterRule(_localctx, 4, RULE_actions);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(59);
match(SLASH);
setState(61);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(60);
action();
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(63);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,2,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ActionContext extends ParserRuleContext {
public List SEMICOLON() { return getTokens(YEdEdgeParser.SEMICOLON); }
public TerminalNode SEMICOLON(int i) {
return getToken(YEdEdgeParser.SEMICOLON, i);
}
public ActionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_action; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).enterAction(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).exitAction(this);
}
}
public final ActionContext action() throws RecognitionException {
ActionContext _localctx = new ActionContext(_ctx, getState());
enterRule(_localctx, 6, RULE_action);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(66);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(65);
_la = _input.LA(1);
if ( _la <= 0 || (_la==SEMICOLON) ) {
_errHandler.recoverInline(this);
} else {
consume();
}
}
}
setState(68);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << DOT) | (1L << SLASH) | (1L << COLON) | (1L << COMMA) | (1L << ASSIGN) | (1L << BLOCKED) | (1L << SHARED) | (1L << INIT) | (1L << START) | (1L << REQTAG) | (1L << WEIGHT) | (1L << NestedBrackets) | (1L << Identifier) | (1L << String) | (1L << Value) | (1L << COMMENT) | (1L << LINE_COMMENT) | (1L << WHITESPACE) | (1L << ANY))) != 0) );
setState(70);
match(SEMICOLON);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ReqtagsContext extends ParserRuleContext {
public TerminalNode REQTAG() { return getToken(YEdEdgeParser.REQTAG, 0); }
public ReqtagListContext reqtagList() {
return getRuleContext(ReqtagListContext.class,0);
}
public TerminalNode COLON() { return getToken(YEdEdgeParser.COLON, 0); }
public TerminalNode ASSIGN() { return getToken(YEdEdgeParser.ASSIGN, 0); }
public List WHITESPACE() { return getTokens(YEdEdgeParser.WHITESPACE); }
public TerminalNode WHITESPACE(int i) {
return getToken(YEdEdgeParser.WHITESPACE, i);
}
public ReqtagsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_reqtags; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).enterReqtags(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).exitReqtags(this);
}
}
public final ReqtagsContext reqtags() throws RecognitionException {
ReqtagsContext _localctx = new ReqtagsContext(_ctx, getState());
enterRule(_localctx, 8, RULE_reqtags);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(72);
match(REQTAG);
setState(76);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==WHITESPACE) {
{
{
setState(73);
match(WHITESPACE);
}
}
setState(78);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(79);
_la = _input.LA(1);
if ( !(_la==COLON || _la==ASSIGN) ) {
_errHandler.recoverInline(this);
} else {
consume();
}
setState(83);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,5,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(80);
match(WHITESPACE);
}
}
}
setState(85);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,5,_ctx);
}
setState(86);
reqtagList();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ReqtagListContext extends ParserRuleContext {
public List reqtag() {
return getRuleContexts(ReqtagContext.class);
}
public ReqtagContext reqtag(int i) {
return getRuleContext(ReqtagContext.class,i);
}
public List COMMA() { return getTokens(YEdEdgeParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(YEdEdgeParser.COMMA, i);
}
public List WHITESPACE() { return getTokens(YEdEdgeParser.WHITESPACE); }
public TerminalNode WHITESPACE(int i) {
return getToken(YEdEdgeParser.WHITESPACE, i);
}
public ReqtagListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_reqtagList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).enterReqtagList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).exitReqtagList(this);
}
}
public final ReqtagListContext reqtagList() throws RecognitionException {
ReqtagListContext _localctx = new ReqtagListContext(_ctx, getState());
enterRule(_localctx, 10, RULE_reqtagList);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(104);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,8,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(88);
reqtag();
setState(92);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==WHITESPACE) {
{
{
setState(89);
match(WHITESPACE);
}
}
setState(94);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(95);
match(COMMA);
setState(99);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,7,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(96);
match(WHITESPACE);
}
}
}
setState(101);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,7,_ctx);
}
}
}
}
setState(106);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,8,_ctx);
}
setState(107);
reqtag();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ReqtagContext extends ParserRuleContext {
public List COMMA() { return getTokens(YEdEdgeParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(YEdEdgeParser.COMMA, i);
}
public ReqtagContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_reqtag; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).enterReqtag(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).exitReqtag(this);
}
}
public final ReqtagContext reqtag() throws RecognitionException {
ReqtagContext _localctx = new ReqtagContext(_ctx, getState());
enterRule(_localctx, 12, RULE_reqtag);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(110);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(109);
_la = _input.LA(1);
if ( _la <= 0 || (_la==COMMA) ) {
_errHandler.recoverInline(this);
} else {
consume();
}
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(112);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,9,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class GuardContext extends ParserRuleContext {
public TerminalNode NestedBrackets() { return getToken(YEdEdgeParser.NestedBrackets, 0); }
public GuardContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_guard; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).enterGuard(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).exitGuard(this);
}
}
public final GuardContext guard() throws RecognitionException {
GuardContext _localctx = new GuardContext(_ctx, getState());
enterRule(_localctx, 14, RULE_guard);
try {
enterOuterAlt(_localctx, 1);
{
setState(114);
match(NestedBrackets);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class BlockedContext extends ParserRuleContext {
public TerminalNode BLOCKED() { return getToken(YEdEdgeParser.BLOCKED, 0); }
public BlockedContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_blocked; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).enterBlocked(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).exitBlocked(this);
}
}
public final BlockedContext blocked() throws RecognitionException {
BlockedContext _localctx = new BlockedContext(_ctx, getState());
enterRule(_localctx, 16, RULE_blocked);
try {
enterOuterAlt(_localctx, 1);
{
setState(116);
match(BLOCKED);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class NamesContext extends ParserRuleContext {
public List name() {
return getRuleContexts(NameContext.class);
}
public NameContext name(int i) {
return getRuleContext(NameContext.class,i);
}
public List SEMICOLON() { return getTokens(YEdEdgeParser.SEMICOLON); }
public TerminalNode SEMICOLON(int i) {
return getToken(YEdEdgeParser.SEMICOLON, i);
}
public NamesContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_names; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).enterNames(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).exitNames(this);
}
}
public final NamesContext names() throws RecognitionException {
NamesContext _localctx = new NamesContext(_ctx, getState());
enterRule(_localctx, 18, RULE_names);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(118);
name();
setState(123);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,10,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(119);
match(SEMICOLON);
setState(120);
name();
}
}
}
setState(125);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,10,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class NameContext extends ParserRuleContext {
public List Identifier() { return getTokens(YEdEdgeParser.Identifier); }
public TerminalNode Identifier(int i) {
return getToken(YEdEdgeParser.Identifier, i);
}
public List DOT() { return getTokens(YEdEdgeParser.DOT); }
public TerminalNode DOT(int i) {
return getToken(YEdEdgeParser.DOT, i);
}
public NameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_name; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).enterName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).exitName(this);
}
}
public final NameContext name() throws RecognitionException {
NameContext _localctx = new NameContext(_ctx, getState());
enterRule(_localctx, 20, RULE_name);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(126);
match(Identifier);
setState(131);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,11,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(127);
match(DOT);
setState(128);
match(Identifier);
}
}
}
setState(133);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,11,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class WeightContext extends ParserRuleContext {
public TerminalNode WEIGHT() { return getToken(YEdEdgeParser.WEIGHT, 0); }
public TerminalNode ASSIGN() { return getToken(YEdEdgeParser.ASSIGN, 0); }
public TerminalNode Value() { return getToken(YEdEdgeParser.Value, 0); }
public List WHITESPACE() { return getTokens(YEdEdgeParser.WHITESPACE); }
public TerminalNode WHITESPACE(int i) {
return getToken(YEdEdgeParser.WHITESPACE, i);
}
public WeightContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_weight; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).enterWeight(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof YEdEdgeParserListener ) ((YEdEdgeParserListener)listener).exitWeight(this);
}
}
public final WeightContext weight() throws RecognitionException {
WeightContext _localctx = new WeightContext(_ctx, getState());
enterRule(_localctx, 22, RULE_weight);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(134);
match(WEIGHT);
setState(138);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==WHITESPACE) {
{
{
setState(135);
match(WHITESPACE);
}
}
setState(140);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(141);
match(ASSIGN);
setState(145);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==WHITESPACE) {
{
{
setState(142);
match(WHITESPACE);
}
}
setState(147);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(148);
match(Value);
}
}
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 1:
return field_sempred((FieldContext)_localctx, predIndex);
}
return true;
}
private boolean field_sempred(FieldContext _localctx, int predIndex) {
switch (predIndex) {
case 0:
return !((ParseContext)getInvokingContext(0)).fields.contains("names");
case 1:
return !((ParseContext)getInvokingContext(0)).fields.contains("guard");
case 2:
return !((ParseContext)getInvokingContext(0)).fields.contains("actions");
case 3:
return !((ParseContext)getInvokingContext(0)).fields.contains("blocked");
case 4:
return !((ParseContext)getInvokingContext(0)).fields.contains("reqtags");
case 5:
return !((ParseContext)getInvokingContext(0)).fields.contains("weight");
}
return true;
}
public static final String _serializedATN =
"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\26\u0099\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\3\2\7\2\34\n\2\f\2\16\2\37\13\2\3\2\3\2\3\3\3\3"+
"\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3"+
"\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u0084\u0087\3\2\2\2"+
"\u0085\u0083\3\2\2\2\u0085\u0086\3\2\2\2\u0086\27\3\2\2\2\u0087\u0085"+
"\3\2\2\2\u0088\u008c\7\16\2\2\u0089\u008b\7\25\2\2\u008a\u0089\3\2\2\2"+
"\u008b\u008e\3\2\2\2\u008c\u008a\3\2\2\2\u008c\u008d\3\2\2\2\u008d\u008f"+
"\3\2\2\2\u008e\u008c\3\2\2\2\u008f\u0093\7\b\2\2\u0090\u0092\7\25\2\2"+
"\u0091\u0090\3\2\2\2\u0092\u0095\3\2\2\2\u0093\u0091\3\2\2\2\u0093\u0094"+
"\3\2\2\2\u0094\u0096\3\2\2\2\u0095\u0093\3\2\2\2\u0096\u0097\7\22\2\2"+
"\u0097\31\3\2\2\2\20\35;AFNU^ejr}\u0085\u008c\u0093";
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 - 2025 Weber Informatics LLC | Privacy Policy