// $ANTLR 3.4 /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g 2012-09-23 15:50:04
package net.helipilot50.aerospike.sqlimport;
import net.citrusleaf.CitrusleafClient;
import net.citrusleaf.CitrusleafClient.ClBin;
import net.citrusleaf.CitrusleafClient.ClResult;
import net.citrusleaf.CitrusleafClient.ClResultCode;
import net.helipilot50.stocktrade.server.DBClient;
import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import org.antlr.runtime.tree.*;
@SuppressWarnings({"all", "warnings", "unchecked"})
public class ToolSQLParser extends Parser {
public static final String[] tokenNames = new String[] {
"<invalid>", "<EOR>", "<DOWN>", "<UP>", "ALL", "AND", "ANY", "ARGUMENT_LIST", "AS", "ASC", "BETWEEN", "BY", "CLOSE", "COLON", "COMMA", "COMMENT", "CONNECT", "CURRENT", "CURSOR", "DEFAULT", "DELETE", "DESC", "DIGIT", "DISTINCT", "DIV", "DOT", "EQ", "ESCAPE", "EXECUTE", "EXISTS", "EXTENT", "EscapeSequence", "FALSE", "FETCH", "FLOATLITERAL", "FRAGMENT", "FROM", "GRANT", "GROUP", "GT", "GTEQ", "HAVING", "HEXLITERAL", "HexDigit", "HexPrefix", "IDENTIFIER", "IMMEDIATE", "IN", "INSERT", "INTLITERAL", "INTO", "IS", "IntegerNumber", "KEY", "LETTER", "LIKE", "LINE_COMMENT", "LPAREN", "LT", "LTEQ", "MINUS", "MOD", "MULT", "NEXT", "NIL", "NOT", "NOT_EQUAL", "NULL", "ON", "ON_SESSION", "OPEN", "OR", "ORDER", "PLUS", "PRIMARY", "PROCEDURE", "REVOKE", "RPAREN", "SELECT", "SEMI", "SESSION", "SET", "SQL", "SQL_CURSOR", "SQL_DELETE", "SQL_EXECUTE_IMMEDIATE", "SQL_EXECUTE_PROCEDURE", "SQL_INSERT", "SQL_SELECT", "SQL_UPDATE", "STRINGLITERAL", "TRUE", "UNDERSCORE", "UPDATE", "VALUES", "WHERE", "WS", "'create'", "'drop'", "'spool'", "'table'"
};
public static final int EOF=-1;
public static final int T__97=97;
public static final int T__98=98;
public static final int T__99=99;
public static final int T__100=100;
public static final int ALL=4;
public static final int AND=5;
public static final int ANY=6;
public static final int ARGUMENT_LIST=7;
public static final int AS=8;
public static final int ASC=9;
public static final int BETWEEN=10;
public static final int BY=11;
public static final int CLOSE=12;
public static final int COLON=13;
public static final int COMMA=14;
public static final int COMMENT=15;
public static final int CONNECT=16;
public static final int CURRENT=17;
public static final int CURSOR=18;
public static final int DEFAULT=19;
public static final int DELETE=20;
public static final int DESC=21;
public static final int DIGIT=22;
public static final int DISTINCT=23;
public static final int DIV=24;
public static final int DOT=25;
public static final int EQ=26;
public static final int ESCAPE=27;
public static final int EXECUTE=28;
public static final int EXISTS=29;
public static final int EXTENT=30;
public static final int EscapeSequence=31;
public static final int FALSE=32;
public static final int FETCH=33;
public static final int FLOATLITERAL=34;
public static final int FRAGMENT=35;
public static final int FROM=36;
public static final int GRANT=37;
public static final int GROUP=38;
public static final int GT=39;
public static final int GTEQ=40;
public static final int HAVING=41;
public static final int HEXLITERAL=42;
public static final int HexDigit=43;
public static final int HexPrefix=44;
public static final int IDENTIFIER=45;
public static final int IMMEDIATE=46;
public static final int IN=47;
public static final int INSERT=48;
public static final int INTLITERAL=49;
public static final int INTO=50;
public static final int IS=51;
public static final int IntegerNumber=52;
public static final int KEY=53;
public static final int LETTER=54;
public static final int LIKE=55;
public static final int LINE_COMMENT=56;
public static final int LPAREN=57;
public static final int LT=58;
public static final int LTEQ=59;
public static final int MINUS=60;
public static final int MOD=61;
public static final int MULT=62;
public static final int NEXT=63;
public static final int NIL=64;
public static final int NOT=65;
public static final int NOT_EQUAL=66;
public static final int NULL=67;
public static final int ON=68;
public static final int ON_SESSION=69;
public static final int OPEN=70;
public static final int OR=71;
public static final int ORDER=72;
public static final int PLUS=73;
public static final int PRIMARY=74;
public static final int PROCEDURE=75;
public static final int REVOKE=76;
public static final int RPAREN=77;
public static final int SELECT=78;
public static final int SEMI=79;
public static final int SESSION=80;
public static final int SET=81;
public static final int SQL=82;
public static final int SQL_CURSOR=83;
public static final int SQL_DELETE=84;
public static final int SQL_EXECUTE_IMMEDIATE=85;
public static final int SQL_EXECUTE_PROCEDURE=86;
public static final int SQL_INSERT=87;
public static final int SQL_SELECT=88;
public static final int SQL_UPDATE=89;
public static final int STRINGLITERAL=90;
public static final int TRUE=91;
public static final int UNDERSCORE=92;
public static final int UPDATE=93;
public static final int VALUES=94;
public static final int WHERE=95;
public static final int WS=96;
// delegates
public Parser[] getDelegates() {
return new Parser[] {};
}
// delegators
public ToolSQLParser(TokenStream input) {
this(input, new RecognizerSharedState());
}
public ToolSQLParser(TokenStream input, RecognizerSharedState state) {
super(input, state);
this.state.ruleMemo = new HashMap[148+1];
}
protected TreeAdaptor adaptor = new CommonTreeAdaptor();
public void setTreeAdaptor(TreeAdaptor adaptor) {
this.adaptor = adaptor;
}
public TreeAdaptor getTreeAdaptor() {
return adaptor;
}
public String[] getTokenNames() { return ToolSQLParser.tokenNames; }
public String getGrammarFileName() { return "/Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g"; }
public Map<String, TableDefinition> tables = new HashMap<String, TableDefinition>();
CitrusleafClient clClient;
public void connectCitrusleaf(String host, int port){
if (this.clClient != null){
this.clClient = null;
}
this.clClient = new CitrusleafClient( host, port);
// wait for connection
long startTime = System.currentTimeMillis();
while( !this.clClient.isConnected() && (System.currentTimeMillis() < startTime + 4000)) {
try {
Thread.sleep(10) ;
} catch (Exception e) {
;
}
}
if( !this.clClient.isConnected() ){
System.out.println("Could not connect to cluster - have correct host and port?");
this.clClient = null;
return;
}
}
public void connectCitrusleaf(CitrusleafClient client){
this.clClient = client;
}
public static class sql_file_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "sql_file"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:79:1: sql_file : ( sql_statement )* EOF ;
public final ToolSQLParser.sql_file_return sql_file() throws RecognitionException {
ToolSQLParser.sql_file_return retval = new ToolSQLParser.sql_file_return();
retval.start = input.LT(1);
int sql_file_StartIndex = input.index();
CommonTree root_0 = null;
Token EOF2=null;
ToolSQLParser.sql_statement_return sql_statement1 =null;
CommonTree EOF2_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 1) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:80:2: ( ( sql_statement )* EOF )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:80:4: ( sql_statement )* EOF
{
root_0 = (CommonTree)adaptor.nil();
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:80:4: ( sql_statement )*
loop1:
do {
int alt1=2;
int LA1_0 = input.LA(1);
if ( (LA1_0==DELETE||LA1_0==INSERT||LA1_0==SELECT||LA1_0==SET||LA1_0==UPDATE||(LA1_0 >= 97 && LA1_0 <= 99)) ) {
alt1=1;
}
switch (alt1) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:80:4: sql_statement
{
pushFollow(FOLLOW_sql_statement_in_sql_file163);
sql_statement1=sql_statement();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_statement1.getTree());
}
break;
default :
break loop1;
}
} while (true);
EOF2=(Token)match(input,EOF,FOLLOW_EOF_in_sql_file166); if (state.failed) return retval;
if ( state.backtracking==0 ) {
EOF2_tree =
(CommonTree)adaptor.create(EOF2)
;
adaptor.addChild(root_0, EOF2_tree);
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 1, sql_file_StartIndex); }
}
return retval;
}
// $ANTLR end "sql_file"
public static class sql_statement_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "sql_statement"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:83:1: sql_statement : ( sql_delete SEMI | sql_insert SEMI | sql_select SEMI | sql_update SEMI | ddl_drop_table | ddl_create_table | ddl_set | 'spool' IDENTIFIER ( DOT IDENTIFIER )* );
public final ToolSQLParser.sql_statement_return sql_statement() throws RecognitionException {
ToolSQLParser.sql_statement_return retval = new ToolSQLParser.sql_statement_return();
retval.start = input.LT(1);
int sql_statement_StartIndex = input.index();
CommonTree root_0 = null;
Token SEMI4=null;
Token SEMI6=null;
Token SEMI8=null;
Token SEMI10=null;
Token string_literal14=null;
Token IDENTIFIER15=null;
Token DOT16=null;
Token IDENTIFIER17=null;
ToolSQLParser.sql_delete_return sql_delete3 =null;
ToolSQLParser.sql_insert_return sql_insert5 =null;
ToolSQLParser.sql_select_return sql_select7 =null;
ToolSQLParser.sql_update_return sql_update9 =null;
ToolSQLParser.ddl_drop_table_return ddl_drop_table11 =null;
ToolSQLParser.ddl_create_table_return ddl_create_table12 =null;
ToolSQLParser.ddl_set_return ddl_set13 =null;
CommonTree SEMI4_tree=null;
CommonTree SEMI6_tree=null;
CommonTree SEMI8_tree=null;
CommonTree SEMI10_tree=null;
CommonTree string_literal14_tree=null;
CommonTree IDENTIFIER15_tree=null;
CommonTree DOT16_tree=null;
CommonTree IDENTIFIER17_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 2) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:84:3: ( sql_delete SEMI | sql_insert SEMI | sql_select SEMI | sql_update SEMI | ddl_drop_table | ddl_create_table | ddl_set | 'spool' IDENTIFIER ( DOT IDENTIFIER )* )
int alt3=8;
switch ( input.LA(1) ) {
case DELETE:
{
alt3=1;
}
break;
case INSERT:
{
alt3=2;
}
break;
case SELECT:
{
alt3=3;
}
break;
case UPDATE:
{
alt3=4;
}
break;
case 98:
{
alt3=5;
}
break;
case 97:
{
alt3=6;
}
break;
case SET:
{
alt3=7;
}
break;
case 99:
{
alt3=8;
}
break;
default:
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 3, 0, input);
throw nvae;
}
switch (alt3) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:84:5: sql_delete SEMI
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_sql_delete_in_sql_statement179);
sql_delete3=sql_delete();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_delete3.getTree());
SEMI4=(Token)match(input,SEMI,FOLLOW_SEMI_in_sql_statement181); if (state.failed) return retval;
if ( state.backtracking==0 ) {
SEMI4_tree =
(CommonTree)adaptor.create(SEMI4)
;
adaptor.addChild(root_0, SEMI4_tree);
}
}
break;
case 2 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:85:5: sql_insert SEMI
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_sql_insert_in_sql_statement187);
sql_insert5=sql_insert();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_insert5.getTree());
SEMI6=(Token)match(input,SEMI,FOLLOW_SEMI_in_sql_statement189); if (state.failed) return retval;
if ( state.backtracking==0 ) {
SEMI6_tree =
(CommonTree)adaptor.create(SEMI6)
;
adaptor.addChild(root_0, SEMI6_tree);
}
}
break;
case 3 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:86:5: sql_select SEMI
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_sql_select_in_sql_statement195);
sql_select7=sql_select();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_select7.getTree());
SEMI8=(Token)match(input,SEMI,FOLLOW_SEMI_in_sql_statement197); if (state.failed) return retval;
if ( state.backtracking==0 ) {
SEMI8_tree =
(CommonTree)adaptor.create(SEMI8)
;
adaptor.addChild(root_0, SEMI8_tree);
}
}
break;
case 4 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:87:5: sql_update SEMI
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_sql_update_in_sql_statement203);
sql_update9=sql_update();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_update9.getTree());
SEMI10=(Token)match(input,SEMI,FOLLOW_SEMI_in_sql_statement205); if (state.failed) return retval;
if ( state.backtracking==0 ) {
SEMI10_tree =
(CommonTree)adaptor.create(SEMI10)
;
adaptor.addChild(root_0, SEMI10_tree);
}
}
break;
case 5 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:88:5: ddl_drop_table
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_ddl_drop_table_in_sql_statement211);
ddl_drop_table11=ddl_drop_table();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, ddl_drop_table11.getTree());
}
break;
case 6 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:89:5: ddl_create_table
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_ddl_create_table_in_sql_statement217);
ddl_create_table12=ddl_create_table();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, ddl_create_table12.getTree());
}
break;
case 7 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:90:5: ddl_set
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_ddl_set_in_sql_statement223);
ddl_set13=ddl_set();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, ddl_set13.getTree());
}
break;
case 8 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:91:5: 'spool' IDENTIFIER ( DOT IDENTIFIER )*
{
root_0 = (CommonTree)adaptor.nil();
string_literal14=(Token)match(input,99,FOLLOW_99_in_sql_statement229); if (state.failed) return retval;
if ( state.backtracking==0 ) {
string_literal14_tree =
(CommonTree)adaptor.create(string_literal14)
;
adaptor.addChild(root_0, string_literal14_tree);
}
IDENTIFIER15=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_sql_statement231); if (state.failed) return retval;
if ( state.backtracking==0 ) {
IDENTIFIER15_tree =
(CommonTree)adaptor.create(IDENTIFIER15)
;
adaptor.addChild(root_0, IDENTIFIER15_tree);
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:91:24: ( DOT IDENTIFIER )*
loop2:
do {
int alt2=2;
int LA2_0 = input.LA(1);
if ( (LA2_0==DOT) ) {
alt2=1;
}
switch (alt2) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:91:25: DOT IDENTIFIER
{
DOT16=(Token)match(input,DOT,FOLLOW_DOT_in_sql_statement234); if (state.failed) return retval;
if ( state.backtracking==0 ) {
DOT16_tree =
(CommonTree)adaptor.create(DOT16)
;
adaptor.addChild(root_0, DOT16_tree);
}
IDENTIFIER17=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_sql_statement236); if (state.failed) return retval;
if ( state.backtracking==0 ) {
IDENTIFIER17_tree =
(CommonTree)adaptor.create(IDENTIFIER17)
;
adaptor.addChild(root_0, IDENTIFIER17_tree);
}
}
break;
default :
break loop2;
}
} while (true);
}
break;
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 2, sql_statement_StartIndex); }
}
return retval;
}
// $ANTLR end "sql_statement"
public static class ddl_drop_table_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "ddl_drop_table"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:94:1: ddl_drop_table : 'drop' 'table' table_name SEMI ;
public final ToolSQLParser.ddl_drop_table_return ddl_drop_table() throws RecognitionException {
ToolSQLParser.ddl_drop_table_return retval = new ToolSQLParser.ddl_drop_table_return();
retval.start = input.LT(1);
int ddl_drop_table_StartIndex = input.index();
CommonTree root_0 = null;
Token string_literal18=null;
Token string_literal19=null;
Token SEMI21=null;
ToolSQLParser.table_name_return table_name20 =null;
CommonTree string_literal18_tree=null;
CommonTree string_literal19_tree=null;
CommonTree SEMI21_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 3) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:95:2: ( 'drop' 'table' table_name SEMI )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:95:4: 'drop' 'table' table_name SEMI
{
root_0 = (CommonTree)adaptor.nil();
string_literal18=(Token)match(input,98,FOLLOW_98_in_ddl_drop_table250); if (state.failed) return retval;
if ( state.backtracking==0 ) {
string_literal18_tree =
(CommonTree)adaptor.create(string_literal18)
;
adaptor.addChild(root_0, string_literal18_tree);
}
string_literal19=(Token)match(input,100,FOLLOW_100_in_ddl_drop_table252); if (state.failed) return retval;
if ( state.backtracking==0 ) {
string_literal19_tree =
(CommonTree)adaptor.create(string_literal19)
;
adaptor.addChild(root_0, string_literal19_tree);
}
pushFollow(FOLLOW_table_name_in_ddl_drop_table254);
table_name20=table_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, table_name20.getTree());
SEMI21=(Token)match(input,SEMI,FOLLOW_SEMI_in_ddl_drop_table256); if (state.failed) return retval;
if ( state.backtracking==0 ) {
SEMI21_tree =
(CommonTree)adaptor.create(SEMI21)
;
adaptor.addChild(root_0, SEMI21_tree);
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 3, ddl_drop_table_StartIndex); }
}
return retval;
}
// $ANTLR end "ddl_drop_table"
protected static class ddl_create_table_scope {
TableDefinition currentTable;
}
protected Stack ddl_create_table_stack = new Stack();
public static class ddl_create_table_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "ddl_create_table"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:98:1: ddl_create_table : 'create' 'table' table_name LPAREN ddl_column ( COMMA ddl_column )* RPAREN SEMI ;
public final ToolSQLParser.ddl_create_table_return ddl_create_table() throws RecognitionException {
ddl_create_table_stack.push(new ddl_create_table_scope());
ToolSQLParser.ddl_create_table_return retval = new ToolSQLParser.ddl_create_table_return();
retval.start = input.LT(1);
int ddl_create_table_StartIndex = input.index();
CommonTree root_0 = null;
Token string_literal22=null;
Token string_literal23=null;
Token LPAREN25=null;
Token COMMA27=null;
Token RPAREN29=null;
Token SEMI30=null;
ToolSQLParser.table_name_return table_name24 =null;
ToolSQLParser.ddl_column_return ddl_column26 =null;
ToolSQLParser.ddl_column_return ddl_column28 =null;
CommonTree string_literal22_tree=null;
CommonTree string_literal23_tree=null;
CommonTree LPAREN25_tree=null;
CommonTree COMMA27_tree=null;
CommonTree RPAREN29_tree=null;
CommonTree SEMI30_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 4) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:102:2: ( 'create' 'table' table_name LPAREN ddl_column ( COMMA ddl_column )* RPAREN SEMI )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:102:4: 'create' 'table' table_name LPAREN ddl_column ( COMMA ddl_column )* RPAREN SEMI
{
root_0 = (CommonTree)adaptor.nil();
string_literal22=(Token)match(input,97,FOLLOW_97_in_ddl_create_table271); if (state.failed) return retval;
if ( state.backtracking==0 ) {
string_literal22_tree =
(CommonTree)adaptor.create(string_literal22)
;
adaptor.addChild(root_0, string_literal22_tree);
}
string_literal23=(Token)match(input,100,FOLLOW_100_in_ddl_create_table273); if (state.failed) return retval;
if ( state.backtracking==0 ) {
string_literal23_tree =
(CommonTree)adaptor.create(string_literal23)
;
adaptor.addChild(root_0, string_literal23_tree);
}
pushFollow(FOLLOW_table_name_in_ddl_create_table275);
table_name24=table_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, table_name24.getTree());
if ( state.backtracking==0 ) {((ddl_create_table_scope)ddl_create_table_stack.peek()).currentTable =new TableDefinition((table_name24!=null?input.toString(table_name24.start,table_name24.stop):null));
tables.put((table_name24!=null?input.toString(table_name24.start,table_name24.stop):null), ((ddl_create_table_scope)ddl_create_table_stack.peek()).currentTable);}
LPAREN25=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_ddl_create_table283); if (state.failed) return retval;
if ( state.backtracking==0 ) {
LPAREN25_tree =
(CommonTree)adaptor.create(LPAREN25)
;
adaptor.addChild(root_0, LPAREN25_tree);
}
pushFollow(FOLLOW_ddl_column_in_ddl_create_table287);
ddl_column26=ddl_column();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, ddl_column26.getTree());
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:106:14: ( COMMA ddl_column )*
loop4:
do {
int alt4=2;
int LA4_0 = input.LA(1);
if ( (LA4_0==COMMA) ) {
alt4=1;
}
switch (alt4) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:106:15: COMMA ddl_column
{
COMMA27=(Token)match(input,COMMA,FOLLOW_COMMA_in_ddl_create_table290); if (state.failed) return retval;
if ( state.backtracking==0 ) {
COMMA27_tree =
(CommonTree)adaptor.create(COMMA27)
;
adaptor.addChild(root_0, COMMA27_tree);
}
pushFollow(FOLLOW_ddl_column_in_ddl_create_table292);
ddl_column28=ddl_column();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, ddl_column28.getTree());
}
break;
default :
break loop4;
}
} while (true);
RPAREN29=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_ddl_create_table298); if (state.failed) return retval;
if ( state.backtracking==0 ) {
RPAREN29_tree =
(CommonTree)adaptor.create(RPAREN29)
;
adaptor.addChild(root_0, RPAREN29_tree);
}
SEMI30=(Token)match(input,SEMI,FOLLOW_SEMI_in_ddl_create_table300); if (state.failed) return retval;
if ( state.backtracking==0 ) {
SEMI30_tree =
(CommonTree)adaptor.create(SEMI30)
;
adaptor.addChild(root_0, SEMI30_tree);
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 4, ddl_create_table_StartIndex); }
ddl_create_table_stack.pop();
}
return retval;
}
// $ANTLR end "ddl_create_table"
public static class ddl_column_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "ddl_column"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:110:1: ddl_column : (name= column_name ct1= column_type ( NOT )? ( NULL )? ( PRIMARY KEY )? | PRIMARY KEY LPAREN c1= column_name ( COMMA c2= column_name )* RPAREN );
public final ToolSQLParser.ddl_column_return ddl_column() throws RecognitionException {
ToolSQLParser.ddl_column_return retval = new ToolSQLParser.ddl_column_return();
retval.start = input.LT(1);
int ddl_column_StartIndex = input.index();
CommonTree root_0 = null;
Token NOT31=null;
Token NULL32=null;
Token PRIMARY33=null;
Token KEY34=null;
Token PRIMARY35=null;
Token KEY36=null;
Token LPAREN37=null;
Token COMMA38=null;
Token RPAREN39=null;
ToolSQLParser.column_name_return name =null;
ToolSQLParser.column_type_return ct1 =null;
ToolSQLParser.column_name_return c1 =null;
ToolSQLParser.column_name_return c2 =null;
CommonTree NOT31_tree=null;
CommonTree NULL32_tree=null;
CommonTree PRIMARY33_tree=null;
CommonTree KEY34_tree=null;
CommonTree PRIMARY35_tree=null;
CommonTree KEY36_tree=null;
CommonTree LPAREN37_tree=null;
CommonTree COMMA38_tree=null;
CommonTree RPAREN39_tree=null;
List<ColumnDefinition> keyColumns = new ArrayList<ColumnDefinition>();
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 5) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:114:2: (name= column_name ct1= column_type ( NOT )? ( NULL )? ( PRIMARY KEY )? | PRIMARY KEY LPAREN c1= column_name ( COMMA c2= column_name )* RPAREN )
int alt9=2;
int LA9_0 = input.LA(1);
if ( (LA9_0==IDENTIFIER) ) {
alt9=1;
}
else if ( (LA9_0==PRIMARY) ) {
alt9=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 9, 0, input);
throw nvae;
}
switch (alt9) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:114:4: name= column_name ct1= column_type ( NOT )? ( NULL )? ( PRIMARY KEY )?
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_column_name_in_ddl_column318);
name=column_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, name.getTree());
pushFollow(FOLLOW_column_type_in_ddl_column322);
ct1=column_type();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, ct1.getTree());
if ( state.backtracking==0 ) {
ColumnDefinition cd = new ColumnDefinition((name!=null?input.toString(name.start,name.stop):null), (ct1!=null?input.toString(ct1.start,ct1.stop):null));
((ddl_create_table_scope)ddl_create_table_stack.peek()).currentTable.addColumn(cd);
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:119:4: ( NOT )?
int alt5=2;
int LA5_0 = input.LA(1);
if ( (LA5_0==NOT) ) {
alt5=1;
}
switch (alt5) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:119:4: NOT
{
NOT31=(Token)match(input,NOT,FOLLOW_NOT_in_ddl_column333); if (state.failed) return retval;
if ( state.backtracking==0 ) {
NOT31_tree =
(CommonTree)adaptor.create(NOT31)
;
adaptor.addChild(root_0, NOT31_tree);
}
}
break;
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:119:9: ( NULL )?
int alt6=2;
int LA6_0 = input.LA(1);
if ( (LA6_0==NULL) ) {
alt6=1;
}
switch (alt6) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:119:9: NULL
{
NULL32=(Token)match(input,NULL,FOLLOW_NULL_in_ddl_column336); if (state.failed) return retval;
if ( state.backtracking==0 ) {
NULL32_tree =
(CommonTree)adaptor.create(NULL32)
;
adaptor.addChild(root_0, NULL32_tree);
}
}
break;
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:119:15: ( PRIMARY KEY )?
int alt7=2;
int LA7_0 = input.LA(1);
if ( (LA7_0==PRIMARY) ) {
alt7=1;
}
switch (alt7) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:119:16: PRIMARY KEY
{
PRIMARY33=(Token)match(input,PRIMARY,FOLLOW_PRIMARY_in_ddl_column340); if (state.failed) return retval;
if ( state.backtracking==0 ) {
PRIMARY33_tree =
(CommonTree)adaptor.create(PRIMARY33)
;
adaptor.addChild(root_0, PRIMARY33_tree);
}
KEY34=(Token)match(input,KEY,FOLLOW_KEY_in_ddl_column342); if (state.failed) return retval;
if ( state.backtracking==0 ) {
KEY34_tree =
(CommonTree)adaptor.create(KEY34)
;
adaptor.addChild(root_0, KEY34_tree);
}
if ( state.backtracking==0 ) {
((ddl_create_table_scope)ddl_create_table_stack.peek()).currentTable.addToPrimaryKey((name!=null?input.toString(name.start,name.stop):null));
}
}
break;
}
}
break;
case 2 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:124:4: PRIMARY KEY LPAREN c1= column_name ( COMMA c2= column_name )* RPAREN
{
root_0 = (CommonTree)adaptor.nil();
PRIMARY35=(Token)match(input,PRIMARY,FOLLOW_PRIMARY_in_ddl_column358); if (state.failed) return retval;
if ( state.backtracking==0 ) {
PRIMARY35_tree =
(CommonTree)adaptor.create(PRIMARY35)
;
adaptor.addChild(root_0, PRIMARY35_tree);
}
KEY36=(Token)match(input,KEY,FOLLOW_KEY_in_ddl_column360); if (state.failed) return retval;
if ( state.backtracking==0 ) {
KEY36_tree =
(CommonTree)adaptor.create(KEY36)
;
adaptor.addChild(root_0, KEY36_tree);
}
LPAREN37=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_ddl_column362); if (state.failed) return retval;
if ( state.backtracking==0 ) {
LPAREN37_tree =
(CommonTree)adaptor.create(LPAREN37)
;
adaptor.addChild(root_0, LPAREN37_tree);
}
pushFollow(FOLLOW_column_name_in_ddl_column366);
c1=column_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, c1.getTree());
if ( state.backtracking==0 ) {
((ddl_create_table_scope)ddl_create_table_stack.peek()).currentTable.addToPrimaryKey((c1!=null?input.toString(c1.start,c1.stop):null));
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:127:4: ( COMMA c2= column_name )*
loop8:
do {
int alt8=2;
int LA8_0 = input.LA(1);
if ( (LA8_0==COMMA) ) {
alt8=1;
}
switch (alt8) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:127:5: COMMA c2= column_name
{
COMMA38=(Token)match(input,COMMA,FOLLOW_COMMA_in_ddl_column374); if (state.failed) return retval;
if ( state.backtracking==0 ) {
COMMA38_tree =
(CommonTree)adaptor.create(COMMA38)
;
adaptor.addChild(root_0, COMMA38_tree);
}
pushFollow(FOLLOW_column_name_in_ddl_column378);
c2=column_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, c2.getTree());
if ( state.backtracking==0 ) {((ddl_create_table_scope)ddl_create_table_stack.peek()).currentTable.addToPrimaryKey((c2!=null?input.toString(c2.start,c2.stop):null));}
}
break;
default :
break loop8;
}
} while (true);
RPAREN39=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_ddl_column384); if (state.failed) return retval;
if ( state.backtracking==0 ) {
RPAREN39_tree =
(CommonTree)adaptor.create(RPAREN39)
;
adaptor.addChild(root_0, RPAREN39_tree);
}
}
break;
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 5, ddl_column_StartIndex); }
}
return retval;
}
// $ANTLR end "ddl_column"
public static class ddl_set_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "ddl_set"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:130:1: ddl_set : 'set' IDENTIFIER IDENTIFIER SEMI ;
public final ToolSQLParser.ddl_set_return ddl_set() throws RecognitionException {
ToolSQLParser.ddl_set_return retval = new ToolSQLParser.ddl_set_return();
retval.start = input.LT(1);
int ddl_set_StartIndex = input.index();
CommonTree root_0 = null;
Token string_literal40=null;
Token IDENTIFIER41=null;
Token IDENTIFIER42=null;
Token SEMI43=null;
CommonTree string_literal40_tree=null;
CommonTree IDENTIFIER41_tree=null;
CommonTree IDENTIFIER42_tree=null;
CommonTree SEMI43_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 6) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:131:2: ( 'set' IDENTIFIER IDENTIFIER SEMI )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:131:4: 'set' IDENTIFIER IDENTIFIER SEMI
{
root_0 = (CommonTree)adaptor.nil();
string_literal40=(Token)match(input,SET,FOLLOW_SET_in_ddl_set395); if (state.failed) return retval;
if ( state.backtracking==0 ) {
string_literal40_tree =
(CommonTree)adaptor.create(string_literal40)
;
adaptor.addChild(root_0, string_literal40_tree);
}
IDENTIFIER41=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_ddl_set397); if (state.failed) return retval;
if ( state.backtracking==0 ) {
IDENTIFIER41_tree =
(CommonTree)adaptor.create(IDENTIFIER41)
;
adaptor.addChild(root_0, IDENTIFIER41_tree);
}
IDENTIFIER42=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_ddl_set399); if (state.failed) return retval;
if ( state.backtracking==0 ) {
IDENTIFIER42_tree =
(CommonTree)adaptor.create(IDENTIFIER42)
;
adaptor.addChild(root_0, IDENTIFIER42_tree);
}
SEMI43=(Token)match(input,SEMI,FOLLOW_SEMI_in_ddl_set401); if (state.failed) return retval;
if ( state.backtracking==0 ) {
SEMI43_tree =
(CommonTree)adaptor.create(SEMI43)
;
adaptor.addChild(root_0, SEMI43_tree);
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 6, ddl_set_StartIndex); }
}
return retval;
}
// $ANTLR end "ddl_set"
public static class sql_delete_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "sql_delete"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:134:1: sql_delete : DELETE FROM table_name ( WHERE search_expression )? ( on_session )? ;
public final ToolSQLParser.sql_delete_return sql_delete() throws RecognitionException {
ToolSQLParser.sql_delete_return retval = new ToolSQLParser.sql_delete_return();
retval.start = input.LT(1);
int sql_delete_StartIndex = input.index();
CommonTree root_0 = null;
Token DELETE44=null;
Token FROM45=null;
Token WHERE47=null;
ToolSQLParser.table_name_return table_name46 =null;
ToolSQLParser.search_expression_return search_expression48 =null;
ToolSQLParser.on_session_return on_session49 =null;
CommonTree DELETE44_tree=null;
CommonTree FROM45_tree=null;
CommonTree WHERE47_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 7) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:135:3: ( DELETE FROM table_name ( WHERE search_expression )? ( on_session )? )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:135:5: DELETE FROM table_name ( WHERE search_expression )? ( on_session )?
{
root_0 = (CommonTree)adaptor.nil();
DELETE44=(Token)match(input,DELETE,FOLLOW_DELETE_in_sql_delete415); if (state.failed) return retval;
if ( state.backtracking==0 ) {
DELETE44_tree =
(CommonTree)adaptor.create(DELETE44)
;
adaptor.addChild(root_0, DELETE44_tree);
}
FROM45=(Token)match(input,FROM,FOLLOW_FROM_in_sql_delete417); if (state.failed) return retval;
if ( state.backtracking==0 ) {
FROM45_tree =
(CommonTree)adaptor.create(FROM45)
;
adaptor.addChild(root_0, FROM45_tree);
}
pushFollow(FOLLOW_table_name_in_sql_delete419);
table_name46=table_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, table_name46.getTree());
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:136:5: ( WHERE search_expression )?
int alt10=2;
int LA10_0 = input.LA(1);
if ( (LA10_0==WHERE) ) {
alt10=1;
}
switch (alt10) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:136:6: WHERE search_expression
{
WHERE47=(Token)match(input,WHERE,FOLLOW_WHERE_in_sql_delete426); if (state.failed) return retval;
if ( state.backtracking==0 ) {
WHERE47_tree =
(CommonTree)adaptor.create(WHERE47)
;
adaptor.addChild(root_0, WHERE47_tree);
}
pushFollow(FOLLOW_search_expression_in_sql_delete428);
search_expression48=search_expression();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, search_expression48.getTree());
}
break;
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:137:5: ( on_session )?
int alt11=2;
int LA11_0 = input.LA(1);
if ( (LA11_0==ON) ) {
alt11=1;
}
switch (alt11) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:137:5: on_session
{
pushFollow(FOLLOW_on_session_in_sql_delete436);
on_session49=on_session();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, on_session49.getTree());
}
break;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 7, sql_delete_StartIndex); }
}
return retval;
}
// $ANTLR end "sql_delete"
public static class sql_insert_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "sql_insert"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:142:1: sql_insert : INSERT INTO table_name ( LPAREN column_list RPAREN )? VALUES LPAREN value_list RPAREN ( on_session )? ;
public final ToolSQLParser.sql_insert_return sql_insert() throws RecognitionException {
ToolSQLParser.sql_insert_return retval = new ToolSQLParser.sql_insert_return();
retval.start = input.LT(1);
int sql_insert_StartIndex = input.index();
CommonTree root_0 = null;
Token INSERT50=null;
Token INTO51=null;
Token LPAREN53=null;
Token RPAREN55=null;
Token VALUES56=null;
Token LPAREN57=null;
Token RPAREN59=null;
ToolSQLParser.table_name_return table_name52 =null;
ToolSQLParser.column_list_return column_list54 =null;
ToolSQLParser.value_list_return value_list58 =null;
ToolSQLParser.on_session_return on_session60 =null;
CommonTree INSERT50_tree=null;
CommonTree INTO51_tree=null;
CommonTree LPAREN53_tree=null;
CommonTree RPAREN55_tree=null;
CommonTree VALUES56_tree=null;
CommonTree LPAREN57_tree=null;
CommonTree RPAREN59_tree=null;
TableDefinition table = null;
String setName;
List<String> keyList;
String key = "";
List<CitrusleafClient.ClBin> bins = new ArrayList<CitrusleafClient.ClBin>();
List<String> columns = new ArrayList<String>();
List<Object> values = new ArrayList<Object>();
String customerName = "";
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 8) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:153:5: ( INSERT INTO table_name ( LPAREN column_list RPAREN )? VALUES LPAREN value_list RPAREN ( on_session )? )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:153:7: INSERT INTO table_name ( LPAREN column_list RPAREN )? VALUES LPAREN value_list RPAREN ( on_session )?
{
root_0 = (CommonTree)adaptor.nil();
INSERT50=(Token)match(input,INSERT,FOLLOW_INSERT_in_sql_insert462); if (state.failed) return retval;
if ( state.backtracking==0 ) {
INSERT50_tree =
(CommonTree)adaptor.create(INSERT50)
;
adaptor.addChild(root_0, INSERT50_tree);
}
INTO51=(Token)match(input,INTO,FOLLOW_INTO_in_sql_insert464); if (state.failed) return retval;
if ( state.backtracking==0 ) {
INTO51_tree =
(CommonTree)adaptor.create(INTO51)
;
adaptor.addChild(root_0, INTO51_tree);
}
pushFollow(FOLLOW_table_name_in_sql_insert466);
table_name52=table_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, table_name52.getTree());
if ( state.backtracking==0 ) {
table = tables.get((table_name52!=null?input.toString(table_name52.start,table_name52.stop):null));
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:157:7: ( LPAREN column_list RPAREN )?
int alt12=2;
int LA12_0 = input.LA(1);
if ( (LA12_0==LPAREN) ) {
alt12=1;
}
switch (alt12) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:157:8: LPAREN column_list RPAREN
{
LPAREN53=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_sql_insert483); if (state.failed) return retval;
if ( state.backtracking==0 ) {
LPAREN53_tree =
(CommonTree)adaptor.create(LPAREN53)
;
adaptor.addChild(root_0, LPAREN53_tree);
}
pushFollow(FOLLOW_column_list_in_sql_insert485);
column_list54=column_list();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, column_list54.getTree());
if ( state.backtracking==0 ) {columns = (column_list54!=null?column_list54.columNames:null);}
RPAREN55=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_sql_insert489); if (state.failed) return retval;
if ( state.backtracking==0 ) {
RPAREN55_tree =
(CommonTree)adaptor.create(RPAREN55)
;
adaptor.addChild(root_0, RPAREN55_tree);
}
}
break;
}
VALUES56=(Token)match(input,VALUES,FOLLOW_VALUES_in_sql_insert499); if (state.failed) return retval;
if ( state.backtracking==0 ) {
VALUES56_tree =
(CommonTree)adaptor.create(VALUES56)
;
adaptor.addChild(root_0, VALUES56_tree);
}
LPAREN57=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_sql_insert501); if (state.failed) return retval;
if ( state.backtracking==0 ) {
LPAREN57_tree =
(CommonTree)adaptor.create(LPAREN57)
;
adaptor.addChild(root_0, LPAREN57_tree);
}
pushFollow(FOLLOW_value_list_in_sql_insert509);
value_list58=value_list();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, value_list58.getTree());
if ( state.backtracking==0 ) {values = (value_list58!=null?value_list58.values:null);}
RPAREN59=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_sql_insert519); if (state.failed) return retval;
if ( state.backtracking==0 ) {
RPAREN59_tree =
(CommonTree)adaptor.create(RPAREN59)
;
adaptor.addChild(root_0, RPAREN59_tree);
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:161:7: ( on_session )?
int alt13=2;
int LA13_0 = input.LA(1);
if ( (LA13_0==ON) ) {
alt13=1;
}
switch (alt13) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:161:7: on_session
{
pushFollow(FOLLOW_on_session_in_sql_insert527);
on_session60=on_session();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, on_session60.getTree());
}
break;
}
if ( state.backtracking==0 ) {
for (int i = 0; i < values.size(); i++){
CitrusleafClient.ClBin bin = new CitrusleafClient.ClBin();
bin.name = table.getColums().get(i).name;
String aValue = values.get(i).toString();
if (aValue.startsWith("'") && aValue.endsWith("'")){
aValue = aValue.substring(1, aValue.length()-1);
}
bin.value = aValue;
bins.add(bin);
// Kludge for Holdings
if (bin.name.equalsIgnoreCase("CustomerName")){
customerName = (String)bin.value;
System.out.println("CustomerName: " + customerName);
}
}
if (table.getName().equalsIgnoreCase("orderIDtable")){
key = "Order";
} else {
for (ColumnDefinition cd : table.getPrimaryKey()){
String aValue = values.get(cd.position).toString();
if (aValue.startsWith("'") && aValue.endsWith("'")){
aValue = aValue.substring(1, aValue.length()-1);
}
key = key + aValue;
}
}
String set_name = table.getName();
// Kludge for Holdings
if (set_name.equalsIgnoreCase("Holding")){
set_name = customerName + "Holding";
}
System.out.println("Set: " + set_name + " key: " + key + " bins: " + bins);
if (this.clClient != null) {
ClResultCode rc = this.clClient.set(DBClient.NAME_SPACE, set_name, key, bins, null, null);
long stop = System.currentTimeMillis();
if (rc == ClResultCode.OK)
System.out.println("Completed write");
else
System.out.println("Failed write " + rc );
}
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 8, sql_insert_StartIndex); }
}
return retval;
}
// $ANTLR end "sql_insert"
public static class sql_update_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "sql_update"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:206:1: sql_update : UPDATE table_name SET column_name EQ sql_expression ( COMMA column_name EQ sql_expression )* ( WHERE search_expression )? ( on_session )? ;
public final ToolSQLParser.sql_update_return sql_update() throws RecognitionException {
ToolSQLParser.sql_update_return retval = new ToolSQLParser.sql_update_return();
retval.start = input.LT(1);
int sql_update_StartIndex = input.index();
CommonTree root_0 = null;
Token UPDATE61=null;
Token SET63=null;
Token EQ65=null;
Token COMMA67=null;
Token EQ69=null;
Token WHERE71=null;
ToolSQLParser.table_name_return table_name62 =null;
ToolSQLParser.column_name_return column_name64 =null;
ToolSQLParser.sql_expression_return sql_expression66 =null;
ToolSQLParser.column_name_return column_name68 =null;
ToolSQLParser.sql_expression_return sql_expression70 =null;
ToolSQLParser.search_expression_return search_expression72 =null;
ToolSQLParser.on_session_return on_session73 =null;
CommonTree UPDATE61_tree=null;
CommonTree SET63_tree=null;
CommonTree EQ65_tree=null;
CommonTree COMMA67_tree=null;
CommonTree EQ69_tree=null;
CommonTree WHERE71_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 9) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:207:5: ( UPDATE table_name SET column_name EQ sql_expression ( COMMA column_name EQ sql_expression )* ( WHERE search_expression )? ( on_session )? )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:207:7: UPDATE table_name SET column_name EQ sql_expression ( COMMA column_name EQ sql_expression )* ( WHERE search_expression )? ( on_session )?
{
root_0 = (CommonTree)adaptor.nil();
UPDATE61=(Token)match(input,UPDATE,FOLLOW_UPDATE_in_sql_update557); if (state.failed) return retval;
if ( state.backtracking==0 ) {
UPDATE61_tree =
(CommonTree)adaptor.create(UPDATE61)
;
adaptor.addChild(root_0, UPDATE61_tree);
}
pushFollow(FOLLOW_table_name_in_sql_update559);
table_name62=table_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, table_name62.getTree());
SET63=(Token)match(input,SET,FOLLOW_SET_in_sql_update561); if (state.failed) return retval;
if ( state.backtracking==0 ) {
SET63_tree =
(CommonTree)adaptor.create(SET63)
;
adaptor.addChild(root_0, SET63_tree);
}
pushFollow(FOLLOW_column_name_in_sql_update568);
column_name64=column_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, column_name64.getTree());
EQ65=(Token)match(input,EQ,FOLLOW_EQ_in_sql_update570); if (state.failed) return retval;
if ( state.backtracking==0 ) {
EQ65_tree =
(CommonTree)adaptor.create(EQ65)
;
adaptor.addChild(root_0, EQ65_tree);
}
pushFollow(FOLLOW_sql_expression_in_sql_update572);
sql_expression66=sql_expression();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_expression66.getTree());
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:209:6: ( COMMA column_name EQ sql_expression )*
loop14:
do {
int alt14=2;
int LA14_0 = input.LA(1);
if ( (LA14_0==COMMA) ) {
alt14=1;
}
switch (alt14) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:209:7: COMMA column_name EQ sql_expression
{
COMMA67=(Token)match(input,COMMA,FOLLOW_COMMA_in_sql_update580); if (state.failed) return retval;
if ( state.backtracking==0 ) {
COMMA67_tree =
(CommonTree)adaptor.create(COMMA67)
;
adaptor.addChild(root_0, COMMA67_tree);
}
pushFollow(FOLLOW_column_name_in_sql_update582);
column_name68=column_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, column_name68.getTree());
EQ69=(Token)match(input,EQ,FOLLOW_EQ_in_sql_update584); if (state.failed) return retval;
if ( state.backtracking==0 ) {
EQ69_tree =
(CommonTree)adaptor.create(EQ69)
;
adaptor.addChild(root_0, EQ69_tree);
}
pushFollow(FOLLOW_sql_expression_in_sql_update586);
sql_expression70=sql_expression();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_expression70.getTree());
}
break;
default :
break loop14;
}
} while (true);
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:210:7: ( WHERE search_expression )?
int alt15=2;
int LA15_0 = input.LA(1);
if ( (LA15_0==WHERE) ) {
alt15=1;
}
switch (alt15) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:210:8: WHERE search_expression
{
WHERE71=(Token)match(input,WHERE,FOLLOW_WHERE_in_sql_update597); if (state.failed) return retval;
if ( state.backtracking==0 ) {
WHERE71_tree =
(CommonTree)adaptor.create(WHERE71)
;
adaptor.addChild(root_0, WHERE71_tree);
}
pushFollow(FOLLOW_search_expression_in_sql_update599);
search_expression72=search_expression();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, search_expression72.getTree());
}
break;
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:211:7: ( on_session )?
int alt16=2;
int LA16_0 = input.LA(1);
if ( (LA16_0==ON) ) {
alt16=1;
}
switch (alt16) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:211:7: on_session
{
pushFollow(FOLLOW_on_session_in_sql_update609);
on_session73=on_session();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, on_session73.getTree());
}
break;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 9, sql_update_StartIndex); }
}
return retval;
}
// $ANTLR end "sql_update"
public static class sql_select_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "sql_select"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:215:1: sql_select : SELECT ( allDistinct )? column_list ( INTO bind_variable )? FROM table_list ( WHERE search_expression )? ( group_by )? ( HAVING search_expression )? ( order_by )? ( on_session )? ;
public final ToolSQLParser.sql_select_return sql_select() throws RecognitionException {
ToolSQLParser.sql_select_return retval = new ToolSQLParser.sql_select_return();
retval.start = input.LT(1);
int sql_select_StartIndex = input.index();
CommonTree root_0 = null;
Token SELECT74=null;
Token INTO77=null;
Token FROM79=null;
Token WHERE81=null;
Token HAVING84=null;
ToolSQLParser.allDistinct_return allDistinct75 =null;
ToolSQLParser.column_list_return column_list76 =null;
ToolSQLParser.bind_variable_return bind_variable78 =null;
ToolSQLParser.table_list_return table_list80 =null;
ToolSQLParser.search_expression_return search_expression82 =null;
ToolSQLParser.group_by_return group_by83 =null;
ToolSQLParser.search_expression_return search_expression85 =null;
ToolSQLParser.order_by_return order_by86 =null;
ToolSQLParser.on_session_return on_session87 =null;
CommonTree SELECT74_tree=null;
CommonTree INTO77_tree=null;
CommonTree FROM79_tree=null;
CommonTree WHERE81_tree=null;
CommonTree HAVING84_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 10) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:216:3: ( SELECT ( allDistinct )? column_list ( INTO bind_variable )? FROM table_list ( WHERE search_expression )? ( group_by )? ( HAVING search_expression )? ( order_by )? ( on_session )? )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:216:5: SELECT ( allDistinct )? column_list ( INTO bind_variable )? FROM table_list ( WHERE search_expression )? ( group_by )? ( HAVING search_expression )? ( order_by )? ( on_session )?
{
root_0 = (CommonTree)adaptor.nil();
SELECT74=(Token)match(input,SELECT,FOLLOW_SELECT_in_sql_select628); if (state.failed) return retval;
if ( state.backtracking==0 ) {
SELECT74_tree =
(CommonTree)adaptor.create(SELECT74)
;
adaptor.addChild(root_0, SELECT74_tree);
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:217:4: ( allDistinct )?
int alt17=2;
int LA17_0 = input.LA(1);
if ( (LA17_0==ALL||LA17_0==DISTINCT) ) {
alt17=1;
}
switch (alt17) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:217:4: allDistinct
{
pushFollow(FOLLOW_allDistinct_in_sql_select634);
allDistinct75=allDistinct();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, allDistinct75.getTree());
}
break;
}
pushFollow(FOLLOW_column_list_in_sql_select641);
column_list76=column_list();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, column_list76.getTree());
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:219:3: ( INTO bind_variable )?
int alt18=2;
int LA18_0 = input.LA(1);
if ( (LA18_0==INTO) ) {
alt18=1;
}
switch (alt18) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:219:4: INTO bind_variable
{
INTO77=(Token)match(input,INTO,FOLLOW_INTO_in_sql_select646); if (state.failed) return retval;
if ( state.backtracking==0 ) {
INTO77_tree =
(CommonTree)adaptor.create(INTO77)
;
adaptor.addChild(root_0, INTO77_tree);
}
pushFollow(FOLLOW_bind_variable_in_sql_select648);
bind_variable78=bind_variable();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, bind_variable78.getTree());
}
break;
}
FROM79=(Token)match(input,FROM,FOLLOW_FROM_in_sql_select654); if (state.failed) return retval;
if ( state.backtracking==0 ) {
FROM79_tree =
(CommonTree)adaptor.create(FROM79)
;
adaptor.addChild(root_0, FROM79_tree);
}
pushFollow(FOLLOW_table_list_in_sql_select656);
table_list80=table_list();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, table_list80.getTree());
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:221:3: ( WHERE search_expression )?
int alt19=2;
int LA19_0 = input.LA(1);
if ( (LA19_0==WHERE) ) {
alt19=1;
}
switch (alt19) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:221:4: WHERE search_expression
{
WHERE81=(Token)match(input,WHERE,FOLLOW_WHERE_in_sql_select661); if (state.failed) return retval;
if ( state.backtracking==0 ) {
WHERE81_tree =
(CommonTree)adaptor.create(WHERE81)
;
adaptor.addChild(root_0, WHERE81_tree);
}
pushFollow(FOLLOW_search_expression_in_sql_select663);
search_expression82=search_expression();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, search_expression82.getTree());
}
break;
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:222:3: ( group_by )?
int alt20=2;
int LA20_0 = input.LA(1);
if ( (LA20_0==GROUP) ) {
alt20=1;
}
switch (alt20) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:222:3: group_by
{
pushFollow(FOLLOW_group_by_in_sql_select669);
group_by83=group_by();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, group_by83.getTree());
}
break;
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:223:3: ( HAVING search_expression )?
int alt21=2;
int LA21_0 = input.LA(1);
if ( (LA21_0==HAVING) ) {
alt21=1;
}
switch (alt21) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:223:4: HAVING search_expression
{
HAVING84=(Token)match(input,HAVING,FOLLOW_HAVING_in_sql_select675); if (state.failed) return retval;
if ( state.backtracking==0 ) {
HAVING84_tree =
(CommonTree)adaptor.create(HAVING84)
;
adaptor.addChild(root_0, HAVING84_tree);
}
pushFollow(FOLLOW_search_expression_in_sql_select677);
search_expression85=search_expression();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, search_expression85.getTree());
}
break;
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:224:3: ( order_by )?
int alt22=2;
int LA22_0 = input.LA(1);
if ( (LA22_0==ORDER) ) {
alt22=1;
}
switch (alt22) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:224:3: order_by
{
pushFollow(FOLLOW_order_by_in_sql_select683);
order_by86=order_by();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, order_by86.getTree());
}
break;
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:225:3: ( on_session )?
int alt23=2;
int LA23_0 = input.LA(1);
if ( (LA23_0==ON) ) {
alt23=1;
}
switch (alt23) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:225:3: on_session
{
pushFollow(FOLLOW_on_session_in_sql_select688);
on_session87=on_session();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, on_session87.getTree());
}
break;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 10, sql_select_StartIndex); }
}
return retval;
}
// $ANTLR end "sql_select"
public static class allDistinct_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "allDistinct"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:228:1: allDistinct : ( ALL | DISTINCT );
public final ToolSQLParser.allDistinct_return allDistinct() throws RecognitionException {
ToolSQLParser.allDistinct_return retval = new ToolSQLParser.allDistinct_return();
retval.start = input.LT(1);
int allDistinct_StartIndex = input.index();
CommonTree root_0 = null;
Token set88=null;
CommonTree set88_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 11) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:229:3: ( ALL | DISTINCT )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:
{
root_0 = (CommonTree)adaptor.nil();
set88=(Token)input.LT(1);
if ( input.LA(1)==ALL||input.LA(1)==DISTINCT ) {
input.consume();
if ( state.backtracking==0 ) adaptor.addChild(root_0,
(CommonTree)adaptor.create(set88)
);
state.errorRecovery=false;
state.failed=false;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
MismatchedSetException mse = new MismatchedSetException(null,input);
throw mse;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 11, allDistinct_StartIndex); }
}
return retval;
}
// $ANTLR end "allDistinct"
public static class group_by_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "group_by"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:233:1: group_by : GROUP BY ( column_name ( ASC | DESC ) )+ ;
public final ToolSQLParser.group_by_return group_by() throws RecognitionException {
ToolSQLParser.group_by_return retval = new ToolSQLParser.group_by_return();
retval.start = input.LT(1);
int group_by_StartIndex = input.index();
CommonTree root_0 = null;
Token GROUP89=null;
Token BY90=null;
Token set92=null;
ToolSQLParser.column_name_return column_name91 =null;
CommonTree GROUP89_tree=null;
CommonTree BY90_tree=null;
CommonTree set92_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 12) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:234:5: ( GROUP BY ( column_name ( ASC | DESC ) )+ )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:234:7: GROUP BY ( column_name ( ASC | DESC ) )+
{
root_0 = (CommonTree)adaptor.nil();
GROUP89=(Token)match(input,GROUP,FOLLOW_GROUP_in_group_by726); if (state.failed) return retval;
if ( state.backtracking==0 ) {
GROUP89_tree =
(CommonTree)adaptor.create(GROUP89)
;
adaptor.addChild(root_0, GROUP89_tree);
}
BY90=(Token)match(input,BY,FOLLOW_BY_in_group_by728); if (state.failed) return retval;
if ( state.backtracking==0 ) {
BY90_tree =
(CommonTree)adaptor.create(BY90)
;
adaptor.addChild(root_0, BY90_tree);
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:234:16: ( column_name ( ASC | DESC ) )+
int cnt24=0;
loop24:
do {
int alt24=2;
int LA24_0 = input.LA(1);
if ( (LA24_0==IDENTIFIER) ) {
alt24=1;
}
switch (alt24) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:234:17: column_name ( ASC | DESC )
{
pushFollow(FOLLOW_column_name_in_group_by731);
column_name91=column_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, column_name91.getTree());
set92=(Token)input.LT(1);
if ( input.LA(1)==ASC||input.LA(1)==DESC ) {
input.consume();
if ( state.backtracking==0 ) adaptor.addChild(root_0,
(CommonTree)adaptor.create(set92)
);
state.errorRecovery=false;
state.failed=false;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
MismatchedSetException mse = new MismatchedSetException(null,input);
throw mse;
}
}
break;
default :
if ( cnt24 >= 1 ) break loop24;
if (state.backtracking>0) {state.failed=true; return retval;}
EarlyExitException eee =
new EarlyExitException(24, input);
throw eee;
}
cnt24++;
} while (true);
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 12, group_by_StartIndex); }
}
return retval;
}
// $ANTLR end "group_by"
public static class order_by_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "order_by"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:236:1: order_by : ORDER BY ( column_name ( ASC | DESC ) )+ ;
public final ToolSQLParser.order_by_return order_by() throws RecognitionException {
ToolSQLParser.order_by_return retval = new ToolSQLParser.order_by_return();
retval.start = input.LT(1);
int order_by_StartIndex = input.index();
CommonTree root_0 = null;
Token ORDER93=null;
Token BY94=null;
Token set96=null;
ToolSQLParser.column_name_return column_name95 =null;
CommonTree ORDER93_tree=null;
CommonTree BY94_tree=null;
CommonTree set96_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 13) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:237:5: ( ORDER BY ( column_name ( ASC | DESC ) )+ )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:237:7: ORDER BY ( column_name ( ASC | DESC ) )+
{
root_0 = (CommonTree)adaptor.nil();
ORDER93=(Token)match(input,ORDER,FOLLOW_ORDER_in_order_by757); if (state.failed) return retval;
if ( state.backtracking==0 ) {
ORDER93_tree =
(CommonTree)adaptor.create(ORDER93)
;
adaptor.addChild(root_0, ORDER93_tree);
}
BY94=(Token)match(input,BY,FOLLOW_BY_in_order_by759); if (state.failed) return retval;
if ( state.backtracking==0 ) {
BY94_tree =
(CommonTree)adaptor.create(BY94)
;
adaptor.addChild(root_0, BY94_tree);
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:237:16: ( column_name ( ASC | DESC ) )+
int cnt25=0;
loop25:
do {
int alt25=2;
int LA25_0 = input.LA(1);
if ( (LA25_0==IDENTIFIER) ) {
alt25=1;
}
switch (alt25) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:237:17: column_name ( ASC | DESC )
{
pushFollow(FOLLOW_column_name_in_order_by762);
column_name95=column_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, column_name95.getTree());
set96=(Token)input.LT(1);
if ( input.LA(1)==ASC||input.LA(1)==DESC ) {
input.consume();
if ( state.backtracking==0 ) adaptor.addChild(root_0,
(CommonTree)adaptor.create(set96)
);
state.errorRecovery=false;
state.failed=false;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
MismatchedSetException mse = new MismatchedSetException(null,input);
throw mse;
}
}
break;
default :
if ( cnt25 >= 1 ) break loop25;
if (state.backtracking>0) {state.failed=true; return retval;}
EarlyExitException eee =
new EarlyExitException(25, input);
throw eee;
}
cnt25++;
} while (true);
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 13, order_by_StartIndex); }
}
return retval;
}
// $ANTLR end "order_by"
public static class on_session_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "on_session"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:241:1: on_session : ON SESSION sess= qualifiedName ;
public final ToolSQLParser.on_session_return on_session() throws RecognitionException {
ToolSQLParser.on_session_return retval = new ToolSQLParser.on_session_return();
retval.start = input.LT(1);
int on_session_StartIndex = input.index();
CommonTree root_0 = null;
Token ON97=null;
Token SESSION98=null;
ToolSQLParser.qualifiedName_return sess =null;
CommonTree ON97_tree=null;
CommonTree SESSION98_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 14) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:242:5: ( ON SESSION sess= qualifiedName )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:242:8: ON SESSION sess= qualifiedName
{
root_0 = (CommonTree)adaptor.nil();
ON97=(Token)match(input,ON,FOLLOW_ON_in_on_session795); if (state.failed) return retval;
if ( state.backtracking==0 ) {
ON97_tree =
(CommonTree)adaptor.create(ON97)
;
adaptor.addChild(root_0, ON97_tree);
}
SESSION98=(Token)match(input,SESSION,FOLLOW_SESSION_in_on_session797); if (state.failed) return retval;
if ( state.backtracking==0 ) {
SESSION98_tree =
(CommonTree)adaptor.create(SESSION98)
;
adaptor.addChild(root_0, SESSION98_tree);
}
pushFollow(FOLLOW_qualifiedName_in_on_session801);
sess=qualifiedName();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sess.getTree());
if ( state.backtracking==0 ) {System.out.println("Session: " + (sess!=null?input.toString(sess.start,sess.stop):null));}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 14, on_session_StartIndex); }
}
return retval;
}
// $ANTLR end "on_session"
public static class column_list_return extends ParserRuleReturnScope {
public List<String> columNames;
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "column_list"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:247:1: column_list returns [List<String> columNames] : dc1= displayed_column ( COMMA dc2= displayed_column )* ;
public final ToolSQLParser.column_list_return column_list() throws RecognitionException {
ToolSQLParser.column_list_return retval = new ToolSQLParser.column_list_return();
retval.start = input.LT(1);
int column_list_StartIndex = input.index();
CommonTree root_0 = null;
Token COMMA99=null;
ToolSQLParser.displayed_column_return dc1 =null;
ToolSQLParser.displayed_column_return dc2 =null;
CommonTree COMMA99_tree=null;
retval.columNames = new ArrayList<String>();
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 15) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:251:3: (dc1= displayed_column ( COMMA dc2= displayed_column )* )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:251:5: dc1= displayed_column ( COMMA dc2= displayed_column )*
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_displayed_column_in_column_list842);
dc1=displayed_column();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, dc1.getTree());
if ( state.backtracking==0 ) {retval.columNames.add((dc1!=null?input.toString(dc1.start,dc1.stop):null));}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:251:55: ( COMMA dc2= displayed_column )*
loop26:
do {
int alt26=2;
int LA26_0 = input.LA(1);
if ( (LA26_0==COMMA) ) {
alt26=1;
}
switch (alt26) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:251:56: COMMA dc2= displayed_column
{
COMMA99=(Token)match(input,COMMA,FOLLOW_COMMA_in_column_list846); if (state.failed) return retval;
if ( state.backtracking==0 ) {
COMMA99_tree =
(CommonTree)adaptor.create(COMMA99)
;
adaptor.addChild(root_0, COMMA99_tree);
}
pushFollow(FOLLOW_displayed_column_in_column_list850);
dc2=displayed_column();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, dc2.getTree());
if ( state.backtracking==0 ) {retval.columNames.add((dc2!=null?input.toString(dc2.start,dc2.stop):null));}
}
break;
default :
break loop26;
}
} while (true);
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 15, column_list_StartIndex); }
}
return retval;
}
// $ANTLR end "column_list"
public static class displayed_column_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "displayed_column"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:254:1: displayed_column : ( ( schema_name DOT )? t_alias DOT MULT | sql_expression ) ( c_alias )? ;
public final ToolSQLParser.displayed_column_return displayed_column() throws RecognitionException {
ToolSQLParser.displayed_column_return retval = new ToolSQLParser.displayed_column_return();
retval.start = input.LT(1);
int displayed_column_StartIndex = input.index();
CommonTree root_0 = null;
Token DOT101=null;
Token DOT103=null;
Token MULT104=null;
ToolSQLParser.schema_name_return schema_name100 =null;
ToolSQLParser.t_alias_return t_alias102 =null;
ToolSQLParser.sql_expression_return sql_expression105 =null;
ToolSQLParser.c_alias_return c_alias106 =null;
CommonTree DOT101_tree=null;
CommonTree DOT103_tree=null;
CommonTree MULT104_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 16) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:255:2: ( ( ( schema_name DOT )? t_alias DOT MULT | sql_expression ) ( c_alias )? )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:255:4: ( ( schema_name DOT )? t_alias DOT MULT | sql_expression ) ( c_alias )?
{
root_0 = (CommonTree)adaptor.nil();
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:255:4: ( ( schema_name DOT )? t_alias DOT MULT | sql_expression )
int alt28=2;
int LA28_0 = input.LA(1);
if ( (LA28_0==IDENTIFIER) ) {
int LA28_1 = input.LA(2);
if ( (LA28_1==EOF||LA28_1==AS||LA28_1==COMMA||LA28_1==DIV||LA28_1==FROM||LA28_1==IDENTIFIER||LA28_1==INTO||LA28_1==LPAREN||LA28_1==MINUS||LA28_1==MULT||LA28_1==PLUS||LA28_1==RPAREN) ) {
alt28=2;
}
else if ( (LA28_1==DOT) ) {
int LA28_3 = input.LA(3);
if ( (LA28_3==MULT) ) {
alt28=1;
}
else if ( (LA28_3==IDENTIFIER) ) {
int LA28_5 = input.LA(4);
if ( (LA28_5==DOT) ) {
int LA28_6 = input.LA(5);
if ( (LA28_6==MULT) ) {
alt28=1;
}
else if ( (LA28_6==IDENTIFIER) ) {
alt28=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 28, 6, input);
throw nvae;
}
}
else if ( (LA28_5==EOF||LA28_5==AS||LA28_5==COMMA||LA28_5==DIV||LA28_5==FROM||LA28_5==IDENTIFIER||LA28_5==INTO||LA28_5==LPAREN||LA28_5==MINUS||LA28_5==MULT||LA28_5==PLUS||LA28_5==RPAREN) ) {
alt28=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 28, 5, input);
throw nvae;
}
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 28, 3, input);
throw nvae;
}
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 28, 1, input);
throw nvae;
}
}
else if ( (LA28_0==COLON||LA28_0==FALSE||LA28_0==FLOATLITERAL||LA28_0==INTLITERAL||LA28_0==MINUS||LA28_0==MULT||LA28_0==PLUS||(LA28_0 >= STRINGLITERAL && LA28_0 <= TRUE)) ) {
alt28=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 28, 0, input);
throw nvae;
}
switch (alt28) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:256:4: ( schema_name DOT )? t_alias DOT MULT
{
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:256:4: ( schema_name DOT )?
int alt27=2;
int LA27_0 = input.LA(1);
if ( (LA27_0==IDENTIFIER) ) {
int LA27_1 = input.LA(2);
if ( (LA27_1==DOT) ) {
int LA27_2 = input.LA(3);
if ( (LA27_2==IDENTIFIER) ) {
alt27=1;
}
}
}
switch (alt27) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:256:5: schema_name DOT
{
pushFollow(FOLLOW_schema_name_in_displayed_column875);
schema_name100=schema_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, schema_name100.getTree());
DOT101=(Token)match(input,DOT,FOLLOW_DOT_in_displayed_column877); if (state.failed) return retval;
if ( state.backtracking==0 ) {
DOT101_tree =
(CommonTree)adaptor.create(DOT101)
;
adaptor.addChild(root_0, DOT101_tree);
}
}
break;
}
pushFollow(FOLLOW_t_alias_in_displayed_column881);
t_alias102=t_alias();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, t_alias102.getTree());
DOT103=(Token)match(input,DOT,FOLLOW_DOT_in_displayed_column883); if (state.failed) return retval;
if ( state.backtracking==0 ) {
DOT103_tree =
(CommonTree)adaptor.create(DOT103)
;
adaptor.addChild(root_0, DOT103_tree);
}
MULT104=(Token)match(input,MULT,FOLLOW_MULT_in_displayed_column885); if (state.failed) return retval;
if ( state.backtracking==0 ) {
MULT104_tree =
(CommonTree)adaptor.create(MULT104)
;
adaptor.addChild(root_0, MULT104_tree);
}
}
break;
case 2 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:257:5: sql_expression
{
pushFollow(FOLLOW_sql_expression_in_displayed_column891);
sql_expression105=sql_expression();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_expression105.getTree());
}
break;
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:259:3: ( c_alias )?
int alt29=2;
int LA29_0 = input.LA(1);
if ( (LA29_0==AS||LA29_0==IDENTIFIER) ) {
alt29=1;
}
switch (alt29) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:259:3: c_alias
{
pushFollow(FOLLOW_c_alias_in_displayed_column902);
c_alias106=c_alias();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, c_alias106.getTree());
}
break;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 16, displayed_column_StartIndex); }
}
return retval;
}
// $ANTLR end "displayed_column"
public static class column_name_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "column_name"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:262:1: column_name : ( table_name DOT )? IDENTIFIER ;
public final ToolSQLParser.column_name_return column_name() throws RecognitionException {
ToolSQLParser.column_name_return retval = new ToolSQLParser.column_name_return();
retval.start = input.LT(1);
int column_name_StartIndex = input.index();
CommonTree root_0 = null;
Token DOT108=null;
Token IDENTIFIER109=null;
ToolSQLParser.table_name_return table_name107 =null;
CommonTree DOT108_tree=null;
CommonTree IDENTIFIER109_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 17) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:263:3: ( ( table_name DOT )? IDENTIFIER )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:263:5: ( table_name DOT )? IDENTIFIER
{
root_0 = (CommonTree)adaptor.nil();
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:263:5: ( table_name DOT )?
int alt30=2;
int LA30_0 = input.LA(1);
if ( (LA30_0==IDENTIFIER) ) {
int LA30_1 = input.LA(2);
if ( (LA30_1==IDENTIFIER) ) {
int LA30_2 = input.LA(3);
if ( (LA30_2==DOT) ) {
alt30=1;
}
}
else if ( (LA30_1==DOT) ) {
alt30=1;
}
}
switch (alt30) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:263:6: table_name DOT
{
pushFollow(FOLLOW_table_name_in_column_name919);
table_name107=table_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, table_name107.getTree());
DOT108=(Token)match(input,DOT,FOLLOW_DOT_in_column_name921); if (state.failed) return retval;
if ( state.backtracking==0 ) {
DOT108_tree =
(CommonTree)adaptor.create(DOT108)
;
adaptor.addChild(root_0, DOT108_tree);
}
}
break;
}
IDENTIFIER109=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_column_name925); if (state.failed) return retval;
if ( state.backtracking==0 ) {
IDENTIFIER109_tree =
(CommonTree)adaptor.create(IDENTIFIER109)
;
adaptor.addChild(root_0, IDENTIFIER109_tree);
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 17, column_name_StartIndex); }
}
return retval;
}
// $ANTLR end "column_name"
public static class column_type_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "column_type"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:266:1: column_type : IDENTIFIER ( LPAREN INTLITERAL RPAREN )? ;
public final ToolSQLParser.column_type_return column_type() throws RecognitionException {
ToolSQLParser.column_type_return retval = new ToolSQLParser.column_type_return();
retval.start = input.LT(1);
int column_type_StartIndex = input.index();
CommonTree root_0 = null;
Token IDENTIFIER110=null;
Token LPAREN111=null;
Token INTLITERAL112=null;
Token RPAREN113=null;
CommonTree IDENTIFIER110_tree=null;
CommonTree LPAREN111_tree=null;
CommonTree INTLITERAL112_tree=null;
CommonTree RPAREN113_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 18) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:267:2: ( IDENTIFIER ( LPAREN INTLITERAL RPAREN )? )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:267:4: IDENTIFIER ( LPAREN INTLITERAL RPAREN )?
{
root_0 = (CommonTree)adaptor.nil();
IDENTIFIER110=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_column_type939); if (state.failed) return retval;
if ( state.backtracking==0 ) {
IDENTIFIER110_tree =
(CommonTree)adaptor.create(IDENTIFIER110)
;
adaptor.addChild(root_0, IDENTIFIER110_tree);
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:267:15: ( LPAREN INTLITERAL RPAREN )?
int alt31=2;
int LA31_0 = input.LA(1);
if ( (LA31_0==LPAREN) ) {
alt31=1;
}
switch (alt31) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:267:16: LPAREN INTLITERAL RPAREN
{
LPAREN111=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_column_type942); if (state.failed) return retval;
if ( state.backtracking==0 ) {
LPAREN111_tree =
(CommonTree)adaptor.create(LPAREN111)
;
adaptor.addChild(root_0, LPAREN111_tree);
}
INTLITERAL112=(Token)match(input,INTLITERAL,FOLLOW_INTLITERAL_in_column_type944); if (state.failed) return retval;
if ( state.backtracking==0 ) {
INTLITERAL112_tree =
(CommonTree)adaptor.create(INTLITERAL112)
;
adaptor.addChild(root_0, INTLITERAL112_tree);
}
RPAREN113=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_column_type946); if (state.failed) return retval;
if ( state.backtracking==0 ) {
RPAREN113_tree =
(CommonTree)adaptor.create(RPAREN113)
;
adaptor.addChild(root_0, RPAREN113_tree);
}
}
break;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 18, column_type_StartIndex); }
}
return retval;
}
// $ANTLR end "column_type"
public static class table_list_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "table_list"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:270:1: table_list : table_name ( COMMA table_name )* ;
public final ToolSQLParser.table_list_return table_list() throws RecognitionException {
ToolSQLParser.table_list_return retval = new ToolSQLParser.table_list_return();
retval.start = input.LT(1);
int table_list_StartIndex = input.index();
CommonTree root_0 = null;
Token COMMA115=null;
ToolSQLParser.table_name_return table_name114 =null;
ToolSQLParser.table_name_return table_name116 =null;
CommonTree COMMA115_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 19) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:271:3: ( table_name ( COMMA table_name )* )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:271:5: table_name ( COMMA table_name )*
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_table_name_in_table_list960);
table_name114=table_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, table_name114.getTree());
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:271:16: ( COMMA table_name )*
loop32:
do {
int alt32=2;
int LA32_0 = input.LA(1);
if ( (LA32_0==COMMA) ) {
alt32=1;
}
switch (alt32) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:271:17: COMMA table_name
{
COMMA115=(Token)match(input,COMMA,FOLLOW_COMMA_in_table_list963); if (state.failed) return retval;
if ( state.backtracking==0 ) {
COMMA115_tree =
(CommonTree)adaptor.create(COMMA115)
;
adaptor.addChild(root_0, COMMA115_tree);
}
pushFollow(FOLLOW_table_name_in_table_list965);
table_name116=table_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, table_name116.getTree());
}
break;
default :
break loop32;
}
} while (true);
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 19, table_list_StartIndex); }
}
return retval;
}
// $ANTLR end "table_list"
public static class table_name_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "table_name"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:274:1: table_name : IDENTIFIER ( t_alias )? ;
public final ToolSQLParser.table_name_return table_name() throws RecognitionException {
ToolSQLParser.table_name_return retval = new ToolSQLParser.table_name_return();
retval.start = input.LT(1);
int table_name_StartIndex = input.index();
CommonTree root_0 = null;
Token IDENTIFIER117=null;
ToolSQLParser.t_alias_return t_alias118 =null;
CommonTree IDENTIFIER117_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 20) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:275:3: ( IDENTIFIER ( t_alias )? )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:275:5: IDENTIFIER ( t_alias )?
{
root_0 = (CommonTree)adaptor.nil();
IDENTIFIER117=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_table_name982); if (state.failed) return retval;
if ( state.backtracking==0 ) {
IDENTIFIER117_tree =
(CommonTree)adaptor.create(IDENTIFIER117)
;
adaptor.addChild(root_0, IDENTIFIER117_tree);
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:275:16: ( t_alias )?
int alt33=2;
int LA33_0 = input.LA(1);
if ( (LA33_0==IDENTIFIER) ) {
alt33=1;
}
switch (alt33) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:275:16: t_alias
{
pushFollow(FOLLOW_t_alias_in_table_name984);
t_alias118=t_alias();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, t_alias118.getTree());
}
break;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 20, table_name_StartIndex); }
}
return retval;
}
// $ANTLR end "table_name"
public static class search_expression_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "search_expression"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:278:1: search_expression : sql_condition ;
public final ToolSQLParser.search_expression_return search_expression() throws RecognitionException {
ToolSQLParser.search_expression_return retval = new ToolSQLParser.search_expression_return();
retval.start = input.LT(1);
int search_expression_StartIndex = input.index();
CommonTree root_0 = null;
ToolSQLParser.sql_condition_return sql_condition119 =null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 21) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:279:3: ( sql_condition )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:279:5: sql_condition
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_sql_condition_in_search_expression1000);
sql_condition119=sql_condition();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_condition119.getTree());
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 21, search_expression_StartIndex); }
}
return retval;
}
// $ANTLR end "search_expression"
public static class literal_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "literal"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:282:1: literal : ( HEXLITERAL | INTLITERAL | FLOATLITERAL | STRINGLITERAL | booleanLiteral | NIL );
public final ToolSQLParser.literal_return literal() throws RecognitionException {
ToolSQLParser.literal_return retval = new ToolSQLParser.literal_return();
retval.start = input.LT(1);
int literal_StartIndex = input.index();
CommonTree root_0 = null;
Token HEXLITERAL120=null;
Token INTLITERAL121=null;
Token FLOATLITERAL122=null;
Token STRINGLITERAL123=null;
Token NIL125=null;
ToolSQLParser.booleanLiteral_return booleanLiteral124 =null;
CommonTree HEXLITERAL120_tree=null;
CommonTree INTLITERAL121_tree=null;
CommonTree FLOATLITERAL122_tree=null;
CommonTree STRINGLITERAL123_tree=null;
CommonTree NIL125_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 22) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:283:5: ( HEXLITERAL | INTLITERAL | FLOATLITERAL | STRINGLITERAL | booleanLiteral | NIL )
int alt34=6;
switch ( input.LA(1) ) {
case HEXLITERAL:
{
alt34=1;
}
break;
case INTLITERAL:
{
alt34=2;
}
break;
case FLOATLITERAL:
{
alt34=3;
}
break;
case STRINGLITERAL:
{
alt34=4;
}
break;
case FALSE:
case TRUE:
{
alt34=5;
}
break;
case NIL:
{
alt34=6;
}
break;
default:
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 34, 0, input);
throw nvae;
}
switch (alt34) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:283:9: HEXLITERAL
{
root_0 = (CommonTree)adaptor.nil();
HEXLITERAL120=(Token)match(input,HEXLITERAL,FOLLOW_HEXLITERAL_in_literal1021); if (state.failed) return retval;
if ( state.backtracking==0 ) {
HEXLITERAL120_tree =
(CommonTree)adaptor.create(HEXLITERAL120)
;
adaptor.addChild(root_0, HEXLITERAL120_tree);
}
}
break;
case 2 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:284:9: INTLITERAL
{
root_0 = (CommonTree)adaptor.nil();
INTLITERAL121=(Token)match(input,INTLITERAL,FOLLOW_INTLITERAL_in_literal1031); if (state.failed) return retval;
if ( state.backtracking==0 ) {
INTLITERAL121_tree =
(CommonTree)adaptor.create(INTLITERAL121)
;
adaptor.addChild(root_0, INTLITERAL121_tree);
}
}
break;
case 3 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:285:9: FLOATLITERAL
{
root_0 = (CommonTree)adaptor.nil();
FLOATLITERAL122=(Token)match(input,FLOATLITERAL,FOLLOW_FLOATLITERAL_in_literal1041); if (state.failed) return retval;
if ( state.backtracking==0 ) {
FLOATLITERAL122_tree =
(CommonTree)adaptor.create(FLOATLITERAL122)
;
adaptor.addChild(root_0, FLOATLITERAL122_tree);
}
}
break;
case 4 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:286:9: STRINGLITERAL
{
root_0 = (CommonTree)adaptor.nil();
STRINGLITERAL123=(Token)match(input,STRINGLITERAL,FOLLOW_STRINGLITERAL_in_literal1051); if (state.failed) return retval;
if ( state.backtracking==0 ) {
STRINGLITERAL123_tree =
(CommonTree)adaptor.create(STRINGLITERAL123)
;
adaptor.addChild(root_0, STRINGLITERAL123_tree);
}
}
break;
case 5 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:287:9: booleanLiteral
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_booleanLiteral_in_literal1061);
booleanLiteral124=booleanLiteral();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, booleanLiteral124.getTree());
}
break;
case 6 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:288:9: NIL
{
root_0 = (CommonTree)adaptor.nil();
NIL125=(Token)match(input,NIL,FOLLOW_NIL_in_literal1071); if (state.failed) return retval;
if ( state.backtracking==0 ) {
NIL125_tree =
(CommonTree)adaptor.create(NIL125)
;
adaptor.addChild(root_0, NIL125_tree);
}
}
break;
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 22, literal_StartIndex); }
}
return retval;
}
// $ANTLR end "literal"
public static class booleanLiteral_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "booleanLiteral"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:291:1: booleanLiteral : ( TRUE | FALSE );
public final ToolSQLParser.booleanLiteral_return booleanLiteral() throws RecognitionException {
ToolSQLParser.booleanLiteral_return retval = new ToolSQLParser.booleanLiteral_return();
retval.start = input.LT(1);
int booleanLiteral_StartIndex = input.index();
CommonTree root_0 = null;
Token set126=null;
CommonTree set126_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 23) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:292:5: ( TRUE | FALSE )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:
{
root_0 = (CommonTree)adaptor.nil();
set126=(Token)input.LT(1);
if ( input.LA(1)==FALSE||input.LA(1)==TRUE ) {
input.consume();
if ( state.backtracking==0 ) adaptor.addChild(root_0,
(CommonTree)adaptor.create(set126)
);
state.errorRecovery=false;
state.failed=false;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
MismatchedSetException mse = new MismatchedSetException(null,input);
throw mse;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 23, booleanLiteral_StartIndex); }
}
return retval;
}
// $ANTLR end "booleanLiteral"
public static class arguments_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "arguments"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:295:1: arguments : LPAREN ( argumentList )? RPAREN ;
public final ToolSQLParser.arguments_return arguments() throws RecognitionException {
ToolSQLParser.arguments_return retval = new ToolSQLParser.arguments_return();
retval.start = input.LT(1);
int arguments_StartIndex = input.index();
CommonTree root_0 = null;
Token LPAREN127=null;
Token RPAREN129=null;
ToolSQLParser.argumentList_return argumentList128 =null;
CommonTree LPAREN127_tree=null;
CommonTree RPAREN129_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 24) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:296:3: ( LPAREN ( argumentList )? RPAREN )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:296:5: LPAREN ( argumentList )? RPAREN
{
root_0 = (CommonTree)adaptor.nil();
LPAREN127=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_arguments1114); if (state.failed) return retval;
if ( state.backtracking==0 ) {
LPAREN127_tree =
(CommonTree)adaptor.create(LPAREN127)
;
adaptor.addChild(root_0, LPAREN127_tree);
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:296:12: ( argumentList )?
int alt35=2;
int LA35_0 = input.LA(1);
if ( (LA35_0==COLON||LA35_0==FALSE||LA35_0==FLOATLITERAL||LA35_0==IDENTIFIER||LA35_0==INTLITERAL||LA35_0==MINUS||LA35_0==MULT||LA35_0==PLUS||(LA35_0 >= STRINGLITERAL && LA35_0 <= TRUE)) ) {
alt35=1;
}
switch (alt35) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:296:12: argumentList
{
pushFollow(FOLLOW_argumentList_in_arguments1116);
argumentList128=argumentList();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, argumentList128.getTree());
}
break;
}
RPAREN129=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_arguments1119); if (state.failed) return retval;
if ( state.backtracking==0 ) {
RPAREN129_tree =
(CommonTree)adaptor.create(RPAREN129)
;
adaptor.addChild(root_0, RPAREN129_tree);
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 24, arguments_StartIndex); }
}
return retval;
}
// $ANTLR end "arguments"
public static class argumentList_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "argumentList"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:298:1: argumentList : argument ( COMMA argument )* ;
public final ToolSQLParser.argumentList_return argumentList() throws RecognitionException {
ToolSQLParser.argumentList_return retval = new ToolSQLParser.argumentList_return();
retval.start = input.LT(1);
int argumentList_StartIndex = input.index();
CommonTree root_0 = null;
Token COMMA131=null;
ToolSQLParser.argument_return argument130 =null;
ToolSQLParser.argument_return argument132 =null;
CommonTree COMMA131_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 25) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:299:3: ( argument ( COMMA argument )* )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:299:5: argument ( COMMA argument )*
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_argument_in_argumentList1131);
argument130=argument();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, argument130.getTree());
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:299:14: ( COMMA argument )*
loop36:
do {
int alt36=2;
int LA36_0 = input.LA(1);
if ( (LA36_0==COMMA) ) {
alt36=1;
}
switch (alt36) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:299:15: COMMA argument
{
COMMA131=(Token)match(input,COMMA,FOLLOW_COMMA_in_argumentList1134); if (state.failed) return retval;
if ( state.backtracking==0 ) {
COMMA131_tree =
(CommonTree)adaptor.create(COMMA131)
;
adaptor.addChild(root_0, COMMA131_tree);
}
pushFollow(FOLLOW_argument_in_argumentList1136);
argument132=argument();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, argument132.getTree());
}
break;
default :
break loop36;
}
} while (true);
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 25, argumentList_StartIndex); }
}
return retval;
}
// $ANTLR end "argumentList"
public static class argument_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "argument"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:301:1: argument : sql_expression ;
public final ToolSQLParser.argument_return argument() throws RecognitionException {
ToolSQLParser.argument_return retval = new ToolSQLParser.argument_return();
retval.start = input.LT(1);
int argument_StartIndex = input.index();
CommonTree root_0 = null;
ToolSQLParser.sql_expression_return sql_expression133 =null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 26) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:302:3: ( sql_expression )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:302:5: sql_expression
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_sql_expression_in_argument1150);
sql_expression133=sql_expression();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_expression133.getTree());
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 26, argument_StartIndex); }
}
return retval;
}
// $ANTLR end "argument"
public static class value_list_return extends ParserRuleReturnScope {
public List<Object> values;
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "value_list"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:305:1: value_list returns [List<Object> values] : ex1= sql_expression ( COMMA ex2= sql_expression )* ;
public final ToolSQLParser.value_list_return value_list() throws RecognitionException {
ToolSQLParser.value_list_return retval = new ToolSQLParser.value_list_return();
retval.start = input.LT(1);
int value_list_StartIndex = input.index();
CommonTree root_0 = null;
Token COMMA134=null;
ToolSQLParser.sql_expression_return ex1 =null;
ToolSQLParser.sql_expression_return ex2 =null;
CommonTree COMMA134_tree=null;
retval.values = new ArrayList<Object>();
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 27) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:309:2: (ex1= sql_expression ( COMMA ex2= sql_expression )* )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:309:4: ex1= sql_expression ( COMMA ex2= sql_expression )*
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_sql_expression_in_value_list1173);
ex1=sql_expression();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, ex1.getTree());
if ( state.backtracking==0 ) {retval.values.add((ex1!=null?input.toString(ex1.start,ex1.stop):null));}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:310:3: ( COMMA ex2= sql_expression )*
loop37:
do {
int alt37=2;
int LA37_0 = input.LA(1);
if ( (LA37_0==COMMA) ) {
alt37=1;
}
switch (alt37) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:310:4: COMMA ex2= sql_expression
{
COMMA134=(Token)match(input,COMMA,FOLLOW_COMMA_in_value_list1180); if (state.failed) return retval;
if ( state.backtracking==0 ) {
COMMA134_tree =
(CommonTree)adaptor.create(COMMA134)
;
adaptor.addChild(root_0, COMMA134_tree);
}
pushFollow(FOLLOW_sql_expression_in_value_list1184);
ex2=sql_expression();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, ex2.getTree());
if ( state.backtracking==0 ) {retval.values.add((ex2!=null?input.toString(ex2.start,ex2.stop):null));}
}
break;
default :
break loop37;
}
} while (true);
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 27, value_list_StartIndex); }
}
return retval;
}
// $ANTLR end "value_list"
public static class sql_expression_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "sql_expression"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:313:1: sql_expression : expr_add ;
public final ToolSQLParser.sql_expression_return sql_expression() throws RecognitionException {
ToolSQLParser.sql_expression_return retval = new ToolSQLParser.sql_expression_return();
retval.start = input.LT(1);
int sql_expression_StartIndex = input.index();
CommonTree root_0 = null;
ToolSQLParser.expr_add_return expr_add135 =null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 28) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:314:2: ( expr_add )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:314:4: expr_add
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_expr_add_in_sql_expression1199);
expr_add135=expr_add();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, expr_add135.getTree());
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 28, sql_expression_StartIndex); }
}
return retval;
}
// $ANTLR end "sql_expression"
public static class expr_add_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "expr_add"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:316:1: expr_add : expr_mul ( ( PLUS | MINUS ) expr_mul )* ;
public final ToolSQLParser.expr_add_return expr_add() throws RecognitionException {
ToolSQLParser.expr_add_return retval = new ToolSQLParser.expr_add_return();
retval.start = input.LT(1);
int expr_add_StartIndex = input.index();
CommonTree root_0 = null;
Token set137=null;
ToolSQLParser.expr_mul_return expr_mul136 =null;
ToolSQLParser.expr_mul_return expr_mul138 =null;
CommonTree set137_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 29) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:317:2: ( expr_mul ( ( PLUS | MINUS ) expr_mul )* )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:317:4: expr_mul ( ( PLUS | MINUS ) expr_mul )*
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_expr_mul_in_expr_add1209);
expr_mul136=expr_mul();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, expr_mul136.getTree());
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:317:13: ( ( PLUS | MINUS ) expr_mul )*
loop38:
do {
int alt38=2;
int LA38_0 = input.LA(1);
if ( (LA38_0==MINUS||LA38_0==PLUS) ) {
alt38=1;
}
switch (alt38) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:317:15: ( PLUS | MINUS ) expr_mul
{
set137=(Token)input.LT(1);
if ( input.LA(1)==MINUS||input.LA(1)==PLUS ) {
input.consume();
if ( state.backtracking==0 ) adaptor.addChild(root_0,
(CommonTree)adaptor.create(set137)
);
state.errorRecovery=false;
state.failed=false;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
MismatchedSetException mse = new MismatchedSetException(null,input);
throw mse;
}
pushFollow(FOLLOW_expr_mul_in_expr_add1223);
expr_mul138=expr_mul();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, expr_mul138.getTree());
}
break;
default :
break loop38;
}
} while (true);
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 29, expr_add_StartIndex); }
}
return retval;
}
// $ANTLR end "expr_add"
public static class expr_mul_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "expr_mul"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:319:1: expr_mul : expr_sign ( ( MULT | DIV ) expr_sign )* ;
public final ToolSQLParser.expr_mul_return expr_mul() throws RecognitionException {
ToolSQLParser.expr_mul_return retval = new ToolSQLParser.expr_mul_return();
retval.start = input.LT(1);
int expr_mul_StartIndex = input.index();
CommonTree root_0 = null;
Token set140=null;
ToolSQLParser.expr_sign_return expr_sign139 =null;
ToolSQLParser.expr_sign_return expr_sign141 =null;
CommonTree set140_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 30) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:320:2: ( expr_sign ( ( MULT | DIV ) expr_sign )* )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:320:4: expr_sign ( ( MULT | DIV ) expr_sign )*
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_expr_sign_in_expr_mul1236);
expr_sign139=expr_sign();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, expr_sign139.getTree());
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:320:14: ( ( MULT | DIV ) expr_sign )*
loop39:
do {
int alt39=2;
int LA39_0 = input.LA(1);
if ( (LA39_0==DIV||LA39_0==MULT) ) {
alt39=1;
}
switch (alt39) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:320:16: ( MULT | DIV ) expr_sign
{
set140=(Token)input.LT(1);
if ( input.LA(1)==DIV||input.LA(1)==MULT ) {
input.consume();
if ( state.backtracking==0 ) adaptor.addChild(root_0,
(CommonTree)adaptor.create(set140)
);
state.errorRecovery=false;
state.failed=false;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
MismatchedSetException mse = new MismatchedSetException(null,input);
throw mse;
}
pushFollow(FOLLOW_expr_sign_in_expr_mul1250);
expr_sign141=expr_sign();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, expr_sign141.getTree());
}
break;
default :
break loop39;
}
} while (true);
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 30, expr_mul_StartIndex); }
}
return retval;
}
// $ANTLR end "expr_mul"
public static class expr_sign_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "expr_sign"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:322:1: expr_sign : ( PLUS | MINUS )? expr_expr ;
public final ToolSQLParser.expr_sign_return expr_sign() throws RecognitionException {
ToolSQLParser.expr_sign_return retval = new ToolSQLParser.expr_sign_return();
retval.start = input.LT(1);
int expr_sign_StartIndex = input.index();
CommonTree root_0 = null;
Token set142=null;
ToolSQLParser.expr_expr_return expr_expr143 =null;
CommonTree set142_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 31) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:323:2: ( ( PLUS | MINUS )? expr_expr )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:323:4: ( PLUS | MINUS )? expr_expr
{
root_0 = (CommonTree)adaptor.nil();
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:323:4: ( PLUS | MINUS )?
int alt40=2;
int LA40_0 = input.LA(1);
if ( (LA40_0==MINUS||LA40_0==PLUS) ) {
alt40=1;
}
switch (alt40) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:
{
set142=(Token)input.LT(1);
if ( input.LA(1)==MINUS||input.LA(1)==PLUS ) {
input.consume();
if ( state.backtracking==0 ) adaptor.addChild(root_0,
(CommonTree)adaptor.create(set142)
);
state.errorRecovery=false;
state.failed=false;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
MismatchedSetException mse = new MismatchedSetException(null,input);
throw mse;
}
}
break;
}
pushFollow(FOLLOW_expr_expr_in_expr_sign1275);
expr_expr143=expr_expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, expr_expr143.getTree());
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 31, expr_sign_StartIndex); }
}
return retval;
}
// $ANTLR end "expr_sign"
public static class expr_expr_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "expr_expr"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:325:1: expr_expr : ( simple_expression | function_call );
public final ToolSQLParser.expr_expr_return expr_expr() throws RecognitionException {
ToolSQLParser.expr_expr_return retval = new ToolSQLParser.expr_expr_return();
retval.start = input.LT(1);
int expr_expr_StartIndex = input.index();
CommonTree root_0 = null;
ToolSQLParser.simple_expression_return simple_expression144 =null;
ToolSQLParser.function_call_return function_call145 =null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 32) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:326:2: ( simple_expression | function_call )
int alt41=2;
int LA41_0 = input.LA(1);
if ( (LA41_0==COLON||LA41_0==FALSE||LA41_0==FLOATLITERAL||LA41_0==INTLITERAL||LA41_0==MULT||(LA41_0 >= STRINGLITERAL && LA41_0 <= TRUE)) ) {
alt41=1;
}
else if ( (LA41_0==IDENTIFIER) ) {
int LA41_2 = input.LA(2);
if ( (LA41_2==LPAREN) ) {
int LA41_3 = input.LA(3);
if ( (LA41_3==PLUS) ) {
int LA41_4 = input.LA(4);
if ( (LA41_4==RPAREN) ) {
alt41=1;
}
else if ( (LA41_4==COLON||LA41_4==FALSE||LA41_4==FLOATLITERAL||LA41_4==IDENTIFIER||LA41_4==INTLITERAL||LA41_4==MULT||(LA41_4 >= STRINGLITERAL && LA41_4 <= TRUE)) ) {
alt41=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 41, 4, input);
throw nvae;
}
}
else if ( (LA41_3==COLON||LA41_3==FALSE||LA41_3==FLOATLITERAL||LA41_3==IDENTIFIER||LA41_3==INTLITERAL||LA41_3==MINUS||LA41_3==MULT||(LA41_3 >= STRINGLITERAL && LA41_3 <= TRUE)) ) {
alt41=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 41, 3, input);
throw nvae;
}
}
else if ( (LA41_2==EOF||LA41_2==AND||LA41_2==AS||LA41_2==BETWEEN||LA41_2==COMMA||(LA41_2 >= DIV && LA41_2 <= EQ)||LA41_2==FROM||(LA41_2 >= GROUP && LA41_2 <= HAVING)||LA41_2==IDENTIFIER||LA41_2==IN||(LA41_2 >= INTO && LA41_2 <= IS)||LA41_2==LIKE||(LA41_2 >= LT && LA41_2 <= MINUS)||LA41_2==MULT||(LA41_2 >= NOT && LA41_2 <= NOT_EQUAL)||LA41_2==ON||(LA41_2 >= OR && LA41_2 <= PLUS)||LA41_2==RPAREN||LA41_2==SEMI||LA41_2==WHERE) ) {
alt41=1;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 41, 2, input);
throw nvae;
}
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 41, 0, input);
throw nvae;
}
switch (alt41) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:326:4: simple_expression
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_simple_expression_in_expr_expr1285);
simple_expression144=simple_expression();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, simple_expression144.getTree());
}
break;
case 2 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:327:4: function_call
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_function_call_in_expr_expr1291);
function_call145=function_call();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, function_call145.getTree());
}
break;
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 32, expr_expr_StartIndex); }
}
return retval;
}
// $ANTLR end "expr_expr"
public static class simple_expression_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "simple_expression"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:329:1: simple_expression : ( booleanLiteral | column_spec | STRINGLITERAL | number );
public final ToolSQLParser.simple_expression_return simple_expression() throws RecognitionException {
ToolSQLParser.simple_expression_return retval = new ToolSQLParser.simple_expression_return();
retval.start = input.LT(1);
int simple_expression_StartIndex = input.index();
CommonTree root_0 = null;
Token STRINGLITERAL148=null;
ToolSQLParser.booleanLiteral_return booleanLiteral146 =null;
ToolSQLParser.column_spec_return column_spec147 =null;
ToolSQLParser.number_return number149 =null;
CommonTree STRINGLITERAL148_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 33) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:330:2: ( booleanLiteral | column_spec | STRINGLITERAL | number )
int alt42=4;
switch ( input.LA(1) ) {
case FALSE:
case TRUE:
{
alt42=1;
}
break;
case COLON:
case IDENTIFIER:
case MULT:
{
alt42=2;
}
break;
case STRINGLITERAL:
{
alt42=3;
}
break;
case FLOATLITERAL:
case INTLITERAL:
{
alt42=4;
}
break;
default:
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 42, 0, input);
throw nvae;
}
switch (alt42) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:330:4: booleanLiteral
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_booleanLiteral_in_simple_expression1301);
booleanLiteral146=booleanLiteral();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, booleanLiteral146.getTree());
}
break;
case 2 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:331:4: column_spec
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_column_spec_in_simple_expression1306);
column_spec147=column_spec();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, column_spec147.getTree());
}
break;
case 3 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:332:4: STRINGLITERAL
{
root_0 = (CommonTree)adaptor.nil();
STRINGLITERAL148=(Token)match(input,STRINGLITERAL,FOLLOW_STRINGLITERAL_in_simple_expression1312); if (state.failed) return retval;
if ( state.backtracking==0 ) {
STRINGLITERAL148_tree =
(CommonTree)adaptor.create(STRINGLITERAL148)
;
adaptor.addChild(root_0, STRINGLITERAL148_tree);
}
}
break;
case 4 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:333:4: number
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_number_in_simple_expression1317);
number149=number();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, number149.getTree());
}
break;
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 33, simple_expression_StartIndex); }
}
return retval;
}
// $ANTLR end "simple_expression"
public static class column_spec_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "column_spec"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:336:1: column_spec : ( ( ( schema_name DOT )? t_alias DOT )? column_name ( outer_join_sign )? | schema_name DOT package_name DOT IDENTIFIER DOT IDENTIFIER | bind_variable | MULT );
public final ToolSQLParser.column_spec_return column_spec() throws RecognitionException {
ToolSQLParser.column_spec_return retval = new ToolSQLParser.column_spec_return();
retval.start = input.LT(1);
int column_spec_StartIndex = input.index();
CommonTree root_0 = null;
Token DOT151=null;
Token DOT153=null;
Token DOT157=null;
Token DOT159=null;
Token IDENTIFIER160=null;
Token DOT161=null;
Token IDENTIFIER162=null;
Token MULT164=null;
ToolSQLParser.schema_name_return schema_name150 =null;
ToolSQLParser.t_alias_return t_alias152 =null;
ToolSQLParser.column_name_return column_name154 =null;
ToolSQLParser.outer_join_sign_return outer_join_sign155 =null;
ToolSQLParser.schema_name_return schema_name156 =null;
ToolSQLParser.package_name_return package_name158 =null;
ToolSQLParser.bind_variable_return bind_variable163 =null;
CommonTree DOT151_tree=null;
CommonTree DOT153_tree=null;
CommonTree DOT157_tree=null;
CommonTree DOT159_tree=null;
CommonTree IDENTIFIER160_tree=null;
CommonTree DOT161_tree=null;
CommonTree IDENTIFIER162_tree=null;
CommonTree MULT164_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 34) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:2: ( ( ( schema_name DOT )? t_alias DOT )? column_name ( outer_join_sign )? | schema_name DOT package_name DOT IDENTIFIER DOT IDENTIFIER | bind_variable | MULT )
int alt46=4;
switch ( input.LA(1) ) {
case IDENTIFIER:
{
int LA46_1 = input.LA(2);
if ( (LA46_1==DOT) ) {
int LA46_4 = input.LA(3);
if ( (LA46_4==IDENTIFIER) ) {
int LA46_6 = input.LA(4);
if ( (LA46_6==DOT) ) {
int LA46_7 = input.LA(5);
if ( (LA46_7==IDENTIFIER) ) {
int LA46_8 = input.LA(6);
if ( (LA46_8==DOT) ) {
int LA46_9 = input.LA(7);
if ( (LA46_9==IDENTIFIER) ) {
int LA46_10 = input.LA(8);
if ( (synpred65_ToolSQL()) ) {
alt46=1;
}
else if ( (synpred66_ToolSQL()) ) {
alt46=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 46, 10, input);
throw nvae;
}
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 46, 9, input);
throw nvae;
}
}
else if ( (LA46_8==EOF||LA46_8==AND||LA46_8==AS||LA46_8==BETWEEN||LA46_8==COMMA||LA46_8==DIV||LA46_8==EQ||LA46_8==FROM||(LA46_8 >= GROUP && LA46_8 <= HAVING)||LA46_8==IDENTIFIER||LA46_8==IN||(LA46_8 >= INTO && LA46_8 <= IS)||LA46_8==LIKE||(LA46_8 >= LPAREN && LA46_8 <= MINUS)||LA46_8==MULT||(LA46_8 >= NOT && LA46_8 <= NOT_EQUAL)||LA46_8==ON||(LA46_8 >= OR && LA46_8 <= PLUS)||LA46_8==RPAREN||LA46_8==SEMI||LA46_8==WHERE) ) {
alt46=1;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 46, 8, input);
throw nvae;
}
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 46, 7, input);
throw nvae;
}
}
else if ( (LA46_6==EOF||LA46_6==AND||LA46_6==AS||LA46_6==BETWEEN||LA46_6==COMMA||LA46_6==DIV||LA46_6==EQ||LA46_6==FROM||(LA46_6 >= GROUP && LA46_6 <= HAVING)||LA46_6==IDENTIFIER||LA46_6==IN||(LA46_6 >= INTO && LA46_6 <= IS)||LA46_6==LIKE||(LA46_6 >= LPAREN && LA46_6 <= MINUS)||LA46_6==MULT||(LA46_6 >= NOT && LA46_6 <= NOT_EQUAL)||LA46_6==ON||(LA46_6 >= OR && LA46_6 <= PLUS)||LA46_6==RPAREN||LA46_6==SEMI||LA46_6==WHERE) ) {
alt46=1;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 46, 6, input);
throw nvae;
}
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 46, 4, input);
throw nvae;
}
}
else if ( (LA46_1==EOF||LA46_1==AND||LA46_1==AS||LA46_1==BETWEEN||LA46_1==COMMA||LA46_1==DIV||LA46_1==EQ||LA46_1==FROM||(LA46_1 >= GROUP && LA46_1 <= HAVING)||LA46_1==IDENTIFIER||LA46_1==IN||(LA46_1 >= INTO && LA46_1 <= IS)||LA46_1==LIKE||(LA46_1 >= LPAREN && LA46_1 <= MINUS)||LA46_1==MULT||(LA46_1 >= NOT && LA46_1 <= NOT_EQUAL)||LA46_1==ON||(LA46_1 >= OR && LA46_1 <= PLUS)||LA46_1==RPAREN||LA46_1==SEMI||LA46_1==WHERE) ) {
alt46=1;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 46, 1, input);
throw nvae;
}
}
break;
case COLON:
{
alt46=3;
}
break;
case MULT:
{
alt46=4;
}
break;
default:
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 46, 0, input);
throw nvae;
}
switch (alt46) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:4: ( ( schema_name DOT )? t_alias DOT )? column_name ( outer_join_sign )?
{
root_0 = (CommonTree)adaptor.nil();
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:4: ( ( schema_name DOT )? t_alias DOT )?
int alt44=2;
int LA44_0 = input.LA(1);
if ( (LA44_0==IDENTIFIER) ) {
int LA44_1 = input.LA(2);
if ( (LA44_1==DOT) ) {
int LA44_2 = input.LA(3);
if ( (synpred63_ToolSQL()) ) {
alt44=1;
}
}
}
switch (alt44) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:5: ( schema_name DOT )? t_alias DOT
{
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:5: ( schema_name DOT )?
int alt43=2;
int LA43_0 = input.LA(1);
if ( (LA43_0==IDENTIFIER) ) {
int LA43_1 = input.LA(2);
if ( (LA43_1==DOT) ) {
int LA43_2 = input.LA(3);
if ( (LA43_2==IDENTIFIER) ) {
int LA43_3 = input.LA(4);
if ( (LA43_3==DOT) ) {
int LA43_4 = input.LA(5);
if ( (synpred62_ToolSQL()) ) {
alt43=1;
}
}
}
}
}
switch (alt43) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:6: schema_name DOT
{
pushFollow(FOLLOW_schema_name_in_column_spec1338);
schema_name150=schema_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, schema_name150.getTree());
DOT151=(Token)match(input,DOT,FOLLOW_DOT_in_column_spec1340); if (state.failed) return retval;
if ( state.backtracking==0 ) {
DOT151_tree =
(CommonTree)adaptor.create(DOT151)
;
adaptor.addChild(root_0, DOT151_tree);
}
}
break;
}
pushFollow(FOLLOW_t_alias_in_column_spec1344);
t_alias152=t_alias();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, t_alias152.getTree());
DOT153=(Token)match(input,DOT,FOLLOW_DOT_in_column_spec1346); if (state.failed) return retval;
if ( state.backtracking==0 ) {
DOT153_tree =
(CommonTree)adaptor.create(DOT153)
;
adaptor.addChild(root_0, DOT153_tree);
}
}
break;
}
pushFollow(FOLLOW_column_name_in_column_spec1350);
column_name154=column_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, column_name154.getTree());
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:50: ( outer_join_sign )?
int alt45=2;
int LA45_0 = input.LA(1);
if ( (LA45_0==LPAREN) ) {
alt45=1;
}
switch (alt45) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:50: outer_join_sign
{
pushFollow(FOLLOW_outer_join_sign_in_column_spec1352);
outer_join_sign155=outer_join_sign();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, outer_join_sign155.getTree());
}
break;
}
}
break;
case 2 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:339:4: schema_name DOT package_name DOT IDENTIFIER DOT IDENTIFIER
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_schema_name_in_column_spec1360);
schema_name156=schema_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, schema_name156.getTree());
DOT157=(Token)match(input,DOT,FOLLOW_DOT_in_column_spec1362); if (state.failed) return retval;
if ( state.backtracking==0 ) {
DOT157_tree =
(CommonTree)adaptor.create(DOT157)
;
adaptor.addChild(root_0, DOT157_tree);
}
pushFollow(FOLLOW_package_name_in_column_spec1364);
package_name158=package_name();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, package_name158.getTree());
DOT159=(Token)match(input,DOT,FOLLOW_DOT_in_column_spec1366); if (state.failed) return retval;
if ( state.backtracking==0 ) {
DOT159_tree =
(CommonTree)adaptor.create(DOT159)
;
adaptor.addChild(root_0, DOT159_tree);
}
IDENTIFIER160=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_column_spec1368); if (state.failed) return retval;
if ( state.backtracking==0 ) {
IDENTIFIER160_tree =
(CommonTree)adaptor.create(IDENTIFIER160)
;
adaptor.addChild(root_0, IDENTIFIER160_tree);
}
DOT161=(Token)match(input,DOT,FOLLOW_DOT_in_column_spec1370); if (state.failed) return retval;
if ( state.backtracking==0 ) {
DOT161_tree =
(CommonTree)adaptor.create(DOT161)
;
adaptor.addChild(root_0, DOT161_tree);
}
IDENTIFIER162=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_column_spec1372); if (state.failed) return retval;
if ( state.backtracking==0 ) {
IDENTIFIER162_tree =
(CommonTree)adaptor.create(IDENTIFIER162)
;
adaptor.addChild(root_0, IDENTIFIER162_tree);
}
}
break;
case 3 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:340:4: bind_variable
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_bind_variable_in_column_spec1377);
bind_variable163=bind_variable();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, bind_variable163.getTree());
}
break;
case 4 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:341:4: MULT
{
root_0 = (CommonTree)adaptor.nil();
MULT164=(Token)match(input,MULT,FOLLOW_MULT_in_column_spec1382); if (state.failed) return retval;
if ( state.backtracking==0 ) {
MULT164_tree =
(CommonTree)adaptor.create(MULT164)
;
adaptor.addChild(root_0, MULT164_tree);
}
}
break;
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 34, column_spec_StartIndex); }
}
return retval;
}
// $ANTLR end "column_spec"
public static class function_call_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "function_call"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:345:1: function_call : IDENTIFIER LPAREN sql_expression ( COMMA sql_expression )* RPAREN ;
public final ToolSQLParser.function_call_return function_call() throws RecognitionException {
ToolSQLParser.function_call_return retval = new ToolSQLParser.function_call_return();
retval.start = input.LT(1);
int function_call_StartIndex = input.index();
CommonTree root_0 = null;
Token IDENTIFIER165=null;
Token LPAREN166=null;
Token COMMA168=null;
Token RPAREN170=null;
ToolSQLParser.sql_expression_return sql_expression167 =null;
ToolSQLParser.sql_expression_return sql_expression169 =null;
CommonTree IDENTIFIER165_tree=null;
CommonTree LPAREN166_tree=null;
CommonTree COMMA168_tree=null;
CommonTree RPAREN170_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 35) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:346:2: ( IDENTIFIER LPAREN sql_expression ( COMMA sql_expression )* RPAREN )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:346:4: IDENTIFIER LPAREN sql_expression ( COMMA sql_expression )* RPAREN
{
root_0 = (CommonTree)adaptor.nil();
IDENTIFIER165=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_function_call1395); if (state.failed) return retval;
if ( state.backtracking==0 ) {
IDENTIFIER165_tree =
(CommonTree)adaptor.create(IDENTIFIER165)
;
adaptor.addChild(root_0, IDENTIFIER165_tree);
}
LPAREN166=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_function_call1399); if (state.failed) return retval;
if ( state.backtracking==0 ) {
LPAREN166_tree =
(CommonTree)adaptor.create(LPAREN166)
;
adaptor.addChild(root_0, LPAREN166_tree);
}
pushFollow(FOLLOW_sql_expression_in_function_call1403);
sql_expression167=sql_expression();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_expression167.getTree());
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:349:3: ( COMMA sql_expression )*
loop47:
do {
int alt47=2;
int LA47_0 = input.LA(1);
if ( (LA47_0==COMMA) ) {
alt47=1;
}
switch (alt47) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:349:4: COMMA sql_expression
{
COMMA168=(Token)match(input,COMMA,FOLLOW_COMMA_in_function_call1408); if (state.failed) return retval;
if ( state.backtracking==0 ) {
COMMA168_tree =
(CommonTree)adaptor.create(COMMA168)
;
adaptor.addChild(root_0, COMMA168_tree);
}
pushFollow(FOLLOW_sql_expression_in_function_call1410);
sql_expression169=sql_expression();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_expression169.getTree());
}
break;
default :
break loop47;
}
} while (true);
RPAREN170=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_function_call1416); if (state.failed) return retval;
if ( state.backtracking==0 ) {
RPAREN170_tree =
(CommonTree)adaptor.create(RPAREN170)
;
adaptor.addChild(root_0, RPAREN170_tree);
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 35, function_call_StartIndex); }
}
return retval;
}
// $ANTLR end "function_call"
public static class schema_name_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "schema_name"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:353:1: schema_name : IDENTIFIER ;
public final ToolSQLParser.schema_name_return schema_name() throws RecognitionException {
ToolSQLParser.schema_name_return retval = new ToolSQLParser.schema_name_return();
retval.start = input.LT(1);
int schema_name_StartIndex = input.index();
CommonTree root_0 = null;
Token IDENTIFIER171=null;
CommonTree IDENTIFIER171_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 36) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:354:2: ( IDENTIFIER )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:354:4: IDENTIFIER
{
root_0 = (CommonTree)adaptor.nil();
IDENTIFIER171=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_schema_name1429); if (state.failed) return retval;
if ( state.backtracking==0 ) {
IDENTIFIER171_tree =
(CommonTree)adaptor.create(IDENTIFIER171)
;
adaptor.addChild(root_0, IDENTIFIER171_tree);
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 36, schema_name_StartIndex); }
}
return retval;
}
// $ANTLR end "schema_name"
public static class package_name_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "package_name"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:357:1: package_name : IDENTIFIER ;
public final ToolSQLParser.package_name_return package_name() throws RecognitionException {
ToolSQLParser.package_name_return retval = new ToolSQLParser.package_name_return();
retval.start = input.LT(1);
int package_name_StartIndex = input.index();
CommonTree root_0 = null;
Token IDENTIFIER172=null;
CommonTree IDENTIFIER172_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 37) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:358:2: ( IDENTIFIER )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:358:4: IDENTIFIER
{
root_0 = (CommonTree)adaptor.nil();
IDENTIFIER172=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_package_name1440); if (state.failed) return retval;
if ( state.backtracking==0 ) {
IDENTIFIER172_tree =
(CommonTree)adaptor.create(IDENTIFIER172)
;
adaptor.addChild(root_0, IDENTIFIER172_tree);
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 37, package_name_StartIndex); }
}
return retval;
}
// $ANTLR end "package_name"
public static class t_alias_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "t_alias"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:361:1: t_alias : IDENTIFIER ;
public final ToolSQLParser.t_alias_return t_alias() throws RecognitionException {
ToolSQLParser.t_alias_return retval = new ToolSQLParser.t_alias_return();
retval.start = input.LT(1);
int t_alias_StartIndex = input.index();
CommonTree root_0 = null;
Token IDENTIFIER173=null;
CommonTree IDENTIFIER173_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 38) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:362:2: ( IDENTIFIER )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:362:4: IDENTIFIER
{
root_0 = (CommonTree)adaptor.nil();
IDENTIFIER173=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_t_alias1451); if (state.failed) return retval;
if ( state.backtracking==0 ) {
IDENTIFIER173_tree =
(CommonTree)adaptor.create(IDENTIFIER173)
;
adaptor.addChild(root_0, IDENTIFIER173_tree);
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 38, t_alias_StartIndex); }
}
return retval;
}
// $ANTLR end "t_alias"
public static class c_alias_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "c_alias"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:365:1: c_alias : ( ( AS )? IDENTIFIER | AS );
public final ToolSQLParser.c_alias_return c_alias() throws RecognitionException {
ToolSQLParser.c_alias_return retval = new ToolSQLParser.c_alias_return();
retval.start = input.LT(1);
int c_alias_StartIndex = input.index();
CommonTree root_0 = null;
Token AS174=null;
Token IDENTIFIER175=null;
Token AS176=null;
CommonTree AS174_tree=null;
CommonTree IDENTIFIER175_tree=null;
CommonTree AS176_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 39) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:366:2: ( ( AS )? IDENTIFIER | AS )
int alt49=2;
int LA49_0 = input.LA(1);
if ( (LA49_0==AS) ) {
int LA49_1 = input.LA(2);
if ( (LA49_1==IDENTIFIER) ) {
alt49=1;
}
else if ( (LA49_1==EOF||LA49_1==COMMA||LA49_1==FROM||LA49_1==INTO||LA49_1==RPAREN) ) {
alt49=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 49, 1, input);
throw nvae;
}
}
else if ( (LA49_0==IDENTIFIER) ) {
alt49=1;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 49, 0, input);
throw nvae;
}
switch (alt49) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:366:4: ( AS )? IDENTIFIER
{
root_0 = (CommonTree)adaptor.nil();
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:366:4: ( AS )?
int alt48=2;
int LA48_0 = input.LA(1);
if ( (LA48_0==AS) ) {
alt48=1;
}
switch (alt48) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:366:4: AS
{
AS174=(Token)match(input,AS,FOLLOW_AS_in_c_alias1462); if (state.failed) return retval;
if ( state.backtracking==0 ) {
AS174_tree =
(CommonTree)adaptor.create(AS174)
;
adaptor.addChild(root_0, AS174_tree);
}
}
break;
}
IDENTIFIER175=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_c_alias1465); if (state.failed) return retval;
if ( state.backtracking==0 ) {
IDENTIFIER175_tree =
(CommonTree)adaptor.create(IDENTIFIER175)
;
adaptor.addChild(root_0, IDENTIFIER175_tree);
}
}
break;
case 2 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:367:4: AS
{
root_0 = (CommonTree)adaptor.nil();
AS176=(Token)match(input,AS,FOLLOW_AS_in_c_alias1470); if (state.failed) return retval;
if ( state.backtracking==0 ) {
AS176_tree =
(CommonTree)adaptor.create(AS176)
;
adaptor.addChild(root_0, AS176_tree);
}
}
break;
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 39, c_alias_StartIndex); }
}
return retval;
}
// $ANTLR end "c_alias"
public static class bind_variable_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "bind_variable"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:370:1: bind_variable : COLON qualifiedName ( LPAREN argumentList RPAREN )? ;
public final ToolSQLParser.bind_variable_return bind_variable() throws RecognitionException {
ToolSQLParser.bind_variable_return retval = new ToolSQLParser.bind_variable_return();
retval.start = input.LT(1);
int bind_variable_StartIndex = input.index();
CommonTree root_0 = null;
Token COLON177=null;
Token LPAREN179=null;
Token RPAREN181=null;
ToolSQLParser.qualifiedName_return qualifiedName178 =null;
ToolSQLParser.argumentList_return argumentList180 =null;
CommonTree COLON177_tree=null;
CommonTree LPAREN179_tree=null;
CommonTree RPAREN181_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 40) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:371:3: ( COLON qualifiedName ( LPAREN argumentList RPAREN )? )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:371:5: COLON qualifiedName ( LPAREN argumentList RPAREN )?
{
root_0 = (CommonTree)adaptor.nil();
COLON177=(Token)match(input,COLON,FOLLOW_COLON_in_bind_variable1483); if (state.failed) return retval;
if ( state.backtracking==0 ) {
COLON177_tree =
(CommonTree)adaptor.create(COLON177)
;
adaptor.addChild(root_0, COLON177_tree);
}
pushFollow(FOLLOW_qualifiedName_in_bind_variable1485);
qualifiedName178=qualifiedName();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, qualifiedName178.getTree());
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:372:4: ( LPAREN argumentList RPAREN )?
int alt50=2;
int LA50_0 = input.LA(1);
if ( (LA50_0==LPAREN) ) {
alt50=1;
}
switch (alt50) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:373:5: LPAREN argumentList RPAREN
{
LPAREN179=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_bind_variable1496); if (state.failed) return retval;
if ( state.backtracking==0 ) {
LPAREN179_tree =
(CommonTree)adaptor.create(LPAREN179)
;
adaptor.addChild(root_0, LPAREN179_tree);
}
pushFollow(FOLLOW_argumentList_in_bind_variable1498);
argumentList180=argumentList();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, argumentList180.getTree());
RPAREN181=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_bind_variable1500); if (state.failed) return retval;
if ( state.backtracking==0 ) {
RPAREN181_tree =
(CommonTree)adaptor.create(RPAREN181)
;
adaptor.addChild(root_0, RPAREN181_tree);
}
}
break;
}
if ( state.backtracking==0 ) {System.out.println("Bind variable: " + input.toString(retval.start,input.LT(-1)));}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 40, bind_variable_StartIndex); }
}
return retval;
}
// $ANTLR end "bind_variable"
public static class outer_join_sign_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "outer_join_sign"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:377:1: outer_join_sign : LPAREN PLUS RPAREN ;
public final ToolSQLParser.outer_join_sign_return outer_join_sign() throws RecognitionException {
ToolSQLParser.outer_join_sign_return retval = new ToolSQLParser.outer_join_sign_return();
retval.start = input.LT(1);
int outer_join_sign_StartIndex = input.index();
CommonTree root_0 = null;
Token LPAREN182=null;
Token PLUS183=null;
Token RPAREN184=null;
CommonTree LPAREN182_tree=null;
CommonTree PLUS183_tree=null;
CommonTree RPAREN184_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 41) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:378:2: ( LPAREN PLUS RPAREN )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:378:4: LPAREN PLUS RPAREN
{
root_0 = (CommonTree)adaptor.nil();
LPAREN182=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_outer_join_sign1521); if (state.failed) return retval;
if ( state.backtracking==0 ) {
LPAREN182_tree =
(CommonTree)adaptor.create(LPAREN182)
;
adaptor.addChild(root_0, LPAREN182_tree);
}
PLUS183=(Token)match(input,PLUS,FOLLOW_PLUS_in_outer_join_sign1523); if (state.failed) return retval;
if ( state.backtracking==0 ) {
PLUS183_tree =
(CommonTree)adaptor.create(PLUS183)
;
adaptor.addChild(root_0, PLUS183_tree);
}
RPAREN184=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_outer_join_sign1525); if (state.failed) return retval;
if ( state.backtracking==0 ) {
RPAREN184_tree =
(CommonTree)adaptor.create(RPAREN184)
;
adaptor.addChild(root_0, RPAREN184_tree);
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 41, outer_join_sign_StartIndex); }
}
return retval;
}
// $ANTLR end "outer_join_sign"
public static class sql_condition_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "sql_condition"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:383:1: sql_condition : sql_logical_term ( OR sql_logical_term )* ;
public final ToolSQLParser.sql_condition_return sql_condition() throws RecognitionException {
ToolSQLParser.sql_condition_return retval = new ToolSQLParser.sql_condition_return();
retval.start = input.LT(1);
int sql_condition_StartIndex = input.index();
CommonTree root_0 = null;
Token OR186=null;
ToolSQLParser.sql_logical_term_return sql_logical_term185 =null;
ToolSQLParser.sql_logical_term_return sql_logical_term187 =null;
CommonTree OR186_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 42) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:383:15: ( sql_logical_term ( OR sql_logical_term )* )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:383:17: sql_logical_term ( OR sql_logical_term )*
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_sql_logical_term_in_sql_condition1537);
sql_logical_term185=sql_logical_term();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_logical_term185.getTree());
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:383:34: ( OR sql_logical_term )*
loop51:
do {
int alt51=2;
int LA51_0 = input.LA(1);
if ( (LA51_0==OR) ) {
int LA51_2 = input.LA(2);
if ( (synpred72_ToolSQL()) ) {
alt51=1;
}
}
switch (alt51) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:383:36: OR sql_logical_term
{
OR186=(Token)match(input,OR,FOLLOW_OR_in_sql_condition1541); if (state.failed) return retval;
if ( state.backtracking==0 ) {
OR186_tree =
(CommonTree)adaptor.create(OR186)
;
adaptor.addChild(root_0, OR186_tree);
}
pushFollow(FOLLOW_sql_logical_term_in_sql_condition1543);
sql_logical_term187=sql_logical_term();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_logical_term187.getTree());
}
break;
default :
break loop51;
}
} while (true);
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 42, sql_condition_StartIndex); }
}
return retval;
}
// $ANTLR end "sql_condition"
public static class sql_logical_term_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "sql_logical_term"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:385:1: sql_logical_term : sql_logical_factor ( AND sql_logical_factor )* ;
public final ToolSQLParser.sql_logical_term_return sql_logical_term() throws RecognitionException {
ToolSQLParser.sql_logical_term_return retval = new ToolSQLParser.sql_logical_term_return();
retval.start = input.LT(1);
int sql_logical_term_StartIndex = input.index();
CommonTree root_0 = null;
Token AND189=null;
ToolSQLParser.sql_logical_factor_return sql_logical_factor188 =null;
ToolSQLParser.sql_logical_factor_return sql_logical_factor190 =null;
CommonTree AND189_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 43) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:386:7: ( sql_logical_factor ( AND sql_logical_factor )* )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:386:9: sql_logical_factor ( AND sql_logical_factor )*
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_sql_logical_factor_in_sql_logical_term1562);
sql_logical_factor188=sql_logical_factor();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_logical_factor188.getTree());
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:386:28: ( AND sql_logical_factor )*
loop52:
do {
int alt52=2;
int LA52_0 = input.LA(1);
if ( (LA52_0==AND) ) {
int LA52_2 = input.LA(2);
if ( (synpred73_ToolSQL()) ) {
alt52=1;
}
}
switch (alt52) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:386:30: AND sql_logical_factor
{
AND189=(Token)match(input,AND,FOLLOW_AND_in_sql_logical_term1566); if (state.failed) return retval;
if ( state.backtracking==0 ) {
AND189_tree =
(CommonTree)adaptor.create(AND189)
;
adaptor.addChild(root_0, AND189_tree);
}
pushFollow(FOLLOW_sql_logical_factor_in_sql_logical_term1568);
sql_logical_factor190=sql_logical_factor();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_logical_factor190.getTree());
}
break;
default :
break loop52;
}
} while (true);
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 43, sql_logical_term_StartIndex); }
}
return retval;
}
// $ANTLR end "sql_logical_term"
public static class sql_logical_factor_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "sql_logical_factor"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:389:1: sql_logical_factor : ( sql_simple sql_comparison_op sql_simple | sql_simple ( NOT )? IN | sql_simple ( NOT )? LIKE | sql_simple ( NOT )? BETWEEN | sql_simple IS ( NOT )? NULL | quantified_factor | NOT sql_condition | LPAREN sql_condition RPAREN );
public final ToolSQLParser.sql_logical_factor_return sql_logical_factor() throws RecognitionException {
ToolSQLParser.sql_logical_factor_return retval = new ToolSQLParser.sql_logical_factor_return();
retval.start = input.LT(1);
int sql_logical_factor_StartIndex = input.index();
CommonTree root_0 = null;
Token NOT195=null;
Token IN196=null;
Token NOT198=null;
Token LIKE199=null;
Token NOT201=null;
Token BETWEEN202=null;
Token IS204=null;
Token NOT205=null;
Token NULL206=null;
Token NOT208=null;
Token LPAREN210=null;
Token RPAREN212=null;
ToolSQLParser.sql_simple_return sql_simple191 =null;
ToolSQLParser.sql_comparison_op_return sql_comparison_op192 =null;
ToolSQLParser.sql_simple_return sql_simple193 =null;
ToolSQLParser.sql_simple_return sql_simple194 =null;
ToolSQLParser.sql_simple_return sql_simple197 =null;
ToolSQLParser.sql_simple_return sql_simple200 =null;
ToolSQLParser.sql_simple_return sql_simple203 =null;
ToolSQLParser.quantified_factor_return quantified_factor207 =null;
ToolSQLParser.sql_condition_return sql_condition209 =null;
ToolSQLParser.sql_condition_return sql_condition211 =null;
CommonTree NOT195_tree=null;
CommonTree IN196_tree=null;
CommonTree NOT198_tree=null;
CommonTree LIKE199_tree=null;
CommonTree NOT201_tree=null;
CommonTree BETWEEN202_tree=null;
CommonTree IS204_tree=null;
CommonTree NOT205_tree=null;
CommonTree NULL206_tree=null;
CommonTree NOT208_tree=null;
CommonTree LPAREN210_tree=null;
CommonTree RPAREN212_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 44) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:390:7: ( sql_simple sql_comparison_op sql_simple | sql_simple ( NOT )? IN | sql_simple ( NOT )? LIKE | sql_simple ( NOT )? BETWEEN | sql_simple IS ( NOT )? NULL | quantified_factor | NOT sql_condition | LPAREN sql_condition RPAREN )
int alt57=8;
switch ( input.LA(1) ) {
case MINUS:
case PLUS:
{
int LA57_1 = input.LA(2);
if ( (synpred74_ToolSQL()) ) {
alt57=1;
}
else if ( (synpred76_ToolSQL()) ) {
alt57=2;
}
else if ( (synpred78_ToolSQL()) ) {
alt57=3;
}
else if ( (synpred80_ToolSQL()) ) {
alt57=4;
}
else if ( (synpred82_ToolSQL()) ) {
alt57=5;
}
else if ( (synpred83_ToolSQL()) ) {
alt57=6;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 57, 1, input);
throw nvae;
}
}
break;
case FALSE:
case TRUE:
{
int LA57_2 = input.LA(2);
if ( (synpred74_ToolSQL()) ) {
alt57=1;
}
else if ( (synpred76_ToolSQL()) ) {
alt57=2;
}
else if ( (synpred78_ToolSQL()) ) {
alt57=3;
}
else if ( (synpred80_ToolSQL()) ) {
alt57=4;
}
else if ( (synpred82_ToolSQL()) ) {
alt57=5;
}
else if ( (synpred83_ToolSQL()) ) {
alt57=6;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 57, 2, input);
throw nvae;
}
}
break;
case IDENTIFIER:
{
int LA57_3 = input.LA(2);
if ( (synpred74_ToolSQL()) ) {
alt57=1;
}
else if ( (synpred76_ToolSQL()) ) {
alt57=2;
}
else if ( (synpred78_ToolSQL()) ) {
alt57=3;
}
else if ( (synpred80_ToolSQL()) ) {
alt57=4;
}
else if ( (synpred82_ToolSQL()) ) {
alt57=5;
}
else if ( (synpred83_ToolSQL()) ) {
alt57=6;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 57, 3, input);
throw nvae;
}
}
break;
case COLON:
{
int LA57_4 = input.LA(2);
if ( (synpred74_ToolSQL()) ) {
alt57=1;
}
else if ( (synpred76_ToolSQL()) ) {
alt57=2;
}
else if ( (synpred78_ToolSQL()) ) {
alt57=3;
}
else if ( (synpred80_ToolSQL()) ) {
alt57=4;
}
else if ( (synpred82_ToolSQL()) ) {
alt57=5;
}
else if ( (synpred83_ToolSQL()) ) {
alt57=6;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 57, 4, input);
throw nvae;
}
}
break;
case MULT:
{
int LA57_5 = input.LA(2);
if ( (synpred74_ToolSQL()) ) {
alt57=1;
}
else if ( (synpred76_ToolSQL()) ) {
alt57=2;
}
else if ( (synpred78_ToolSQL()) ) {
alt57=3;
}
else if ( (synpred80_ToolSQL()) ) {
alt57=4;
}
else if ( (synpred82_ToolSQL()) ) {
alt57=5;
}
else if ( (synpred83_ToolSQL()) ) {
alt57=6;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 57, 5, input);
throw nvae;
}
}
break;
case STRINGLITERAL:
{
int LA57_6 = input.LA(2);
if ( (synpred74_ToolSQL()) ) {
alt57=1;
}
else if ( (synpred76_ToolSQL()) ) {
alt57=2;
}
else if ( (synpred78_ToolSQL()) ) {
alt57=3;
}
else if ( (synpred80_ToolSQL()) ) {
alt57=4;
}
else if ( (synpred82_ToolSQL()) ) {
alt57=5;
}
else if ( (synpred83_ToolSQL()) ) {
alt57=6;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 57, 6, input);
throw nvae;
}
}
break;
case FLOATLITERAL:
case INTLITERAL:
{
int LA57_7 = input.LA(2);
if ( (synpred74_ToolSQL()) ) {
alt57=1;
}
else if ( (synpred76_ToolSQL()) ) {
alt57=2;
}
else if ( (synpred78_ToolSQL()) ) {
alt57=3;
}
else if ( (synpred80_ToolSQL()) ) {
alt57=4;
}
else if ( (synpred82_ToolSQL()) ) {
alt57=5;
}
else if ( (synpred83_ToolSQL()) ) {
alt57=6;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 57, 7, input);
throw nvae;
}
}
break;
case NOT:
{
int LA57_8 = input.LA(2);
if ( (synpred83_ToolSQL()) ) {
alt57=6;
}
else if ( (synpred84_ToolSQL()) ) {
alt57=7;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 57, 8, input);
throw nvae;
}
}
break;
case EXISTS:
{
alt57=6;
}
break;
case LPAREN:
{
int LA57_10 = input.LA(2);
if ( (synpred83_ToolSQL()) ) {
alt57=6;
}
else if ( (true) ) {
alt57=8;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 57, 10, input);
throw nvae;
}
}
break;
default:
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 57, 0, input);
throw nvae;
}
switch (alt57) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:391:7: sql_simple sql_comparison_op sql_simple
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_sql_simple_in_sql_logical_factor1597);
sql_simple191=sql_simple();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_simple191.getTree());
pushFollow(FOLLOW_sql_comparison_op_in_sql_logical_factor1599);
sql_comparison_op192=sql_comparison_op();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_comparison_op192.getTree());
pushFollow(FOLLOW_sql_simple_in_sql_logical_factor1601);
sql_simple193=sql_simple();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_simple193.getTree());
}
break;
case 2 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:392:10: sql_simple ( NOT )? IN
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_sql_simple_in_sql_logical_factor1614);
sql_simple194=sql_simple();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_simple194.getTree());
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:392:21: ( NOT )?
int alt53=2;
int LA53_0 = input.LA(1);
if ( (LA53_0==NOT) ) {
alt53=1;
}
switch (alt53) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:392:21: NOT
{
NOT195=(Token)match(input,NOT,FOLLOW_NOT_in_sql_logical_factor1616); if (state.failed) return retval;
if ( state.backtracking==0 ) {
NOT195_tree =
(CommonTree)adaptor.create(NOT195)
;
adaptor.addChild(root_0, NOT195_tree);
}
}
break;
}
IN196=(Token)match(input,IN,FOLLOW_IN_in_sql_logical_factor1619); if (state.failed) return retval;
if ( state.backtracking==0 ) {
IN196_tree =
(CommonTree)adaptor.create(IN196)
;
adaptor.addChild(root_0, IN196_tree);
}
}
break;
case 3 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:393:10: sql_simple ( NOT )? LIKE
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_sql_simple_in_sql_logical_factor1631);
sql_simple197=sql_simple();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_simple197.getTree());
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:393:21: ( NOT )?
int alt54=2;
int LA54_0 = input.LA(1);
if ( (LA54_0==NOT) ) {
alt54=1;
}
switch (alt54) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:393:21: NOT
{
NOT198=(Token)match(input,NOT,FOLLOW_NOT_in_sql_logical_factor1633); if (state.failed) return retval;
if ( state.backtracking==0 ) {
NOT198_tree =
(CommonTree)adaptor.create(NOT198)
;
adaptor.addChild(root_0, NOT198_tree);
}
}
break;
}
LIKE199=(Token)match(input,LIKE,FOLLOW_LIKE_in_sql_logical_factor1636); if (state.failed) return retval;
if ( state.backtracking==0 ) {
LIKE199_tree =
(CommonTree)adaptor.create(LIKE199)
;
adaptor.addChild(root_0, LIKE199_tree);
}
}
break;
case 4 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:394:10: sql_simple ( NOT )? BETWEEN
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_sql_simple_in_sql_logical_factor1649);
sql_simple200=sql_simple();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_simple200.getTree());
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:394:21: ( NOT )?
int alt55=2;
int LA55_0 = input.LA(1);
if ( (LA55_0==NOT) ) {
alt55=1;
}
switch (alt55) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:394:21: NOT
{
NOT201=(Token)match(input,NOT,FOLLOW_NOT_in_sql_logical_factor1651); if (state.failed) return retval;
if ( state.backtracking==0 ) {
NOT201_tree =
(CommonTree)adaptor.create(NOT201)
;
adaptor.addChild(root_0, NOT201_tree);
}
}
break;
}
BETWEEN202=(Token)match(input,BETWEEN,FOLLOW_BETWEEN_in_sql_logical_factor1654); if (state.failed) return retval;
if ( state.backtracking==0 ) {
BETWEEN202_tree =
(CommonTree)adaptor.create(BETWEEN202)
;
adaptor.addChild(root_0, BETWEEN202_tree);
}
}
break;
case 5 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:395:10: sql_simple IS ( NOT )? NULL
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_sql_simple_in_sql_logical_factor1667);
sql_simple203=sql_simple();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_simple203.getTree());
IS204=(Token)match(input,IS,FOLLOW_IS_in_sql_logical_factor1669); if (state.failed) return retval;
if ( state.backtracking==0 ) {
IS204_tree =
(CommonTree)adaptor.create(IS204)
;
adaptor.addChild(root_0, IS204_tree);
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:395:24: ( NOT )?
int alt56=2;
int LA56_0 = input.LA(1);
if ( (LA56_0==NOT) ) {
alt56=1;
}
switch (alt56) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:395:24: NOT
{
NOT205=(Token)match(input,NOT,FOLLOW_NOT_in_sql_logical_factor1671); if (state.failed) return retval;
if ( state.backtracking==0 ) {
NOT205_tree =
(CommonTree)adaptor.create(NOT205)
;
adaptor.addChild(root_0, NOT205_tree);
}
}
break;
}
NULL206=(Token)match(input,NULL,FOLLOW_NULL_in_sql_logical_factor1674); if (state.failed) return retval;
if ( state.backtracking==0 ) {
NULL206_tree =
(CommonTree)adaptor.create(NULL206)
;
adaptor.addChild(root_0, NULL206_tree);
}
}
break;
case 6 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:396:10: quantified_factor
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_quantified_factor_in_sql_logical_factor1687);
quantified_factor207=quantified_factor();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, quantified_factor207.getTree());
}
break;
case 7 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:397:10: NOT sql_condition
{
root_0 = (CommonTree)adaptor.nil();
NOT208=(Token)match(input,NOT,FOLLOW_NOT_in_sql_logical_factor1700); if (state.failed) return retval;
if ( state.backtracking==0 ) {
NOT208_tree =
(CommonTree)adaptor.create(NOT208)
;
adaptor.addChild(root_0, NOT208_tree);
}
pushFollow(FOLLOW_sql_condition_in_sql_logical_factor1702);
sql_condition209=sql_condition();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_condition209.getTree());
}
break;
case 8 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:398:10: LPAREN sql_condition RPAREN
{
root_0 = (CommonTree)adaptor.nil();
LPAREN210=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_sql_logical_factor1714); if (state.failed) return retval;
if ( state.backtracking==0 ) {
LPAREN210_tree =
(CommonTree)adaptor.create(LPAREN210)
;
adaptor.addChild(root_0, LPAREN210_tree);
}
pushFollow(FOLLOW_sql_condition_in_sql_logical_factor1716);
sql_condition211=sql_condition();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_condition211.getTree());
RPAREN212=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_sql_logical_factor1718); if (state.failed) return retval;
if ( state.backtracking==0 ) {
RPAREN212_tree =
(CommonTree)adaptor.create(RPAREN212)
;
adaptor.addChild(root_0, RPAREN212_tree);
}
}
break;
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 44, sql_logical_factor_StartIndex); }
}
return retval;
}
// $ANTLR end "sql_logical_factor"
public static class sql_simple_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "sql_simple"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:401:1: sql_simple : sql_expression ;
public final ToolSQLParser.sql_simple_return sql_simple() throws RecognitionException {
ToolSQLParser.sql_simple_return retval = new ToolSQLParser.sql_simple_return();
retval.start = input.LT(1);
int sql_simple_StartIndex = input.index();
CommonTree root_0 = null;
ToolSQLParser.sql_expression_return sql_expression213 =null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 45) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:402:2: ( sql_expression )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:402:4: sql_expression
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_sql_expression_in_sql_simple1735);
sql_expression213=sql_expression();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_expression213.getTree());
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 45, sql_simple_StartIndex); }
}
return retval;
}
// $ANTLR end "sql_simple"
public static class qualifiedName_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "qualifiedName"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:405:1: qualifiedName : IDENTIFIER ( DOT IDENTIFIER )* ;
public final ToolSQLParser.qualifiedName_return qualifiedName() throws RecognitionException {
ToolSQLParser.qualifiedName_return retval = new ToolSQLParser.qualifiedName_return();
retval.start = input.LT(1);
int qualifiedName_StartIndex = input.index();
CommonTree root_0 = null;
Token IDENTIFIER214=null;
Token DOT215=null;
Token IDENTIFIER216=null;
CommonTree IDENTIFIER214_tree=null;
CommonTree DOT215_tree=null;
CommonTree IDENTIFIER216_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 46) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:406:5: ( IDENTIFIER ( DOT IDENTIFIER )* )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:406:9: IDENTIFIER ( DOT IDENTIFIER )*
{
root_0 = (CommonTree)adaptor.nil();
IDENTIFIER214=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_qualifiedName1751); if (state.failed) return retval;
if ( state.backtracking==0 ) {
IDENTIFIER214_tree =
(CommonTree)adaptor.create(IDENTIFIER214)
;
adaptor.addChild(root_0, IDENTIFIER214_tree);
}
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:406:20: ( DOT IDENTIFIER )*
loop58:
do {
int alt58=2;
int LA58_0 = input.LA(1);
if ( (LA58_0==DOT) ) {
alt58=1;
}
switch (alt58) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:406:21: DOT IDENTIFIER
{
DOT215=(Token)match(input,DOT,FOLLOW_DOT_in_qualifiedName1754); if (state.failed) return retval;
if ( state.backtracking==0 ) {
DOT215_tree =
(CommonTree)adaptor.create(DOT215)
;
adaptor.addChild(root_0, DOT215_tree);
}
IDENTIFIER216=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_qualifiedName1756); if (state.failed) return retval;
if ( state.backtracking==0 ) {
IDENTIFIER216_tree =
(CommonTree)adaptor.create(IDENTIFIER216)
;
adaptor.addChild(root_0, IDENTIFIER216_tree);
}
}
break;
default :
break loop58;
}
} while (true);
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 46, qualifiedName_StartIndex); }
}
return retval;
}
// $ANTLR end "qualifiedName"
public static class quantified_factor_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "quantified_factor"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:409:1: quantified_factor : ( ( sql_simple sql_comparison_op ( sql_anyAll )? subquery ) | ( ( NOT )? EXISTS subquery ) | subquery );
public final ToolSQLParser.quantified_factor_return quantified_factor() throws RecognitionException {
ToolSQLParser.quantified_factor_return retval = new ToolSQLParser.quantified_factor_return();
retval.start = input.LT(1);
int quantified_factor_StartIndex = input.index();
CommonTree root_0 = null;
Token NOT221=null;
Token EXISTS222=null;
ToolSQLParser.sql_simple_return sql_simple217 =null;
ToolSQLParser.sql_comparison_op_return sql_comparison_op218 =null;
ToolSQLParser.sql_anyAll_return sql_anyAll219 =null;
ToolSQLParser.subquery_return subquery220 =null;
ToolSQLParser.subquery_return subquery223 =null;
ToolSQLParser.subquery_return subquery224 =null;
CommonTree NOT221_tree=null;
CommonTree EXISTS222_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 47) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:410:7: ( ( sql_simple sql_comparison_op ( sql_anyAll )? subquery ) | ( ( NOT )? EXISTS subquery ) | subquery )
int alt61=3;
switch ( input.LA(1) ) {
case COLON:
case FALSE:
case FLOATLITERAL:
case IDENTIFIER:
case INTLITERAL:
case MINUS:
case MULT:
case PLUS:
case STRINGLITERAL:
case TRUE:
{
alt61=1;
}
break;
case EXISTS:
case NOT:
{
alt61=2;
}
break;
case LPAREN:
{
alt61=3;
}
break;
default:
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 61, 0, input);
throw nvae;
}
switch (alt61) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:411:7: ( sql_simple sql_comparison_op ( sql_anyAll )? subquery )
{
root_0 = (CommonTree)adaptor.nil();
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:411:7: ( sql_simple sql_comparison_op ( sql_anyAll )? subquery )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:411:9: sql_simple sql_comparison_op ( sql_anyAll )? subquery
{
pushFollow(FOLLOW_sql_simple_in_quantified_factor1786);
sql_simple217=sql_simple();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_simple217.getTree());
pushFollow(FOLLOW_sql_comparison_op_in_quantified_factor1788);
sql_comparison_op218=sql_comparison_op();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_comparison_op218.getTree());
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:411:38: ( sql_anyAll )?
int alt59=2;
int LA59_0 = input.LA(1);
if ( (LA59_0==ALL||LA59_0==ANY) ) {
alt59=1;
}
switch (alt59) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:411:38: sql_anyAll
{
pushFollow(FOLLOW_sql_anyAll_in_quantified_factor1790);
sql_anyAll219=sql_anyAll();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_anyAll219.getTree());
}
break;
}
pushFollow(FOLLOW_subquery_in_quantified_factor1793);
subquery220=subquery();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, subquery220.getTree());
}
}
break;
case 2 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:412:9: ( ( NOT )? EXISTS subquery )
{
root_0 = (CommonTree)adaptor.nil();
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:412:9: ( ( NOT )? EXISTS subquery )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:412:11: ( NOT )? EXISTS subquery
{
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:412:11: ( NOT )?
int alt60=2;
int LA60_0 = input.LA(1);
if ( (LA60_0==NOT) ) {
alt60=1;
}
switch (alt60) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:412:11: NOT
{
NOT221=(Token)match(input,NOT,FOLLOW_NOT_in_quantified_factor1808); if (state.failed) return retval;
if ( state.backtracking==0 ) {
NOT221_tree =
(CommonTree)adaptor.create(NOT221)
;
adaptor.addChild(root_0, NOT221_tree);
}
}
break;
}
EXISTS222=(Token)match(input,EXISTS,FOLLOW_EXISTS_in_quantified_factor1811); if (state.failed) return retval;
if ( state.backtracking==0 ) {
EXISTS222_tree =
(CommonTree)adaptor.create(EXISTS222)
;
adaptor.addChild(root_0, EXISTS222_tree);
}
pushFollow(FOLLOW_subquery_in_quantified_factor1813);
subquery223=subquery();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, subquery223.getTree());
}
}
break;
case 3 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:413:9: subquery
{
root_0 = (CommonTree)adaptor.nil();
pushFollow(FOLLOW_subquery_in_quantified_factor1826);
subquery224=subquery();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, subquery224.getTree());
}
break;
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 47, quantified_factor_StartIndex); }
}
return retval;
}
// $ANTLR end "quantified_factor"
public static class sql_anyAll_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "sql_anyAll"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:415:1: sql_anyAll : ( ANY | ALL );
public final ToolSQLParser.sql_anyAll_return sql_anyAll() throws RecognitionException {
ToolSQLParser.sql_anyAll_return retval = new ToolSQLParser.sql_anyAll_return();
retval.start = input.LT(1);
int sql_anyAll_StartIndex = input.index();
CommonTree root_0 = null;
Token set225=null;
CommonTree set225_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 48) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:416:2: ( ANY | ALL )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:
{
root_0 = (CommonTree)adaptor.nil();
set225=(Token)input.LT(1);
if ( input.LA(1)==ALL||input.LA(1)==ANY ) {
input.consume();
if ( state.backtracking==0 ) adaptor.addChild(root_0,
(CommonTree)adaptor.create(set225)
);
state.errorRecovery=false;
state.failed=false;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
MismatchedSetException mse = new MismatchedSetException(null,input);
throw mse;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 48, sql_anyAll_StartIndex); }
}
return retval;
}
// $ANTLR end "sql_anyAll"
public static class sql_comparison_op_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "sql_comparison_op"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:420:1: sql_comparison_op : ( EQ | LT | GT | NOT_EQUAL | LTEQ | GTEQ | LIKE );
public final ToolSQLParser.sql_comparison_op_return sql_comparison_op() throws RecognitionException {
ToolSQLParser.sql_comparison_op_return retval = new ToolSQLParser.sql_comparison_op_return();
retval.start = input.LT(1);
int sql_comparison_op_StartIndex = input.index();
CommonTree root_0 = null;
Token set226=null;
CommonTree set226_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 49) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:421:7: ( EQ | LT | GT | NOT_EQUAL | LTEQ | GTEQ | LIKE )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:
{
root_0 = (CommonTree)adaptor.nil();
set226=(Token)input.LT(1);
if ( input.LA(1)==EQ||(input.LA(1) >= GT && input.LA(1) <= GTEQ)||input.LA(1)==LIKE||(input.LA(1) >= LT && input.LA(1) <= LTEQ)||input.LA(1)==NOT_EQUAL ) {
input.consume();
if ( state.backtracking==0 ) adaptor.addChild(root_0,
(CommonTree)adaptor.create(set226)
);
state.errorRecovery=false;
state.failed=false;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
MismatchedSetException mse = new MismatchedSetException(null,input);
throw mse;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 49, sql_comparison_op_StartIndex); }
}
return retval;
}
// $ANTLR end "sql_comparison_op"
public static class subquery_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "subquery"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:425:1: subquery : LPAREN sql_select RPAREN ;
public final ToolSQLParser.subquery_return subquery() throws RecognitionException {
ToolSQLParser.subquery_return retval = new ToolSQLParser.subquery_return();
retval.start = input.LT(1);
int subquery_StartIndex = input.index();
CommonTree root_0 = null;
Token LPAREN227=null;
Token RPAREN229=null;
ToolSQLParser.sql_select_return sql_select228 =null;
CommonTree LPAREN227_tree=null;
CommonTree RPAREN229_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 50) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:426:5: ( LPAREN sql_select RPAREN )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:427:9: LPAREN sql_select RPAREN
{
root_0 = (CommonTree)adaptor.nil();
LPAREN227=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_subquery1919); if (state.failed) return retval;
if ( state.backtracking==0 ) {
LPAREN227_tree =
(CommonTree)adaptor.create(LPAREN227)
;
adaptor.addChild(root_0, LPAREN227_tree);
}
pushFollow(FOLLOW_sql_select_in_subquery1921);
sql_select228=sql_select();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, sql_select228.getTree());
RPAREN229=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_subquery1923); if (state.failed) return retval;
if ( state.backtracking==0 ) {
RPAREN229_tree =
(CommonTree)adaptor.create(RPAREN229)
;
adaptor.addChild(root_0, RPAREN229_tree);
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 50, subquery_StartIndex); }
}
return retval;
}
// $ANTLR end "subquery"
public static class number_return extends ParserRuleReturnScope {
CommonTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "number"
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:431:1: number : ( INTLITERAL | FLOATLITERAL );
public final ToolSQLParser.number_return number() throws RecognitionException {
ToolSQLParser.number_return retval = new ToolSQLParser.number_return();
retval.start = input.LT(1);
int number_StartIndex = input.index();
CommonTree root_0 = null;
Token set230=null;
CommonTree set230_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 51) ) { return retval; }
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:432:4: ( INTLITERAL | FLOATLITERAL )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:
{
root_0 = (CommonTree)adaptor.nil();
set230=(Token)input.LT(1);
if ( input.LA(1)==FLOATLITERAL||input.LA(1)==INTLITERAL ) {
input.consume();
if ( state.backtracking==0 ) adaptor.addChild(root_0,
(CommonTree)adaptor.create(set230)
);
state.errorRecovery=false;
state.failed=false;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
MismatchedSetException mse = new MismatchedSetException(null,input);
throw mse;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 51, number_StartIndex); }
}
return retval;
}
// $ANTLR end "number"
// $ANTLR start synpred62_ToolSQL
public final void synpred62_ToolSQL_fragment() throws RecognitionException {
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:6: ( schema_name DOT )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:6: schema_name DOT
{
pushFollow(FOLLOW_schema_name_in_synpred62_ToolSQL1338);
schema_name();
state._fsp--;
if (state.failed) return ;
match(input,DOT,FOLLOW_DOT_in_synpred62_ToolSQL1340); if (state.failed) return ;
}
}
// $ANTLR end synpred62_ToolSQL
// $ANTLR start synpred63_ToolSQL
public final void synpred63_ToolSQL_fragment() throws RecognitionException {
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:5: ( ( schema_name DOT )? t_alias DOT )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:5: ( schema_name DOT )? t_alias DOT
{
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:5: ( schema_name DOT )?
int alt66=2;
int LA66_0 = input.LA(1);
if ( (LA66_0==IDENTIFIER) ) {
int LA66_1 = input.LA(2);
if ( (LA66_1==DOT) ) {
int LA66_2 = input.LA(3);
if ( (LA66_2==IDENTIFIER) ) {
alt66=1;
}
}
}
switch (alt66) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:6: schema_name DOT
{
pushFollow(FOLLOW_schema_name_in_synpred63_ToolSQL1338);
schema_name();
state._fsp--;
if (state.failed) return ;
match(input,DOT,FOLLOW_DOT_in_synpred63_ToolSQL1340); if (state.failed) return ;
}
break;
}
pushFollow(FOLLOW_t_alias_in_synpred63_ToolSQL1344);
t_alias();
state._fsp--;
if (state.failed) return ;
match(input,DOT,FOLLOW_DOT_in_synpred63_ToolSQL1346); if (state.failed) return ;
}
}
// $ANTLR end synpred63_ToolSQL
// $ANTLR start synpred65_ToolSQL
public final void synpred65_ToolSQL_fragment() throws RecognitionException {
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:4: ( ( ( schema_name DOT )? t_alias DOT )? column_name ( outer_join_sign )? )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:4: ( ( schema_name DOT )? t_alias DOT )? column_name ( outer_join_sign )?
{
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:4: ( ( schema_name DOT )? t_alias DOT )?
int alt68=2;
int LA68_0 = input.LA(1);
if ( (LA68_0==IDENTIFIER) ) {
int LA68_1 = input.LA(2);
if ( (LA68_1==DOT) ) {
int LA68_2 = input.LA(3);
if ( (synpred63_ToolSQL()) ) {
alt68=1;
}
}
}
switch (alt68) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:5: ( schema_name DOT )? t_alias DOT
{
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:5: ( schema_name DOT )?
int alt67=2;
int LA67_0 = input.LA(1);
if ( (LA67_0==IDENTIFIER) ) {
int LA67_1 = input.LA(2);
if ( (LA67_1==DOT) ) {
int LA67_2 = input.LA(3);
if ( (LA67_2==IDENTIFIER) ) {
int LA67_3 = input.LA(4);
if ( (LA67_3==DOT) ) {
int LA67_4 = input.LA(5);
if ( (synpred62_ToolSQL()) ) {
alt67=1;
}
}
}
}
}
switch (alt67) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:6: schema_name DOT
{
pushFollow(FOLLOW_schema_name_in_synpred65_ToolSQL1338);
schema_name();
state._fsp--;
if (state.failed) return ;
match(input,DOT,FOLLOW_DOT_in_synpred65_ToolSQL1340); if (state.failed) return ;
}
break;
}
pushFollow(FOLLOW_t_alias_in_synpred65_ToolSQL1344);
t_alias();
state._fsp--;
if (state.failed) return ;
match(input,DOT,FOLLOW_DOT_in_synpred65_ToolSQL1346); if (state.failed) return ;
}
break;
}
pushFollow(FOLLOW_column_name_in_synpred65_ToolSQL1350);
column_name();
state._fsp--;
if (state.failed) return ;
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:50: ( outer_join_sign )?
int alt69=2;
int LA69_0 = input.LA(1);
if ( (LA69_0==LPAREN) ) {
alt69=1;
}
switch (alt69) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:337:50: outer_join_sign
{
pushFollow(FOLLOW_outer_join_sign_in_synpred65_ToolSQL1352);
outer_join_sign();
state._fsp--;
if (state.failed) return ;
}
break;
}
}
}
// $ANTLR end synpred65_ToolSQL
// $ANTLR start synpred66_ToolSQL
public final void synpred66_ToolSQL_fragment() throws RecognitionException {
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:339:4: ( schema_name DOT package_name DOT IDENTIFIER DOT IDENTIFIER )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:339:4: schema_name DOT package_name DOT IDENTIFIER DOT IDENTIFIER
{
pushFollow(FOLLOW_schema_name_in_synpred66_ToolSQL1360);
schema_name();
state._fsp--;
if (state.failed) return ;
match(input,DOT,FOLLOW_DOT_in_synpred66_ToolSQL1362); if (state.failed) return ;
pushFollow(FOLLOW_package_name_in_synpred66_ToolSQL1364);
package_name();
state._fsp--;
if (state.failed) return ;
match(input,DOT,FOLLOW_DOT_in_synpred66_ToolSQL1366); if (state.failed) return ;
match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_synpred66_ToolSQL1368); if (state.failed) return ;
match(input,DOT,FOLLOW_DOT_in_synpred66_ToolSQL1370); if (state.failed) return ;
match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_synpred66_ToolSQL1372); if (state.failed) return ;
}
}
// $ANTLR end synpred66_ToolSQL
// $ANTLR start synpred72_ToolSQL
public final void synpred72_ToolSQL_fragment() throws RecognitionException {
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:383:36: ( OR sql_logical_term )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:383:36: OR sql_logical_term
{
match(input,OR,FOLLOW_OR_in_synpred72_ToolSQL1541); if (state.failed) return ;
pushFollow(FOLLOW_sql_logical_term_in_synpred72_ToolSQL1543);
sql_logical_term();
state._fsp--;
if (state.failed) return ;
}
}
// $ANTLR end synpred72_ToolSQL
// $ANTLR start synpred73_ToolSQL
public final void synpred73_ToolSQL_fragment() throws RecognitionException {
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:386:30: ( AND sql_logical_factor )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:386:30: AND sql_logical_factor
{
match(input,AND,FOLLOW_AND_in_synpred73_ToolSQL1566); if (state.failed) return ;
pushFollow(FOLLOW_sql_logical_factor_in_synpred73_ToolSQL1568);
sql_logical_factor();
state._fsp--;
if (state.failed) return ;
}
}
// $ANTLR end synpred73_ToolSQL
// $ANTLR start synpred74_ToolSQL
public final void synpred74_ToolSQL_fragment() throws RecognitionException {
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:391:7: ( sql_simple sql_comparison_op sql_simple )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:391:7: sql_simple sql_comparison_op sql_simple
{
pushFollow(FOLLOW_sql_simple_in_synpred74_ToolSQL1597);
sql_simple();
state._fsp--;
if (state.failed) return ;
pushFollow(FOLLOW_sql_comparison_op_in_synpred74_ToolSQL1599);
sql_comparison_op();
state._fsp--;
if (state.failed) return ;
pushFollow(FOLLOW_sql_simple_in_synpred74_ToolSQL1601);
sql_simple();
state._fsp--;
if (state.failed) return ;
}
}
// $ANTLR end synpred74_ToolSQL
// $ANTLR start synpred76_ToolSQL
public final void synpred76_ToolSQL_fragment() throws RecognitionException {
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:392:10: ( sql_simple ( NOT )? IN )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:392:10: sql_simple ( NOT )? IN
{
pushFollow(FOLLOW_sql_simple_in_synpred76_ToolSQL1614);
sql_simple();
state._fsp--;
if (state.failed) return ;
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:392:21: ( NOT )?
int alt71=2;
int LA71_0 = input.LA(1);
if ( (LA71_0==NOT) ) {
alt71=1;
}
switch (alt71) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:392:21: NOT
{
match(input,NOT,FOLLOW_NOT_in_synpred76_ToolSQL1616); if (state.failed) return ;
}
break;
}
match(input,IN,FOLLOW_IN_in_synpred76_ToolSQL1619); if (state.failed) return ;
}
}
// $ANTLR end synpred76_ToolSQL
// $ANTLR start synpred78_ToolSQL
public final void synpred78_ToolSQL_fragment() throws RecognitionException {
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:393:10: ( sql_simple ( NOT )? LIKE )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:393:10: sql_simple ( NOT )? LIKE
{
pushFollow(FOLLOW_sql_simple_in_synpred78_ToolSQL1631);
sql_simple();
state._fsp--;
if (state.failed) return ;
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:393:21: ( NOT )?
int alt72=2;
int LA72_0 = input.LA(1);
if ( (LA72_0==NOT) ) {
alt72=1;
}
switch (alt72) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:393:21: NOT
{
match(input,NOT,FOLLOW_NOT_in_synpred78_ToolSQL1633); if (state.failed) return ;
}
break;
}
match(input,LIKE,FOLLOW_LIKE_in_synpred78_ToolSQL1636); if (state.failed) return ;
}
}
// $ANTLR end synpred78_ToolSQL
// $ANTLR start synpred80_ToolSQL
public final void synpred80_ToolSQL_fragment() throws RecognitionException {
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:394:10: ( sql_simple ( NOT )? BETWEEN )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:394:10: sql_simple ( NOT )? BETWEEN
{
pushFollow(FOLLOW_sql_simple_in_synpred80_ToolSQL1649);
sql_simple();
state._fsp--;
if (state.failed) return ;
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:394:21: ( NOT )?
int alt73=2;
int LA73_0 = input.LA(1);
if ( (LA73_0==NOT) ) {
alt73=1;
}
switch (alt73) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:394:21: NOT
{
match(input,NOT,FOLLOW_NOT_in_synpred80_ToolSQL1651); if (state.failed) return ;
}
break;
}
match(input,BETWEEN,FOLLOW_BETWEEN_in_synpred80_ToolSQL1654); if (state.failed) return ;
}
}
// $ANTLR end synpred80_ToolSQL
// $ANTLR start synpred82_ToolSQL
public final void synpred82_ToolSQL_fragment() throws RecognitionException {
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:395:10: ( sql_simple IS ( NOT )? NULL )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:395:10: sql_simple IS ( NOT )? NULL
{
pushFollow(FOLLOW_sql_simple_in_synpred82_ToolSQL1667);
sql_simple();
state._fsp--;
if (state.failed) return ;
match(input,IS,FOLLOW_IS_in_synpred82_ToolSQL1669); if (state.failed) return ;
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:395:24: ( NOT )?
int alt74=2;
int LA74_0 = input.LA(1);
if ( (LA74_0==NOT) ) {
alt74=1;
}
switch (alt74) {
case 1 :
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:395:24: NOT
{
match(input,NOT,FOLLOW_NOT_in_synpred82_ToolSQL1671); if (state.failed) return ;
}
break;
}
match(input,NULL,FOLLOW_NULL_in_synpred82_ToolSQL1674); if (state.failed) return ;
}
}
// $ANTLR end synpred82_ToolSQL
// $ANTLR start synpred83_ToolSQL
public final void synpred83_ToolSQL_fragment() throws RecognitionException {
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:396:10: ( quantified_factor )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:396:10: quantified_factor
{
pushFollow(FOLLOW_quantified_factor_in_synpred83_ToolSQL1687);
quantified_factor();
state._fsp--;
if (state.failed) return ;
}
}
// $ANTLR end synpred83_ToolSQL
// $ANTLR start synpred84_ToolSQL
public final void synpred84_ToolSQL_fragment() throws RecognitionException {
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:397:10: ( NOT sql_condition )
// /Users/peter/Documents/workspace/CitrusleafStockTrade/src/net/helipilot50/aerospike/sqlimport/ToolSQL.g:397:10: NOT sql_condition
{
match(input,NOT,FOLLOW_NOT_in_synpred84_ToolSQL1700); if (state.failed) return ;
pushFollow(FOLLOW_sql_condition_in_synpred84_ToolSQL1702);
sql_condition();
state._fsp--;
if (state.failed) return ;
}
}
// $ANTLR end synpred84_ToolSQL
// Delegated rules
public final boolean synpred72_ToolSQL() {
state.backtracking++;
int start = input.mark();
try {
synpred72_ToolSQL_fragment(); // can never throw exception
} catch (RecognitionException re) {
System.err.println("impossible: "+re);
}
boolean success = !state.failed;
input.rewind(start);
state.backtracking--;
state.failed=false;
return success;
}
public final boolean synpred83_ToolSQL() {
state.backtracking++;
int start = input.mark();
try {
synpred83_ToolSQL_fragment(); // can never throw exception
} catch (RecognitionException re) {
System.err.println("impossible: "+re);
}
boolean success = !state.failed;
input.rewind(start);
state.backtracking--;
state.failed=false;
return success;
}
public final boolean synpred65_ToolSQL() {
state.backtracking++;
int start = input.mark();
try {
synpred65_ToolSQL_fragment(); // can never throw exception
} catch (RecognitionException re) {
System.err.println("impossible: "+re);
}
boolean success = !state.failed;
input.rewind(start);
state.backtracking--;
state.failed=false;
return success;
}
public final boolean synpred78_ToolSQL() {
state.backtracking++;
int start = input.mark();
try {
synpred78_ToolSQL_fragment(); // can never throw exception
} catch (RecognitionException re) {
System.err.println("impossible: "+re);
}
boolean success = !state.failed;
input.rewind(start);
state.backtracking--;
state.failed=false;
return success;
}
public final boolean synpred76_ToolSQL() {
state.backtracking++;
int start = input.mark();
try {
synpred76_ToolSQL_fragment(); // can never throw exception
} catch (RecognitionException re) {
System.err.println("impossible: "+re);
}
boolean success = !state.failed;
input.rewind(start);
state.backtracking--;
state.failed=false;
return success;
}
public final boolean synpred62_ToolSQL() {
state.backtracking++;
int start = input.mark();
try {
synpred62_ToolSQL_fragment(); // can never throw exception
} catch (RecognitionException re) {
System.err.println("impossible: "+re);
}
boolean success = !state.failed;
input.rewind(start);
state.backtracking--;
state.failed=false;
return success;
}
public final boolean synpred66_ToolSQL() {
state.backtracking++;
int start = input.mark();
try {
synpred66_ToolSQL_fragment(); // can never throw exception
} catch (RecognitionException re) {
System.err.println("impossible: "+re);
}
boolean success = !state.failed;
input.rewind(start);
state.backtracking--;
state.failed=false;
return success;
}
public final boolean synpred74_ToolSQL() {
state.backtracking++;
int start = input.mark();
try {
synpred74_ToolSQL_fragment(); // can never throw exception
} catch (RecognitionException re) {
System.err.println("impossible: "+re);
}
boolean success = !state.failed;
input.rewind(start);
state.backtracking--;
state.failed=false;
return success;
}
public final boolean synpred63_ToolSQL() {
state.backtracking++;
int start = input.mark();
try {
synpred63_ToolSQL_fragment(); // can never throw exception
} catch (RecognitionException re) {
System.err.println("impossible: "+re);
}
boolean success = !state.failed;
input.rewind(start);
state.backtracking--;
state.failed=false;
return success;
}
public final boolean synpred80_ToolSQL() {
state.backtracking++;
int start = input.mark();
try {
synpred80_ToolSQL_fragment(); // can never throw exception
} catch (RecognitionException re) {
System.err.println("impossible: "+re);
}
boolean success = !state.failed;
input.rewind(start);
state.backtracking--;
state.failed=false;
return success;
}
public final boolean synpred82_ToolSQL() {
state.backtracking++;
int start = input.mark();
try {
synpred82_ToolSQL_fragment(); // can never throw exception
} catch (RecognitionException re) {
System.err.println("impossible: "+re);
}
boolean success = !state.failed;
input.rewind(start);
state.backtracking--;
state.failed=false;
return success;
}
public final boolean synpred84_ToolSQL() {
state.backtracking++;
int start = input.mark();
try {
synpred84_ToolSQL_fragment(); // can never throw exception
} catch (RecognitionException re) {
System.err.println("impossible: "+re);
}
boolean success = !state.failed;
input.rewind(start);
state.backtracking--;
state.failed=false;
return success;
}
public final boolean synpred73_ToolSQL() {
state.backtracking++;
int start = input.mark();
try {
synpred73_ToolSQL_fragment(); // can never throw exception
} catch (RecognitionException re) {
System.err.println("impossible: "+re);
}
boolean success = !state.failed;
input.rewind(start);
state.backtracking--;
state.failed=false;
return success;
}
public static final BitSet FOLLOW_sql_statement_in_sql_file163 = new BitSet(new long[]{0x0001000000100000L,0x0000000E20024000L});
public static final BitSet FOLLOW_EOF_in_sql_file166 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_sql_delete_in_sql_statement179 = new BitSet(new long[]{0x0000000000000000L,0x0000000000008000L});
public static final BitSet FOLLOW_SEMI_in_sql_statement181 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_sql_insert_in_sql_statement187 = new BitSet(new long[]{0x0000000000000000L,0x0000000000008000L});
public static final BitSet FOLLOW_SEMI_in_sql_statement189 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_sql_select_in_sql_statement195 = new BitSet(new long[]{0x0000000000000000L,0x0000000000008000L});
public static final BitSet FOLLOW_SEMI_in_sql_statement197 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_sql_update_in_sql_statement203 = new BitSet(new long[]{0x0000000000000000L,0x0000000000008000L});
public static final BitSet FOLLOW_SEMI_in_sql_statement205 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ddl_drop_table_in_sql_statement211 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ddl_create_table_in_sql_statement217 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ddl_set_in_sql_statement223 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_99_in_sql_statement229 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_IDENTIFIER_in_sql_statement231 = new BitSet(new long[]{0x0000000002000002L});
public static final BitSet FOLLOW_DOT_in_sql_statement234 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_IDENTIFIER_in_sql_statement236 = new BitSet(new long[]{0x0000000002000002L});
public static final BitSet FOLLOW_98_in_ddl_drop_table250 = new BitSet(new long[]{0x0000000000000000L,0x0000001000000000L});
public static final BitSet FOLLOW_100_in_ddl_drop_table252 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_table_name_in_ddl_drop_table254 = new BitSet(new long[]{0x0000000000000000L,0x0000000000008000L});
public static final BitSet FOLLOW_SEMI_in_ddl_drop_table256 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_97_in_ddl_create_table271 = new BitSet(new long[]{0x0000000000000000L,0x0000001000000000L});
public static final BitSet FOLLOW_100_in_ddl_create_table273 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_table_name_in_ddl_create_table275 = new BitSet(new long[]{0x0200000000000000L});
public static final BitSet FOLLOW_LPAREN_in_ddl_create_table283 = new BitSet(new long[]{0x0000200000000000L,0x0000000000000400L});
public static final BitSet FOLLOW_ddl_column_in_ddl_create_table287 = new BitSet(new long[]{0x0000000000004000L,0x0000000000002000L});
public static final BitSet FOLLOW_COMMA_in_ddl_create_table290 = new BitSet(new long[]{0x0000200000000000L,0x0000000000000400L});
public static final BitSet FOLLOW_ddl_column_in_ddl_create_table292 = new BitSet(new long[]{0x0000000000004000L,0x0000000000002000L});
public static final BitSet FOLLOW_RPAREN_in_ddl_create_table298 = new BitSet(new long[]{0x0000000000000000L,0x0000000000008000L});
public static final BitSet FOLLOW_SEMI_in_ddl_create_table300 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_column_name_in_ddl_column318 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_column_type_in_ddl_column322 = new BitSet(new long[]{0x0000000000000002L,0x000000000000040AL});
public static final BitSet FOLLOW_NOT_in_ddl_column333 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000408L});
public static final BitSet FOLLOW_NULL_in_ddl_column336 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000400L});
public static final BitSet FOLLOW_PRIMARY_in_ddl_column340 = new BitSet(new long[]{0x0020000000000000L});
public static final BitSet FOLLOW_KEY_in_ddl_column342 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_PRIMARY_in_ddl_column358 = new BitSet(new long[]{0x0020000000000000L});
public static final BitSet FOLLOW_KEY_in_ddl_column360 = new BitSet(new long[]{0x0200000000000000L});
public static final BitSet FOLLOW_LPAREN_in_ddl_column362 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_column_name_in_ddl_column366 = new BitSet(new long[]{0x0000000000004000L,0x0000000000002000L});
public static final BitSet FOLLOW_COMMA_in_ddl_column374 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_column_name_in_ddl_column378 = new BitSet(new long[]{0x0000000000004000L,0x0000000000002000L});
public static final BitSet FOLLOW_RPAREN_in_ddl_column384 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_SET_in_ddl_set395 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_IDENTIFIER_in_ddl_set397 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_IDENTIFIER_in_ddl_set399 = new BitSet(new long[]{0x0000000000000000L,0x0000000000008000L});
public static final BitSet FOLLOW_SEMI_in_ddl_set401 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_DELETE_in_sql_delete415 = new BitSet(new long[]{0x0000001000000000L});
public static final BitSet FOLLOW_FROM_in_sql_delete417 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_table_name_in_sql_delete419 = new BitSet(new long[]{0x0000000000000002L,0x0000000080000010L});
public static final BitSet FOLLOW_WHERE_in_sql_delete426 = new BitSet(new long[]{0x5202200520002000L,0x000000000C000202L});
public static final BitSet FOLLOW_search_expression_in_sql_delete428 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000010L});
public static final BitSet FOLLOW_on_session_in_sql_delete436 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_INSERT_in_sql_insert462 = new BitSet(new long[]{0x0004000000000000L});
public static final BitSet FOLLOW_INTO_in_sql_insert464 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_table_name_in_sql_insert466 = new BitSet(new long[]{0x0200000000000000L,0x0000000040000000L});
public static final BitSet FOLLOW_LPAREN_in_sql_insert483 = new BitSet(new long[]{0x5002200500002000L,0x000000000C000200L});
public static final BitSet FOLLOW_column_list_in_sql_insert485 = new BitSet(new long[]{0x0000000000000000L,0x0000000000002000L});
public static final BitSet FOLLOW_RPAREN_in_sql_insert489 = new BitSet(new long[]{0x0000000000000000L,0x0000000040000000L});
public static final BitSet FOLLOW_VALUES_in_sql_insert499 = new BitSet(new long[]{0x0200000000000000L});
public static final BitSet FOLLOW_LPAREN_in_sql_insert501 = new BitSet(new long[]{0x5002200500002000L,0x000000000C000200L});
public static final BitSet FOLLOW_value_list_in_sql_insert509 = new BitSet(new long[]{0x0000000000000000L,0x0000000000002000L});
public static final BitSet FOLLOW_RPAREN_in_sql_insert519 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000010L});
public static final BitSet FOLLOW_on_session_in_sql_insert527 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_UPDATE_in_sql_update557 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_table_name_in_sql_update559 = new BitSet(new long[]{0x0000000000000000L,0x0000000000020000L});
public static final BitSet FOLLOW_SET_in_sql_update561 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_column_name_in_sql_update568 = new BitSet(new long[]{0x0000000004000000L});
public static final BitSet FOLLOW_EQ_in_sql_update570 = new BitSet(new long[]{0x5002200500002000L,0x000000000C000200L});
public static final BitSet FOLLOW_sql_expression_in_sql_update572 = new BitSet(new long[]{0x0000000000004002L,0x0000000080000010L});
public static final BitSet FOLLOW_COMMA_in_sql_update580 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_column_name_in_sql_update582 = new BitSet(new long[]{0x0000000004000000L});
public static final BitSet FOLLOW_EQ_in_sql_update584 = new BitSet(new long[]{0x5002200500002000L,0x000000000C000200L});
public static final BitSet FOLLOW_sql_expression_in_sql_update586 = new BitSet(new long[]{0x0000000000004002L,0x0000000080000010L});
public static final BitSet FOLLOW_WHERE_in_sql_update597 = new BitSet(new long[]{0x5202200520002000L,0x000000000C000202L});
public static final BitSet FOLLOW_search_expression_in_sql_update599 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000010L});
public static final BitSet FOLLOW_on_session_in_sql_update609 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_SELECT_in_sql_select628 = new BitSet(new long[]{0x5002200500802010L,0x000000000C000200L});
public static final BitSet FOLLOW_allDistinct_in_sql_select634 = new BitSet(new long[]{0x5002200500002000L,0x000000000C000200L});
public static final BitSet FOLLOW_column_list_in_sql_select641 = new BitSet(new long[]{0x0004001000000000L});
public static final BitSet FOLLOW_INTO_in_sql_select646 = new BitSet(new long[]{0x0000000000002000L});
public static final BitSet FOLLOW_bind_variable_in_sql_select648 = new BitSet(new long[]{0x0000001000000000L});
public static final BitSet FOLLOW_FROM_in_sql_select654 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_table_list_in_sql_select656 = new BitSet(new long[]{0x0000024000000002L,0x0000000080000110L});
public static final BitSet FOLLOW_WHERE_in_sql_select661 = new BitSet(new long[]{0x5202200520002000L,0x000000000C000202L});
public static final BitSet FOLLOW_search_expression_in_sql_select663 = new BitSet(new long[]{0x0000024000000002L,0x0000000000000110L});
public static final BitSet FOLLOW_group_by_in_sql_select669 = new BitSet(new long[]{0x0000020000000002L,0x0000000000000110L});
public static final BitSet FOLLOW_HAVING_in_sql_select675 = new BitSet(new long[]{0x5202200520002000L,0x000000000C000202L});
public static final BitSet FOLLOW_search_expression_in_sql_select677 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000110L});
public static final BitSet FOLLOW_order_by_in_sql_select683 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000010L});
public static final BitSet FOLLOW_on_session_in_sql_select688 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_GROUP_in_group_by726 = new BitSet(new long[]{0x0000000000000800L});
public static final BitSet FOLLOW_BY_in_group_by728 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_column_name_in_group_by731 = new BitSet(new long[]{0x0000000000200200L});
public static final BitSet FOLLOW_set_in_group_by733 = new BitSet(new long[]{0x0000200000000002L});
public static final BitSet FOLLOW_ORDER_in_order_by757 = new BitSet(new long[]{0x0000000000000800L});
public static final BitSet FOLLOW_BY_in_order_by759 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_column_name_in_order_by762 = new BitSet(new long[]{0x0000000000200200L});
public static final BitSet FOLLOW_set_in_order_by764 = new BitSet(new long[]{0x0000200000000002L});
public static final BitSet FOLLOW_ON_in_on_session795 = new BitSet(new long[]{0x0000000000000000L,0x0000000000010000L});
public static final BitSet FOLLOW_SESSION_in_on_session797 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_qualifiedName_in_on_session801 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_displayed_column_in_column_list842 = new BitSet(new long[]{0x0000000000004002L});
public static final BitSet FOLLOW_COMMA_in_column_list846 = new BitSet(new long[]{0x5002200500002000L,0x000000000C000200L});
public static final BitSet FOLLOW_displayed_column_in_column_list850 = new BitSet(new long[]{0x0000000000004002L});
public static final BitSet FOLLOW_schema_name_in_displayed_column875 = new BitSet(new long[]{0x0000000002000000L});
public static final BitSet FOLLOW_DOT_in_displayed_column877 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_t_alias_in_displayed_column881 = new BitSet(new long[]{0x0000000002000000L});
public static final BitSet FOLLOW_DOT_in_displayed_column883 = new BitSet(new long[]{0x4000000000000000L});
public static final BitSet FOLLOW_MULT_in_displayed_column885 = new BitSet(new long[]{0x0000200000000102L});
public static final BitSet FOLLOW_sql_expression_in_displayed_column891 = new BitSet(new long[]{0x0000200000000102L});
public static final BitSet FOLLOW_c_alias_in_displayed_column902 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_table_name_in_column_name919 = new BitSet(new long[]{0x0000000002000000L});
public static final BitSet FOLLOW_DOT_in_column_name921 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_IDENTIFIER_in_column_name925 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_IDENTIFIER_in_column_type939 = new BitSet(new long[]{0x0200000000000002L});
public static final BitSet FOLLOW_LPAREN_in_column_type942 = new BitSet(new long[]{0x0002000000000000L});
public static final BitSet FOLLOW_INTLITERAL_in_column_type944 = new BitSet(new long[]{0x0000000000000000L,0x0000000000002000L});
public static final BitSet FOLLOW_RPAREN_in_column_type946 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_table_name_in_table_list960 = new BitSet(new long[]{0x0000000000004002L});
public static final BitSet FOLLOW_COMMA_in_table_list963 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_table_name_in_table_list965 = new BitSet(new long[]{0x0000000000004002L});
public static final BitSet FOLLOW_IDENTIFIER_in_table_name982 = new BitSet(new long[]{0x0000200000000002L});
public static final BitSet FOLLOW_t_alias_in_table_name984 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_sql_condition_in_search_expression1000 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_HEXLITERAL_in_literal1021 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_INTLITERAL_in_literal1031 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_FLOATLITERAL_in_literal1041 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_STRINGLITERAL_in_literal1051 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_booleanLiteral_in_literal1061 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_NIL_in_literal1071 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_LPAREN_in_arguments1114 = new BitSet(new long[]{0x5002200500002000L,0x000000000C002200L});
public static final BitSet FOLLOW_argumentList_in_arguments1116 = new BitSet(new long[]{0x0000000000000000L,0x0000000000002000L});
public static final BitSet FOLLOW_RPAREN_in_arguments1119 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_argument_in_argumentList1131 = new BitSet(new long[]{0x0000000000004002L});
public static final BitSet FOLLOW_COMMA_in_argumentList1134 = new BitSet(new long[]{0x5002200500002000L,0x000000000C000200L});
public static final BitSet FOLLOW_argument_in_argumentList1136 = new BitSet(new long[]{0x0000000000004002L});
public static final BitSet FOLLOW_sql_expression_in_argument1150 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_sql_expression_in_value_list1173 = new BitSet(new long[]{0x0000000000004002L});
public static final BitSet FOLLOW_COMMA_in_value_list1180 = new BitSet(new long[]{0x5002200500002000L,0x000000000C000200L});
public static final BitSet FOLLOW_sql_expression_in_value_list1184 = new BitSet(new long[]{0x0000000000004002L});
public static final BitSet FOLLOW_expr_add_in_sql_expression1199 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_expr_mul_in_expr_add1209 = new BitSet(new long[]{0x1000000000000002L,0x0000000000000200L});
public static final BitSet FOLLOW_set_in_expr_add1213 = new BitSet(new long[]{0x5002200500002000L,0x000000000C000200L});
public static final BitSet FOLLOW_expr_mul_in_expr_add1223 = new BitSet(new long[]{0x1000000000000002L,0x0000000000000200L});
public static final BitSet FOLLOW_expr_sign_in_expr_mul1236 = new BitSet(new long[]{0x4000000001000002L});
public static final BitSet FOLLOW_set_in_expr_mul1240 = new BitSet(new long[]{0x5002200500002000L,0x000000000C000200L});
public static final BitSet FOLLOW_expr_sign_in_expr_mul1250 = new BitSet(new long[]{0x4000000001000002L});
public static final BitSet FOLLOW_expr_expr_in_expr_sign1275 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_simple_expression_in_expr_expr1285 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_function_call_in_expr_expr1291 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_booleanLiteral_in_simple_expression1301 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_column_spec_in_simple_expression1306 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_STRINGLITERAL_in_simple_expression1312 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_number_in_simple_expression1317 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_schema_name_in_column_spec1338 = new BitSet(new long[]{0x0000000002000000L});
public static final BitSet FOLLOW_DOT_in_column_spec1340 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_t_alias_in_column_spec1344 = new BitSet(new long[]{0x0000000002000000L});
public static final BitSet FOLLOW_DOT_in_column_spec1346 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_column_name_in_column_spec1350 = new BitSet(new long[]{0x0200000000000002L});
public static final BitSet FOLLOW_outer_join_sign_in_column_spec1352 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_schema_name_in_column_spec1360 = new BitSet(new long[]{0x0000000002000000L});
public static final BitSet FOLLOW_DOT_in_column_spec1362 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_package_name_in_column_spec1364 = new BitSet(new long[]{0x0000000002000000L});
public static final BitSet FOLLOW_DOT_in_column_spec1366 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_IDENTIFIER_in_column_spec1368 = new BitSet(new long[]{0x0000000002000000L});
public static final BitSet FOLLOW_DOT_in_column_spec1370 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_IDENTIFIER_in_column_spec1372 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_bind_variable_in_column_spec1377 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_MULT_in_column_spec1382 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_IDENTIFIER_in_function_call1395 = new BitSet(new long[]{0x0200000000000000L});
public static final BitSet FOLLOW_LPAREN_in_function_call1399 = new BitSet(new long[]{0x5002200500002000L,0x000000000C000200L});
public static final BitSet FOLLOW_sql_expression_in_function_call1403 = new BitSet(new long[]{0x0000000000004000L,0x0000000000002000L});
public static final BitSet FOLLOW_COMMA_in_function_call1408 = new BitSet(new long[]{0x5002200500002000L,0x000000000C000200L});
public static final BitSet FOLLOW_sql_expression_in_function_call1410 = new BitSet(new long[]{0x0000000000004000L,0x0000000000002000L});
public static final BitSet FOLLOW_RPAREN_in_function_call1416 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_IDENTIFIER_in_schema_name1429 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_IDENTIFIER_in_package_name1440 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_IDENTIFIER_in_t_alias1451 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_AS_in_c_alias1462 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_IDENTIFIER_in_c_alias1465 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_AS_in_c_alias1470 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_COLON_in_bind_variable1483 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_qualifiedName_in_bind_variable1485 = new BitSet(new long[]{0x0200000000000002L});
public static final BitSet FOLLOW_LPAREN_in_bind_variable1496 = new BitSet(new long[]{0x5002200500002000L,0x000000000C000200L});
public static final BitSet FOLLOW_argumentList_in_bind_variable1498 = new BitSet(new long[]{0x0000000000000000L,0x0000000000002000L});
public static final BitSet FOLLOW_RPAREN_in_bind_variable1500 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_LPAREN_in_outer_join_sign1521 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
public static final BitSet FOLLOW_PLUS_in_outer_join_sign1523 = new BitSet(new long[]{0x0000000000000000L,0x0000000000002000L});
public static final BitSet FOLLOW_RPAREN_in_outer_join_sign1525 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_sql_logical_term_in_sql_condition1537 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000080L});
public static final BitSet FOLLOW_OR_in_sql_condition1541 = new BitSet(new long[]{0x5202200520002000L,0x000000000C000202L});
public static final BitSet FOLLOW_sql_logical_term_in_sql_condition1543 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000080L});
public static final BitSet FOLLOW_sql_logical_factor_in_sql_logical_term1562 = new BitSet(new long[]{0x0000000000000022L});
public static final BitSet FOLLOW_AND_in_sql_logical_term1566 = new BitSet(new long[]{0x5202200520002000L,0x000000000C000202L});
public static final BitSet FOLLOW_sql_logical_factor_in_sql_logical_term1568 = new BitSet(new long[]{0x0000000000000022L});
public static final BitSet FOLLOW_sql_simple_in_sql_logical_factor1597 = new BitSet(new long[]{0x0C80018004000000L,0x0000000000000004L});
public static final BitSet FOLLOW_sql_comparison_op_in_sql_logical_factor1599 = new BitSet(new long[]{0x5002200500002000L,0x000000000C000200L});
public static final BitSet FOLLOW_sql_simple_in_sql_logical_factor1601 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_sql_simple_in_sql_logical_factor1614 = new BitSet(new long[]{0x0000800000000000L,0x0000000000000002L});
public static final BitSet FOLLOW_NOT_in_sql_logical_factor1616 = new BitSet(new long[]{0x0000800000000000L});
public static final BitSet FOLLOW_IN_in_sql_logical_factor1619 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_sql_simple_in_sql_logical_factor1631 = new BitSet(new long[]{0x0080000000000000L,0x0000000000000002L});
public static final BitSet FOLLOW_NOT_in_sql_logical_factor1633 = new BitSet(new long[]{0x0080000000000000L});
public static final BitSet FOLLOW_LIKE_in_sql_logical_factor1636 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_sql_simple_in_sql_logical_factor1649 = new BitSet(new long[]{0x0000000000000400L,0x0000000000000002L});
public static final BitSet FOLLOW_NOT_in_sql_logical_factor1651 = new BitSet(new long[]{0x0000000000000400L});
public static final BitSet FOLLOW_BETWEEN_in_sql_logical_factor1654 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_sql_simple_in_sql_logical_factor1667 = new BitSet(new long[]{0x0008000000000000L});
public static final BitSet FOLLOW_IS_in_sql_logical_factor1669 = new BitSet(new long[]{0x0000000000000000L,0x000000000000000AL});
public static final BitSet FOLLOW_NOT_in_sql_logical_factor1671 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000008L});
public static final BitSet FOLLOW_NULL_in_sql_logical_factor1674 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_quantified_factor_in_sql_logical_factor1687 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_NOT_in_sql_logical_factor1700 = new BitSet(new long[]{0x5202200520002000L,0x000000000C000202L});
public static final BitSet FOLLOW_sql_condition_in_sql_logical_factor1702 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_LPAREN_in_sql_logical_factor1714 = new BitSet(new long[]{0x5202200520002000L,0x000000000C000202L});
public static final BitSet FOLLOW_sql_condition_in_sql_logical_factor1716 = new BitSet(new long[]{0x0000000000000000L,0x0000000000002000L});
public static final BitSet FOLLOW_RPAREN_in_sql_logical_factor1718 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_sql_expression_in_sql_simple1735 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_IDENTIFIER_in_qualifiedName1751 = new BitSet(new long[]{0x0000000002000002L});
public static final BitSet FOLLOW_DOT_in_qualifiedName1754 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_IDENTIFIER_in_qualifiedName1756 = new BitSet(new long[]{0x0000000002000002L});
public static final BitSet FOLLOW_sql_simple_in_quantified_factor1786 = new BitSet(new long[]{0x0C80018004000000L,0x0000000000000004L});
public static final BitSet FOLLOW_sql_comparison_op_in_quantified_factor1788 = new BitSet(new long[]{0x0200000000000050L});
public static final BitSet FOLLOW_sql_anyAll_in_quantified_factor1790 = new BitSet(new long[]{0x0200000000000000L});
public static final BitSet FOLLOW_subquery_in_quantified_factor1793 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_NOT_in_quantified_factor1808 = new BitSet(new long[]{0x0000000020000000L});
public static final BitSet FOLLOW_EXISTS_in_quantified_factor1811 = new BitSet(new long[]{0x0200000000000000L});
public static final BitSet FOLLOW_subquery_in_quantified_factor1813 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_subquery_in_quantified_factor1826 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_LPAREN_in_subquery1919 = new BitSet(new long[]{0x0000000000000000L,0x0000000000004000L});
public static final BitSet FOLLOW_sql_select_in_subquery1921 = new BitSet(new long[]{0x0000000000000000L,0x0000000000002000L});
public static final BitSet FOLLOW_RPAREN_in_subquery1923 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_schema_name_in_synpred62_ToolSQL1338 = new BitSet(new long[]{0x0000000002000000L});
public static final BitSet FOLLOW_DOT_in_synpred62_ToolSQL1340 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_schema_name_in_synpred63_ToolSQL1338 = new BitSet(new long[]{0x0000000002000000L});
public static final BitSet FOLLOW_DOT_in_synpred63_ToolSQL1340 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_t_alias_in_synpred63_ToolSQL1344 = new BitSet(new long[]{0x0000000002000000L});
public static final BitSet FOLLOW_DOT_in_synpred63_ToolSQL1346 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_schema_name_in_synpred65_ToolSQL1338 = new BitSet(new long[]{0x0000000002000000L});
public static final BitSet FOLLOW_DOT_in_synpred65_ToolSQL1340 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_t_alias_in_synpred65_ToolSQL1344 = new BitSet(new long[]{0x0000000002000000L});
public static final BitSet FOLLOW_DOT_in_synpred65_ToolSQL1346 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_column_name_in_synpred65_ToolSQL1350 = new BitSet(new long[]{0x0200000000000002L});
public static final BitSet FOLLOW_outer_join_sign_in_synpred65_ToolSQL1352 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_schema_name_in_synpred66_ToolSQL1360 = new BitSet(new long[]{0x0000000002000000L});
public static final BitSet FOLLOW_DOT_in_synpred66_ToolSQL1362 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_package_name_in_synpred66_ToolSQL1364 = new BitSet(new long[]{0x0000000002000000L});
public static final BitSet FOLLOW_DOT_in_synpred66_ToolSQL1366 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_IDENTIFIER_in_synpred66_ToolSQL1368 = new BitSet(new long[]{0x0000000002000000L});
public static final BitSet FOLLOW_DOT_in_synpred66_ToolSQL1370 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_IDENTIFIER_in_synpred66_ToolSQL1372 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_OR_in_synpred72_ToolSQL1541 = new BitSet(new long[]{0x5202200520002000L,0x000000000C000202L});
public static final BitSet FOLLOW_sql_logical_term_in_synpred72_ToolSQL1543 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_AND_in_synpred73_ToolSQL1566 = new BitSet(new long[]{0x5202200520002000L,0x000000000C000202L});
public static final BitSet FOLLOW_sql_logical_factor_in_synpred73_ToolSQL1568 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_sql_simple_in_synpred74_ToolSQL1597 = new BitSet(new long[]{0x0C80018004000000L,0x0000000000000004L});
public static final BitSet FOLLOW_sql_comparison_op_in_synpred74_ToolSQL1599 = new BitSet(new long[]{0x5002200500002000L,0x000000000C000200L});
public static final BitSet FOLLOW_sql_simple_in_synpred74_ToolSQL1601 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_sql_simple_in_synpred76_ToolSQL1614 = new BitSet(new long[]{0x0000800000000000L,0x0000000000000002L});
public static final BitSet FOLLOW_NOT_in_synpred76_ToolSQL1616 = new BitSet(new long[]{0x0000800000000000L});
public static final BitSet FOLLOW_IN_in_synpred76_ToolSQL1619 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_sql_simple_in_synpred78_ToolSQL1631 = new BitSet(new long[]{0x0080000000000000L,0x0000000000000002L});
public static final BitSet FOLLOW_NOT_in_synpred78_ToolSQL1633 = new BitSet(new long[]{0x0080000000000000L});
public static final BitSet FOLLOW_LIKE_in_synpred78_ToolSQL1636 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_sql_simple_in_synpred80_ToolSQL1649 = new BitSet(new long[]{0x0000000000000400L,0x0000000000000002L});
public static final BitSet FOLLOW_NOT_in_synpred80_ToolSQL1651 = new BitSet(new long[]{0x0000000000000400L});
public static final BitSet FOLLOW_BETWEEN_in_synpred80_ToolSQL1654 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_sql_simple_in_synpred82_ToolSQL1667 = new BitSet(new long[]{0x0008000000000000L});
public static final BitSet FOLLOW_IS_in_synpred82_ToolSQL1669 = new BitSet(new long[]{0x0000000000000000L,0x000000000000000AL});
public static final BitSet FOLLOW_NOT_in_synpred82_ToolSQL1671 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000008L});
public static final BitSet FOLLOW_NULL_in_synpred82_ToolSQL1674 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_quantified_factor_in_synpred83_ToolSQL1687 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_NOT_in_synpred84_ToolSQL1700 = new BitSet(new long[]{0x5202200520002000L,0x000000000C000202L});
public static final BitSet FOLLOW_sql_condition_in_synpred84_ToolSQL1702 = new BitSet(new long[]{0x0000000000000002L});
}