Skip to content

gmplTypesStatement

Types is a nonterminal metalanguage statement that initiates the definition of the low level data types to be used by the parser. gmBasic has highly optimized retrieval algorithms that restrict the number of simultaneous retrieval sequences that can be occurring. The lowest level component of the compiler is the parser that converts the individual lexemes, the actual words and punctuation marks, in the source statements into token type, lexeme pairs. Tokens are language independent codes that identify the actual roles of lexemes. To do the parse gmBasic needs to do a retrieval that takes a lexeme and looks up its token type. A separate simple data type is needed to do this retrieval so that the low level parsing operation is guaranteed not to interfere with the higher level symbol table retrievals being performed by the compiler. This data type is referred to as a “standard list” which contains a simple collection of name, integer value pairs. The Types statement creates a set of standard lists that contain these lists of information needed by the parser. They are as follows:

ListDescription of use
TypesThe names and codes of the basic binary types recognized by the metalanguage. The
names of the lists below are also considered to be “user types” within this list.
ReservedWordsThe Vb6 reserved words like And, As, ByRef, ByVal,
DoEvents, etc. and their associated token type codes.
SymbolsThe VB6 symbols like +, _, ^, etc. and their associated token
type codes.
JscriptWordsThe JavaScript reserved words and their associated token type codes.
JscriptSymbolsThe JavaScript symbols and their associated token type codes.
VbsWordsThe VbScript reserved words and their associated token type codes.
VbsSymbolsThe VbScript symbols and their associated token type codes

The Types statement has no attributes.

The substatements of the Types statement are as follows:

SubstatementDescription
TypeThis substatement defines either a simple entry in the Types list or introduces
one of the secondary lists.


Type is a terminal, or nonterminal metalanguage substatement that occurs within the Types statement. Both forms of the statement add an entry to the list of basic binary types recognized in the metalanguage. The nonterminal form adds a secondary list to the type.

The attributes of the Type statement are as follows:

AttributeDescription
IdThis attribute is the name of the name, value pair being entered into the Types list.
These names must be unique within the list. They are not case sensitive.
IndexThis attribute is the value of the name, value pair being entered into the Types list.
It must be an integer value between 0 and 255. It need not be unique.

If the statement is not terminal it introduces a secondary list that is accessible via the name. The substatements of the Type statement are as follows:

SubstatementDescription
EntryThis substatement defines a simple entry in the secondary list.

The attributes of the Entry statement are as follows:

AttributeDescription
IdThis attribute is the name of the name, value pair being entered into the secondary list.
These names must be unique within the list. They are not case sensitive.
IndexThis attribute is the value of the name, value pair being entered into the secondary list.
It must be an integer value between 0 and 255. It need not be unique.

The script errors associated with the Type statement are as follows:

ErrorDescription
1087The list member identifier must be specified.
1088Illegal statement in Types block: %1d