[rules-users] DSL to DRL File Conversion - Is it possible ?

Mark Proctor mproctor at codehaus.org
Wed Mar 7 07:12:41 EST 2007


Its not straight forward but you can use the DRLDumper, one a 
PackageDescr, assuming it parses without errors:
        DrlParser parser = new DrlParser();
        PackageDescr pkg = parser.parse( source,
                                                              dsl );
        final DrlDumper drlDumper = new DrlDumper();
        final String drlResult = drlDumper.dump( pkg );



Michael Neale wrote:
> no in 3.0 version unfortunately. You can tell the parser to print out 
> the DRL - but it will just write it out the System.out (only for 
> debuggin). Look in RuleParser for that option.
>
> In trunk - which will be the new version - there is a seperate step 
> which outputs DRL - but I don't think that made it into the M1 release 
> - should be in M2 though.
>
> On 3/7/07, *kingston* <raja_kingston at yahoo.co.in 
> <mailto:raja_kingston at yahoo.co.in>> wrote:
>
>
>     Is there anyway to get the DRL syntax out of the DSL format?
>
>     Is there any Convenient API method Which takes rule in DSL format
>     and the
>     DSL File Name as arguments and returns the DRL Syntax ?
>
>     --
>     View this message in context:
>     http://www.nabble.com/DSL-to-DRL-File-Conversion---Is-it-possible---tf3360408.html#a9347582
>     Sent from the drools - user mailing list archive at Nabble.com
>     <http://Nabble.com>.
>
>     _______________________________________________
>     rules-users mailing list
>     rules-users at lists.jboss.org <mailto:rules-users at lists.jboss.org>
>     https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070307/ad9ee8de/attachment.html 


More information about the rules-users mailing list