pattern | The name of a RULE parsing pattern. |
symbol | A string constant specifying the name to use in the USE option on a PARSE function or the USE function in a RULE parsing pattern. |
Return: | DEFINE creates a RULE pattern. |
The DEFINE function defines a symbol for the specified pattern that may be forward referenced in previously defined parsing pattern attributes. This is the only type of forward reference allowed in ECL.
Example:
RULE a := USE('symbol');
//uses the 'symbol'pattern defined later - b
RULE b := 'pattern';
//defines a rule pattern
RULE s := DEFINE(b,'symbol');
//associate the "b" rule with the
//'symbol' for forward reference by rule "a"
See Also: PARSE, PARSE Pattern Value Types