Directives

USER_LEX

Define Directive Keywords

Format

USER_LEX alt_string$=directive$
 
Where:

alt_string$

Alternate/translated form to be used in place of a PxPlus directive.

directive$

Standard PxPlus directive.

Description

Use the USER_LEX directive to extend the internal PxPlus compiler definitions to include new symbols and directives. Use this directive to simplify a conversion from other languages to PxPlus.

After PxPlus executes the USER_LEX directive, any statements sent to the PxPlus compiler where the alternate string expression is found will be translated into the internal object code for the standard string in directive$. It is mandatory that you use valid PxPlus object syntax in the directive$. Use spaces in the string expression to indicate that spaces can exist in the string when compiling.

Example

To allow the use of SPC( ) in lieu of PAD( ):

user_lex "SPC ("= "PAD ("

Note:
The internal syntax values in the directive$ must include the proper spacing and all related control characters.

In the above example, "SPC"="PAD" alone is not acceptable. You must include the space and open parenthesis after SPC and after PAD to indicate that a space can occur between the words (SPC/PAD) and the open parenthesis.