[rules-dev] Questions about DSL in 3.2

Michael Neale michael.neale at gmail.com
Sun Feb 4 17:24:44 EST 2007


Edson, doesn't have to be line based, thats just the way it worked now cause
it made it easier to expand.

It *will* need to work with the IDE of course - which at the moment is kind
of mixed up with the regular DRL editor  (so it gets content suggestions
from the DSL if it is using one). Kris wants to seperate out the DSL aware
editor from the vanilla DRL one (so its less of a mess) as well - so keep
that in mind.

Some other requirements:

* Errors when expanding should be accumulated in an error list, like the
normal parser
* Should be able to allow/disallow "in line DRL" expressions (ie you may
want to stop people from doing something that is regular DRL, and restrict
it to DSL sentences only
* Error messages should be "friendlier" - as in "The sentence [....] is not
understood. Perhaps you mean't [... nearest match from the DSL expressions
...]" - if possible (would be nice !)
* DSL should work on whole drl files (as now) but *also* files which are
just one rule (in which case the package context comes from outside the
file, including the DSL etc). It may be desirable in this case to skip the
"end" as it is not needed (and looks out of place in a natural type scenario
- also the "rule XYZ" could be optional if the API tells the expander the
rule name, which may be the file name etc).

Does all that make sense?

Michael.

On 2/5/07, Edson Tirelli <tirelli at post.com> wrote:
>
>
>      All,
>
>      I will reintegrate/implement DSL support in drools-compiler, as we
> discussed before, as a pre-processor. I have some questions I would like
> to have your opinion about:
>
> Q1: Is there any reason for the DSL parser to be line based?
>
> Q2: I will make keywords configurable, so you can say "regra" for
> instance (in portuguese) instead of "rule", ok?
>
> Q3: Peter: I'm thinking in copy/port the DSL tree that you created into
> drools-compiler... I think we can leverage it to help create a better
> parser for the DSL, ok?
>
> Q4: do we need everything to be expandable in the DSL? or should we
> simply passthrough anything that is not expandable directly as a chunk
> to the DRL? Example:
>
> DSL:
> =====
> ...
> regra ABC
> se
>    ...
> entao
>    System.out.println( "BLABLA" );
> fim
> ...
> ====
>
>     Ok, I know that no business user will ever write
> System.out.println(), but it is just just an example. And the keywords
> are in portuguese for you guys to understand it better... ;)
>
>    Thanks for the feeback.
>
>    []s
>    Edson
>
> --
> Edson Tirelli
> Software Engineer - JBoss Rules Core Developer
> Office: +55 11 3124-6000
> Mobile: +55 11 9218-4151
> JBoss, a division of Red Hat @ www.jboss.com
>
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20070205/00783e98/attachment.html 


More information about the rules-dev mailing list