gmCLPbasicTool
- Mark Juras
Â
The pBasic Command Line Tool
The primary purpose of the pBasic command line tool is to execute gmPL scripts, though it performs a few other functions as well. The syntax of the command line is as followsÂ
pBasic[/subsystem] filename [switches]
Â
The following command line switches are recognized:Â
Switch | Description |
ES | Echoes the source code during the second pass of the compiler |
ES1 | Echoes the source code during the first pass of the compiler |
EX | Echoes all XML specifications as they are processed |
VB7 | Specifies that the target language should be Version 7 Basic. This switch has been deprecated |
CSH | Specifies that the target language should be C#. |
VBN | Specifies that the target language should be VB.NET. |
USR | Specifies that the target language should reflect the user specified dialect as specified in the language description. |
TEST1 | Specifies that the test1 special rules are to be followed. |
TEST2 | Specifies that the test2 special rules are to be followed. |
TEST3 | Specifies that the test3 special rules are the be followed. |
Llibrary | The full path of a library storage area. For pBasic, this is the location of the cached Interop libraries. To use this area, the location and AxLocation attributes in the Library specifications in the Interface file must begin with the metasymbol %library%. |
Ttarget | The full path of the Application target area. This is the first location searched and normally contains application specific files. For pBasic, this is the location of the SmartPort files. |
Xlocation | If extracted source files are being processed via their original reference locations, then this is the location of the extracted files to be used. |
Aoutput | If the default output is to be appended to an existing file, then this is the full name of that file. |
Cstorage | If the default memory storage is to use a persistent file, then this is the name of that file. Note that this switch has a special meaning when used with an information file audit request. |
attr=value | Any, and as many as desired, Select Command attribute-value pairs may be included as well. Attributes selected here override any specifications in either the Language File or the Startup File. |
Â
The actual task performed by the tool depends upon the filename extension. The following different file types are recognized:
Â
Ext | Description of task |
xml | A gmPL control script is to be executed. If no extension is supplied then this is assumed. These control scripts are used to load and process source files; to process and produce external library descriptions; to compile and save language descriptions; and to work with the saved information files produced. |
vbp | A Visual BASIC project file is to be compiled, analysed, and authored using a template gmPL script. |
asp | An ASP file is to be compiled, analysed, and authored using a template gmPL script. |
idl | The specified IDL file, describing an external library, is to be processed and then reauthored as an XML-based library description file for use within this tool. |
vbi | The content of the specified information file produced by a previous use of the tool is to be audited into text form for easy analysis and review. |
In addition to the command line, pBasic has associated with it an xml startup script. Startup scripts must have the same name as the executable file, except for the xml extension, and must reside in the same directory as the executable for the tool. The purpose of these startup files is to control how the tool presents itself and to specify the exact locations of the files that determine the behavior of the tool. These files do not in themselves control what the tools do, only where the tools should look for detailed information. The tool executables can be renamed and/or moved at will. The only restriction is that the startup file be renamed and moved in the same manner. Since it is often desirable to have multiple configurations available, each Startup file consists of a series of subsystems, which have an id and then an independent set of specifications. Different subsystems are activated by following the tool name with a slash and then the subsystem id. If no subsystem id is used then the first subsystem is active.
Â
For each subsystem the following attributes can be specified:
Â
Attribute | Description |
id | The subsystem identifier |
Name | The Name to be used to refer to the tool in the banner |
Version | The release version to be used |
Company | The company/copyright to be used |
Language | The full pathname of the compiled language file. No search for language files is performed. |
Local | The full path of the Local storage area. This area is used by the tools for their own intermediate output. In the case of pBasic, it is the place where AuthorLibrary sends its files. |
Target | The full path of the Application target area. This is the first location searched and normally contains application specific files. For pBasic, this is the location of the SmartPort files. |
System | The full path of the System storage area. This is the final location searched and normally contains the generic, non- application specific files. For pBasic, this is the location of the PurePort files. |
Library | The full path of a library storage area. For pBasic this is the location of the cached Interop libraries. To use this area, the location and AxLocation attributes in the Library specifications in the Interface file must begin with the metasymbol %library%. |
Dialect | The only exception to the location only rule for the startup files is the Dialect attribute. The tools are all capable of producing multiple target dialects. This attribute controls the default dialects. |
attr=value | Any, and as many as desired, Select command attribute-value pairs may be included as well. Attributes selected here override any specified in the language file. |