[antlr-interest] how to best break apart multiple assignments
Sam Barnett-Cormack
s.barnett-cormack at lancaster.ac.uk
Wed Apr 1 00:41:24 PDT 2009
Bruce Bauman wrote:
> In the sometimes bizarre dialect of Pascal I am using (MetaWare), the following is allowed:
>
> Odd := Even := 0;
>
> I need to split this into:
>
> Odd := 0;
> Even := 0;
>
> Can somebody point me in the right direction?
I have a feeling it might be easier to break it more literally into an
equivalent of the MetaWare's presumed AST evaluation:
Even := 0;
Odd := Event;
By some tree flattening of some sort. I'd think about it more, but I
have to go and have my spine x-rayed.
--
Sam Barnett-Cormack
More information about the antlr-interest
mailing list