The LABELEXP signature

Defines 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.


Synopsis

signature LABELEXP

Interface

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

Description

datatype labexp
Defines arithmetic expressions involving labels and integer constants.

valueOf la
Returns an integer which is the value of the label expression.

toString la
Returns an infix string representation of the label expression.



  Submit a comment on this page  

[ INDEX | TOP | Parent | Root ]

Author: Lal George
Last Modified: October 14, 1996
Copyright © 1996 Bell Laboratories