John,

Well... parser.rb takes a definition (from a file, string...) creates a new 
instance of a  Ruote::Parser, calls parse...
calls ruby_eval... which eventually calls the ruby_dsl.
Coming from ruote_fluo, it is a JSON string parsed to a tree back to ruby...

So there is quite a bit of transformation involving strings here....

I would love to be able to use more ruby code within a pdef like...
and pass it to ruote_fluo to display as a workflow

pdef = Ruote.process_definition do
    sequence do
        x = some_function(3 + ${f:v})
        y = 1 + 5 / 6       
        alpha x, y
        bravo
    end
end

actually in my case it would be more like:
pdef = Ruote.algorithm_definition do
    sequence do
        x = some_function(3 + ${f:v})
        y = 1 + 5 / 6       
        alpha x, y
    end
end

and then use those algos as subprocess....

Does this make sense?

Pat.

On May 17, 2010, at 7:13 PM, John Mettraux wrote:

> 
> On Mon, May 17, 2010 at 11:00:45AM -0400, Cappelaere Patrice wrote:
>> 
>> Yes, I am talking about that ruby_dsl.rb.
>> Its purpose is basically to return a parse tree for your DSL, right?  so why 
>> not use ParseTree?
> 
> Hello,
> 
> because my ruby_dsl takes as input ruby blocks and not strings of ruby code.
> 
> At one extreme, consider :
> 
> ---8<---
> pdef = Ruote.process_definition do
>  sequence do
>    alpha
>    bravo
>  end
> end
> 
> engine.launch(pdef)
> --->8---
> 
> Should I turn the block back into a String before passing it to ParseTree ?
> 
> 
>> [There is a bunch of issues with set expressions... that I was not sure to 
>> bring up before I got an exchange going]
> 
> Bring it on.
> 
> 
> Best regards,
> 
> -- 
> John Mettraux - http://jmettraux.wordpress.com
> 
> -- 
> you received this message because you are subscribed to the "ruote users" 
> group.
> to post : send email to [email protected]
> to unsubscribe : send email to [email protected]
> more options : http://groups.google.com/group/openwferu-users?hl=en

-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en

Reply via email to