On Wednesday 19 September 2007 05:53:25 Ian Piumarta wrote:
>
> You can put actions anywhere, so one way would be to split the action
> between the 'x' and the 'tail' part, like this:
>
> rule = 'x' { action-for-x } ( xt:tail { action-for-tail-following-x } )?
>
>       | 'y' ...
>
> (although you might then end up with redundancy in the second action).
>

I see... That would indeed work in a number of cases, but in my case I wanted 
a "global" action after completion of the full rule, which uses both 
variables, except if xt had not parsed. I guess this could be achieved by 
making the tail-action manipulate the xt variable in a particular way, which 
can be recognised later on, but at the moment I believe the following is 
helping as well:

rule = { (set xt 0) } 'x' { action-for-x } xt:tail? { (if (== xt 0)... }

It comes down to a manual reset of the stack locations, and at first sight 
eliminates the problem...

Cheers,

Hans




-- 
A liberal is a person whose interests aren't at stake at the moment
  -- Willis Player

Hans Schippers
Research Assistant of the Research Foundation - Flanders (FWO - Vlaanderen)
http://www.win.ua.ac.be/~hschipp/
Formal Techniques in Software Engineering (FoTS)
University of Antwerp
Middelheimlaan 1
2020 Antwerpen - Belgium
Phone: +32 3 265 38 71
Fax: +32 3 265 37 77

_______________________________________________
fonc mailing list
[email protected]
http://vpri.org/mailman/listinfo/fonc

Reply via email to