Header Tags

Overview

There are a number of preprocessor fields in each template which contain information about the target programming language, Engine name, author and instructions on how to create identifier names. The order of each field is unimportant, but all should be located at the start of the template file. When the GOLD Parser Builder reads through the program templates in the templates subfolder, it only checks the first 50 or so lines

Most of the fields are informative and have to effect on how the skeleton program is created. However, the fields that related to the format of the identifiers are important.

Structure

[ ##TEMPLATE-NAME Template-Name ]
[ ##LANGUAGE ProgName ]
[ ##ENGINE-NAME Engine-Name ]
[ ##AUTHOR Author-Name ]
[ ##FILE-EXTENSION Extension ]




[ ##NOTES
...
##END-NOTES ]

Field Descriptions

Name Description
##TEMPLATE-NAME This field sets the formal name for the template. The name of the programming language and engine can be part of the template name as well as features of the template itself, but this is entirely up to the developer.
##LANGUAGE This field contains the name of the template's programming language. The field is merely informative.
##ENGINE-NAME This field designates the name of the GOLD Parser Engine that the template is designed to use. Currently the field is merely informative, but in the future it may be used categorize templates.
##AUTHOR This field designates the name of the template's author. It is merely informative.
##FILE-EXTENSION When a skeleton program is created, the file will saved with this extension.
##NOTES The notes tag allows the developer to describe the template in detail and add any information that can help the user. Normally, the NOTES tag is used in block form - since the description can be quite lengthy.
##ID-CASE When the GOLD Parser Builder creates identifiers for each constant, the system can put each in either ProperCase or Uppercase. This value should be set to the standard conventions used in the target language. Lowercase will be supported in the next version.
##ID-SEPARATOR For readability, many programming languages allow the use of characters, such as underscores and dashes, to be used in identifiers. The value of this field will used in the constant names.
##ID-SYMBOL-PREFIX The value of this field will be added to the front each generated symbol constant.
##ID-RULE-PREFIX The value of this field will be added to the front each generated rule constant.
##DELIMITER This parameter sets the value of the Delimiter variable. This variable is used in the construction of rule and symbol lists.

Example

##TEMPLATE-NAME 'Visual Basic - ActiveX DLL'
##LANGUAGE 'Visual Basic'
##ENGINE-NAME 'ActiveX DLL'
##AUTHOR 'Devin Cook'
##FILE-EXTENSION 'bas'
##NOTES
This template creates a Visual Basic program for use with the ActiveX DLL
The code will work with both Visual Basic 5 and 6.
##END-NOTES
##ID-CASE Propercase
##ID-SEPARATOR '_'
##ID-SYMBOL-PREFIX 'Symbol'
##ID-RULE-PREFIX 'Rule'