16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

lex<br />

Options<br />

For a description of the typedefs, constants, variables, macros, and functions in the<br />

table file, which can be used to access the lexical analyzer’s variables or to control<br />

its operations, see z/<strong>OS</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> Programming Tools.<br />

–a Generates 8-bit tables instead of 7-bit tables. On systems with 8-bit<br />

character sets (such as this one), this option is always enabled.<br />

–c Generates C code. Because this is the default, this option is provided only<br />

for compatibility with other implementations.<br />

–h Prints a brief list of the options and quits.<br />

–l Suppresses #line directives in the generated code.<br />

–n Suppresses the display of table sizes by the –v option. If you did not<br />

specify –v and their are no table sizes specified in file.1, lex behaves as<br />

though you specified –n.<br />

–o file.c<br />

Writes the lexical analyzer (internal state tables) onto the named output file,<br />

instead of the default file lex.yy.c.<br />

–P proto<br />

Uses the named code file, instead of the default prototype file /etc/yylex.c.<br />

–p prefix<br />

Uses the given prefix instead of the prefix yy in the generated code.<br />

–T Writes a description of the analyzer onto the file l.output.<br />

–t Writes the lexical analyzer onto standard output (stdout) instead of the file<br />

lex.yy.c.<br />

–v Displays the space used by the various internal tables. Normally lex<br />

displays these statistics on stdout, but if you also specified the –t option, it<br />

displays them on stderr. If you did not choose this option and file.1<br />

specifies table sizes, lex still displays these statistics unless you specified<br />

the –n option.<br />

The lex library contains a number of functions essential for use with lex. These<br />

functions are described in z/<strong>OS</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> Programming Tools . The<br />

actual library to use depends on your system and compiler. For z/<strong>OS</strong> programs, you<br />

should use –ll.<br />

Some lex programs can cause one or more tables within lex to overflow. These<br />

tables are the NFA, DFA, and move tables; lex displays an appropriate message if<br />

an overflow occurs. You can change table sizes by inserting the appropriate line<br />

into the definition section of the lex input, with the number size giving the number of<br />

entries to use. This is shown in Table 15.<br />

Table 15. Internal Table Sizes (lex command)<br />

Line Table Size Affected Default<br />

%esize Number of NFA entries 1000<br />

%nsize Number of DFA entries 500<br />

%psize Number of move entries 2500<br />

You can often reduce the NFA and DFA space to make room for more move entries.<br />

344 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!