[ 
https://issues.apache.org/jira/browse/IOTDB-190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yuyuan KANG closed IOTDB-190.
-----------------------------
    Resolution: Fixed

> switch to ANTLR v4
> ------------------
>
>                 Key: IOTDB-190
>                 URL: https://issues.apache.org/jira/browse/IOTDB-190
>             Project: Apache IoTDB
>          Issue Type: Improvement
>            Reporter: Yuyuan KANG
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Currently, the system uses ANTLR v3 for query parsing. However, ANTLR v4 has 
> some advantages over ANTLR v3.
>  # ANTLRv4 uses visitor and listener mechanism,which allows the grammer 
> definition independent from programming language (e.g. Java). So it is much 
> easier to maintain. 
>  # In Antlr v3, developers explicitly defines the structure of the tree to 
> build using operator '->'. However, Antlr v4 hides the tree structure from 
> developers, which simplifies grammer definition and increases the code 
> readability.
>  # ANTLR v3’s LL(* ) parsing strategy is weaker than v4’s ALL(* ), so v3 
> sometimes
>  relied on backtracking to properly parse input phrases.
>  # ANTLR v3 cannot handle left-recursive rules, while ANTLR v4 can now handle 
> direct left recursion. Therefore, ANTLR v4 can handle more grammer rules.
>  # ANTLR v4 works faster than ANTLR v3.
> So it is necessary to switch to ANTLR v4



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to