Huge +1 on this.

Mario

On 2024/02/27 03:32:09 Toshiya Kobayashi wrote:
> Hi,
> 
> The current DRL parser is Antlr3 based and contains lots of hard-coded
> logic in generated java codes, so it's hard to maintain.
> 
> for example)
> https://github.com/apache/incubator-kie-drools/blame/main/drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/lang/DRL6Parser.java
> 
> The proposal is to develop a new DRL parser based on Antlr4, which has
> Visior and Listener support, so the parser would have cleaner separation
> between parser syntax and Java code.
> 
> 1. This doesn't target v10.0 release. Fixing all issues keeping backward
> compatibility is a large effort. I don't expect that we can complete it
> within a month. Even if we can do it more quickly, I don't want to disrupt
> the v10.0 release, so the incorporation would be post v10.0.
> 
> 2. The goal of this change is just for code maintainability (e.g. easy to
> extend DRL syntax in the future). This is an implementation detail, so
> should not impact users.
> 
> 3. Regarding stability, this is something to be discussed further, but
> personally I guess we will keep both old and new parsers until we are
> confident that the new parser has matured. During the time, we would have
> the complexity, but users can switch back to the old parser when there is
> an issue with a new parser.
> 
> 4. As a bonus, `antlr4-c3` would help to develop DRL code completion for
> LSP (Language Server Protocol), but it's not a direct scope of this
> proposal.
> 
> Feel free to share your thoughts.
> 
> Thanks!
> Toshiya
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@kie.apache.org
For additional commands, e-mail: dev-h...@kie.apache.org

Reply via email to