[m-rev.] State variable syntax transformation

Simon Taylor stayl at cs.mu.OZ.AU
Thu Feb 14 22:30:19 AEDT 2002


On 12-Feb-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> On 07-Feb-2002, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> > +xform_compound(S,
> > +        functor(atom(","), [P0, Q0], C),
> > +        functor(atom(","), [P,  Q ], C),
> > +        VS0, VS
> > +) :-
> 
> prog_io_state_vars should be called after the goal has been parsed by
> prog_io_goal. This will avoid problems if new syntax is added.
> For example, you haven't handled parallel conjunctions (&).

I've given this some more thought. This problem and the problems
with lambda expressions mentioned in other messages are caused by
trying to perform the transformation on a parse tree that isn't
parsed enough. prog_data__goal isn't parsed enough either (lambda
expressions aren't parsed until make_hlds). You may want to consider
doing the state variable transformation as part of make_hlds__transform.

Simon.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list