Go to the first, previous, next, last section, table of contents.


Mode

Only those patterns which match the current mode can match, the others are ignored. A mode is a sequence of one or more tokens, the names of the tokens or sequences can be user defined. The initial mode is <awk><nul> but this can be changed using the environment variable DFAMODE. If you are defining additional patterns it is advisable to set this to exclude the awk inbuilt patterns from matching as in the example below.

%%DEFINE DFAMODE		<usr><nul>
%%PATTERN "<usr><nul>"
%%PATTERN "<usr><u00>|<usr><u01>"

Note that in the above the bar operator separates options, so the second pattern is actually applicable in two modes. Since the bar operator has a lower precedence than the concatenation operator then the two modes are <usr><u00> or <usr><u01>. Brackets can be used if neccessary to avoid ambiguities in the input. Note that instead of the bar two patterns could have been defined which were identical in the other fields but one was defined for each mode it was to match under. The final result of using a bar or multiple patterns is identical.


Go to the first, previous, next, last section, table of contents.