Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-27 13:48:32 -0800 (Sun, 27 Mar 2005)
Revision: 7057
Log message:
Updated polymorphism in Aleksey's sweeper, and ported it to the backend.
This is really cool--it caught several sweep errors in the backend.
A short note on the style used in the grammars (I know I should
document this). When we define a new kind of term, the general
style is to define a "proper" term that does not include variables.
production proper_foo{'e} <-- ...
Then add the variables:
production foo{'e} <-- sovar{'e}
production foo{'e} <-- tok_quotation{'e}
production foo{'e} <-- proper_foo{'e}
The so_arg{'e} represents arbitrary expressions. If it is not
ambiguous, add a proper_so_arg{'e}. This is mainly so we don't
have to type so much.
production proper_so_arg{'e} <-- proper_foo{'e} (* Optional *)
Then add the named so_arg. Note that we use the generic foo{'e}
here.
production proper_so_arg{'e} <-- tok_foo; foo{'e}