modify sparkSql grammar
This commit is contained in:
@ -75,7 +75,11 @@ program
|
||||
;
|
||||
|
||||
singleStatement
|
||||
: statement ';'* EOF
|
||||
: (statement SEMICOLON? | emptyStatement)*
|
||||
;
|
||||
|
||||
emptyStatement
|
||||
: SEMICOLON
|
||||
;
|
||||
|
||||
singleExpression
|
||||
@ -1741,6 +1745,7 @@ AMPERSAND: '&';
|
||||
PIPE: '|';
|
||||
CONCAT_PIPE: '||';
|
||||
HAT: '^';
|
||||
SEMICOLON: ';';
|
||||
|
||||
STRING
|
||||
: '\'' ( ~('\''|'\\') | ('\\' .) )* '\''
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -29,6 +29,15 @@ SparkSqlListener.prototype.exitSingleStatement = function(ctx) {
|
||||
};
|
||||
|
||||
|
||||
// Enter a parse tree produced by SparkSqlParser#emptyStatement.
|
||||
SparkSqlListener.prototype.enterEmptyStatement = function(ctx) {
|
||||
};
|
||||
|
||||
// Exit a parse tree produced by SparkSqlParser#emptyStatement.
|
||||
SparkSqlListener.prototype.exitEmptyStatement = function(ctx) {
|
||||
};
|
||||
|
||||
|
||||
// Enter a parse tree produced by SparkSqlParser#singleExpression.
|
||||
SparkSqlListener.prototype.enterSingleExpression = function(ctx) {
|
||||
};
|
||||
|
File diff suppressed because one or more lines are too long
@ -24,6 +24,12 @@ SparkSqlVisitor.prototype.visitSingleStatement = function(ctx) {
|
||||
};
|
||||
|
||||
|
||||
// Visit a parse tree produced by SparkSqlParser#emptyStatement.
|
||||
SparkSqlVisitor.prototype.visitEmptyStatement = function(ctx) {
|
||||
return this.visitChildren(ctx);
|
||||
};
|
||||
|
||||
|
||||
// Visit a parse tree produced by SparkSqlParser#singleExpression.
|
||||
SparkSqlVisitor.prototype.visitSingleExpression = function(ctx) {
|
||||
return this.visitChildren(ctx);
|
||||
|
Reference in New Issue
Block a user