summaryrefslogtreecommitdiffstats
path: root/SCons/Tool/lex.xml
blob: 391e42989541c3d1ea893e97ee23e6a1f7096f6c (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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?xml version="1.0"?>
<!--
 MIT License

 Copyright The SCons Foundation

 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
 "Software"), to deal in the Software without restriction, including
 without limitation the rights to use, copy, modify, merge, publish,
 distribute, sublicense, and/or sell copies of the Software, and to
 permit persons to whom the Software is furnished to do so, subject to
 the following conditions:

 The above copyright notice and this permission notice shall be included
 in all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
 KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
-->

<!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 analyser.
</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 on windows environments to set a lex flag to prevent 'unistd.h' from being included. The default value is '--nounistd'.
</para>
</summary>
</cvar>

</sconsdoc>