next up previous contents
Next: The Main Signatures Up: The Macro COSY Environment Previous: Introduction

Signatures

Firstly, let's see the signature of the main module called COSYENV:

     signature COSYENV =
       sig
         val display : string -> unit
         val parser_csr_expand : string -> string
       end

Inside the body of signature COSYENV we can see that we have defined two functions. One function is display. It acts as a displayer which reads an expanded COSY program as a string and displays it on the screen. The other function is parser_csr_expand. It inputs the Macro COSY program as a string and outputs an expanded COSY program as a string as well. As the name indicates, it parses first, and then, checks the context- sensitive restrictions (csr for short), finally, does the expansion. When we define a structure for the COSY environment (we will discuss the structure later), we need to use four main signatures and six auxiliary signatures to assist.

Main signatures:

displaymath6765

Auxiliary signatures:

displaymath6766





Peter Lauer
Mon Jul 22 17:29:46 EDT 1996