gmCLPbasicTool

 

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 optional /subsystem identifier interacts with the startup script described below to determine the initial configuration of the tool.

 

The following command line switches are recognized:

 

Switch Description
ESEchoes the source code during the second pass of the compiler
ES1Echoes the source code during the first pass of the compiler
EXEchoes all XML specifications as they are processed
VB7Specifies that the target language should be Version 7 Basic. This switch has been deprecated
CSHSpecifies that the target language should be C#.
VBNSpecifies that the target language should be VB.NET.
USRSpecifies that the target language should reflect the user specified dialect as specified in the language description.
TEST1Specifies that the test1 special rules are to be followed.
TEST2Specifies that the test2 special rules are to be followed.
TEST3Specifies that the test3 special rules are the be followed.
LlibraryThe 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%.
TtargetThe 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.
XlocationIf extracted source files are being processed via their original reference locations, then this is the location of the extracted files to be used.
AoutputIf the default output is to be appended to an existing file, then this is the full name of that file.
CstorageIf 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=valueAny, 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
xmlA 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.
vbpA Visual BASIC project file is to be compiled, analysed, and authored using a template gmPL script.
aspAn ASP file is to be compiled, analysed, and authored using a template gmPL script.
idlThe 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.
vbiThe 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
idThe subsystem identifier
NameThe Name to be used to refer to the tool in the banner
VersionThe release version to be used
CompanyThe company/copyright to be used
LanguageThe full pathname of the compiled language file. No search for language files is performed.
LocalThe 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.
TargetThe 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.
SystemThe 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.
LibraryThe 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%.
DialectThe 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=valueAny, 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.



Table of Contents