[jboss-jira] [JBoss JIRA] (DROOLS-3088) FEEL Compiler: refactor to AST-based tree walk

Kris Verlaenen (Jira) issues at jboss.org
Mon Nov 5 06:24:22 EST 2018


     [ https://issues.jboss.org/browse/DROOLS-3088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kris Verlaenen updated DROOLS-3088:
-----------------------------------
    Sprint: 2018 Week 42-44, 2018 Week 45-47  (was: 2018 Week 42-44)


> FEEL Compiler: refactor to AST-based tree walk
> ----------------------------------------------
>
>                 Key: DROOLS-3088
>                 URL: https://issues.jboss.org/browse/DROOLS-3088
>             Project: Drools
>          Issue Type: Task
>            Reporter: Edoardo Vacchi
>            Assignee: Edoardo Vacchi
>            Priority: Major
>              Labels: drools-core
>
> Current implementation of the compiler walks the parse tree generated by ANTLR, which is a bit cumbersome because of the way the grammar has to be written to deal with priorities/ambiguities. Luckily, many of such issues are solved by the interpreter implementation, which walks the parse tree and generates a neat, simpler Abstract Syntax Tree. 
> This tasks is to refactor our current compiler to walk that AST, instead of the larger parse tree.
> Benefits:
> - less "visit" cases in the visitor
> - more opportunities to "optimize" the tree (e.g, tree rewrites, constant folding)
> - more opportunities to refactor tree walking phases (e.g. we could add a "type-evaluation" phase)
> - a chance to refactor code gen utilities to support classes, and simplify the code in general
> - cons: it takes a bit of time, but the AST nodes are really a handful, so it should not take that much 



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list