Gmsl is a nonterminal, utility statement that occurs in command scripts and within Refactor statements. The statement introduces Great Migrations Scripting Language gmSL subprograms that can then be executed. The conventions of gmSL itself are described elsewhere.
The attributes of the gmSL statement are as follows:
The required identifier of the namespace of the class. There is one reserved namespace gmSL that contains code called by gmBasic itself. The other namespace convention relates to library refactoring files. Here the value of the event attribute of the refactor command is the required namespace.
The identifier of the class within the namespace that the code belongs to.
The name of the file that contains the source code to be compiled. If this attribute is omitted then the source is assumed to be contained within the script itself. The extension for this source file should be gmsl. These gmsl source files contain only gmSL source code and no gmPL statements or XML-style syntax. It is strongly recommended that any nontrivial gmSL code be placed in an external gmsl file.
The gmSL statement has no substatements as such. When the Source attribute is omitted, the gmSL source itself is contained within the statement bounded by the Xml CDATA notation. This might look as follows.
<gmSL namespace="gmSL" class="TextCode" ><![CDATA[
There is also a command version of the gmSL statement which contains no attributes at all. The code contained within the starting and ending tag is executed immediately. The following gmPL script shows how a gmSL commands be used to debug a malfunctioning script.
Note that single gmSL statements can be entered on a single line, but one or more statements may be grouped together using a block format.
The script errors associated with the gmSL statement are as follows:
The gmSL attributes namespace and class are both required.
Unable to open gmSL source file: %1d
Unable to add project [%1d] to data storage area.
Unable to add code [%1d] to data storage area.
Encountered EOF while reading gmSL code from script.
In more detail, the gmSL statement directs gmBasic to compile a gmSL class and to store its code and symbol information so that it can be compiled and can be executed by the standard execution engine. The gmSL compiler processes a simple contemporary syntax much like that used by Java or C#. The details of the gmSL language are described elsewhere.