*Compiler - Command line compiler/lister v11.00

From PxPlus

Jump to: navigation, search

The *compiler program will automatically be called whenever the command line starting pxplus contains -cpl or -lst. Internally when either of these parameters are detected in the command line, the system will run *compiler as the lead program and pass all command line parameter starting with the -cpl or -lst to the program.

The purpose of this program is to then parse the command line to extract the name of a program file and either compile a text file from source to create the program or list the program. Errors will display in the error output as filename:lineno:chofst: errmsg.


-CPL function

When the command line contains the -cpl tag, the *compiler program will look for the source file provided, convert it to a program file and output any errors on *stderr* or an error file specified on the command line.

The syntax of the -CPL option is as follows:

pxplus -cpl [ sourcetext ] programfile [ -pswd password ] [ -err errfile ]


Where Is the
sourcetext Optional pathname of the source program. If omitted the *compiler program is to read the source file from *stdio* (stdin). If provided this file MUST exist.
password Password to apply to programfile.
programfile Output program file to receive the compiled code. This file will be created if it does not exist.
errfile File to receive the listing of any errors that are found in the source file. If the -err parameter is not supplied the errors (if any) will be sent to *stderr*.

Notes: (1)When using the -tag (-err|-pswd) optional parameters the -tag is required. (2)[ ] indicates optional parameters.


-LST function

When the command line contains -lst the *compiler program is expected to take a program file and list it to either an ASCII text file or stdout.

The syntax of the -LST option is as follows:

pxplus -lst programfile [ sourcetext ] [ -pswd password ] [ -err errfile ]


Where Is the
programfile Input program file that is to be converted to list format. This file must exist.
sourcetext Optional pathname of the file to receive the ASCII list of the program. If omitted the program will be listed to *stdio* (stdout). If provided this file will be created if it doesn't already exist.
password Password to apply to programfile.
errfile Optional file to receive the listing of any errors that are found in the source file. If the -err parameter is not supplied, errors (if any) will not be presented.

Notes:(1)When using the -tag (-err|-pswd) optional parameters the -tag is required. (2)[ ] indicates optional parameters.

Examples

[path]pxplus[.exe] -CPL pgm\pgrm.txt pgm\pgrm.pxp -err tmp\err.txt -pswd password
[path]pxplus[.exe] -CPL pgm\pgrm.txt pgm\pgrm.pxp -err tmp\err.txt
[path]pxplus[.exe] -CPL pgm\pgrm.txt pgm\pgrm.pxp 2>tmp\err.txt
[path]pxplus[.exe] -CPL pgm\pgrm.pxp -err tmp\err.txt 0<pgm\pgrm.txt
[path]pxplus[.exe] -CPL pgm\pgrm.pxp 2>tmp\err.txt 0<pgm\pgrm.txt
[path]pxplus[.exe] -LST pgm\pgrm.pxp pgm\pgrm.txt -err tmp\err.txt
[path]pxplus[.exe] -LST pgm\pgrm.pxp pgm\pgrm.txt
[path]pxplus[.exe] -LST pgm\pgrm.pxp -err tmp\err.txt 1>pgm\pgrm.txt
[path]pxplus[.exe] -LST pgm\pgrm.pxp 1>pgm\pgrm.txt
[path]pxplus[.exe] -LST pgm\pgrm.pxp -pswd password 1>pgm\pgrm.txt
[path]pxplus[.exe] -LST pgm\pgrm.pxp -err tmp\err.txt -pswd password 1>pgm\pgrm.txt
Personal tools