| iMatix home page
| Libero home page | Libero documentation
| << | < | > | >>
Libero Libero
Version 2.32

Generating Module Stubs

Take a hypothetical language where a module stub looks like this:

//###################  SOME FUNCTION   ##################//

MODULE some_function () {

}

To generate stubs like this we add these commands to the schema:

:internal initialise_the_program
:internal get_external_event
:set $module_line  = "MODULE %s () {"
:set $stub_first   = "//"
:set $stub_between = "#"
:set $stub_last    = "//"
:do stubs

MODULE $name () {

}

:enddo stubs

This is how it works:

The :do stubs command can come at any point in the schema. It does not do any output to the current output file. However, in many cases it is a good idea to list generated files in the :dostubs line, which means that this should come at the end of the schema, when everything has been generated.


| << | < | > | >>
| Libero Technical Reference | Read-Only Variables | Schema Commands | Syntax Of Expressions | Syntax Of Logical Conditions | Control Variables | Standard :do Conditions | Extra Variables In A :do Loop | General Rules for Code Generation | Generating Module Stubs | Generating COBOL Code | The State Machine Algorithm | Compiled-In Limitations | Quick Reference - Libero Schema Language
iMatix
Copyright © 1996-97 iMatix