[jboss-jira] [JBoss JIRA] (DROOLS-3088) FEEL Compiler: refactor to AST-based tree walk
Tibor Zimányi (Jira)
issues at jboss.org
Mon Oct 15 10:38:00 EDT 2018
[ https://issues.jboss.org/browse/DROOLS-3088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tibor Zimányi updated DROOLS-3088:
----------------------------------
Story Points: 8
> 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