Hi Enrique,
I think you can define an action with two actual actions in it. And select different action according to your parameter. Because in a transition if you want to select different actions you might need to modify SLICC class.
Good luck!
Hongxia SUN
2007/3/6, Enrique Vallejo Gutierrez <enrique@xxxxxxxxxxxxx>:
Sorry to repeat the question that has been just sent!!
This has been just asked last Sunday on the list, but the google
search didn't return any result as it hasn't already crawled the page.
Enrique Vallejo
_____________________________________________ De: gems-users-bounces@xxxxxxxxxxx
[mailto:gems-users-bounces@xxxxxxxxxxx] En nombre de Enrique Vallejo Gutierrez Enviado el: martes, 06 de marzo de 2007 13:22 Para: 'Gems Users'
Asunto: [Gems-users] Using Ruby parameters on SLICC code?
Dear list,
I was wondering if it is possible to customize the protocol behaviour depending on the values of Ruby parameters. This is, for example,
to define an action that would be different depending on the parameter that was specified at execution time:
If (RubyParameter1){ Do action a }else{ Take a different action }
Obviously, this is simple to implement with two different SLICC protocols, but I would like to know if it can be implemented in a single one, to simplify and use parameters at execution time, and to avoid defining and
modifying the same file multiple times with minor changes.
I have tried, with no success, to use the Protocol options (like TwoLevelCache or XactMemory) or RubyConfig options, but they are not recognized when the slicc code is parsed. I have seen that parameters can be
used, quoted, to determine queues latencies, but this is a special case which is considered in slicc\ast\EnqueueStatementAST.C. The only solution that comes to my mind is to use methods in a given class defined outside
SLICC (such as TransactionManager) that directly return the value of the given parameter (xact_mgr.getRubyParameter1(), etc), but that looks very ugly.
Has somebody some experience on this? I haven't found any information on
previous messages on the list.
Thank you in advance,
Enrique Vallejo <http://www.atc.unican.es/~enrique/> University of Cantabria, Spain <Archivo:
ATT00037.txt >>
_______________________________________________ Gems-users mailing list Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/
" to your search.
|