gmplMetalanguageStatements

gmPL Metalanguage Statements

The gmPL Metalanguage statements define the intermediate language file that organizes the conversion of source language statements into target language statements.

A language definition includes library components as well as language components. The library components are described within the Declaration pages. The language statements described here are as follows:

Statement Description of use
Language This statement begins a language definition. There is only one language declared, Basic as used by gmBasic.
Default This statement is used to specify default control properties that are ultimately to be authored in the designer code.
Messages This statement supplies the actual text of the messages displayed. They are identified within gmBasic by a simple number.
Opcodes This statement associates identifiers with the numeric operation codes that specify the basic operations performed within the intermediate language.
Patterns This statement initiates the definition of surface patterns for the operation codes in the intermediate language.
Statements This statement is used to specify which statements are available in the language and what the attributes are of those statements. In this context, the languages defined are not the source language, VB6, but the internal languages used by gmBasic.

With the possible exception of the surface patterns, messages, and some of the enumerated types the entries in the language file should not be changed. The discussion here is intended to describe the language specification. The gmBasic tool itself aggressively uses the language information tables to control its operations. It is not, however, driven by them. The primary purpose of the language file is to act as a data store for gmBasic which expects that data to be present in its presently defined form.

A language definition file must start with a MetaLanguage statement which has one optional attribute LanguageFile. Though technically optional to facilitate default builds of gmBasic, it should always be used when needed for code base specific migrations. All processing performed by gmBasic is ultimately controlled via specifications in a compiled language file. A standard version of this file is distributed with the tool. If the LanguageFile attribute is omitted, then the new language definition will replace the existing default one. This default replacement is not recommended and may well be impossible in most implementations. To use a migration specific language file, the same LanguageFile attribute should be used with the initial statement in any command scripts associated with that migration. Thus a language file created as


<MetaLanguage LanguageFile="C:\Jira\PRM329\proj\lng\prm329Lang.vbi" >
    ...
</MetaLanguage>
would be used by command scripts like this


<gmBasic LanguageFile="C:\Jira\PRM329\proj\lng\prm329Lang.vbi" >
   ...
</gmBasic>

Table of Contents