RuleID

:RuleID("ID") 

This command is optional.

When you create a rule, you can assign an ID to that rule by using this command. The ID is specified by appending :RuleID("ID"), where "ID" is an alphanumeric identifier you give the rule. If you do not assign an identifier to the rule, Spectrum Technology Platform will generate a numeric ID for the rule. If multiple rules exist, they will be numbered sequentially, based on run order ("1", "2", "3", and so on).

For example:

%IgnoreCase;
%InputField("Name");
%OutputFields("FirstName", "LastName", "FirstName2", "LastName");

<root>=<FirstName><LastName> :RuleID("Name") |
		<FirstName> '&' <FirstName2> <LastName> :RuleID("CompoundName");
							
<FirstName>=@Table("Given Names");
<FirstName2>=@Table("Given Names");
<LastName>=@Table("Family Names");

In the example above, the root rule contains two rules. The first one, with RuleID "Name", matches FirstName and LastName: <FirstName><LastName> :RuleID("Name")

The second rule, with RuleID "CompoundName", matches FirstName and LastName but also includes FirstName2: <FirstName> '&' <FirstName2> <LastName> :RuleID("CompoundName")

The output of these rules would look similar to the following:

The example below shows the grammar without a user-defined RuleID.
%IgnoreCase;
%InputField("Name");
%OutputFields("FirstName", "LastName", "FirstName2", "LastName");

<root>=<FirstName><LastName> |
		<FirstName> '&' <FirstName2> <LastName> ;
							
<FirstName>=@Table("Given Names");
<FirstName2>=@Table("Given Names");
<LastName>=@Table("Family Names");

The output of these rules would look similar to the following:

To use this command:

  1. Position the cursor where you want the command inserted.
  2. Double-click :RuleID in the Commands list.
  3. Type an alphanumeric value in the text box.
  4. Click OK.