next up previous contents
Next: Usage of the Software Up: The Macro COSY Environment Previous: Functors

Structures

Finally, we need to declare some structures using functors in order to build the system:

     structure Prld = Prelude();
     structure Csy = Cosy();
     structure Lx = Lex(structure PRLD = Prld);
     structure Prsr_bldr = Parser_builder(structure LX = Lx);
     structure Prsr = Parser(structure PRLD = Prld
                           structure PRSR_BLDR = Prsr_bldr
                           structure CSY = Csy
                           structure LX = Lx);
     structure Csr_prld = Csr_prelude(structure CSY = Csy
                                structure LX = Lx
                                structure PRLD = Prld);
     structure Csr = Csr(structure CSY = Csy
                        structure CSR_PRLD = Csr_prld
                        structure PRLD = Prld);
     structure Trnsfrm = Transform(structure CSY = Csy
                                   structure PRLD = Prld
                                   structure CSR_PRLD = Csr_prld
                                   structure CSR = Csr);
     structure Pfrst = Pfirst(structure CSY = Csy
                              structure PRLD = Prld);
     structure Xpnd = Expand(structure CSY = Csy
                             structure PRLD = Prld
                             structure CSR_PRLD = Csr_prld
                             structure CSR = Csr);

Because the functor Cosyenv combines all functions, so, all the above structures are the parameters of the functor Cosyenv:

     structure Csynv = Cosyenv(structure CSY = Csy
                               structure LX = Lx
                               structure PRLD = Prld
                               structure PRSR_BLDR = Prsr_bldr
                               structure PRSR = Prsr
                               structure CSR_PRLD = Csr_prld
                               structure CSR = Csr
                               structure PFRST = Pfrst
                               structure TRNSFRM = Trnsfrm
                               structure XPND = Xpnd);



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