[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1633) Merge DSL improvements into trunk

Matt Geis (JIRA) jira-events at lists.jboss.org
Wed Jun 4 16:45:20 EDT 2008


    [ http://jira.jboss.com/jira/browse/JBRULES-1633?page=comments#action_12415654 ] 
            
Matt Geis commented on JBRULES-1633:
------------------------------------

The specific enhancement that drove us to move from java regular expressions to ANTLR was a requirement to have more control on how patterns and variables were matched in DSL expansion.  Originally, any variable (for example, {variableName} in a DSL would expand to a regular expression of (.*?), which, while not *totally* greedy, can end up matching more than the user wants.

We figured it'd be nice to be able to specify a pattern for which the variable will match, for example, an expression like...

where {attr:[A-Za-z0-9]+} is "{value}"

would only match [A-Za-z0-9]+ , create a capture group around that pattern, and bind it into a variable named "attr".  This allows a much more powerful range of DSLs that can be written, as it enables more accurate construction of sentence fragments and phrases.

The java regular expression that preceded the ANTLR rewrite was simply too complex already, and was at the limit of its functionality.  With the new ANTLR model, we were able to easily support the requirement to limit matches by user-defined patterns (on a variable-by-variable basis), as well as pave the way for future enhancements to DSL usage.

> Merge DSL improvements into trunk
> ---------------------------------
>
>                 Key: JBRULES-1633
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-1633
>             Project: JBoss Drools
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: Drl Parser/Builder
>    Affects Versions: 5.0.0-M1
>            Reporter: Edson Tirelli
>         Assigned To: Edson Tirelli
>             Fix For: 5.0.0-M1
>
>
> Matt Geis implemented a series of improvements in the DSL engine, including a brand new parser written in ANTLR. All the improvements were committed against branch:
> https://svn.labs.jboss.com/labs/jbossrules/branches/mattgeis/
> We need to merge all his changes into trunk.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list