llvm.org GIT mirror llvm / cae8ccd
Drop llvmc also, it will be replaced by shiny new llvmc2 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50615 91177308-0d34-0410-b5e6-96231b3b80d8 Anton Korobeynikov 11 years ago
16 changed file(s) with 0 addition(s) and 6387 deletion(s). Raw diff Collapse all Expand all
+0
-431
docs/CommandGuide/llvmc.pod less more
None =pod
1
2 =head1 NAME
3
4 llvmc - The LLVM Compiler Driver (experimental)
5
6 =head1 SYNOPSIS
7
8 B [I] [I...]
9
10 =head1 DESCRIPTION
11
12 B is a configurable driver for invoking other LLVM (and non-LLVM) tools
13 in order to compile, optimize and link software for multiple languages. For
14 those familiar with FSF's B tool, it is very similar. Please note that
15 B is considered an experimental tool. B has the following goals:
16
17 =over
18
19 =item * provide a single point of access to the LLVM tool set,
20
21 =item * hide the complexities of the LLVM tools through a single interface,
22
23 =item * make integration of existing non-LLVM tools simple,
24
25 =item * extend the capabilities of minimal front ends, and
26
27 =item * make the interface for compiling consistent for all languages.
28
29 =back
30
31 The tool itself does nothing with a user's program. It merely invokes other
32 tools to get the compilation tasks done.
33
34 The options supported by B generalize the compilation process and
35 provide a consistent and simple interface for multiple programming languages.
36 This makes it easier for developers to get their software compiled with LLVM.
37 Without B, developers would need to understand how to invoke the
38 front-end compiler, optimizer, assembler, and linker in order to compile their
39 programs. B's sole mission is to trivialize that process.
40
41 =head2 Basic Operation
42
43 B always takes the following basic actions:
44
45 =over
46
47 =item * Command line options and filenames are collected.
48
49 The command line options provide the marching orders to B on what actions
50 it should perform. This is the I the user is making of B and it
51 is interpreted first.
52
53 =item * Configuration files are read.
54
55 Based on the options and the suffixes of the filenames presented, a set of
56 configuration files are read to configure the actions B will take.
57 Configuration files are provided by either LLVM or the front end compiler tools
58 that B invokes. Users generally don't need to be concerned with the
59 contents of the configuration files.
60
61 =item * Determine actions to take.
62
63 The tool chain needed to complete the task is determined. This is the primary
64 work of B. It breaks the request specified by the command line options
65 into a set of basic actions to be done:
66
67 =over
68
69 =item * Pre-processing: gathering/filtering compiler input (optional).
70
71 =item * Translation: source language to bitcode conversion.
72
73 =item * Assembly: bitcode to native code conversion.
74
75 =item * Optimization: conversion of bitcode to something that runs faster.
76
77 =item * Linking: combining multiple bitcode files to produce executable program.
78
79 =back
80
81 =item * Execute actions.
82
83 The actions determined previously are executed sequentially and then
84 B terminates.
85
86 =back
87
88 =head1 OPTIONS
89
90 =head2 Control Options
91
92 Control options tell B what to do at a high level. The
93 following control options are defined:
94
95 =over
96
97 =item B<-c> or B<--compile>
98
99 This option specifies that the linking phase is not to be run. All
100 previous phases, if applicable will run. This is generally how a given
101 bitcode file is compiled and optimized for a source language module.
102
103 =item B<-k> or B<--link> or default
104
105 This option (or the lack of any control option) specifies that all stages
106 of compilation, optimization, and linking should be attempted. Source files
107 specified on the command line will be compiled and linked with objects and
108 libraries also specified.
109
110 =item B<-S>
111
112 This option specifies that compilation should end in the creation of
113 an LLVM assembly file that can be later converted to an LLVM object
114 file.
115
116 =item B<-E>
117
118 This option specifies that no compilation or linking should be
119 performed. Only pre-processing, if applicable to the language being
120 compiled, is performed. For languages that support it, this will
121 result in the output containing the raw input to the compiler.
122
123 =back
124
125 =head2 Optimization Options
126
127 Optimization with B is based on goals and specified with
128 the following -O options. The specific details of which
129 optimizations run is controlled by the configuration files because
130 each source language will have different needs.
131
132 =over
133
134 =item B<-O1> or B<-O0> (default, fast compilation)
135
136 Only those optimizations that will hasten the compilation (mostly by reducing
137 the output) are applied. In general these are extremely fast and simple
138 optimizations that reduce emitted code size. The goal here is not to make the
139 resulting program fast but to make the compilation fast. If not specified,
140 this is the default level of optimization.
141
142 =item B<-O2> (basic optimization)
143
144 This level of optimization specifies a balance between generating good code
145 that will execute reasonably quickly and not spending too much time optimizing
146 the code to get there. For example, this level of optimization may include
147 things like global common sub-expression elimination, aggressive dead code
148 elimination, and scalar replication.
149
150 =item B<-O3> (aggressive optimization)
151
152 This level of optimization aggressively optimizes each set of files compiled
153 together. However, no link-time inter-procedural optimization is performed.
154 This level implies all the optimizations of the B<-O1> and B<-O2> optimization
155 levels, and should also provide loop optimizations and compile time
156 inter-procedural optimizations. Essentially, this level tries to do as much
157 as it can with the input it is given but doesn't do any link time IPO.
158
159 =item B<-O4> (link time optimization)
160
161 In addition to the previous three levels of optimization, this level of
162 optimization aggressively optimizes each program at link time. It employs
163 basic analysis and basic link-time inter-procedural optimizations,
164 considering the program as a whole.
165
166 =item B<-O5> (aggressive link time optimization)
167
168 This is the same as B<-O4> except it employs aggressive analyses and
169 aggressive inter-procedural optimization.
170
171 =item B<-O6> (profile guided optimization: not implemented)
172
173 This is the same as B<-O5> except that it employs profile-guided
174 re-optimization of the program after it has executed. Note that this implies
175 a single level of re-optimization based on run time profile analysis. Once
176 the re-optimization has completed, the profiling instrumentation is
177 removed and final optimizations are employed.
178
179 =item B<-O7> (lifelong optimization: not implemented)
180
181 This is the same as B<-O5> and similar to B<-O6> except that re-optimization
182 is performed through the life of the program. That is, each run will update
183 the profile by which future re-optimizations are directed.
184
185 =back
186
187 =head2 Input Options
188
189 =over
190
191 =item B<-l> I
192
193 This option instructs B to locate a library named I and search
194 it for unresolved symbols when linking the program.
195
196 =item B<-L> F
197
198 This option instructs B to add F to the list of places in which
199 the linker will
200
201 =item B<-x> I
202
203 This option instructs B to regard the following input files as
204 containing programs in the language I. Normally, input file languages
205 are identified by their suffix but this option will override that default
206 behavior. The B<-x> option stays in effect until the end of the options or
207 a new B<-x> option is encountered.
208
209 =back
210
211 =head2 Output Options
212
213 =over
214
215 =item B<-m>I
216
217 This option selects the back end code generator to use. The I portion
218 of the option names the back end to use.
219
220 =item B<--native>
221
222 Normally, B produces bitcode files at most stages of compilation.
223 With this option, B will arrange for native object files to be
224 generated with the B<-c> option, native assembly files to be generated
225 with the B<-S> option, and native executables to be generated with the
226 B<--link> option. In the case of the B<-E> option, the output will not
227 differ as there is no I version of pre-processed output.
228
229 =item B<-o> F
230
231 Specify the output file name. The contents of the file depend on other
232 options.
233
234 =back
235
236 =head2 Information Options
237
238 =over
239
240 =item B<-n> or B<--no-op>
241
242 This option tells B to do everything but actually execute the
243 resulting tools. In combination with the B<-v> option, this causes B
244 to merely print out what it would have done.
245
246 =item B<-v> or B<--verbose>
247
248 This option will cause B to print out (on standard output) each of the
249 actions it takes to accomplish the objective. The output will immediately
250 precede the invocation of other tools.
251
252 =item B<--stats>
253
254 Print all statistics gathered during the compilation to the standard error.
255 Note that this option is merely passed through to the sub-tools to do with
256 as they please.
257
258 =item B<--time-passes>
259
260 Record the amount of time needed for each optimization pass and print it
261 to standard error. Like B<--stats> this option is just passed through to
262 the sub-tools to do with as they please.
263
264 =item B<--time-programs>
265
266 Record the amount of time each program (compilation tool) takes and print
267 it to the standard error.
268
269 =back
270
271 =head2 Language Specific Options
272
273 =over
274
275 =item B<-T,pre>=I
276
277 Pass an arbitrary option to the pre-processor.
278
279 =item B<-T,opt>=I
280
281 Pass an arbitrary option to the optimizer.
282
283 =item B<-T,lnk>=I
284
285 Pass an arbitrary option to the linker.
286
287 =item B<-T,asm>=I
288
289 Pass an arbitrary option to the code generator.
290
291 =back
292
293 =head2 C/C++ Specific Options
294
295 =over
296
297 =item B<-I>F
298
299 This option is just passed through to a C or C++ front end compiler to tell it
300 where include files can be found.
301
302 =item B<-D>F
303
304 This option is just passed through to a C or C++ front end compiler to tell it
305 to define a symbol.
306
307 =back
308
309 =head2 Miscellaneous Options
310
311 =over
312
313 =item B<--help>
314
315 Print a summary of command line options.
316
317 =item B<--version>
318
319 This option will cause B to print out its version number and terminate.
320
321 =back
322
323 =head2 Advanced Options
324
325 You better know what you're doing if you use these options. Improper use
326 of these options can produce drastically wrong results.
327
328 =over
329
330 =item B<--config-dir> F
331
332 This option tells B to read configuration data from the I
333 named F. Data from such directories will be read in the order
334 specified on the command line after all other standard configuration files have
335 been read. This allows users or groups of users to conveniently create
336 their own configuration directories in addition to the standard ones to which
337 they may not have write access.
338
339 =back
340
341
342 =head2 Unimplemented Options
343
344 The options below are not currently implemented in B but will be
345 eventually. They are documented here as "future design".
346
347 =over
348
349 =item B<--show-config> I<[suffixes...]>
350
351 When this option is given, the only action taken by B is to show its
352 final configuration state in the form of a configuration file. No compilation
353 tasks will be conducted when this option is given; processing will stop once
354 the configuration has been printed. The optional (comma separated) list of
355 suffixes controls what is printed. Without any suffixes, the configuration
356 for all languages is printed. With suffixes, only the languages pertaining
357 to those file suffixes will be printed. The configuration information is
358 printed after all command line options and configuration files have been
359 read and processed. This allows the user to verify that the correct
360 configuration data has been read by B.
361
362 =item B<--config> :I
:I=I
363
364 This option instructs B to accept I as the value for configuration
365 item I in the section named I
. This is a quick way to override
366 a configuration item on the command line without resorting to changing the
367 configuration files.
368
369 =item B<--config-only-from> F
370
371 This option tells B to skip the normal processing of configuration
372 files and only configure from the contents of the F directory. Multiple
373 B<--config-only-from> options may be given in which case the directories are
374 read in the order given on the command line.
375
376 =item B<--emit-raw-code>
377
378 No optimization is done whatsoever. The compilers invoked by B with
379 this option given will be instructed to produce raw, unoptimized code. This
380 option is useful only to front end language developers and therefore does not
381 participate in the list of B<-O> options. This is distinctly different from
382 the B<-O0> option (a synonym for B<-O1>) because those optimizations will
383 reduce code size to make compilation faster. With B<--emit-raw-code>, only
384 the full raw code produced by the compiler will be generated.
385
386 =back
387
388
389 =head1 EXIT STATUS
390
391 If B succeeds, it will exit with 0. Otherwise, if an error
392 occurs, it will exit with a non-zero value and no compilation actions
393 will be taken. If one of the compilation tools returns a non-zero
394 status, pending actions will be discarded and B will return the
395 same result code as the failing compilation tool.
396
397 =head1 DEFICIENCIES
398
399 B is considered an experimental LLVM tool because it has these
400 deficiencies:
401
402 =over
403
404 =item Insufficient support for native linking
405
406 Because B doesn't handle native linking, neither can B
407
408 =item Poor configuration support
409
410 The support for configuring new languages, etc. is weak. There are many
411 command line configurations that cannot be achieved with the current
412 support. Furthermore the grammar is cumbersome for configuration files.
413 Please see L for further details.
414
415 =item Does not handle target specific configurations
416
417 This is one of the major deficiencies, also addressed in
418 L
419
420 =back
421
422 =head1 SEE ALSO
423
424 L, L, L, L
425
426 =head1 AUTHORS
427
428 Maintained by the LLVM Team (L).
429
430 =cut
+0
-1032
tools/llvmc/CompilerDriver.cpp less more
None //===- CompilerDriver.cpp - The LLVM Compiler Driver ------------*- C++ -*-===//
1 //
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements the bulk of the LLVM Compiler Driver (llvmc).
11 //
12 //===----------------------------------------------------------------------===//
13
14 #include "CompilerDriver.h"
15 #include "ConfigLexer.h"
16 #include "llvm/Module.h"
17 #include "llvm/ModuleProvider.h"
18 #include "llvm/Bitcode/ReaderWriter.h"
19 #include "llvm/Support/MemoryBuffer.h"
20 #include "llvm/Support/Timer.h"
21 #include "llvm/System/Signals.h"
22 #include "llvm/ADT/SetVector.h"
23 #include "llvm/ADT/StringExtras.h"
24 #include "llvm/Config/alloca.h"
25 #include
26 using namespace llvm;
27
28
29 namespace {
30
31 void WriteAction(CompilerDriver::Action* action ) {
32 std::cerr << action->program.c_str();
33 std::vector::const_iterator I = action->args.begin();
34 while (I != action->args.end()) {
35 std::cerr << ' ' << *I;
36 ++I;
37 }
38 std::cerr << '\n';
39 }
40
41 void DumpAction(CompilerDriver::Action* action) {
42 std::cerr << "command = " << action->program.c_str();
43 std::vector::const_iterator I = action->args.begin();
44 while (I != action->args.end()) {
45 std::cerr << ' ' << *I;
46 ++I;
47 }
48 std::cerr << '\n';
49 std::cerr << "flags = " << action->flags << '\n';
50 }
51
52 void DumpConfigData(CompilerDriver::ConfigData* cd, const std::string& type ){
53 std::cerr << "Configuration Data For '" << cd->langName << "' (" << type
54 << ")\n";
55 std::cerr << "PreProcessor: ";
56 DumpAction(&cd->PreProcessor);
57 std::cerr << "Translator: ";
58 DumpAction(&cd->Translator);
59 std::cerr << "Optimizer: ";
60 DumpAction(&cd->Optimizer);
61 std::cerr << "Assembler: ";
62 DumpAction(&cd->Assembler);
63 std::cerr << "Linker: ";
64 DumpAction(&cd->Linker);
65 }
66
67 static bool GetBitcodeDependentLibraries(const std::string &fname,
68 Module::LibraryListType& deplibs,
69 std::string* ErrMsg) {
70 ModuleProvider *MP = 0;
71 if (MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(fname)) {
72 MP = getBitcodeModuleProvider(Buffer);
73 if (MP == 0) delete Buffer;
74 }
75 if (!MP) {
76 deplibs.clear();
77 return true;
78 }
79 deplibs = MP->getModule()->getLibraries();
80 delete MP;
81 return false;
82 }
83
84
85 class CompilerDriverImpl : public CompilerDriver {
86 /// @name Constructors
87 /// @{
88 public:
89 CompilerDriverImpl(ConfigDataProvider& confDatProv )
90 : cdp(&confDatProv)
91 , finalPhase(LINKING)
92 , optLevel(OPT_FAST_COMPILE)
93 , Flags(0)
94 , machine()
95 , LibraryPaths()
96 , TempDir()
97 , AdditionalArgs()
98 {
99 AdditionalArgs.reserve(NUM_PHASES);
100 StringVector emptyVec;
101 for (unsigned i = 0; i < NUM_PHASES; ++i)
102 AdditionalArgs.push_back(emptyVec);
103 }
104
105 virtual ~CompilerDriverImpl() {
106 cleanup();
107 cdp = 0;
108 LibraryPaths.clear();
109 IncludePaths.clear();
110 Defines.clear();
111 TempDir.clear();
112 AdditionalArgs.clear();
113 fOptions.clear();
114 MOptions.clear();
115 WOptions.clear();
116 }
117
118 /// @}
119 /// @name Methods
120 /// @{
121 public:
122 virtual void setFinalPhase(Phases phase) {
123 finalPhase = phase;
124 }
125
126 virtual void setOptimization(OptimizationLevels level) {
127 optLevel = level;
128 }
129
130 virtual void setDriverFlags(unsigned flags) {
131 Flags = flags & DRIVER_FLAGS_MASK;
132 }
133
134 virtual void setOutputMachine(const std::string& machineName) {
135 machine = machineName;
136 }
137
138 virtual void setPhaseArgs(Phases phase, const StringVector& opts) {
139 assert(phase <= LINKING && phase >= PREPROCESSING);
140 AdditionalArgs[phase] = opts;
141 }
142
143 virtual void setIncludePaths(const StringVector& paths) {
144 StringVector::const_iterator I = paths.begin();
145 StringVector::const_iterator E = paths.end();
146 while (I != E) {
147 sys::Path tmp;
148 tmp.set(*I);
149 IncludePaths.push_back(tmp);
150 ++I;
151 }
152 }
153
154 virtual void setSymbolDefines(const StringVector& defs) {
155 Defines = defs;
156 }
157
158 virtual void setLibraryPaths(const StringVector& paths) {
159 StringVector::const_iterator I = paths.begin();
160 StringVector::const_iterator E = paths.end();
161 while (I != E) {
162 sys::Path tmp;
163 tmp.set(*I);
164 LibraryPaths.push_back(tmp);
165 ++I;
166 }
167 }
168
169 virtual void addLibraryPath(const sys::Path& libPath) {
170 LibraryPaths.push_back(libPath);
171 }
172
173 virtual void addToolPath(const sys::Path& toolPath) {
174 ToolPaths.push_back(toolPath);
175 }
176
177 virtual void setfPassThrough(const StringVector& fOpts) {
178 fOptions = fOpts;
179 }
180
181 /// @brief Set the list of -M options to be passed through
182 virtual void setMPassThrough(const StringVector& MOpts) {
183 MOptions = MOpts;
184 }
185
186 /// @brief Set the list of -W options to be passed through
187 virtual void setWPassThrough(const StringVector& WOpts) {
188 WOptions = WOpts;
189 }
190
191 /// @}
192 /// @name Functions
193 /// @{
194 private:
195 bool isSet(DriverFlags flag) {
196 return 0 != ((flag & DRIVER_FLAGS_MASK) & Flags);
197 }
198
199 void cleanup() {
200 if (!isSet(KEEP_TEMPS_FLAG)) {
201 const sys::FileStatus *Status = TempDir.getFileStatus();
202 if (Status && Status->isDir)
203 TempDir.eraseFromDisk(/*remove_contents=*/true);
204 } else {
205 std::cout << "Temporary files are in " << TempDir << "\n";
206 }
207 }
208
209 sys::Path MakeTempFile(const std::string& basename,
210 const std::string& suffix,
211 std::string* ErrMsg) {
212 if (TempDir.isEmpty()) {
213 TempDir = sys::Path::GetTemporaryDirectory(ErrMsg);
214 if (TempDir.isEmpty())
215 return sys::Path();
216 sys::RemoveDirectoryOnSignal(TempDir);
217 }
218 sys::Path result(TempDir);
219 if (!result.appendComponent(basename)) {
220 if (ErrMsg)
221 *ErrMsg = basename + ": can't use this file name";
222 return sys::Path();
223 }
224 if (!result.appendSuffix(suffix)) {
225 if (ErrMsg)
226 *ErrMsg = suffix + ": can't use this file suffix";
227 return sys::Path();
228 }
229 return result;
230 }
231
232 Action* GetAction(ConfigData* cd,
233 const sys::Path& input,
234 const sys::Path& output,
235 Phases phase)
236 {
237 Action* pat = 0; ///< The pattern/template for the action
238 Action* action = new Action; ///< The actual action to execute
239
240 // Get the action pattern
241 switch (phase) {
242 case PREPROCESSING: pat = &cd->PreProcessor; break;
243 case TRANSLATION: pat = &cd->Translator; break;
244 case OPTIMIZATION: pat = &cd->Optimizer; break;
245 case ASSEMBLY: pat = &cd->Assembler; break;
246 case LINKING: pat = &cd->Linker; break;
247 default:
248 assert(!"Invalid driver phase!");
249 break;
250 }
251 assert(pat != 0 && "Invalid command pattern");
252
253 // Copy over some pattern things that don't need to change
254 action->flags = pat->flags;
255
256 // See if program starts with wildcard...
257 std::string programName=pat->program.toString();
258 if (programName[0] == '%' && programName.length() >2) {
259 switch(programName[1]){
260 case 'b':
261 if (programName.substr(0,8) == "%bindir%") {
262 std::string tmp(LLVM_BINDIR);
263 tmp.append(programName.substr(8));
264 pat->program.set(tmp);
265 }
266 break;
267 case 'l':
268 if (programName.substr(0,12) == "%llvmgccdir%"){
269 std::string tmp(LLVMGCCDIR);
270 tmp.append(programName.substr(12));
271 pat->program.set(tmp);
272 }else if (programName.substr(0,13) == "%llvmgccarch%"){
273 std::string tmp(LLVMGCCARCH);
274 tmp.append(programName.substr(13));
275 pat->program.set(tmp);
276 }else if (programName.substr(0,9) == "%llvmgcc%"){
277 std::string tmp(LLVMGCC);
278 tmp.append(programName.substr(9));
279 pat->program.set(tmp);
280 }else if (programName.substr(0,9) == "%llvmgxx%"){
281 std::string tmp(LLVMGXX);
282 tmp.append(programName.substr(9));
283 pat->program.set(tmp);
284 }else if (programName.substr(0,9) == "%llvmcc1%"){
285 std::string tmp(LLVMCC1);
286 tmp.append(programName.substr(9));
287 pat->program.set(tmp);
288 }else if (programName.substr(0,13) == "%llvmcc1plus%"){
289 std::string tmp(LLVMCC1PLUS);
290 tmp.append(programName.substr(13));
291 pat->program.set(tmp);
292 }else if (programName.substr(0,8) == "%libdir%") {
293 std::string tmp(LLVM_LIBDIR);
294 tmp.append(programName.substr(8));
295 pat->program.set(tmp);
296 }
297 break;
298 }
299 }
300 action->program = pat->program;
301
302 // Do the substitutions from the pattern to the actual
303 StringVector::iterator PI = pat->args.begin();
304 StringVector::iterator PE = pat->args.end();
305 while (PI != PE) {
306 if ((*PI)[0] == '%' && PI->length() >2) {
307 bool found = true;
308 switch ((*PI)[1]) {
309 case 'a':
310 if (*PI == "%args%") {
311 if (AdditionalArgs.size() > unsigned(phase))
312 if (!AdditionalArgs[phase].empty()) {
313 // Get specific options for each kind of action type
314 StringVector& addargs = AdditionalArgs[phase];
315 // Add specific options for each kind of action type
316 action->args.insert(action->args.end(), addargs.begin(),
317 addargs.end());
318 }
319 } else
320 found = false;
321 break;
322 case 'b':
323 if (*PI == "%bindir%") {
324 std::string tmp(*PI);
325 tmp.replace(0,8,LLVM_BINDIR);
326 action->args.push_back(tmp);
327 } else
328 found = false;
329 break;
330 case 'd':
331 if (*PI == "%defs%") {
332 StringVector::iterator I = Defines.begin();
333 StringVector::iterator E = Defines.end();
334 while (I != E) {
335 action->args.push_back( std::string("-D") + *I);
336 ++I;
337 }
338 } else
339 found = false;
340 break;
341 case 'f':
342 if (*PI == "%fOpts%") {
343 if (!fOptions.empty())
344 action->args.insert(action->args.end(), fOptions.begin(),
345 fOptions.end());
346 } else
347 found = false;
348 break;
349 case 'i':
350 if (*PI == "%in%") {
351 action->args.push_back(input.toString());
352 } else if (*PI == "%incls%") {
353 PathVector::iterator I = IncludePaths.begin();
354 PathVector::iterator E = IncludePaths.end();
355 while (I != E) {
356 action->args.push_back( std::string("-I") + I->toString() );
357 ++I;
358 }
359 } else
360 found = false;
361 break;
362 case 'l':
363 if ((*PI)[1] == 'l') {
364 std::string tmp(*PI);
365 if (*PI == "%llvmgccdir%")
366 tmp.replace(0,12,LLVMGCCDIR);
367 else if (*PI == "%llvmgccarch%")
368 tmp.replace(0,13,LLVMGCCARCH);
369 else if (*PI == "%llvmgcc%")
370 tmp.replace(0,9,LLVMGCC);
371 else if (*PI == "%llvmgxx%")
372 tmp.replace(0,9,LLVMGXX);
373 else if (*PI == "%llvmcc1%")
374 tmp.replace(0,9,LLVMCC1);
375 else if (*PI == "%llvmcc1plus%")
376 tmp.replace(0,9,LLVMCC1);
377 else
378 found = false;
379 if (found)
380 action->args.push_back(tmp);
381 } else if (*PI == "%libs%") {
382 PathVector::iterator I = LibraryPaths.begin();
383 PathVector::iterator E = LibraryPaths.end();
384 while (I != E) {
385 action->args.push_back( std::string("-L") + I->toString() );
386 ++I;
387 }
388 } else if (*PI == "%libdir%") {
389 std::string tmp(*PI);
390 tmp.replace(0,8,LLVM_LIBDIR);
391 action->args.push_back(tmp);
392 } else
393 found = false;
394 break;
395 case 'o':
396 if (*PI == "%out%") {
397 action->args.push_back(output.toString());
398 } else if (*PI == "%opt%") {
399 if (!isSet(EMIT_RAW_FLAG)) {
400 if (cd->opts.size() > static_cast(optLevel) &&
401 !cd->opts[optLevel].empty())
402 action->args.insert(action->args.end(),
403 cd->opts[optLevel].begin(),
404 cd->opts[optLevel].end());
405 else
406 throw std::string("Optimization options for level ") +
407 utostr(unsigned(optLevel)) + " were not specified";
408 }
409 } else
410 found = false;
411 break;
412 case 's':
413 if (*PI == "%stats%") {
414 if (isSet(SHOW_STATS_FLAG))
415 action->args.push_back("-stats");
416 } else
417 found = false;
418 break;
419 case 't':
420 if (*PI == "%target%") {
421 action->args.push_back(std::string("-march=") + machine);
422 } else if (*PI == "%time%") {
423 if (isSet(TIME_PASSES_FLAG))
424 action->args.push_back("-time-passes");
425 } else
426 found = false;
427 break;
428 case 'v':
429 if (*PI == "%verbose%") {
430 if (isSet(VERBOSE_FLAG))
431 action->args.push_back("-v");
432 } else
433 found = false;
434 break;
435 case 'M':
436 if (*PI == "%Mopts%") {
437 if (!MOptions.empty())
438 action->args.insert(action->args.end(), MOptions.begin(),
439 MOptions.end());
440 } else
441 found = false;
442 break;
443 case 'W':
444 if (*PI == "%Wopts%") {
445 for (StringVector::iterator I = WOptions.begin(),
446 E = WOptions.end(); I != E ; ++I ) {
447 action->args.push_back(std::string("-W") + *I);
448 }
449 } else
450 found = false;
451 break;
452 default:
453 found = false;
454 break;
455 }
456 if (!found) {
457 // Did it even look like a substitution?
458 if (PI->length()>1 && (*PI)[0] == '%' &&
459 (*PI)[PI->length()-1] == '%') {
460 throw std::string("Invalid substitution token: '") + *PI +
461 "' for command '" + pat->program.toString() + "'";
462 } else if (!PI->empty()) {
463 // It's not a legal substitution, just pass it through
464 action->args.push_back(*PI);
465 }
466 }
467 } else if (!PI->empty()) {
468 // Its not a substitution, just put it in the action
469 action->args.push_back(*PI);
470 }
471 PI++;
472 }
473
474 // Finally, we're done
475 return action;
476 }
477
478 int DoAction(Action*action, std::string& ErrMsg) {
479 assert(action != 0 && "Invalid Action!");
480 if (isSet(VERBOSE_FLAG))
481 WriteAction(action);
482 if (!isSet(DRY_RUN_FLAG)) {
483 sys::Path progpath = sys::Program::FindProgramByName(
484 action->program.toString());
485 if (progpath.isEmpty())
486 throw std::string("Can't find program '" +
487 action->program.toString()+"'");
488 else if (progpath.canExecute())
489 action->program = progpath;
490 else
491 throw std::string("Program '"+action->program.toString()+
492 "' is not executable.");
493
494 // Invoke the program
495 const char** Args = (const char**)
496 alloca(sizeof(const char*)*(action->args.size()+2));
497 Args[0] = action->program.toString().c_str();
498 for (unsigned i = 1; i <= action->args.size(); ++i)
499 Args[i] = action->args[i-1].c_str();
500 Args[action->args.size()+1] = 0; // null terminate list.
501 if (isSet(TIME_ACTIONS_FLAG)) {
502 Timer timer(action->program.toString());
503 timer.startTimer();
504 int resultCode =
505 sys::Program::ExecuteAndWait(action->program, Args,0,0,0,0, &ErrMsg);
506 timer.stopTimer();
507 timer.print(timer,std::cerr);
508 return resultCode;
509 }
510 else
511 return
512 sys::Program::ExecuteAndWait(action->program, Args, 0,0,0,0, &ErrMsg);
513 }
514 return 0;
515 }
516
517 /// This method tries various variants of a linkage item's file
518 /// name to see if it can find an appropriate file to link with
519 /// in the directories of the LibraryPaths.
520 llvm::sys::Path GetPathForLinkageItem(const std::string& link_item,
521 bool native = false) {
522 sys::Path fullpath;
523 fullpath.set(link_item);
524 if (fullpath.canRead())
525 return fullpath;
526 for (PathVector::iterator PI = LibraryPaths.begin(),
527 PE = LibraryPaths.end(); PI != PE; ++PI) {
528 fullpath.set(PI->toString());
529 fullpath.appendComponent(link_item);
530 if (fullpath.canRead())
531 return fullpath;
532 if (native) {
533 fullpath.appendSuffix("a");
534 } else {
535 fullpath.appendSuffix("bc");
536 if (fullpath.canRead())
537 return fullpath;
538 fullpath.eraseSuffix();
539 fullpath.appendSuffix("o");
540 if (fullpath.canRead())
541 return fullpath;
542 fullpath = *PI;
543 fullpath.appendComponent(std::string("lib") + link_item);
544 fullpath.appendSuffix("a");
545 if (fullpath.canRead())
546 return fullpath;
547 fullpath.eraseSuffix();
548 fullpath.appendSuffix("so");
549 if (fullpath.canRead())
550 return fullpath;
551 }
552 }
553
554 // Didn't find one.
555 fullpath.clear();
556 return fullpath;
557 }
558
559 /// This method processes a linkage item. The item could be a
560 /// Bitcode file needing translation to native code and that is
561 /// dependent on other bitcode libraries, or a native code
562 /// library that should just be linked into the program.
563 bool ProcessLinkageItem(const llvm::sys::Path& link_item,
564 SetVector& set,
565 std::string& err) {
566 // First, see if the unadorned file name is not readable. If so,
567 // we must track down the file in the lib search path.
568 sys::Path fullpath;
569 if (!link_item.canRead()) {
570 // look for the library using the -L arguments specified
571 // on the command line.
572 fullpath = GetPathForLinkageItem(link_item.toString());
573
574 // If we didn't find the file in any of the library search paths
575 // we have to bail. No where else to look.
576 if (fullpath.isEmpty()) {
577 err =
578 std::string("Can't find linkage item '") + link_item.toString() + "'";
579 return false;
580 }
581 } else {
582 fullpath = link_item;
583 }
584
585 // If we got here fullpath is the path to the file, and its readable.
586 set.insert(fullpath);
587
588 // If its an LLVM bitcode file ...
589 if (fullpath.isBitcodeFile()) {
590 // Process the dependent libraries recursively
591 Module::LibraryListType modlibs;
592 if (GetBitcodeDependentLibraries(fullpath.toString(),modlibs, &err)) {
593 // Traverse the dependent libraries list
594 Module::lib_iterator LI = modlibs.begin();
595 Module::lib_iterator LE = modlibs.end();
596 while ( LI != LE ) {
597 if (!ProcessLinkageItem(sys::Path(*LI),set,err)) {
598 if (err.empty()) {
599 err = std::string("Library '") + *LI +
600 "' is not valid for linking but is required by file '" +
601 fullpath.toString() + "'";
602 } else {
603 err += " which is required by file '" + fullpath.toString() + "'";
604 }
605 return false;
606 }
607 ++LI;
608 }
609 } else if (err.empty()) {
610 err = std::string(
611 "The dependent libraries could not be extracted from '") +
612 fullpath.toString();
613 return false;
614 } else
615 return false;
616 }
617 return true;
618 }
619
620 /// @}
621 /// @name Methods
622 /// @{
623 public:
624 virtual int execute(const InputList& InpList, const sys::Path& Output, std::string& ErrMsg ) {
625 try {
626 // Echo the configuration of options if we're running verbose
627 if (isSet(DEBUG_FLAG)) {
628 std::cerr << "Compiler Driver Options:\n";
629 std::cerr << "DryRun = " << isSet(DRY_RUN_FLAG) << "\n";
630 std::cerr << "Verbose = " << isSet(VERBOSE_FLAG) << " \n";
631 std::cerr << "TimeActions = " << isSet(TIME_ACTIONS_FLAG) << "\n";
632 std::cerr << "TimePasses = " << isSet(TIME_PASSES_FLAG) << "\n";
633 std::cerr << "ShowStats = " << isSet(SHOW_STATS_FLAG) << "\n";
634 std::cerr << "EmitRawCode = " << isSet(EMIT_RAW_FLAG) << "\n";
635 std::cerr << "EmitNativeCode = " << isSet(EMIT_NATIVE_FLAG) << "\n";
636 std::cerr << "KeepTemps = " << isSet(KEEP_TEMPS_FLAG) << "\n";
637 std::cerr << "OutputMachine = " << machine << "\n";
638 InputList::const_iterator I = InpList.begin();
639 while ( I != InpList.end() ) {
640 std::cerr << "Input: " << I->first << "(" << I->second
641 << ")\n";
642 ++I;
643 }
644 std::cerr << "Output: " << Output << "\n";
645 }
646
647 // If there's no input, we're done.
648 if (InpList.empty())
649 throw std::string("Nothing to compile.");
650
651 // If they are asking for linking and didn't provide an output
652 // file then its an error (no way for us to "make up" a meaningful
653 // file name based on the various linker input files).
654 if (finalPhase == LINKING && Output.isEmpty())
655 throw std::string(
656 "An output file name must be specified for linker output");
657
658 // If they are not asking for linking, provided an output file and
659 // there is more than one input file, its an error
660 if (finalPhase != LINKING && !Output.isEmpty() && InpList.size() > 1)
661 throw std::string("An output file name cannot be specified ") +
662 "with more than one input file name when not linking";
663
664 // This vector holds all the resulting actions of the following loop.
665 std::vector actions;
666
667 /// PRE-PROCESSING / TRANSLATION / OPTIMIZATION / ASSEMBLY phases
668 // for each input item
669 SetVector LinkageItems;
670 StringVector LibFiles;
671 InputList::const_iterator I = InpList.begin();
672 for (InputList::const_iterator I = InpList.begin(), E = InpList.end();
673 I != E; ++I ) {
674 // Get the suffix of the file name
675 const std::string& ftype = I->second;
676
677 // If its a library, bitcode file, or object file, save
678 // it for linking below and short circuit the
679 // pre-processing/translation/assembly phases
680 if (ftype.empty() || ftype == "o" || ftype == "bc" || ftype=="a") {
681 // We shouldn't get any of these types of files unless we're
682 // later going to link. Enforce this limit now.
683 if (finalPhase != LINKING) {
684 throw std::string(
685 "Pre-compiled objects found but linking not requested");
686 }
687 if (ftype.empty())
688 LibFiles.push_back(I->first.toString());
689 else
690 LinkageItems.insert(I->first);
691 continue; // short circuit remainder of loop
692 }
693
694 // At this point, we know its something we need to translate
695 // and/or optimize. See if we can get the configuration data
696 // for this kind of file.
697 ConfigData* cd = cdp->ProvideConfigData(I->second);
698 if (cd == 0)
699 throw std::string("Files of type '") + I->second +
700 "' are not recognized.";
701 if (isSet(DEBUG_FLAG))
702 DumpConfigData(cd,I->second);
703
704 // Add the config data's library paths to the end of the list
705 for (StringVector::iterator LPI = cd->libpaths.begin(),
706 LPE = cd->libpaths.end(); LPI != LPE; ++LPI){
707 LibraryPaths.push_back(sys::Path(*LPI));
708 }
709
710 // Initialize the input and output files
711 sys::Path InFile(I->first);
712 sys::Path OutFile(I->first.getBasename());
713
714 // PRE-PROCESSING PHASE
715 Action& action = cd->PreProcessor;
716
717 // Get the preprocessing action, if needed, or error if appropriate
718 if (!action.program.isEmpty()) {
719 if (action.isSet(REQUIRED_FLAG) || finalPhase == PREPROCESSING) {
720 if (finalPhase == PREPROCESSING) {
721 if (Output.isEmpty()) {
722 OutFile.appendSuffix("E");
723 actions.push_back(GetAction(cd,InFile,OutFile,PREPROCESSING));
724 } else {
725 actions.push_back(GetAction(cd,InFile,Output,PREPROCESSING));
726 }
727 } else {
728 sys::Path TempFile(
729 MakeTempFile(I->first.getBasename(),"E",&ErrMsg));
730 if (TempFile.isEmpty())
731 return 1;
732 actions.push_back(GetAction(cd,InFile,TempFile,
733 PREPROCESSING));
734 InFile = TempFile;
735 }
736 }
737 } else if (finalPhase == PREPROCESSING) {
738 throw cd->langName + " does not support pre-processing";
739 } else if (action.isSet(REQUIRED_FLAG)) {
740 throw std::string("Don't know how to pre-process ") +
741 cd->langName + " files";
742 }
743
744 // Short-circuit remaining actions if all they want is
745 // pre-processing
746 if (finalPhase == PREPROCESSING) { continue; };
747
748 /// TRANSLATION PHASE
749 action = cd->Translator;
750
751 // Get the translation action, if needed, or error if appropriate
752 if (!action.program.isEmpty()) {
753 if (action.isSet(REQUIRED_FLAG) || finalPhase == TRANSLATION) {
754 if (finalPhase == TRANSLATION) {
755 if (Output.isEmpty()) {
756 OutFile.appendSuffix("o");
757 actions.push_back(GetAction(cd,InFile,OutFile,TRANSLATION));
758 } else {
759 actions.push_back(GetAction(cd,InFile,Output,TRANSLATION));
760 }
761 } else {
762 sys::Path TempFile(
763 MakeTempFile(I->first.getBasename(),"trans", &ErrMsg));
764 if (TempFile.isEmpty())
765 return 1;
766 actions.push_back(GetAction(cd,InFile,TempFile,TRANSLATION));
767 InFile = TempFile;
768 }
769
770 // ll -> bc Helper
771 if (action.isSet(OUTPUT_IS_ASM_FLAG)) {
772 /// The output of the translator is an LLVM Assembly program
773 /// We need to translate it to bitcode
774 Action* action = new Action();
775 action->program.set("llvm-as");
776 action->args.push_back(InFile.toString());
777 action->args.push_back("-o");
778 InFile.appendSuffix("bc");
779 action->args.push_back(InFile.toString());
780 actions.push_back(action);
781 }
782 }
783 } else if (finalPhase == TRANSLATION) {
784 throw cd->langName + " does not support translation";
785 } else if (action.isSet(REQUIRED_FLAG)) {
786 throw std::string("Don't know how to translate ") +
787 cd->langName + " files";
788 }
789
790 // Short-circuit remaining actions if all they want is translation
791 if (finalPhase == TRANSLATION) { continue; }
792
793 /// OPTIMIZATION PHASE
794 action = cd->Optimizer;
795
796 // Get the optimization action, if needed, or error if appropriate
797 if (!isSet(EMIT_RAW_FLAG)) {
798 if (!action.program.isEmpty()) {
799 if (action.isSet(REQUIRED_FLAG) || finalPhase == OPTIMIZATION) {
800 if (finalPhase == OPTIMIZATION) {
801 if (Output.isEmpty()) {
802 OutFile.appendSuffix("o");
803 actions.push_back(GetAction(cd,InFile,OutFile,OPTIMIZATION));
804 } else {
805 actions.push_back(GetAction(cd,InFile,Output,OPTIMIZATION));
806 }
807 } else {
808 sys::Path TempFile(
809 MakeTempFile(I->first.getBasename(),"opt", &ErrMsg));
810 if (TempFile.isEmpty())
811 return 1;
812 actions.push_back(GetAction(cd,InFile,TempFile,OPTIMIZATION));
813 InFile = TempFile;
814 }
815 // ll -> bc Helper
816 if (action.isSet(OUTPUT_IS_ASM_FLAG)) {
817 /// The output of the optimizer is an LLVM Assembly program
818 /// We need to translate it to bitcode with llvm-as
819 Action* action = new Action();
820 action->program.set("llvm-as");
821 action->args.push_back(InFile.toString());
822 action->args.push_back("-f");
823 action->args.push_back("-o");
824 InFile.appendSuffix("bc");
825 action->args.push_back(InFile.toString());
826 actions.push_back(action);
827 }
828 }
829 } else if (finalPhase == OPTIMIZATION) {
830 throw cd->langName + " does not support optimization";
831 } else if (action.isSet(REQUIRED_FLAG)) {
832 throw std::string("Don't know how to optimize ") +
833 cd->langName + " files";
834 }
835 }
836
837 // Short-circuit remaining actions if all they want is optimization
838 if (finalPhase == OPTIMIZATION) { continue; }
839
840 /// ASSEMBLY PHASE
841 action = cd->Assembler;
842
843 if (finalPhase == ASSEMBLY) {
844
845 // Build either a native compilation action or a disassembly action
846 Action* action = new Action();
847 if (isSet(EMIT_NATIVE_FLAG)) {
848 // Use llc to get the native assembly file
849 action->program.set("llc");
850 action->args.push_back(InFile.toString());
851 action->args.push_back("-f");
852 action->args.push_back("-o");
853 if (Output.isEmpty()) {
854 OutFile.appendSuffix("o");
855 action->args.push_back(OutFile.toString());
856 } else {
857 action->args.push_back(Output.toString());
858 }
859 actions.push_back(action);
860 } else {
861 // Just convert back to llvm assembly with llvm-dis
862 action->program.set("llvm-dis");
863 action->args.push_back(InFile.toString());
864 action->args.push_back("-f");
865 action->args.push_back("-o");
866 if (Output.isEmpty()) {
867 OutFile.appendSuffix("ll");
868 action->args.push_back(OutFile.toString());
869 } else {
870 action->args.push_back(Output.toString());
871 }
872 }
873
874 // Put the action on the list
875 actions.push_back(action);
876
877 // Short circuit the rest of the loop, we don't want to link
878 continue;
879 }
880
881 // Register the result of the actions as a link candidate
882 LinkageItems.insert(InFile);
883
884 } // end while loop over each input file
885
886 /// RUN THE COMPILATION ACTIONS
887 std::vector::iterator AI = actions.begin();
888 std::vector::iterator AE = actions.end();
889 while (AI != AE) {
890 int ActionResult = DoAction(*AI, ErrMsg);
891 if (ActionResult != 0)
892 return ActionResult;
893 AI++;
894 }
895
896 /// LINKING PHASE
897 if (finalPhase == LINKING) {
898
899 // Insert the platform-specific system libraries to the path list
900 std::vector SysLibs;
901 sys::Path::GetSystemLibraryPaths(SysLibs);
902 LibraryPaths.insert(LibraryPaths.end(), SysLibs.begin(), SysLibs.end());
903
904 // Set up the linking action with llvm-ld
905 Action* link = new Action();
906 link->program.set("llvm-ld");
907
908 // Add in the optimization level requested
909 switch (optLevel) {
910 case OPT_FAST_COMPILE:
911 link->args.push_back("-O1");
912 break;
913 case OPT_SIMPLE:
914 link->args.push_back("-O2");
915 break;
916 case OPT_AGGRESSIVE:
917 link->args.push_back("-O3");
918 break;
919 case OPT_LINK_TIME:
920 link->args.push_back("-O4");
921 break;
922 case OPT_AGGRESSIVE_LINK_TIME:
923 link->args.push_back("-O5");
924 break;
925 case OPT_NONE:
926 break;
927 }
928
929 // Add in all the linkage items we generated. This includes the
930 // output from the translation/optimization phases as well as any
931 // -l arguments specified.
932 for (PathVector::const_iterator I=LinkageItems.begin(),
933 E=LinkageItems.end(); I != E; ++I )
934 link->args.push_back(I->toString());
935
936 // Add in all the libraries we found.
937 for (StringVector::const_iterator I=LibFiles.begin(),
938 E=LibFiles.end(); I != E; ++I )
939 link->args.push_back(std::string("-l")+*I);
940
941 // Add in all the library paths to the command line
942 for (PathVector::const_iterator I=LibraryPaths.begin(),
943 E=LibraryPaths.end(); I != E; ++I)
944 link->args.push_back( std::string("-L") + I->toString());
945
946 // Add in the additional linker arguments requested
947 for (StringVector::const_iterator I=AdditionalArgs[LINKING].begin(),
948 E=AdditionalArgs[LINKING].end(); I != E; ++I)
949 link->args.push_back( *I );
950
951 // Add in other optional flags
952 if (isSet(EMIT_NATIVE_FLAG))
953 link->args.push_back("-native");
954 if (isSet(VERBOSE_FLAG))
955 link->args.push_back("-v");
956 if (isSet(TIME_PASSES_FLAG))
957 link->args.push_back("-time-passes");
958 if (isSet(SHOW_STATS_FLAG))
959 link->args.push_back("-stats");
960 if (isSet(STRIP_OUTPUT_FLAG))
961 link->args.push_back("-s");
962 if (isSet(DEBUG_FLAG)) {
963 link->args.push_back("-debug");
964 link->args.push_back("-debug-pass=Details");
965 }
966
967 // Add in mandatory flags
968 link->args.push_back("-o");
969 link->args.push_back(Output.toString());
970
971 // Execute the link
972 int ActionResult = DoAction(link, ErrMsg);
973 if (ActionResult != 0)
974 return ActionResult;
975 }
976 } catch (std::string& msg) {
977 cleanup();
978 throw;
979 } catch (...) {
980 cleanup();
981 throw std::string("Unspecified error");
982 }
983 cleanup();
984 return 0;
985 }
986
987 /// @}
988 /// @name Data
989 /// @{
990 private:
991 ConfigDataProvider* cdp; ///< Where we get configuration data from
992 Phases finalPhase; ///< The final phase of compilation
993 OptimizationLevels optLevel; ///< The optimization level to apply
994 unsigned Flags; ///< The driver flags
995 std::string machine; ///< Target machine name
996 PathVector LibraryPaths; ///< -L options
997 PathVector IncludePaths; ///< -I options
998 PathVector ToolPaths; ///< -B options
999 StringVector Defines; ///< -D options
1000 sys::PathWithStatus TempDir; ///< Name of the temporary directory.
1001 StringTable AdditionalArgs; ///< The -Txyz options
1002 StringVector fOptions; ///< -f options
1003 StringVector MOptions; ///< -M options
1004 StringVector WOptions; ///< -W options
1005
1006 /// @}
1007 };
1008 }
1009
1010 CompilerDriver::~CompilerDriver() {
1011 }
1012
1013 CompilerDriver::ConfigDataProvider::~ConfigDataProvider() {}
1014
1015 CompilerDriver*
1016 CompilerDriver::Get(ConfigDataProvider& CDP) {
1017 return new CompilerDriverImpl(CDP);
1018 }
1019
1020 CompilerDriver::ConfigData::ConfigData()
1021 : langName()
1022 , PreProcessor()
1023 , Translator()
1024 , Optimizer()
1025 , Assembler()
1026 , Linker()
1027 {
1028 StringVector emptyVec;
1029 for (unsigned i = 0; i < NUM_PHASES; ++i)
1030 opts.push_back(emptyVec);
1031 }
+0
-206
tools/llvmc/CompilerDriver.h less more
None //===- CompilerDriver.h - Compiler Driver -----------------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares the CompilerDriver class which implements the bulk of the
10 // LLVM Compiler Driver program (llvmc).
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_TOOLS_LLVMC_COMPILERDRIVER_H
15 #define LLVM_TOOLS_LLVMC_COMPILERDRIVER_H
16
17 #include
18 #include
19 #include "llvm/System/Program.h"
20
21 namespace llvm {
22 /// This class provides the high level interface to the LLVM Compiler Driver.
23 /// The driver's purpose is to make it easier for compiler writers and users
24 /// of LLVM to utilize the compiler toolkits and LLVM toolset by learning only
25 /// the interface of one program (llvmc).
26 ///
27 /// @see llvmc.cpp
28 /// @brief The interface to the LLVM Compiler Driver.
29 class CompilerDriver {
30 /// @name Types
31 /// @{
32 public:
33 /// @brief A vector of strings, used for argument lists
34 typedef std::vector StringVector;
35
36 /// @brief A vector of sys::Path, used for path lists
37 typedef std::vector PathVector;
38
39 /// @brief A table of strings, indexed typically by Phases
40 typedef std::vector StringTable;
41
42 /// @brief The phases of processing that llvmc understands
43 enum Phases {
44 PREPROCESSING, ///< Source language combining, filtering, substitution
45 TRANSLATION, ///< Translate source -> LLVM bitcode/assembly
46 OPTIMIZATION, ///< Optimize translation result
47 ASSEMBLY, ///< Convert program to executable
48 LINKING, ///< Link bitcode and native code
49 NUM_PHASES ///< Always last!
50 };
51
52 /// @brief The levels of optimization llvmc understands
53 enum OptimizationLevels {
54 OPT_FAST_COMPILE, ///< Optimize to make >compile< go faster
55 OPT_SIMPLE, ///< Standard/simple optimizations
56 OPT_AGGRESSIVE, ///< Aggressive optimizations
57 OPT_LINK_TIME, ///< Aggressive + LinkTime optimizations
58 OPT_AGGRESSIVE_LINK_TIME, ///< Make it go way fast!
59 OPT_NONE ///< No optimizations. Keep this at the end!
60 };
61
62 /// @brief Action specific flags
63 enum ConfigurationFlags {
64 REQUIRED_FLAG = 0x0001, ///< Should the action always be run?
65 PREPROCESSES_FLAG = 0x0002, ///< Does this action preprocess?
66 TRANSLATES_FLAG = 0x0004, ///< Does this action translate?
67 OUTPUT_IS_ASM_FLAG = 0x0008, ///< Action produces .ll files?
68 FLAGS_MASK = 0x000F ///< Union of all flags
69 };
70
71 /// This type is the input list to the CompilerDriver. It provides
72 /// a vector of pathname/filetype pairs. The filetype is used to look up
73 /// the configuration of the actions to be taken by the driver.
74 /// @brief The Input Data to the execute method
75 typedef std::vector > InputList;
76
77 /// This type is read from configuration files or otherwise provided to
78 /// the CompilerDriver through a "ConfigDataProvider". It serves as both
79 /// the template of what to do and the actual Action to be executed.
80 /// @brief A structure to hold the action data for a given source
81 /// language.
82 struct Action {
83 Action() : flags(0) {}
84 sys::Path program; ///< The program to execve
85 StringVector args; ///< Arguments to the program
86 unsigned flags; ///< Action specific flags
87 void set(unsigned fl ) { flags |= fl; }
88 void clear(unsigned fl) { flags &= (FLAGS_MASK ^ fl); }
89 bool isSet(unsigned fl) { return (flags&fl) != 0; }
90 };
91
92 struct ConfigData {
93 ConfigData();
94 std::string version; ///< The version number.
95 std::string langName; ///< The name of the source language
96 StringTable opts; ///< The o10n options for each level
97 StringVector libpaths; ///< The library paths
98 Action PreProcessor; ///< PreProcessor command line
99 Action Translator; ///< Translator command line
100 Action Optimizer; ///< Optimizer command line
101 Action Assembler; ///< Assembler command line
102 Action Linker; ///< Linker command line
103 };
104
105 /// This pure virtual interface class defines the interface between the
106 /// CompilerDriver and other software that provides ConfigData objects to
107 /// it. The CompilerDriver must be configured to use an object of this
108 /// type so it can obtain the configuration data.
109 /// @see setConfigDataProvider
110 /// @brief Configuration Data Provider interface
111 class ConfigDataProvider {
112 public:
113 virtual ~ConfigDataProvider();
114 virtual ConfigData* ProvideConfigData(const std::string& filetype) = 0;
115 virtual void setConfigDir(const sys::Path& dirName) = 0;
116 };
117
118 /// These flags control various actions of the compiler driver. They are
119 /// used by adding the needed flag values together and passing them to the
120 /// compiler driver's setDriverFlags method.
121 /// @see setDriverFlags
122 /// @brief Driver specific flags
123 enum DriverFlags {
124 DRY_RUN_FLAG = 0x0001, ///< Do everything but execute actions
125 VERBOSE_FLAG = 0x0002, ///< Print each action
126 DEBUG_FLAG = 0x0004, ///< Print debug information
127 TIME_PASSES_FLAG = 0x0008, ///< Time the passes as they execute
128 TIME_ACTIONS_FLAG = 0x0010, ///< Time the actions as they execute
129 SHOW_STATS_FLAG = 0x0020, ///< Show pass statistics
130 EMIT_NATIVE_FLAG = 0x0040, ///< Emit native code instead of bc
131 EMIT_RAW_FLAG = 0x0080, ///< Emit raw, unoptimized bitcode
132 KEEP_TEMPS_FLAG = 0x0100, ///< Don't delete temporary files
133 STRIP_OUTPUT_FLAG = 0x0200, ///< Strip symbols from linked output
134 DRIVER_FLAGS_MASK = 0x03FF ///< Union of the above flags
135 };
136
137 /// @}
138 /// @name Constructors
139 /// @{
140 public:
141 /// @brief Static Constructor
142 static CompilerDriver* Get(ConfigDataProvider& CDP);
143
144 /// @brief Virtual destructor
145 virtual ~CompilerDriver();
146
147 /// @}
148 /// @name Methods
149 /// @{
150 public:
151 /// @brief Execute the actions requested for the given input list.
152 virtual int execute(
153 const InputList& list, const sys::Path& output, std::string& ErrMsg) =0;
154
155 /// @brief Set the final phase at which compilation terminates
156 virtual void setFinalPhase(Phases phase) = 0;
157
158 /// @brief Set the optimization level for the compilation
159 virtual void setOptimization(OptimizationLevels level) = 0;
160
161 /// @brief Set the driver flags.
162 virtual void setDriverFlags(unsigned flags) = 0;
163
164 /// @brief Set the output machine name.
165 virtual void setOutputMachine(const std::string& machineName) = 0;
166
167 /// @brief Set the options for a given phase.
168 virtual void setPhaseArgs(Phases phase, const StringVector& opts) = 0;
169
170 /// @brief Set Library Paths
171 virtual void setIncludePaths(const StringVector& paths) = 0;
172
173 /// @brief Set Library Paths
174 virtual void setSymbolDefines(const StringVector& paths) = 0;
175
176 /// @brief Set Library Paths
177 virtual void setLibraryPaths(const StringVector& paths) = 0;
178
179 /// @brief Add a path to the list of library paths
180 virtual void addLibraryPath( const sys::Path& libPath ) = 0;
181
182 /// @brief Add a path to the list of paths in which to find tools
183 virtual void addToolPath( const sys::Path& toolPath) = 0;
184
185 /// @brief Set the list of -f options to be passed through
186 virtual void setfPassThrough(const StringVector& fOpts) = 0;
187
188 /// @brief Set the list of -M options to be passed through
189 virtual void setMPassThrough(const StringVector& fOpts) = 0;
190
191 /// @brief Set the list of -W options to be passed through
192 virtual void setWPassThrough(const StringVector& fOpts) = 0;
193
194 /// @brief Determine where a linkage file is located in the file system
195 virtual sys::Path GetPathForLinkageItem(
196 const std::string& link_item, ///< Item to be sought
197 bool native = false ///< Looking for native?
198 ) = 0;
199
200 /// @}
201 };
202 }
203
204 // vim: sw=2 smartindent smarttab tw=80 autoindent expandtab
205 #endif
+0
-2900
tools/llvmc/ConfigLexer.cpp.cvs less more
None #line 2 "ConfigLexer.cpp"
1
2 #line 4 "ConfigLexer.cpp"
3
4 #define YY_INT_ALIGNED short int
5
6 /* A lexical scanner generated by flex */
7
8 #define FLEX_SCANNER
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 5
11 #define YY_FLEX_SUBMINOR_VERSION 33
12 #if YY_FLEX_SUBMINOR_VERSION > 0
13 #define FLEX_BETA
14 #endif
15
16 /* First, we deal with platform-specific or compiler-specific issues. */
17
18 /* begin standard C headers. */
19 #include
20 #include
21 #include
22 #include
23
24 /* end standard C headers. */
25
26 /* flex integer type definitions */
27
28 #ifndef FLEXINT_H
29 #define FLEXINT_H
30
31 /* C99 systems have . Non-C99 systems may or may not. */
32
33 #if __STDC_VERSION__ >= 199901L
34
35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36 * if you want the limit (max/min) macros for int types.
37 */
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
40 #endif
41
42 #include
43 typedef int8_t flex_int8_t;
44 typedef uint8_t flex_uint8_t;
45 typedef int16_t flex_int16_t;
46 typedef uint16_t flex_uint16_t;
47 typedef int32_t flex_int32_t;
48 typedef uint32_t flex_uint32_t;
49 #else
50 typedef signed char flex_int8_t;
51 typedef short int flex_int16_t;
52 typedef int flex_int32_t;
53 typedef unsigned char flex_uint8_t;
54 typedef unsigned short int flex_uint16_t;
55 typedef unsigned int flex_uint32_t;
56 #endif /* ! C99 */
57
58 /* Limits of integral types. */
59 #ifndef INT8_MIN
60 #define INT8_MIN (-128)
61 #endif
62 #ifndef INT16_MIN
63 #define INT16_MIN (-32767-1)
64 #endif
65 #ifndef INT32_MIN
66 #define INT32_MIN (-2147483647-1)
67 #endif
68 #ifndef INT8_MAX
69 #define INT8_MAX (127)
70 #endif
71 #ifndef INT16_MAX
72 #define INT16_MAX (32767)
73 #endif
74 #ifndef INT32_MAX
75 #define INT32_MAX (2147483647)
76 #endif
77 #ifndef UINT8_MAX
78 #define UINT8_MAX (255U)
79 #endif
80 #ifndef UINT16_MAX
81 #define UINT16_MAX (65535U)
82 #endif
83 #ifndef UINT32_MAX
84 #define UINT32_MAX (4294967295U)
85 #endif
86
87 #endif /* ! FLEXINT_H */
88
89 #ifdef __cplusplus
90
91 /* The "const" storage-class-modifier is valid. */
92 #define YY_USE_CONST
93
94 #else /* ! __cplusplus */
95
96 #if __STDC__
97
98 #define YY_USE_CONST
99
100 #endif /* __STDC__ */
101 #endif /* ! __cplusplus */
102
103 #ifdef YY_USE_CONST
104 #define yyconst const
105 #else
106 #define yyconst
107 #endif
108
109 /* Returned upon end-of-file. */
110 #define YY_NULL 0
111
112 /* Promotes a possibly negative, possibly signed char to an unsigned
113 * integer for use as an array index. If the signed char is negative,
114 * we want to instead treat it as an 8-bit unsigned char, hence the
115 * double cast.
116 */
117 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
118
119 /* Enter a start condition. This macro really ought to take a parameter,
120 * but we do it the disgusting crufty way forced on us by the ()-less
121 * definition of BEGIN.
122 */
123 #define BEGIN (yy_start) = 1 + 2 *
124
125 /* Translate the current start state into a value that can be later handed
126 * to BEGIN to return to the state. The YYSTATE alias is for lex
127 * compatibility.
128 */
129 #define YY_START (((yy_start) - 1) / 2)
130 #define YYSTATE YY_START
131
132 /* Action number for EOF rule of a given start state. */
133 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
134
135 /* Special action meaning "start processing a new file". */
136 #define YY_NEW_FILE Configrestart(Configin )
137
138 #define YY_END_OF_BUFFER_CHAR 0
139
140 /* Size of default input buffer. */
141 #ifndef YY_BUF_SIZE
142 #define YY_BUF_SIZE (16384*64)
143 #endif
144
145 /* The state buf must be large enough to hold one state per character in the main buffer.
146 */
147 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
148
149 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
150 #define YY_TYPEDEF_YY_BUFFER_STATE
151 typedef struct yy_buffer_state *YY_BUFFER_STATE;
152 #endif
153
154 extern int Configleng;
155
156 extern FILE *Configin, *Configout;
157
158 #define EOB_ACT_CONTINUE_SCAN 0
159 #define EOB_ACT_END_OF_FILE 1
160 #define EOB_ACT_LAST_MATCH 2
161
162 #define YY_LESS_LINENO(n)
163
164 /* Return all but the first "n" matched characters back to the input stream. */
165 #define yyless(n) \
166 do \
167 { \
168 /* Undo effects of setting up Configtext. */ \
169 int yyless_macro_arg = (n); \
170 YY_LESS_LINENO(yyless_macro_arg);\
171 *yy_cp = (yy_hold_char); \
172 YY_RESTORE_YY_MORE_OFFSET \
173 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
174 YY_DO_BEFORE_ACTION; /* set up Configtext again */ \
175 } \
176 while ( 0 )
177
178 #define unput(c) yyunput( c, (yytext_ptr) )
179
180 /* The following is because we cannot portably get our hands on size_t
181 * (without autoconf's help, which isn't available because we want
182 * flex-generated scanners to compile on their own).
183 */
184
185 #ifndef YY_TYPEDEF_YY_SIZE_T
186 #define YY_TYPEDEF_YY_SIZE_T
187 typedef unsigned int yy_size_t;
188 #endif
189
190 #ifndef YY_STRUCT_YY_BUFFER_STATE
191 #define YY_STRUCT_YY_BUFFER_STATE
192 struct yy_buffer_state
193 {
194 FILE *yy_input_file;
195
196 char *yy_ch_buf; /* input buffer */
197 char *yy_buf_pos; /* current position in input buffer */
198
199 /* Size of input buffer in bytes, not including room for EOB
200 * characters.
201 */
202 yy_size_t yy_buf_size;
203
204 /* Number of characters read into yy_ch_buf, not including EOB
205 * characters.
206 */
207 int yy_n_chars;
208
209 /* Whether we "own" the buffer - i.e., we know we created it,
210 * and can realloc() it to grow it, and should free() it to
211 * delete it.
212 */
213 int yy_is_our_buffer;
214
215 /* Whether this is an "interactive" input source; if so, and
216 * if we're using stdio for input, then we want to use getc()
217 * instead of fread(), to make sure we stop fetching input after
218 * each newline.
219 */
220 int yy_is_interactive;
221
222 /* Whether we're considered to be at the beginning of a line.
223 * If so, '^' rules will be active on the next match, otherwise
224 * not.
225 */
226 int yy_at_bol;
227
228 int yy_bs_lineno; /**< The line count. */
229 int yy_bs_column; /**< The column count. */
230
231 /* Whether to try to fill the input buffer when we reach the
232 * end of it.
233 */
234 int yy_fill_buffer;
235
236 int yy_buffer_status;
237
238 #define YY_BUFFER_NEW 0
239 #define YY_BUFFER_NORMAL 1
240 /* When an EOF's been seen but there's still some text to process
241 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
242 * shouldn't try reading from the input source any more. We might
243 * still have a bunch of tokens to match, though, because of
244 * possible backing-up.
245 *
246 * When we actually see the EOF, we change the status to "new"
247 * (via Configrestart()), so that the user can continue scanning by
248 * just pointing Configin at a new input file.
249 */
250 #define YY_BUFFER_EOF_PENDING 2
251
252 };
253 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
254
255 /* Stack of input buffers. */
256 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
257 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
258 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
259
260 /* We provide macros for accessing buffer states in case in the
261 * future we want to put the buffer states in a more general
262 * "scanner state".
263 *
264 * Returns the top of the stack, or NULL.
265 */
266 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
267 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
268 : NULL)
269
270 /* Same as previous macro, but useful when we know that the buffer stack is not
271 * NULL or when we need an lvalue. For internal use only.
272 */
273 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
274
275 /* yy_hold_char holds the character lost when Configtext is formed. */
276 static char yy_hold_char;
277 static int yy_n_chars; /* number of characters read into yy_ch_buf */
278 int Configleng;
279
280 /* Points to current character in buffer. */
281 static char *yy_c_buf_p = (char *) 0;
282 static int yy_init = 0; /* whether we need to initialize */
283 static int yy_start = 0; /* start state number */
284
285 /* Flag which is used to allow Configwrap()'s to do buffer switches
286 * instead of setting up a fresh Configin. A bit of a hack ...
287 */
288 static int yy_did_buffer_switch_on_eof;
289
290 void Configrestart (FILE *input_file );
291 void Config_switch_to_buffer (YY_BUFFER_STATE new_buffer );
292 YY_BUFFER_STATE Config_create_buffer (FILE *file,int size );
293 void Config_delete_buffer (YY_BUFFER_STATE b );
294 void Config_flush_buffer (YY_BUFFER_STATE b );
295 void Configpush_buffer_state (YY_BUFFER_STATE new_buffer );
296 void Configpop_buffer_state (void );
297
298 static void Configensure_buffer_stack (void );
299 static void Config_load_buffer_state (void );
300 static void Config_init_buffer (YY_BUFFER_STATE b,FILE *file );
301
302 #define YY_FLUSH_BUFFER Config_flush_buffer(YY_CURRENT_BUFFER )
303
304 YY_BUFFER_STATE Config_scan_buffer (char *base,yy_size_t size );
305 YY_BUFFER_STATE Config_scan_string (yyconst char *yy_str );
306 YY_BUFFER_STATE Config_scan_bytes (yyconst char *bytes,int len );
307
308 void *Configalloc (yy_size_t );
309 void *Configrealloc (void *,yy_size_t );
310 void Configfree (void * );
311
312 #define yy_new_buffer Config_create_buffer
313
314 #define yy_set_interactive(is_interactive) \
315 { \
316 if ( ! YY_CURRENT_BUFFER ){ \
317 Configensure_buffer_stack (); \
318 YY_CURRENT_BUFFER_LVALUE = \
319 Config_create_buffer(Configin,YY_BUF_SIZE ); \
320 } \
321 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
322 }
323
324 #define yy_set_bol(at_bol) \
325 { \
326 if ( ! YY_CURRENT_BUFFER ){\
327 Configensure_buffer_stack (); \
328 YY_CURRENT_BUFFER_LVALUE = \
329 Config_create_buffer(Configin,YY_BUF_SIZE ); \
330 } \
331 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
332 }
333
334 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
335
336 /* Begin user sect3 */
337
338 #define Configwrap(n) 1
339 #define YY_SKIP_YYWRAP
340
341 typedef unsigned char YY_CHAR;
342
343 FILE *Configin = (FILE *) 0, *Configout = (FILE *) 0;
344
345 typedef int yy_state_type;
346
347 extern int Configlineno;
348
349 int Configlineno = 1;
350
351 extern char *Configtext;
352 #define yytext_ptr Configtext
353
354 static yy_state_type yy_get_previous_state (void );
355 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
356 static int yy_get_next_buffer (void );
357 static void yy_fatal_error (yyconst char msg[] );
358
359 /* Done after the current pattern has been matched and before the
360 * corresponding action - sets up Configtext.
361 */
362 #define YY_DO_BEFORE_ACTION \
363 (yytext_ptr) = yy_bp; \
364 Configleng = (size_t) (yy_cp - yy_bp); \
365 (yy_hold_char) = *yy_cp; \
366 *yy_cp = '\0'; \
367 (yy_c_buf_p) = yy_cp;
368
369 #define YY_NUM_RULES 55
370 #define YY_END_OF_BUFFER 56
371 /* This struct is not used in this scanner,
372 but its presence is necessary. */
373 struct yy_trans_info
374 {
375 flex_int32_t yy_verify;
376 flex_int32_t yy_nxt;
377 };
378 static yyconst flex_int16_t yy_accept[408] =
379 { 0,
380 1, 1, 56, 55, 1, 4, 55, 55, 55, 52,
381 52, 6, 5, 52, 52, 52, 52, 52, 52, 52,
382 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
383 52, 52, 52, 52, 52, 52, 52, 52, 1, 4,
384 0, 53, 0, 2, 0, 54, 52, 52, 52, 52,
385 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
386 52, 52, 49, 52, 52, 52, 52, 52, 52, 52,
387 52, 52, 52, 52, 51, 52, 52, 50, 52, 52,
388 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
389 52, 52, 52, 3, 0, 52, 52, 52, 52, 52,
390
391 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
392 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
393 52, 52, 52, 52, 52, 48, 52, 52, 52, 52,
394 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
395 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
396 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
397 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
398 52, 52, 52, 52, 52, 52, 52, 29, 52, 52,
399 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
400 52, 52, 52, 52, 52, 8, 9, 52, 52, 10,
401
402 11, 12, 13, 14, 15, 52, 52, 52, 52, 52,
403 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
404 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
405 52, 52, 52, 52, 52, 52, 52, 52, 39, 40,
406 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
407 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
408 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
409 52, 52, 52, 52, 52, 52, 26, 52, 28, 52,
410 52, 52, 32, 52, 52, 52, 52, 43, 52, 52,
411 52, 52, 52, 52, 52, 25, 52, 21, 52, 52,
412
413 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
414 52, 52, 52, 52, 52, 46, 47, 52, 45, 30,
415 52, 52, 52, 52, 41, 52, 52, 52, 52, 17,
416 52, 52, 52, 52, 52, 52, 52, 52, 7, 52,
417 52, 52, 52, 52, 27, 31, 52, 52, 52, 42,
418 52, 52, 52, 52, 52, 52, 52, 18, 52, 52,
419 52, 52, 52, 52, 37, 52, 35, 52, 52, 36,
420 44, 24, 22, 52, 52, 52, 52, 52, 52, 52,
421 52, 52, 52, 52, 52, 52, 52, 23, 19, 52,
422 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
423
424 52, 33, 20, 16, 38, 34, 0
425 } ;
426
427 static yyconst flex_int32_t yy_ec[256] =
428 { 0,
429 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
430 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
431 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
432 1, 2, 1, 5, 6, 1, 7, 1, 1, 1,
433 1, 1, 8, 8, 8, 9, 8, 8, 10, 11,
434 12, 13, 14, 8, 8, 8, 8, 8, 1, 1,
435 15, 1, 1, 16, 17, 18, 19, 20, 21, 22,
436 23, 24, 25, 24, 26, 27, 28, 29, 30, 31,
437 32, 33, 34, 35, 36, 37, 38, 24, 39, 40,
438 1, 41, 1, 1, 8, 1, 42, 43, 44, 45,
439
440 46, 47, 48, 49, 50, 24, 51, 52, 53, 54,
441 55, 56, 57, 58, 59, 60, 61, 62, 24, 63,
442 64, 65, 1, 8, 1, 1, 1, 1, 1, 1,
443 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
444 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
445 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
446 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
447 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
448 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
449 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
450
451 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
452 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
453 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
454 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
455 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
456 1, 1, 1, 1, 1
457 } ;
458
459 static yyconst flex_int32_t yy_meta[66] =
460 { 0,
461 1, 1, 1, 1, 1, 1, 2, 3, 1, 3,
462 3, 3, 3, 3, 1, 3, 3, 3, 3, 3,
463 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
464 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
465 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
466 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
467 3, 3, 3, 3, 3
468 } ;
469
470 static yyconst flex_int16_t yy_base[412] =
471 { 0,
472 0, 0, 716, 3252, 713, 3252, 711, 708, 63, 61,
473 0, 3252, 3252, 36, 57, 50, 67, 68, 70, 93,
474 59, 73, 68, 93, 106, 75, 652, 46, 655, 667,
475 41, 86, 89, 650, 661, 648, 659, 658, 701, 3252,
476 697, 3252, 94, 3252, 698, 3252, 0, 148, 183, 218,
477 253, 305, 349, 389, 424, 472, 518, 573, 627, 671,
478 103, 641, 0, 664, 638, 669, 643, 668, 642, 664,
479 115, 638, 92, 663, 0, 637, 667, 0, 653, 651,
480 633, 616, 615, 653, 627, 640, 614, 115, 92, 637,
481 609, 632, 606, 3252, 661, 89, 603, 609, 609, 606,
482
483 114, 606, 611, 597, 596, 609, 597, 121, 595, 593,
484 711, 761, 811, 853, 901, 942, 992, 1030, 1067, 1123,
485 1177, 1231, 1267, 1319, 1366, 0, 630, 604, 630, 604,
486 619, 593, 611, 585, 619, 602, 606, 583, 571, 578,
487 607, 581, 159, 595, 164, 569, 593, 592, 586, 560,
488 591, 598, 564, 571, 582, 556, 567, 568, 558, 551,
489 561, 549, 556, 560, 190, 549, 548, 542, 548, 555,
490 541, 1418, 1472, 1526, 1579, 1618, 1671, 3252, 1725, 1771,
491 1824, 231, 242, 1871, 1925, 1967, 2007, 571, 545, 567,
492 541, 577, 551, 571, 545, 0, 0, 569, 542, 0,
493
494 0, 0, 0, 0, 0, 550, 541, 523, 514, 540,
495 514, 546, 513, 526, 499, 531, 500, 494, 491, 501,
496 491, 481, 468, 458, 452, 459, 448, 451, 2044, 2097,
497 263, 2150, 279, 2194, 2247, 2300, 289, 2344, 3252, 3252,
498 2386, 2439, 325, 2479, 473, 438, 457, 431, 445, 419,
499 438, 403, 430, 417, 399, 383, 409, 378, 396, 370,
500 400, 373, 386, 360, 370, 367, 357, 352, 359, 348,
501 352, 348, 346, 339, 337, 363, 3252, 2528, 3252, 373,
502 410, 2580, 3252, 2632, 2670, 434, 2727, 3252, 2781, 366,
503 340, 370, 342, 362, 327, 0, 329, 0, 303, 348,
504
505 320, 337, 308, 335, 301, 313, 286, 282, 285, 284,
506 263, 283, 280, 283, 270, 3252, 3252, 446, 3252, 3252,
507 456, 482, 2834, 2872, 3252, 492, 2929, 144, 121, 0,
508 302, 276, 293, 264, 289, 263, 272, 246, 0, 134,
509 252, 242, 240, 224, 3252, 3252, 74, 2969, 504, 3252,
510 528, 249, 223, 247, 220, 234, 203, 0, 158, 160,
511 199, 193, 187, 161, 3252, 185, 3252, 3008, 3060, 3252,
512 3252, 0, 0, 202, 176, 199, 194, 164, 164, 162,
513 161, 154, 150, 3104, 3142, 187, 163, 0, 0, 164,
514 146, 3194, 541, 158, 154, 127, 123, 107, 80, 81,
515
516 554, 3252, 0, 0, 3252, 3252, 3252, 3243, 3246, 3248,
517 83
518 } ;
519
520 static yyconst flex_int16_t yy_def[412] =
521 { 0,
522 407, 1, 407, 407, 407, 407, 407, 408, 409, 410,
523 411, 407, 407, 411, 411, 411, 411, 411, 411, 411,
524 411, 411, 411, 411, 411, 411, 411, 411, 411, 411,
525 411, 411, 411, 411, 411, 411, 411, 411, 407, 407,
526 408, 407, 409, 407, 407, 407, 411, 410, 410, 410,
527 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
528 411, 411, 411, 411, 411, 411, 411, 411, 411, 411,
529 411, 411, 411, 411, 411, 411, 411, 411, 411, 411,
530 411, 411, 411, 411, 411, 411, 411, 411, 411, 411,
531 411, 411, 411, 407, 407, 411, 411, 411, 411, 411,
532
533 411, 411, 411, 411, 411, 411, 411, 411, 411, 411,
534 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
535 410, 410, 410, 410, 410, 411, 411, 411, 411, 411,
536 411, 411, 411, 411, 411, 411, 411, 411, 411, 411,
537 411, 411, 411, 411, 411, 411, 411, 411, 411, 411,
538 411, 411, 411, 411, 411, 411, 411, 411, 411, 411,
539 411, 411, 411, 411, 411, 411, 411, 411, 411, 411,
540 411, 410, 410, 410, 410, 410, 410, 407, 410, 410,
541 410, 410, 410, 410, 410, 410, 410, 411, 411, 411,
542 411, 411, 411, 411, 411, 411, 411, 411, 411, 411,
543
544 411, 411, 411, 411, 411, 411, 411, 411, 411, 411,
545 411, 411, 411, 411, 411, 411, 411, 411, 411, 411,
546 411, 411, 411, 411, 411, 411, 411, 411, 410, 410,
547 410, 410, 410, 410, 410, 410, 410, 410, 407, 407,
548 410, 410, 410, 410, 411, 411, 411, 411, 411, 411,
549 411, 411, 411, 411, 411, 411, 411, 411, 411, 411,
550 411, 411, 411, 411, 411, 411, 411, 411, 411, 411,
551 411, 411, 411, 411, 410, 410, 407, 410, 407, 410,
552 410, 410, 407, 410, 410, 410, 410, 407, 410, 411,
553 411, 411, 411, 411, 411, 411, 411, 411, 411, 411,
554
555 411, 411, 411, 411, 411, 411, 411, 411, 411, 411,
556 411, 411, 411, 411, 411, 407, 407, 410, 407, 407,
557 410, 410, 410, 410, 407, 410, 410, 411, 411, 411,
558 411, 411, 411, 411, 411, 411, 411, 411, 411, 411,
559 411, 411, 411, 411, 407, 407, 411, 410, 410, 407,
560 410, 411, 411, 411, 411, 411, 411, 411, 411, 411,
561 411, 411, 411, 411, 407, 411, 407, 410, 410, 407,
562 407, 411, 411, 411, 411, 411, 411, 411, 411, 411,
563 411, 411, 411, 410, 410, 411, 411, 411, 411, 411,
564 411, 410, 410, 411, 411, 411, 411, 411, 411, 411,
565
566 410, 407, 411, 411, 407, 407, 0, 407, 407, 407,
567 407
568 } ;
569
570 static yyconst flex_int16_t yy_nxt[3318] =
571 { 0,
572 4, 5, 6, 7, 8, 9, 10, 11, 12, 11,
573 11, 11, 11, 11, 13, 4, 14, 15, 16, 11,
574 11, 17, 11, 11, 11, 11, 18, 11, 19, 20,
575 21, 11, 22, 11, 23, 11, 24, 11, 25, 11,
576 26, 27, 28, 29, 11, 11, 30, 11, 11, 11,
577 11, 31, 11, 32, 33, 34, 11, 35, 11, 36,
578 11, 37, 11, 38, 11, 44, 45, 46, 47, 61,
579 47, 47, 47, 47, 47, 63, 47, 94, 95, 66,
580 365, 64, 100, 68, 70, 47, 74, 405, 49, 63,
581 101, 84, 71, 86, 62, 97, 44, 45, 50, 75,
582
583 88, 47, 51, 52, 67, 53, 65, 54, 69, 72,
584 55, 76, 56, 90, 77, 57, 85, 73, 87, 58,
585 59, 78, 60, 79, 75, 89, 92, 102, 80, 366,
586 126, 151, 136, 153, 139, 103, 127, 404, 91, 81,
587 75, 126, 78, 137, 104, 140, 78, 157, 82, 105,
588 152, 93, 154, 83, 46, 47, 162, 47, 47, 47,
589 47, 47, 169, 47, 352, 403, 353, 163, 201, 202,
590 203, 204, 205, 201, 202, 203, 204, 205, 376, 361,
591 404, 170, 126, 206, 126, 403, 404, 377, 47, 46,
592 47, 403, 47, 47, 47, 47, 47, 126, 47, 201,
593
594 202, 203, 204, 205, 400, 378, 381, 394, 396, 398,
595 391, 389, 111, 208, 379, 382, 395, 397, 399, 388,
596 390, 389, 388, 47, 46, 47, 389, 47, 47, 47,
597 47, 47, 388, 47, 387, 386, 383, 239, 47, 223,
598 47, 47, 47, 47, 47, 380, 47, 112, 240, 47,
599 373, 47, 47, 47, 47, 47, 372, 47, 47, 46,
600 47, 375, 47, 47, 47, 47, 47, 374, 47, 277,
601 47, 47, 47, 47, 47, 47, 47, 373, 47, 373,
602 372, 372, 47, 364, 358, 279, 47, 363, 47, 47,
603 47, 47, 47, 47, 47, 283, 47, 362, 47, 47,
604
605 47, 47, 47, 47, 47, 360, 359, 358, 358, 357,
606 113, 46, 47, 356, 47, 47, 47, 47, 47, 47,
607 47, 355, 354, 339, 344, 343, 342, 341, 330, 47,
608 63, 288, 47, 340, 47, 47, 47, 47, 47, 339,
609 47, 339, 338, 316, 47, 47, 47, 47, 47, 47,
610 47, 337, 47, 336, 114, 46, 47, 335, 47, 47,
611 47, 47, 47, 334, 47, 47, 333, 332, 331, 317,
612 47, 330, 47, 47, 47, 47, 47, 47, 47, 319,
613 47, 330, 47, 47, 47, 47, 47, 63, 47, 47,
614 63, 329, 328, 315, 115, 46, 47, 314, 47, 47,
615
616 47, 47, 47, 47, 47, 313, 312, 298, 311, 296,
617 310, 309, 308, 47, 307, 306, 320, 47, 116, 47,
618 47, 47, 47, 47, 305, 47, 304, 303, 302, 47,
619 46, 47, 301, 47, 47, 47, 47, 47, 300, 47,
620 325, 47, 298, 47, 47, 47, 47, 47, 299, 47,
621 47, 298, 345, 47, 297, 47, 47, 47, 47, 47,
622 296, 47, 346, 47, 47, 47, 47, 47, 47, 47,
623 296, 47, 295, 294, 47, 293, 292, 117, 46, 47,
624 291, 47, 47, 47, 47, 47, 47, 47, 46, 47,
625 290, 347, 47, 47, 47, 47, 47, 47, 350, 47,
626
627 274, 47, 47, 47, 47, 47, 273, 47, 272, 271,
628 370, 47, 47, 47, 47, 47, 47, 47, 270, 47,
629 269, 118, 47, 119, 46, 47, 268, 47, 47, 47,
630 47, 47, 47, 47, 371, 47, 75, 47, 47, 47,
631 47, 47, 267, 47, 47, 266, 265, 402, 47, 264,
632 47, 47, 47, 47, 47, 263, 47, 262, 47, 261,
633 406, 47, 260, 47, 47, 47, 47, 47, 47, 47,
634 259, 258, 257, 120, 256, 255, 254, 253, 121, 46,
635 47, 47, 47, 47, 47, 47, 47, 252, 47, 251,
636 75, 75, 250, 249, 47, 248, 247, 246, 245, 228,
637
638 78, 227, 226, 225, 224, 200, 222, 197, 196, 221,
639 220, 219, 218, 47, 217, 216, 78, 215, 78, 214,
640 213, 212, 211, 210, 209, 207, 200, 200, 199, 197,
641 196, 198, 122, 46, 47, 197, 47, 47, 47, 47,
642 47, 196, 47, 195, 194, 193, 192, 191, 190, 189,
643 188, 78, 171, 168, 167, 166, 165, 75, 164, 161,
644 160, 159, 158, 94, 78, 78, 156, 47, 123, 155,
645 150, 149, 148, 147, 146, 145, 124, 46, 47, 75,
646 47, 47, 47, 47, 47, 144, 47, 143, 75, 142,
647 141, 138, 135, 134, 133, 132, 131, 130, 129, 128,
648
649 44, 42, 39, 110, 109, 108, 107, 106, 99, 98,
650 96, 47, 42, 40, 39, 407, 125, 46, 47, 407,
651 47, 47, 47, 47, 47, 407, 47, 407, 407, 407,
652 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
653 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
654 407, 47, 407, 407, 407, 407, 407, 407, 407, 407,
655 407, 407, 407, 407, 407, 407, 172, 46, 47, 407,
656 47, 47, 47, 47, 47, 407, 47, 407, 407, 407,
657 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
658 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
659
660 407, 47, 407, 407, 407, 407, 407, 407, 407, 407,
661 407, 407, 407, 407, 407, 407, 173, 46, 47, 407,
662 47, 47, 47, 47, 47, 407, 47, 407, 407, 407,
663 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
664 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
665 407, 47, 407, 407, 407, 407, 407, 407, 174, 46,
666 47, 407, 47, 47, 47, 47, 47, 407, 47, 407,
667 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
668 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
669 407, 407, 407, 47, 407, 407, 407, 407, 407, 407,
670
671 407, 407, 407, 407, 407, 407, 175, 46, 47, 407,
672 47, 47, 47, 47, 47, 407, 47, 407, 407, 407,
673 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
674 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
675 407, 47, 407, 407, 407, 407, 407, 176, 46, 47,
676 407, 47, 47, 47, 47, 47, 407, 47, 407, 407,
677 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
678 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
679 407, 407, 47, 407, 407, 407, 407, 407, 407, 407,
680 407, 407, 407, 407, 407, 407, 407, 177, 178, 47,
681
682 407, 47, 47, 47, 47, 47, 407, 47, 407, 407,
683 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
684 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
685 407, 407, 47, 407, 407, 179, 46, 47, 407, 47,
686 47, 47, 47, 47, 407, 47, 407, 407, 407, 407,
687 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
688 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
689 47, 407, 180, 46, 47, 407, 47, 47, 47, 47,
690 47, 407, 47, 407, 407, 407, 407, 407, 407, 407,
691 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
692
693 407, 407, 407, 407, 407, 407, 407, 47, 407, 407,
694 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
695 407, 407, 407, 407, 407, 407, 407, 407, 181, 46,
696 47, 407, 47, 47, 47, 47, 47, 407, 47, 407,
697 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
698 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
699 407, 407, 407, 47, 407, 407, 407, 407, 407, 407,
700 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
701 407, 407, 182, 46, 47, 407, 47, 47, 47, 47,
702 47, 407, 47, 407, 407, 407, 407, 407, 407, 407,
703
704 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
705 407, 407, 407, 407, 407, 407, 407, 47, 407, 407,
706 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
707 407, 407, 407, 407, 407, 407, 183, 46, 47, 407,
708 47, 47, 47, 47, 47, 407, 47, 407, 407, 407,
709 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
710 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
711 407, 47, 184, 46, 47, 407, 47, 47, 47, 47,
712 47, 407, 47, 407, 407, 407, 407, 407, 407, 407,
713 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
714
715 407, 407, 407, 407, 407, 407, 407, 47, 407, 407,
716 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
717 407, 407, 407, 407, 185, 46, 47, 407, 47, 47,
718 47, 47, 47, 407, 47, 407, 407, 407, 407, 407,
719 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
720 407, 407, 407, 407, 407, 407, 407, 407, 407, 47,
721 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
722 407, 186, 46, 47, 407, 47, 47, 47, 47, 47,
723 407, 47, 407, 407, 407, 407, 407, 407, 407, 407,
724 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
725
726 407, 407, 407, 407, 407, 407, 47, 407, 407, 407,
727 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
728 407, 407, 407, 187, 46, 47, 407, 47, 47, 47,
729 47, 47, 407, 47, 407, 407, 407, 407, 407, 407,
730 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
731 407, 407, 407, 407, 407, 407, 407, 407, 47, 407,
732 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
733 407, 407, 407, 407, 407, 407, 407, 229, 46, 47,
734 407, 47, 47, 47, 47, 47, 407, 47, 407, 407,
735 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
736
737 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
738 407, 407, 47, 407, 407, 407, 407, 407, 407, 407,
739 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
740 407, 230, 46, 47, 407, 47, 47, 47, 47, 47,
741 407, 47, 407, 407, 407, 407, 407, 407, 407, 407,
742 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
743 407, 407, 407, 407, 407, 407, 47, 407, 407, 407,
744 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
745 407, 407, 407, 407, 231, 46, 47, 407, 47, 47,
746 47, 47, 47, 407, 47, 407, 407, 407, 407, 407,
747
748 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
749 407, 407, 407, 407, 407, 407, 407, 407, 407, 47,
750 407, 407, 407, 232, 46, 47, 407, 47, 47, 47,
751 47, 47, 407, 47, 407, 407, 407, 407, 407, 407,
752 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
753 407, 407, 407, 407, 407, 407, 407, 407, 47, 407,
754 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
755 407, 407, 407, 407, 407, 407, 233, 46, 47, 407,
756 47, 47, 47, 47, 47, 407, 47, 407, 407, 407,
757 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
758
759 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
760 407, 47, 407, 407, 407, 407, 407, 407, 407, 407,
761 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
762 234, 46, 47, 407, 47, 47, 47, 47, 47, 407,
763 47, 407, 407, 407, 407, 407, 407, 407, 407, 407,
764 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
765 407, 407, 407, 407, 407, 47, 407, 407, 407, 407,
766 407, 407, 407, 407, 407, 407, 235, 46, 47, 407,
767 47, 47, 47, 47, 47, 407, 47, 407, 407, 407,
768 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
769
770 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
771 407, 47, 407, 407, 407, 236, 407, 407, 407, 407,
772 407, 407, 407, 407, 407, 407, 407, 407, 407, 237,
773 46, 47, 407, 47, 47, 47, 47, 47, 407, 47,
774 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
775 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
776 407, 407, 407, 407, 47, 407, 407, 407, 407, 407,
777 407, 407, 407, 407, 407, 407, 238, 46, 47, 407,
778 47, 47, 47, 47, 47, 407, 47, 407, 407, 407,
779 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
780
781 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
782 407, 47, 407, 407, 407, 407, 407, 407, 407, 407,
783 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
784 241, 46, 47, 407, 47, 47, 47, 47, 47, 407,
785 47, 407, 407, 407, 407, 407, 407, 407, 407, 407,
786 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
787 407, 407, 407, 407, 407, 47, 407, 407, 407, 407,
788 407, 407, 242, 46, 47, 407, 47, 47, 47, 47,
789 47, 407, 47, 407, 407, 407, 407, 407, 407, 407,
790 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
791
792 407, 407, 407, 407, 407, 407, 407, 47, 407, 407,
793 407, 407, 243, 46, 47, 407, 47, 47, 47, 47,
794 47, 407, 47, 407, 407, 407, 407, 407, 407, 407,
795 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
796 407, 407, 407, 407, 407, 407, 407, 47, 407, 244,
797 46, 47, 407, 47, 47, 47, 47, 47, 407, 47,
798 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
799 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
800 407, 407, 407, 407, 47, 407, 407, 407, 407, 407,
801 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
802
803 407, 407, 275, 46, 47, 407, 47, 47, 47, 47,
804 47, 407, 47, 407, 407, 407, 407, 407, 407, 407,
805 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
806 407, 407, 407, 407, 407, 407, 407, 47, 407, 407,
807 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
808 407, 407, 407, 407, 407, 276, 46, 47, 407, 47,
809 47, 47, 47, 47, 407, 47, 407, 407, 407, 407,
810 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
811 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
812 47, 407, 407, 407, 407, 407, 407, 407, 407, 278,
813
814 46, 47, 407, 47, 47, 47, 47, 47, 407, 47,
815 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
816 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
817 407, 407, 407, 407, 47, 407, 407, 407, 407, 407,
818 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
819 407, 407, 280, 46, 47, 407, 47, 47, 47, 47,
820 47, 407, 47, 407, 407, 407, 407, 407, 407, 407,
821 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
822 407, 407, 407, 407, 407, 407, 407, 47, 407, 407,
823 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
824
825 407, 407, 407, 407, 407, 281, 46, 47, 407, 47,
826 47, 47, 47, 47, 407, 47, 407, 407, 407, 407,
827 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
828 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
829 47, 407, 407, 407, 407, 407, 407, 407, 407, 282,
830 46, 47, 407, 47, 47, 47, 47, 47, 407, 47,
831 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
832 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
833 407, 407, 407, 407, 47, 407, 407, 284, 407, 407,
834 407, 285, 46, 47, 407, 47, 47, 47, 47, 47,
835
836 407, 47, 407, 407, 407, 407, 407, 407, 407, 407,
837 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
838 407, 407, 407, 407, 407, 407, 47, 407, 407, 407,
839 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
840 407, 407, 407, 407, 286, 46, 47, 407, 47, 47,
841 47, 47, 47, 407, 47, 407, 407, 407, 407, 407,
842 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
843 407, 407, 407, 407, 407, 407, 407, 407, 407, 47,
844 407, 407, 407, 407, 287, 46, 47, 407, 47, 47,
845 47, 47, 47, 407, 47, 407, 407, 407, 407, 407,
846
847 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
848 407, 407, 407, 407, 407, 407, 407, 407, 407, 47,
849 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
850 407, 407, 407, 289, 46, 47, 407, 47, 47, 47,
851 47, 47, 407, 47, 407, 407, 407, 407, 407, 407,
852 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
853 407, 407, 407, 407, 407, 407, 407, 407, 47, 407,
854 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
855 407, 407, 407, 407, 407, 318, 46, 47, 407, 47,
856 47, 47, 47, 47, 407, 47, 407, 407, 407, 407,
857
858 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
859 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
860 47, 407, 407, 407, 407, 407, 407, 407, 407, 407,
861 407, 407, 407, 407, 407, 407, 407, 321, 46, 47,
862 407, 47, 47, 47, 47, 47, 407, 47, 407, 407,
863 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
864 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
865 407, 407, 47, 407, 407, 322, 46, 47, 407, 47,
866 47, 47, 47, 47, 407, 47, 407, 407, 407, 407,
867 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
868
869 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
870 47, 407, 407, 323, 407, 407, 407, 407, 407, 407,
871 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
872 407, 407, 324, 46, 47, 407, 47, 47, 47, 47,
873 47, 407, 47, 407, 407, 407, 407, 407, 407, 407,
874 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
875 407, 407, 407, 407, 407, 407, 407, 47, 407, 407,
876 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
877 407, 407, 407, 407, 407, 407, 326, 46, 47, 407,
878 47, 47, 47, 47, 47, 407, 47, 407, 407, 407,
879
880 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
881 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
882 407, 47, 407, 407, 407, 407, 407, 407, 407, 407,
883 407, 407, 407, 407, 407, 407, 407, 407, 407, 327,
884 46, 47, 407, 47, 47, 47, 47, 47, 407, 47,
885 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
886 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
887 407, 407, 407, 407, 47, 407, 407, 348, 46, 47,
888 407, 47, 47, 47, 47, 47, 407, 47, 407, 407,
889 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
890
891 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
892 407, 407, 47, 407, 407, 407, 407, 407, 407, 407,
893 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
894 407, 407, 407, 407, 349, 46, 47, 407, 47, 47,
895 47, 47, 47, 407, 47, 407, 407, 407, 407, 407,
896 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
897 407, 407, 407, 407, 407, 407, 407, 407, 407, 47,
898 407, 407, 407, 407, 351, 367, 47, 407, 47, 47,
899 47, 47, 47, 407, 47, 407, 407, 407, 407, 407,
900 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
901
902 407, 407, 407, 407, 407, 407, 407, 407, 407, 47,
903 368, 407, 407, 369, 46, 47, 407, 47, 47, 47,
904 47, 47, 407, 47, 407, 407, 407, 407, 407, 407,
905 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
906 407, 407, 407, 407, 407, 407, 407, 407, 47, 407,
907 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
908 407, 407, 407, 407, 407, 384, 46, 47, 407, 47,
909 47, 47, 47, 47, 407, 47, 407, 407, 407, 407,
910 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
911 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
912
913 47, 407, 407, 407, 407, 407, 407, 407, 407, 385,
914 46, 47, 407, 47, 47, 47, 47, 47, 407, 47,
915 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
916 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
917 407, 407, 407, 407, 47, 407, 407, 392, 46, 47,
918 407, 47, 47, 47, 47, 47, 407, 47, 407, 407,
919 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
920 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
921 407, 407, 47, 407, 407, 407, 407, 407, 407, 407,
922 407, 407, 407, 407, 407, 407, 407, 407, 407, 393,
923
924 46, 47, 407, 47, 47, 47, 47, 47, 407, 47,
925 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
926 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
927 407, 407, 407, 407, 47, 407, 407, 407, 407, 407,
928 407, 407, 401, 41, 41, 41, 43, 43, 43, 48,
929 48, 3, 407, 407, 407, 407, 407, 407, 407, 407,
930 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
931 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
932 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
933 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
934
935 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
936 407, 407, 407, 407, 407, 407, 407
937 } ;
938
939 static yyconst flex_int16_t yy_chk[3318] =
940 { 0,
941 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
942 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
943 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
944 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
945 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
946 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
947 1, 1, 1, 1, 1, 9, 9, 10, 10, 14,
948 10, 10, 10, 10, 10, 15, 10, 26, 26, 16,
949 347, 15, 31, 17, 18, 411, 19, 400, 10, 28,
950 31, 21, 18, 22, 14, 28, 43, 43, 10, 19,
951
952 23, 10, 10, 10, 16, 10, 15, 10, 17, 18,
953 10, 19, 10, 24, 20, 10, 21, 18, 22, 10,
954 10, 20, 10, 20, 19, 23, 25, 32, 20, 347,
955 61, 88, 71, 89, 73, 33, 61, 399, 24, 20,
956 32, 96, 33, 71, 33, 73, 20, 96, 20, 33,
957 88, 25, 89, 20, 48, 48, 101, 48, 48, 48,
958 48, 48, 108, 48, 328, 398, 329, 101, 143, 143,
959 143, 143, 143, 145, 145, 145, 145, 145, 359, 340,
960 397, 108, 328, 143, 329, 396, 395, 359, 48, 49,
961 49, 394, 49, 49, 49, 49, 49, 340, 49, 165,
962
963 165, 165, 165, 165, 391, 360, 364, 386, 387, 390,
964 383, 382, 49, 145, 360, 364, 386, 387, 390, 381,
965 380, 379, 378, 49, 50, 50, 377, 50, 50, 50,
966 50, 50, 376, 50, 375, 374, 366, 182, 182, 165,
967 182, 182, 182, 182, 182, 363, 182, 50, 183, 183,
968 362, 183, 183, 183, 183, 183, 361, 183, 50, 51,
969 51, 357, 51, 51, 51, 51, 51, 356, 51, 231,
970 231, 182, 231, 231, 231, 231, 231, 355, 231, 354,
971 353, 352, 183, 344, 343, 233, 233, 342, 233, 233,
972 233, 233, 233, 51, 233, 237, 237, 341, 237, 237,
973
974 237, 237, 237, 231, 237, 338, 337, 336, 335, 334,
975 51, 52, 52, 333, 52, 52, 52, 52, 52, 233,
976 52, 332, 331, 315, 314, 313, 312, 311, 310, 237,
977 309, 243, 243, 308, 243, 243, 243, 243, 243, 307,
978 243, 306, 305, 275, 275, 52, 275, 275, 275, 275,
979 275, 304, 275, 303, 52, 53, 53, 302, 53, 53,
980 53, 53, 53, 301, 53, 243, 300, 299, 297, 276,
981 276, 295, 276, 276, 276, 276, 276, 275, 276, 280,
982 280, 294, 280, 280, 280, 280, 280, 293, 280, 53,
983 292, 291, 290, 274, 53, 54, 54, 273, 54, 54,
984
985 54, 54, 54, 276, 54, 272, 271, 270, 269, 268,
986 267, 266, 265, 280, 264, 263, 281, 281, 54, 281,
987 281, 281, 281, 281, 262, 281, 261, 260, 259, 54,
988 55, 55, 258, 55, 55, 55, 55, 55, 257, 55,
989 286, 286, 256, 286, 286, 286, 286, 286, 255, 286,
990 281, 254, 318, 318, 253, 318, 318, 318, 318, 318,
991 252, 318, 321, 321, 55, 321, 321, 321, 321, 321,
992 251, 321, 250, 249, 286, 248, 247, 55, 56, 56,
993 246, 56, 56, 56, 56, 56, 318, 56, 322, 322,
994 245, 322, 322, 322, 322, 322, 321, 322, 326, 326,
995
996 228, 326, 326, 326, 326, 326, 227, 326, 226, 225,
997 349, 349, 56, 349, 349, 349, 349, 349, 224, 349,
998 223, 56, 322, 56, 57, 57, 222, 57, 57, 57,
999 57, 57, 326, 57, 351, 351, 221, 351, 351, 351,
1000 351, 351, 220, 351, 349, 219, 218, 393, 393, 217,
1001 393, 393, 393, 393, 393, 216, 393, 215, 57, 214,
1002 401, 401, 213, 401, 401, 401, 401, 401, 351, 401,
1003 212, 211, 210, 57, 209, 208, 207, 206, 57, 58,
1004 58, 393, 58, 58, 58, 58, 58, 199, 58, 198,
1005 195, 194, 193, 192, 401, 191, 190, 189, 188, 171,
1006
1007 170, 169, 168, 167, 166, 164, 163, 162, 161, 160,
1008 159, 158, 157, 58, 156, 155, 154, 153, 152, 151,
1009 150, 149, 148, 147, 146, 144, 142, 141, 140, 139,
1010 138, 137, 58, 59, 59, 136, 59, 59, 59, 59,
1011 59, 135, 59, 134, 133, 132, 131, 130, 129, 128,
1012 127, 110, 109, 107, 106, 105, 104, 103, 102, 100,
1013 99, 98, 97, 95, 93, 92, 91, 59, 59, 90,
1014 87, 86, 85, 84, 83, 82, 59, 60, 60, 81,
1015 60, 60, 60, 60, 60, 80, 60, 79, 77, 76,
1016 74, 72, 70, 69, 68, 67, 66, 65, 64, 62,
1017
1018 45, 41, 39, 38, 37, 36, 35, 34, 30, 29,
1019 27, 60, 8, 7, 5, 3, 60, 111, 111, 0,
1020 111, 111, 111, 111, 111, 0, 111, 0, 0, 0,
1021 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1022 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1023 0, 111, 0, 0, 0, 0, 0, 0, 0, 0,
1024 0, 0, 0, 0, 0, 0, 111, 112, 112, 0,
1025 112, 112, 112, 112, 112, 0, 112, 0, 0, 0,
1026 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1027 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1028
1029 0, 112, 0, 0, 0, 0, 0, 0, 0, 0,
1030 0, 0, 0, 0, 0, 0, 112, 113, 113, 0,
1031 113, 113, 113, 113, 113, 0, 113, 0, 0, 0,
1032 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1033 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1034 0, 113, 0, 0, 0, 0, 0, 0, 113, 114,
1035 114, 0, 114, 114, 114, 114, 114, 0, 114, 0,
1036 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1037 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1038 0, 0, 0, 114, 0, 0, 0, 0, 0, 0,
1039
1040 0, 0, 0, 0, 0, 0, 114, 115, 115, 0,
1041 115, 115, 115, 115, 115, 0, 115, 0, 0, 0,
1042 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1043 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1044 0, 115, 0, 0, 0, 0, 0, 115, 116, 116,
1045 0, 116, 116, 116, 116, 116, 0, 116, 0, 0,
1046 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1047 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1048 0, 0, 116, 0, 0, 0, 0, 0, 0, 0,
1049 0, 0, 0, 0, 0, 0, 0, 116, 117, 117,
1050
1051 0, 117, 117, 117, 117, 117, 0, 117, 0, 0,
1052 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1053 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1054 0, 0, 117, 0, 0, 117, 118, 118, 0, 118,
1055 118, 118, 118, 118, 0, 118, 0, 0, 0, 0,
1056 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1057 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1058 118, 0, 118, 119, 119, 0, 119, 119, 119, 119,
1059 119, 0, 119, 0, 0, 0, 0, 0, 0, 0,
1060 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1061
1062 0, 0, 0, 0, 0, 0, 0, 119, 0, 0,
1063 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1064 0, 0, 0, 0, 0, 0, 0, 0, 119, 120,
1065 120, 0, 120, 120, 120, 120, 120, 0, 120, 0,
1066 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1067 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1068 0, 0, 0, 120, 0, 0, 0, 0, 0, 0,
1069 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1070 0, 0, 120, 121, 121, 0, 121, 121, 121, 121,
1071 121, 0, 121, 0, 0, 0, 0, 0, 0, 0,
1072
1073 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1074 0, 0, 0, 0, 0, 0, 0, 121, 0, 0,
1075 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1076 0, 0, 0, 0, 0, 0, 121, 122, 122, 0,
1077 122, 122, 122, 122, 122, 0, 122, 0, 0, 0,
1078 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1079 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1080 0, 122, 122, 123, 123, 0, 123, 123, 123, 123,
1081 123, 0, 123, 0, 0, 0, 0, 0, 0, 0,
1082 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1083
1084 0, 0, 0, 0, 0, 0, 0, 123, 0, 0,
1085 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1086 0, 0, 0, 0, 123, 124, 124, 0, 124, 124,
1087 124, 124, 124, 0, 124, 0, 0, 0, 0, 0,
1088 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1089 0, 0, 0, 0, 0, 0, 0, 0, 0, 124,
1090 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1091 0, 124, 125, 125, 0, 125, 125, 125, 125, 125,
1092 0, 125, 0, 0, 0, 0, 0, 0, 0, 0,
1093 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1094
1095 0, 0, 0, 0, 0, 0, 125, 0, 0, 0,
1096 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1097 0, 0, 0, 125, 172, 172, 0, 172, 172, 172,
1098 172, 172, 0, 172, 0, 0, 0, 0, 0, 0,
1099 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1100 0, 0, 0, 0, 0, 0, 0, 0, 172, 0,
1101 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1102 0, 0, 0, 0, 0, 0, 0, 172, 173, 173,
1103 0, 173, 173, 173, 173, 173, 0, 173, 0, 0,
1104 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1105
1106 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1107 0, 0, 173, 0, 0, 0, 0, 0, 0, 0,
1108 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1109 0, 173, 174, 174, 0, 174, 174, 174, 174, 174,
1110 0, 174, 0, 0, 0, 0, 0, 0, 0, 0,
1111 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1112 0, 0, 0, 0, 0, 0, 174, 0, 0, 0,
1113 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1114 0, 0, 0, 0, 174, 175, 175, 0, 175, 175,
1115 175, 175, 175, 0, 175, 0, 0, 0, 0, 0,
1116
1117 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1118 0, 0, 0, 0, 0, 0, 0, 0, 0, 175,
1119 0, 0, 0, 175, 176, 176, 0, 176, 176, 176,
1120 176, 176, 0, 176, 0, 0, 0, 0, 0, 0,
1121 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1122 0, 0, 0, 0, 0, 0, 0, 0, 176, 0,
1123 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1124 0, 0, 0, 0, 0, 0, 176, 177, 177, 0,
1125 177, 177, 177, 177, 177, 0, 177, 0, 0, 0,
1126 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1127
1128 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1129 0, 177, 0, 0, 0, 0, 0, 0, 0, 0,
1130 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1131 177, 179, 179, 0, 179, 179, 179, 179, 179, 0,
1132 179, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1133 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1134 0, 0, 0, 0, 0, 179, 0, 0, 0, 0,
1135 0, 0, 0, 0, 0, 0, 179, 180, 180, 0,
1136 180, 180, 180, 180, 180, 0, 180, 0, 0, 0,
1137 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1138
1139 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1140 0, 180, 0, 0, 0, 180, 0, 0, 0, 0,
1141 0, 0, 0, 0, 0, 0, 0, 0, 0, 180,
1142 181, 181, 0, 181, 181, 181, 181, 181, 0, 181,
1143 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1144 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1145 0, 0, 0, 0, 181, 0, 0, 0, 0, 0,
1146 0, 0, 0, 0, 0, 0, 181, 184, 184, 0,
1147 184, 184, 184, 184, 184, 0, 184, 0, 0, 0,
1148 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1149
1150 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1151 0, 184, 0, 0, 0, 0, 0, 0, 0, 0,
1152 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1153 184, 185, 185, 0, 185, 185, 185, 185, 185, 0,
1154 185, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1155 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1156 0, 0, 0, 0, 0, 185, 0, 0, 0, 0,
1157 0, 0, 185, 186, 186, 0, 186, 186, 186, 186,
1158 186, 0, 186, 0, 0, 0, 0, 0, 0, 0,
1159 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1160
1161 0, 0, 0, 0, 0, 0, 0, 186, 0, 0,
1162 0, 0, 186, 187, 187, 0, 187, 187, 187, 187,
1163 187, 0, 187, 0, 0, 0, 0, 0, 0, 0,
1164 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1165 0, 0, 0, 0, 0, 0, 0, 187, 0, 187,
1166 229, 229, 0, 229, 229, 229, 229, 229, 0, 229,
1167 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1168 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1169 0, 0, 0, 0, 229, 0, 0, 0, 0, 0,
1170 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1171
1172 0, 0, 229, 230, 230, 0, 230, 230, 230, 230,
1173 230, 0, 230, 0, 0, 0, 0, 0, 0, 0,
1174 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1175 0, 0, 0, 0, 0, 0, 0, 230, 0, 0,
1176 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1177 0, 0, 0, 0, 0, 230, 232, 232, 0, 232,
1178 232, 232, 232, 232, 0, 232, 0, 0, 0, 0,
1179 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1180 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1181 232, 0, 0, 0, 0, 0, 0, 0, 0, 232,
1182
1183 234, 234, 0, 234, 234, 234, 234, 234, 0, 234,
1184 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1185 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1186 0, 0, 0, 0, 234, 0, 0, 0, 0, 0,
1187 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1188 0, 0, 234, 235, 235, 0, 235, 235, 235, 235,
1189 235, 0, 235, 0, 0, 0, 0, 0, 0, 0,
1190 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1191 0, 0, 0, 0, 0, 0, 0, 235, 0, 0,
1192 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1193
1194 0, 0, 0, 0, 0, 235, 236, 236, 0, 236,
1195 236, 236, 236, 236, 0, 236, 0, 0, 0, 0,
1196 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1197 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1198 236, 0, 0, 0, 0, 0, 0, 0, 0, 236,
1199 238, 238, 0, 238, 238, 238, 238, 238, 0, 238,
1200 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1201 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1202 0, 0, 0, 0, 238, 0, 0, 238, 0, 0,
1203 0, 238, 241, 241, 0, 241, 241, 241, 241, 241,
1204
1205 0, 241, 0, 0, 0, 0, 0, 0, 0, 0,
1206 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1207 0, 0, 0, 0, 0, 0, 241, 0, 0, 0,
1208 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1209 0, 0, 0, 0, 241, 242, 242, 0, 242, 242,
1210 242, 242, 242, 0, 242, 0, 0, 0, 0, 0,
1211 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1212 0, 0, 0, 0, 0, 0, 0, 0, 0, 242,
1213 0, 0, 0, 0, 242, 244, 244, 0, 244, 244,
1214 244, 244, 244, 0, 244, 0, 0, 0, 0, 0,
1215
1216 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1217 0, 0, 0, 0, 0, 0, 0, 0, 0, 244,
1218 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1219 0, 0, 0, 244, 278, 278, 0, 278, 278, 278,
1220 278, 278, 0, 278, 0, 0, 0, 0, 0, 0,
1221 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1222 0, 0, 0, 0, 0, 0, 0, 0, 278, 0,
1223 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1224 0, 0, 0, 0, 0, 278, 282, 282, 0, 282,
1225 282, 282, 282, 282, 0, 282, 0, 0, 0, 0,
1226
1227 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1228 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1229 282, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1230 0, 0, 0, 0, 0, 0, 0, 282, 284, 284,
1231 0, 284, 284, 284, 284, 284, 0, 284, 0, 0,
1232 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1233 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1234 0, 0, 284, 0, 0, 284, 285, 285, 0, 285,
1235 285, 285, 285, 285, 0, 285, 0, 0, 0, 0,
1236 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1237
1238 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1239 285, 0, 0, 285, 0, 0, 0, 0, 0, 0,
1240 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1241 0, 0, 285, 287, 287, 0, 287, 287, 287, 287,
1242 287, 0, 287, 0, 0, 0, 0, 0, 0, 0,
1243 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1244 0, 0, 0, 0, 0, 0, 0, 287, 0, 0,
1245 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1246 0, 0, 0, 0, 0, 0, 287, 289, 289, 0,
1247 289, 289, 289, 289, 289, 0, 289, 0, 0, 0,
1248
1249 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1250 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1251 0, 289, 0, 0, 0, 0, 0, 0, 0, 0,
1252 0, 0, 0, 0, 0, 0, 0, 0, 0, 289,
1253 323, 323, 0, 323, 323, 323, 323, 323, 0, 323,
1254 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1255 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1256 0, 0, 0, 0, 323, 0, 0, 323, 324, 324,
1257 0, 324, 324, 324, 324, 324, 0, 324, 0, 0,
1258 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1259
1260 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1261 0, 0, 324, 0, 0, 0, 0, 0, 0, 0,
1262 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1263 0, 0, 0, 0, 324, 327, 327, 0, 327, 327,
1264 327, 327, 327, 0, 327, 0, 0, 0, 0, 0,
1265 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1266 0, 0, 0, 0, 0, 0, 0, 0, 0, 327,
1267 0, 0, 0, 0, 327, 348, 348, 0, 348, 348,
1268 348, 348, 348, 0, 348, 0, 0, 0, 0, 0,
1269 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1270
1271 0, 0, 0, 0, 0, 0, 0, 0, 0, 348,
1272 348, 0, 0, 348, 368, 368, 0, 368, 368, 368,
1273 368, 368, 0, 368, 0, 0, 0, 0, 0, 0,
1274 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1275 0, 0, 0, 0, 0, 0, 0, 0, 368, 0,
1276 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1277 0, 0, 0, 0, 0, 368, 369, 369, 0, 369,
1278 369, 369, 369, 369, 0, 369, 0, 0, 0, 0,
1279 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1280 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1281
1282 369, 0, 0, 0, 0, 0, 0, 0, 0, 369,
1283 384, 384, 0, 384, 384, 384, 384, 384, 0, 384,
1284 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1285 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1286 0, 0, 0, 0, 384, 0, 0, 384, 385, 385,
1287 0, 385, 385, 385, 385, 385, 0, 385, 0, 0,
1288 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1289 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1290 0, 0, 385, 0, 0, 0, 0, 0, 0, 0,
1291 0, 0, 0, 0, 0, 0, 0, 0, 0, 385,
1292
1293 392, 392, 0, 392, 392, 392, 392, 392, 0, 392,
1294 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1295 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1296 0, 0, 0, 0, 392, 0, 0, 0, 0, 0,
1297 0, 0, 392, 408, 408, 408, 409, 409, 409, 410,
1298 410, 407, 407, 407, 407, 407, 407, 407, 407, 407,
1299 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
1300 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
1301 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
1302 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
1303
1304 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
1305 407, 407, 407, 407, 407, 407, 407
1306 } ;
1307
1308 static yy_state_type yy_last_accepting_state;
1309 static char *yy_last_accepting_cpos;
1310
1311 extern int Config_flex_debug;
1312 int Config_flex_debug = 0;
1313
1314 /* The intent behind this definition is that it'll catch
1315 * any uses of REJECT which flex missed.
1316 */
1317 #define REJECT reject_used_but_not_detected
1318 #define yymore() yymore_used_but_not_detected
1319 #define YY_MORE_ADJ 0
1320 #define YY_RESTORE_YY_MORE_OFFSET
1321 char *Configtext;
1322 #line 1 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1323 /*===- ConfigLexer.l - Scanner for CompilerDriver Config Files -*- C++ -*--===//
1324 //
1325 // The LLVM Compiler Infrastructure
1326 //
1327 // This file is distributed under the University of Illinois Open Source
1328 // License. See LICENSE.TXT for details.
1329 //
1330 //===----------------------------------------------------------------------===//
1331 //
1332 // This file implements the flex scanner for configuration files for the
1333 // llvmc CompilerDriver.
1334 //
1335 //===----------------------------------------------------------------------===*/
1336 #line 29 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1337
1338 #include "ConfigLexer.h"
1339
1340 #define YY_INPUT(buf,result,max_size) \
1341 { \
1342 assert(ConfigLexerInput != 0 && "Oops"); \
1343 result = ConfigLexerInput->read(buf,max_size); \
1344 if (result == 0 ) result = YY_NULL; \
1345 }
1346
1347 #define YY_FATAL_ERROR(msg) \
1348 { \
1349 assert(ConfigLexerInput != 0 && "Oops"); \
1350 ConfigLexerInput->error(msg); \
1351 }
1352
1353 #define YY_DECL ConfigLexerTokens llvm::Configlex()
1354
1355 #define yyterminate() { return EOFTOK; }
1356
1357 using namespace llvm;
1358
1359 inline llvm::ConfigLexerTokens
1360 handleNameContext(llvm::ConfigLexerTokens token) {
1361 ConfigLexerState.StringVal = Configtext;
1362 if (ConfigLexerState.in_value)
1363 return OPTION;
1364 return token;
1365 }
1366
1367 inline llvm::ConfigLexerTokens
1368 handleSubstitution(llvm::ConfigLexerTokens token) {
1369 if (ConfigLexerState.in_value) {
1370 ConfigLexerState.StringVal = Configtext;
1371 return token;
1372 }
1373 YY_FATAL_ERROR("Substitition tokens not allowed in names" );
1374 return ERRORTOK;
1375 }
1376
1377 inline llvm::ConfigLexerTokens handleValueContext(llvm::ConfigLexerTokens token) {
1378 ConfigLexerState.StringVal = Configtext;
1379 if (ConfigLexerState.in_value)
1380 return token;
1381 return OPTION;
1382 }
1383
1384 #line 1386 "ConfigLexer.cpp"
1385
1386 #define INITIAL 0
1387
1388 #ifndef YY_NO_UNISTD_H
1389 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1390 * down here because we want the user's section 1 to have been scanned first.
1391 * The user has a chance to override it with an option.
1392 */
1393 #include
1394 #endif
1395
1396 #ifndef YY_EXTRA_TYPE
1397 #define YY_EXTRA_TYPE void *
1398 #endif
1399
1400 static int yy_init_globals (void );
1401
1402 /* Macros after this point can all be overridden by user definitions in
1403 * section 1.
1404 */
1405
1406 #ifndef YY_SKIP_YYWRAP
1407 #ifdef __cplusplus
1408 extern "C" int Configwrap (void );
1409 #else
1410 extern int Configwrap (void );
1411 #endif
1412 #endif
1413
1414 static inline void yyunput (int c,char *buf_ptr );
1415
1416 #ifndef yytext_ptr
1417 static void yy_flex_strncpy (char *,yyconst char *,int );
1418 #endif
1419
1420 #ifdef YY_NEED_STRLEN
1421 static int yy_flex_strlen (yyconst char * );
1422 #endif
1423
1424 #ifndef YY_NO_INPUT
1425
1426 #ifdef __cplusplus
1427 static int yyinput (void );
1428 #else
1429 static int input (void );
1430 #endif
1431
1432 #endif
1433
1434 /* Amount of stuff to slurp up with each read. */
1435 #ifndef YY_READ_BUF_SIZE
1436 #define YY_READ_BUF_SIZE 8192
1437 #endif
1438
1439 /* Copy whatever the last rule matched to the standard output. */
1440 #ifndef ECHO
1441 /* This used to be an fputs(), but since the string might contain NUL's,
1442 * we now use fwrite().
1443 */
1444 #define ECHO (void) fwrite( Configtext, Configleng, 1, Configout )
1445 #endif
1446
1447 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1448 * is returned in "result".
1449 */
1450 #ifndef YY_INPUT
1451 #define YY_INPUT(buf,result,max_size) \
1452 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1453 { \
1454 int c = '*'; \
1455 size_t n; \
1456 for ( n = 0; n < max_size && \
1457 (c = getc( Configin )) != EOF && c != '\n'; ++n ) \
1458 buf[n] = (char) c; \
1459 if ( c == '\n' ) \
1460 buf[n++] = (char) c; \
1461 if ( c == EOF && ferror( Configin ) ) \
1462 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1463 result = n; \
1464 } \
1465 else \
1466 { \
1467 errno=0; \
1468 while ( (result = fread(buf, 1, max_size, Configin))==0 && ferror(Configin)) \
1469 { \
1470 if( errno != EINTR) \
1471 { \
1472 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1473 break; \
1474 } \
1475 errno=0; \
1476 clearerr(Configin); \
1477 } \
1478 }\
1479 \
1480
1481 #endif
1482
1483 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1484 * we don't want an extra ';' after the "return" because that will cause
1485 * some compilers to complain about unreachable statements.
1486 */
1487 #ifndef yyterminate
1488 #define yyterminate() return YY_NULL
1489 #endif
1490
1491 /* Number of entries by which start-condition stack grows. */
1492 #ifndef YY_START_STACK_INCR
1493 #define YY_START_STACK_INCR 25
1494 #endif
1495
1496 /* Report a fatal error. */
1497 #ifndef YY_FATAL_ERROR
1498 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1499 #endif
1500
1501 /* end tables serialization structures and prototypes */
1502
1503 /* Default declaration of generated scanner - a define so the user can
1504 * easily add parameters.
1505 */
1506 #ifndef YY_DECL
1507 #define YY_DECL_IS_OURS 1
1508
1509 extern int Configlex (void);
1510
1511 #define YY_DECL int Configlex (void)
1512 #endif /* !YY_DECL */
1513
1514 /* Code executed at the beginning of each rule, after Configtext and Configleng
1515 * have been set up.
1516 */
1517 #ifndef YY_USER_ACTION
1518 #define YY_USER_ACTION
1519 #endif
1520
1521 /* Code executed at the end of each rule. */
1522 #ifndef YY_BREAK
1523 #define YY_BREAK break;
1524 #endif
1525
1526 #define YY_RULE_SETUP \
1527 YY_USER_ACTION
1528
1529 /** The main scanner function which does all the work.
1530 */
1531 YY_DECL
1532 {
1533 register yy_state_type yy_current_state;
1534 register char *yy_cp, *yy_bp;
1535 register int yy_act;
1536
1537 #line 114 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1538
1539
1540 #line 1542 "ConfigLexer.cpp"
1541
1542 if ( !(yy_init) )
1543 {
1544 (yy_init) = 1;
1545
1546 #ifdef YY_USER_INIT
1547 YY_USER_INIT;
1548 #endif
1549
1550 if ( ! (yy_start) )
1551 (yy_start) = 1; /* first start state */
1552
1553 if ( ! Configin )
1554 Configin = stdin;
1555
1556 if ( ! Configout )
1557 Configout = stdout;
1558
1559 if ( ! YY_CURRENT_BUFFER ) {
1560 Configensure_buffer_stack ();
1561 YY_CURRENT_BUFFER_LVALUE =
1562 Config_create_buffer(Configin,YY_BUF_SIZE );
1563 }
1564
1565 Config_load_buffer_state( );
1566 }
1567
1568 while ( 1 ) /* loops until end-of-file is reached */
1569 {
1570 yy_cp = (yy_c_buf_p);
1571
1572 /* Support of Configtext. */
1573 *yy_cp = (yy_hold_char);
1574
1575 /* yy_bp points to the position in yy_ch_buf of the start of
1576 * the current run.
1577 */
1578 yy_bp = yy_cp;
1579
1580 yy_current_state = (yy_start);
1581 yy_match:
1582 do
1583 {
1584 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1585 if ( yy_accept[yy_current_state] )
1586 {
1587 (yy_last_accepting_state) = yy_current_state;
1588 (yy_last_accepting_cpos) = yy_cp;
1589 }
1590 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1591 {
1592 yy_current_state = (int) yy_def[yy_current_state];
1593 if ( yy_current_state >= 408 )
1594 yy_c = yy_meta[(unsigned int) yy_c];
1595 }
1596 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1597 ++yy_cp;
1598 }
1599 while ( yy_current_state != 407 );
1600 yy_cp = (yy_last_accepting_cpos);
1601 yy_current_state = (yy_last_accepting_state);
1602
1603 yy_find_action:
1604 yy_act = yy_accept[yy_current_state];
1605
1606 YY_DO_BEFORE_ACTION;
1607
1608 do_action: /* This label is used only to access EOF actions. */
1609
1610 switch ( yy_act )
1611 { /* beginning of action switch */
1612 case 0: /* must back up */
1613 /* undo the effects of YY_DO_BEFORE_ACTION */
1614 *yy_cp = (yy_hold_char);
1615 yy_cp = (yy_last_accepting_cpos);
1616 yy_current_state = (yy_last_accepting_state);
1617 goto yy_find_action;
1618
1619 case 1:
1620 YY_RULE_SETUP
1621 #line 116 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1622 { if (ConfigLexerState.in_value) return SPACE; }
1623 YY_BREAK
1624 case 2:
1625 /* rule 2 can match eol */
1626 YY_RULE_SETUP
1627 #line 118 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1628 { /* Ignore comments */
1629 ConfigLexerState.in_value = false;
1630 ConfigLexerState.lineNum++;
1631 return EOLTOK;
1632 }
1633 YY_BREAK
1634 case 3:
1635 /* rule 3 can match eol */
1636 YY_RULE_SETUP
1637 #line 124 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1638 { ConfigLexerState.lineNum++;
1639 /* Don't return EOLTOK! */
1640 }
1641 YY_BREAK
1642 case 4:
1643 /* rule 4 can match eol */
1644 YY_RULE_SETUP
1645 #line 128 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1646 { ConfigLexerState.in_value = false;
1647 ConfigLexerState.lineNum++;
1648 return EOLTOK;
1649 }
1650 YY_BREAK
1651 case 5:
1652 YY_RULE_SETUP
1653 #line 133 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1654 { ConfigLexerState.in_value = true;
1655 return EQUALS;
1656 }
1657 YY_BREAK
1658 case 6:
1659 YY_RULE_SETUP
1660 #line 137 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1661 { return SEPARATOR; }
1662 YY_BREAK
1663 case 7:
1664 YY_RULE_SETUP
1665 #line 139 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1666 { return handleNameContext(VERSION_TOK); }
1667 YY_BREAK
1668 case 8:
1669 YY_RULE_SETUP
1670 #line 141 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1671 { return handleNameContext(LANG); }
1672 YY_BREAK
1673 case 9:
1674 YY_RULE_SETUP
1675 #line 142 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1676 { return handleNameContext(LIBS); }
1677 YY_BREAK
1678 case 10:
1679 YY_RULE_SETUP
1680 #line 143 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1681 { return handleNameContext(NAME); }
1682 YY_BREAK
1683 case 11:
1684 YY_RULE_SETUP
1685 #line 144 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1686 { return handleNameContext(OPT1); }
1687 YY_BREAK
1688 case 12:
1689 YY_RULE_SETUP
1690 #line 145 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1691 { return handleNameContext(OPT2); }
1692 YY_BREAK
1693 case 13:
1694 YY_RULE_SETUP
1695 #line 146 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1696 { return handleNameContext(OPT3); }
1697 YY_BREAK
1698 case 14:
1699 YY_RULE_SETUP
1700 #line 147 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1701 { return handleNameContext(OPT4); }
1702 YY_BREAK
1703 case 15:
1704 YY_RULE_SETUP
1705 #line 148 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1706 { return handleNameContext(OPT5); }
1707 YY_BREAK
1708 case 16:
1709 YY_RULE_SETUP
1710 #line 150 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1711 { return handleNameContext(PREPROCESSOR); }
1712 YY_BREAK
1713 case 17:
1714 YY_RULE_SETUP
1715 #line 151 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1716 { return handleNameContext(COMMAND); }
1717 YY_BREAK
1718 case 18:
1719 YY_RULE_SETUP
1720 #line 152 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1721 { return handleNameContext(REQUIRED); }
1722 YY_BREAK
1723 case 19:
1724 YY_RULE_SETUP
1725 #line 154 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1726 { return handleNameContext(TRANSLATOR); }
1727 YY_BREAK
1728 case 20:
1729 YY_RULE_SETUP
1730 #line 155 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1731 { return handleNameContext(PREPROCESSES); }
1732 YY_BREAK
1733 case 21:
1734 YY_RULE_SETUP
1735 #line 156 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1736 { return handleNameContext(OUTPUT); }
1737 YY_BREAK
1738 case 22:
1739 YY_RULE_SETUP
1740 #line 158 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1741 { return handleNameContext(OPTIMIZER); }
1742 YY_BREAK
1743 case 23:
1744 YY_RULE_SETUP
1745 #line 159 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1746 { return handleNameContext(TRANSLATES); }
1747 YY_BREAK
1748 case 24:
1749 YY_RULE_SETUP
1750 #line 161 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1751 { return handleNameContext(ASSEMBLER); }
1752 YY_BREAK
1753 case 25:
1754 YY_RULE_SETUP
1755 #line 163 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1756 { return handleNameContext(LINKER); }
1757 YY_BREAK
1758 case 26:
1759 YY_RULE_SETUP
1760 #line 165 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1761 { return handleSubstitution(ARGS_SUBST); }
1762 YY_BREAK
1763 case 27:
1764 YY_RULE_SETUP
1765 #line 166 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1766 { return handleSubstitution(BINDIR_SUBST); }
1767 YY_BREAK
1768 case 28:
1769 YY_RULE_SETUP
1770 #line 167 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1771 { return handleSubstitution(DEFS_SUBST); }
1772 YY_BREAK
1773 case 29:
1774 YY_RULE_SETUP
1775 #line 168 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1776 { return handleSubstitution(IN_SUBST); }
1777 YY_BREAK
1778 case 30:
1779 YY_RULE_SETUP
1780 #line 169 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1781 { return handleSubstitution(INCLS_SUBST); }
1782 YY_BREAK
1783 case 31:
1784 YY_RULE_SETUP
1785 #line 170 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1786 { return handleSubstitution(LIBDIR_SUBST); }
1787 YY_BREAK
1788 case 32:
1789 YY_RULE_SETUP
1790 #line 171 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1791 { return handleSubstitution(LIBS_SUBST); }
1792 YY_BREAK
1793 case 33:
1794 YY_RULE_SETUP
1795 #line 172 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1796 { return handleSubstitution(LLVMGCCDIR_SUBST); }
1797 YY_BREAK
1798 case 34:
1799 YY_RULE_SETUP
1800 #line 173 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1801 { return handleSubstitution(LLVMGCCARCH_SUBST); }
1802 YY_BREAK
1803 case 35:
1804 YY_RULE_SETUP
1805 #line 174 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1806 { return handleSubstitution(LLVMGCC_SUBST); }
1807 YY_BREAK
1808 case 36:
1809 YY_RULE_SETUP
1810 #line 175 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1811 { return handleSubstitution(LLVMGXX_SUBST); }
1812 YY_BREAK
1813 case 37:
1814 YY_RULE_SETUP
1815 #line 176 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1816 { return handleSubstitution(LLVMCC1_SUBST); }
1817 YY_BREAK
1818 case 38:
1819 YY_RULE_SETUP
1820 #line 177 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1821 { return handleSubstitution(LLVMCC1PLUS_SUBST); }
1822 YY_BREAK
1823 case 39:
1824 YY_RULE_SETUP
1825 #line 178 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1826 { return handleSubstitution(OPT_SUBST); }
1827 YY_BREAK
1828 case 40:
1829 YY_RULE_SETUP
1830 #line 179 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1831 { return handleSubstitution(OUT_SUBST); }
1832 YY_BREAK
1833 case 41:
1834 YY_RULE_SETUP
1835 #line 180 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1836 { return handleSubstitution(STATS_SUBST); }
1837 YY_BREAK
1838 case 42:
1839 YY_RULE_SETUP
1840 #line 181 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1841 { return handleSubstitution(TARGET_SUBST); }
1842 YY_BREAK
1843 case 43:
1844 YY_RULE_SETUP
1845 #line 182 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1846 { return handleSubstitution(TIME_SUBST); }
1847 YY_BREAK
1848 case 44:
1849 YY_RULE_SETUP
1850 #line 183 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1851 { return handleSubstitution(VERBOSE_SUBST); }
1852 YY_BREAK
1853 case 45:
1854 YY_RULE_SETUP
1855 #line 184 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1856 { return handleSubstitution(FOPTS_SUBST); }
1857 YY_BREAK
1858 case 46:
1859 YY_RULE_SETUP
1860 #line 185 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1861 { return handleSubstitution(MOPTS_SUBST); }
1862 YY_BREAK
1863 case 47:
1864 YY_RULE_SETUP
1865 #line 186 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1866 { return handleSubstitution(WOPTS_SUBST); }
1867 YY_BREAK
1868 case 48:
1869 YY_RULE_SETUP
1870 #line 188 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1871 { return handleValueContext(ASSEMBLY); }
1872 YY_BREAK
1873 case 49:
1874 YY_RULE_SETUP
1875 #line 189 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1876 { return handleValueContext(BITCODE); }
1877 YY_BREAK
1878 case 50:
1879 YY_RULE_SETUP
1880 #line 190 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1881 { return handleValueContext(TRUETOK); }
1882 YY_BREAK
1883 case 51:
1884 YY_RULE_SETUP
1885 #line 191 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1886 { return handleValueContext(FALSETOK); }
1887 YY_BREAK
1888 case 52:
1889 YY_RULE_SETUP
1890 #line 193 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1891 { ConfigLexerState.StringVal = Configtext; return OPTION; }
1892 YY_BREAK
1893 case 53:
1894 /* rule 53 can match eol */
1895 YY_RULE_SETUP
1896 #line 194 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1897 { ConfigLexerState.StringVal = Configtext+1; // Nuke start quote
1898 ConfigLexerState.StringVal.erase(
1899 --ConfigLexerState.StringVal.end());
1900 return STRING;
1901 }
1902 YY_BREAK
1903 case 54:
1904 YY_RULE_SETUP
1905 #line 199 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1906 { YY_FATAL_ERROR("Invalid substitution token"); }
1907 YY_BREAK
1908 case 55:
1909 YY_RULE_SETUP
1910 #line 201 "/Users/sabre/llvm/tools/llvmc/ConfigLexer.l"
1911 ECHO;
1912 YY_BREAK
1913 #line 1915 "ConfigLexer.cpp"
1914 case YY_STATE_EOF(INITIAL):
1915 yyterminate();
1916
1917 case YY_END_OF_BUFFER:
1918 {
1919 /* Amount of text matched not including the EOB char. */
1920 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1921
1922 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1923 *yy_cp = (yy_hold_char);
1924 YY_RESTORE_YY_MORE_OFFSET
1925
1926 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1927 {
1928 /* We're scanning a new file or input source. It's
1929 * possible that this happened because the user
1930 * just pointed Configin at a new source and called
1931 * Configlex(). If so, then we have to assure
1932 * consistency between YY_CURRENT_BUFFER and our
1933 * globals. Here is the right place to do so, because
1934 * this is the first action (other than possibly a
1935 * back-up) that will match for the new input source.
1936 */
1937 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1938 YY_CURRENT_BUFFER_LVALUE->yy_input_file = Configin;
1939 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1940 }
1941
1942 /* Note that here we test for yy_c_buf_p "<=" to the position
1943 * of the first EOB in the buffer, since yy_c_buf_p will
1944 * already have been incremented past the NUL character
1945 * (since all states make transitions on EOB to the
1946 * end-of-buffer state). Contrast this with the test
1947 * in input().
1948 */
1949 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1950 { /* This was really a NUL. */
1951 yy_state_type yy_next_state;
1952
1953 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1954
1955 yy_current_state = yy_get_previous_state( );
1956
1957 /* Okay, we're now positioned to make the NUL
1958 * transition. We couldn't have
1959 * yy_get_previous_state() go ahead and do it
1960 * for us because it doesn't know how to deal
1961 * with the possibility of jamming (and we don't
1962 * want to build jamming into it because then it
1963 * will run more slowly).
1964 */
1965
1966 yy_next_state = yy_try_NUL_trans( yy_current_state );
1967
1968 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1969
1970 if ( yy_next_state )
1971 {
1972 /* Consume the NUL. */
1973 yy_cp = ++(yy_c_buf_p);
1974 yy_current_state = yy_next_state;
1975 goto yy_match;
1976 }
1977
1978 else
1979 {
1980 yy_cp = (yy_last_accepting_cpos);
1981 yy_current_state = (yy_last_accepting_state);
1982 goto yy_find_action;
1983 }
1984 }
1985
1986 else switch ( yy_get_next_buffer( ) )
1987 {
1988 case EOB_ACT_END_OF_FILE:
1989 {
1990 (yy_did_buffer_switch_on_eof) = 0;
1991
1992 if ( Configwrap( ) )
1993 {
1994 /* Note: because we've taken care in
1995 * yy_get_next_buffer() to have set up
1996 * Configtext, we can now set up
1997 * yy_c_buf_p so that if some total
1998 * hoser (like flex itself) wants to
1999 * call the scanner after we return the
2000 * YY_NULL, it'll still work - another
2001 * YY_NULL will get returned.
2002 */
2003 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2004
2005 yy_act = YY_STATE_EOF(YY_START);
2006 goto do_action;