Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)
Table Of Contents
lex(1) OSS Shell and Utilities Reference Manual
-T Makes the lex command run in trace mode. It generates a lot of messages to the stan-
dard output file concerning the form of the input and the resultant nondeterministic and
deterministic finite automata. This flag is mostly for use in maintaining the lex com-
mand.
-8 Instructs the lex command to generate an 8-bit scanner (which is the default scanner).
-C[efmF]
Controls the degree of table compression. The default setting is -Cem, which provides
the highest degree of table compression. Faster-executing scanners can be traded off at
the cost of larger tables with the following generally being true:
Slowest and smallest
-Cem
-Cm
-Ce
-C
-C{f,F}e
-C{f,F}
Fastest and largest
-C flags are not cumulative; whenever the flag is encountered, the previous -C settings
are forgotten. The -f or -F and -Cm flags do not make sense together; there is no
opportunity for meta-equivalence classes if the table is not being compressed. Other-
wise, the flags may be freely mixed.
-C Specifies that the scanner tables should be compressed and neither
equivalence classes nor meta-equivalence classes should be used.
-Ce Directs the lex command to construct equivalence classes; for exam-
ple, sets of characters that have identical lexical properties.
Equivalence classes usually give dramatic reductions in the final
table/object file sizes (typically a factor of 2 to 5) and are inexpensive
in terms of cost versus performance (one array look-up per character
scanned).
-Cm Directs the lex command to construct meta-equivalence classes, which
are sets of equivalence classes (or characters, if equivalence classes
are not being used) that are commonly used together. Meta-
equivalence classes are often a benefit when using compressed tables,
but they have a moderate performance impact (one or two "if" tests
and one array look-up per character scanned).
-Cf Specifies that the full scanner tables should be generated; the lex com-
mand should not compress the tables by taking advantage of similar
transition functions for different states.
-CF Specifies that the alternative fast scanner representation should be
used.
5−50 Hewlett-Packard Company 527188-003