summaryrefslogtreecommitdiffstats
path: root/SCons/Tool/lex.xml
blob: 028072b6e56e992988e92097fb69f51ba280e74b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?xml version="1.0"?>
<!--
SPDX-FileCopyrightText: Copyright The SCons Foundation (https://scons.org)
SPDX-License-Identifier: MIT
SPDX-FileType: DOCUMENTATION

This file is processed by the bin/SConsDoc.py module.
-->

<!DOCTYPE sconsdoc [
<!ENTITY % scons SYSTEM '../../doc/scons.mod'>
%scons;
<!ENTITY % builders-mod SYSTEM '../../doc/generated/builders.mod'>
%builders-mod;
<!ENTITY % functions-mod SYSTEM '../../doc/generated/functions.mod'>
%functions-mod;
<!ENTITY % tools-mod SYSTEM '../../doc/generated/tools.mod'>
%tools-mod;
<!ENTITY % variables-mod SYSTEM '../../doc/generated/variables.mod'>
%variables-mod;
]>

<sconsdoc xmlns="http://www.scons.org/dbxsd/v1.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 http://www.scons.org/dbxsd/v1.0/scons.xsd">

<tool name="lex">
<summary>
<para>
Sets construction variables for the &lex; lexical analyzer.
</para>
</summary>
<sets>
<item>LEX</item>
<item>LEXFLAGS</item>
<item>LEXCOM</item>
<item>LEXUNISTD</item>
</sets>
<uses>
<item>LEXCOMSTR</item>
<item>LEXFLAGS</item>
<item>LEX_HEADER_FILE</item>
<item>LEX_TABLES_FILE</item>
</uses>
</tool>

<cvar name="LEX">
<summary>
<para>
The lexical analyzer generator.
</para>
</summary>
</cvar>

<cvar name="LEXCOM">
<summary>
<para>
The command line used to call the lexical analyzer generator
to generate a source file.
</para>
</summary>
</cvar>

<cvar name="LEXCOMSTR">
<summary>
<para>
The string displayed when generating a source file
using the lexical analyzer generator.
If this is not set, then &cv-link-LEXCOM; (the command line) is displayed.
</para>

<example_commands>
env = Environment(LEXCOMSTR="Lex'ing $TARGET from $SOURCES")
</example_commands>
</summary>
</cvar>

<cvar name="LEXFLAGS">
<summary>
<para>
General options passed to the lexical analyzer generator.
In addition to passing the value on during invocation,
the &t-link-lex; tool also examines this &consvar; for options
which cause additional output files to be generated,
and adds those to the target list.
Recognized for this purpose are GNU &flex; options
<option>--header-file=</option> and
<option>--tables-file=</option>;
the output file is named by the option argument.
</para>
<para>
Note that files specified by <option>--header-file=</option> and
<option>--tables-file=</option> may not be properly handled
by &SCons; in all situations. Consider using
&cv-link-LEX_HEADER_FILE; and &cv-link-LEX_TABLES_FILE; instead.
</para>
</summary>
</cvar>

<cvar name="LEX_HEADER_FILE">
<summary>
<para>
If supplied, generate a C header file with the name taken from this variable.
Will be emitted as a <option>--header-file=</option>
command-line option. Use this in preference to including
<option>--header-file=</option> in &cv-link-LEXFLAGS; directly.
</para>
</summary>
</cvar>

<cvar name="LEX_TABLES_FILE">
<summary>
<para>
If supplied, write the lex tables to a file with the name
taken from this variable.
Will be emitted as a <option>--tables-file=</option>
command-line option. Use this in preference to including
<option>--tables-file=</option> in &cv-link-LEXFLAGS; directly.
</para>
</summary>
</cvar>

<cvar name="LEXUNISTD">
<summary>
<para>
Used only in Windows environments to set a lex flag to prevent 'unistd.h' from being included. The default value is '--nounistd'.
</para>
</summary>
</cvar>

</sconsdoc>