Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
rapture.generated.SRapGenParser Maven / Gradle / Ivy
package rapture.generated;
import rapture.dsl.srepgen.*;
import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
import org.antlr.runtime.tree.*;
@SuppressWarnings ("all" )
public class SRapGenParser extends AbstractSGenParser {
public static final String[] tokenNames = new String[] {
" " , " " , " " , " " , "CASSANDRA" , "COMMA" , "CSV" , "EQUALS" ,
"FILE" , "ID" , "LBRACE" , "MEMORY" , "MONGO" , "RBRACE" , "SREP" , "STRING" ,
"USING" , "WITH" , "WS" , "ENTRIES" , "ENTRY" , "MAIN"
};
public static final int EOF=-1 ;
public static final int CASSANDRA=4 ;
public static final int COMMA=5 ;
public static final int CSV=6 ;
public static final int EQUALS=7 ;
public static final int FILE=8 ;
public static final int ID=9 ;
public static final int LBRACE=10 ;
public static final int MEMORY=11 ;
public static final int MONGO=12 ;
public static final int RBRACE=13 ;
public static final int SREP=14 ;
public static final int STRING=15 ;
public static final int USING=16 ;
public static final int WITH=17 ;
public static final int WS=18 ;
public static final int ENTRIES=19 ;
public static final int ENTRY=20 ;
public static final int MAIN=21 ;
public AbstractSGenParser[] getDelegates() {
return new AbstractSGenParser[] {};
}
public SRapGenParser (TokenStream input) {
this (input, new RecognizerSharedState());
}
public SRapGenParser (TokenStream input, RecognizerSharedState state) {
super (input, state);
}
protected TreeAdaptor adaptor = new CommonTreeAdaptor();
public void setTreeAdaptor (TreeAdaptor adaptor) {
this .adaptor = adaptor;
}
public TreeAdaptor getTreeAdaptor () {
return adaptor;
}
@Override public String[] getTokenNames() { return SRapGenParser.tokenNames; }
@Override public String getGrammarFileName () { return "/Users/amkimian/Development/cloud/Rapture/Libs/RaptureCore/src/main/antlr3/rapture/dsl/sergen/SRapGenParser.g" ; }
public static class repinfo_return extends ParserRuleReturnScope {
Object tree;
@Override
public Object getTree () { return tree; }
};
public final SRapGenParser.repinfo_return repinfo () throws RecognitionException {
SRapGenParser.repinfo_return retval = new SRapGenParser.repinfo_return();
retval.start = input.LT(1 );
Object root_0 = null ;
Token USING2=null ;
ParserRuleReturnScope repdef1 =null ;
ParserRuleReturnScope storedef3 =null ;
Object USING2_tree=null ;
try {
{
root_0 = (Object)adaptor.nil();
pushFollow(FOLLOW_repdef_in_repinfo94);
repdef1=repdef();
state._fsp--;
adaptor.addChild(root_0, repdef1.getTree());
USING2=(Token)match(input,USING,FOLLOW_USING_in_repinfo96);
USING2_tree = (Object)adaptor.create(USING2);
adaptor.addChild(root_0, USING2_tree);
pushFollow(FOLLOW_storedef_in_repinfo98);
storedef3=storedef();
state._fsp--;
adaptor.addChild(root_0, storedef3.getTree());
}
retval.stop = input.LT(-1 );
retval.tree = (Object)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1 ), re);
}
finally {
}
return retval;
}
public static class repdef_return extends ParserRuleReturnScope {
Object tree;
@Override
public Object getTree () { return tree; }
};
public final SRapGenParser.repdef_return repdef () throws RecognitionException {
SRapGenParser.repdef_return retval = new SRapGenParser.repdef_return();
retval.start = input.LT(1 );
Object root_0 = null ;
ParserRuleReturnScope s =null ;
ParserRuleReturnScope config4 =null ;
try {
{
root_0 = (Object)adaptor.nil();
pushFollow(FOLLOW_repstyle_in_repdef111);
s=repstyle();
state._fsp--;
adaptor.addChild(root_0, s.getTree());
pushFollow(FOLLOW_config_in_repdef113);
config4=config();
state._fsp--;
adaptor.addChild(root_0, config4.getTree());
addProcessorConfig((s!=null ?input.toString(s.start,s.stop):null ));
}
retval.stop = input.LT(-1 );
retval.tree = (Object)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1 ), re);
}
finally {
}
return retval;
}
public static class storedef_return extends ParserRuleReturnScope {
Object tree;
@Override
public Object getTree () { return tree; }
};
public final SRapGenParser.storedef_return storedef () throws RecognitionException {
SRapGenParser.storedef_return retval = new SRapGenParser.storedef_return();
retval.start = input.LT(1 );
Object root_0 = null ;
ParserRuleReturnScope s =null ;
ParserRuleReturnScope config5 =null ;
try {
{
root_0 = (Object)adaptor.nil();
pushFollow(FOLLOW_storestyle_in_storedef126);
s=storestyle();
state._fsp--;
adaptor.addChild(root_0, s.getTree());
pushFollow(FOLLOW_config_in_storedef128);
config5=config();
state._fsp--;
adaptor.addChild(root_0, config5.getTree());
addConfig((s!=null ?input.toString(s.start,s.stop):null ));
}
retval.stop = input.LT(-1 );
retval.tree = (Object)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1 ), re);
}
finally {
}
return retval;
}
public static class repstyle_return extends ParserRuleReturnScope {
Object tree;
@Override
public Object getTree () { return tree; }
};
public final SRapGenParser.repstyle_return repstyle () throws RecognitionException {
SRapGenParser.repstyle_return retval = new SRapGenParser.repstyle_return();
retval.start = input.LT(1 );
Object root_0 = null ;
Token SREP6=null ;
Object SREP6_tree=null ;
try {
{
root_0 = (Object)adaptor.nil();
SREP6=(Token)match(input,SREP,FOLLOW_SREP_in_repstyle140);
SREP6_tree = (Object)adaptor.create(SREP6);
adaptor.addChild(root_0, SREP6_tree);
}
retval.stop = input.LT(-1 );
retval.tree = (Object)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1 ), re);
}
finally {
}
return retval;
}
public static class storestyle_return extends ParserRuleReturnScope {
Object tree;
@Override
public Object getTree () { return tree; }
};
public final SRapGenParser.storestyle_return storestyle () throws RecognitionException {
SRapGenParser.storestyle_return retval = new SRapGenParser.storestyle_return();
retval.start = input.LT(1 );
Object root_0 = null ;
Token s=null ;
Object s_tree=null ;
try {
{
root_0 = (Object)adaptor.nil();
s=input.LT(1 );
if ( input.LA(1 )==CASSANDRA||input.LA(1 )==CSV||input.LA(1 )==FILE||(input.LA(1 ) >= MEMORY && input.LA(1 ) <= MONGO) ) {
input.consume();
adaptor.addChild(root_0, (Object)adaptor.create(s));
state.errorRecovery=false ;
}
else {
MismatchedSetException mse = new MismatchedSetException(null ,input);
throw mse;
}
setStore(s);
}
retval.stop = input.LT(-1 );
retval.tree = (Object)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1 ), re);
}
finally {
}
return retval;
}
public static class config_return extends ParserRuleReturnScope {
Object tree;
@Override
public Object getTree () { return tree; }
};
public final SRapGenParser.config_return config () throws RecognitionException {
SRapGenParser.config_return retval = new SRapGenParser.config_return();
retval.start = input.LT(1 );
Object root_0 = null ;
Token LBRACE7=null ;
Token RBRACE9=null ;
ParserRuleReturnScope entrylist8 =null ;
Object LBRACE7_tree=null ;
Object RBRACE9_tree=null ;
try {
{
root_0 = (Object)adaptor.nil();
LBRACE7=(Token)match(input,LBRACE,FOLLOW_LBRACE_in_config182);
LBRACE7_tree = (Object)adaptor.create(LBRACE7);
adaptor.addChild(root_0, LBRACE7_tree);
pushFollow(FOLLOW_entrylist_in_config184);
entrylist8=entrylist();
state._fsp--;
adaptor.addChild(root_0, entrylist8.getTree());
RBRACE9=(Token)match(input,RBRACE,FOLLOW_RBRACE_in_config186);
RBRACE9_tree = (Object)adaptor.create(RBRACE9);
adaptor.addChild(root_0, RBRACE9_tree);
}
retval.stop = input.LT(-1 );
retval.tree = (Object)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1 ), re);
}
finally {
}
return retval;
}
public static class entrylist_return extends ParserRuleReturnScope {
Object tree;
@Override
public Object getTree () { return tree; }
};
public final SRapGenParser.entrylist_return entrylist () throws RecognitionException {
SRapGenParser.entrylist_return retval = new SRapGenParser.entrylist_return();
retval.start = input.LT(1 );
Object root_0 = null ;
Token COMMA10=null ;
ParserRuleReturnScope k =null ;
Object COMMA10_tree=null ;
try {
{
root_0 = (Object)adaptor.nil();
int alt1=2 ;
int LA1_0 = input.LA(1 );
if ( (LA1_0==ID) ) {
alt1=1 ;
}
switch (alt1) {
case 1 :
{
pushFollow(FOLLOW_entry_in_entrylist196);
k=entry();
state._fsp--;
adaptor.addChild(root_0, k.getTree());
}
break ;
}
loop2:
while (true ) {
int alt2=2 ;
int LA2_0 = input.LA(1 );
if ( (LA2_0==COMMA) ) {
alt2=1 ;
}
switch (alt2) {
case 1 :
{
COMMA10=(Token)match(input,COMMA,FOLLOW_COMMA_in_entrylist200);
COMMA10_tree = (Object)adaptor.create(COMMA10);
adaptor.addChild(root_0, COMMA10_tree);
pushFollow(FOLLOW_entry_in_entrylist204);
k=entry();
state._fsp--;
adaptor.addChild(root_0, k.getTree());
}
break ;
default :
break loop2;
}
}
}
retval.stop = input.LT(-1 );
retval.tree = (Object)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1 ), re);
}
finally {
}
return retval;
}
public static class entry_return extends ParserRuleReturnScope {
Object tree;
@Override
public Object getTree () { return tree; }
};
public final SRapGenParser.entry_return entry () throws RecognitionException {
SRapGenParser.entry_return retval = new SRapGenParser.entry_return();
retval.start = input.LT(1 );
Object root_0 = null ;
Token i=null ;
Token v=null ;
Token EQUALS11=null ;
Object i_tree=null ;
Object v_tree=null ;
Object EQUALS11_tree=null ;
try {
{
root_0 = (Object)adaptor.nil();
i=(Token)match(input,ID,FOLLOW_ID_in_entry216);
i_tree = (Object)adaptor.create(i);
adaptor.addChild(root_0, i_tree);
EQUALS11=(Token)match(input,EQUALS,FOLLOW_EQUALS_in_entry218);
EQUALS11_tree = (Object)adaptor.create(EQUALS11);
adaptor.addChild(root_0, EQUALS11_tree);
v=(Token)match(input,STRING,FOLLOW_STRING_in_entry222);
v_tree = (Object)adaptor.create(v);
adaptor.addChild(root_0, v_tree);
addConfig((i!=null ?i.getText():null ), (v!=null ?v.getText():null ));
}
retval.stop = input.LT(-1 );
retval.tree = (Object)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1 ), re);
}
finally {
}
return retval;
}
public static final BitSet FOLLOW_repdef_in_repinfo94 = new BitSet(new long []{0x0000000000010000L });
public static final BitSet FOLLOW_USING_in_repinfo96 = new BitSet(new long []{0x0000000000001950L });
public static final BitSet FOLLOW_storedef_in_repinfo98 = new BitSet(new long []{0x0000000000000002L });
public static final BitSet FOLLOW_repstyle_in_repdef111 = new BitSet(new long []{0x0000000000000400L });
public static final BitSet FOLLOW_config_in_repdef113 = new BitSet(new long []{0x0000000000000002L });
public static final BitSet FOLLOW_storestyle_in_storedef126 = new BitSet(new long []{0x0000000000000400L });
public static final BitSet FOLLOW_config_in_storedef128 = new BitSet(new long []{0x0000000000000002L });
public static final BitSet FOLLOW_SREP_in_repstyle140 = new BitSet(new long []{0x0000000000000002L });
public static final BitSet FOLLOW_set_in_storestyle150 = new BitSet(new long []{0x0000000000000002L });
public static final BitSet FOLLOW_LBRACE_in_config182 = new BitSet(new long []{0x0000000000002220L });
public static final BitSet FOLLOW_entrylist_in_config184 = new BitSet(new long []{0x0000000000002000L });
public static final BitSet FOLLOW_RBRACE_in_config186 = new BitSet(new long []{0x0000000000000002L });
public static final BitSet FOLLOW_entry_in_entrylist196 = new BitSet(new long []{0x0000000000000022L });
public static final BitSet FOLLOW_COMMA_in_entrylist200 = new BitSet(new long []{0x0000000000000200L });
public static final BitSet FOLLOW_entry_in_entrylist204 = new BitSet(new long []{0x0000000000000022L });
public static final BitSet FOLLOW_ID_in_entry216 = new BitSet(new long []{0x0000000000000080L });
public static final BitSet FOLLOW_EQUALS_in_entry218 = new BitSet(new long []{0x0000000000008000L });
public static final BitSet FOLLOW_STRING_in_entry222 = new BitSet(new long []{0x0000000000000002L });
}