Merge branch 'wip/eql1' into wip/eql2

This commit is contained in:
Robin Bygrave
2016-07-12 15:05:00 +12:00
16 changed files with 3389 additions and 4 deletions
@@ -0,0 +1,200 @@
package com.avaje.ebeaninternal.server.grammer;
import com.avaje.ebean.ExpressionList;
import com.avaje.ebean.Query;
import com.avaje.ebeaninternal.server.grammer.antlr.EQLBaseListener;
import com.avaje.ebeaninternal.server.grammer.antlr.EQLLexer;
import com.avaje.ebeaninternal.server.grammer.antlr.EQLParser;
import com.avaje.ebeaninternal.server.util.ArrayStack;
import org.antlr.v4.runtime.ParserRuleContext;
import org.antlr.v4.runtime.tree.ParseTree;
import org.antlr.v4.runtime.tree.TerminalNode;
class EqlAdapter<T> extends EQLBaseListener {
private static final OperatorMapping operatorMapping = new OperatorMapping();
private final Query<T> query;
private final EqlAdapterHelper helper;
private ArrayStack<ExpressionList<T>> textStack;
private ArrayStack<ExpressionList<T>> whereStack;
private boolean textMode;
public EqlAdapter(Query<T> query) {
this.query = query;
this.helper = new EqlAdapterHelper(this);
}
/**
* Return the current expression list that expressions should be added to.
*/
protected ExpressionList<T> peekExprList() {
if (textMode) {
// return the current text expression list
return _peekText();
}
if (whereStack == null) {
whereStack = new ArrayStack<ExpressionList<T>>();
whereStack.push(query.where());
}
// return the current expression list
return whereStack.peek();
}
private ExpressionList<T> _peekText() {
if (textStack == null) {
textStack = new ArrayStack<ExpressionList<T>>();
// empty so push on the queries base expression list
textStack.push(query.text());
}
// return the current expression list
return textStack.peek();
}
/**
* Push the expression list onto the appropriate stack.
*/
private void pushExprList(ExpressionList<T> list, String type) {
System.out.println("Push " + type + ">> ");
if (textMode) {
textStack.push(list);
} else {
whereStack.push(list);
}
}
/**
* End a list of expressions added by 'OR'.
*/
private void popJunction(String type) {
System.out.println("Pop " + type + " >> ");
if (textMode) {
textStack.pop();
} else {
whereStack.pop();
}
}
private String getLeftHandSidePath(ParserRuleContext ctx) {
TerminalNode pathToken = ctx.getToken(EQLLexer.PATH_VARIABLE, 0);
return pathToken.getText();
}
@Override
public void enterBetween_expression(EQLParser.Between_expressionContext ctx) {
}
@Override
public void enterPropertyBetween_expression(EQLParser.PropertyBetween_expressionContext ctx) {
}
@Override
public void enterIn_expression(EQLParser.In_expressionContext ctx) {
}
@Override
public void enterIsNull_expression(EQLParser.IsNull_expressionContext ctx) {
String path = getLeftHandSidePath(ctx);
peekExprList().isNull(path);
}
@Override
public void enterIsNotNull_expression(EQLParser.IsNotNull_expressionContext ctx) {
String path = getLeftHandSidePath(ctx);
peekExprList().isNotNull(path);
}
@Override
public void enterIsEmpty_expression(EQLParser.IsEmpty_expressionContext ctx) {
String path = getLeftHandSidePath(ctx);
peekExprList().isEmpty(path);
}
@Override
public void enterIsNotEmpty_expression(EQLParser.IsNotEmpty_expressionContext ctx) {
String path = getLeftHandSidePath(ctx);
peekExprList().isNotEmpty(path);
}
@Override
public void enterLike_expression(EQLParser.Like_expressionContext ctx) {
addExpression(ctx);
}
@Override
public void enterComparison_expression(EQLParser.Comparison_expressionContext ctx) {
addExpression(ctx);
}
private void addExpression(ParserRuleContext ctx) {
int childCount = ctx.getChildCount();
if (childCount < 3) {
throw new IllegalStateException("expecting 3 children for comparison? " + ctx);
}
String path = getLeftHandSidePath(ctx);
String operator = ctx.getChild(1).getText();
EqlOperator op = operatorMapping.get(operator);
if (op == null) {
throw new IllegalStateException("No operator found for " + op);
}
// RHS is Path, Literal or Named input parameter
ParseTree rhs = ctx.getChild(2);
helper.addExpression(path, op, rhs.getText());
}
@Override
public void enterConditional_term(EQLParser.Conditional_termContext ctx) {
int childCount = ctx.getChildCount();
if (childCount > 1) {
pushExprList(peekExprList().and(), "Conjunction");
}
}
@Override
public void exitConditional_term(EQLParser.Conditional_termContext ctx) {
if (ctx.getChildCount() > 1) {
popJunction("Conjunction");
}
}
@Override
public void enterConditional_expression(EQLParser.Conditional_expressionContext ctx) {
if (ctx.getChildCount() > 1) {
pushExprList(peekExprList().or(), "Disjunction");
}
}
@Override
public void exitConditional_expression(EQLParser.Conditional_expressionContext ctx) {
if (ctx.getChildCount() > 1) {
popJunction("Disjunction");
}
}
@Override
public void enterConditional_factor(EQLParser.Conditional_factorContext ctx) {
if (ctx.getChildCount() > 1) {
pushExprList(peekExprList().not(), "Not");
}
}
@Override
public void exitConditional_factor(EQLParser.Conditional_factorContext ctx) {
if (ctx.getChildCount() > 1) {
popJunction("Not");
}
}
}
@@ -0,0 +1,131 @@
package com.avaje.ebeaninternal.server.grammer;
import com.avaje.ebean.ExpressionList;
import java.math.BigDecimal;
class EqlAdapterHelper {
private final EqlAdapter owner;
public EqlAdapterHelper(EqlAdapter owner) {
this.owner = owner;
}
enum ValueType {
NAMED_PARAM,
STRING,
BOOL,
NUMBER
}
private ValueType getValueType(String valueAsText) {
char firstChar = Character.toLowerCase(valueAsText.charAt(0));
switch (firstChar) {
case ':':
return ValueType.NAMED_PARAM;
case 't':
return ValueType.BOOL;
case 'f':
return ValueType.BOOL;
case '\'':
return ValueType.STRING;
default:
if (Character.isDigit(firstChar)) {
return ValueType.NUMBER;
}
throw new IllegalArgumentException("Unexpected first character in value [" + valueAsText + "]");
}
}
protected void addExpression(String path, EqlOperator op, String value) {
switch (op) {
case EQ:
peekExprList().eq(path, bind(value));
break;
case NE:
peekExprList().ne(path, bind(value));
break;
case GT:
peekExprList().gt(path, bind(value));
break;
case LT:
peekExprList().lt(path, bind(value));
break;
case GTE:
peekExprList().ge(path, bind(value));
break;
case LTE:
peekExprList().le(path, bind(value));
break;
case LIKE:
peekExprList().like(path, bindString(value));
break;
case CONTAINS:
peekExprList().contains(path, bindString(value));
break;
case STARTS_WITH:
peekExprList().startsWith(path, bindString(value));
break;
case ENDS_WITH:
peekExprList().endsWith(path, bindString(value));
break;
case ILIKE:
peekExprList().ilike(path, bindString(value));
break;
case ICONTAINS:
peekExprList().icontains(path, bindString(value));
break;
case ISTARTS_WITH:
peekExprList().istartsWith(path, bindString(value));
break;
case IENDS_WITH:
peekExprList().iendsWith(path, bindString(value));
break;
default:
throw new IllegalStateException("Unhandled operator " + op);
}
}
private String bindString(String value) {
ValueType valueType = getValueType(value);
switch (valueType) {
case NAMED_PARAM:
return NamedParameter.PREFIX + value;
case STRING:
return unquote(value);
default:
throw new IllegalArgumentException("Only STRING or NAMED PARAMETER argument allowed but got " + valueType);
}
}
private Object bind(String value) {
ValueType valueType = getValueType(value);
return getBindValue(valueType, value);
}
private ExpressionList peekExprList() {
return owner.peekExprList();
}
private Object getBindValue(ValueType valueType, String value) {
switch (valueType) {
case BOOL: return Boolean.parseBoolean(value);
case NUMBER: return new BigDecimal(value);
case STRING: return unquote(value);
case NAMED_PARAM: return new NamedParameter(value.substring(1));
default:
throw new IllegalArgumentException("Unhandled valueType "+valueType);
}
}
private String unquote(String value) {
String raw = value.substring(1, value.length() - 1);
//raw.replaceAll();
return raw;
}
}
@@ -0,0 +1,20 @@
package com.avaje.ebeaninternal.server.grammer;
enum EqlOperator {
EQ,
NE,
LT,
LTE,
GT,
GTE,
CONTAINS,
STARTS_WITH,
ENDS_WITH,
LIKE,
ICONTAINS,
ISTARTS_WITH,
IENDS_WITH,
ILIKE
}
@@ -0,0 +1,24 @@
package com.avaje.ebeaninternal.server.grammer;
import com.avaje.ebean.Query;
import com.avaje.ebeaninternal.server.grammer.antlr.EQLLexer;
import com.avaje.ebeaninternal.server.grammer.antlr.EQLParser;
import org.antlr.v4.runtime.ANTLRInputStream;
import org.antlr.v4.runtime.CommonTokenStream;
import org.antlr.v4.runtime.tree.ParseTreeWalker;
public class EqlParser {
public static <T> void parse(String raw, Query<T> query) {
EQLLexer lexer = new EQLLexer(new ANTLRInputStream(raw));
CommonTokenStream tokens = new CommonTokenStream(lexer);
EQLParser parser = new EQLParser(tokens);
EQLParser.Select_statementContext context = parser.select_statement();
EqlAdapter<T> adapter = new EqlAdapter<T>(query);
ParseTreeWalker walker = new ParseTreeWalker();
walker.walk(adapter, context);
}
}
@@ -0,0 +1,16 @@
package com.avaje.ebeaninternal.server.grammer;
public class NamedParameter {
public static final String PREFIX = "$namedParam$";
private final String name;
public NamedParameter(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
@@ -0,0 +1,47 @@
package com.avaje.ebeaninternal.server.grammer;
import java.util.HashMap;
import java.util.Map;
class OperatorMapping {
Map<String,EqlOperator> map = new HashMap<String,EqlOperator>();
public OperatorMapping() {
map.put("eq", EqlOperator.EQ);
map.put("=", EqlOperator.EQ);
map.put("ne", EqlOperator.NE);
map.put("<>", EqlOperator.NE);
map.put("!=", EqlOperator.NE);
map.put(">", EqlOperator.GT);
map.put("gt", EqlOperator.GT);
map.put(">=", EqlOperator.GTE);
map.put("gte", EqlOperator.GTE);
map.put("ge", EqlOperator.GTE);
map.put("<", EqlOperator.LT);
map.put("lt", EqlOperator.LT);
map.put("<=", EqlOperator.LTE);
map.put("lte", EqlOperator.LTE);
map.put("le", EqlOperator.LTE);
map.put("contains", EqlOperator.CONTAINS);
map.put("startsWith", EqlOperator.STARTS_WITH);
map.put("endsWith", EqlOperator.ENDS_WITH);
map.put("like", EqlOperator.LIKE);
map.put("icontains", EqlOperator.ICONTAINS);
map.put("istartsWith", EqlOperator.ISTARTS_WITH);
map.put("iendsWith", EqlOperator.IENDS_WITH);
map.put("ilike", EqlOperator.ILIKE);
}
public EqlOperator get(String key) {
return map.get(key);
}
}
@@ -0,0 +1,96 @@
T__0=1
T__1=2
T__2=3
T__3=4
T__4=5
T__5=6
T__6=7
T__7=8
T__8=9
T__9=10
T__10=11
T__11=12
T__12=13
T__13=14
T__14=15
T__15=16
T__16=17
T__17=18
T__18=19
T__19=20
T__20=21
T__21=22
T__22=23
T__23=24
T__24=25
T__25=26
T__26=27
T__27=28
T__28=29
T__29=30
T__30=31
T__31=32
T__32=33
T__33=34
T__34=35
T__35=36
T__36=37
T__37=38
T__38=39
T__39=40
T__40=41
T__41=42
T__42=43
T__43=44
INPUT_VARIABLE=45
PATH_VARIABLE=46
CHARACTER=47
BOOLEAN_LITERAL=48
NUMBER_LITERAL=49
STRING_LITERAL=50
ESCAPE_CHARACTER=51
WS=52
'select'=1
'('=2
')'=3
'where'=4
'fetch'=5
','=6
'or'=7
'and'=8
'not'=9
'in'=10
'between'=11
'is'=12
'null'=13
'isNull'=14
'isNotNull'=15
'notNull'=16
'empty'=17
'isEmpty'=18
'isNotEmpty'=19
'notEmpty'=20
'like'=21
'ilike'=22
'contains'=23
'icontains'=24
'startsWith'=25
'istartsWith'=26
'endsWith'=27
'iendsWith'=28
'='=29
'eq'=30
'>'=31
'gt'=32
'>='=33
'ge'=34
'gte'=35
'<'=36
'lt'=37
'<='=38
'le'=39
'lte'=40
'<>'=41
'!='=42
'ne'=43
'ieq'=44
@@ -0,0 +1,351 @@
// Generated from /home/rob/github/avaje-ebeanorm/src/test/resources/EQL.g4 by ANTLR 4.5.1
package com.avaje.ebeaninternal.server.grammer.antlr;
import org.antlr.v4.runtime.ParserRuleContext;
import org.antlr.v4.runtime.tree.ErrorNode;
import org.antlr.v4.runtime.tree.TerminalNode;
/**
* This class provides an empty implementation of {@link EQLListener},
* which can be extended to create a listener which only needs to handle a subset
* of the available methods.
*/
public class EQLBaseListener implements EQLListener {
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterSelect_statement(EQLParser.Select_statementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitSelect_statement(EQLParser.Select_statementContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterSelect_clause(EQLParser.Select_clauseContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitSelect_clause(EQLParser.Select_clauseContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterFetch_clause(EQLParser.Fetch_clauseContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitFetch_clause(EQLParser.Fetch_clauseContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterWhere_clause(EQLParser.Where_clauseContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitWhere_clause(EQLParser.Where_clauseContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterFetch_path(EQLParser.Fetch_pathContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitFetch_path(EQLParser.Fetch_pathContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterFetch_property_group(EQLParser.Fetch_property_groupContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitFetch_property_group(EQLParser.Fetch_property_groupContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterFetch_property(EQLParser.Fetch_propertyContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitFetch_property(EQLParser.Fetch_propertyContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterConditional_expression(EQLParser.Conditional_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitConditional_expression(EQLParser.Conditional_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterConditional_term(EQLParser.Conditional_termContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitConditional_term(EQLParser.Conditional_termContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterConditional_factor(EQLParser.Conditional_factorContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitConditional_factor(EQLParser.Conditional_factorContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterConditional_primary(EQLParser.Conditional_primaryContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitConditional_primary(EQLParser.Conditional_primaryContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterAny_expression(EQLParser.Any_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitAny_expression(EQLParser.Any_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterIn_expression(EQLParser.In_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitIn_expression(EQLParser.In_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterIn_value(EQLParser.In_valueContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitIn_value(EQLParser.In_valueContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterBetween_expression(EQLParser.Between_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitBetween_expression(EQLParser.Between_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterPropertyBetween_expression(EQLParser.PropertyBetween_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitPropertyBetween_expression(EQLParser.PropertyBetween_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterIsNull_expression(EQLParser.IsNull_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitIsNull_expression(EQLParser.IsNull_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterIsNotNull_expression(EQLParser.IsNotNull_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitIsNotNull_expression(EQLParser.IsNotNull_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterIsEmpty_expression(EQLParser.IsEmpty_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitIsEmpty_expression(EQLParser.IsEmpty_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterIsNotEmpty_expression(EQLParser.IsNotEmpty_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitIsNotEmpty_expression(EQLParser.IsNotEmpty_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterLike_expression(EQLParser.Like_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitLike_expression(EQLParser.Like_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterLike_op(EQLParser.Like_opContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitLike_op(EQLParser.Like_opContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterComparison_expression(EQLParser.Comparison_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitComparison_expression(EQLParser.Comparison_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterComparison_operator(EQLParser.Comparison_operatorContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitComparison_operator(EQLParser.Comparison_operatorContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterValue_expression(EQLParser.Value_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitValue_expression(EQLParser.Value_expressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterLiteral(EQLParser.LiteralContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitLiteral(EQLParser.LiteralContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterEveryRule(ParserRuleContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitEveryRule(ParserRuleContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void visitTerminal(TerminalNode node) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void visitErrorNode(ErrorNode node) { }
}
@@ -0,0 +1,253 @@
// Generated from /home/rob/github/avaje-ebeanorm/src/test/resources/EQL.g4 by ANTLR 4.5.1
package com.avaje.ebeaninternal.server.grammer.antlr;
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.TokenStream;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.misc.*;
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
public class EQLLexer extends Lexer {
static { RuntimeMetaData.checkVersion("4.5.1", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9,
T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17,
T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, T__23=24,
T__24=25, T__25=26, T__26=27, T__27=28, T__28=29, T__29=30, T__30=31,
T__31=32, T__32=33, T__33=34, T__34=35, T__35=36, T__36=37, T__37=38,
T__38=39, T__39=40, T__40=41, T__41=42, T__42=43, T__43=44, INPUT_VARIABLE=45,
PATH_VARIABLE=46, CHARACTER=47, BOOLEAN_LITERAL=48, NUMBER_LITERAL=49,
STRING_LITERAL=50, ESCAPE_CHARACTER=51, WS=52;
public static String[] modeNames = {
"DEFAULT_MODE"
};
public static final String[] ruleNames = {
"T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8",
"T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16",
"T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "T__23", "T__24",
"T__25", "T__26", "T__27", "T__28", "T__29", "T__30", "T__31", "T__32",
"T__33", "T__34", "T__35", "T__36", "T__37", "T__38", "T__39", "T__40",
"T__41", "T__42", "T__43", "INPUT_VARIABLE", "PATH_VARIABLE", "CHARACTER",
"BOOLEAN_LITERAL", "NUMBER_LITERAL", "STRING_LITERAL", "ESCAPE_CHARACTER",
"WS"
};
private static final String[] _LITERAL_NAMES = {
null, "'select'", "'('", "')'", "'where'", "'fetch'", "','", "'or'", "'and'",
"'not'", "'in'", "'between'", "'is'", "'null'", "'isNull'", "'isNotNull'",
"'notNull'", "'empty'", "'isEmpty'", "'isNotEmpty'", "'notEmpty'", "'like'",
"'ilike'", "'contains'", "'icontains'", "'startsWith'", "'istartsWith'",
"'endsWith'", "'iendsWith'", "'='", "'eq'", "'>'", "'gt'", "'>='", "'ge'",
"'gte'", "'<'", "'lt'", "'<='", "'le'", "'lte'", "'<>'", "'!='", "'ne'",
"'ieq'"
};
private static final String[] _SYMBOLIC_NAMES = {
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, "INPUT_VARIABLE",
"PATH_VARIABLE", "CHARACTER", "BOOLEAN_LITERAL", "NUMBER_LITERAL", "STRING_LITERAL",
"ESCAPE_CHARACTER", "WS"
};
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
/**
* @deprecated Use {@link #VOCABULARY} instead.
*/
@Deprecated
public static final String[] tokenNames;
static {
tokenNames = new String[_SYMBOLIC_NAMES.length];
for (int i = 0; i < tokenNames.length; i++) {
tokenNames[i] = VOCABULARY.getLiteralName(i);
if (tokenNames[i] == null) {
tokenNames[i] = VOCABULARY.getSymbolicName(i);
}
if (tokenNames[i] == null) {
tokenNames[i] = "<INVALID>";
}
}
}
@Override
@Deprecated
public String[] getTokenNames() {
return tokenNames;
}
@Override
public Vocabulary getVocabulary() {
return VOCABULARY;
}
public EQLLexer(CharStream input) {
super(input);
_interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
@Override
public String getGrammarFileName() { return "EQL.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public String[] getModeNames() { return modeNames; }
@Override
public ATN getATN() { return _ATN; }
public static final String _serializedATN =
"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\66\u0192\b\1\4\2"+
"\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4"+
"\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22"+
"\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31"+
"\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t"+
" \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t"+
"+\4,\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64"+
"\t\64\4\65\t\65\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\3\3\3\3\4\3\4\3\5\3\5\3"+
"\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\6\3\7\3\7\3\b\3\b\3\b\3\t\3\t\3\t"+
"\3\t\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3"+
"\r\3\r\3\r\3\16\3\16\3\16\3\16\3\16\3\17\3\17\3\17\3\17\3\17\3\17\3\17"+
"\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\21\3\21\3\21\3\21"+
"\3\21\3\21\3\21\3\21\3\22\3\22\3\22\3\22\3\22\3\22\3\23\3\23\3\23\3\23"+
"\3\23\3\23\3\23\3\23\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24"+
"\3\24\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\26\3\26\3\26\3\26"+
"\3\26\3\27\3\27\3\27\3\27\3\27\3\27\3\30\3\30\3\30\3\30\3\30\3\30\3\30"+
"\3\30\3\30\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\32\3\32"+
"\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\33\3\33\3\33\3\33\3\33"+
"\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\34\3\34\3\34\3\34\3\34\3\34\3\34"+
"\3\34\3\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\36\3\36"+
"\3\37\3\37\3\37\3 \3 \3!\3!\3!\3\"\3\"\3\"\3#\3#\3#\3$\3$\3$\3$\3%\3%"+
"\3&\3&\3&\3\'\3\'\3\'\3(\3(\3(\3)\3)\3)\3)\3*\3*\3*\3+\3+\3+\3,\3,\3,"+
"\3-\3-\3-\3-\3.\3.\3.\7.\u0159\n.\f.\16.\u015c\13.\3/\3/\7/\u0160\n/\f"+
"/\16/\u0163\13/\3\60\3\60\3\60\3\60\3\61\3\61\3\61\3\61\3\61\3\61\3\61"+
"\3\61\3\61\5\61\u0172\n\61\3\62\6\62\u0175\n\62\r\62\16\62\u0176\3\62"+
"\5\62\u017a\n\62\3\62\7\62\u017d\n\62\f\62\16\62\u0180\13\62\3\63\3\63"+
"\3\63\3\63\7\63\u0186\n\63\f\63\16\63\u0189\13\63\3\63\3\63\3\64\3\64"+
"\3\65\3\65\3\65\3\65\2\2\66\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25"+
"\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32"+
"\63\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61a"+
"\62c\63e\64g\65i\66\3\2\t\5\2C\\aac|\6\2\62;C\\aac|\7\2\60\60\62;C\\a"+
"ac|\4\2))^^\3\2\62;\3\2))\5\2\13\f\17\17\"\"\u0199\2\3\3\2\2\2\2\5\3\2"+
"\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21"+
"\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2"+
"\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3"+
"\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3"+
"\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3"+
"\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2"+
"\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2"+
"Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3"+
"\2\2\2\2g\3\2\2\2\2i\3\2\2\2\3k\3\2\2\2\5r\3\2\2\2\7t\3\2\2\2\tv\3\2\2"+
"\2\13|\3\2\2\2\r\u0082\3\2\2\2\17\u0084\3\2\2\2\21\u0087\3\2\2\2\23\u008b"+
"\3\2\2\2\25\u008f\3\2\2\2\27\u0092\3\2\2\2\31\u009a\3\2\2\2\33\u009d\3"+
"\2\2\2\35\u00a2\3\2\2\2\37\u00a9\3\2\2\2!\u00b3\3\2\2\2#\u00bb\3\2\2\2"+
"%\u00c1\3\2\2\2\'\u00c9\3\2\2\2)\u00d4\3\2\2\2+\u00dd\3\2\2\2-\u00e2\3"+
"\2\2\2/\u00e8\3\2\2\2\61\u00f1\3\2\2\2\63\u00fb\3\2\2\2\65\u0106\3\2\2"+
"\2\67\u0112\3\2\2\29\u011b\3\2\2\2;\u0125\3\2\2\2=\u0127\3\2\2\2?\u012a"+
"\3\2\2\2A\u012c\3\2\2\2C\u012f\3\2\2\2E\u0132\3\2\2\2G\u0135\3\2\2\2I"+
"\u0139\3\2\2\2K\u013b\3\2\2\2M\u013e\3\2\2\2O\u0141\3\2\2\2Q\u0144\3\2"+
"\2\2S\u0148\3\2\2\2U\u014b\3\2\2\2W\u014e\3\2\2\2Y\u0151\3\2\2\2[\u0155"+
"\3\2\2\2]\u015d\3\2\2\2_\u0164\3\2\2\2a\u0171\3\2\2\2c\u0174\3\2\2\2e"+
"\u0181\3\2\2\2g\u018c\3\2\2\2i\u018e\3\2\2\2kl\7u\2\2lm\7g\2\2mn\7n\2"+
"\2no\7g\2\2op\7e\2\2pq\7v\2\2q\4\3\2\2\2rs\7*\2\2s\6\3\2\2\2tu\7+\2\2"+
"u\b\3\2\2\2vw\7y\2\2wx\7j\2\2xy\7g\2\2yz\7t\2\2z{\7g\2\2{\n\3\2\2\2|}"+
"\7h\2\2}~\7g\2\2~\177\7v\2\2\177\u0080\7e\2\2\u0080\u0081\7j\2\2\u0081"+
"\f\3\2\2\2\u0082\u0083\7.\2\2\u0083\16\3\2\2\2\u0084\u0085\7q\2\2\u0085"+
"\u0086\7t\2\2\u0086\20\3\2\2\2\u0087\u0088\7c\2\2\u0088\u0089\7p\2\2\u0089"+
"\u008a\7f\2\2\u008a\22\3\2\2\2\u008b\u008c\7p\2\2\u008c\u008d\7q\2\2\u008d"+
"\u008e\7v\2\2\u008e\24\3\2\2\2\u008f\u0090\7k\2\2\u0090\u0091\7p\2\2\u0091"+
"\26\3\2\2\2\u0092\u0093\7d\2\2\u0093\u0094\7g\2\2\u0094\u0095\7v\2\2\u0095"+
"\u0096\7y\2\2\u0096\u0097\7g\2\2\u0097\u0098\7g\2\2\u0098\u0099\7p\2\2"+
"\u0099\30\3\2\2\2\u009a\u009b\7k\2\2\u009b\u009c\7u\2\2\u009c\32\3\2\2"+
"\2\u009d\u009e\7p\2\2\u009e\u009f\7w\2\2\u009f\u00a0\7n\2\2\u00a0\u00a1"+
"\7n\2\2\u00a1\34\3\2\2\2\u00a2\u00a3\7k\2\2\u00a3\u00a4\7u\2\2\u00a4\u00a5"+
"\7P\2\2\u00a5\u00a6\7w\2\2\u00a6\u00a7\7n\2\2\u00a7\u00a8\7n\2\2\u00a8"+
"\36\3\2\2\2\u00a9\u00aa\7k\2\2\u00aa\u00ab\7u\2\2\u00ab\u00ac\7P\2\2\u00ac"+
"\u00ad\7q\2\2\u00ad\u00ae\7v\2\2\u00ae\u00af\7P\2\2\u00af\u00b0\7w\2\2"+
"\u00b0\u00b1\7n\2\2\u00b1\u00b2\7n\2\2\u00b2 \3\2\2\2\u00b3\u00b4\7p\2"+
"\2\u00b4\u00b5\7q\2\2\u00b5\u00b6\7v\2\2\u00b6\u00b7\7P\2\2\u00b7\u00b8"+
"\7w\2\2\u00b8\u00b9\7n\2\2\u00b9\u00ba\7n\2\2\u00ba\"\3\2\2\2\u00bb\u00bc"+
"\7g\2\2\u00bc\u00bd\7o\2\2\u00bd\u00be\7r\2\2\u00be\u00bf\7v\2\2\u00bf"+
"\u00c0\7{\2\2\u00c0$\3\2\2\2\u00c1\u00c2\7k\2\2\u00c2\u00c3\7u\2\2\u00c3"+
"\u00c4\7G\2\2\u00c4\u00c5\7o\2\2\u00c5\u00c6\7r\2\2\u00c6\u00c7\7v\2\2"+
"\u00c7\u00c8\7{\2\2\u00c8&\3\2\2\2\u00c9\u00ca\7k\2\2\u00ca\u00cb\7u\2"+
"\2\u00cb\u00cc\7P\2\2\u00cc\u00cd\7q\2\2\u00cd\u00ce\7v\2\2\u00ce\u00cf"+
"\7G\2\2\u00cf\u00d0\7o\2\2\u00d0\u00d1\7r\2\2\u00d1\u00d2\7v\2\2\u00d2"+
"\u00d3\7{\2\2\u00d3(\3\2\2\2\u00d4\u00d5\7p\2\2\u00d5\u00d6\7q\2\2\u00d6"+
"\u00d7\7v\2\2\u00d7\u00d8\7G\2\2\u00d8\u00d9\7o\2\2\u00d9\u00da\7r\2\2"+
"\u00da\u00db\7v\2\2\u00db\u00dc\7{\2\2\u00dc*\3\2\2\2\u00dd\u00de\7n\2"+
"\2\u00de\u00df\7k\2\2\u00df\u00e0\7m\2\2\u00e0\u00e1\7g\2\2\u00e1,\3\2"+
"\2\2\u00e2\u00e3\7k\2\2\u00e3\u00e4\7n\2\2\u00e4\u00e5\7k\2\2\u00e5\u00e6"+
"\7m\2\2\u00e6\u00e7\7g\2\2\u00e7.\3\2\2\2\u00e8\u00e9\7e\2\2\u00e9\u00ea"+
"\7q\2\2\u00ea\u00eb\7p\2\2\u00eb\u00ec\7v\2\2\u00ec\u00ed\7c\2\2\u00ed"+
"\u00ee\7k\2\2\u00ee\u00ef\7p\2\2\u00ef\u00f0\7u\2\2\u00f0\60\3\2\2\2\u00f1"+
"\u00f2\7k\2\2\u00f2\u00f3\7e\2\2\u00f3\u00f4\7q\2\2\u00f4\u00f5\7p\2\2"+
"\u00f5\u00f6\7v\2\2\u00f6\u00f7\7c\2\2\u00f7\u00f8\7k\2\2\u00f8\u00f9"+
"\7p\2\2\u00f9\u00fa\7u\2\2\u00fa\62\3\2\2\2\u00fb\u00fc\7u\2\2\u00fc\u00fd"+
"\7v\2\2\u00fd\u00fe\7c\2\2\u00fe\u00ff\7t\2\2\u00ff\u0100\7v\2\2\u0100"+
"\u0101\7u\2\2\u0101\u0102\7Y\2\2\u0102\u0103\7k\2\2\u0103\u0104\7v\2\2"+
"\u0104\u0105\7j\2\2\u0105\64\3\2\2\2\u0106\u0107\7k\2\2\u0107\u0108\7"+
"u\2\2\u0108\u0109\7v\2\2\u0109\u010a\7c\2\2\u010a\u010b\7t\2\2\u010b\u010c"+
"\7v\2\2\u010c\u010d\7u\2\2\u010d\u010e\7Y\2\2\u010e\u010f\7k\2\2\u010f"+
"\u0110\7v\2\2\u0110\u0111\7j\2\2\u0111\66\3\2\2\2\u0112\u0113\7g\2\2\u0113"+
"\u0114\7p\2\2\u0114\u0115\7f\2\2\u0115\u0116\7u\2\2\u0116\u0117\7Y\2\2"+
"\u0117\u0118\7k\2\2\u0118\u0119\7v\2\2\u0119\u011a\7j\2\2\u011a8\3\2\2"+
"\2\u011b\u011c\7k\2\2\u011c\u011d\7g\2\2\u011d\u011e\7p\2\2\u011e\u011f"+
"\7f\2\2\u011f\u0120\7u\2\2\u0120\u0121\7Y\2\2\u0121\u0122\7k\2\2\u0122"+
"\u0123\7v\2\2\u0123\u0124\7j\2\2\u0124:\3\2\2\2\u0125\u0126\7?\2\2\u0126"+
"<\3\2\2\2\u0127\u0128\7g\2\2\u0128\u0129\7s\2\2\u0129>\3\2\2\2\u012a\u012b"+
"\7@\2\2\u012b@\3\2\2\2\u012c\u012d\7i\2\2\u012d\u012e\7v\2\2\u012eB\3"+
"\2\2\2\u012f\u0130\7@\2\2\u0130\u0131\7?\2\2\u0131D\3\2\2\2\u0132\u0133"+
"\7i\2\2\u0133\u0134\7g\2\2\u0134F\3\2\2\2\u0135\u0136\7i\2\2\u0136\u0137"+
"\7v\2\2\u0137\u0138\7g\2\2\u0138H\3\2\2\2\u0139\u013a\7>\2\2\u013aJ\3"+
"\2\2\2\u013b\u013c\7n\2\2\u013c\u013d\7v\2\2\u013dL\3\2\2\2\u013e\u013f"+
"\7>\2\2\u013f\u0140\7?\2\2\u0140N\3\2\2\2\u0141\u0142\7n\2\2\u0142\u0143"+
"\7g\2\2\u0143P\3\2\2\2\u0144\u0145\7n\2\2\u0145\u0146\7v\2\2\u0146\u0147"+
"\7g\2\2\u0147R\3\2\2\2\u0148\u0149\7>\2\2\u0149\u014a\7@\2\2\u014aT\3"+
"\2\2\2\u014b\u014c\7#\2\2\u014c\u014d\7?\2\2\u014dV\3\2\2\2\u014e\u014f"+
"\7p\2\2\u014f\u0150\7g\2\2\u0150X\3\2\2\2\u0151\u0152\7k\2\2\u0152\u0153"+
"\7g\2\2\u0153\u0154\7s\2\2\u0154Z\3\2\2\2\u0155\u0156\7<\2\2\u0156\u015a"+
"\t\2\2\2\u0157\u0159\t\3\2\2\u0158\u0157\3\2\2\2\u0159\u015c\3\2\2\2\u015a"+
"\u0158\3\2\2\2\u015a\u015b\3\2\2\2\u015b\\\3\2\2\2\u015c\u015a\3\2\2\2"+
"\u015d\u0161\t\2\2\2\u015e\u0160\t\4\2\2\u015f\u015e\3\2\2\2\u0160\u0163"+
"\3\2\2\2\u0161\u015f\3\2\2\2\u0161\u0162\3\2\2\2\u0162^\3\2\2\2\u0163"+
"\u0161\3\2\2\2\u0164\u0165\7)\2\2\u0165\u0166\n\5\2\2\u0166\u0167\7)\2"+
"\2\u0167`\3\2\2\2\u0168\u0169\7v\2\2\u0169\u016a\7t\2\2\u016a\u016b\7"+
"w\2\2\u016b\u0172\7g\2\2\u016c\u016d\7h\2\2\u016d\u016e\7c\2\2\u016e\u016f"+
"\7n\2\2\u016f\u0170\7u\2\2\u0170\u0172\7g\2\2\u0171\u0168\3\2\2\2\u0171"+
"\u016c\3\2\2\2\u0172b\3\2\2\2\u0173\u0175\t\6\2\2\u0174\u0173\3\2\2\2"+
"\u0175\u0176\3\2\2\2\u0176\u0174\3\2\2\2\u0176\u0177\3\2\2\2\u0177\u0179"+
"\3\2\2\2\u0178\u017a\7\60\2\2\u0179\u0178\3\2\2\2\u0179\u017a\3\2\2\2"+
"\u017a\u017e\3\2\2\2\u017b\u017d\t\6\2\2\u017c\u017b\3\2\2\2\u017d\u0180"+
"\3\2\2\2\u017e\u017c\3\2\2\2\u017e\u017f\3\2\2\2\u017fd\3\2\2\2\u0180"+
"\u017e\3\2\2\2\u0181\u0187\7)\2\2\u0182\u0186\n\7\2\2\u0183\u0184\7)\2"+
"\2\u0184\u0186\7)\2\2\u0185\u0182\3\2\2\2\u0185\u0183\3\2\2\2\u0186\u0189"+
"\3\2\2\2\u0187\u0185\3\2\2\2\u0187\u0188\3\2\2\2\u0188\u018a\3\2\2\2\u0189"+
"\u0187\3\2\2\2\u018a\u018b\7)\2\2\u018bf\3\2\2\2\u018c\u018d\5_\60\2\u018d"+
"h\3\2\2\2\u018e\u018f\t\b\2\2\u018f\u0190\3\2\2\2\u0190\u0191\b\65\2\2"+
"\u0191j\3\2\2\2\13\2\u015a\u0161\u0171\u0176\u0179\u017e\u0185\u0187\3"+
"\b\2\2";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {
_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
}
}
}
@@ -0,0 +1,96 @@
T__0=1
T__1=2
T__2=3
T__3=4
T__4=5
T__5=6
T__6=7
T__7=8
T__8=9
T__9=10
T__10=11
T__11=12
T__12=13
T__13=14
T__14=15
T__15=16
T__16=17
T__17=18
T__18=19
T__19=20
T__20=21
T__21=22
T__22=23
T__23=24
T__24=25
T__25=26
T__26=27
T__27=28
T__28=29
T__29=30
T__30=31
T__31=32
T__32=33
T__33=34
T__34=35
T__35=36
T__36=37
T__37=38
T__38=39
T__39=40
T__40=41
T__41=42
T__42=43
T__43=44
INPUT_VARIABLE=45
PATH_VARIABLE=46
CHARACTER=47
BOOLEAN_LITERAL=48
NUMBER_LITERAL=49
STRING_LITERAL=50
ESCAPE_CHARACTER=51
WS=52
'select'=1
'('=2
')'=3
'where'=4
'fetch'=5
','=6
'or'=7
'and'=8
'not'=9
'in'=10
'between'=11
'is'=12
'null'=13
'isNull'=14
'isNotNull'=15
'notNull'=16
'empty'=17
'isEmpty'=18
'isNotEmpty'=19
'notEmpty'=20
'like'=21
'ilike'=22
'contains'=23
'icontains'=24
'startsWith'=25
'istartsWith'=26
'endsWith'=27
'iendsWith'=28
'='=29
'eq'=30
'>'=31
'gt'=32
'>='=33
'ge'=34
'gte'=35
'<'=36
'lt'=37
'<='=38
'le'=39
'lte'=40
'<>'=41
'!='=42
'ne'=43
'ieq'=44
@@ -0,0 +1,270 @@
// Generated from /home/rob/github/avaje-ebeanorm/src/test/resources/EQL.g4 by ANTLR 4.5.1
package com.avaje.ebeaninternal.server.grammer.antlr;
import org.antlr.v4.runtime.tree.ParseTreeListener;
/**
* This interface defines a complete listener for a parse tree produced by
* {@link EQLParser}.
*/
public interface EQLListener extends ParseTreeListener {
/**
* Enter a parse tree produced by {@link EQLParser#select_statement}.
* @param ctx the parse tree
*/
void enterSelect_statement(EQLParser.Select_statementContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#select_statement}.
* @param ctx the parse tree
*/
void exitSelect_statement(EQLParser.Select_statementContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#select_clause}.
* @param ctx the parse tree
*/
void enterSelect_clause(EQLParser.Select_clauseContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#select_clause}.
* @param ctx the parse tree
*/
void exitSelect_clause(EQLParser.Select_clauseContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#fetch_clause}.
* @param ctx the parse tree
*/
void enterFetch_clause(EQLParser.Fetch_clauseContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#fetch_clause}.
* @param ctx the parse tree
*/
void exitFetch_clause(EQLParser.Fetch_clauseContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#where_clause}.
* @param ctx the parse tree
*/
void enterWhere_clause(EQLParser.Where_clauseContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#where_clause}.
* @param ctx the parse tree
*/
void exitWhere_clause(EQLParser.Where_clauseContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#fetch_path}.
* @param ctx the parse tree
*/
void enterFetch_path(EQLParser.Fetch_pathContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#fetch_path}.
* @param ctx the parse tree
*/
void exitFetch_path(EQLParser.Fetch_pathContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#fetch_property_group}.
* @param ctx the parse tree
*/
void enterFetch_property_group(EQLParser.Fetch_property_groupContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#fetch_property_group}.
* @param ctx the parse tree
*/
void exitFetch_property_group(EQLParser.Fetch_property_groupContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#fetch_property}.
* @param ctx the parse tree
*/
void enterFetch_property(EQLParser.Fetch_propertyContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#fetch_property}.
* @param ctx the parse tree
*/
void exitFetch_property(EQLParser.Fetch_propertyContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#conditional_expression}.
* @param ctx the parse tree
*/
void enterConditional_expression(EQLParser.Conditional_expressionContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#conditional_expression}.
* @param ctx the parse tree
*/
void exitConditional_expression(EQLParser.Conditional_expressionContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#conditional_term}.
* @param ctx the parse tree
*/
void enterConditional_term(EQLParser.Conditional_termContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#conditional_term}.
* @param ctx the parse tree
*/
void exitConditional_term(EQLParser.Conditional_termContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#conditional_factor}.
* @param ctx the parse tree
*/
void enterConditional_factor(EQLParser.Conditional_factorContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#conditional_factor}.
* @param ctx the parse tree
*/
void exitConditional_factor(EQLParser.Conditional_factorContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#conditional_primary}.
* @param ctx the parse tree
*/
void enterConditional_primary(EQLParser.Conditional_primaryContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#conditional_primary}.
* @param ctx the parse tree
*/
void exitConditional_primary(EQLParser.Conditional_primaryContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#any_expression}.
* @param ctx the parse tree
*/
void enterAny_expression(EQLParser.Any_expressionContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#any_expression}.
* @param ctx the parse tree
*/
void exitAny_expression(EQLParser.Any_expressionContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#in_expression}.
* @param ctx the parse tree
*/
void enterIn_expression(EQLParser.In_expressionContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#in_expression}.
* @param ctx the parse tree
*/
void exitIn_expression(EQLParser.In_expressionContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#in_value}.
* @param ctx the parse tree
*/
void enterIn_value(EQLParser.In_valueContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#in_value}.
* @param ctx the parse tree
*/
void exitIn_value(EQLParser.In_valueContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#between_expression}.
* @param ctx the parse tree
*/
void enterBetween_expression(EQLParser.Between_expressionContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#between_expression}.
* @param ctx the parse tree
*/
void exitBetween_expression(EQLParser.Between_expressionContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#propertyBetween_expression}.
* @param ctx the parse tree
*/
void enterPropertyBetween_expression(EQLParser.PropertyBetween_expressionContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#propertyBetween_expression}.
* @param ctx the parse tree
*/
void exitPropertyBetween_expression(EQLParser.PropertyBetween_expressionContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#isNull_expression}.
* @param ctx the parse tree
*/
void enterIsNull_expression(EQLParser.IsNull_expressionContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#isNull_expression}.
* @param ctx the parse tree
*/
void exitIsNull_expression(EQLParser.IsNull_expressionContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#isNotNull_expression}.
* @param ctx the parse tree
*/
void enterIsNotNull_expression(EQLParser.IsNotNull_expressionContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#isNotNull_expression}.
* @param ctx the parse tree
*/
void exitIsNotNull_expression(EQLParser.IsNotNull_expressionContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#isEmpty_expression}.
* @param ctx the parse tree
*/
void enterIsEmpty_expression(EQLParser.IsEmpty_expressionContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#isEmpty_expression}.
* @param ctx the parse tree
*/
void exitIsEmpty_expression(EQLParser.IsEmpty_expressionContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#isNotEmpty_expression}.
* @param ctx the parse tree
*/
void enterIsNotEmpty_expression(EQLParser.IsNotEmpty_expressionContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#isNotEmpty_expression}.
* @param ctx the parse tree
*/
void exitIsNotEmpty_expression(EQLParser.IsNotEmpty_expressionContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#like_expression}.
* @param ctx the parse tree
*/
void enterLike_expression(EQLParser.Like_expressionContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#like_expression}.
* @param ctx the parse tree
*/
void exitLike_expression(EQLParser.Like_expressionContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#like_op}.
* @param ctx the parse tree
*/
void enterLike_op(EQLParser.Like_opContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#like_op}.
* @param ctx the parse tree
*/
void exitLike_op(EQLParser.Like_opContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#comparison_expression}.
* @param ctx the parse tree
*/
void enterComparison_expression(EQLParser.Comparison_expressionContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#comparison_expression}.
* @param ctx the parse tree
*/
void exitComparison_expression(EQLParser.Comparison_expressionContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#comparison_operator}.
* @param ctx the parse tree
*/
void enterComparison_operator(EQLParser.Comparison_operatorContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#comparison_operator}.
* @param ctx the parse tree
*/
void exitComparison_operator(EQLParser.Comparison_operatorContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#value_expression}.
* @param ctx the parse tree
*/
void enterValue_expression(EQLParser.Value_expressionContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#value_expression}.
* @param ctx the parse tree
*/
void exitValue_expression(EQLParser.Value_expressionContext ctx);
/**
* Enter a parse tree produced by {@link EQLParser#literal}.
* @param ctx the parse tree
*/
void enterLiteral(EQLParser.LiteralContext ctx);
/**
* Exit a parse tree produced by {@link EQLParser#literal}.
* @param ctx the parse tree
*/
void exitLiteral(EQLParser.LiteralContext ctx);
}
File diff suppressed because it is too large Load Diff