You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@metron.apache.org by ce...@apache.org on 2016/08/22 01:50:48 UTC
[2/4] incubator-metron git commit: METRON-366: Add MODEL_APPLY to
Stellar closes apache/incubator-metron#210
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/1ea8d9ee/metron-platform/metron-common/src/main/java/org/apache/metron/common/stellar/generated/StellarListener.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-common/src/main/java/org/apache/metron/common/stellar/generated/StellarListener.java b/metron-platform/metron-common/src/main/java/org/apache/metron/common/stellar/generated/StellarListener.java
index 887233a..a41aad0 100644
--- a/metron-platform/metron-common/src/main/java/org/apache/metron/common/stellar/generated/StellarListener.java
+++ b/metron-platform/metron-common/src/main/java/org/apache/metron/common/stellar/generated/StellarListener.java
@@ -39,41 +39,41 @@ public interface StellarListener extends ParseTreeListener {
*/
void exitTransformation(StellarParser.TransformationContext ctx);
/**
- * Enter a parse tree produced by the {@code ComparisonExpression}
+ * Enter a parse tree produced by the {@code ConditionalExpr}
* labeled alternative in {@link StellarParser#transformation_expr}.
* @param ctx the parse tree
*/
- void enterComparisonExpression(StellarParser.ComparisonExpressionContext ctx);
+ void enterConditionalExpr(StellarParser.ConditionalExprContext ctx);
/**
- * Exit a parse tree produced by the {@code ComparisonExpression}
+ * Exit a parse tree produced by the {@code ConditionalExpr}
* labeled alternative in {@link StellarParser#transformation_expr}.
* @param ctx the parse tree
*/
- void exitComparisonExpression(StellarParser.ComparisonExpressionContext ctx);
+ void exitConditionalExpr(StellarParser.ConditionalExprContext ctx);
/**
- * Enter a parse tree produced by the {@code TernaryFunc}
+ * Enter a parse tree produced by the {@code TransformationExpr}
* labeled alternative in {@link StellarParser#transformation_expr}.
* @param ctx the parse tree
*/
- void enterTernaryFunc(StellarParser.TernaryFuncContext ctx);
+ void enterTransformationExpr(StellarParser.TransformationExprContext ctx);
/**
- * Exit a parse tree produced by the {@code TernaryFunc}
+ * Exit a parse tree produced by the {@code TransformationExpr}
* labeled alternative in {@link StellarParser#transformation_expr}.
* @param ctx the parse tree
*/
- void exitTernaryFunc(StellarParser.TernaryFuncContext ctx);
+ void exitTransformationExpr(StellarParser.TransformationExprContext ctx);
/**
- * Enter a parse tree produced by the {@code NotFunc}
+ * Enter a parse tree produced by the {@code ArithExpression}
* labeled alternative in {@link StellarParser#transformation_expr}.
* @param ctx the parse tree
*/
- void enterNotFunc(StellarParser.NotFuncContext ctx);
+ void enterArithExpression(StellarParser.ArithExpressionContext ctx);
/**
- * Exit a parse tree produced by the {@code NotFunc}
+ * Exit a parse tree produced by the {@code ArithExpression}
* labeled alternative in {@link StellarParser#transformation_expr}.
* @param ctx the parse tree
*/
- void exitNotFunc(StellarParser.NotFuncContext ctx);
+ void exitArithExpression(StellarParser.ArithExpressionContext ctx);
/**
* Enter a parse tree produced by the {@code TransformationEntity}
* labeled alternative in {@link StellarParser#transformation_expr}.
@@ -87,65 +87,65 @@ public interface StellarListener extends ParseTreeListener {
*/
void exitTransformationEntity(StellarParser.TransformationEntityContext ctx);
/**
- * Enter a parse tree produced by the {@code ArithExpression}
+ * Enter a parse tree produced by the {@code ComparisonExpression}
* labeled alternative in {@link StellarParser#transformation_expr}.
* @param ctx the parse tree
*/
- void enterArithExpression(StellarParser.ArithExpressionContext ctx);
+ void enterComparisonExpression(StellarParser.ComparisonExpressionContext ctx);
/**
- * Exit a parse tree produced by the {@code ArithExpression}
+ * Exit a parse tree produced by the {@code ComparisonExpression}
* labeled alternative in {@link StellarParser#transformation_expr}.
* @param ctx the parse tree
*/
- void exitArithExpression(StellarParser.ArithExpressionContext ctx);
+ void exitComparisonExpression(StellarParser.ComparisonExpressionContext ctx);
/**
- * Enter a parse tree produced by the {@code TransformationExpr}
- * labeled alternative in {@link StellarParser#transformation_expr}.
+ * Enter a parse tree produced by the {@code TernaryFuncWithoutIf}
+ * labeled alternative in {@link StellarParser#conditional_expr}.
* @param ctx the parse tree
*/
- void enterTransformationExpr(StellarParser.TransformationExprContext ctx);
+ void enterTernaryFuncWithoutIf(StellarParser.TernaryFuncWithoutIfContext ctx);
/**
- * Exit a parse tree produced by the {@code TransformationExpr}
- * labeled alternative in {@link StellarParser#transformation_expr}.
+ * Exit a parse tree produced by the {@code TernaryFuncWithoutIf}
+ * labeled alternative in {@link StellarParser#conditional_expr}.
* @param ctx the parse tree
*/
- void exitTransformationExpr(StellarParser.TransformationExprContext ctx);
+ void exitTernaryFuncWithoutIf(StellarParser.TernaryFuncWithoutIfContext ctx);
/**
- * Enter a parse tree produced by the {@code LogicalExpressionAnd}
- * labeled alternative in {@link StellarParser#transformation_expr}.
+ * Enter a parse tree produced by the {@code TernaryFuncWithIf}
+ * labeled alternative in {@link StellarParser#conditional_expr}.
* @param ctx the parse tree
*/
- void enterLogicalExpressionAnd(StellarParser.LogicalExpressionAndContext ctx);
+ void enterTernaryFuncWithIf(StellarParser.TernaryFuncWithIfContext ctx);
/**
- * Exit a parse tree produced by the {@code LogicalExpressionAnd}
- * labeled alternative in {@link StellarParser#transformation_expr}.
+ * Exit a parse tree produced by the {@code TernaryFuncWithIf}
+ * labeled alternative in {@link StellarParser#conditional_expr}.
* @param ctx the parse tree
*/
- void exitLogicalExpressionAnd(StellarParser.LogicalExpressionAndContext ctx);
+ void exitTernaryFuncWithIf(StellarParser.TernaryFuncWithIfContext ctx);
/**
- * Enter a parse tree produced by the {@code LogicalExpressionOr}
- * labeled alternative in {@link StellarParser#transformation_expr}.
+ * Enter a parse tree produced by the {@code NotFunc}
+ * labeled alternative in {@link StellarParser#comparison_expr}.
* @param ctx the parse tree
*/
- void enterLogicalExpressionOr(StellarParser.LogicalExpressionOrContext ctx);
+ void enterNotFunc(StellarParser.NotFuncContext ctx);
/**
- * Exit a parse tree produced by the {@code LogicalExpressionOr}
- * labeled alternative in {@link StellarParser#transformation_expr}.
+ * Exit a parse tree produced by the {@code NotFunc}
+ * labeled alternative in {@link StellarParser#comparison_expr}.
* @param ctx the parse tree
*/
- void exitLogicalExpressionOr(StellarParser.LogicalExpressionOrContext ctx);
+ void exitNotFunc(StellarParser.NotFuncContext ctx);
/**
- * Enter a parse tree produced by the {@code ComparisonExpressionWithOperator}
+ * Enter a parse tree produced by the {@code ComparisonExpressionParens}
* labeled alternative in {@link StellarParser#comparison_expr}.
* @param ctx the parse tree
*/
- void enterComparisonExpressionWithOperator(StellarParser.ComparisonExpressionWithOperatorContext ctx);
+ void enterComparisonExpressionParens(StellarParser.ComparisonExpressionParensContext ctx);
/**
- * Exit a parse tree produced by the {@code ComparisonExpressionWithOperator}
+ * Exit a parse tree produced by the {@code ComparisonExpressionParens}
* labeled alternative in {@link StellarParser#comparison_expr}.
* @param ctx the parse tree
*/
- void exitComparisonExpressionWithOperator(StellarParser.ComparisonExpressionWithOperatorContext ctx);
+ void exitComparisonExpressionParens(StellarParser.ComparisonExpressionParensContext ctx);
/**
* Enter a parse tree produced by the {@code InExpression}
* labeled alternative in {@link StellarParser#comparison_expr}.
@@ -159,6 +159,30 @@ public interface StellarListener extends ParseTreeListener {
*/
void exitInExpression(StellarParser.InExpressionContext ctx);
/**
+ * Enter a parse tree produced by the {@code ComparisonExpressionWithOperator}
+ * labeled alternative in {@link StellarParser#comparison_expr}.
+ * @param ctx the parse tree
+ */
+ void enterComparisonExpressionWithOperator(StellarParser.ComparisonExpressionWithOperatorContext ctx);
+ /**
+ * Exit a parse tree produced by the {@code ComparisonExpressionWithOperator}
+ * labeled alternative in {@link StellarParser#comparison_expr}.
+ * @param ctx the parse tree
+ */
+ void exitComparisonExpressionWithOperator(StellarParser.ComparisonExpressionWithOperatorContext ctx);
+ /**
+ * Enter a parse tree produced by the {@code LogicalExpressionAnd}
+ * labeled alternative in {@link StellarParser#comparison_expr}.
+ * @param ctx the parse tree
+ */
+ void enterLogicalExpressionAnd(StellarParser.LogicalExpressionAndContext ctx);
+ /**
+ * Exit a parse tree produced by the {@code LogicalExpressionAnd}
+ * labeled alternative in {@link StellarParser#comparison_expr}.
+ * @param ctx the parse tree
+ */
+ void exitLogicalExpressionAnd(StellarParser.LogicalExpressionAndContext ctx);
+ /**
* Enter a parse tree produced by the {@code NInExpression}
* labeled alternative in {@link StellarParser#comparison_expr}.
* @param ctx the parse tree
@@ -171,17 +195,29 @@ public interface StellarListener extends ParseTreeListener {
*/
void exitNInExpression(StellarParser.NInExpressionContext ctx);
/**
- * Enter a parse tree produced by the {@code ComparisonExpressionParens}
+ * Enter a parse tree produced by the {@code LogicalExpressionOr}
* labeled alternative in {@link StellarParser#comparison_expr}.
* @param ctx the parse tree
*/
- void enterComparisonExpressionParens(StellarParser.ComparisonExpressionParensContext ctx);
+ void enterLogicalExpressionOr(StellarParser.LogicalExpressionOrContext ctx);
/**
- * Exit a parse tree produced by the {@code ComparisonExpressionParens}
+ * Exit a parse tree produced by the {@code LogicalExpressionOr}
* labeled alternative in {@link StellarParser#comparison_expr}.
* @param ctx the parse tree
*/
- void exitComparisonExpressionParens(StellarParser.ComparisonExpressionParensContext ctx);
+ void exitLogicalExpressionOr(StellarParser.LogicalExpressionOrContext ctx);
+ /**
+ * Enter a parse tree produced by the {@code operand}
+ * labeled alternative in {@link StellarParser#comparison_expr}.
+ * @param ctx the parse tree
+ */
+ void enterOperand(StellarParser.OperandContext ctx);
+ /**
+ * Exit a parse tree produced by the {@code operand}
+ * labeled alternative in {@link StellarParser#comparison_expr}.
+ * @param ctx the parse tree
+ */
+ void exitOperand(StellarParser.OperandContext ctx);
/**
* Enter a parse tree produced by the {@code IdentifierOperand}
* labeled alternative in {@link StellarParser#comparison_operand}.
@@ -271,6 +307,26 @@ public interface StellarListener extends ParseTreeListener {
*/
void exitList_entity(StellarParser.List_entityContext ctx);
/**
+ * Enter a parse tree produced by {@link StellarParser#kv_list}.
+ * @param ctx the parse tree
+ */
+ void enterKv_list(StellarParser.Kv_listContext ctx);
+ /**
+ * Exit a parse tree produced by {@link StellarParser#kv_list}.
+ * @param ctx the parse tree
+ */
+ void exitKv_list(StellarParser.Kv_listContext ctx);
+ /**
+ * Enter a parse tree produced by {@link StellarParser#map_entity}.
+ * @param ctx the parse tree
+ */
+ void enterMap_entity(StellarParser.Map_entityContext ctx);
+ /**
+ * Exit a parse tree produced by {@link StellarParser#map_entity}.
+ * @param ctx the parse tree
+ */
+ void exitMap_entity(StellarParser.Map_entityContext ctx);
+ /**
* Enter a parse tree produced by the {@code ArithExpr_solo}
* labeled alternative in {@link StellarParser#arithmetic_expr}.
* @param ctx the parse tree
@@ -463,6 +519,30 @@ public interface StellarListener extends ParseTreeListener {
*/
void exitList(StellarParser.ListContext ctx);
/**
+ * Enter a parse tree produced by the {@code MapConst}
+ * labeled alternative in {@link StellarParser#identifier_operand}.
+ * @param ctx the parse tree
+ */
+ void enterMapConst(StellarParser.MapConstContext ctx);
+ /**
+ * Exit a parse tree produced by the {@code MapConst}
+ * labeled alternative in {@link StellarParser#identifier_operand}.
+ * @param ctx the parse tree
+ */
+ void exitMapConst(StellarParser.MapConstContext ctx);
+ /**
+ * Enter a parse tree produced by the {@code NullConst}
+ * labeled alternative in {@link StellarParser#identifier_operand}.
+ * @param ctx the parse tree
+ */
+ void enterNullConst(StellarParser.NullConstContext ctx);
+ /**
+ * Exit a parse tree produced by the {@code NullConst}
+ * labeled alternative in {@link StellarParser#identifier_operand}.
+ * @param ctx the parse tree
+ */
+ void exitNullConst(StellarParser.NullConstContext ctx);
+ /**
* Enter a parse tree produced by the {@code ExistsFunc}
* labeled alternative in {@link StellarParser#identifier_operand}.
* @param ctx the parse tree
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/1ea8d9ee/metron-platform/metron-common/src/main/java/org/apache/metron/common/stellar/generated/StellarParser.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-common/src/main/java/org/apache/metron/common/stellar/generated/StellarParser.java b/metron-platform/metron-common/src/main/java/org/apache/metron/common/stellar/generated/StellarParser.java
index d3d603c..33eff6a 100644
--- a/metron-platform/metron-common/src/main/java/org/apache/metron/common/stellar/generated/StellarParser.java
+++ b/metron-platform/metron-common/src/main/java/org/apache/metron/common/stellar/generated/StellarParser.java
@@ -38,34 +38,36 @@ public class StellarParser extends Parser {
new PredictionContextCache();
public static final int
COMMA=1, AND=2, OR=3, NOT=4, TRUE=5, FALSE=6, EQ=7, NEQ=8, LT=9, LTE=10,
- GT=11, GTE=12, QUESTION=13, COLON=14, IF=15, MINUS=16, PLUS=17, DIV=18,
- MUL=19, LBRACKET=20, RBRACKET=21, LPAREN=22, RPAREN=23, IN=24, NIN=25,
- EXISTS=26, INT_LITERAL=27, DOUBLE_LITERAL=28, IDENTIFIER=29, STRING_LITERAL=30,
- COMMENT=31, WS=32;
+ GT=11, GTE=12, QUESTION=13, COLON=14, IF=15, THEN=16, ELSE=17, NULL=18,
+ MINUS=19, PLUS=20, DIV=21, MUL=22, LBRACE=23, RBRACE=24, LBRACKET=25,
+ RBRACKET=26, LPAREN=27, RPAREN=28, IN=29, NIN=30, EXISTS=31, INT_LITERAL=32,
+ DOUBLE_LITERAL=33, IDENTIFIER=34, STRING_LITERAL=35, COMMENT=36, WS=37;
public static final int
- RULE_transformation = 0, RULE_transformation_expr = 1, RULE_comparison_expr = 2,
- RULE_comparison_operand = 3, RULE_transformation_entity = 4, RULE_comp_operator = 5,
- RULE_arith_operator_addition = 6, RULE_arith_operator_mul = 7, RULE_func_args = 8,
- RULE_op_list = 9, RULE_list_entity = 10, RULE_arithmetic_expr = 11, RULE_arithmetic_expr_mul = 12,
- RULE_functions = 13, RULE_arithmetic_operands = 14, RULE_identifier_operand = 15;
+ RULE_transformation = 0, RULE_transformation_expr = 1, RULE_conditional_expr = 2,
+ RULE_comparison_expr = 3, RULE_comparison_operand = 4, RULE_transformation_entity = 5,
+ RULE_comp_operator = 6, RULE_arith_operator_addition = 7, RULE_arith_operator_mul = 8,
+ RULE_func_args = 9, RULE_op_list = 10, RULE_list_entity = 11, RULE_kv_list = 12,
+ RULE_map_entity = 13, RULE_arithmetic_expr = 14, RULE_arithmetic_expr_mul = 15,
+ RULE_functions = 16, RULE_arithmetic_operands = 17, RULE_identifier_operand = 18;
public static final String[] ruleNames = {
- "transformation", "transformation_expr", "comparison_expr", "comparison_operand",
- "transformation_entity", "comp_operator", "arith_operator_addition", "arith_operator_mul",
- "func_args", "op_list", "list_entity", "arithmetic_expr", "arithmetic_expr_mul",
- "functions", "arithmetic_operands", "identifier_operand"
+ "transformation", "transformation_expr", "conditional_expr", "comparison_expr",
+ "comparison_operand", "transformation_entity", "comp_operator", "arith_operator_addition",
+ "arith_operator_mul", "func_args", "op_list", "list_entity", "kv_list",
+ "map_entity", "arithmetic_expr", "arithmetic_expr_mul", "functions", "arithmetic_operands",
+ "identifier_operand"
};
private static final String[] _LITERAL_NAMES = {
null, "','", null, null, null, null, null, "'=='", "'!='", "'<'", "'<='",
- "'>'", "'>='", null, null, null, "'-'", "'+'", "'/'", "'*'", "'['", "']'",
- "'('", "')'", "'in'", "'not in'"
+ "'>'", "'>='", "'?'", "':'", null, null, null, null, "'-'", "'+'", "'/'",
+ "'*'", "'{'", "'}'", "'['", "']'", "'('", "')'", "'in'", "'not in'"
};
private static final String[] _SYMBOLIC_NAMES = {
null, "COMMA", "AND", "OR", "NOT", "TRUE", "FALSE", "EQ", "NEQ", "LT",
- "LTE", "GT", "GTE", "QUESTION", "COLON", "IF", "MINUS", "PLUS", "DIV",
- "MUL", "LBRACKET", "RBRACKET", "LPAREN", "RPAREN", "IN", "NIN", "EXISTS",
- "INT_LITERAL", "DOUBLE_LITERAL", "IDENTIFIER", "STRING_LITERAL", "COMMENT",
- "WS"
+ "LTE", "GT", "GTE", "QUESTION", "COLON", "IF", "THEN", "ELSE", "NULL",
+ "MINUS", "PLUS", "DIV", "MUL", "LBRACE", "RBRACE", "LBRACKET", "RBRACKET",
+ "LPAREN", "RPAREN", "IN", "NIN", "EXISTS", "INT_LITERAL", "DOUBLE_LITERAL",
+ "IDENTIFIER", "STRING_LITERAL", "COMMENT", "WS"
};
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
@@ -141,9 +143,9 @@ public class StellarParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(32);
- transformation_expr(0);
- setState(33);
+ setState(38);
+ transformation_expr();
+ setState(39);
match(EOF);
}
}
@@ -183,43 +185,6 @@ public class StellarParser extends Parser {
if ( listener instanceof StellarListener ) ((StellarListener)listener).exitComparisonExpression(this);
}
}
- public static class TernaryFuncContext extends Transformation_exprContext {
- public TerminalNode IF() { return getToken(StellarParser.IF, 0); }
- public List<Transformation_exprContext> transformation_expr() {
- return getRuleContexts(Transformation_exprContext.class);
- }
- public Transformation_exprContext transformation_expr(int i) {
- return getRuleContext(Transformation_exprContext.class,i);
- }
- public TerminalNode QUESTION() { return getToken(StellarParser.QUESTION, 0); }
- public TerminalNode COLON() { return getToken(StellarParser.COLON, 0); }
- public TernaryFuncContext(Transformation_exprContext ctx) { copyFrom(ctx); }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof StellarListener ) ((StellarListener)listener).enterTernaryFunc(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof StellarListener ) ((StellarListener)listener).exitTernaryFunc(this);
- }
- }
- public static class NotFuncContext extends Transformation_exprContext {
- public TerminalNode NOT() { return getToken(StellarParser.NOT, 0); }
- public TerminalNode LPAREN() { return getToken(StellarParser.LPAREN, 0); }
- public Transformation_exprContext transformation_expr() {
- return getRuleContext(Transformation_exprContext.class,0);
- }
- public TerminalNode RPAREN() { return getToken(StellarParser.RPAREN, 0); }
- public NotFuncContext(Transformation_exprContext ctx) { copyFrom(ctx); }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof StellarListener ) ((StellarListener)listener).enterNotFunc(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof StellarListener ) ((StellarListener)listener).exitNotFunc(this);
- }
- }
public static class TransformationEntityContext extends Transformation_exprContext {
public Transformation_entityContext transformation_entity() {
return getRuleContext(Transformation_entityContext.class,0);
@@ -264,194 +229,194 @@ public class StellarParser extends Parser {
if ( listener instanceof StellarListener ) ((StellarListener)listener).exitTransformationExpr(this);
}
}
- public static class LogicalExpressionAndContext extends Transformation_exprContext {
- public List<Transformation_exprContext> transformation_expr() {
- return getRuleContexts(Transformation_exprContext.class);
- }
- public Transformation_exprContext transformation_expr(int i) {
- return getRuleContext(Transformation_exprContext.class,i);
- }
- public TerminalNode AND() { return getToken(StellarParser.AND, 0); }
- public LogicalExpressionAndContext(Transformation_exprContext ctx) { copyFrom(ctx); }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof StellarListener ) ((StellarListener)listener).enterLogicalExpressionAnd(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof StellarListener ) ((StellarListener)listener).exitLogicalExpressionAnd(this);
- }
- }
- public static class LogicalExpressionOrContext extends Transformation_exprContext {
- public List<Transformation_exprContext> transformation_expr() {
- return getRuleContexts(Transformation_exprContext.class);
+ public static class ConditionalExprContext extends Transformation_exprContext {
+ public Conditional_exprContext conditional_expr() {
+ return getRuleContext(Conditional_exprContext.class,0);
}
- public Transformation_exprContext transformation_expr(int i) {
- return getRuleContext(Transformation_exprContext.class,i);
- }
- public TerminalNode OR() { return getToken(StellarParser.OR, 0); }
- public LogicalExpressionOrContext(Transformation_exprContext ctx) { copyFrom(ctx); }
+ public ConditionalExprContext(Transformation_exprContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof StellarListener ) ((StellarListener)listener).enterLogicalExpressionOr(this);
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).enterConditionalExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof StellarListener ) ((StellarListener)listener).exitLogicalExpressionOr(this);
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).exitConditionalExpr(this);
}
}
public final Transformation_exprContext transformation_expr() throws RecognitionException {
- return transformation_expr(0);
- }
-
- private Transformation_exprContext transformation_expr(int _p) throws RecognitionException {
- ParserRuleContext _parentctx = _ctx;
- int _parentState = getState();
- Transformation_exprContext _localctx = new Transformation_exprContext(_ctx, _parentState);
- Transformation_exprContext _prevctx = _localctx;
- int _startState = 2;
- enterRecursionRule(_localctx, 2, RULE_transformation_expr, _p);
+ Transformation_exprContext _localctx = new Transformation_exprContext(_ctx, getState());
+ enterRule(_localctx, 2, RULE_transformation_expr);
try {
- int _alt;
- enterOuterAlt(_localctx, 1);
- {
- setState(55);
+ setState(49);
switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) {
case 1:
+ _localctx = new ConditionalExprContext(_localctx);
+ enterOuterAlt(_localctx, 1);
{
- _localctx = new ComparisonExpressionContext(_localctx);
- _ctx = _localctx;
- _prevctx = _localctx;
-
- setState(36);
- comparison_expr();
+ setState(41);
+ conditional_expr();
}
break;
case 2:
- {
_localctx = new TransformationExprContext(_localctx);
- _ctx = _localctx;
- _prevctx = _localctx;
- setState(37);
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(42);
match(LPAREN);
- setState(38);
- transformation_expr(0);
- setState(39);
+ setState(43);
+ transformation_expr();
+ setState(44);
match(RPAREN);
}
break;
case 3:
+ _localctx = new ArithExpressionContext(_localctx);
+ enterOuterAlt(_localctx, 3);
{
- _localctx = new TransformationEntityContext(_localctx);
- _ctx = _localctx;
- _prevctx = _localctx;
- setState(41);
- transformation_entity();
+ setState(46);
+ arithmetic_expr(0);
}
break;
case 4:
+ _localctx = new TransformationEntityContext(_localctx);
+ enterOuterAlt(_localctx, 4);
{
- _localctx = new NotFuncContext(_localctx);
- _ctx = _localctx;
- _prevctx = _localctx;
- setState(42);
- match(NOT);
- setState(43);
- match(LPAREN);
- setState(44);
- transformation_expr(0);
- setState(45);
- match(RPAREN);
+ setState(47);
+ transformation_entity();
}
break;
case 5:
+ _localctx = new ComparisonExpressionContext(_localctx);
+ enterOuterAlt(_localctx, 5);
{
- _localctx = new TernaryFuncContext(_localctx);
- _ctx = _localctx;
- _prevctx = _localctx;
- setState(47);
- match(IF);
setState(48);
- transformation_expr(0);
- setState(49);
- match(QUESTION);
- setState(50);
- transformation_expr(0);
- setState(51);
- match(COLON);
- setState(52);
- transformation_expr(0);
+ comparison_expr(0);
}
break;
- case 6:
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ public static class Conditional_exprContext extends ParserRuleContext {
+ public Conditional_exprContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_conditional_expr; }
+
+ public Conditional_exprContext() { }
+ public void copyFrom(Conditional_exprContext ctx) {
+ super.copyFrom(ctx);
+ }
+ }
+ public static class TernaryFuncWithoutIfContext extends Conditional_exprContext {
+ public Comparison_exprContext comparison_expr() {
+ return getRuleContext(Comparison_exprContext.class,0);
+ }
+ public TerminalNode QUESTION() { return getToken(StellarParser.QUESTION, 0); }
+ public List<Transformation_exprContext> transformation_expr() {
+ return getRuleContexts(Transformation_exprContext.class);
+ }
+ public Transformation_exprContext transformation_expr(int i) {
+ return getRuleContext(Transformation_exprContext.class,i);
+ }
+ public TerminalNode COLON() { return getToken(StellarParser.COLON, 0); }
+ public TernaryFuncWithoutIfContext(Conditional_exprContext ctx) { copyFrom(ctx); }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).enterTernaryFuncWithoutIf(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).exitTernaryFuncWithoutIf(this);
+ }
+ }
+ public static class TernaryFuncWithIfContext extends Conditional_exprContext {
+ public TerminalNode IF() { return getToken(StellarParser.IF, 0); }
+ public Comparison_exprContext comparison_expr() {
+ return getRuleContext(Comparison_exprContext.class,0);
+ }
+ public TerminalNode THEN() { return getToken(StellarParser.THEN, 0); }
+ public List<Transformation_exprContext> transformation_expr() {
+ return getRuleContexts(Transformation_exprContext.class);
+ }
+ public Transformation_exprContext transformation_expr(int i) {
+ return getRuleContext(Transformation_exprContext.class,i);
+ }
+ public TerminalNode ELSE() { return getToken(StellarParser.ELSE, 0); }
+ public TernaryFuncWithIfContext(Conditional_exprContext ctx) { copyFrom(ctx); }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).enterTernaryFuncWithIf(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).exitTernaryFuncWithIf(this);
+ }
+ }
+
+ public final Conditional_exprContext conditional_expr() throws RecognitionException {
+ Conditional_exprContext _localctx = new Conditional_exprContext(_ctx, getState());
+ enterRule(_localctx, 4, RULE_conditional_expr);
+ try {
+ setState(64);
+ switch (_input.LA(1)) {
+ case NOT:
+ case TRUE:
+ case FALSE:
+ case NULL:
+ case LBRACE:
+ case LBRACKET:
+ case LPAREN:
+ case EXISTS:
+ case INT_LITERAL:
+ case DOUBLE_LITERAL:
+ case IDENTIFIER:
+ case STRING_LITERAL:
+ _localctx = new TernaryFuncWithoutIfContext(_localctx);
+ enterOuterAlt(_localctx, 1);
{
- _localctx = new ArithExpressionContext(_localctx);
- _ctx = _localctx;
- _prevctx = _localctx;
+ setState(51);
+ comparison_expr(0);
+ setState(52);
+ match(QUESTION);
+ setState(53);
+ transformation_expr();
setState(54);
- arithmetic_expr(0);
+ match(COLON);
+ setState(55);
+ transformation_expr();
}
break;
- }
- _ctx.stop = _input.LT(-1);
- setState(71);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,2,_ctx);
- while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
- if ( _alt==1 ) {
- if ( _parseListeners!=null ) triggerExitRuleEvent();
- _prevctx = _localctx;
- {
- setState(69);
- switch ( getInterpreter().adaptivePredict(_input,1,_ctx) ) {
- case 1:
- {
- _localctx = new LogicalExpressionAndContext(new Transformation_exprContext(_parentctx, _parentState));
- pushNewRecursionContext(_localctx, _startState, RULE_transformation_expr);
- setState(57);
- if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)");
- setState(58);
- match(AND);
- setState(59);
- transformation_expr(7);
- }
- break;
- case 2:
- {
- _localctx = new LogicalExpressionOrContext(new Transformation_exprContext(_parentctx, _parentState));
- pushNewRecursionContext(_localctx, _startState, RULE_transformation_expr);
- setState(60);
- if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)");
- setState(61);
- match(OR);
- setState(62);
- transformation_expr(6);
- }
- break;
- case 3:
- {
- _localctx = new TernaryFuncContext(new Transformation_exprContext(_parentctx, _parentState));
- pushNewRecursionContext(_localctx, _startState, RULE_transformation_expr);
- setState(63);
- if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)");
- setState(64);
- match(QUESTION);
- setState(65);
- transformation_expr(0);
- setState(66);
- match(COLON);
- setState(67);
- transformation_expr(4);
- }
- break;
- }
- }
+ case IF:
+ _localctx = new TernaryFuncWithIfContext(_localctx);
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(57);
+ match(IF);
+ setState(58);
+ comparison_expr(0);
+ setState(59);
+ match(THEN);
+ setState(60);
+ transformation_expr();
+ setState(61);
+ match(ELSE);
+ setState(62);
+ transformation_expr();
}
- setState(73);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,2,_ctx);
- }
+ break;
+ default:
+ throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
@@ -460,7 +425,7 @@ public class StellarParser extends Parser {
_errHandler.recover(this, re);
}
finally {
- unrollRecursionContexts(_parentctx);
+ exitRule();
}
return _localctx;
}
@@ -476,6 +441,23 @@ public class StellarParser extends Parser {
super.copyFrom(ctx);
}
}
+ public static class NotFuncContext extends Comparison_exprContext {
+ public TerminalNode NOT() { return getToken(StellarParser.NOT, 0); }
+ public TerminalNode LPAREN() { return getToken(StellarParser.LPAREN, 0); }
+ public Comparison_exprContext comparison_expr() {
+ return getRuleContext(Comparison_exprContext.class,0);
+ }
+ public TerminalNode RPAREN() { return getToken(StellarParser.RPAREN, 0); }
+ public NotFuncContext(Comparison_exprContext ctx) { copyFrom(ctx); }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).enterNotFunc(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).exitNotFunc(this);
+ }
+ }
public static class ComparisonExpressionParensContext extends Comparison_exprContext {
public TerminalNode LPAREN() { return getToken(StellarParser.LPAREN, 0); }
public Comparison_exprContext comparison_expr() {
@@ -530,6 +512,24 @@ public class StellarParser extends Parser {
if ( listener instanceof StellarListener ) ((StellarListener)listener).exitComparisonExpressionWithOperator(this);
}
}
+ public static class LogicalExpressionAndContext extends Comparison_exprContext {
+ public List<Comparison_exprContext> comparison_expr() {
+ return getRuleContexts(Comparison_exprContext.class);
+ }
+ public Comparison_exprContext comparison_expr(int i) {
+ return getRuleContext(Comparison_exprContext.class,i);
+ }
+ public TerminalNode AND() { return getToken(StellarParser.AND, 0); }
+ public LogicalExpressionAndContext(Comparison_exprContext ctx) { copyFrom(ctx); }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).enterLogicalExpressionAnd(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).exitLogicalExpressionAnd(this);
+ }
+ }
public static class NInExpressionContext extends Comparison_exprContext {
public List<Identifier_operandContext> identifier_operand() {
return getRuleContexts(Identifier_operandContext.class);
@@ -548,61 +548,176 @@ public class StellarParser extends Parser {
if ( listener instanceof StellarListener ) ((StellarListener)listener).exitNInExpression(this);
}
}
+ public static class LogicalExpressionOrContext extends Comparison_exprContext {
+ public List<Comparison_exprContext> comparison_expr() {
+ return getRuleContexts(Comparison_exprContext.class);
+ }
+ public Comparison_exprContext comparison_expr(int i) {
+ return getRuleContext(Comparison_exprContext.class,i);
+ }
+ public TerminalNode OR() { return getToken(StellarParser.OR, 0); }
+ public LogicalExpressionOrContext(Comparison_exprContext ctx) { copyFrom(ctx); }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).enterLogicalExpressionOr(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).exitLogicalExpressionOr(this);
+ }
+ }
+ public static class OperandContext extends Comparison_exprContext {
+ public Identifier_operandContext identifier_operand() {
+ return getRuleContext(Identifier_operandContext.class,0);
+ }
+ public OperandContext(Comparison_exprContext ctx) { copyFrom(ctx); }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).enterOperand(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).exitOperand(this);
+ }
+ }
public final Comparison_exprContext comparison_expr() throws RecognitionException {
- Comparison_exprContext _localctx = new Comparison_exprContext(_ctx, getState());
- enterRule(_localctx, 4, RULE_comparison_expr);
+ return comparison_expr(0);
+ }
+
+ private Comparison_exprContext comparison_expr(int _p) throws RecognitionException {
+ ParserRuleContext _parentctx = _ctx;
+ int _parentState = getState();
+ Comparison_exprContext _localctx = new Comparison_exprContext(_ctx, _parentState);
+ Comparison_exprContext _prevctx = _localctx;
+ int _startState = 6;
+ enterRecursionRule(_localctx, 6, RULE_comparison_expr, _p);
try {
- setState(90);
- switch ( getInterpreter().adaptivePredict(_input,3,_ctx) ) {
+ int _alt;
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(89);
+ switch ( getInterpreter().adaptivePredict(_input,2,_ctx) ) {
case 1:
- _localctx = new ComparisonExpressionWithOperatorContext(_localctx);
- enterOuterAlt(_localctx, 1);
{
- setState(74);
+ _localctx = new ComparisonExpressionWithOperatorContext(_localctx);
+ _ctx = _localctx;
+ _prevctx = _localctx;
+
+ setState(67);
comparison_operand();
- setState(75);
+ setState(68);
comp_operator();
- setState(76);
+ setState(69);
comparison_operand();
}
break;
case 2:
- _localctx = new InExpressionContext(_localctx);
- enterOuterAlt(_localctx, 2);
{
- setState(78);
+ _localctx = new InExpressionContext(_localctx);
+ _ctx = _localctx;
+ _prevctx = _localctx;
+ setState(71);
identifier_operand();
- setState(79);
+ setState(72);
match(IN);
- setState(80);
+ setState(73);
identifier_operand();
}
break;
case 3:
- _localctx = new NInExpressionContext(_localctx);
- enterOuterAlt(_localctx, 3);
{
- setState(82);
+ _localctx = new NInExpressionContext(_localctx);
+ _ctx = _localctx;
+ _prevctx = _localctx;
+ setState(75);
identifier_operand();
- setState(83);
+ setState(76);
match(NIN);
- setState(84);
+ setState(77);
identifier_operand();
}
break;
case 4:
- _localctx = new ComparisonExpressionParensContext(_localctx);
- enterOuterAlt(_localctx, 4);
{
- setState(86);
+ _localctx = new NotFuncContext(_localctx);
+ _ctx = _localctx;
+ _prevctx = _localctx;
+ setState(79);
+ match(NOT);
+ setState(80);
match(LPAREN);
- setState(87);
- comparison_expr();
- setState(88);
+ setState(81);
+ comparison_expr(0);
+ setState(82);
+ match(RPAREN);
+ }
+ break;
+ case 5:
+ {
+ _localctx = new ComparisonExpressionParensContext(_localctx);
+ _ctx = _localctx;
+ _prevctx = _localctx;
+ setState(84);
+ match(LPAREN);
+ setState(85);
+ comparison_expr(0);
+ setState(86);
match(RPAREN);
}
break;
+ case 6:
+ {
+ _localctx = new OperandContext(_localctx);
+ _ctx = _localctx;
+ _prevctx = _localctx;
+ setState(88);
+ identifier_operand();
+ }
+ break;
+ }
+ _ctx.stop = _input.LT(-1);
+ setState(99);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,4,_ctx);
+ while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
+ if ( _alt==1 ) {
+ if ( _parseListeners!=null ) triggerExitRuleEvent();
+ _prevctx = _localctx;
+ {
+ setState(97);
+ switch ( getInterpreter().adaptivePredict(_input,3,_ctx) ) {
+ case 1:
+ {
+ _localctx = new LogicalExpressionAndContext(new Comparison_exprContext(_parentctx, _parentState));
+ pushNewRecursionContext(_localctx, _startState, RULE_comparison_expr);
+ setState(91);
+ if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)");
+ setState(92);
+ match(AND);
+ setState(93);
+ comparison_expr(6);
+ }
+ break;
+ case 2:
+ {
+ _localctx = new LogicalExpressionOrContext(new Comparison_exprContext(_parentctx, _parentState));
+ pushNewRecursionContext(_localctx, _startState, RULE_comparison_expr);
+ setState(94);
+ if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)");
+ setState(95);
+ match(OR);
+ setState(96);
+ comparison_expr(5);
+ }
+ break;
+ }
+ }
+ }
+ setState(101);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,4,_ctx);
+ }
}
}
catch (RecognitionException re) {
@@ -611,7 +726,7 @@ public class StellarParser extends Parser {
_errHandler.recover(this, re);
}
finally {
- exitRule();
+ unrollRecursionContexts(_parentctx);
}
return _localctx;
}
@@ -644,12 +759,12 @@ public class StellarParser extends Parser {
public final Comparison_operandContext comparison_operand() throws RecognitionException {
Comparison_operandContext _localctx = new Comparison_operandContext(_ctx, getState());
- enterRule(_localctx, 6, RULE_comparison_operand);
+ enterRule(_localctx, 8, RULE_comparison_operand);
try {
_localctx = new IdentifierOperandContext(_localctx);
enterOuterAlt(_localctx, 1);
{
- setState(92);
+ setState(102);
identifier_operand();
}
}
@@ -684,11 +799,11 @@ public class StellarParser extends Parser {
public final Transformation_entityContext transformation_entity() throws RecognitionException {
Transformation_entityContext _localctx = new Transformation_entityContext(_ctx, getState());
- enterRule(_localctx, 8, RULE_transformation_entity);
+ enterRule(_localctx, 10, RULE_transformation_entity);
try {
enterOuterAlt(_localctx, 1);
{
- setState(94);
+ setState(104);
identifier_operand();
}
}
@@ -734,13 +849,13 @@ public class StellarParser extends Parser {
public final Comp_operatorContext comp_operator() throws RecognitionException {
Comp_operatorContext _localctx = new Comp_operatorContext(_ctx, getState());
- enterRule(_localctx, 10, RULE_comp_operator);
+ enterRule(_localctx, 12, RULE_comp_operator);
int _la;
try {
_localctx = new ComparisonOpContext(_localctx);
enterOuterAlt(_localctx, 1);
{
- setState(96);
+ setState(106);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << EQ) | (1L << NEQ) | (1L << LT) | (1L << LTE) | (1L << GT) | (1L << GTE))) != 0)) ) {
_errHandler.recoverInline(this);
@@ -787,13 +902,13 @@ public class StellarParser extends Parser {
public final Arith_operator_additionContext arith_operator_addition() throws RecognitionException {
Arith_operator_additionContext _localctx = new Arith_operator_additionContext(_ctx, getState());
- enterRule(_localctx, 12, RULE_arith_operator_addition);
+ enterRule(_localctx, 14, RULE_arith_operator_addition);
int _la;
try {
_localctx = new ArithOp_plusContext(_localctx);
enterOuterAlt(_localctx, 1);
{
- setState(98);
+ setState(108);
_la = _input.LA(1);
if ( !(_la==MINUS || _la==PLUS) ) {
_errHandler.recoverInline(this);
@@ -840,13 +955,13 @@ public class StellarParser extends Parser {
public final Arith_operator_mulContext arith_operator_mul() throws RecognitionException {
Arith_operator_mulContext _localctx = new Arith_operator_mulContext(_ctx, getState());
- enterRule(_localctx, 14, RULE_arith_operator_mul);
+ enterRule(_localctx, 16, RULE_arith_operator_mul);
int _la;
try {
_localctx = new ArithOp_mulContext(_localctx);
enterOuterAlt(_localctx, 1);
{
- setState(100);
+ setState(110);
_la = _input.LA(1);
if ( !(_la==DIV || _la==MUL) ) {
_errHandler.recoverInline(this);
@@ -867,9 +982,11 @@ public class StellarParser extends Parser {
}
public static class Func_argsContext extends ParserRuleContext {
+ public TerminalNode LPAREN() { return getToken(StellarParser.LPAREN, 0); }
public Op_listContext op_list() {
return getRuleContext(Op_listContext.class,0);
}
+ public TerminalNode RPAREN() { return getToken(StellarParser.RPAREN, 0); }
public Func_argsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@@ -886,12 +1003,30 @@ public class StellarParser extends Parser {
public final Func_argsContext func_args() throws RecognitionException {
Func_argsContext _localctx = new Func_argsContext(_ctx, getState());
- enterRule(_localctx, 16, RULE_func_args);
+ enterRule(_localctx, 18, RULE_func_args);
try {
- enterOuterAlt(_localctx, 1);
- {
- setState(102);
- op_list(0);
+ setState(118);
+ switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(112);
+ match(LPAREN);
+ setState(113);
+ op_list(0);
+ setState(114);
+ match(RPAREN);
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(116);
+ match(LPAREN);
+ setState(117);
+ match(RPAREN);
+ }
+ break;
}
}
catch (RecognitionException re) {
@@ -936,20 +1071,20 @@ public class StellarParser extends Parser {
int _parentState = getState();
Op_listContext _localctx = new Op_listContext(_ctx, _parentState);
Op_listContext _prevctx = _localctx;
- int _startState = 18;
- enterRecursionRule(_localctx, 18, RULE_op_list, _p);
+ int _startState = 20;
+ enterRecursionRule(_localctx, 20, RULE_op_list, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
{
- setState(105);
+ setState(121);
identifier_operand();
}
_ctx.stop = _input.LT(-1);
- setState(112);
+ setState(128);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,4,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,6,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
@@ -958,18 +1093,18 @@ public class StellarParser extends Parser {
{
_localctx = new Op_listContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_op_list);
- setState(107);
+ setState(123);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
- setState(108);
+ setState(124);
match(COMMA);
- setState(109);
+ setState(125);
identifier_operand();
}
}
}
- setState(114);
+ setState(130);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,4,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,6,_ctx);
}
}
}
@@ -1006,27 +1141,27 @@ public class StellarParser extends Parser {
public final List_entityContext list_entity() throws RecognitionException {
List_entityContext _localctx = new List_entityContext(_ctx, getState());
- enterRule(_localctx, 20, RULE_list_entity);
+ enterRule(_localctx, 22, RULE_list_entity);
try {
- setState(121);
- switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) {
+ setState(137);
+ switch ( getInterpreter().adaptivePredict(_input,7,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(115);
+ setState(131);
match(LBRACKET);
- setState(116);
+ setState(132);
op_list(0);
- setState(117);
+ setState(133);
match(RBRACKET);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(119);
+ setState(135);
match(LBRACKET);
- setState(120);
+ setState(136);
match(RBRACKET);
}
break;
@@ -1043,6 +1178,156 @@ public class StellarParser extends Parser {
return _localctx;
}
+ public static class Kv_listContext extends ParserRuleContext {
+ public Identifier_operandContext identifier_operand() {
+ return getRuleContext(Identifier_operandContext.class,0);
+ }
+ public TerminalNode COLON() { return getToken(StellarParser.COLON, 0); }
+ public Transformation_exprContext transformation_expr() {
+ return getRuleContext(Transformation_exprContext.class,0);
+ }
+ public Kv_listContext kv_list() {
+ return getRuleContext(Kv_listContext.class,0);
+ }
+ public TerminalNode COMMA() { return getToken(StellarParser.COMMA, 0); }
+ public Kv_listContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_kv_list; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).enterKv_list(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).exitKv_list(this);
+ }
+ }
+
+ public final Kv_listContext kv_list() throws RecognitionException {
+ return kv_list(0);
+ }
+
+ private Kv_listContext kv_list(int _p) throws RecognitionException {
+ ParserRuleContext _parentctx = _ctx;
+ int _parentState = getState();
+ Kv_listContext _localctx = new Kv_listContext(_ctx, _parentState);
+ Kv_listContext _prevctx = _localctx;
+ int _startState = 24;
+ enterRecursionRule(_localctx, 24, RULE_kv_list, _p);
+ try {
+ int _alt;
+ enterOuterAlt(_localctx, 1);
+ {
+ {
+ setState(140);
+ identifier_operand();
+ setState(141);
+ match(COLON);
+ setState(142);
+ transformation_expr();
+ }
+ _ctx.stop = _input.LT(-1);
+ setState(152);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,8,_ctx);
+ while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
+ if ( _alt==1 ) {
+ if ( _parseListeners!=null ) triggerExitRuleEvent();
+ _prevctx = _localctx;
+ {
+ {
+ _localctx = new Kv_listContext(_parentctx, _parentState);
+ pushNewRecursionContext(_localctx, _startState, RULE_kv_list);
+ setState(144);
+ if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
+ setState(145);
+ match(COMMA);
+ setState(146);
+ identifier_operand();
+ setState(147);
+ match(COLON);
+ setState(148);
+ transformation_expr();
+ }
+ }
+ }
+ setState(154);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,8,_ctx);
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ unrollRecursionContexts(_parentctx);
+ }
+ return _localctx;
+ }
+
+ public static class Map_entityContext extends ParserRuleContext {
+ public TerminalNode LBRACE() { return getToken(StellarParser.LBRACE, 0); }
+ public Kv_listContext kv_list() {
+ return getRuleContext(Kv_listContext.class,0);
+ }
+ public TerminalNode RBRACE() { return getToken(StellarParser.RBRACE, 0); }
+ public Map_entityContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_map_entity; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).enterMap_entity(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).exitMap_entity(this);
+ }
+ }
+
+ public final Map_entityContext map_entity() throws RecognitionException {
+ Map_entityContext _localctx = new Map_entityContext(_ctx, getState());
+ enterRule(_localctx, 26, RULE_map_entity);
+ try {
+ setState(161);
+ switch ( getInterpreter().adaptivePredict(_input,9,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(155);
+ match(LBRACE);
+ setState(156);
+ kv_list(0);
+ setState(157);
+ match(RBRACE);
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(159);
+ match(LBRACE);
+ setState(160);
+ match(RBRACE);
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
public static class Arithmetic_exprContext extends ParserRuleContext {
public Arithmetic_exprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
@@ -1114,8 +1399,8 @@ public class StellarParser extends Parser {
int _parentState = getState();
Arithmetic_exprContext _localctx = new Arithmetic_exprContext(_ctx, _parentState);
Arithmetic_exprContext _prevctx = _localctx;
- int _startState = 22;
- enterRecursionRule(_localctx, 22, RULE_arithmetic_expr, _p);
+ int _startState = 28;
+ enterRecursionRule(_localctx, 28, RULE_arithmetic_expr, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
@@ -1125,29 +1410,29 @@ public class StellarParser extends Parser {
_ctx = _localctx;
_prevctx = _localctx;
- setState(124);
+ setState(164);
arithmetic_expr_mul(0);
}
_ctx.stop = _input.LT(-1);
- setState(134);
+ setState(174);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,7,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,11,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
- setState(132);
- switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) {
+ setState(172);
+ switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) {
case 1:
{
_localctx = new ArithExpr_plusContext(new Arithmetic_exprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_arithmetic_expr);
- setState(126);
+ setState(166);
if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
- setState(127);
+ setState(167);
match(PLUS);
- setState(128);
+ setState(168);
arithmetic_expr_mul(0);
}
break;
@@ -1155,20 +1440,20 @@ public class StellarParser extends Parser {
{
_localctx = new ArithExpr_minusContext(new Arithmetic_exprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_arithmetic_expr);
- setState(129);
+ setState(169);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
- setState(130);
+ setState(170);
match(MINUS);
- setState(131);
+ setState(171);
arithmetic_expr_mul(0);
}
break;
}
}
}
- setState(136);
+ setState(176);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,7,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,11,_ctx);
}
}
}
@@ -1254,8 +1539,8 @@ public class StellarParser extends Parser {
int _parentState = getState();
Arithmetic_expr_mulContext _localctx = new Arithmetic_expr_mulContext(_ctx, _parentState);
Arithmetic_expr_mulContext _prevctx = _localctx;
- int _startState = 24;
- enterRecursionRule(_localctx, 24, RULE_arithmetic_expr_mul, _p);
+ int _startState = 30;
+ enterRecursionRule(_localctx, 30, RULE_arithmetic_expr_mul, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
@@ -1265,29 +1550,29 @@ public class StellarParser extends Parser {
_ctx = _localctx;
_prevctx = _localctx;
- setState(138);
+ setState(178);
arithmetic_operands();
}
_ctx.stop = _input.LT(-1);
- setState(148);
+ setState(188);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,9,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,13,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
- setState(146);
- switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) {
+ setState(186);
+ switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) {
case 1:
{
_localctx = new ArithExpr_mulContext(new Arithmetic_expr_mulContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_arithmetic_expr_mul);
- setState(140);
+ setState(180);
if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
- setState(141);
+ setState(181);
match(MUL);
- setState(142);
+ setState(182);
arithmetic_expr_mul(3);
}
break;
@@ -1295,20 +1580,20 @@ public class StellarParser extends Parser {
{
_localctx = new ArithExpr_divContext(new Arithmetic_expr_mulContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_arithmetic_expr_mul);
- setState(143);
+ setState(183);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
- setState(144);
+ setState(184);
match(DIV);
- setState(145);
+ setState(185);
arithmetic_expr_mul(2);
}
break;
}
}
}
- setState(150);
+ setState(190);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,9,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,13,_ctx);
}
}
}
@@ -1336,11 +1621,9 @@ public class StellarParser extends Parser {
}
public static class TransformationFuncContext extends FunctionsContext {
public TerminalNode IDENTIFIER() { return getToken(StellarParser.IDENTIFIER, 0); }
- public TerminalNode LPAREN() { return getToken(StellarParser.LPAREN, 0); }
public Func_argsContext func_args() {
return getRuleContext(Func_argsContext.class,0);
}
- public TerminalNode RPAREN() { return getToken(StellarParser.RPAREN, 0); }
public TransformationFuncContext(FunctionsContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
@@ -1354,19 +1637,15 @@ public class StellarParser extends Parser {
public final FunctionsContext functions() throws RecognitionException {
FunctionsContext _localctx = new FunctionsContext(_ctx, getState());
- enterRule(_localctx, 26, RULE_functions);
+ enterRule(_localctx, 32, RULE_functions);
try {
_localctx = new TransformationFuncContext(_localctx);
enterOuterAlt(_localctx, 1);
{
- setState(151);
+ setState(191);
match(IDENTIFIER);
- setState(152);
- match(LPAREN);
- setState(153);
+ setState(192);
func_args();
- setState(154);
- match(RPAREN);
}
}
catch (RecognitionException re) {
@@ -1460,15 +1739,15 @@ public class StellarParser extends Parser {
public final Arithmetic_operandsContext arithmetic_operands() throws RecognitionException {
Arithmetic_operandsContext _localctx = new Arithmetic_operandsContext(_ctx, getState());
- enterRule(_localctx, 28, RULE_arithmetic_operands);
+ enterRule(_localctx, 34, RULE_arithmetic_operands);
try {
- setState(164);
- switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) {
+ setState(202);
+ switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) {
case 1:
_localctx = new NumericFunctionsContext(_localctx);
enterOuterAlt(_localctx, 1);
{
- setState(156);
+ setState(194);
functions();
}
break;
@@ -1476,7 +1755,7 @@ public class StellarParser extends Parser {
_localctx = new DoubleLiteralContext(_localctx);
enterOuterAlt(_localctx, 2);
{
- setState(157);
+ setState(195);
match(DOUBLE_LITERAL);
}
break;
@@ -1484,7 +1763,7 @@ public class StellarParser extends Parser {
_localctx = new IntLiteralContext(_localctx);
enterOuterAlt(_localctx, 3);
{
- setState(158);
+ setState(196);
match(INT_LITERAL);
}
break;
@@ -1492,7 +1771,7 @@ public class StellarParser extends Parser {
_localctx = new VariableContext(_localctx);
enterOuterAlt(_localctx, 4);
{
- setState(159);
+ setState(197);
match(IDENTIFIER);
}
break;
@@ -1500,11 +1779,11 @@ public class StellarParser extends Parser {
_localctx = new ParenArithContext(_localctx);
enterOuterAlt(_localctx, 5);
{
- setState(160);
+ setState(198);
match(LPAREN);
- setState(161);
+ setState(199);
arithmetic_expr(0);
- setState(162);
+ setState(200);
match(RPAREN);
}
break;
@@ -1572,6 +1851,20 @@ public class StellarParser extends Parser {
if ( listener instanceof StellarListener ) ((StellarListener)listener).exitList(this);
}
}
+ public static class MapConstContext extends Identifier_operandContext {
+ public Map_entityContext map_entity() {
+ return getRuleContext(Map_entityContext.class,0);
+ }
+ public MapConstContext(Identifier_operandContext ctx) { copyFrom(ctx); }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).enterMapConst(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).exitMapConst(this);
+ }
+ }
public static class LogicalConstContext extends Identifier_operandContext {
public TerminalNode TRUE() { return getToken(StellarParser.TRUE, 0); }
public TerminalNode FALSE() { return getToken(StellarParser.FALSE, 0); }
@@ -1585,6 +1878,18 @@ public class StellarParser extends Parser {
if ( listener instanceof StellarListener ) ((StellarListener)listener).exitLogicalConst(this);
}
}
+ public static class NullConstContext extends Identifier_operandContext {
+ public TerminalNode NULL() { return getToken(StellarParser.NULL, 0); }
+ public NullConstContext(Identifier_operandContext ctx) { copyFrom(ctx); }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).enterNullConst(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof StellarListener ) ((StellarListener)listener).exitNullConst(this);
+ }
+ }
public static class ExistsFuncContext extends Identifier_operandContext {
public TerminalNode EXISTS() { return getToken(StellarParser.EXISTS, 0); }
public TerminalNode LPAREN() { return getToken(StellarParser.LPAREN, 0); }
@@ -1603,17 +1908,17 @@ public class StellarParser extends Parser {
public final Identifier_operandContext identifier_operand() throws RecognitionException {
Identifier_operandContext _localctx = new Identifier_operandContext(_ctx, getState());
- enterRule(_localctx, 30, RULE_identifier_operand);
+ enterRule(_localctx, 36, RULE_identifier_operand);
int _la;
try {
- setState(174);
+ setState(214);
switch (_input.LA(1)) {
case TRUE:
case FALSE:
_localctx = new LogicalConstContext(_localctx);
enterOuterAlt(_localctx, 1);
{
- setState(166);
+ setState(204);
_la = _input.LA(1);
if ( !(_la==TRUE || _la==FALSE) ) {
_errHandler.recoverInline(this);
@@ -1629,7 +1934,7 @@ public class StellarParser extends Parser {
_localctx = new ArithmeticOperandsContext(_localctx);
enterOuterAlt(_localctx, 2);
{
- setState(167);
+ setState(205);
arithmetic_expr(0);
}
break;
@@ -1637,7 +1942,7 @@ public class StellarParser extends Parser {
_localctx = new StringLiteralContext(_localctx);
enterOuterAlt(_localctx, 3);
{
- setState(168);
+ setState(206);
match(STRING_LITERAL);
}
break;
@@ -1645,21 +1950,37 @@ public class StellarParser extends Parser {
_localctx = new ListContext(_localctx);
enterOuterAlt(_localctx, 4);
{
- setState(169);
+ setState(207);
list_entity();
}
break;
+ case LBRACE:
+ _localctx = new MapConstContext(_localctx);
+ enterOuterAlt(_localctx, 5);
+ {
+ setState(208);
+ map_entity();
+ }
+ break;
+ case NULL:
+ _localctx = new NullConstContext(_localctx);
+ enterOuterAlt(_localctx, 6);
+ {
+ setState(209);
+ match(NULL);
+ }
+ break;
case EXISTS:
_localctx = new ExistsFuncContext(_localctx);
- enterOuterAlt(_localctx, 5);
+ enterOuterAlt(_localctx, 7);
{
- setState(170);
+ setState(210);
match(EXISTS);
- setState(171);
+ setState(211);
match(LPAREN);
- setState(172);
+ setState(212);
match(IDENTIFIER);
- setState(173);
+ setState(213);
match(RPAREN);
}
break;
@@ -1680,30 +2001,37 @@ public class StellarParser extends Parser {
public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
switch (ruleIndex) {
- case 1:
- return transformation_expr_sempred((Transformation_exprContext)_localctx, predIndex);
- case 9:
+ case 3:
+ return comparison_expr_sempred((Comparison_exprContext)_localctx, predIndex);
+ case 10:
return op_list_sempred((Op_listContext)_localctx, predIndex);
- case 11:
- return arithmetic_expr_sempred((Arithmetic_exprContext)_localctx, predIndex);
case 12:
+ return kv_list_sempred((Kv_listContext)_localctx, predIndex);
+ case 14:
+ return arithmetic_expr_sempred((Arithmetic_exprContext)_localctx, predIndex);
+ case 15:
return arithmetic_expr_mul_sempred((Arithmetic_expr_mulContext)_localctx, predIndex);
}
return true;
}
- private boolean transformation_expr_sempred(Transformation_exprContext _localctx, int predIndex) {
+ private boolean comparison_expr_sempred(Comparison_exprContext _localctx, int predIndex) {
switch (predIndex) {
case 0:
- return precpred(_ctx, 6);
- case 1:
return precpred(_ctx, 5);
- case 2:
- return precpred(_ctx, 3);
+ case 1:
+ return precpred(_ctx, 4);
}
return true;
}
private boolean op_list_sempred(Op_listContext _localctx, int predIndex) {
switch (predIndex) {
+ case 2:
+ return precpred(_ctx, 1);
+ }
+ return true;
+ }
+ private boolean kv_list_sempred(Kv_listContext _localctx, int predIndex) {
+ switch (predIndex) {
case 3:
return precpred(_ctx, 1);
}
@@ -1729,59 +2057,75 @@ public class StellarParser extends Parser {
}
public static final String _serializedATN =
- "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\"\u00b3\4\2\t\2\4"+
+ "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\'\u00db\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\3\2\3\2\3"+
- "\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3"+
- "\3\3\3\3\3\3\5\3:\n\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\3H\n\3\f\3\16\3K\13\3\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3"+
- "\4\3\4\3\4\3\4\3\4\5\4]\n\4\3\5\3\5\3\6\3\6\3\7\3\7\3\b\3\b\3\t\3\t\3"+
- "\n\3\n\3\13\3\13\3\13\3\13\3\13\3\13\7\13q\n\13\f\13\16\13t\13\13\3\f"+
- "\3\f\3\f\3\f\3\f\3\f\5\f|\n\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\7\r"+
- "\u0087\n\r\f\r\16\r\u008a\13\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16"+
- "\3\16\7\16\u0095\n\16\f\16\16\16\u0098\13\16\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\5\20\u00a7\n\20\3\21\3\21\3\21"+
- "\3\21\3\21\3\21\3\21\3\21\5\21\u00b1\n\21\3\21\2\6\4\24\30\32\22\2\4\6"+
- "\b\n\f\16\20\22\24\26\30\32\34\36 \2\6\3\2\t\16\3\2\22\23\3\2\24\25\3"+
- "\2\7\b\u00bb\2\"\3\2\2\2\49\3\2\2\2\6\\\3\2\2\2\b^\3\2\2\2\n`\3\2\2\2"+
- "\fb\3\2\2\2\16d\3\2\2\2\20f\3\2\2\2\22h\3\2\2\2\24j\3\2\2\2\26{\3\2\2"+
- "\2\30}\3\2\2\2\32\u008b\3\2\2\2\34\u0099\3\2\2\2\36\u00a6\3\2\2\2 \u00b0"+
- "\3\2\2\2\"#\5\4\3\2#$\7\2\2\3$\3\3\2\2\2%&\b\3\1\2&:\5\6\4\2\'(\7\30\2"+
- "\2()\5\4\3\2)*\7\31\2\2*:\3\2\2\2+:\5\n\6\2,-\7\6\2\2-.\7\30\2\2./\5\4"+
- "\3\2/\60\7\31\2\2\60:\3\2\2\2\61\62\7\21\2\2\62\63\5\4\3\2\63\64\7\17"+
- "\2\2\64\65\5\4\3\2\65\66\7\20\2\2\66\67\5\4\3\2\67:\3\2\2\28:\5\30\r\2"+
- "9%\3\2\2\29\'\3\2\2\29+\3\2\2\29,\3\2\2\29\61\3\2\2\298\3\2\2\2:I\3\2"+
- "\2\2;<\f\b\2\2<=\7\4\2\2=H\5\4\3\t>?\f\7\2\2?@\7\5\2\2@H\5\4\3\bAB\f\5"+
- "\2\2BC\7\17\2\2CD\5\4\3\2DE\7\20\2\2EF\5\4\3\6FH\3\2\2\2G;\3\2\2\2G>\3"+
- "\2\2\2GA\3\2\2\2HK\3\2\2\2IG\3\2\2\2IJ\3\2\2\2J\5\3\2\2\2KI\3\2\2\2LM"+
- "\5\b\5\2MN\5\f\7\2NO\5\b\5\2O]\3\2\2\2PQ\5 \21\2QR\7\32\2\2RS\5 \21\2"+
- "S]\3\2\2\2TU\5 \21\2UV\7\33\2\2VW\5 \21\2W]\3\2\2\2XY\7\30\2\2YZ\5\6\4"+
- "\2Z[\7\31\2\2[]\3\2\2\2\\L\3\2\2\2\\P\3\2\2\2\\T\3\2\2\2\\X\3\2\2\2]\7"+
- "\3\2\2\2^_\5 \21\2_\t\3\2\2\2`a\5 \21\2a\13\3\2\2\2bc\t\2\2\2c\r\3\2\2"+
- "\2de\t\3\2\2e\17\3\2\2\2fg\t\4\2\2g\21\3\2\2\2hi\5\24\13\2i\23\3\2\2\2"+
- "jk\b\13\1\2kl\5 \21\2lr\3\2\2\2mn\f\3\2\2no\7\3\2\2oq\5 \21\2pm\3\2\2"+
- "\2qt\3\2\2\2rp\3\2\2\2rs\3\2\2\2s\25\3\2\2\2tr\3\2\2\2uv\7\26\2\2vw\5"+
- "\24\13\2wx\7\27\2\2x|\3\2\2\2yz\7\26\2\2z|\7\27\2\2{u\3\2\2\2{y\3\2\2"+
- "\2|\27\3\2\2\2}~\b\r\1\2~\177\5\32\16\2\177\u0088\3\2\2\2\u0080\u0081"+
- "\f\4\2\2\u0081\u0082\7\23\2\2\u0082\u0087\5\32\16\2\u0083\u0084\f\3\2"+
- "\2\u0084\u0085\7\22\2\2\u0085\u0087\5\32\16\2\u0086\u0080\3\2\2\2\u0086"+
- "\u0083\3\2\2\2\u0087\u008a\3\2\2\2\u0088\u0086\3\2\2\2\u0088\u0089\3\2"+
- "\2\2\u0089\31\3\2\2\2\u008a\u0088\3\2\2\2\u008b\u008c\b\16\1\2\u008c\u008d"+
- "\5\36\20\2\u008d\u0096\3\2\2\2\u008e\u008f\f\4\2\2\u008f\u0090\7\25\2"+
- "\2\u0090\u0095\5\32\16\5\u0091\u0092\f\3\2\2\u0092\u0093\7\24\2\2\u0093"+
- "\u0095\5\32\16\4\u0094\u008e\3\2\2\2\u0094\u0091\3\2\2\2\u0095\u0098\3"+
- "\2\2\2\u0096\u0094\3\2\2\2\u0096\u0097\3\2\2\2\u0097\33\3\2\2\2\u0098"+
- "\u0096\3\2\2\2\u0099\u009a\7\37\2\2\u009a\u009b\7\30\2\2\u009b\u009c\5"+
- "\22\n\2\u009c\u009d\7\31\2\2\u009d\35\3\2\2\2\u009e\u00a7\5\34\17\2\u009f"+
- "\u00a7\7\36\2\2\u00a0\u00a7\7\35\2\2\u00a1\u00a7\7\37\2\2\u00a2\u00a3"+
- "\7\30\2\2\u00a3\u00a4\5\30\r\2\u00a4\u00a5\7\31\2\2\u00a5\u00a7\3\2\2"+
- "\2\u00a6\u009e\3\2\2\2\u00a6\u009f\3\2\2\2\u00a6\u00a0\3\2\2\2\u00a6\u00a1"+
- "\3\2\2\2\u00a6\u00a2\3\2\2\2\u00a7\37\3\2\2\2\u00a8\u00b1\t\5\2\2\u00a9"+
- "\u00b1\5\30\r\2\u00aa\u00b1\7 \2\2\u00ab\u00b1\5\26\f\2\u00ac\u00ad\7"+
- "\34\2\2\u00ad\u00ae\7\30\2\2\u00ae\u00af\7\37\2\2\u00af\u00b1\7\31\2\2"+
- "\u00b0\u00a8\3\2\2\2\u00b0\u00a9\3\2\2\2\u00b0\u00aa\3\2\2\2\u00b0\u00ab"+
- "\3\2\2\2\u00b0\u00ac\3\2\2\2\u00b1!\3\2\2\2\169GI\\r{\u0086\u0088\u0094"+
- "\u0096\u00a6\u00b0";
+ "\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\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\5\3\64"+
+ "\n\3\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\5\4C\n\4\3\5"+
+ "\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3"+
+ "\5\3\5\3\5\3\5\3\5\5\5\\\n\5\3\5\3\5\3\5\3\5\3\5\3\5\7\5d\n\5\f\5\16\5"+
+ "g\13\5\3\6\3\6\3\7\3\7\3\b\3\b\3\t\3\t\3\n\3\n\3\13\3\13\3\13\3\13\3\13"+
+ "\3\13\5\13y\n\13\3\f\3\f\3\f\3\f\3\f\3\f\7\f\u0081\n\f\f\f\16\f\u0084"+
+ "\13\f\3\r\3\r\3\r\3\r\3\r\3\r\5\r\u008c\n\r\3\16\3\16\3\16\3\16\3\16\3"+
+ "\16\3\16\3\16\3\16\3\16\3\16\7\16\u0099\n\16\f\16\16\16\u009c\13\16\3"+
+ "\17\3\17\3\17\3\17\3\17\3\17\5\17\u00a4\n\17\3\20\3\20\3\20\3\20\3\20"+
+ "\3\20\3\20\3\20\3\20\7\20\u00af\n\20\f\20\16\20\u00b2\13\20\3\21\3\21"+
+ "\3\21\3\21\3\21\3\21\3\21\3\21\3\21\7\21\u00bd\n\21\f\21\16\21\u00c0\13"+
+ "\21\3\22\3\22\3\22\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\5\23\u00cd"+
+ "\n\23\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\5\24\u00d9\n\24"+
+ "\3\24\2\7\b\26\32\36 \25\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&\2"+
+ "\6\3\2\t\16\3\2\25\26\3\2\27\30\3\2\7\b\u00e6\2(\3\2\2\2\4\63\3\2\2\2"+
+ "\6B\3\2\2\2\b[\3\2\2\2\nh\3\2\2\2\fj\3\2\2\2\16l\3\2\2\2\20n\3\2\2\2\22"+
+ "p\3\2\2\2\24x\3\2\2\2\26z\3\2\2\2\30\u008b\3\2\2\2\32\u008d\3\2\2\2\34"+
+ "\u00a3\3\2\2\2\36\u00a5\3\2\2\2 \u00b3\3\2\2\2\"\u00c1\3\2\2\2$\u00cc"+
+ "\3\2\2\2&\u00d8\3\2\2\2()\5\4\3\2)*\7\2\2\3*\3\3\2\2\2+\64\5\6\4\2,-\7"+
+ "\35\2\2-.\5\4\3\2./\7\36\2\2/\64\3\2\2\2\60\64\5\36\20\2\61\64\5\f\7\2"+
+ "\62\64\5\b\5\2\63+\3\2\2\2\63,\3\2\2\2\63\60\3\2\2\2\63\61\3\2\2\2\63"+
+ "\62\3\2\2\2\64\5\3\2\2\2\65\66\5\b\5\2\66\67\7\17\2\2\678\5\4\3\289\7"+
+ "\20\2\29:\5\4\3\2:C\3\2\2\2;<\7\21\2\2<=\5\b\5\2=>\7\22\2\2>?\5\4\3\2"+
+ "?@\7\23\2\2@A\5\4\3\2AC\3\2\2\2B\65\3\2\2\2B;\3\2\2\2C\7\3\2\2\2DE\b\5"+
+ "\1\2EF\5\n\6\2FG\5\16\b\2GH\5\n\6\2H\\\3\2\2\2IJ\5&\24\2JK\7\37\2\2KL"+
+ "\5&\24\2L\\\3\2\2\2MN\5&\24\2NO\7 \2\2OP\5&\24\2P\\\3\2\2\2QR\7\6\2\2"+
+ "RS\7\35\2\2ST\5\b\5\2TU\7\36\2\2U\\\3\2\2\2VW\7\35\2\2WX\5\b\5\2XY\7\36"+
+ "\2\2Y\\\3\2\2\2Z\\\5&\24\2[D\3\2\2\2[I\3\2\2\2[M\3\2\2\2[Q\3\2\2\2[V\3"+
+ "\2\2\2[Z\3\2\2\2\\e\3\2\2\2]^\f\7\2\2^_\7\4\2\2_d\5\b\5\b`a\f\6\2\2ab"+
+ "\7\5\2\2bd\5\b\5\7c]\3\2\2\2c`\3\2\2\2dg\3\2\2\2ec\3\2\2\2ef\3\2\2\2f"+
+ "\t\3\2\2\2ge\3\2\2\2hi\5&\24\2i\13\3\2\2\2jk\5&\24\2k\r\3\2\2\2lm\t\2"+
+ "\2\2m\17\3\2\2\2no\t\3\2\2o\21\3\2\2\2pq\t\4\2\2q\23\3\2\2\2rs\7\35\2"+
+ "\2st\5\26\f\2tu\7\36\2\2uy\3\2\2\2vw\7\35\2\2wy\7\36\2\2xr\3\2\2\2xv\3"+
+ "\2\2\2y\25\3\2\2\2z{\b\f\1\2{|\5&\24\2|\u0082\3\2\2\2}~\f\3\2\2~\177\7"+
+ "\3\2\2\177\u0081\5&\24\2\u0080}\3\2\2\2\u0081\u0084\3\2\2\2\u0082\u0080"+
+ "\3\2\2\2\u0082\u0083\3\2\2\2\u0083\27\3\2\2\2\u0084\u0082\3\2\2\2\u0085"+
+ "\u0086\7\33\2\2\u0086\u0087\5\26\f\2\u0087\u0088\7\34\2\2\u0088\u008c"+
+ "\3\2\2\2\u0089\u008a\7\33\2\2\u008a\u008c\7\34\2\2\u008b\u0085\3\2\2\2"+
+ "\u008b\u0089\3\2\2\2\u008c\31\3\2\2\2\u008d\u008e\b\16\1\2\u008e\u008f"+
+ "\5&\24\2\u008f\u0090\7\20\2\2\u0090\u0091\5\4\3\2\u0091\u009a\3\2\2\2"+
+ "\u0092\u0093\f\3\2\2\u0093\u0094\7\3\2\2\u0094\u0095\5&\24\2\u0095\u0096"+
+ "\7\20\2\2\u0096\u0097\5\4\3\2\u0097\u0099\3\2\2\2\u0098\u0092\3\2\2\2"+
+ "\u0099\u009c\3\2\2\2\u009a\u0098\3\2\2\2\u009a\u009b\3\2\2\2\u009b\33"+
+ "\3\2\2\2\u009c\u009a\3\2\2\2\u009d\u009e\7\31\2\2\u009e\u009f\5\32\16"+
+ "\2\u009f\u00a0\7\32\2\2\u00a0\u00a4\3\2\2\2\u00a1\u00a2\7\31\2\2\u00a2"+
+ "\u00a4\7\32\2\2\u00a3\u009d\3\2\2\2\u00a3\u00a1\3\2\2\2\u00a4\35\3\2\2"+
+ "\2\u00a5\u00a6\b\20\1\2\u00a6\u00a7\5 \21\2\u00a7\u00b0\3\2\2\2\u00a8"+
+ "\u00a9\f\4\2\2\u00a9\u00aa\7\26\2\2\u00aa\u00af\5 \21\2\u00ab\u00ac\f"+
+ "\3\2\2\u00ac\u00ad\7\25\2\2\u00ad\u00af\5 \21\2\u00ae\u00a8\3\2\2\2\u00ae"+
+ "\u00ab\3\2\2\2\u00af\u00b2\3\2\2\2\u00b0\u00ae\3\2\2\2\u00b0\u00b1\3\2"+
+ "\2\2\u00b1\37\3\2\2\2\u00b2\u00b0\3\2\2\2\u00b3\u00b4\b\21\1\2\u00b4\u00b5"+
+ "\5$\23\2\u00b5\u00be\3\2\2\2\u00b6\u00b7\f\4\2\2\u00b7\u00b8\7\30\2\2"+
+ "\u00b8\u00bd\5 \21\5\u00b9\u00ba\f\3\2\2\u00ba\u00bb\7\27\2\2\u00bb\u00bd"+
+ "\5 \21\4\u00bc\u00b6\3\2\2\2\u00bc\u00b9\3\2\2\2\u00bd\u00c0\3\2\2\2\u00be"+
+ "\u00bc\3\2\2\2\u00be\u00bf\3\2\2\2\u00bf!\3\2\2\2\u00c0\u00be\3\2\2\2"+
+ "\u00c1\u00c2\7$\2\2\u00c2\u00c3\5\24\13\2\u00c3#\3\2\2\2\u00c4\u00cd\5"+
+ "\"\22\2\u00c5\u00cd\7#\2\2\u00c6\u00cd\7\"\2\2\u00c7\u00cd\7$\2\2\u00c8"+
+ "\u00c9\7\35\2\2\u00c9\u00ca\5\36\20\2\u00ca\u00cb\7\36\2\2\u00cb\u00cd"+
+ "\3\2\2\2\u00cc\u00c4\3\2\2\2\u00cc\u00c5\3\2\2\2\u00cc\u00c6\3\2\2\2\u00cc"+
+ "\u00c7\3\2\2\2\u00cc\u00c8\3\2\2\2\u00cd%\3\2\2\2\u00ce\u00d9\t\5\2\2"+
+ "\u00cf\u00d9\5\36\20\2\u00d0\u00d9\7%\2\2\u00d1\u00d9\5\30\r\2\u00d2\u00d9"+
+ "\5\34\17\2\u00d3\u00d9\7\24\2\2\u00d4\u00d5\7!\2\2\u00d5\u00d6\7\35\2"+
+ "\2\u00d6\u00d7\7$\2\2\u00d7\u00d9\7\36\2\2\u00d8\u00ce\3\2\2\2\u00d8\u00cf"+
+ "\3\2\2\2\u00d8\u00d0\3\2\2\2\u00d8\u00d1\3\2\2\2\u00d8\u00d2\3\2\2\2\u00d8"+
+ "\u00d3\3\2\2\2\u00d8\u00d4\3\2\2\2\u00d9\'\3\2\2\2\22\63B[cex\u0082\u008b"+
+ "\u009a\u00a3\u00ae\u00b0\u00bc\u00be\u00cc\u00d8";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/1ea8d9ee/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/transformation/FieldTransformationTest.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/transformation/FieldTransformationTest.java b/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/transformation/FieldTransformationTest.java
index fe87c55..ba03b70 100644
--- a/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/transformation/FieldTransformationTest.java
+++ b/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/transformation/FieldTransformationTest.java
@@ -26,6 +26,7 @@ import org.adrianwalker.multilinestring.Multiline;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.metron.common.configuration.FieldTransformer;
import org.apache.metron.common.configuration.SensorParserConfig;
+import org.apache.metron.common.dsl.Context;
import org.json.simple.JSONObject;
import org.junit.Assert;
import org.junit.Test;
@@ -42,6 +43,7 @@ public class FieldTransformationTest {
, List<String> outputField
, Map<String, Object> fieldMappingConfig
, Map<String, Object> sensorConfig
+ , Context context
)
{
return ImmutableMap.of(outputField.get(0), Joiner.on(fieldMappingConfig.get("delim").toString()).join(input.entrySet()));
@@ -132,6 +134,7 @@ public class FieldTransformationTest {
)
)
, c.getParserConfig()
+ , Context.EMPTY_CONTEXT()
)
);
}
@@ -142,7 +145,7 @@ public class FieldTransformationTest {
Assert.assertNotNull(handler);
Assert.assertEquals(ImmutableMap.of("protocol", "TCP")
- ,handler.transform(new JSONObject(ImmutableMap.of("protocol", 6)), c.getParserConfig())
+ ,handler.transform(new JSONObject(ImmutableMap.of("protocol", 6)), c.getParserConfig(), Context.EMPTY_CONTEXT())
);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/1ea8d9ee/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/transformation/RemoveTransformationTest.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/transformation/RemoveTransformationTest.java b/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/transformation/RemoveTransformationTest.java
index fc43406..fcd006d 100644
--- a/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/transformation/RemoveTransformationTest.java
+++ b/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/transformation/RemoveTransformationTest.java
@@ -23,6 +23,7 @@ import org.adrianwalker.multilinestring.Multiline;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.metron.common.configuration.FieldTransformer;
import org.apache.metron.common.configuration.SensorParserConfig;
+import org.apache.metron.common.dsl.Context;
import org.json.simple.JSONObject;
import org.junit.Assert;
import org.junit.Test;
@@ -50,7 +51,7 @@ public class RemoveTransformationTest {
JSONObject input = new JSONObject(new HashMap<String, Object>() {{
put("field1", "foo");
}});
- handler.transformAndUpdate(input, new HashMap<>());
+ handler.transformAndUpdate(input, new HashMap<>(), Context.EMPTY_CONTEXT());
Assert.assertFalse(input.containsKey("field1"));
}
@@ -77,7 +78,7 @@ public class RemoveTransformationTest {
JSONObject input = new JSONObject(new HashMap<String, Object>() {{
put("field1", "foo");
}});
- handler.transformAndUpdate(input, new HashMap<>());
+ handler.transformAndUpdate(input, new HashMap<>(), Context.EMPTY_CONTEXT());
//no removal happened because field2 does not exist
Assert.assertTrue(input.containsKey("field1"));
Assert.assertFalse(input.containsKey("field2"));
@@ -87,7 +88,7 @@ public class RemoveTransformationTest {
put("field1", "foo");
put("field2", "bar");
}});
- handler.transformAndUpdate(input, new HashMap<>());
+ handler.transformAndUpdate(input, new HashMap<>(), Context.EMPTY_CONTEXT());
//no removal happened because field2 != bar
Assert.assertTrue(input.containsKey("field1"));
Assert.assertTrue(input.containsKey("field2"));
@@ -98,7 +99,7 @@ public class RemoveTransformationTest {
put("field2", "foo");
}});
//removal of field1 happens because field2 exists and is 'bar'
- handler.transformAndUpdate(input, new HashMap<>());
+ handler.transformAndUpdate(input, new HashMap<>(), Context.EMPTY_CONTEXT());
Assert.assertFalse(input.containsKey("field1"));
Assert.assertTrue(input.containsKey("field2"));
}
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/1ea8d9ee/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/transformation/StellarTransformationTest.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/transformation/StellarTransformationTest.java b/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/transformation/StellarTransformationTest.java
index 7cb1879..f01e042 100644
--- a/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/transformation/StellarTransformationTest.java
+++ b/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/transformation/StellarTransformationTest.java
@@ -23,6 +23,7 @@ import org.adrianwalker.multilinestring.Multiline;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.metron.common.configuration.FieldTransformer;
import org.apache.metron.common.configuration.SensorParserConfig;
+import org.apache.metron.common.dsl.Context;
import org.json.simple.JSONObject;
import org.junit.Assert;
import org.junit.Test;
@@ -57,7 +58,7 @@ public class StellarTransformationTest {
JSONObject input = new JSONObject(new HashMap<String, Object>() {{
put("timestamp", "2016-01-05 17:02:30");
}});
- handler.transformAndUpdate(input, new HashMap<>());
+ handler.transformAndUpdate(input, new HashMap<>(), Context.EMPTY_CONTEXT());
long expected = 1452013350000L;
Assert.assertEquals(expected, input.get("utc_timestamp"));
Assert.assertTrue(input.containsKey("timestamp"));
@@ -75,7 +76,7 @@ public class StellarTransformationTest {
//no input fields => no transformation
JSONObject input = new JSONObject(new HashMap<String, Object>() {{
}});
- handler.transformAndUpdate(input, new HashMap<>());
+ handler.transformAndUpdate(input, new HashMap<>(), Context.EMPTY_CONTEXT());
Assert.assertFalse(input.containsKey("utc_timestamp"));
Assert.assertTrue(input.isEmpty());
}
@@ -126,7 +127,7 @@ public class StellarTransformationTest {
//looking up the data center in portland, which doesn't exist in the map, so we default to UTC
put("dc", "portland");
}});
- handler.transformAndUpdate(input, c.getParserConfig());
+ handler.transformAndUpdate(input, c.getParserConfig(), Context.EMPTY_CONTEXT());
long expected = 1452013350000L;
Assert.assertEquals(expected, input.get("utc_timestamp"));
Assert.assertEquals("caseystella.com", input.get("url_host"));
@@ -141,7 +142,7 @@ public class StellarTransformationTest {
put("url", "https://caseystella.com/blog");
put("dc", "london");
}});
- handler.transformAndUpdate(input, c.getParserConfig());
+ handler.transformAndUpdate(input, c.getParserConfig(), Context.EMPTY_CONTEXT());
long expected = 1452013350000L;
Assert.assertEquals(expected, input.get("utc_timestamp"));
Assert.assertEquals("caseystella.com", input.get("url_host"));
@@ -155,7 +156,7 @@ public class StellarTransformationTest {
put("timestamp", "2016-01-05 17:02:30");
put("url", "https://caseystella.com/blog");
}});
- handler.transformAndUpdate(input, c.getParserConfig());
+ handler.transformAndUpdate(input, c.getParserConfig(), Context.EMPTY_CONTEXT());
long expected = 1452013350000L;
Assert.assertEquals(expected, input.get("utc_timestamp"));
Assert.assertEquals("caseystella.com", input.get("url_host"));
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/1ea8d9ee/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/validation/BaseValidationTest.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/validation/BaseValidationTest.java b/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/validation/BaseValidationTest.java
index ab78c3c..22cb47a 100644
--- a/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/validation/BaseValidationTest.java
+++ b/metron-platform/metron-common/src/test/java/org/apache/metron/common/field/validation/BaseValidationTest.java
@@ -21,6 +21,7 @@ package org.apache.metron.common.field.validation;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.metron.common.configuration.Configurations;
import org.apache.metron.common.configuration.FieldValidator;
+import org.apache.metron.common.dsl.Context;
import org.json.simple.JSONObject;
import java.io.IOException;
@@ -42,7 +43,9 @@ public class BaseValidationTest {
FieldValidator validator = getValidator(configurations);
return validator.isValid(new JSONObject(input)
- ,configurations.getGlobalConfig()
+ ,configurations.getGlobalConfig()
+ , Context.EMPTY_CONTEXT()
+
);
}
}