Create Skeleton Program
| createskelprog CGT-file Template-File [Target-File] |
One of the key obstacles for those using a specific implementation of the Engine is interacting with a table of rules and symbols. Each rule and symbol is to be uniquely identified by a table index. If a rule, for instance, has an index of 10 in the parse tables, the developer must use this value in their programs.
Manually typing each constant definition can be both tedious and problematic - given that a single incorrect constant could be difficult to debug. For most programming languages and scripting languages, the number of rules can easily exceed a hundred.
Program Templates are designed to resolve this issue. Essentially, program templates are a type of tool designed to help the programmer create a "skeleton program" which contains the source code that is necessary to use a particular implementation of the Engine. For instance, if an Engine is created for the Java Programming Language, a Program Template can be used to create a basic skeleton program to use it. This skeleton program would contain the necessary declarations and function calls to the Engine. In other words, Program Templates help a programmer use an Engine.
This program does not create any on-screen text. This allows the program to be easily be called from other applications. To check whether a grammar was successly analyzed, check the content of the target file.
| Field | Description |
| CGT File | Required. The Compiled Grammar Table file (.cgt) is created by the Builder application. |
| Template File | Required. The Windows version of the Builder stores all program templates in a subfolder of the main application. The command line version, however, accesses program templates from the current path. |
| Target File | Optional. If this field is left blank, the goldbuilder program will automatically create a filename using the CGT filename. The new filename will contain the same base, but will have the extension specified in the template file. For example, test.cgt could create test.cpp (if "cpp" is the extension specified in the template). |