Chapter 22. The C and F (Class Macro) Configuration Commands
In the LHS of rules it is sometimes advantageous to compare individual tokens to multiple strings when determining a match. The configuration class command provides this ability. The class command is similar to the macro definition command, except that instead of assigning a single value to a macro, it assigns many values to a class. Classes differ from macros in that they can be used only in the LHS of rules, whereas macros can be used in either the RHS or the LHS.
Two different configuration commands can be used to assign values to
a class. The C configuration command is used to
assign values from within the configuration file. The
F configuration command is used in three ways: to
assign values by reading them from a disk file, to assign values by
looking up a key in a database, or to assign values by running a
program and reading the output. These commands can be intermixed to
create a single class, or used separately to create multiple classes.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access