Averest


Ops1 Type

Ops1 declares an enumeration type of the unary operators of the MiniC language (this makes is flexible to add operators). Available operators are:

  • NotB: a bitwise negation of Cbool values.
  • CastB: instructs the type checker to interpret this machine word as boolean, i.e., make it a Cbool value.
  • CastN: instructs the type checker to interpret this machine word as Cnat, i.e., make it a Cnat value.
  • CastZ: instructs the type checker to interpret this machine word as Cint, i.e., make it a Cint value.
Note that cast operators do not change the machine word, but due to the different interpretation, the value might still change (since Cint interprets machine words using 2-complement while Cnat uses radix-2).

Union cases

Union case Description

CastB

Full Usage: CastB

CastN

Full Usage: CastN

CastZ

Full Usage: CastZ

NotB

Full Usage: NotB

Instance members

Instance member Description

this.getName ()

Full Usage: this.getName ()

Returns: string

Returns: string