John,

You are right "parser" is a poor choice.  I was just using your class name 
(Ruote::Parser) and I certainly understand what ruby_dsl does.
I agree that I can have my own DSL that can live happily with process 
definitions so I do not have to hide them inside participants.  That's fine 
too.  But there seems to me that there are some major similarities... :) ... 
that could be leveraged... may be later...

Pat.


On May 17, 2010, at 11:24 PM, John Mettraux wrote:

> 
> On Mon, May 17, 2010 at 10:52:11PM -0400, Cappelaere Patrice wrote:
>> Since you asked:
>> 
>> Ruote.process_definition :name => 'my def 2', :revision => 0 do
>>  sequence do
>> 
>>    set :field=>'red', :value=>3
>>    set :field=>'green', :value=>4
>>    set :field=>'blue', :value=>band(4)
>> 
>>    # crashes set :field=>'blue' do
>>    #  band :number=> 4
>>    #end
>> 
>>    composite_visible :r=>'${f:red}', :g=>'${f:green}', :b=>'${f:blue}'
>>  end
>> end
>> 
>> create a file in public to hold that definition and load it in ruote_fluo
>> first two sets do not show up
>> third set shows up as "band 4"
>> fourth commented set crashes
> 
> ruote-fluo is not meant to display/edit process definition where you call 
> ruby function at "define time".
> 
> Sorry for the lack of warning signals about that.
> 
> 
>> [Note: wouldn't it be nice to be able to define the variables and then use 
>> them directly?
>> like:
>> 
>> red = band :number=>5
>> green = band :number=>4
>> blue = band :number=>3
>> 
>> composite_visible :r=>red :g=>green, :b=>blue
> 
> Sorry, but ruote is not interpreting ruby directly, it's interpreting process 
> definition expressed as
> 
>  [ expression_name, attribute_hash, children_expression_array ]
> 
> As I've said previously, "parser" is a poor choice, "generator" would be 
> better.
> 
> Ruote is not parsing ruby code, it is executing ruby code to generate process 
> definition trees.
> 
> Now, that leaves you free to come up with a generator that takes as input any 
> dialect you want.
> 
> 
> 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