Create Skeleton Program

Format

goldprog Table-file Template-File [Target-File] [options]

Overview

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 successfully analyzed, check the content of the target file.

Details

Field Values Description
Table-File   Required. This can be either a CGT or EGT file.
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 program will automatically create a filename using the EGT filename. The new filename will contain the same base, but will have the extension specified in the template file. For example, test.egt could create test.cpp (if "cpp" is the extension specified in the template).
Options +verbose,
-verbose
If this flag is set to true, the program will output progress text to the screen as well as error messages. If set to false, no output will be generated. It defaults to true.

 

Note: If you prefer, you can use the common / character for designating options. The slash will be interpreted as a +.  So, +verbose can be specified as /verbose.