From eee6ce938f840b20ed0bcff34f62662a99b3450e Mon Sep 17 00:00:00 2001 From: hellozepp Date: Tue, 28 Feb 2023 16:59:25 +0800 Subject: [PATCH] fix the errorIfExists keywords not match for DSLSQLLexer --- .../autosuggest/statement/SaveSuggester.scala | 2 +- .../java/streaming/dsl/parser/DSLSQL.interp | 2 +- .../java/streaming/dsl/parser/DSLSQL.tokens | 2 +- .../dsl/parser/DSLSQLBaseListener.java | 2 +- .../dsl/parser/DSLSQLBaseVisitor.java | 226 ++++++++++++++++++ .../streaming/dsl/parser/DSLSQLLexer.interp | 4 +- .../streaming/dsl/parser/DSLSQLLexer.java | 8 +- .../streaming/dsl/parser/DSLSQLLexer.tokens | 2 +- .../streaming/dsl/parser/DSLSQLListener.java | 2 +- .../streaming/dsl/parser/DSLSQLParser.java | 164 ++++++++++++- .../streaming/dsl/parser/DSLSQLVisitor.java | 195 +++++++++++++++ streamingpro-dsl/src/main/resources/DSLSQL.g4 | 12 +- 12 files changed, 598 insertions(+), 23 deletions(-) create mode 100644 streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLBaseVisitor.java create mode 100644 streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLVisitor.java diff --git a/external/mlsql-autosuggest/src/main/java/tech/mlsql/autosuggest/statement/SaveSuggester.scala b/external/mlsql-autosuggest/src/main/java/tech/mlsql/autosuggest/statement/SaveSuggester.scala index 063414c0b..97912b71e 100644 --- a/external/mlsql-autosuggest/src/main/java/tech/mlsql/autosuggest/statement/SaveSuggester.scala +++ b/external/mlsql-autosuggest/src/main/java/tech/mlsql/autosuggest/statement/SaveSuggester.scala @@ -100,7 +100,7 @@ private object SaveModeSuggester { DSLSQLLexer.SAVE, DSLSQLLexer.OVERWRITE, DSLSQLLexer.APPEND, - DSLSQLLexer.ERRORIfExists, + DSLSQLLexer.ERRORIFEXISTS, DSLSQLLexer.IGNORE) val SAVE_MODE_SUGGESTIONS = List( diff --git a/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQL.interp b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQL.interp index 009cc0227..8ef8704e3 100644 --- a/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQL.interp +++ b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQL.interp @@ -32,7 +32,7 @@ null null 'overwrite' 'append' -'errorIfExists' +'errorifexists' 'ignore' null null diff --git a/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQL.tokens b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQL.tokens index 83e361e04..4ea27f312 100644 --- a/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQL.tokens +++ b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQL.tokens @@ -74,7 +74,7 @@ UNRECOGNIZED=45 'where'=29 'overwrite'=31 'append'=32 -'errorIfExists'=33 +'errorifexists'=33 'ignore'=34 '!'=40 '/**/'=42 diff --git a/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLBaseListener.java b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLBaseListener.java index e704474cb..791a6d5b2 100644 --- a/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLBaseListener.java +++ b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLBaseListener.java @@ -1,4 +1,4 @@ -// Generated from DSLSQL.g4 by ANTLR 4.7.1 +// Generated from /opt/projects/kyligence/byzerCP/byzer-lang/streamingpro-dsl/src/main/resources/DSLSQL.g4 by ANTLR 4.7 package streaming.dsl.parser; diff --git a/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLBaseVisitor.java b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLBaseVisitor.java new file mode 100644 index 000000000..6b50ed127 --- /dev/null +++ b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLBaseVisitor.java @@ -0,0 +1,226 @@ +// Generated from /opt/projects/kyligence/byzerCP/byzer-lang/streamingpro-dsl/src/main/resources/DSLSQL.g4 by ANTLR 4.7 + +package streaming.dsl.parser; + +import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; + +/** + * This class provides an empty implementation of {@link DSLSQLVisitor}, + * which can be extended to create a visitor which only needs to handle a subset + * of the available methods. + * + * @param The return type of the visit operation. Use {@link Void} for + * operations with no return type. + */ +public class DSLSQLBaseVisitor extends AbstractParseTreeVisitor implements DSLSQLVisitor { + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitStatement(DSLSQLParser.StatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitSql(DSLSQLParser.SqlContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAs(DSLSQLParser.AsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitInto(DSLSQLParser.IntoContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitSaveMode(DSLSQLParser.SaveModeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitWhere(DSLSQLParser.WhereContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitWhereExpressions(DSLSQLParser.WhereExpressionsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitOverwrite(DSLSQLParser.OverwriteContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAppend(DSLSQLParser.AppendContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitErrorIfExists(DSLSQLParser.ErrorIfExistsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitIgnore(DSLSQLParser.IgnoreContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitBooleanExpression(DSLSQLParser.BooleanExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExpression(DSLSQLParser.ExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitEnder(DSLSQLParser.EnderContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFormat(DSLSQLParser.FormatContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitPath(DSLSQLParser.PathContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitCommandValue(DSLSQLParser.CommandValueContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitRawCommandValue(DSLSQLParser.RawCommandValueContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitSetValue(DSLSQLParser.SetValueContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitSetKey(DSLSQLParser.SetKeyContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitDb(DSLSQLParser.DbContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAsTableName(DSLSQLParser.AsTableNameContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitTableName(DSLSQLParser.TableNameContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFunctionName(DSLSQLParser.FunctionNameContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitColGroup(DSLSQLParser.ColGroupContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitCol(DSLSQLParser.ColContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitQualifiedName(DSLSQLParser.QualifiedNameContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitIdentifier(DSLSQLParser.IdentifierContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitStrictIdentifier(DSLSQLParser.StrictIdentifierContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitQuotedIdentifier(DSLSQLParser.QuotedIdentifierContext ctx) { return visitChildren(ctx); } +} \ No newline at end of file diff --git a/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLLexer.interp b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLLexer.interp index f9809a3d2..d831630b5 100644 --- a/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLLexer.interp +++ b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLLexer.interp @@ -32,7 +32,7 @@ null null 'overwrite' 'append' -'errorIfExists' +'errorifexists' 'ignore' null null @@ -151,4 +151,4 @@ mode names: DEFAULT_MODE atn: -[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 47, 422, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 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, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 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, 22, 3, 22, 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, 24, 3, 24, 3, 24, 3, 24, 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, 26, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 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, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 5, 31, 266, 10, 31, 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, 34, 3, 34, 3, 34, 3, 34, 3, 34, 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, 36, 3, 36, 3, 36, 3, 36, 7, 36, 310, 10, 36, 12, 36, 14, 36, 313, 11, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 7, 36, 320, 10, 36, 12, 36, 14, 36, 323, 11, 36, 3, 36, 5, 36, 326, 10, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 7, 37, 334, 10, 37, 12, 37, 14, 37, 337, 11, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 6, 38, 346, 10, 38, 13, 38, 14, 38, 347, 3, 39, 3, 39, 3, 39, 3, 39, 7, 39, 354, 10, 39, 12, 39, 14, 39, 357, 11, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 6, 42, 369, 10, 42, 13, 42, 14, 42, 370, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 3, 44, 7, 44, 379, 10, 44, 12, 44, 14, 44, 382, 11, 44, 3, 44, 5, 44, 385, 10, 44, 3, 44, 5, 44, 388, 10, 44, 3, 44, 3, 44, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 7, 46, 404, 10, 46, 12, 46, 14, 46, 407, 11, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 47, 6, 47, 415, 10, 47, 13, 47, 14, 47, 416, 3, 47, 3, 47, 3, 48, 3, 48, 4, 335, 405, 2, 49, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 77, 40, 79, 2, 81, 2, 83, 41, 85, 42, 87, 43, 89, 44, 91, 45, 93, 46, 95, 47, 3, 2, 10, 4, 2, 41, 41, 94, 94, 4, 2, 36, 36, 94, 94, 3, 2, 45, 45, 3, 2, 98, 98, 3, 2, 50, 59, 4, 2, 67, 92, 99, 124, 4, 2, 12, 12, 15, 15, 5, 2, 11, 12, 15, 15, 34, 34, 2, 439, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 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, 29, 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, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 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, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 3, 97, 3, 2, 2, 2, 5, 99, 3, 2, 2, 2, 7, 101, 3, 2, 2, 2, 9, 103, 3, 2, 2, 2, 11, 107, 3, 2, 2, 2, 13, 109, 3, 2, 2, 2, 15, 111, 3, 2, 2, 2, 17, 113, 3, 2, 2, 2, 19, 115, 3, 2, 2, 2, 21, 117, 3, 2, 2, 2, 23, 119, 3, 2, 2, 2, 25, 122, 3, 2, 2, 2, 27, 127, 3, 2, 2, 2, 29, 132, 3, 2, 2, 2, 31, 137, 3, 2, 2, 2, 33, 144, 3, 2, 2, 2, 35, 151, 3, 2, 2, 2, 37, 158, 3, 2, 2, 2, 39, 163, 3, 2, 2, 2, 41, 171, 3, 2, 2, 2, 43, 175, 3, 2, 2, 2, 45, 183, 3, 2, 2, 2, 47, 189, 3, 2, 2, 2, 49, 193, 3, 2, 2, 2, 51, 201, 3, 2, 2, 2, 53, 210, 3, 2, 2, 2, 55, 221, 3, 2, 2, 2, 57, 229, 3, 2, 2, 2, 59, 237, 3, 2, 2, 2, 61, 265, 3, 2, 2, 2, 63, 267, 3, 2, 2, 2, 65, 277, 3, 2, 2, 2, 67, 284, 3, 2, 2, 2, 69, 298, 3, 2, 2, 2, 71, 325, 3, 2, 2, 2, 73, 327, 3, 2, 2, 2, 75, 345, 3, 2, 2, 2, 77, 349, 3, 2, 2, 2, 79, 360, 3, 2, 2, 2, 81, 362, 3, 2, 2, 2, 83, 364, 3, 2, 2, 2, 85, 372, 3, 2, 2, 2, 87, 374, 3, 2, 2, 2, 89, 391, 3, 2, 2, 2, 91, 398, 3, 2, 2, 2, 93, 414, 3, 2, 2, 2, 95, 420, 3, 2, 2, 2, 97, 98, 7, 48, 2, 2, 98, 4, 3, 2, 2, 2, 99, 100, 7, 61, 2, 2, 100, 6, 3, 2, 2, 2, 101, 102, 7, 63, 2, 2, 102, 8, 3, 2, 2, 2, 103, 104, 7, 99, 2, 2, 104, 105, 7, 112, 2, 2, 105, 106, 7, 102, 2, 2, 106, 10, 3, 2, 2, 2, 107, 108, 7, 47, 2, 2, 108, 12, 3, 2, 2, 2, 109, 110, 7, 49, 2, 2, 110, 14, 3, 2, 2, 2, 111, 112, 7, 64, 2, 2, 112, 16, 3, 2, 2, 2, 113, 114, 7, 62, 2, 2, 114, 18, 3, 2, 2, 2, 115, 116, 7, 128, 2, 2, 116, 20, 3, 2, 2, 2, 117, 118, 7, 46, 2, 2, 118, 22, 3, 2, 2, 2, 119, 120, 7, 99, 2, 2, 120, 121, 7, 117, 2, 2, 121, 24, 3, 2, 2, 2, 122, 123, 7, 107, 2, 2, 123, 124, 7, 112, 2, 2, 124, 125, 7, 118, 2, 2, 125, 126, 7, 113, 2, 2, 126, 26, 3, 2, 2, 2, 127, 128, 7, 110, 2, 2, 128, 129, 7, 113, 2, 2, 129, 130, 7, 99, 2, 2, 130, 131, 7, 102, 2, 2, 131, 28, 3, 2, 2, 2, 132, 133, 7, 117, 2, 2, 133, 134, 7, 99, 2, 2, 134, 135, 7, 120, 2, 2, 135, 136, 7, 103, 2, 2, 136, 30, 3, 2, 2, 2, 137, 138, 7, 117, 2, 2, 138, 139, 7, 103, 2, 2, 139, 140, 7, 110, 2, 2, 140, 141, 7, 103, 2, 2, 141, 142, 7, 101, 2, 2, 142, 143, 7, 118, 2, 2, 143, 32, 3, 2, 2, 2, 144, 145, 7, 107, 2, 2, 145, 146, 7, 112, 2, 2, 146, 147, 7, 117, 2, 2, 147, 148, 7, 103, 2, 2, 148, 149, 7, 116, 2, 2, 149, 150, 7, 118, 2, 2, 150, 34, 3, 2, 2, 2, 151, 152, 7, 101, 2, 2, 152, 153, 7, 116, 2, 2, 153, 154, 7, 103, 2, 2, 154, 155, 7, 99, 2, 2, 155, 156, 7, 118, 2, 2, 156, 157, 7, 103, 2, 2, 157, 36, 3, 2, 2, 2, 158, 159, 7, 102, 2, 2, 159, 160, 7, 116, 2, 2, 160, 161, 7, 113, 2, 2, 161, 162, 7, 114, 2, 2, 162, 38, 3, 2, 2, 2, 163, 164, 7, 116, 2, 2, 164, 165, 7, 103, 2, 2, 165, 166, 7, 104, 2, 2, 166, 167, 7, 116, 2, 2, 167, 168, 7, 103, 2, 2, 168, 169, 7, 117, 2, 2, 169, 170, 7, 106, 2, 2, 170, 40, 3, 2, 2, 2, 171, 172, 7, 117, 2, 2, 172, 173, 7, 103, 2, 2, 173, 174, 7, 118, 2, 2, 174, 42, 3, 2, 2, 2, 175, 176, 7, 101, 2, 2, 176, 177, 7, 113, 2, 2, 177, 178, 7, 112, 2, 2, 178, 179, 7, 112, 2, 2, 179, 180, 7, 103, 2, 2, 180, 181, 7, 101, 2, 2, 181, 182, 7, 118, 2, 2, 182, 44, 3, 2, 2, 2, 183, 184, 7, 118, 2, 2, 184, 185, 7, 116, 2, 2, 185, 186, 7, 99, 2, 2, 186, 187, 7, 107, 2, 2, 187, 188, 7, 112, 2, 2, 188, 46, 3, 2, 2, 2, 189, 190, 7, 116, 2, 2, 190, 191, 7, 119, 2, 2, 191, 192, 7, 112, 2, 2, 192, 48, 3, 2, 2, 2, 193, 194, 7, 114, 2, 2, 194, 195, 7, 116, 2, 2, 195, 196, 7, 103, 2, 2, 196, 197, 7, 102, 2, 2, 197, 198, 7, 107, 2, 2, 198, 199, 7, 101, 2, 2, 199, 200, 7, 118, 2, 2, 200, 50, 3, 2, 2, 2, 201, 202, 7, 116, 2, 2, 202, 203, 7, 103, 2, 2, 203, 204, 7, 105, 2, 2, 204, 205, 7, 107, 2, 2, 205, 206, 7, 117, 2, 2, 206, 207, 7, 118, 2, 2, 207, 208, 7, 103, 2, 2, 208, 209, 7, 116, 2, 2, 209, 52, 3, 2, 2, 2, 210, 211, 7, 119, 2, 2, 211, 212, 7, 112, 2, 2, 212, 213, 7, 116, 2, 2, 213, 214, 7, 103, 2, 2, 214, 215, 7, 105, 2, 2, 215, 216, 7, 107, 2, 2, 216, 217, 7, 117, 2, 2, 217, 218, 7, 118, 2, 2, 218, 219, 7, 103, 2, 2, 219, 220, 7, 116, 2, 2, 220, 54, 3, 2, 2, 2, 221, 222, 7, 107, 2, 2, 222, 223, 7, 112, 2, 2, 223, 224, 7, 101, 2, 2, 224, 225, 7, 110, 2, 2, 225, 226, 7, 119, 2, 2, 226, 227, 7, 102, 2, 2, 227, 228, 7, 103, 2, 2, 228, 56, 3, 2, 2, 2, 229, 230, 7, 113, 2, 2, 230, 231, 7, 114, 2, 2, 231, 232, 7, 118, 2, 2, 232, 233, 7, 107, 2, 2, 233, 234, 7, 113, 2, 2, 234, 235, 7, 112, 2, 2, 235, 236, 7, 117, 2, 2, 236, 58, 3, 2, 2, 2, 237, 238, 7, 121, 2, 2, 238, 239, 7, 106, 2, 2, 239, 240, 7, 103, 2, 2, 240, 241, 7, 116, 2, 2, 241, 242, 7, 103, 2, 2, 242, 60, 3, 2, 2, 2, 243, 244, 7, 114, 2, 2, 244, 245, 7, 99, 2, 2, 245, 246, 7, 116, 2, 2, 246, 247, 7, 118, 2, 2, 247, 248, 7, 107, 2, 2, 248, 249, 7, 118, 2, 2, 249, 250, 7, 107, 2, 2, 250, 251, 7, 113, 2, 2, 251, 252, 7, 112, 2, 2, 252, 253, 7, 68, 2, 2, 253, 266, 7, 123, 2, 2, 254, 255, 7, 114, 2, 2, 255, 256, 7, 99, 2, 2, 256, 257, 7, 116, 2, 2, 257, 258, 7, 118, 2, 2, 258, 259, 7, 107, 2, 2, 259, 260, 7, 118, 2, 2, 260, 261, 7, 107, 2, 2, 261, 262, 7, 113, 2, 2, 262, 263, 7, 112, 2, 2, 263, 264, 7, 100, 2, 2, 264, 266, 7, 123, 2, 2, 265, 243, 3, 2, 2, 2, 265, 254, 3, 2, 2, 2, 266, 62, 3, 2, 2, 2, 267, 268, 7, 113, 2, 2, 268, 269, 7, 120, 2, 2, 269, 270, 7, 103, 2, 2, 270, 271, 7, 116, 2, 2, 271, 272, 7, 121, 2, 2, 272, 273, 7, 116, 2, 2, 273, 274, 7, 107, 2, 2, 274, 275, 7, 118, 2, 2, 275, 276, 7, 103, 2, 2, 276, 64, 3, 2, 2, 2, 277, 278, 7, 99, 2, 2, 278, 279, 7, 114, 2, 2, 279, 280, 7, 114, 2, 2, 280, 281, 7, 103, 2, 2, 281, 282, 7, 112, 2, 2, 282, 283, 7, 102, 2, 2, 283, 66, 3, 2, 2, 2, 284, 285, 7, 103, 2, 2, 285, 286, 7, 116, 2, 2, 286, 287, 7, 116, 2, 2, 287, 288, 7, 113, 2, 2, 288, 289, 7, 116, 2, 2, 289, 290, 7, 75, 2, 2, 290, 291, 7, 104, 2, 2, 291, 292, 7, 71, 2, 2, 292, 293, 7, 122, 2, 2, 293, 294, 7, 107, 2, 2, 294, 295, 7, 117, 2, 2, 295, 296, 7, 118, 2, 2, 296, 297, 7, 117, 2, 2, 297, 68, 3, 2, 2, 2, 298, 299, 7, 107, 2, 2, 299, 300, 7, 105, 2, 2, 300, 301, 7, 112, 2, 2, 301, 302, 7, 113, 2, 2, 302, 303, 7, 116, 2, 2, 303, 304, 7, 103, 2, 2, 304, 70, 3, 2, 2, 2, 305, 311, 7, 41, 2, 2, 306, 310, 10, 2, 2, 2, 307, 308, 7, 94, 2, 2, 308, 310, 11, 2, 2, 2, 309, 306, 3, 2, 2, 2, 309, 307, 3, 2, 2, 2, 310, 313, 3, 2, 2, 2, 311, 309, 3, 2, 2, 2, 311, 312, 3, 2, 2, 2, 312, 314, 3, 2, 2, 2, 313, 311, 3, 2, 2, 2, 314, 326, 7, 41, 2, 2, 315, 321, 7, 36, 2, 2, 316, 320, 10, 3, 2, 2, 317, 318, 7, 94, 2, 2, 318, 320, 11, 2, 2, 2, 319, 316, 3, 2, 2, 2, 319, 317, 3, 2, 2, 2, 320, 323, 3, 2, 2, 2, 321, 319, 3, 2, 2, 2, 321, 322, 3, 2, 2, 2, 322, 324, 3, 2, 2, 2, 323, 321, 3, 2, 2, 2, 324, 326, 7, 36, 2, 2, 325, 305, 3, 2, 2, 2, 325, 315, 3, 2, 2, 2, 326, 72, 3, 2, 2, 2, 327, 328, 7, 41, 2, 2, 328, 329, 7, 41, 2, 2, 329, 330, 7, 41, 2, 2, 330, 331, 3, 2, 2, 2, 331, 335, 10, 4, 2, 2, 332, 334, 11, 2, 2, 2, 333, 332, 3, 2, 2, 2, 334, 337, 3, 2, 2, 2, 335, 336, 3, 2, 2, 2, 335, 333, 3, 2, 2, 2, 336, 338, 3, 2, 2, 2, 337, 335, 3, 2, 2, 2, 338, 339, 7, 41, 2, 2, 339, 340, 7, 41, 2, 2, 340, 341, 7, 41, 2, 2, 341, 74, 3, 2, 2, 2, 342, 346, 5, 81, 41, 2, 343, 346, 5, 79, 40, 2, 344, 346, 7, 97, 2, 2, 345, 342, 3, 2, 2, 2, 345, 343, 3, 2, 2, 2, 345, 344, 3, 2, 2, 2, 346, 347, 3, 2, 2, 2, 347, 345, 3, 2, 2, 2, 347, 348, 3, 2, 2, 2, 348, 76, 3, 2, 2, 2, 349, 355, 7, 98, 2, 2, 350, 354, 10, 5, 2, 2, 351, 352, 7, 98, 2, 2, 352, 354, 7, 98, 2, 2, 353, 350, 3, 2, 2, 2, 353, 351, 3, 2, 2, 2, 354, 357, 3, 2, 2, 2, 355, 353, 3, 2, 2, 2, 355, 356, 3, 2, 2, 2, 356, 358, 3, 2, 2, 2, 357, 355, 3, 2, 2, 2, 358, 359, 7, 98, 2, 2, 359, 78, 3, 2, 2, 2, 360, 361, 9, 6, 2, 2, 361, 80, 3, 2, 2, 2, 362, 363, 9, 7, 2, 2, 363, 82, 3, 2, 2, 2, 364, 368, 5, 85, 43, 2, 365, 369, 5, 81, 41, 2, 366, 369, 5, 79, 40, 2, 367, 369, 7, 97, 2, 2, 368, 365, 3, 2, 2, 2, 368, 366, 3, 2, 2, 2, 368, 367, 3, 2, 2, 2, 369, 370, 3, 2, 2, 2, 370, 368, 3, 2, 2, 2, 370, 371, 3, 2, 2, 2, 371, 84, 3, 2, 2, 2, 372, 373, 7, 35, 2, 2, 373, 86, 3, 2, 2, 2, 374, 375, 7, 47, 2, 2, 375, 376, 7, 47, 2, 2, 376, 380, 3, 2, 2, 2, 377, 379, 10, 8, 2, 2, 378, 377, 3, 2, 2, 2, 379, 382, 3, 2, 2, 2, 380, 378, 3, 2, 2, 2, 380, 381, 3, 2, 2, 2, 381, 384, 3, 2, 2, 2, 382, 380, 3, 2, 2, 2, 383, 385, 7, 15, 2, 2, 384, 383, 3, 2, 2, 2, 384, 385, 3, 2, 2, 2, 385, 387, 3, 2, 2, 2, 386, 388, 7, 12, 2, 2, 387, 386, 3, 2, 2, 2, 387, 388, 3, 2, 2, 2, 388, 389, 3, 2, 2, 2, 389, 390, 8, 44, 2, 2, 390, 88, 3, 2, 2, 2, 391, 392, 7, 49, 2, 2, 392, 393, 7, 44, 2, 2, 393, 394, 7, 44, 2, 2, 394, 395, 7, 49, 2, 2, 395, 396, 3, 2, 2, 2, 396, 397, 8, 45, 2, 2, 397, 90, 3, 2, 2, 2, 398, 399, 7, 49, 2, 2, 399, 400, 7, 44, 2, 2, 400, 401, 3, 2, 2, 2, 401, 405, 10, 4, 2, 2, 402, 404, 11, 2, 2, 2, 403, 402, 3, 2, 2, 2, 404, 407, 3, 2, 2, 2, 405, 406, 3, 2, 2, 2, 405, 403, 3, 2, 2, 2, 406, 408, 3, 2, 2, 2, 407, 405, 3, 2, 2, 2, 408, 409, 7, 44, 2, 2, 409, 410, 7, 49, 2, 2, 410, 411, 3, 2, 2, 2, 411, 412, 8, 46, 2, 2, 412, 92, 3, 2, 2, 2, 413, 415, 9, 9, 2, 2, 414, 413, 3, 2, 2, 2, 415, 416, 3, 2, 2, 2, 416, 414, 3, 2, 2, 2, 416, 417, 3, 2, 2, 2, 417, 418, 3, 2, 2, 2, 418, 419, 8, 47, 2, 2, 419, 94, 3, 2, 2, 2, 420, 421, 11, 2, 2, 2, 421, 96, 3, 2, 2, 2, 21, 2, 265, 309, 311, 319, 321, 325, 335, 345, 347, 353, 355, 368, 370, 380, 384, 387, 405, 416, 3, 2, 3, 2] \ No newline at end of file +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 47, 422, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 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, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 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, 22, 3, 22, 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, 24, 3, 24, 3, 24, 3, 24, 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, 26, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 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, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 5, 31, 266, 10, 31, 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, 34, 3, 34, 3, 34, 3, 34, 3, 34, 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, 36, 3, 36, 3, 36, 3, 36, 7, 36, 310, 10, 36, 12, 36, 14, 36, 313, 11, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 7, 36, 320, 10, 36, 12, 36, 14, 36, 323, 11, 36, 3, 36, 5, 36, 326, 10, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 7, 37, 334, 10, 37, 12, 37, 14, 37, 337, 11, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 6, 38, 346, 10, 38, 13, 38, 14, 38, 347, 3, 39, 3, 39, 3, 39, 3, 39, 7, 39, 354, 10, 39, 12, 39, 14, 39, 357, 11, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 6, 42, 369, 10, 42, 13, 42, 14, 42, 370, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 3, 44, 7, 44, 379, 10, 44, 12, 44, 14, 44, 382, 11, 44, 3, 44, 5, 44, 385, 10, 44, 3, 44, 5, 44, 388, 10, 44, 3, 44, 3, 44, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 7, 46, 404, 10, 46, 12, 46, 14, 46, 407, 11, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 47, 6, 47, 415, 10, 47, 13, 47, 14, 47, 416, 3, 47, 3, 47, 3, 48, 3, 48, 4, 335, 405, 2, 49, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 77, 40, 79, 2, 81, 2, 83, 41, 85, 42, 87, 43, 89, 44, 91, 45, 93, 46, 95, 47, 3, 2, 10, 4, 2, 41, 41, 94, 94, 4, 2, 36, 36, 94, 94, 3, 2, 45, 45, 3, 2, 98, 98, 3, 2, 50, 59, 4, 2, 67, 92, 99, 124, 4, 2, 12, 12, 15, 15, 5, 2, 11, 12, 15, 15, 34, 34, 2, 439, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 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, 29, 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, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 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, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 3, 97, 3, 2, 2, 2, 5, 99, 3, 2, 2, 2, 7, 101, 3, 2, 2, 2, 9, 103, 3, 2, 2, 2, 11, 107, 3, 2, 2, 2, 13, 109, 3, 2, 2, 2, 15, 111, 3, 2, 2, 2, 17, 113, 3, 2, 2, 2, 19, 115, 3, 2, 2, 2, 21, 117, 3, 2, 2, 2, 23, 119, 3, 2, 2, 2, 25, 122, 3, 2, 2, 2, 27, 127, 3, 2, 2, 2, 29, 132, 3, 2, 2, 2, 31, 137, 3, 2, 2, 2, 33, 144, 3, 2, 2, 2, 35, 151, 3, 2, 2, 2, 37, 158, 3, 2, 2, 2, 39, 163, 3, 2, 2, 2, 41, 171, 3, 2, 2, 2, 43, 175, 3, 2, 2, 2, 45, 183, 3, 2, 2, 2, 47, 189, 3, 2, 2, 2, 49, 193, 3, 2, 2, 2, 51, 201, 3, 2, 2, 2, 53, 210, 3, 2, 2, 2, 55, 221, 3, 2, 2, 2, 57, 229, 3, 2, 2, 2, 59, 237, 3, 2, 2, 2, 61, 265, 3, 2, 2, 2, 63, 267, 3, 2, 2, 2, 65, 277, 3, 2, 2, 2, 67, 284, 3, 2, 2, 2, 69, 298, 3, 2, 2, 2, 71, 325, 3, 2, 2, 2, 73, 327, 3, 2, 2, 2, 75, 345, 3, 2, 2, 2, 77, 349, 3, 2, 2, 2, 79, 360, 3, 2, 2, 2, 81, 362, 3, 2, 2, 2, 83, 364, 3, 2, 2, 2, 85, 372, 3, 2, 2, 2, 87, 374, 3, 2, 2, 2, 89, 391, 3, 2, 2, 2, 91, 398, 3, 2, 2, 2, 93, 414, 3, 2, 2, 2, 95, 420, 3, 2, 2, 2, 97, 98, 7, 48, 2, 2, 98, 4, 3, 2, 2, 2, 99, 100, 7, 61, 2, 2, 100, 6, 3, 2, 2, 2, 101, 102, 7, 63, 2, 2, 102, 8, 3, 2, 2, 2, 103, 104, 7, 99, 2, 2, 104, 105, 7, 112, 2, 2, 105, 106, 7, 102, 2, 2, 106, 10, 3, 2, 2, 2, 107, 108, 7, 47, 2, 2, 108, 12, 3, 2, 2, 2, 109, 110, 7, 49, 2, 2, 110, 14, 3, 2, 2, 2, 111, 112, 7, 64, 2, 2, 112, 16, 3, 2, 2, 2, 113, 114, 7, 62, 2, 2, 114, 18, 3, 2, 2, 2, 115, 116, 7, 128, 2, 2, 116, 20, 3, 2, 2, 2, 117, 118, 7, 46, 2, 2, 118, 22, 3, 2, 2, 2, 119, 120, 7, 99, 2, 2, 120, 121, 7, 117, 2, 2, 121, 24, 3, 2, 2, 2, 122, 123, 7, 107, 2, 2, 123, 124, 7, 112, 2, 2, 124, 125, 7, 118, 2, 2, 125, 126, 7, 113, 2, 2, 126, 26, 3, 2, 2, 2, 127, 128, 7, 110, 2, 2, 128, 129, 7, 113, 2, 2, 129, 130, 7, 99, 2, 2, 130, 131, 7, 102, 2, 2, 131, 28, 3, 2, 2, 2, 132, 133, 7, 117, 2, 2, 133, 134, 7, 99, 2, 2, 134, 135, 7, 120, 2, 2, 135, 136, 7, 103, 2, 2, 136, 30, 3, 2, 2, 2, 137, 138, 7, 117, 2, 2, 138, 139, 7, 103, 2, 2, 139, 140, 7, 110, 2, 2, 140, 141, 7, 103, 2, 2, 141, 142, 7, 101, 2, 2, 142, 143, 7, 118, 2, 2, 143, 32, 3, 2, 2, 2, 144, 145, 7, 107, 2, 2, 145, 146, 7, 112, 2, 2, 146, 147, 7, 117, 2, 2, 147, 148, 7, 103, 2, 2, 148, 149, 7, 116, 2, 2, 149, 150, 7, 118, 2, 2, 150, 34, 3, 2, 2, 2, 151, 152, 7, 101, 2, 2, 152, 153, 7, 116, 2, 2, 153, 154, 7, 103, 2, 2, 154, 155, 7, 99, 2, 2, 155, 156, 7, 118, 2, 2, 156, 157, 7, 103, 2, 2, 157, 36, 3, 2, 2, 2, 158, 159, 7, 102, 2, 2, 159, 160, 7, 116, 2, 2, 160, 161, 7, 113, 2, 2, 161, 162, 7, 114, 2, 2, 162, 38, 3, 2, 2, 2, 163, 164, 7, 116, 2, 2, 164, 165, 7, 103, 2, 2, 165, 166, 7, 104, 2, 2, 166, 167, 7, 116, 2, 2, 167, 168, 7, 103, 2, 2, 168, 169, 7, 117, 2, 2, 169, 170, 7, 106, 2, 2, 170, 40, 3, 2, 2, 2, 171, 172, 7, 117, 2, 2, 172, 173, 7, 103, 2, 2, 173, 174, 7, 118, 2, 2, 174, 42, 3, 2, 2, 2, 175, 176, 7, 101, 2, 2, 176, 177, 7, 113, 2, 2, 177, 178, 7, 112, 2, 2, 178, 179, 7, 112, 2, 2, 179, 180, 7, 103, 2, 2, 180, 181, 7, 101, 2, 2, 181, 182, 7, 118, 2, 2, 182, 44, 3, 2, 2, 2, 183, 184, 7, 118, 2, 2, 184, 185, 7, 116, 2, 2, 185, 186, 7, 99, 2, 2, 186, 187, 7, 107, 2, 2, 187, 188, 7, 112, 2, 2, 188, 46, 3, 2, 2, 2, 189, 190, 7, 116, 2, 2, 190, 191, 7, 119, 2, 2, 191, 192, 7, 112, 2, 2, 192, 48, 3, 2, 2, 2, 193, 194, 7, 114, 2, 2, 194, 195, 7, 116, 2, 2, 195, 196, 7, 103, 2, 2, 196, 197, 7, 102, 2, 2, 197, 198, 7, 107, 2, 2, 198, 199, 7, 101, 2, 2, 199, 200, 7, 118, 2, 2, 200, 50, 3, 2, 2, 2, 201, 202, 7, 116, 2, 2, 202, 203, 7, 103, 2, 2, 203, 204, 7, 105, 2, 2, 204, 205, 7, 107, 2, 2, 205, 206, 7, 117, 2, 2, 206, 207, 7, 118, 2, 2, 207, 208, 7, 103, 2, 2, 208, 209, 7, 116, 2, 2, 209, 52, 3, 2, 2, 2, 210, 211, 7, 119, 2, 2, 211, 212, 7, 112, 2, 2, 212, 213, 7, 116, 2, 2, 213, 214, 7, 103, 2, 2, 214, 215, 7, 105, 2, 2, 215, 216, 7, 107, 2, 2, 216, 217, 7, 117, 2, 2, 217, 218, 7, 118, 2, 2, 218, 219, 7, 103, 2, 2, 219, 220, 7, 116, 2, 2, 220, 54, 3, 2, 2, 2, 221, 222, 7, 107, 2, 2, 222, 223, 7, 112, 2, 2, 223, 224, 7, 101, 2, 2, 224, 225, 7, 110, 2, 2, 225, 226, 7, 119, 2, 2, 226, 227, 7, 102, 2, 2, 227, 228, 7, 103, 2, 2, 228, 56, 3, 2, 2, 2, 229, 230, 7, 113, 2, 2, 230, 231, 7, 114, 2, 2, 231, 232, 7, 118, 2, 2, 232, 233, 7, 107, 2, 2, 233, 234, 7, 113, 2, 2, 234, 235, 7, 112, 2, 2, 235, 236, 7, 117, 2, 2, 236, 58, 3, 2, 2, 2, 237, 238, 7, 121, 2, 2, 238, 239, 7, 106, 2, 2, 239, 240, 7, 103, 2, 2, 240, 241, 7, 116, 2, 2, 241, 242, 7, 103, 2, 2, 242, 60, 3, 2, 2, 2, 243, 244, 7, 114, 2, 2, 244, 245, 7, 99, 2, 2, 245, 246, 7, 116, 2, 2, 246, 247, 7, 118, 2, 2, 247, 248, 7, 107, 2, 2, 248, 249, 7, 118, 2, 2, 249, 250, 7, 107, 2, 2, 250, 251, 7, 113, 2, 2, 251, 252, 7, 112, 2, 2, 252, 253, 7, 68, 2, 2, 253, 266, 7, 123, 2, 2, 254, 255, 7, 114, 2, 2, 255, 256, 7, 99, 2, 2, 256, 257, 7, 116, 2, 2, 257, 258, 7, 118, 2, 2, 258, 259, 7, 107, 2, 2, 259, 260, 7, 118, 2, 2, 260, 261, 7, 107, 2, 2, 261, 262, 7, 113, 2, 2, 262, 263, 7, 112, 2, 2, 263, 264, 7, 100, 2, 2, 264, 266, 7, 123, 2, 2, 265, 243, 3, 2, 2, 2, 265, 254, 3, 2, 2, 2, 266, 62, 3, 2, 2, 2, 267, 268, 7, 113, 2, 2, 268, 269, 7, 120, 2, 2, 269, 270, 7, 103, 2, 2, 270, 271, 7, 116, 2, 2, 271, 272, 7, 121, 2, 2, 272, 273, 7, 116, 2, 2, 273, 274, 7, 107, 2, 2, 274, 275, 7, 118, 2, 2, 275, 276, 7, 103, 2, 2, 276, 64, 3, 2, 2, 2, 277, 278, 7, 99, 2, 2, 278, 279, 7, 114, 2, 2, 279, 280, 7, 114, 2, 2, 280, 281, 7, 103, 2, 2, 281, 282, 7, 112, 2, 2, 282, 283, 7, 102, 2, 2, 283, 66, 3, 2, 2, 2, 284, 285, 7, 103, 2, 2, 285, 286, 7, 116, 2, 2, 286, 287, 7, 116, 2, 2, 287, 288, 7, 113, 2, 2, 288, 289, 7, 116, 2, 2, 289, 290, 7, 107, 2, 2, 290, 291, 7, 104, 2, 2, 291, 292, 7, 103, 2, 2, 292, 293, 7, 122, 2, 2, 293, 294, 7, 107, 2, 2, 294, 295, 7, 117, 2, 2, 295, 296, 7, 118, 2, 2, 296, 297, 7, 117, 2, 2, 297, 68, 3, 2, 2, 2, 298, 299, 7, 107, 2, 2, 299, 300, 7, 105, 2, 2, 300, 301, 7, 112, 2, 2, 301, 302, 7, 113, 2, 2, 302, 303, 7, 116, 2, 2, 303, 304, 7, 103, 2, 2, 304, 70, 3, 2, 2, 2, 305, 311, 7, 41, 2, 2, 306, 310, 10, 2, 2, 2, 307, 308, 7, 94, 2, 2, 308, 310, 11, 2, 2, 2, 309, 306, 3, 2, 2, 2, 309, 307, 3, 2, 2, 2, 310, 313, 3, 2, 2, 2, 311, 309, 3, 2, 2, 2, 311, 312, 3, 2, 2, 2, 312, 314, 3, 2, 2, 2, 313, 311, 3, 2, 2, 2, 314, 326, 7, 41, 2, 2, 315, 321, 7, 36, 2, 2, 316, 320, 10, 3, 2, 2, 317, 318, 7, 94, 2, 2, 318, 320, 11, 2, 2, 2, 319, 316, 3, 2, 2, 2, 319, 317, 3, 2, 2, 2, 320, 323, 3, 2, 2, 2, 321, 319, 3, 2, 2, 2, 321, 322, 3, 2, 2, 2, 322, 324, 3, 2, 2, 2, 323, 321, 3, 2, 2, 2, 324, 326, 7, 36, 2, 2, 325, 305, 3, 2, 2, 2, 325, 315, 3, 2, 2, 2, 326, 72, 3, 2, 2, 2, 327, 328, 7, 41, 2, 2, 328, 329, 7, 41, 2, 2, 329, 330, 7, 41, 2, 2, 330, 331, 3, 2, 2, 2, 331, 335, 10, 4, 2, 2, 332, 334, 11, 2, 2, 2, 333, 332, 3, 2, 2, 2, 334, 337, 3, 2, 2, 2, 335, 336, 3, 2, 2, 2, 335, 333, 3, 2, 2, 2, 336, 338, 3, 2, 2, 2, 337, 335, 3, 2, 2, 2, 338, 339, 7, 41, 2, 2, 339, 340, 7, 41, 2, 2, 340, 341, 7, 41, 2, 2, 341, 74, 3, 2, 2, 2, 342, 346, 5, 81, 41, 2, 343, 346, 5, 79, 40, 2, 344, 346, 7, 97, 2, 2, 345, 342, 3, 2, 2, 2, 345, 343, 3, 2, 2, 2, 345, 344, 3, 2, 2, 2, 346, 347, 3, 2, 2, 2, 347, 345, 3, 2, 2, 2, 347, 348, 3, 2, 2, 2, 348, 76, 3, 2, 2, 2, 349, 355, 7, 98, 2, 2, 350, 354, 10, 5, 2, 2, 351, 352, 7, 98, 2, 2, 352, 354, 7, 98, 2, 2, 353, 350, 3, 2, 2, 2, 353, 351, 3, 2, 2, 2, 354, 357, 3, 2, 2, 2, 355, 353, 3, 2, 2, 2, 355, 356, 3, 2, 2, 2, 356, 358, 3, 2, 2, 2, 357, 355, 3, 2, 2, 2, 358, 359, 7, 98, 2, 2, 359, 78, 3, 2, 2, 2, 360, 361, 9, 6, 2, 2, 361, 80, 3, 2, 2, 2, 362, 363, 9, 7, 2, 2, 363, 82, 3, 2, 2, 2, 364, 368, 5, 85, 43, 2, 365, 369, 5, 81, 41, 2, 366, 369, 5, 79, 40, 2, 367, 369, 7, 97, 2, 2, 368, 365, 3, 2, 2, 2, 368, 366, 3, 2, 2, 2, 368, 367, 3, 2, 2, 2, 369, 370, 3, 2, 2, 2, 370, 368, 3, 2, 2, 2, 370, 371, 3, 2, 2, 2, 371, 84, 3, 2, 2, 2, 372, 373, 7, 35, 2, 2, 373, 86, 3, 2, 2, 2, 374, 375, 7, 47, 2, 2, 375, 376, 7, 47, 2, 2, 376, 380, 3, 2, 2, 2, 377, 379, 10, 8, 2, 2, 378, 377, 3, 2, 2, 2, 379, 382, 3, 2, 2, 2, 380, 378, 3, 2, 2, 2, 380, 381, 3, 2, 2, 2, 381, 384, 3, 2, 2, 2, 382, 380, 3, 2, 2, 2, 383, 385, 7, 15, 2, 2, 384, 383, 3, 2, 2, 2, 384, 385, 3, 2, 2, 2, 385, 387, 3, 2, 2, 2, 386, 388, 7, 12, 2, 2, 387, 386, 3, 2, 2, 2, 387, 388, 3, 2, 2, 2, 388, 389, 3, 2, 2, 2, 389, 390, 8, 44, 2, 2, 390, 88, 3, 2, 2, 2, 391, 392, 7, 49, 2, 2, 392, 393, 7, 44, 2, 2, 393, 394, 7, 44, 2, 2, 394, 395, 7, 49, 2, 2, 395, 396, 3, 2, 2, 2, 396, 397, 8, 45, 2, 2, 397, 90, 3, 2, 2, 2, 398, 399, 7, 49, 2, 2, 399, 400, 7, 44, 2, 2, 400, 401, 3, 2, 2, 2, 401, 405, 10, 4, 2, 2, 402, 404, 11, 2, 2, 2, 403, 402, 3, 2, 2, 2, 404, 407, 3, 2, 2, 2, 405, 406, 3, 2, 2, 2, 405, 403, 3, 2, 2, 2, 406, 408, 3, 2, 2, 2, 407, 405, 3, 2, 2, 2, 408, 409, 7, 44, 2, 2, 409, 410, 7, 49, 2, 2, 410, 411, 3, 2, 2, 2, 411, 412, 8, 46, 2, 2, 412, 92, 3, 2, 2, 2, 413, 415, 9, 9, 2, 2, 414, 413, 3, 2, 2, 2, 415, 416, 3, 2, 2, 2, 416, 414, 3, 2, 2, 2, 416, 417, 3, 2, 2, 2, 417, 418, 3, 2, 2, 2, 418, 419, 8, 47, 2, 2, 419, 94, 3, 2, 2, 2, 420, 421, 11, 2, 2, 2, 421, 96, 3, 2, 2, 2, 21, 2, 265, 309, 311, 319, 321, 325, 335, 345, 347, 353, 355, 368, 370, 380, 384, 387, 405, 416, 3, 2, 3, 2] \ No newline at end of file diff --git a/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLLexer.java b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLLexer.java index c7063c068..8972f3935 100644 --- a/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLLexer.java +++ b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLLexer.java @@ -1,4 +1,4 @@ -// Generated from DSLSQL.g4 by ANTLR 4.7.1 +// Generated from /opt/projects/kyligence/byzerCP/byzer-lang/streamingpro-dsl/src/main/resources/DSLSQL.g4 by ANTLR 4.7 package streaming.dsl.parser; @@ -13,7 +13,7 @@ @SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) public class DSLSQLLexer extends Lexer { - static { RuntimeMetaData.checkVersion("4.7.1", RuntimeMetaData.VERSION); } + static { RuntimeMetaData.checkVersion("4.7", RuntimeMetaData.VERSION); } protected static final DFA[] _decisionToDFA; protected static final PredictionContextCache _sharedContextCache = @@ -50,7 +50,7 @@ public class DSLSQLLexer extends Lexer { "','", "'as'", "'into'", "'load'", "'save'", "'select'", "'insert'", "'create'", "'drop'", "'refresh'", "'set'", "'connect'", "'train'", "'run'", "'predict'", "'register'", "'unregister'", "'include'", "'options'", "'where'", null, - "'overwrite'", "'append'", "'errorIfExists'", "'ignore'", null, null, + "'overwrite'", "'append'", "'errorifexists'", "'ignore'", null, null, null, null, null, "'!'", null, "'/**/'" }; private static final String[] _SYMBOLIC_NAMES = { @@ -216,7 +216,7 @@ public DSLSQLLexer(CharStream input) { "\7c\2\2\u0116\u0117\7r\2\2\u0117\u0118\7r\2\2\u0118\u0119\7g\2\2\u0119"+ "\u011a\7p\2\2\u011a\u011b\7f\2\2\u011bB\3\2\2\2\u011c\u011d\7g\2\2\u011d"+ "\u011e\7t\2\2\u011e\u011f\7t\2\2\u011f\u0120\7q\2\2\u0120\u0121\7t\2\2"+ - "\u0121\u0122\7K\2\2\u0122\u0123\7h\2\2\u0123\u0124\7G\2\2\u0124\u0125"+ + "\u0121\u0122\7k\2\2\u0122\u0123\7h\2\2\u0123\u0124\7g\2\2\u0124\u0125"+ "\7z\2\2\u0125\u0126\7k\2\2\u0126\u0127\7u\2\2\u0127\u0128\7v\2\2\u0128"+ "\u0129\7u\2\2\u0129D\3\2\2\2\u012a\u012b\7k\2\2\u012b\u012c\7i\2\2\u012c"+ "\u012d\7p\2\2\u012d\u012e\7q\2\2\u012e\u012f\7t\2\2\u012f\u0130\7g\2\2"+ diff --git a/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLLexer.tokens b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLLexer.tokens index 83e361e04..4ea27f312 100644 --- a/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLLexer.tokens +++ b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLLexer.tokens @@ -74,7 +74,7 @@ UNRECOGNIZED=45 'where'=29 'overwrite'=31 'append'=32 -'errorIfExists'=33 +'errorifexists'=33 'ignore'=34 '!'=40 '/**/'=42 diff --git a/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLListener.java b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLListener.java index 2c8bd0a7c..10d309e9b 100644 --- a/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLListener.java +++ b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLListener.java @@ -1,4 +1,4 @@ -// Generated from DSLSQL.g4 by ANTLR 4.7.1 +// Generated from /opt/projects/kyligence/byzerCP/byzer-lang/streamingpro-dsl/src/main/resources/DSLSQL.g4 by ANTLR 4.7 package streaming.dsl.parser; diff --git a/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLParser.java b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLParser.java index d2aebeccf..842b56f24 100644 --- a/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLParser.java +++ b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLParser.java @@ -1,4 +1,4 @@ -// Generated from DSLSQL.g4 by ANTLR 4.7.1 +// Generated from /opt/projects/kyligence/byzerCP/byzer-lang/streamingpro-dsl/src/main/resources/DSLSQL.g4 by ANTLR 4.7 package streaming.dsl.parser; @@ -13,7 +13,7 @@ @SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) public class DSLSQLParser extends Parser { - static { RuntimeMetaData.checkVersion("4.7.1", RuntimeMetaData.VERSION); } + static { RuntimeMetaData.checkVersion("4.7", RuntimeMetaData.VERSION); } protected static final DFA[] _decisionToDFA; protected static final PredictionContextCache _sharedContextCache = @@ -50,7 +50,7 @@ public class DSLSQLParser extends Parser { "','", "'as'", "'into'", "'load'", "'save'", "'select'", "'insert'", "'create'", "'drop'", "'refresh'", "'set'", "'connect'", "'train'", "'run'", "'predict'", "'register'", "'unregister'", "'include'", "'options'", "'where'", null, - "'overwrite'", "'append'", "'errorIfExists'", "'ignore'", null, null, + "'overwrite'", "'append'", "'errorifexists'", "'ignore'", null, null, null, null, null, "'!'", null, "'/**/'" }; private static final String[] _SYMBOLIC_NAMES = { @@ -136,6 +136,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitStatement(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitStatement(this); + else return visitor.visitChildren(this); + } } public final StatementContext statement() throws RecognitionException { @@ -295,6 +300,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitSql(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitSql(this); + else return visitor.visitChildren(this); + } } public final SqlContext sql() throws RecognitionException { @@ -490,7 +500,7 @@ public final SqlContext sql() throws RecognitionException { setState(130); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,12,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + while ( _alt!=2 && _alt!= ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { @@ -1040,6 +1050,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitAs(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitAs(this); + else return visitor.visitChildren(this); + } } public final AsContext as() throws RecognitionException { @@ -1077,6 +1092,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitInto(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitInto(this); + else return visitor.visitChildren(this); + } } public final IntoContext into() throws RecognitionException { @@ -1117,6 +1137,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitSaveMode(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitSaveMode(this); + else return visitor.visitChildren(this); + } } public final SaveModeContext saveMode() throws RecognitionException { @@ -1164,6 +1189,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitWhere(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitWhere(this); + else return visitor.visitChildren(this); + } } public final WhereContext where() throws RecognitionException { @@ -1221,6 +1251,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitWhereExpressions(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitWhereExpressions(this); + else return visitor.visitChildren(this); + } } public final WhereExpressionsContext whereExpressions() throws RecognitionException { @@ -1270,6 +1305,7 @@ public final WhereExpressionsContext whereExpressions() throws RecognitionExcept } public static class OverwriteContext extends ParserRuleContext { + public TerminalNode OVERWRITE() { return getToken(DSLSQLParser.OVERWRITE, 0); } public OverwriteContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -1282,6 +1318,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitOverwrite(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitOverwrite(this); + else return visitor.visitChildren(this); + } } public final OverwriteContext overwrite() throws RecognitionException { @@ -1306,6 +1347,7 @@ public final OverwriteContext overwrite() throws RecognitionException { } public static class AppendContext extends ParserRuleContext { + public TerminalNode APPEND() { return getToken(DSLSQLParser.APPEND, 0); } public AppendContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -1318,6 +1360,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitAppend(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitAppend(this); + else return visitor.visitChildren(this); + } } public final AppendContext append() throws RecognitionException { @@ -1342,6 +1389,7 @@ public final AppendContext append() throws RecognitionException { } public static class ErrorIfExistsContext extends ParserRuleContext { + public TerminalNode ERRORIfExists() { return getToken(DSLSQLParser.ERRORIfExists, 0); } public ErrorIfExistsContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -1354,6 +1402,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitErrorIfExists(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitErrorIfExists(this); + else return visitor.visitChildren(this); + } } public final ErrorIfExistsContext errorIfExists() throws RecognitionException { @@ -1378,6 +1431,7 @@ public final ErrorIfExistsContext errorIfExists() throws RecognitionException { } public static class IgnoreContext extends ParserRuleContext { + public TerminalNode IGNORE() { return getToken(DSLSQLParser.IGNORE, 0); } public IgnoreContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -1390,6 +1444,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitIgnore(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitIgnore(this); + else return visitor.visitChildren(this); + } } public final IgnoreContext ignore() throws RecognitionException { @@ -1429,6 +1488,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitBooleanExpression(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitBooleanExpression(this); + else return visitor.visitChildren(this); + } } public final BooleanExpressionContext booleanExpression() throws RecognitionException { @@ -1472,6 +1536,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitExpression(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitExpression(this); + else return visitor.visitChildren(this); + } } public final ExpressionContext expression() throws RecognitionException { @@ -1521,6 +1590,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitEnder(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitEnder(this); + else return visitor.visitChildren(this); + } } public final EnderContext ender() throws RecognitionException { @@ -1560,6 +1634,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitFormat(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitFormat(this); + else return visitor.visitChildren(this); + } } public final FormatContext format() throws RecognitionException { @@ -1602,6 +1681,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitPath(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitPath(this); + else return visitor.visitChildren(this); + } } public final PathContext path() throws RecognitionException { @@ -1656,6 +1740,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitCommandValue(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitCommandValue(this); + else return visitor.visitChildren(this); + } } public final CommandValueContext commandValue() throws RecognitionException { @@ -1720,6 +1809,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitRawCommandValue(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitRawCommandValue(this); + else return visitor.visitChildren(this); + } } public final RawCommandValueContext rawCommandValue() throws RecognitionException { @@ -1793,7 +1887,7 @@ public final RawCommandValueContext rawCommandValue() throws RecognitionExceptio setState(342); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,46,_ctx); - } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } while ( _alt!=2 && _alt!= ATN.INVALID_ALT_NUMBER ); } } catch (RecognitionException re) { @@ -1828,6 +1922,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitSetValue(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitSetValue(this); + else return visitor.visitChildren(this); + } } public final SetValueContext setValue() throws RecognitionException { @@ -1894,6 +1993,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitSetKey(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitSetKey(this); + else return visitor.visitChildren(this); + } } public final SetKeyContext setKey() throws RecognitionException { @@ -1936,6 +2040,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitDb(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitDb(this); + else return visitor.visitChildren(this); + } } public final DbContext db() throws RecognitionException { @@ -1988,6 +2097,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitAsTableName(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitAsTableName(this); + else return visitor.visitChildren(this); + } } public final AsTableNameContext asTableName() throws RecognitionException { @@ -2029,6 +2143,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitTableName(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitTableName(this); + else return visitor.visitChildren(this); + } } public final TableNameContext tableName() throws RecognitionException { @@ -2068,6 +2187,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitFunctionName(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitFunctionName(this); + else return visitor.visitChildren(this); + } } public final FunctionNameContext functionName() throws RecognitionException { @@ -2107,6 +2231,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitColGroup(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitColGroup(this); + else return visitor.visitChildren(this); + } } public final ColGroupContext colGroup() throws RecognitionException { @@ -2148,6 +2277,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitCol(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitCol(this); + else return visitor.visitChildren(this); + } } public final ColContext col() throws RecognitionException { @@ -2190,6 +2324,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitQualifiedName(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitQualifiedName(this); + else return visitor.visitChildren(this); + } } public final QualifiedNameContext qualifiedName() throws RecognitionException { @@ -2246,6 +2385,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitIdentifier(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitIdentifier(this); + else return visitor.visitChildren(this); + } } public final IdentifierContext identifier() throws RecognitionException { @@ -2286,6 +2430,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitStrictIdentifier(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitStrictIdentifier(this); + else return visitor.visitChildren(this); + } } public final StrictIdentifierContext strictIdentifier() throws RecognitionException { @@ -2338,6 +2487,11 @@ public void enterRule(ParseTreeListener listener) { public void exitRule(ParseTreeListener listener) { if ( listener instanceof DSLSQLListener ) ((DSLSQLListener)listener).exitQuotedIdentifier(this); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof DSLSQLVisitor ) return ((DSLSQLVisitor)visitor).visitQuotedIdentifier(this); + else return visitor.visitChildren(this); + } } public final QuotedIdentifierContext quotedIdentifier() throws RecognitionException { diff --git a/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLVisitor.java b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLVisitor.java new file mode 100644 index 000000000..2dedcf135 --- /dev/null +++ b/streamingpro-dsl/src/main/java/streaming/dsl/parser/DSLSQLVisitor.java @@ -0,0 +1,195 @@ +// Generated from /opt/projects/kyligence/byzerCP/byzer-lang/streamingpro-dsl/src/main/resources/DSLSQL.g4 by ANTLR 4.7 + +package streaming.dsl.parser; + +import org.antlr.v4.runtime.tree.ParseTreeVisitor; + +/** + * This interface defines a complete generic visitor for a parse tree produced + * by {@link DSLSQLParser}. + * + * @param The return type of the visit operation. Use {@link Void} for + * operations with no return type. + */ +public interface DSLSQLVisitor extends ParseTreeVisitor { + /** + * Visit a parse tree produced by {@link DSLSQLParser#statement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitStatement(DSLSQLParser.StatementContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#sql}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitSql(DSLSQLParser.SqlContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#as}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAs(DSLSQLParser.AsContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#into}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitInto(DSLSQLParser.IntoContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#saveMode}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitSaveMode(DSLSQLParser.SaveModeContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#where}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitWhere(DSLSQLParser.WhereContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#whereExpressions}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitWhereExpressions(DSLSQLParser.WhereExpressionsContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#overwrite}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitOverwrite(DSLSQLParser.OverwriteContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#append}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAppend(DSLSQLParser.AppendContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#errorIfExists}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitErrorIfExists(DSLSQLParser.ErrorIfExistsContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#ignore}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitIgnore(DSLSQLParser.IgnoreContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#booleanExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitBooleanExpression(DSLSQLParser.BooleanExpressionContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#expression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExpression(DSLSQLParser.ExpressionContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#ender}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitEnder(DSLSQLParser.EnderContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#format}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFormat(DSLSQLParser.FormatContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#path}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPath(DSLSQLParser.PathContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#commandValue}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitCommandValue(DSLSQLParser.CommandValueContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#rawCommandValue}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitRawCommandValue(DSLSQLParser.RawCommandValueContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#setValue}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitSetValue(DSLSQLParser.SetValueContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#setKey}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitSetKey(DSLSQLParser.SetKeyContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#db}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitDb(DSLSQLParser.DbContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#asTableName}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAsTableName(DSLSQLParser.AsTableNameContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#tableName}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitTableName(DSLSQLParser.TableNameContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#functionName}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFunctionName(DSLSQLParser.FunctionNameContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#colGroup}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitColGroup(DSLSQLParser.ColGroupContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#col}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitCol(DSLSQLParser.ColContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#qualifiedName}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitQualifiedName(DSLSQLParser.QualifiedNameContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#identifier}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitIdentifier(DSLSQLParser.IdentifierContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#strictIdentifier}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitStrictIdentifier(DSLSQLParser.StrictIdentifierContext ctx); + /** + * Visit a parse tree produced by {@link DSLSQLParser#quotedIdentifier}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitQuotedIdentifier(DSLSQLParser.QuotedIdentifierContext ctx); +} \ No newline at end of file diff --git a/streamingpro-dsl/src/main/resources/DSLSQL.g4 b/streamingpro-dsl/src/main/resources/DSLSQL.g4 index 6ce3fcaec..457fea65d 100644 --- a/streamingpro-dsl/src/main/resources/DSLSQL.g4 +++ b/streamingpro-dsl/src/main/resources/DSLSQL.g4 @@ -14,7 +14,7 @@ statement sql : LOAD format '.' path where? expression? booleanExpression* as tableName - | SAVE (overwrite | append | errorIfExists |ignore)* tableName as format '.' path where? expression? booleanExpression* (PARTITIONBY col? colGroup*)? + | SAVE (overwrite|append|errorIfExists|ignore)* tableName as format '.' path where? expression? booleanExpression* (PARTITIONBY col? colGroup*)? | SELECT ~(';')* as tableName | INSERT ~(';')* | CREATE ~(';')* @@ -53,7 +53,7 @@ WHERE:'where'; PARTITIONBY:'partitionBy'|'partitionby'; OVERWRITE:'overwrite'; APPEND:'append'; -ERRORIfExists:'errorIfExists'; +ERRORIfExists:'errorifexists'; IGNORE:'ignore'; @@ -68,19 +68,19 @@ whereExpressions: where expression? booleanExpression*; overwrite - : 'overwrite' + : OVERWRITE ; append - : 'append' + : APPEND ; errorIfExists - : 'errorIfExists' + : ERRORIfExists ; ignore - : 'ignore' + : IGNORE ; booleanExpression