org.antlr.v4.codegen.SourceGenTriggers Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of antlr4 Show documentation
Show all versions of antlr4 Show documentation
The ANTLR 4 grammar compiler.
// $ANTLR 3.5 org\\antlr\\v4\\codegen\\SourceGenTriggers.g 2014-02-08 10:59:30
package org.antlr.v4.codegen;
import org.antlr.v4.misc.Utils;
import org.antlr.v4.codegen.model.*;
import org.antlr.v4.codegen.model.decl.*;
import org.antlr.v4.tool.*;
import org.antlr.v4.tool.ast.*;
import java.util.Collections;
import java.util.Map;
import java.util.HashMap;
import org.antlr.runtime.*;
import org.antlr.runtime.tree.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
@SuppressWarnings("all")
public class SourceGenTriggers extends TreeParser {
public static final String[] tokenNames = new String[] {
"", "", "", "", "ACTION", "ACTION_CHAR_LITERAL",
"ACTION_ESC", "ACTION_STRING_LITERAL", "ARG_ACTION", "ARG_OR_CHARSET",
"ASSIGN", "AT", "CATCH", "COLON", "COLONCOLON", "COMMA", "COMMENT", "DOC_COMMENT",
"DOLLAR", "DOT", "ERRCHAR", "ESC_SEQ", "FINALLY", "FRAGMENT", "GRAMMAR",
"GT", "HEX_DIGIT", "ID", "IMPORT", "INT", "LEXER", "LEXER_CHAR_SET", "LOCALS",
"LPAREN", "LT", "MODE", "NESTED_ACTION", "NLCHARS", "NOT", "NameChar",
"NameStartChar", "OPTIONS", "OR", "PARSER", "PLUS", "PLUS_ASSIGN", "POUND",
"PRIVATE", "PROTECTED", "PUBLIC", "QUESTION", "RANGE", "RARROW", "RBRACE",
"RETURNS", "RPAREN", "RULE_REF", "SEMI", "SEMPRED", "SRC", "STAR", "STRING_LITERAL",
"SYNPRED", "THROWS", "TOKENS_SPEC", "TOKEN_REF", "TREE_GRAMMAR", "UNICODE_ESC",
"UnicodeBOM", "WS", "WSCHARS", "WSNLCHARS", "ALT", "ALTLIST", "ARG", "ARGLIST",
"BLOCK", "CHAR_RANGE", "CLOSURE", "COMBINED", "ELEMENT_OPTIONS", "EPSILON",
"INITACTION", "LABEL", "LEXER_ACTION_CALL", "LEXER_ALT_ACTION", "LIST",
"OPTIONAL", "POSITIVE_CLOSURE", "PREC_RULE", "RESULT", "RET", "RULE",
"RULEACTIONS", "RULEMODIFIERS", "RULES", "SET", "TEMPLATE", "WILDCARD"
};
public static final int EOF=-1;
public static final int ACTION=4;
public static final int ACTION_CHAR_LITERAL=5;
public static final int ACTION_ESC=6;
public static final int ACTION_STRING_LITERAL=7;
public static final int ARG_ACTION=8;
public static final int ARG_OR_CHARSET=9;
public static final int ASSIGN=10;
public static final int AT=11;
public static final int CATCH=12;
public static final int COLON=13;
public static final int COLONCOLON=14;
public static final int COMMA=15;
public static final int COMMENT=16;
public static final int DOC_COMMENT=17;
public static final int DOLLAR=18;
public static final int DOT=19;
public static final int ERRCHAR=20;
public static final int ESC_SEQ=21;
public static final int FINALLY=22;
public static final int FRAGMENT=23;
public static final int GRAMMAR=24;
public static final int GT=25;
public static final int HEX_DIGIT=26;
public static final int ID=27;
public static final int IMPORT=28;
public static final int INT=29;
public static final int LEXER=30;
public static final int LEXER_CHAR_SET=31;
public static final int LOCALS=32;
public static final int LPAREN=33;
public static final int LT=34;
public static final int MODE=35;
public static final int NESTED_ACTION=36;
public static final int NLCHARS=37;
public static final int NOT=38;
public static final int NameChar=39;
public static final int NameStartChar=40;
public static final int OPTIONS=41;
public static final int OR=42;
public static final int PARSER=43;
public static final int PLUS=44;
public static final int PLUS_ASSIGN=45;
public static final int POUND=46;
public static final int PRIVATE=47;
public static final int PROTECTED=48;
public static final int PUBLIC=49;
public static final int QUESTION=50;
public static final int RANGE=51;
public static final int RARROW=52;
public static final int RBRACE=53;
public static final int RETURNS=54;
public static final int RPAREN=55;
public static final int RULE_REF=56;
public static final int SEMI=57;
public static final int SEMPRED=58;
public static final int SRC=59;
public static final int STAR=60;
public static final int STRING_LITERAL=61;
public static final int SYNPRED=62;
public static final int THROWS=63;
public static final int TOKENS_SPEC=64;
public static final int TOKEN_REF=65;
public static final int TREE_GRAMMAR=66;
public static final int UNICODE_ESC=67;
public static final int UnicodeBOM=68;
public static final int WS=69;
public static final int WSCHARS=70;
public static final int WSNLCHARS=71;
public static final int ALT=72;
public static final int ALTLIST=73;
public static final int ARG=74;
public static final int ARGLIST=75;
public static final int BLOCK=76;
public static final int CHAR_RANGE=77;
public static final int CLOSURE=78;
public static final int COMBINED=79;
public static final int ELEMENT_OPTIONS=80;
public static final int EPSILON=81;
public static final int INITACTION=82;
public static final int LABEL=83;
public static final int LEXER_ACTION_CALL=84;
public static final int LEXER_ALT_ACTION=85;
public static final int LIST=86;
public static final int OPTIONAL=87;
public static final int POSITIVE_CLOSURE=88;
public static final int PREC_RULE=89;
public static final int RESULT=90;
public static final int RET=91;
public static final int RULE=92;
public static final int RULEACTIONS=93;
public static final int RULEMODIFIERS=94;
public static final int RULES=95;
public static final int SET=96;
public static final int TEMPLATE=97;
public static final int WILDCARD=98;
// delegates
public TreeParser[] getDelegates() {
return new TreeParser[] {};
}
// delegators
public SourceGenTriggers(TreeNodeStream input) {
this(input, new RecognizerSharedState());
}
public SourceGenTriggers(TreeNodeStream input, RecognizerSharedState state) {
super(input, state);
}
@Override public String[] getTokenNames() { return SourceGenTriggers.tokenNames; }
@Override public String getGrammarFileName() { return "org\\antlr\\v4\\codegen\\SourceGenTriggers.g"; }
public OutputModelController controller;
public boolean hasLookaheadBlock;
public SourceGenTriggers(TreeNodeStream input, OutputModelController controller) {
this(input);
this.controller = controller;
}
// $ANTLR start "dummy"
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:59:1: dummy : block[null, null] ;
public final void dummy() throws RecognitionException {
try {
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:59:7: ( block[null, null] )
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:59:9: block[null, null]
{
pushFollow(FOLLOW_block_in_dummy61);
block(null, null);
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
}
// $ANTLR end "dummy"
// $ANTLR start "block"
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:61:1: block[GrammarAST label, GrammarAST ebnfRoot] returns [List extends SrcOp> omos] : ^(blk= BLOCK ( ^( OPTIONS ( . )+ ) )? ( alternative )+ ) ;
public final List extends SrcOp> block(GrammarAST label, GrammarAST ebnfRoot) throws RecognitionException {
List extends SrcOp> omos = null;
GrammarAST blk=null;
TreeRuleReturnScope alternative1 =null;
try {
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:62:5: ( ^(blk= BLOCK ( ^( OPTIONS ( . )+ ) )? ( alternative )+ ) )
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:62:7: ^(blk= BLOCK ( ^( OPTIONS ( . )+ ) )? ( alternative )+ )
{
blk=(GrammarAST)match(input,BLOCK,FOLLOW_BLOCK_in_block84);
match(input, Token.DOWN, null);
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:62:20: ( ^( OPTIONS ( . )+ ) )?
int alt2=2;
int LA2_0 = input.LA(1);
if ( (LA2_0==OPTIONS) ) {
alt2=1;
}
switch (alt2) {
case 1 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:62:21: ^( OPTIONS ( . )+ )
{
match(input,OPTIONS,FOLLOW_OPTIONS_in_block88);
match(input, Token.DOWN, null);
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:62:31: ( . )+
int cnt1=0;
loop1:
while (true) {
int alt1=2;
int LA1_0 = input.LA(1);
if ( ((LA1_0 >= ACTION && LA1_0 <= WILDCARD)) ) {
alt1=1;
}
else if ( (LA1_0==UP) ) {
alt1=2;
}
switch (alt1) {
case 1 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:62:31: .
{
matchAny(input);
}
break;
default :
if ( cnt1 >= 1 ) break loop1;
EarlyExitException eee = new EarlyExitException(1, input);
throw eee;
}
cnt1++;
}
match(input, Token.UP, null);
}
break;
}
List alts = new ArrayList();
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:64:7: ( alternative )+
int cnt3=0;
loop3:
while (true) {
int alt3=2;
int LA3_0 = input.LA(1);
if ( (LA3_0==ALT) ) {
alt3=1;
}
switch (alt3) {
case 1 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:64:9: alternative
{
pushFollow(FOLLOW_alternative_in_block109);
alternative1=alternative();
state._fsp--;
alts.add((alternative1!=null?((SourceGenTriggers.alternative_return)alternative1).altCodeBlock:null));
}
break;
default :
if ( cnt3 >= 1 ) break loop3;
EarlyExitException eee = new EarlyExitException(3, input);
throw eee;
}
cnt3++;
}
match(input, Token.UP, null);
if ( alts.size()==1 && ebnfRoot==null) return alts;
if ( ebnfRoot==null ) {
omos = DefaultOutputModelFactory.list(controller.getChoiceBlock((BlockAST)blk, alts, label));
}
else {
Choice choice = controller.getEBNFBlock(ebnfRoot, alts);
hasLookaheadBlock |= choice instanceof PlusBlock || choice instanceof StarBlock;
omos = DefaultOutputModelFactory.list(choice);
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return omos;
}
// $ANTLR end "block"
public static class alternative_return extends TreeRuleReturnScope {
public CodeBlockForAlt altCodeBlock;
public List ops;
};
// $ANTLR start "alternative"
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:79:1: alternative returns [CodeBlockForAlt altCodeBlock, List ops] : a= alt[outerMost] ;
public final SourceGenTriggers.alternative_return alternative() throws RecognitionException {
SourceGenTriggers.alternative_return retval = new SourceGenTriggers.alternative_return();
retval.start = input.LT(1);
TreeRuleReturnScope a =null;
boolean outerMost = inContext("RULE BLOCK");
try {
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:86:5: (a= alt[outerMost] )
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:86:7: a= alt[outerMost]
{
pushFollow(FOLLOW_alt_in_alternative161);
a=alt(outerMost);
state._fsp--;
retval.altCodeBlock =(a!=null?((SourceGenTriggers.alt_return)a).altCodeBlock:null); retval.ops =(a!=null?((SourceGenTriggers.alt_return)a).ops:null);
}
controller.finishAlternative(retval.altCodeBlock, retval.ops, outerMost);
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "alternative"
public static class alt_return extends TreeRuleReturnScope {
public CodeBlockForAlt altCodeBlock;
public List ops;
};
// $ANTLR start "alt"
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:89:1: alt[boolean outerMost] returns [CodeBlockForAlt altCodeBlock, List ops] : ( ^( ALT ( element )+ ) | ^( ALT EPSILON ) );
public final SourceGenTriggers.alt_return alt(boolean outerMost) throws RecognitionException {
SourceGenTriggers.alt_return retval = new SourceGenTriggers.alt_return();
retval.start = input.LT(1);
List extends SrcOp> element2 =null;
// set alt if outer ALT only (the only ones with alt field set to Alternative object)
AltAST altAST = (AltAST)retval.start;
if ( outerMost ) controller.setCurrentOuterMostAlt(altAST.alt);
try {
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:95:2: ( ^( ALT ( element )+ ) | ^( ALT EPSILON ) )
int alt5=2;
int LA5_0 = input.LA(1);
if ( (LA5_0==ALT) ) {
int LA5_1 = input.LA(2);
if ( (LA5_1==DOWN) ) {
int LA5_2 = input.LA(3);
if ( (LA5_2==EPSILON) ) {
alt5=2;
}
else if ( (LA5_2==ACTION||LA5_2==ASSIGN||LA5_2==DOT||LA5_2==NOT||LA5_2==PLUS_ASSIGN||LA5_2==RANGE||LA5_2==RULE_REF||LA5_2==SEMPRED||LA5_2==STRING_LITERAL||LA5_2==TOKEN_REF||LA5_2==BLOCK||LA5_2==CLOSURE||(LA5_2 >= OPTIONAL && LA5_2 <= POSITIVE_CLOSURE)||LA5_2==SET||LA5_2==WILDCARD) ) {
alt5=1;
}
else {
int nvaeMark = input.mark();
try {
for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
input.consume();
}
NoViableAltException nvae =
new NoViableAltException("", 5, 2, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
else {
int nvaeMark = input.mark();
try {
input.consume();
NoViableAltException nvae =
new NoViableAltException("", 5, 1, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
else {
NoViableAltException nvae =
new NoViableAltException("", 5, 0, input);
throw nvae;
}
switch (alt5) {
case 1 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:95:4: ^( ALT ( element )+ )
{
List elems = new ArrayList();
// TODO: shouldn't we pass ((GrammarAST)retval.start) to controller.alternative()?
retval.altCodeBlock = controller.alternative(controller.getCurrentOuterMostAlt(), outerMost);
retval.altCodeBlock.ops = retval.ops = elems;
controller.setCurrentBlock(retval.altCodeBlock);
match(input,ALT,FOLLOW_ALT_in_alt191);
match(input, Token.DOWN, null);
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:102:10: ( element )+
int cnt4=0;
loop4:
while (true) {
int alt4=2;
int LA4_0 = input.LA(1);
if ( (LA4_0==ACTION||LA4_0==ASSIGN||LA4_0==DOT||LA4_0==NOT||LA4_0==PLUS_ASSIGN||LA4_0==RANGE||LA4_0==RULE_REF||LA4_0==SEMPRED||LA4_0==STRING_LITERAL||LA4_0==TOKEN_REF||LA4_0==BLOCK||LA4_0==CLOSURE||(LA4_0 >= OPTIONAL && LA4_0 <= POSITIVE_CLOSURE)||LA4_0==SET||LA4_0==WILDCARD) ) {
alt4=1;
}
switch (alt4) {
case 1 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:102:12: element
{
pushFollow(FOLLOW_element_in_alt195);
element2=element();
state._fsp--;
if (element2!=null) elems.addAll(element2);
}
break;
default :
if ( cnt4 >= 1 ) break loop4;
EarlyExitException eee = new EarlyExitException(4, input);
throw eee;
}
cnt4++;
}
match(input, Token.UP, null);
}
break;
case 2 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:104:4: ^( ALT EPSILON )
{
match(input,ALT,FOLLOW_ALT_in_alt209);
match(input, Token.DOWN, null);
match(input,EPSILON,FOLLOW_EPSILON_in_alt211);
match(input, Token.UP, null);
retval.altCodeBlock = controller.epsilon(controller.getCurrentOuterMostAlt(), outerMost);
}
break;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "alt"
// $ANTLR start "element"
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:108:1: element returns [List extends SrcOp> omos] : ( labeledElement | atom[null,false] | subrule | ACTION | SEMPRED | ^( ACTION elementOptions ) | ^( SEMPRED elementOptions ) );
public final List extends SrcOp> element() throws RecognitionException {
List extends SrcOp> omos = null;
GrammarAST ACTION6=null;
GrammarAST SEMPRED7=null;
GrammarAST ACTION8=null;
GrammarAST SEMPRED9=null;
List extends SrcOp> labeledElement3 =null;
List atom4 =null;
List extends SrcOp> subrule5 =null;
try {
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:109:2: ( labeledElement | atom[null,false] | subrule | ACTION | SEMPRED | ^( ACTION elementOptions ) | ^( SEMPRED elementOptions ) )
int alt6=7;
switch ( input.LA(1) ) {
case ASSIGN:
case PLUS_ASSIGN:
{
alt6=1;
}
break;
case DOT:
case NOT:
case RANGE:
case RULE_REF:
case STRING_LITERAL:
case TOKEN_REF:
case SET:
case WILDCARD:
{
alt6=2;
}
break;
case BLOCK:
case CLOSURE:
case OPTIONAL:
case POSITIVE_CLOSURE:
{
alt6=3;
}
break;
case ACTION:
{
int LA6_4 = input.LA(2);
if ( (LA6_4==DOWN) ) {
alt6=6;
}
else if ( ((LA6_4 >= UP && LA6_4 <= ACTION)||LA6_4==ASSIGN||LA6_4==DOT||LA6_4==NOT||LA6_4==PLUS_ASSIGN||LA6_4==RANGE||LA6_4==RULE_REF||LA6_4==SEMPRED||LA6_4==STRING_LITERAL||LA6_4==TOKEN_REF||LA6_4==BLOCK||LA6_4==CLOSURE||(LA6_4 >= OPTIONAL && LA6_4 <= POSITIVE_CLOSURE)||LA6_4==SET||LA6_4==WILDCARD) ) {
alt6=4;
}
else {
int nvaeMark = input.mark();
try {
input.consume();
NoViableAltException nvae =
new NoViableAltException("", 6, 4, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
break;
case SEMPRED:
{
int LA6_5 = input.LA(2);
if ( (LA6_5==DOWN) ) {
alt6=7;
}
else if ( ((LA6_5 >= UP && LA6_5 <= ACTION)||LA6_5==ASSIGN||LA6_5==DOT||LA6_5==NOT||LA6_5==PLUS_ASSIGN||LA6_5==RANGE||LA6_5==RULE_REF||LA6_5==SEMPRED||LA6_5==STRING_LITERAL||LA6_5==TOKEN_REF||LA6_5==BLOCK||LA6_5==CLOSURE||(LA6_5 >= OPTIONAL && LA6_5 <= POSITIVE_CLOSURE)||LA6_5==SET||LA6_5==WILDCARD) ) {
alt6=5;
}
else {
int nvaeMark = input.mark();
try {
input.consume();
NoViableAltException nvae =
new NoViableAltException("", 6, 5, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
break;
default:
NoViableAltException nvae =
new NoViableAltException("", 6, 0, input);
throw nvae;
}
switch (alt6) {
case 1 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:109:4: labeledElement
{
pushFollow(FOLLOW_labeledElement_in_element240);
labeledElement3=labeledElement();
state._fsp--;
omos = labeledElement3;
}
break;
case 2 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:110:4: atom[null,false]
{
pushFollow(FOLLOW_atom_in_element251);
atom4=atom(null, false);
state._fsp--;
omos = atom4;
}
break;
case 3 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:111:4: subrule
{
pushFollow(FOLLOW_subrule_in_element261);
subrule5=subrule();
state._fsp--;
omos = subrule5;
}
break;
case 4 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:112:6: ACTION
{
ACTION6=(GrammarAST)match(input,ACTION,FOLLOW_ACTION_in_element276);
omos = controller.action((ActionAST)ACTION6);
}
break;
case 5 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:113:6: SEMPRED
{
SEMPRED7=(GrammarAST)match(input,SEMPRED,FOLLOW_SEMPRED_in_element291);
omos = controller.sempred((ActionAST)SEMPRED7);
}
break;
case 6 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:114:4: ^( ACTION elementOptions )
{
ACTION8=(GrammarAST)match(input,ACTION,FOLLOW_ACTION_in_element305);
match(input, Token.DOWN, null);
pushFollow(FOLLOW_elementOptions_in_element307);
elementOptions();
state._fsp--;
match(input, Token.UP, null);
omos = controller.action((ActionAST)ACTION8);
}
break;
case 7 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:115:6: ^( SEMPRED elementOptions )
{
SEMPRED9=(GrammarAST)match(input,SEMPRED,FOLLOW_SEMPRED_in_element319);
match(input, Token.DOWN, null);
pushFollow(FOLLOW_elementOptions_in_element321);
elementOptions();
state._fsp--;
match(input, Token.UP, null);
omos = controller.sempred((ActionAST)SEMPRED9);
}
break;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return omos;
}
// $ANTLR end "element"
// $ANTLR start "labeledElement"
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:118:1: labeledElement returns [List extends SrcOp> omos] : ( ^( ASSIGN ID atom[$ID,false] ) | ^( PLUS_ASSIGN ID atom[$ID,false] ) | ^( ASSIGN ID block[$ID,null] ) | ^( PLUS_ASSIGN ID block[$ID,null] ) );
public final List extends SrcOp> labeledElement() throws RecognitionException {
List extends SrcOp> omos = null;
GrammarAST ID10=null;
GrammarAST ID12=null;
GrammarAST ID14=null;
GrammarAST ID16=null;
List atom11 =null;
List atom13 =null;
List extends SrcOp> block15 =null;
List extends SrcOp> block17 =null;
try {
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:119:2: ( ^( ASSIGN ID atom[$ID,false] ) | ^( PLUS_ASSIGN ID atom[$ID,false] ) | ^( ASSIGN ID block[$ID,null] ) | ^( PLUS_ASSIGN ID block[$ID,null] ) )
int alt7=4;
int LA7_0 = input.LA(1);
if ( (LA7_0==ASSIGN) ) {
int LA7_1 = input.LA(2);
if ( (LA7_1==DOWN) ) {
int LA7_3 = input.LA(3);
if ( (LA7_3==ID) ) {
int LA7_5 = input.LA(4);
if ( (LA7_5==DOT||LA7_5==NOT||LA7_5==RANGE||LA7_5==RULE_REF||LA7_5==STRING_LITERAL||LA7_5==TOKEN_REF||LA7_5==SET||LA7_5==WILDCARD) ) {
alt7=1;
}
else if ( (LA7_5==BLOCK) ) {
alt7=3;
}
else {
int nvaeMark = input.mark();
try {
for (int nvaeConsume = 0; nvaeConsume < 4 - 1; nvaeConsume++) {
input.consume();
}
NoViableAltException nvae =
new NoViableAltException("", 7, 5, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
else {
int nvaeMark = input.mark();
try {
for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
input.consume();
}
NoViableAltException nvae =
new NoViableAltException("", 7, 3, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
else {
int nvaeMark = input.mark();
try {
input.consume();
NoViableAltException nvae =
new NoViableAltException("", 7, 1, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
else if ( (LA7_0==PLUS_ASSIGN) ) {
int LA7_2 = input.LA(2);
if ( (LA7_2==DOWN) ) {
int LA7_4 = input.LA(3);
if ( (LA7_4==ID) ) {
int LA7_6 = input.LA(4);
if ( (LA7_6==DOT||LA7_6==NOT||LA7_6==RANGE||LA7_6==RULE_REF||LA7_6==STRING_LITERAL||LA7_6==TOKEN_REF||LA7_6==SET||LA7_6==WILDCARD) ) {
alt7=2;
}
else if ( (LA7_6==BLOCK) ) {
alt7=4;
}
else {
int nvaeMark = input.mark();
try {
for (int nvaeConsume = 0; nvaeConsume < 4 - 1; nvaeConsume++) {
input.consume();
}
NoViableAltException nvae =
new NoViableAltException("", 7, 6, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
else {
int nvaeMark = input.mark();
try {
for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
input.consume();
}
NoViableAltException nvae =
new NoViableAltException("", 7, 4, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
else {
int nvaeMark = input.mark();
try {
input.consume();
NoViableAltException nvae =
new NoViableAltException("", 7, 2, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
else {
NoViableAltException nvae =
new NoViableAltException("", 7, 0, input);
throw nvae;
}
switch (alt7) {
case 1 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:119:4: ^( ASSIGN ID atom[$ID,false] )
{
match(input,ASSIGN,FOLLOW_ASSIGN_in_labeledElement341);
match(input, Token.DOWN, null);
ID10=(GrammarAST)match(input,ID,FOLLOW_ID_in_labeledElement343);
pushFollow(FOLLOW_atom_in_labeledElement345);
atom11=atom(ID10, false);
state._fsp--;
match(input, Token.UP, null);
omos = atom11;
}
break;
case 2 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:120:4: ^( PLUS_ASSIGN ID atom[$ID,false] )
{
match(input,PLUS_ASSIGN,FOLLOW_PLUS_ASSIGN_in_labeledElement358);
match(input, Token.DOWN, null);
ID12=(GrammarAST)match(input,ID,FOLLOW_ID_in_labeledElement360);
pushFollow(FOLLOW_atom_in_labeledElement362);
atom13=atom(ID12, false);
state._fsp--;
match(input, Token.UP, null);
omos = atom13;
}
break;
case 3 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:121:4: ^( ASSIGN ID block[$ID,null] )
{
match(input,ASSIGN,FOLLOW_ASSIGN_in_labeledElement373);
match(input, Token.DOWN, null);
ID14=(GrammarAST)match(input,ID,FOLLOW_ID_in_labeledElement375);
pushFollow(FOLLOW_block_in_labeledElement377);
block15=block(ID14, null);
state._fsp--;
match(input, Token.UP, null);
omos = block15;
}
break;
case 4 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:122:4: ^( PLUS_ASSIGN ID block[$ID,null] )
{
match(input,PLUS_ASSIGN,FOLLOW_PLUS_ASSIGN_in_labeledElement390);
match(input, Token.DOWN, null);
ID16=(GrammarAST)match(input,ID,FOLLOW_ID_in_labeledElement392);
pushFollow(FOLLOW_block_in_labeledElement394);
block17=block(ID16, null);
state._fsp--;
match(input, Token.UP, null);
omos = block17;
}
break;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return omos;
}
// $ANTLR end "labeledElement"
// $ANTLR start "subrule"
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:125:1: subrule returns [List extends SrcOp> omos] : ( ^( OPTIONAL b= block[null,$OPTIONAL] ) | ( ^(op= CLOSURE b= block[null,null] ) | ^(op= POSITIVE_CLOSURE b= block[null,null] ) ) | block[null, null] );
public final List extends SrcOp> subrule() throws RecognitionException {
List extends SrcOp> omos = null;
GrammarAST op=null;
GrammarAST OPTIONAL18=null;
List extends SrcOp> b =null;
List extends SrcOp> block19 =null;
try {
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:126:2: ( ^( OPTIONAL b= block[null,$OPTIONAL] ) | ( ^(op= CLOSURE b= block[null,null] ) | ^(op= POSITIVE_CLOSURE b= block[null,null] ) ) | block[null, null] )
int alt9=3;
switch ( input.LA(1) ) {
case OPTIONAL:
{
alt9=1;
}
break;
case CLOSURE:
case POSITIVE_CLOSURE:
{
alt9=2;
}
break;
case BLOCK:
{
alt9=3;
}
break;
default:
NoViableAltException nvae =
new NoViableAltException("", 9, 0, input);
throw nvae;
}
switch (alt9) {
case 1 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:126:4: ^( OPTIONAL b= block[null,$OPTIONAL] )
{
OPTIONAL18=(GrammarAST)match(input,OPTIONAL,FOLLOW_OPTIONAL_in_subrule415);
match(input, Token.DOWN, null);
pushFollow(FOLLOW_block_in_subrule419);
b=block(null, OPTIONAL18);
state._fsp--;
match(input, Token.UP, null);
omos = b;
}
break;
case 2 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:130:4: ( ^(op= CLOSURE b= block[null,null] ) | ^(op= POSITIVE_CLOSURE b= block[null,null] ) )
{
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:130:4: ( ^(op= CLOSURE b= block[null,null] ) | ^(op= POSITIVE_CLOSURE b= block[null,null] ) )
int alt8=2;
int LA8_0 = input.LA(1);
if ( (LA8_0==CLOSURE) ) {
alt8=1;
}
else if ( (LA8_0==POSITIVE_CLOSURE) ) {
alt8=2;
}
else {
NoViableAltException nvae =
new NoViableAltException("", 8, 0, input);
throw nvae;
}
switch (alt8) {
case 1 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:130:6: ^(op= CLOSURE b= block[null,null] )
{
op=(GrammarAST)match(input,CLOSURE,FOLLOW_CLOSURE_in_subrule435);
match(input, Token.DOWN, null);
pushFollow(FOLLOW_block_in_subrule439);
b=block(null, null);
state._fsp--;
match(input, Token.UP, null);
}
break;
case 2 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:131:5: ^(op= POSITIVE_CLOSURE b= block[null,null] )
{
op=(GrammarAST)match(input,POSITIVE_CLOSURE,FOLLOW_POSITIVE_CLOSURE_in_subrule450);
match(input, Token.DOWN, null);
pushFollow(FOLLOW_block_in_subrule454);
b=block(null, null);
state._fsp--;
match(input, Token.UP, null);
}
break;
}
List alts = new ArrayList();
SrcOp blk = b.get(0);
CodeBlockForAlt alt = new CodeBlockForAlt(controller.delegate);
alt.addOp(blk);
alts.add(alt);
SrcOp loop = controller.getEBNFBlock(op, alts); // "star it"
hasLookaheadBlock |= loop instanceof PlusBlock || loop instanceof StarBlock;
omos = DefaultOutputModelFactory.list(loop);
}
break;
case 3 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:143:5: block[null, null]
{
pushFollow(FOLLOW_block_in_subrule470);
block19=block(null, null);
state._fsp--;
omos = block19;
}
break;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return omos;
}
// $ANTLR end "subrule"
// $ANTLR start "blockSet"
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:146:1: blockSet[GrammarAST label, boolean invert] returns [List omos] : ^( SET ( atom[label,invert] )+ ) ;
public final List blockSet(GrammarAST label, boolean invert) throws RecognitionException {
List omos = null;
GrammarAST SET20=null;
try {
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:147:5: ( ^( SET ( atom[label,invert] )+ ) )
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:147:7: ^( SET ( atom[label,invert] )+ )
{
SET20=(GrammarAST)match(input,SET,FOLLOW_SET_in_blockSet500);
match(input, Token.DOWN, null);
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:147:13: ( atom[label,invert] )+
int cnt10=0;
loop10:
while (true) {
int alt10=2;
int LA10_0 = input.LA(1);
if ( (LA10_0==DOT||LA10_0==NOT||LA10_0==RANGE||LA10_0==RULE_REF||LA10_0==STRING_LITERAL||LA10_0==TOKEN_REF||LA10_0==SET||LA10_0==WILDCARD) ) {
alt10=1;
}
switch (alt10) {
case 1 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:147:13: atom[label,invert]
{
pushFollow(FOLLOW_atom_in_blockSet502);
atom(label, invert);
state._fsp--;
}
break;
default :
if ( cnt10 >= 1 ) break loop10;
EarlyExitException eee = new EarlyExitException(10, input);
throw eee;
}
cnt10++;
}
match(input, Token.UP, null);
omos = controller.set(SET20, label, invert);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return omos;
}
// $ANTLR end "blockSet"
// $ANTLR start "atom"
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:160:1: atom[GrammarAST label, boolean invert] returns [List omos] : ( ^( NOT a= atom[$label, true] ) | range[label] | ^( DOT ID terminal[$label] ) | ^( DOT ID ruleref[$label] ) | ^( WILDCARD . ) | WILDCARD | terminal[label] | ruleref[label] | blockSet[$label, invert] );
public final List atom(GrammarAST label, boolean invert) throws RecognitionException {
List omos = null;
GrammarAST WILDCARD22=null;
GrammarAST WILDCARD23=null;
List a =null;
List range21 =null;
List terminal24 =null;
List ruleref25 =null;
List blockSet26 =null;
try {
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:161:2: ( ^( NOT a= atom[$label, true] ) | range[label] | ^( DOT ID terminal[$label] ) | ^( DOT ID ruleref[$label] ) | ^( WILDCARD . ) | WILDCARD | terminal[label] | ruleref[label] | blockSet[$label, invert] )
int alt11=9;
switch ( input.LA(1) ) {
case NOT:
{
alt11=1;
}
break;
case RANGE:
{
alt11=2;
}
break;
case DOT:
{
int LA11_3 = input.LA(2);
if ( (LA11_3==DOWN) ) {
int LA11_8 = input.LA(3);
if ( (LA11_8==ID) ) {
int LA11_11 = input.LA(4);
if ( (LA11_11==STRING_LITERAL||LA11_11==TOKEN_REF) ) {
alt11=3;
}
else if ( (LA11_11==RULE_REF) ) {
alt11=4;
}
else {
int nvaeMark = input.mark();
try {
for (int nvaeConsume = 0; nvaeConsume < 4 - 1; nvaeConsume++) {
input.consume();
}
NoViableAltException nvae =
new NoViableAltException("", 11, 11, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
else {
int nvaeMark = input.mark();
try {
for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
input.consume();
}
NoViableAltException nvae =
new NoViableAltException("", 11, 8, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
else {
int nvaeMark = input.mark();
try {
input.consume();
NoViableAltException nvae =
new NoViableAltException("", 11, 3, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
break;
case WILDCARD:
{
int LA11_4 = input.LA(2);
if ( (LA11_4==DOWN) ) {
alt11=5;
}
else if ( ((LA11_4 >= UP && LA11_4 <= ACTION)||LA11_4==ASSIGN||LA11_4==DOT||LA11_4==NOT||LA11_4==PLUS_ASSIGN||LA11_4==RANGE||LA11_4==RULE_REF||LA11_4==SEMPRED||LA11_4==STRING_LITERAL||LA11_4==TOKEN_REF||LA11_4==BLOCK||LA11_4==CLOSURE||(LA11_4 >= OPTIONAL && LA11_4 <= POSITIVE_CLOSURE)||LA11_4==SET||LA11_4==WILDCARD) ) {
alt11=6;
}
else {
int nvaeMark = input.mark();
try {
input.consume();
NoViableAltException nvae =
new NoViableAltException("", 11, 4, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
break;
case STRING_LITERAL:
case TOKEN_REF:
{
alt11=7;
}
break;
case RULE_REF:
{
alt11=8;
}
break;
case SET:
{
alt11=9;
}
break;
default:
NoViableAltException nvae =
new NoViableAltException("", 11, 0, input);
throw nvae;
}
switch (alt11) {
case 1 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:161:4: ^( NOT a= atom[$label, true] )
{
match(input,NOT,FOLLOW_NOT_in_atom532);
match(input, Token.DOWN, null);
pushFollow(FOLLOW_atom_in_atom536);
a=atom(label, true);
state._fsp--;
match(input, Token.UP, null);
omos = a;
}
break;
case 2 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:162:4: range[label]
{
pushFollow(FOLLOW_range_in_atom546);
range21=range(label);
state._fsp--;
omos = range21;
}
break;
case 3 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:163:4: ^( DOT ID terminal[$label] )
{
match(input,DOT,FOLLOW_DOT_in_atom561);
match(input, Token.DOWN, null);
match(input,ID,FOLLOW_ID_in_atom563);
pushFollow(FOLLOW_terminal_in_atom565);
terminal(label);
state._fsp--;
match(input, Token.UP, null);
}
break;
case 4 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:164:4: ^( DOT ID ruleref[$label] )
{
match(input,DOT,FOLLOW_DOT_in_atom573);
match(input, Token.DOWN, null);
match(input,ID,FOLLOW_ID_in_atom575);
pushFollow(FOLLOW_ruleref_in_atom577);
ruleref(label);
state._fsp--;
match(input, Token.UP, null);
}
break;
case 5 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:165:7: ^( WILDCARD . )
{
WILDCARD22=(GrammarAST)match(input,WILDCARD,FOLLOW_WILDCARD_in_atom588);
match(input, Token.DOWN, null);
matchAny(input);
match(input, Token.UP, null);
omos = controller.wildcard(WILDCARD22, label);
}
break;
case 6 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:166:7: WILDCARD
{
WILDCARD23=(GrammarAST)match(input,WILDCARD,FOLLOW_WILDCARD_in_atom607);
omos = controller.wildcard(WILDCARD23, label);
}
break;
case 7 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:167:9: terminal[label]
{
pushFollow(FOLLOW_terminal_in_atom626);
terminal24=terminal(label);
state._fsp--;
omos = terminal24;
}
break;
case 8 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:168:9: ruleref[label]
{
pushFollow(FOLLOW_ruleref_in_atom643);
ruleref25=ruleref(label);
state._fsp--;
omos = ruleref25;
}
break;
case 9 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:169:4: blockSet[$label, invert]
{
pushFollow(FOLLOW_blockSet_in_atom655);
blockSet26=blockSet(label, invert);
state._fsp--;
omos = blockSet26;
}
break;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return omos;
}
// $ANTLR end "atom"
// $ANTLR start "ruleref"
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:172:1: ruleref[GrammarAST label] returns [List omos] : ^( RULE_REF ( ARG_ACTION )? ( elementOptions )? ) ;
public final List ruleref(GrammarAST label) throws RecognitionException {
List omos = null;
GrammarAST RULE_REF27=null;
GrammarAST ARG_ACTION28=null;
try {
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:173:5: ( ^( RULE_REF ( ARG_ACTION )? ( elementOptions )? ) )
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:173:7: ^( RULE_REF ( ARG_ACTION )? ( elementOptions )? )
{
RULE_REF27=(GrammarAST)match(input,RULE_REF,FOLLOW_RULE_REF_in_ruleref679);
if ( input.LA(1)==Token.DOWN ) {
match(input, Token.DOWN, null);
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:173:18: ( ARG_ACTION )?
int alt12=2;
int LA12_0 = input.LA(1);
if ( (LA12_0==ARG_ACTION) ) {
alt12=1;
}
switch (alt12) {
case 1 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:173:18: ARG_ACTION
{
ARG_ACTION28=(GrammarAST)match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_ruleref681);
}
break;
}
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:173:30: ( elementOptions )?
int alt13=2;
int LA13_0 = input.LA(1);
if ( (LA13_0==ELEMENT_OPTIONS) ) {
alt13=1;
}
switch (alt13) {
case 1 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:173:30: elementOptions
{
pushFollow(FOLLOW_elementOptions_in_ruleref684);
elementOptions();
state._fsp--;
}
break;
}
match(input, Token.UP, null);
}
omos = controller.ruleRef(RULE_REF27, label, ARG_ACTION28);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return omos;
}
// $ANTLR end "ruleref"
// $ANTLR start "range"
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:176:1: range[GrammarAST label] returns [List omos] : ^( RANGE a= STRING_LITERAL b= STRING_LITERAL ) ;
public final List range(GrammarAST label) throws RecognitionException {
List omos = null;
GrammarAST a=null;
GrammarAST b=null;
try {
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:177:5: ( ^( RANGE a= STRING_LITERAL b= STRING_LITERAL ) )
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:177:7: ^( RANGE a= STRING_LITERAL b= STRING_LITERAL )
{
match(input,RANGE,FOLLOW_RANGE_in_range712);
match(input, Token.DOWN, null);
a=(GrammarAST)match(input,STRING_LITERAL,FOLLOW_STRING_LITERAL_in_range716);
b=(GrammarAST)match(input,STRING_LITERAL,FOLLOW_STRING_LITERAL_in_range720);
match(input, Token.UP, null);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return omos;
}
// $ANTLR end "range"
// $ANTLR start "terminal"
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:180:1: terminal[GrammarAST label] returns [List omos] : ( ^( STRING_LITERAL . ) | STRING_LITERAL | ^( TOKEN_REF ARG_ACTION . ) | ^( TOKEN_REF . ) | TOKEN_REF );
public final List terminal(GrammarAST label) throws RecognitionException {
List omos = null;
GrammarAST STRING_LITERAL29=null;
GrammarAST STRING_LITERAL30=null;
GrammarAST TOKEN_REF31=null;
GrammarAST ARG_ACTION32=null;
GrammarAST TOKEN_REF33=null;
GrammarAST TOKEN_REF34=null;
try {
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:181:5: ( ^( STRING_LITERAL . ) | STRING_LITERAL | ^( TOKEN_REF ARG_ACTION . ) | ^( TOKEN_REF . ) | TOKEN_REF )
int alt14=5;
int LA14_0 = input.LA(1);
if ( (LA14_0==STRING_LITERAL) ) {
int LA14_1 = input.LA(2);
if ( (LA14_1==DOWN) ) {
alt14=1;
}
else if ( ((LA14_1 >= UP && LA14_1 <= ACTION)||LA14_1==ASSIGN||LA14_1==DOT||LA14_1==NOT||LA14_1==PLUS_ASSIGN||LA14_1==RANGE||LA14_1==RULE_REF||LA14_1==SEMPRED||LA14_1==STRING_LITERAL||LA14_1==TOKEN_REF||LA14_1==BLOCK||LA14_1==CLOSURE||(LA14_1 >= OPTIONAL && LA14_1 <= POSITIVE_CLOSURE)||LA14_1==SET||LA14_1==WILDCARD) ) {
alt14=2;
}
else {
int nvaeMark = input.mark();
try {
input.consume();
NoViableAltException nvae =
new NoViableAltException("", 14, 1, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
else if ( (LA14_0==TOKEN_REF) ) {
int LA14_2 = input.LA(2);
if ( (LA14_2==DOWN) ) {
int LA14_5 = input.LA(3);
if ( (LA14_5==ARG_ACTION) ) {
int LA14_7 = input.LA(4);
if ( ((LA14_7 >= ACTION && LA14_7 <= WILDCARD)) ) {
alt14=3;
}
else if ( ((LA14_7 >= DOWN && LA14_7 <= UP)) ) {
alt14=4;
}
else {
int nvaeMark = input.mark();
try {
for (int nvaeConsume = 0; nvaeConsume < 4 - 1; nvaeConsume++) {
input.consume();
}
NoViableAltException nvae =
new NoViableAltException("", 14, 7, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
else if ( ((LA14_5 >= ACTION && LA14_5 <= ACTION_STRING_LITERAL)||(LA14_5 >= ARG_OR_CHARSET && LA14_5 <= WILDCARD)) ) {
alt14=4;
}
else {
int nvaeMark = input.mark();
try {
for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
input.consume();
}
NoViableAltException nvae =
new NoViableAltException("", 14, 5, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
else if ( ((LA14_2 >= UP && LA14_2 <= ACTION)||LA14_2==ASSIGN||LA14_2==DOT||LA14_2==NOT||LA14_2==PLUS_ASSIGN||LA14_2==RANGE||LA14_2==RULE_REF||LA14_2==SEMPRED||LA14_2==STRING_LITERAL||LA14_2==TOKEN_REF||LA14_2==BLOCK||LA14_2==CLOSURE||(LA14_2 >= OPTIONAL && LA14_2 <= POSITIVE_CLOSURE)||LA14_2==SET||LA14_2==WILDCARD) ) {
alt14=5;
}
else {
int nvaeMark = input.mark();
try {
input.consume();
NoViableAltException nvae =
new NoViableAltException("", 14, 2, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
else {
NoViableAltException nvae =
new NoViableAltException("", 14, 0, input);
throw nvae;
}
switch (alt14) {
case 1 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:181:8: ^( STRING_LITERAL . )
{
STRING_LITERAL29=(GrammarAST)match(input,STRING_LITERAL,FOLLOW_STRING_LITERAL_in_terminal745);
match(input, Token.DOWN, null);
matchAny(input);
match(input, Token.UP, null);
omos = controller.stringRef(STRING_LITERAL29, label);
}
break;
case 2 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:182:7: STRING_LITERAL
{
STRING_LITERAL30=(GrammarAST)match(input,STRING_LITERAL,FOLLOW_STRING_LITERAL_in_terminal760);
omos = controller.stringRef(STRING_LITERAL30, label);
}
break;
case 3 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:183:7: ^( TOKEN_REF ARG_ACTION . )
{
TOKEN_REF31=(GrammarAST)match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_terminal774);
match(input, Token.DOWN, null);
ARG_ACTION32=(GrammarAST)match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_terminal776);
matchAny(input);
match(input, Token.UP, null);
omos = controller.tokenRef(TOKEN_REF31, label, ARG_ACTION32);
}
break;
case 4 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:184:7: ^( TOKEN_REF . )
{
TOKEN_REF33=(GrammarAST)match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_terminal790);
match(input, Token.DOWN, null);
matchAny(input);
match(input, Token.UP, null);
omos = controller.tokenRef(TOKEN_REF33, label, null);
}
break;
case 5 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:185:7: TOKEN_REF
{
TOKEN_REF34=(GrammarAST)match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_terminal806);
omos = controller.tokenRef(TOKEN_REF34, label, null);
}
break;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
return omos;
}
// $ANTLR end "terminal"
// $ANTLR start "elementOptions"
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:188:1: elementOptions : ^( ELEMENT_OPTIONS ( elementOption )+ ) ;
public final void elementOptions() throws RecognitionException {
try {
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:189:5: ( ^( ELEMENT_OPTIONS ( elementOption )+ ) )
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:189:7: ^( ELEMENT_OPTIONS ( elementOption )+ )
{
match(input,ELEMENT_OPTIONS,FOLLOW_ELEMENT_OPTIONS_in_elementOptions830);
match(input, Token.DOWN, null);
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:189:25: ( elementOption )+
int cnt15=0;
loop15:
while (true) {
int alt15=2;
int LA15_0 = input.LA(1);
if ( (LA15_0==ASSIGN||LA15_0==ID) ) {
alt15=1;
}
switch (alt15) {
case 1 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:189:25: elementOption
{
pushFollow(FOLLOW_elementOption_in_elementOptions832);
elementOption();
state._fsp--;
}
break;
default :
if ( cnt15 >= 1 ) break loop15;
EarlyExitException eee = new EarlyExitException(15, input);
throw eee;
}
cnt15++;
}
match(input, Token.UP, null);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
}
// $ANTLR end "elementOptions"
// $ANTLR start "elementOption"
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:192:1: elementOption : ( ID | ^( ASSIGN ID ID ) | ^( ASSIGN ID STRING_LITERAL ) | ^( ASSIGN ID ACTION ) | ^( ASSIGN ID INT ) );
public final void elementOption() throws RecognitionException {
try {
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:193:5: ( ID | ^( ASSIGN ID ID ) | ^( ASSIGN ID STRING_LITERAL ) | ^( ASSIGN ID ACTION ) | ^( ASSIGN ID INT ) )
int alt16=5;
int LA16_0 = input.LA(1);
if ( (LA16_0==ID) ) {
alt16=1;
}
else if ( (LA16_0==ASSIGN) ) {
int LA16_2 = input.LA(2);
if ( (LA16_2==DOWN) ) {
int LA16_3 = input.LA(3);
if ( (LA16_3==ID) ) {
switch ( input.LA(4) ) {
case ID:
{
alt16=2;
}
break;
case STRING_LITERAL:
{
alt16=3;
}
break;
case ACTION:
{
alt16=4;
}
break;
case INT:
{
alt16=5;
}
break;
default:
int nvaeMark = input.mark();
try {
for (int nvaeConsume = 0; nvaeConsume < 4 - 1; nvaeConsume++) {
input.consume();
}
NoViableAltException nvae =
new NoViableAltException("", 16, 4, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
else {
int nvaeMark = input.mark();
try {
for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
input.consume();
}
NoViableAltException nvae =
new NoViableAltException("", 16, 3, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
else {
int nvaeMark = input.mark();
try {
input.consume();
NoViableAltException nvae =
new NoViableAltException("", 16, 2, input);
throw nvae;
} finally {
input.rewind(nvaeMark);
}
}
}
else {
NoViableAltException nvae =
new NoViableAltException("", 16, 0, input);
throw nvae;
}
switch (alt16) {
case 1 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:193:7: ID
{
match(input,ID,FOLLOW_ID_in_elementOption851);
}
break;
case 2 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:194:9: ^( ASSIGN ID ID )
{
match(input,ASSIGN,FOLLOW_ASSIGN_in_elementOption862);
match(input, Token.DOWN, null);
match(input,ID,FOLLOW_ID_in_elementOption864);
match(input,ID,FOLLOW_ID_in_elementOption866);
match(input, Token.UP, null);
}
break;
case 3 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:195:9: ^( ASSIGN ID STRING_LITERAL )
{
match(input,ASSIGN,FOLLOW_ASSIGN_in_elementOption878);
match(input, Token.DOWN, null);
match(input,ID,FOLLOW_ID_in_elementOption880);
match(input,STRING_LITERAL,FOLLOW_STRING_LITERAL_in_elementOption882);
match(input, Token.UP, null);
}
break;
case 4 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:196:9: ^( ASSIGN ID ACTION )
{
match(input,ASSIGN,FOLLOW_ASSIGN_in_elementOption894);
match(input, Token.DOWN, null);
match(input,ID,FOLLOW_ID_in_elementOption896);
match(input,ACTION,FOLLOW_ACTION_in_elementOption898);
match(input, Token.UP, null);
}
break;
case 5 :
// org\\antlr\\v4\\codegen\\SourceGenTriggers.g:197:9: ^( ASSIGN ID INT )
{
match(input,ASSIGN,FOLLOW_ASSIGN_in_elementOption910);
match(input, Token.DOWN, null);
match(input,ID,FOLLOW_ID_in_elementOption912);
match(input,INT,FOLLOW_INT_in_elementOption914);
match(input, Token.UP, null);
}
break;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
}
}
// $ANTLR end "elementOption"
// Delegated rules
public static final BitSet FOLLOW_block_in_dummy61 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_BLOCK_in_block84 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_OPTIONS_in_block88 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_alternative_in_block109 = new BitSet(new long[]{0x0000000000000008L,0x0000000000000100L});
public static final BitSet FOLLOW_alt_in_alternative161 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ALT_in_alt191 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_element_in_alt195 = new BitSet(new long[]{0x2508204000080418L,0x0000000501805002L});
public static final BitSet FOLLOW_ALT_in_alt209 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_EPSILON_in_alt211 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_labeledElement_in_element240 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_atom_in_element251 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_subrule_in_element261 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ACTION_in_element276 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_SEMPRED_in_element291 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ACTION_in_element305 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_elementOptions_in_element307 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_SEMPRED_in_element319 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_elementOptions_in_element321 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_ASSIGN_in_labeledElement341 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_ID_in_labeledElement343 = new BitSet(new long[]{0x2108004000080000L,0x0000000500000002L});
public static final BitSet FOLLOW_atom_in_labeledElement345 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_PLUS_ASSIGN_in_labeledElement358 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_ID_in_labeledElement360 = new BitSet(new long[]{0x2108004000080000L,0x0000000500000002L});
public static final BitSet FOLLOW_atom_in_labeledElement362 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_ASSIGN_in_labeledElement373 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_ID_in_labeledElement375 = new BitSet(new long[]{0x0000000000000000L,0x0000000000001000L});
public static final BitSet FOLLOW_block_in_labeledElement377 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_PLUS_ASSIGN_in_labeledElement390 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_ID_in_labeledElement392 = new BitSet(new long[]{0x0000000000000000L,0x0000000000001000L});
public static final BitSet FOLLOW_block_in_labeledElement394 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_OPTIONAL_in_subrule415 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_block_in_subrule419 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_CLOSURE_in_subrule435 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_block_in_subrule439 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_POSITIVE_CLOSURE_in_subrule450 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_block_in_subrule454 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_block_in_subrule470 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_SET_in_blockSet500 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_atom_in_blockSet502 = new BitSet(new long[]{0x2108004000080008L,0x0000000500000002L});
public static final BitSet FOLLOW_NOT_in_atom532 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_atom_in_atom536 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_range_in_atom546 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_DOT_in_atom561 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_ID_in_atom563 = new BitSet(new long[]{0x2000000000000000L,0x0000000000000002L});
public static final BitSet FOLLOW_terminal_in_atom565 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_DOT_in_atom573 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_ID_in_atom575 = new BitSet(new long[]{0x0100000000000000L});
public static final BitSet FOLLOW_ruleref_in_atom577 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_WILDCARD_in_atom588 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_WILDCARD_in_atom607 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_terminal_in_atom626 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleref_in_atom643 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_blockSet_in_atom655 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_RULE_REF_in_ruleref679 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_ARG_ACTION_in_ruleref681 = new BitSet(new long[]{0x0000000000000008L,0x0000000000010000L});
public static final BitSet FOLLOW_elementOptions_in_ruleref684 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_RANGE_in_range712 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_STRING_LITERAL_in_range716 = new BitSet(new long[]{0x2000000000000000L});
public static final BitSet FOLLOW_STRING_LITERAL_in_range720 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_STRING_LITERAL_in_terminal745 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_STRING_LITERAL_in_terminal760 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_TOKEN_REF_in_terminal774 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_ARG_ACTION_in_terminal776 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x00000007FFFFFFFFL});
public static final BitSet FOLLOW_TOKEN_REF_in_terminal790 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_TOKEN_REF_in_terminal806 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ELEMENT_OPTIONS_in_elementOptions830 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_elementOption_in_elementOptions832 = new BitSet(new long[]{0x0000000008000408L});
public static final BitSet FOLLOW_ID_in_elementOption851 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ASSIGN_in_elementOption862 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_ID_in_elementOption864 = new BitSet(new long[]{0x0000000008000000L});
public static final BitSet FOLLOW_ID_in_elementOption866 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_ASSIGN_in_elementOption878 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_ID_in_elementOption880 = new BitSet(new long[]{0x2000000000000000L});
public static final BitSet FOLLOW_STRING_LITERAL_in_elementOption882 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_ASSIGN_in_elementOption894 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_ID_in_elementOption896 = new BitSet(new long[]{0x0000000000000010L});
public static final BitSet FOLLOW_ACTION_in_elementOption898 = new BitSet(new long[]{0x0000000000000008L});
public static final BitSet FOLLOW_ASSIGN_in_elementOption910 = new BitSet(new long[]{0x0000000000000004L});
public static final BitSet FOLLOW_ID_in_elementOption912 = new BitSet(new long[]{0x0000000020000000L});
public static final BitSet FOLLOW_INT_in_elementOption914 = new BitSet(new long[]{0x0000000000000008L});
}