LABELEXP signatureDefines simple arithmetic over labels. The MLRisc language could have been used for this purpose, however, it would have allowed a much larger language, most of which would be illegal. In the future, if need warrants, the expression language defined here may be changed to use MLRisc instead.
signature LABELEXP
datatype labexp
= LABEL of Label.label
| CONST of int
| PLUS of (labexp * labexp)
| MINUS of (labexp * labexp)
| MULT of (labexp * labexp)
| DIV of (labexp * labexp)
| LSHIFT of (labexp * int)
| RSHIFT of (labexp * int)
| AND of (labexp * int)
| OR of (labexp * int)
val valueOf : labexp -> int
val toString : labexp -> string
datatype labexp
valueOf la
toString la
Submit a comment on this page
Author: Lal George
Last Modified: October 14, 1996
Copyright © 1996 Bell Laboratories