PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
PPWIZARD'S REXX Syntax Checking |
PPWIZARD performs rexx syntax checking to try to pin point where a syntax error might be in these situations:
If nothing has been configured then the method used is pretty generic (basic), so it is worth a little bit of effort to configure. The /Syntax switch can be used to set up better checking. If the environment variables mentioned below are enough to configure the checking then this will automatically cause better checking to occur.
Some "test" code which will fail:
#output out\1.rex ASIS REXX OK = 1; OK = 2; OK = 3; OK = 4; OOPS = '5; OK = 6; #output
Note that PPWIZARD can't do a good job with rexx code placed directly into a #evaluate command (not via a #DefineRexx command).
For small blocks of code it is probably not that important but some of my headers evaluate tens or hundreds of lines of code!
The /Syntax switch does not affect this checking.
Some "test" code which will fail:
#DefineRexx '' OK = 1; OK = 2; OK = 3; OK = 4; OOPS = '5; OK = 6; #DefineRexx
PPWIZARD won't do anything useful for:
#evaluate ^^ ^a=1 ; b='; c=3^
But it would for:
#evaluate ^^ ^a=1 <?xRexxEos> b='<?xRexxEos> c=3^
However it would be much easier to use (and understand) the code when a #DefineRexx command is used to define the code and #evaluate used for later execution.
PPWIZARD_REGINA_SYNTAX_CMD |
You should set the value of this environment variable to the name of a rexx interpreter or program which can check the syntax and report the line that failed.
The line can contain the string "{?}" to indicate where the filename (for rexx code) should be placed. If not supplied it will be tacked on the end of command you supply (double quoted). If regina.exe was in the path then the command 'regina.exe "{?}"' would be OK.
When this value is not set and PPWIZARD has just trapped evaluating user code (#DefineRexx etc) then it will try to make a guess (if it fails you are no worse off), it will try:
Note that the above "defaults" are not used when checking generated rexx code because in that situation guessing wrong is worse than doing nothing.
PPWIZARD_REGINA_SYNTAX_LINE_MASK |
Once the above command has been run and its output captured a rexx "parse" command is executed to strip out the line number.
Basically supply some "before" and "after" text with "{?}" in the middle (to indicate position of line number).
The value for this environment variable defaults to a value suitable for the "regina" command as well as OS/2 native rexx.