3 SPDX-FileCopyrightText: Copyright The SCons Foundation (https://scons.org)
4 SPDX-License-Identifier: MIT
5 SPDX-FileType: DOCUMENTATION
7 This file is processed by the bin/SConsDoc.py module.
11 <!ENTITY % scons SYSTEM '../../doc/scons.mod'>
13 <!ENTITY % builders-mod SYSTEM '../../doc/generated/builders.mod'>
15 <!ENTITY % functions-mod SYSTEM '../../doc/generated/functions.mod'>
17 <!ENTITY % tools-mod SYSTEM '../../doc/generated/tools.mod'>
19 <!ENTITY % variables-mod SYSTEM '../../doc/generated/variables.mod'>
23 <sconsdoc xmlns="http://www.scons.org/dbxsd/v1.0"
24 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
25 xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 http://www.scons.org/dbxsd/v1.0/scons.xsd">
30 Sets construction variables for the &lex; lexical analyzer.
37 <item>LEXUNISTD</item>
40 <item>LEXCOMSTR</item>
42 <item>LEX_HEADER_FILE</item>
43 <item>LEX_TABLES_FILE</item>
50 The lexical analyzer generator.
58 The command line used to call the lexical analyzer generator
59 to generate a source file.
64 <cvar name="LEXCOMSTR">
67 The string displayed when generating a source file
68 using the lexical analyzer generator.
69 If this is not set, then &cv-link-LEXCOM; (the command line) is displayed.
73 env = Environment(LEXCOMSTR="Lex'ing $TARGET from $SOURCES")
78 <cvar name="LEXFLAGS">
81 General options passed to the lexical analyzer generator.
82 In addition to passing the value on during invocation,
83 the &t-link-lex; tool also examines this &consvar; for options
84 which cause additional output files to be generated,
85 and adds those to the target list.
86 Recognized for this purpose are GNU &flex; options
87 <option>--header-file=</option> and
88 <option>--tables-file=</option>;
89 the output file is named by the option argument.
92 Note that files specified by <option>--header-file=</option> and
93 <option>--tables-file=</option> may not be properly handled
94 by &SCons; in all situations. Consider using
95 &cv-link-LEX_HEADER_FILE; and &cv-link-LEX_TABLES_FILE; instead.
100 <cvar name="LEX_HEADER_FILE">
103 If supplied, generate a C header file with the name taken from this variable.
104 Will be emitted as a <option>--header-file=</option>
105 command-line option. Use this in preference to including
106 <option>--header-file=</option> in &cv-link-LEXFLAGS; directly.
111 <cvar name="LEX_TABLES_FILE">
114 If supplied, write the lex tables to a file with the name
115 taken from this variable.
116 Will be emitted as a <option>--tables-file=</option>
117 command-line option. Use this in preference to including
118 <option>--tables-file=</option> in &cv-link-LEXFLAGS; directly.
123 <cvar name="LEXUNISTD">
126 Used only in Windows environments to set a lex flag to prevent 'unistd.h' from being included. The default value is '--nounistd'.