[ 
https://issues.apache.org/jira/browse/DRILL-6870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16697346#comment-16697346
 ] 

ASF GitHub Bot commented on DRILL-6870:
---------------------------------------

arina-ielchiieva commented on a change in pull request #1554: DRILL-6870: 
Upgrade to ANTLR4
URL: https://github.com/apache/drill/pull/1554#discussion_r235989187
 
 

 ##########
 File path: 
logical/src/main/antlr4/org/apache/drill/common/expression/parser/ExprParser.g4
 ##########
 @@ -55,25 +47,20 @@ import 
org.apache.drill.common.exceptions.ExpressionParsingException;
   public ExpressionPosition pos(Token token){
     return new ExpressionPosition(fullExpression, token.getTokenIndex());
   }
-  
-  @Override    
-  public void displayRecognitionError(String[] tokenNames, 
RecognitionException e) {
-       String hdr = getErrorHeader(e);
-    String msg = getErrorMessage(e, tokenNames);
-    throw new ExpressionParsingException("Expression has syntax error! " + hdr 
+ ":" + msg);
-  }
 }
 
 parse returns [LogicalExpression e]
   :  expression EOF {
-    $e = $expression.e; 
-    if(fullExpression == null) fullExpression = $expression.text;
+    $e = $expression.e;
+    if (fullExpression == null) fullExpression = $expression.text;
     tokenPos = $expression.start.getTokenIndex();
   }
   ;
  
 functionCall returns [LogicalExpression e]
-  :  Identifier OParen exprList? CParen {$e = 
FunctionCallFactory.createExpression($Identifier.text, pos($Identifier), 
$exprList.listE);  }
+  :  Identifier OParen exprList? CParen {$e =
+      FunctionCallFactory.createExpression($Identifier.text, pos($Identifier),
+        ($exprList.ctx == null ? new ArrayList<LogicalExpression>() : 
$exprList.listE)); }
 
 Review comment:
   Agree, removed in other places as well.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Upgrade to ANTLR4
> -----------------
>
>                 Key: DRILL-6870
>                 URL: https://issues.apache.org/jira/browse/DRILL-6870
>             Project: Apache Drill
>          Issue Type: Task
>            Reporter: Arina Ielchiieva
>            Assignee: Arina Ielchiieva
>            Priority: Major
>             Fix For: 1.15.0
>
>
> Upgrade from ANTLR3 to ANTLR4.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to