Retyping multiple tokens

A special pattern-action set is available for retyping multiple occurrences of a token.

The pattern must have the following format followed by a standard RETYPE statement referencing operand [1]:


number*class

The number must be an integer from 0 to MAX_TOKENS (currently 40) and indicates the number of referenced occurrences. Zero means that all occurrences are scanned.

For example, if you processed hyphenated house numbers, like 123-45 Main St., and you want to remove all hyphens from the tokens that remain, use the following pattern action set:


0 * -
RETYPE [1] 0

This scans for all hyphens and retypes them to NULL. If you want to retype two numeric tokens to an unknown type with a value of UKN, you use the following pattern-action set:


2 * ^
RETYPE [1] ? "UKN"

The entire pattern is restricted to this simple format when multiple occurrences are referenced.