aboutsummaryrefslogtreecommitdiffstats
path: root/Solvers/dreal4/bazel-bin/dreal/dr/scanner.ll.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Solvers/dreal4/bazel-bin/dreal/dr/scanner.ll.cc')
-rwxr-xr-xSolvers/dreal4/bazel-bin/dreal/dr/scanner.ll.cc2390
1 files changed, 2390 insertions, 0 deletions
diff --git a/Solvers/dreal4/bazel-bin/dreal/dr/scanner.ll.cc b/Solvers/dreal4/bazel-bin/dreal/dr/scanner.ll.cc
new file mode 100755
index 00000000..686257d2
--- /dev/null
+++ b/Solvers/dreal4/bazel-bin/dreal/dr/scanner.ll.cc
@@ -0,0 +1,2390 @@
1#line 1 "bazel-out/k8-opt/bin/dreal/dr/scanner.ll.cc"
2
3#line 3 "bazel-out/k8-opt/bin/dreal/dr/scanner.ll.cc"
4
5#define YY_INT_ALIGNED short int
6
7/* A lexical scanner generated by flex */
8
9/* %not-for-header */
10/* %if-c-only */
11/* %if-not-reentrant */
12/* %endif */
13/* %endif */
14/* %ok-for-header */
15
16#define FLEX_SCANNER
17#define YY_FLEX_MAJOR_VERSION 2
18#define YY_FLEX_MINOR_VERSION 6
19#define YY_FLEX_SUBMINOR_VERSION 4
20#if YY_FLEX_SUBMINOR_VERSION > 0
21#define FLEX_BETA
22#endif
23
24/* %if-c++-only */
25 /* The c++ scanner is a mess. The FlexLexer.h header file relies on the
26 * following macro. This is required in order to pass the c++-multiple-scanners
27 * test in the regression suite. We get reports that it breaks inheritance.
28 * We will address this in a future release of flex, or omit the C++ scanner
29 * altogether.
30 */
31 #define yyFlexLexer DrFlexLexer
32/* %endif */
33
34/* %if-c-only */
35/* %endif */
36
37#ifdef yyalloc
38#define Dralloc_ALREADY_DEFINED
39#else
40#define yyalloc Dralloc
41#endif
42
43#ifdef yyrealloc
44#define Drrealloc_ALREADY_DEFINED
45#else
46#define yyrealloc Drrealloc
47#endif
48
49#ifdef yyfree
50#define Drfree_ALREADY_DEFINED
51#else
52#define yyfree Drfree
53#endif
54
55/* %if-c-only */
56/* %endif */
57
58/* First, we deal with platform-specific or compiler-specific issues. */
59
60/* begin standard C headers. */
61/* %if-c-only */
62/* %endif */
63
64/* %if-tables-serialization */
65/* %endif */
66/* end standard C headers. */
67
68/* %if-c-or-c++ */
69/* flex integer type definitions */
70
71#ifndef FLEXINT_H
72#define FLEXINT_H
73
74/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
75
76#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
77
78/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
79 * if you want the limit (max/min) macros for int types.
80 */
81#ifndef __STDC_LIMIT_MACROS
82#define __STDC_LIMIT_MACROS 1
83#endif
84
85#include <inttypes.h>
86typedef int8_t flex_int8_t;
87typedef uint8_t flex_uint8_t;
88typedef int16_t flex_int16_t;
89typedef uint16_t flex_uint16_t;
90typedef int32_t flex_int32_t;
91typedef uint32_t flex_uint32_t;
92#else
93typedef signed char flex_int8_t;
94typedef short int flex_int16_t;
95typedef int flex_int32_t;
96typedef unsigned char flex_uint8_t;
97typedef unsigned short int flex_uint16_t;
98typedef unsigned int flex_uint32_t;
99
100/* Limits of integral types. */
101#ifndef INT8_MIN
102#define INT8_MIN (-128)
103#endif
104#ifndef INT16_MIN
105#define INT16_MIN (-32767-1)
106#endif
107#ifndef INT32_MIN
108#define INT32_MIN (-2147483647-1)
109#endif
110#ifndef INT8_MAX
111#define INT8_MAX (127)
112#endif
113#ifndef INT16_MAX
114#define INT16_MAX (32767)
115#endif
116#ifndef INT32_MAX
117#define INT32_MAX (2147483647)
118#endif
119#ifndef UINT8_MAX
120#define UINT8_MAX (255U)
121#endif
122#ifndef UINT16_MAX
123#define UINT16_MAX (65535U)
124#endif
125#ifndef UINT32_MAX
126#define UINT32_MAX (4294967295U)
127#endif
128
129#ifndef SIZE_MAX
130#define SIZE_MAX (~(size_t)0)
131#endif
132
133#endif /* ! C99 */
134
135#endif /* ! FLEXINT_H */
136
137/* %endif */
138
139/* begin standard C++ headers. */
140/* %if-c++-only */
141#include <iostream>
142#include <errno.h>
143#include <cstdlib>
144#include <cstdio>
145#include <cstring>
146/* end standard C++ headers. */
147/* %endif */
148
149/* TODO: this is always defined, so inline it */
150#define yyconst const
151
152#if defined(__GNUC__) && __GNUC__ >= 3
153#define yynoreturn __attribute__((__noreturn__))
154#else
155#define yynoreturn
156#endif
157
158/* %not-for-header */
159/* Returned upon end-of-file. */
160#define YY_NULL 0
161/* %ok-for-header */
162
163/* %not-for-header */
164/* Promotes a possibly negative, possibly signed char to an
165 * integer in range [0..255] for use as an array index.
166 */
167#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
168/* %ok-for-header */
169
170/* %if-reentrant */
171/* %endif */
172
173/* %if-not-reentrant */
174
175/* %endif */
176
177/* Enter a start condition. This macro really ought to take a parameter,
178 * but we do it the disgusting crufty way forced on us by the ()-less
179 * definition of BEGIN.
180 */
181#define BEGIN (yy_start) = 1 + 2 *
182/* Translate the current start state into a value that can be later handed
183 * to BEGIN to return to the state. The YYSTATE alias is for lex
184 * compatibility.
185 */
186#define YY_START (((yy_start) - 1) / 2)
187#define YYSTATE YY_START
188/* Action number for EOF rule of a given start state. */
189#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
190/* Special action meaning "start processing a new file". */
191#define YY_NEW_FILE yyrestart( yyin )
192#define YY_END_OF_BUFFER_CHAR 0
193
194/* Size of default input buffer. */
195#ifndef YY_BUF_SIZE
196#ifdef __ia64__
197/* On IA-64, the buffer size is 16k, not 8k.
198 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
199 * Ditto for the __ia64__ case accordingly.
200 */
201#define YY_BUF_SIZE 32768
202#else
203#define YY_BUF_SIZE 16384
204#endif /* __ia64__ */
205#endif
206
207/* The state buf must be large enough to hold one state per character in the main buffer.
208 */
209#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
210
211#ifndef YY_TYPEDEF_YY_BUFFER_STATE
212#define YY_TYPEDEF_YY_BUFFER_STATE
213typedef struct yy_buffer_state *YY_BUFFER_STATE;
214#endif
215
216#ifndef YY_TYPEDEF_YY_SIZE_T
217#define YY_TYPEDEF_YY_SIZE_T
218typedef size_t yy_size_t;
219#endif
220
221/* %if-not-reentrant */
222extern int yyleng;
223/* %endif */
224
225/* %if-c-only */
226/* %if-not-reentrant */
227/* %endif */
228/* %endif */
229
230#define EOB_ACT_CONTINUE_SCAN 0
231#define EOB_ACT_END_OF_FILE 1
232#define EOB_ACT_LAST_MATCH 2
233
234 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
235 * access to the local variable yy_act. Since yyless() is a macro, it would break
236 * existing scanners that call yyless() from OUTSIDE yylex.
237 * One obvious solution it to make yy_act a global. I tried that, and saw
238 * a 5% performance hit in a non-yylineno scanner, because yy_act is
239 * normally declared as a register variable-- so it is not worth it.
240 */
241 #define YY_LESS_LINENO(n) \
242 do { \
243 int yyl;\
244 for ( yyl = n; yyl < yyleng; ++yyl )\
245 if ( yytext[yyl] == '\n' )\
246 --yylineno;\
247 }while(0)
248 #define YY_LINENO_REWIND_TO(dst) \
249 do {\
250 const char *p;\
251 for ( p = yy_cp-1; p >= (dst); --p)\
252 if ( *p == '\n' )\
253 --yylineno;\
254 }while(0)
255
256/* Return all but the first "n" matched characters back to the input stream. */
257#define yyless(n) \
258 do \
259 { \
260 /* Undo effects of setting up yytext. */ \
261 int yyless_macro_arg = (n); \
262 YY_LESS_LINENO(yyless_macro_arg);\
263 *yy_cp = (yy_hold_char); \
264 YY_RESTORE_YY_MORE_OFFSET \
265 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
266 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
267 } \
268 while ( 0 )
269#define unput(c) yyunput( c, (yytext_ptr) )
270
271#ifndef YY_STRUCT_YY_BUFFER_STATE
272#define YY_STRUCT_YY_BUFFER_STATE
273struct yy_buffer_state
274 {
275/* %if-c-only */
276/* %endif */
277
278/* %if-c++-only */
279 std::streambuf* yy_input_file;
280/* %endif */
281
282 char *yy_ch_buf; /* input buffer */
283 char *yy_buf_pos; /* current position in input buffer */
284
285 /* Size of input buffer in bytes, not including room for EOB
286 * characters.
287 */
288 int yy_buf_size;
289
290 /* Number of characters read into yy_ch_buf, not including EOB
291 * characters.
292 */
293 int yy_n_chars;
294
295 /* Whether we "own" the buffer - i.e., we know we created it,
296 * and can realloc() it to grow it, and should free() it to
297 * delete it.
298 */
299 int yy_is_our_buffer;
300
301 /* Whether this is an "interactive" input source; if so, and
302 * if we're using stdio for input, then we want to use getc()
303 * instead of fread(), to make sure we stop fetching input after
304 * each newline.
305 */
306 int yy_is_interactive;
307
308 /* Whether we're considered to be at the beginning of a line.
309 * If so, '^' rules will be active on the next match, otherwise
310 * not.
311 */
312 int yy_at_bol;
313
314 int yy_bs_lineno; /**< The line count. */
315 int yy_bs_column; /**< The column count. */
316
317 /* Whether to try to fill the input buffer when we reach the
318 * end of it.
319 */
320 int yy_fill_buffer;
321
322 int yy_buffer_status;
323
324#define YY_BUFFER_NEW 0
325#define YY_BUFFER_NORMAL 1
326 /* When an EOF's been seen but there's still some text to process
327 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
328 * shouldn't try reading from the input source any more. We might
329 * still have a bunch of tokens to match, though, because of
330 * possible backing-up.
331 *
332 * When we actually see the EOF, we change the status to "new"
333 * (via yyrestart()), so that the user can continue scanning by
334 * just pointing yyin at a new input file.
335 */
336#define YY_BUFFER_EOF_PENDING 2
337
338 };
339#endif /* !YY_STRUCT_YY_BUFFER_STATE */
340
341/* %if-c-only Standard (non-C++) definition */
342/* %not-for-header */
343/* %if-not-reentrant */
344/* %endif */
345/* %ok-for-header */
346
347/* %endif */
348
349/* We provide macros for accessing buffer states in case in the
350 * future we want to put the buffer states in a more general
351 * "scanner state".
352 *
353 * Returns the top of the stack, or NULL.
354 */
355#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
356 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
357 : NULL)
358/* Same as previous macro, but useful when we know that the buffer stack is not
359 * NULL or when we need an lvalue. For internal use only.
360 */
361#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
362
363/* %if-c-only Standard (non-C++) definition */
364/* %if-not-reentrant */
365/* %not-for-header */
366/* %ok-for-header */
367
368/* %endif */
369/* %endif */
370
371void *yyalloc ( yy_size_t );
372void *yyrealloc ( void *, yy_size_t );
373void yyfree ( void * );
374
375#define yy_new_buffer yy_create_buffer
376#define yy_set_interactive(is_interactive) \
377 { \
378 if ( ! YY_CURRENT_BUFFER ){ \
379 yyensure_buffer_stack (); \
380 YY_CURRENT_BUFFER_LVALUE = \
381 yy_create_buffer( yyin, YY_BUF_SIZE ); \
382 } \
383 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
384 }
385#define yy_set_bol(at_bol) \
386 { \
387 if ( ! YY_CURRENT_BUFFER ){\
388 yyensure_buffer_stack (); \
389 YY_CURRENT_BUFFER_LVALUE = \
390 yy_create_buffer( yyin, YY_BUF_SIZE ); \
391 } \
392 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
393 }
394#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
395
396/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
397/* Begin user sect3 */
398
399#define FLEX_DEBUG
400typedef flex_uint8_t YY_CHAR;
401
402#define yytext_ptr yytext
403
404#include <FlexLexer.h>
405
406/* %% [1.5] DFA */
407
408/* %if-c-only Standard (non-C++) definition */
409/* %endif */
410
411/* Done after the current pattern has been matched and before the
412 * corresponding action - sets up yytext.
413 */
414#define YY_DO_BEFORE_ACTION \
415 (yytext_ptr) = yy_bp; \
416/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
417 yyleng = (int) (yy_cp - yy_bp); \
418 (yy_hold_char) = *yy_cp; \
419 *yy_cp = '\0'; \
420/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
421 (yy_c_buf_p) = yy_cp;
422/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
423#define YY_NUM_RULES 50
424#define YY_END_OF_BUFFER 51
425/* This struct is not used in this scanner,
426 but its presence is necessary. */
427struct yy_trans_info
428 {
429 flex_int32_t yy_verify;
430 flex_int32_t yy_nxt;
431 };
432static const flex_int16_t yy_accept[115] =
433 { 0,
434 0, 0, 51, 49, 43, 44, 49, 13, 11, 9,
435 12, 49, 14, 45, 45, 8, 10, 18, 15, 19,
436 48, 6, 7, 37, 48, 48, 48, 48, 48, 48,
437 48, 48, 48, 48, 48, 48, 43, 0, 1, 1,
438 46, 47, 46, 0, 45, 16, 39, 17, 48, 48,
439 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
440 48, 48, 48, 41, 48, 48, 48, 48, 48, 48,
441 0, 46, 22, 48, 40, 48, 48, 48, 24, 5,
442 20, 48, 21, 34, 33, 42, 36, 48, 23, 48,
443 25, 2, 27, 48, 48, 48, 26, 28, 31, 3,
444
445 48, 4, 30, 35, 32, 48, 48, 48, 29, 48,
446 28, 48, 38, 0
447 } ;
448
449static const YY_CHAR yy_ec[256] =
450 { 0,
451 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
452 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
453 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
454 1, 2, 1, 1, 5, 1, 1, 1, 1, 1,
455 1, 6, 7, 8, 9, 10, 11, 12, 13, 14,
456 13, 13, 13, 13, 13, 13, 13, 15, 16, 17,
457 18, 19, 1, 1, 20, 20, 20, 20, 21, 20,
458 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
459 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
460 22, 1, 23, 24, 25, 1, 26, 27, 28, 29,
461
462 30, 20, 31, 32, 33, 20, 20, 34, 35, 36,
463 37, 38, 39, 40, 41, 42, 20, 43, 44, 45,
464 20, 20, 1, 1, 1, 1, 1, 1, 1, 1,
465 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
466 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
467 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
468 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
471 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
472
473 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
474 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
475 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
476 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
477 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
478 1, 1, 1, 1, 1
479 } ;
480
481static const YY_CHAR yy_meta[46] =
482 { 0,
483 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
484 1, 2, 2, 2, 1, 1, 1, 1, 1, 2,
485 2, 1, 1, 1, 2, 2, 2, 2, 2, 2,
486 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
487 2, 2, 2, 2, 2
488 } ;
489
490static const flex_int16_t yy_base[117] =
491 { 0,
492 0, 0, 175, 176, 44, 176, 46, 176, 176, 176,
493 176, 39, 176, 44, 49, 176, 176, 156, 154, 154,
494 0, 176, 176, 176, 40, 18, 126, 135, 132, 38,
495 131, 127, 29, 39, 140, 139, 71, 80, 82, 84,
496 77, 80, 87, 97, 102, 176, 176, 176, 0, 123,
497 126, 133, 133, 127, 133, 117, 117, 118, 117, 123,
498 108, 116, 109, 0, 106, 119, 112, 107, 110, 105,
499 106, 112, 0, 103, 0, 93, 107, 106, 63, 0,
500 0, 107, 0, 0, 0, 0, 0, 112, 107, 96,
501 101, 0, 0, 94, 97, 103, 0, 114, 0, 0,
502
503 94, 0, 0, 0, 0, 81, 77, 67, 0, 72,
504 82, 36, 0, 176, 135, 45
505 } ;
506
507static const flex_int16_t yy_def[117] =
508 { 0,
509 114, 1, 114, 114, 114, 114, 115, 114, 114, 114,
510 114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
511 116, 114, 114, 114, 116, 116, 116, 116, 116, 116,
512 116, 116, 116, 116, 116, 116, 114, 115, 114, 115,
513 114, 114, 114, 114, 114, 114, 114, 114, 116, 116,
514 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
515 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
516 114, 114, 116, 116, 116, 116, 116, 116, 116, 116,
517 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
518 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
519
520 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
521 116, 116, 116, 0, 114, 114
522 } ;
523
524static const flex_int16_t yy_nxt[222] =
525 { 0,
526 4, 5, 6, 5, 7, 8, 9, 10, 11, 12,
527 13, 14, 15, 15, 16, 17, 18, 19, 20, 21,
528 21, 22, 23, 24, 4, 25, 21, 26, 21, 27,
529 21, 21, 28, 29, 30, 31, 32, 33, 21, 21,
530 34, 35, 36, 21, 21, 37, 49, 37, 39, 40,
531 41, 41, 41, 42, 56, 43, 43, 43, 42, 57,
532 45, 45, 45, 61, 44, 65, 50, 51, 66, 44,
533 62, 67, 37, 44, 37, 52, 113, 68, 44, 53,
534 54, 55, 39, 40, 39, 39, 39, 40, 41, 41,
535 41, 41, 41, 41, 99, 109, 42, 44, 43, 43,
536
537 43, 112, 111, 71, 100, 71, 44, 44, 72, 72,
538 72, 42, 97, 45, 45, 45, 44, 72, 72, 72,
539 94, 93, 44, 72, 72, 72, 110, 109, 108, 107,
540 106, 44, 105, 95, 96, 38, 38, 104, 103, 102,
541 101, 98, 97, 93, 92, 91, 90, 89, 88, 87,
542 86, 85, 84, 83, 82, 81, 80, 79, 78, 77,
543 76, 75, 74, 73, 70, 69, 64, 63, 60, 59,
544 58, 48, 47, 46, 114, 3, 114, 114, 114, 114,
545 114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
546 114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
547
548 114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
549 114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
550 114
551 } ;
552
553static const flex_int16_t yy_chk[222] =
554 { 0,
555 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
556 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
557 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
558 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
559 1, 1, 1, 1, 1, 5, 116, 5, 7, 7,
560 12, 12, 12, 14, 26, 14, 14, 14, 15, 26,
561 15, 15, 15, 30, 14, 33, 25, 25, 33, 15,
562 30, 34, 37, 14, 37, 25, 112, 34, 15, 25,
563 25, 25, 38, 38, 39, 39, 40, 40, 41, 41,
564 41, 42, 42, 42, 79, 111, 43, 41, 43, 43,
565
566 43, 110, 108, 44, 79, 44, 41, 43, 44, 44,
567 44, 45, 107, 45, 45, 45, 43, 71, 71, 71,
568 76, 106, 45, 72, 72, 72, 101, 98, 96, 95,
569 94, 45, 91, 76, 76, 115, 115, 90, 89, 88,
570 82, 78, 77, 74, 70, 69, 68, 67, 66, 65,
571 63, 62, 61, 60, 59, 58, 57, 56, 55, 54,
572 53, 52, 51, 50, 36, 35, 32, 31, 29, 28,
573 27, 20, 19, 18, 3, 114, 114, 114, 114, 114,
574 114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
575 114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
576
577 114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
578 114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
579 114
580 } ;
581
582/* Table of booleans, true if rule could match eol. */
583static const flex_int32_t yy_rule_can_match_eol[51] =
584 { 0,
5851, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
586 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
587 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, };
588
589static const flex_int16_t yy_rule_linenum[50] =
590 { 0,
591 77, 81, 82, 83, 84, 86, 87, 88, 89, 90,
592 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
593 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
594 112, 113, 114, 115, 116, 117, 118, 120, 121, 122,
595 123, 124, 127, 132, 136, 141, 146, 151, 157
596 } ;
597
598/* The intent behind this definition is that it'll catch
599 * any uses of REJECT which flex missed.
600 */
601#define REJECT reject_used_but_not_detected
602#define yymore() yymore_used_but_not_detected
603#define YY_MORE_ADJ 0
604#define YY_RESTORE_YY_MORE_OFFSET
605#line 1 "dreal/dr/scanner.ll"
606#line 2 "dreal/dr/scanner.ll"
607
608#ifdef __clang__
609#pragma clang diagnostic push
610#pragma clang diagnostic ignored "-Wdeprecated-register"
611#pragma clang diagnostic ignored "-Wnull-conversion"
612#pragma clang diagnostic ignored "-Wunneeded-internal-declaration"
613#endif
614
615/* ignore harmless bug in old versions of flex */
616#pragma GCC diagnostic push
617#pragma GCC diagnostic ignored "-Wsign-compare"
618#pragma GCC diagnostic ignored "-Wold-style-cast"
619
620#include <string>
621
622#include "dreal/dr/scanner.h"
623
624/* import the parser's token type into a local typedef */
625typedef dreal::DrParser::token token;
626typedef dreal::DrParser::token_type token_type;
627
628/* By default yylex returns int, we use token_type. Unfortunately yyterminate
629 * by default returns 0, which is not of token_type. */
630#define yyterminate() return token::END
631
632/* This disables inclusion of unistd.h, which is not available under Visual C++
633 * on Win32. The C++ scanner uses STL streams instead. */
634#define YY_NO_UNISTD_H
635
636#line 636 "bazel-out/k8-opt/bin/dreal/dr/scanner.ll.cc"
637/*** Flex Declarations and Options ***/
638/* enable c++ scanner class generation */
639/* change the name of the scanner class. results in "DrFlexLexer" */
640/* the manual says "somewhat more optimized" */
641/* enable scanner to generate debug output. disable this for release
642 * versions. */
643/* no support for include files is planned */
644/* enables the use of start condition stacks */
645/* The following paragraph suffices to track locations accurately. Each time
646 * yylex is invoked, the begin position is moved onto the end position. */
647#line 59 "dreal/dr/scanner.ll"
648/* handle locations */
649int dr_yycolumn = 1;
650
651#define YY_USER_ACTION yylloc->begin.line = yylloc->end.line = yylineno; \
652yylloc->begin.column = dr_yycolumn; yylloc->end.column = dr_yycolumn+yyleng-1; \
653dr_yycolumn += yyleng;
654#line 654 "bazel-out/k8-opt/bin/dreal/dr/scanner.ll.cc"
655#line 655 "bazel-out/k8-opt/bin/dreal/dr/scanner.ll.cc"
656
657#define INITIAL 0
658
659#ifndef YY_NO_UNISTD_H
660/* Special case for "unistd.h", since it is non-ANSI. We include it way
661 * down here because we want the user's section 1 to have been scanned first.
662 * The user has a chance to override it with an option.
663 */
664/* %if-c-only */
665/* %endif */
666/* %if-c++-only */
667#include <unistd.h>
668/* %endif */
669#endif
670
671#ifndef YY_EXTRA_TYPE
672#define YY_EXTRA_TYPE void *
673#endif
674
675/* %if-c-only Reentrant structure and macros (non-C++). */
676/* %if-reentrant */
677/* %if-c-only */
678/* %endif */
679/* %if-reentrant */
680/* %endif */
681/* %endif End reentrant structures and macros. */
682/* %if-bison-bridge */
683/* %endif */
684/* %not-for-header */
685/* %ok-for-header */
686
687/* %endif */
688
689#ifndef yytext_ptr
690static void yy_flex_strncpy ( char *, const char *, int );
691#endif
692
693#ifdef YY_NEED_STRLEN
694static int yy_flex_strlen ( const char * );
695#endif
696
697#ifndef YY_NO_INPUT
698/* %if-c-only Standard (non-C++) definition */
699/* %not-for-header */
700/* %ok-for-header */
701
702/* %endif */
703#endif
704
705/* %if-c-only */
706/* %endif */
707
708/* Amount of stuff to slurp up with each read. */
709#ifndef YY_READ_BUF_SIZE
710#ifdef __ia64__
711/* On IA-64, the buffer size is 16k, not 8k */
712#define YY_READ_BUF_SIZE 16384
713#else
714#define YY_READ_BUF_SIZE 8192
715#endif /* __ia64__ */
716#endif
717
718/* Copy whatever the last rule matched to the standard output. */
719#ifndef ECHO
720/* %if-c-only Standard (non-C++) definition */
721/* %endif */
722/* %if-c++-only C++ definition */
723#define ECHO LexerOutput( yytext, yyleng )
724/* %endif */
725#endif
726
727/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
728 * is returned in "result".
729 */
730#ifndef YY_INPUT
731#define YY_INPUT(buf,result,max_size) \
732/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
733\
734/* %if-c++-only C++ definition \ */\
735 if ( (int)(result = LexerInput( (char *) buf, max_size )) < 0 ) \
736 YY_FATAL_ERROR( "input in flex scanner failed" );
737/* %endif */
738
739#endif
740
741/* No semi-colon after return; correct usage is to write "yyterminate();" -
742 * we don't want an extra ';' after the "return" because that will cause
743 * some compilers to complain about unreachable statements.
744 */
745#ifndef yyterminate
746#define yyterminate() return YY_NULL
747#endif
748
749/* Number of entries by which start-condition stack grows. */
750#ifndef YY_START_STACK_INCR
751#define YY_START_STACK_INCR 25
752#endif
753
754/* Report a fatal error. */
755#ifndef YY_FATAL_ERROR
756/* %if-c-only */
757/* %endif */
758/* %if-c++-only */
759#define YY_FATAL_ERROR(msg) LexerError( msg )
760/* %endif */
761#endif
762
763/* %if-tables-serialization structures and prototypes */
764/* %not-for-header */
765/* %ok-for-header */
766
767/* %not-for-header */
768/* %tables-yydmap generated elements */
769/* %endif */
770/* end tables serialization structures and prototypes */
771
772/* %ok-for-header */
773
774/* Default declaration of generated scanner - a define so the user can
775 * easily add parameters.
776 */
777#ifndef YY_DECL
778#define YY_DECL_IS_OURS 1
779/* %if-c-only Standard (non-C++) definition */
780/* %endif */
781/* %if-c++-only C++ definition */
782#define YY_DECL int yyFlexLexer::yylex()
783/* %endif */
784#endif /* !YY_DECL */
785
786/* Code executed at the beginning of each rule, after yytext and yyleng
787 * have been set up.
788 */
789#ifndef YY_USER_ACTION
790#define YY_USER_ACTION
791#endif
792
793/* Code executed at the end of each rule. */
794#ifndef YY_BREAK
795#define YY_BREAK /*LINTED*/break;
796#endif
797
798/* %% [6.0] YY_RULE_SETUP definition goes here */
799#define YY_RULE_SETUP \
800 YY_USER_ACTION
801
802/* %not-for-header */
803/** The main scanner function which does all the work.
804 */
805YY_DECL
806{
807 yy_state_type yy_current_state;
808 char *yy_cp, *yy_bp;
809 int yy_act;
810
811 if ( !(yy_init) )
812 {
813 (yy_init) = 1;
814
815#ifdef YY_USER_INIT
816 YY_USER_INIT;
817#endif
818
819 if ( ! (yy_start) )
820 (yy_start) = 1; /* first start state */
821
822 if ( ! yyin )
823/* %if-c-only */
824/* %endif */
825/* %if-c++-only */
826 yyin.rdbuf(std::cin.rdbuf());
827/* %endif */
828
829 if ( ! yyout )
830/* %if-c-only */
831/* %endif */
832/* %if-c++-only */
833 yyout.rdbuf(std::cout.rdbuf());
834/* %endif */
835
836 if ( ! YY_CURRENT_BUFFER ) {
837 yyensure_buffer_stack ();
838 YY_CURRENT_BUFFER_LVALUE =
839 yy_create_buffer( yyin, YY_BUF_SIZE );
840 }
841
842 yy_load_buffer_state( );
843 }
844
845 {
846/* %% [7.0] user's declarations go here */
847#line 67 "dreal/dr/scanner.ll"
848
849
850
851#line 71 "dreal/dr/scanner.ll"
852 // reset location
853 yylloc->step();
854
855
856 /*** BEGIN - lexer rules ***/
857
858#line 858 "bazel-out/k8-opt/bin/dreal/dr/scanner.ll.cc"
859
860 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
861 {
862/* %% [8.0] yymore()-related code goes here */
863 yy_cp = (yy_c_buf_p);
864
865 /* Support of yytext. */
866 *yy_cp = (yy_hold_char);
867
868 /* yy_bp points to the position in yy_ch_buf of the start of
869 * the current run.
870 */
871 yy_bp = yy_cp;
872
873/* %% [9.0] code to set up and find next match goes here */
874 yy_current_state = (yy_start);
875yy_match:
876 do
877 {
878 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
879 if ( yy_accept[yy_current_state] )
880 {
881 (yy_last_accepting_state) = yy_current_state;
882 (yy_last_accepting_cpos) = yy_cp;
883 }
884 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
885 {
886 yy_current_state = (int) yy_def[yy_current_state];
887 if ( yy_current_state >= 115 )
888 yy_c = yy_meta[yy_c];
889 }
890 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
891 ++yy_cp;
892 }
893 while ( yy_current_state != 114 );
894 yy_cp = (yy_last_accepting_cpos);
895 yy_current_state = (yy_last_accepting_state);
896
897yy_find_action:
898/* %% [10.0] code to find the action number goes here */
899 yy_act = yy_accept[yy_current_state];
900
901 YY_DO_BEFORE_ACTION;
902
903/* %% [11.0] code for yylineno update goes here */
904
905 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
906 {
907 int yyl;
908 for ( yyl = 0; yyl < yyleng; ++yyl )
909 if ( yytext[yyl] == '\n' )
910
911 yylineno++;
912;
913 }
914
915do_action: /* This label is used only to access EOF actions. */
916
917/* %% [12.0] debug code goes here */
918 if ( yy_flex_debug )
919 {
920 if ( yy_act == 0 )
921 std::cerr << "--scanner backing up\n";
922 else if ( yy_act < 50 )
923 std::cerr << "--accepting rule at line " << yy_rule_linenum[yy_act] <<
924 "(\"" << yytext << "\")\n";
925 else if ( yy_act == 50 )
926 std::cerr << "--accepting default rule (\"" << yytext << "\")\n";
927 else if ( yy_act == 51 )
928 std::cerr << "--(end of buffer or a NUL)\n";
929 else
930 std::cerr << "--EOF (start condition " << YY_START << ")\n";
931 }
932
933 switch ( yy_act )
934 { /* beginning of action switch */
935/* %% [13.0] actions go here */
936 case 0: /* must back up */
937 /* undo the effects of YY_DO_BEFORE_ACTION */
938 *yy_cp = (yy_hold_char);
939 yy_cp = (yy_last_accepting_cpos);
940 yy_current_state = (yy_last_accepting_state);
941 goto yy_find_action;
942
943case 1:
944/* rule 1 can match eol */
945YY_RULE_SETUP
946#line 77 "dreal/dr/scanner.ll"
947{
948 dr_yycolumn=1;
949}
950 YY_BREAK
951case 2:
952YY_RULE_SETUP
953#line 81 "dreal/dr/scanner.ll"
954{ return DrParser::token::TK_VAR; }
955 YY_BREAK
956case 3:
957YY_RULE_SETUP
958#line 82 "dreal/dr/scanner.ll"
959{ return DrParser::token::TK_COST; }
960 YY_BREAK
961case 4:
962YY_RULE_SETUP
963#line 83 "dreal/dr/scanner.ll"
964{ return DrParser::token::TK_PREC; }
965 YY_BREAK
966case 5:
967YY_RULE_SETUP
968#line 84 "dreal/dr/scanner.ll"
969{ return DrParser::token::TK_CTR; }
970 YY_BREAK
971case 6:
972YY_RULE_SETUP
973#line 86 "dreal/dr/scanner.ll"
974{ return DrParser::token::TK_LB; }
975 YY_BREAK
976case 7:
977YY_RULE_SETUP
978#line 87 "dreal/dr/scanner.ll"
979{ return DrParser::token::TK_RB; }
980 YY_BREAK
981case 8:
982YY_RULE_SETUP
983#line 88 "dreal/dr/scanner.ll"
984{ return DrParser::token::TK_COLON; }
985 YY_BREAK
986case 9:
987YY_RULE_SETUP
988#line 89 "dreal/dr/scanner.ll"
989{ return DrParser::token::TK_COMMA; }
990 YY_BREAK
991case 10:
992YY_RULE_SETUP
993#line 90 "dreal/dr/scanner.ll"
994{ return DrParser::token::TK_SEMICOLON; }
995 YY_BREAK
996case 11:
997YY_RULE_SETUP
998#line 92 "dreal/dr/scanner.ll"
999{ return DrParser::token::TK_PLUS; }
1000 YY_BREAK
1001case 12:
1002YY_RULE_SETUP
1003#line 93 "dreal/dr/scanner.ll"
1004{ return DrParser::token::TK_MINUS; }
1005 YY_BREAK
1006case 13:
1007YY_RULE_SETUP
1008#line 94 "dreal/dr/scanner.ll"
1009{ return DrParser::token::TK_TIMES; }
1010 YY_BREAK
1011case 14:
1012YY_RULE_SETUP
1013#line 95 "dreal/dr/scanner.ll"
1014{ return DrParser::token::TK_DIV; }
1015 YY_BREAK
1016case 15:
1017YY_RULE_SETUP
1018#line 96 "dreal/dr/scanner.ll"
1019{ return DrParser::token::TK_EQ; }
1020 YY_BREAK
1021case 16:
1022YY_RULE_SETUP
1023#line 97 "dreal/dr/scanner.ll"
1024{ return DrParser::token::TK_LTE; }
1025 YY_BREAK
1026case 17:
1027YY_RULE_SETUP
1028#line 98 "dreal/dr/scanner.ll"
1029{ return DrParser::token::TK_GTE; }
1030 YY_BREAK
1031case 18:
1032YY_RULE_SETUP
1033#line 99 "dreal/dr/scanner.ll"
1034{ return DrParser::token::TK_LT; }
1035 YY_BREAK
1036case 19:
1037YY_RULE_SETUP
1038#line 100 "dreal/dr/scanner.ll"
1039{ return DrParser::token::TK_GT; }
1040 YY_BREAK
1041case 20:
1042YY_RULE_SETUP
1043#line 101 "dreal/dr/scanner.ll"
1044{ return DrParser::token::TK_EXP; }
1045 YY_BREAK
1046case 21:
1047YY_RULE_SETUP
1048#line 102 "dreal/dr/scanner.ll"
1049{ return DrParser::token::TK_LOG; }
1050 YY_BREAK
1051case 22:
1052YY_RULE_SETUP
1053#line 103 "dreal/dr/scanner.ll"
1054{ return DrParser::token::TK_ABS; }
1055 YY_BREAK
1056case 23:
1057YY_RULE_SETUP
1058#line 104 "dreal/dr/scanner.ll"
1059{ return DrParser::token::TK_SIN; }
1060 YY_BREAK
1061case 24:
1062YY_RULE_SETUP
1063#line 105 "dreal/dr/scanner.ll"
1064{ return DrParser::token::TK_COS; }
1065 YY_BREAK
1066case 25:
1067YY_RULE_SETUP
1068#line 106 "dreal/dr/scanner.ll"
1069{ return DrParser::token::TK_TAN; }
1070 YY_BREAK
1071case 26:
1072YY_RULE_SETUP
1073#line 107 "dreal/dr/scanner.ll"
1074{ return DrParser::token::TK_ASIN; }
1075 YY_BREAK
1076case 27:
1077YY_RULE_SETUP
1078#line 108 "dreal/dr/scanner.ll"
1079{ return DrParser::token::TK_ACOS; }
1080 YY_BREAK
1081case 28:
1082YY_RULE_SETUP
1083#line 109 "dreal/dr/scanner.ll"
1084{ return DrParser::token::TK_ATAN; }
1085 YY_BREAK
1086case 29:
1087YY_RULE_SETUP
1088#line 110 "dreal/dr/scanner.ll"
1089{ return DrParser::token::TK_ATAN2; }
1090 YY_BREAK
1091case 30:
1092YY_RULE_SETUP
1093#line 111 "dreal/dr/scanner.ll"
1094{ return DrParser::token::TK_SINH; }
1095 YY_BREAK
1096case 31:
1097YY_RULE_SETUP
1098#line 112 "dreal/dr/scanner.ll"
1099{ return DrParser::token::TK_COSH; }
1100 YY_BREAK
1101case 32:
1102YY_RULE_SETUP
1103#line 113 "dreal/dr/scanner.ll"
1104{ return DrParser::token::TK_TANH; }
1105 YY_BREAK
1106case 33:
1107YY_RULE_SETUP
1108#line 114 "dreal/dr/scanner.ll"
1109{ return DrParser::token::TK_MIN; }
1110 YY_BREAK
1111case 34:
1112YY_RULE_SETUP
1113#line 115 "dreal/dr/scanner.ll"
1114{ return DrParser::token::TK_MAX; }
1115 YY_BREAK
1116case 35:
1117YY_RULE_SETUP
1118#line 116 "dreal/dr/scanner.ll"
1119{ return DrParser::token::TK_SQRT; }
1120 YY_BREAK
1121case 36:
1122YY_RULE_SETUP
1123#line 117 "dreal/dr/scanner.ll"
1124{ return DrParser::token::TK_POW; }
1125 YY_BREAK
1126case 37:
1127YY_RULE_SETUP
1128#line 118 "dreal/dr/scanner.ll"
1129{ return DrParser::token::TK_CARET; }
1130 YY_BREAK
1131case 38:
1132YY_RULE_SETUP
1133#line 120 "dreal/dr/scanner.ll"
1134{ return DrParser::token::TK_IMPLIES; }
1135 YY_BREAK
1136case 39:
1137YY_RULE_SETUP
1138#line 121 "dreal/dr/scanner.ll"
1139{ return DrParser::token::TK_IMPLIES; }
1140 YY_BREAK
1141case 40:
1142YY_RULE_SETUP
1143#line 122 "dreal/dr/scanner.ll"
1144{ return DrParser::token::TK_AND; }
1145 YY_BREAK
1146case 41:
1147YY_RULE_SETUP
1148#line 123 "dreal/dr/scanner.ll"
1149{ return DrParser::token::TK_OR; }
1150 YY_BREAK
1151case 42:
1152YY_RULE_SETUP
1153#line 124 "dreal/dr/scanner.ll"
1154{ return DrParser::token::TK_NOT; }
1155 YY_BREAK
1156/* gobble up white-spaces */
1157case 43:
1158YY_RULE_SETUP
1159#line 127 "dreal/dr/scanner.ll"
1160{
1161 yylloc->step();
1162}
1163 YY_BREAK
1164/* gobble up end-of-lines */
1165case 44:
1166/* rule 44 can match eol */
1167YY_RULE_SETUP
1168#line 132 "dreal/dr/scanner.ll"
1169{
1170 dr_yycolumn=1;
1171}
1172 YY_BREAK
1173case 45:
1174YY_RULE_SETUP
1175#line 136 "dreal/dr/scanner.ll"
1176{
1177 yylval->build<double>(std::stod(yytext));
1178 return token::DOUBLE;
1179}
1180 YY_BREAK
1181case 46:
1182YY_RULE_SETUP
1183#line 141 "dreal/dr/scanner.ll"
1184{
1185 yylval->build<double>(std::stod(yytext));
1186 return token::DOUBLE;
1187}
1188 YY_BREAK
1189case 47:
1190YY_RULE_SETUP
1191#line 146 "dreal/dr/scanner.ll"
1192{
1193 yylval->build<double>(std::stod(yytext));
1194 return token::DOUBLE;
1195}
1196 YY_BREAK
1197case 48:
1198YY_RULE_SETUP
1199#line 151 "dreal/dr/scanner.ll"
1200{
1201 yylval->build<std::string>(std::string(yytext, yyleng));
1202 return token::ID;
1203}
1204 YY_BREAK
1205/* pass all other characters up to bison */
1206case 49:
1207YY_RULE_SETUP
1208#line 157 "dreal/dr/scanner.ll"
1209{
1210 return static_cast<token_type>(*yytext);
1211}
1212 YY_BREAK
1213case 50:
1214YY_RULE_SETUP
1215#line 160 "dreal/dr/scanner.ll"
1216ECHO;
1217 YY_BREAK
1218#line 1218 "bazel-out/k8-opt/bin/dreal/dr/scanner.ll.cc"
1219case YY_STATE_EOF(INITIAL):
1220 yyterminate();
1221
1222 case YY_END_OF_BUFFER:
1223 {
1224 /* Amount of text matched not including the EOB char. */
1225 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1226
1227 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1228 *yy_cp = (yy_hold_char);
1229 YY_RESTORE_YY_MORE_OFFSET
1230
1231 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1232 {
1233 /* We're scanning a new file or input source. It's
1234 * possible that this happened because the user
1235 * just pointed yyin at a new source and called
1236 * yylex(). If so, then we have to assure
1237 * consistency between YY_CURRENT_BUFFER and our
1238 * globals. Here is the right place to do so, because
1239 * this is the first action (other than possibly a
1240 * back-up) that will match for the new input source.
1241 */
1242 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1243/* %if-c-only */
1244/* %endif */
1245/* %if-c++-only */
1246 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin.rdbuf();
1247/* %endif */
1248 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1249 }
1250
1251 /* Note that here we test for yy_c_buf_p "<=" to the position
1252 * of the first EOB in the buffer, since yy_c_buf_p will
1253 * already have been incremented past the NUL character
1254 * (since all states make transitions on EOB to the
1255 * end-of-buffer state). Contrast this with the test
1256 * in input().
1257 */
1258 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1259 { /* This was really a NUL. */
1260 yy_state_type yy_next_state;
1261
1262 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1263
1264 yy_current_state = yy_get_previous_state( );
1265
1266 /* Okay, we're now positioned to make the NUL
1267 * transition. We couldn't have
1268 * yy_get_previous_state() go ahead and do it
1269 * for us because it doesn't know how to deal
1270 * with the possibility of jamming (and we don't
1271 * want to build jamming into it because then it
1272 * will run more slowly).
1273 */
1274
1275 yy_next_state = yy_try_NUL_trans( yy_current_state );
1276
1277 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1278
1279 if ( yy_next_state )
1280 {
1281 /* Consume the NUL. */
1282 yy_cp = ++(yy_c_buf_p);
1283 yy_current_state = yy_next_state;
1284 goto yy_match;
1285 }
1286
1287 else
1288 {
1289/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
1290 yy_cp = (yy_last_accepting_cpos);
1291 yy_current_state = (yy_last_accepting_state);
1292 goto yy_find_action;
1293 }
1294 }
1295
1296 else switch ( yy_get_next_buffer( ) )
1297 {
1298 case EOB_ACT_END_OF_FILE:
1299 {
1300 (yy_did_buffer_switch_on_eof) = 0;
1301
1302 if ( yywrap( ) )
1303 {
1304 /* Note: because we've taken care in
1305 * yy_get_next_buffer() to have set up
1306 * yytext, we can now set up
1307 * yy_c_buf_p so that if some total
1308 * hoser (like flex itself) wants to
1309 * call the scanner after we return the
1310 * YY_NULL, it'll still work - another
1311 * YY_NULL will get returned.
1312 */
1313 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1314
1315 yy_act = YY_STATE_EOF(YY_START);
1316 goto do_action;
1317 }
1318
1319 else
1320 {
1321 if ( ! (yy_did_buffer_switch_on_eof) )
1322 YY_NEW_FILE;
1323 }
1324 break;
1325 }
1326
1327 case EOB_ACT_CONTINUE_SCAN:
1328 (yy_c_buf_p) =
1329 (yytext_ptr) + yy_amount_of_matched_text;
1330
1331 yy_current_state = yy_get_previous_state( );
1332
1333 yy_cp = (yy_c_buf_p);
1334 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1335 goto yy_match;
1336
1337 case EOB_ACT_LAST_MATCH:
1338 (yy_c_buf_p) =
1339 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1340
1341 yy_current_state = yy_get_previous_state( );
1342
1343 yy_cp = (yy_c_buf_p);
1344 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1345 goto yy_find_action;
1346 }
1347 break;
1348 }
1349
1350 default:
1351 YY_FATAL_ERROR(
1352 "fatal flex scanner internal error--no action found" );
1353 } /* end of action switch */
1354 } /* end of scanning one token */
1355 } /* end of user's declarations */
1356} /* end of yylex */
1357/* %ok-for-header */
1358
1359/* %if-c++-only */
1360/* %not-for-header */
1361/* The contents of this function are C++ specific, so the () macro is not used.
1362 * This constructor simply maintains backward compatibility.
1363 * DEPRECATED
1364 */
1365yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout ):
1366 yyin(arg_yyin ? arg_yyin->rdbuf() : std::cin.rdbuf()),
1367 yyout(arg_yyout ? arg_yyout->rdbuf() : std::cout.rdbuf())
1368{
1369 ctor_common();
1370}
1371
1372/* The contents of this function are C++ specific, so the () macro is not used.
1373 */
1374yyFlexLexer::yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout ):
1375 yyin(arg_yyin.rdbuf()),
1376 yyout(arg_yyout.rdbuf())
1377{
1378 ctor_common();
1379}
1380
1381/* The contents of this function are C++ specific, so the () macro is not used.
1382 */
1383void yyFlexLexer::ctor_common()
1384{
1385 yy_c_buf_p = 0;
1386 yy_init = 0;
1387 yy_start = 0;
1388 yy_flex_debug = 0;
1389 yylineno = 1; // this will only get updated if %option yylineno
1390
1391 yy_did_buffer_switch_on_eof = 0;
1392
1393 yy_looking_for_trail_begin = 0;
1394 yy_more_flag = 0;
1395 yy_more_len = 0;
1396 yy_more_offset = yy_prev_more_offset = 0;
1397
1398 yy_start_stack_ptr = yy_start_stack_depth = 0;
1399 yy_start_stack = NULL;
1400
1401 yy_buffer_stack = NULL;
1402 yy_buffer_stack_top = 0;
1403 yy_buffer_stack_max = 0;
1404
1405 yy_state_buf = 0;
1406
1407}
1408
1409/* The contents of this function are C++ specific, so the () macro is not used.
1410 */
1411yyFlexLexer::~yyFlexLexer()
1412{
1413 delete [] yy_state_buf;
1414 yyfree( yy_start_stack );
1415 yy_delete_buffer( YY_CURRENT_BUFFER );
1416 yyfree( yy_buffer_stack );
1417}
1418
1419/* The contents of this function are C++ specific, so the () macro is not used.
1420 */
1421void yyFlexLexer::switch_streams( std::istream& new_in, std::ostream& new_out )
1422{
1423 // was if( new_in )
1424 yy_delete_buffer( YY_CURRENT_BUFFER );
1425 yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) );
1426
1427 // was if( new_out )
1428 yyout.rdbuf(new_out.rdbuf());
1429}
1430
1431/* The contents of this function are C++ specific, so the () macro is not used.
1432 */
1433void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )
1434{
1435 if( ! new_in ) {
1436 new_in = &yyin;
1437 }
1438
1439 if ( ! new_out ) {
1440 new_out = &yyout;
1441 }
1442
1443 switch_streams(*new_in, *new_out);
1444}
1445
1446#ifdef YY_INTERACTIVE
1447int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
1448#else
1449int yyFlexLexer::LexerInput( char* buf, int max_size )
1450#endif
1451{
1452 if ( yyin.eof() || yyin.fail() )
1453 return 0;
1454
1455#ifdef YY_INTERACTIVE
1456 yyin.get( buf[0] );
1457
1458 if ( yyin.eof() )
1459 return 0;
1460
1461 if ( yyin.bad() )
1462 return -1;
1463
1464 return 1;
1465
1466#else
1467 (void) yyin.read( buf, max_size );
1468
1469 if ( yyin.bad() )
1470 return -1;
1471 else
1472 return yyin.gcount();
1473#endif
1474}
1475
1476void yyFlexLexer::LexerOutput( const char* buf, int size )
1477{
1478 (void) yyout.write( buf, size );
1479}
1480/* %ok-for-header */
1481
1482/* %endif */
1483
1484/* yy_get_next_buffer - try to read in a new buffer
1485 *
1486 * Returns a code representing an action:
1487 * EOB_ACT_LAST_MATCH -
1488 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1489 * EOB_ACT_END_OF_FILE - end of file
1490 */
1491/* %if-c-only */
1492/* %endif */
1493/* %if-c++-only */
1494int yyFlexLexer::yy_get_next_buffer()
1495/* %endif */
1496{
1497 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1498 char *source = (yytext_ptr);
1499 int number_to_move, i;
1500 int ret_val;
1501
1502 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1503 YY_FATAL_ERROR(
1504 "fatal flex scanner internal error--end of buffer missed" );
1505
1506 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1507 { /* Don't try to fill the buffer, so this is an EOF. */
1508 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1509 {
1510 /* We matched a single character, the EOB, so
1511 * treat this as a final EOF.
1512 */
1513 return EOB_ACT_END_OF_FILE;
1514 }
1515
1516 else
1517 {
1518 /* We matched some text prior to the EOB, first
1519 * process it.
1520 */
1521 return EOB_ACT_LAST_MATCH;
1522 }
1523 }
1524
1525 /* Try to read more data. */
1526
1527 /* First move last chars to start of buffer. */
1528 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1529
1530 for ( i = 0; i < number_to_move; ++i )
1531 *(dest++) = *(source++);
1532
1533 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1534 /* don't do the read, it's not guaranteed to return an EOF,
1535 * just force an EOF
1536 */
1537 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1538
1539 else
1540 {
1541 int num_to_read =
1542 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1543
1544 while ( num_to_read <= 0 )
1545 { /* Not enough room in the buffer - grow it. */
1546
1547 /* just a shorter name for the current buffer */
1548 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1549
1550 int yy_c_buf_p_offset =
1551 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1552
1553 if ( b->yy_is_our_buffer )
1554 {
1555 int new_size = b->yy_buf_size * 2;
1556
1557 if ( new_size <= 0 )
1558 b->yy_buf_size += b->yy_buf_size / 8;
1559 else
1560 b->yy_buf_size *= 2;
1561
1562 b->yy_ch_buf = (char *)
1563 /* Include room in for 2 EOB chars. */
1564 yyrealloc( (void *) b->yy_ch_buf,
1565 (yy_size_t) (b->yy_buf_size + 2) );
1566 }
1567 else
1568 /* Can't grow it, we don't own it. */
1569 b->yy_ch_buf = NULL;
1570
1571 if ( ! b->yy_ch_buf )
1572 YY_FATAL_ERROR(
1573 "fatal error - scanner input buffer overflow" );
1574
1575 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1576
1577 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1578 number_to_move - 1;
1579
1580 }
1581
1582 if ( num_to_read > YY_READ_BUF_SIZE )
1583 num_to_read = YY_READ_BUF_SIZE;
1584
1585 /* Read in more data. */
1586 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1587 (yy_n_chars), num_to_read );
1588
1589 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1590 }
1591
1592 if ( (yy_n_chars) == 0 )
1593 {
1594 if ( number_to_move == YY_MORE_ADJ )
1595 {
1596 ret_val = EOB_ACT_END_OF_FILE;
1597 yyrestart( yyin );
1598 }
1599
1600 else
1601 {
1602 ret_val = EOB_ACT_LAST_MATCH;
1603 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1604 YY_BUFFER_EOF_PENDING;
1605 }
1606 }
1607
1608 else
1609 ret_val = EOB_ACT_CONTINUE_SCAN;
1610
1611 if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1612 /* Extend the array by 50%, plus the number we really need. */
1613 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1614 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1615 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
1616 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1617 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1618 /* "- 2" to take care of EOB's */
1619 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1620 }
1621
1622 (yy_n_chars) += number_to_move;
1623 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1624 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1625
1626 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1627
1628 return ret_val;
1629}
1630
1631/* yy_get_previous_state - get the state just before the EOB char was reached */
1632
1633/* %if-c-only */
1634/* %not-for-header */
1635/* %endif */
1636/* %if-c++-only */
1637 yy_state_type yyFlexLexer::yy_get_previous_state()
1638/* %endif */
1639{
1640 yy_state_type yy_current_state;
1641 char *yy_cp;
1642
1643/* %% [15.0] code to get the start state into yy_current_state goes here */
1644 yy_current_state = (yy_start);
1645
1646 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1647 {
1648/* %% [16.0] code to find the next state goes here */
1649 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1650 if ( yy_accept[yy_current_state] )
1651 {
1652 (yy_last_accepting_state) = yy_current_state;
1653 (yy_last_accepting_cpos) = yy_cp;
1654 }
1655 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1656 {
1657 yy_current_state = (int) yy_def[yy_current_state];
1658 if ( yy_current_state >= 115 )
1659 yy_c = yy_meta[yy_c];
1660 }
1661 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1662 }
1663
1664 return yy_current_state;
1665}
1666
1667/* yy_try_NUL_trans - try to make a transition on the NUL character
1668 *
1669 * synopsis
1670 * next_state = yy_try_NUL_trans( current_state );
1671 */
1672/* %if-c-only */
1673/* %endif */
1674/* %if-c++-only */
1675 yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
1676/* %endif */
1677{
1678 int yy_is_jam;
1679 /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
1680 char *yy_cp = (yy_c_buf_p);
1681
1682 YY_CHAR yy_c = 1;
1683 if ( yy_accept[yy_current_state] )
1684 {
1685 (yy_last_accepting_state) = yy_current_state;
1686 (yy_last_accepting_cpos) = yy_cp;
1687 }
1688 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1689 {
1690 yy_current_state = (int) yy_def[yy_current_state];
1691 if ( yy_current_state >= 115 )
1692 yy_c = yy_meta[yy_c];
1693 }
1694 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1695 yy_is_jam = (yy_current_state == 114);
1696
1697 return yy_is_jam ? 0 : yy_current_state;
1698}
1699
1700#ifndef YY_NO_UNPUT
1701/* %if-c-only */
1702/* %endif */
1703/* %if-c++-only */
1704 void yyFlexLexer::yyunput( int c, char* yy_bp)
1705/* %endif */
1706{
1707 char *yy_cp;
1708
1709 yy_cp = (yy_c_buf_p);
1710
1711 /* undo effects of setting up yytext */
1712 *yy_cp = (yy_hold_char);
1713
1714 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1715 { /* need to shift things up to make room */
1716 /* +2 for EOB chars. */
1717 int number_to_move = (yy_n_chars) + 2;
1718 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1719 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1720 char *source =
1721 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1722
1723 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1724 *--dest = *--source;
1725
1726 yy_cp += (int) (dest - source);
1727 yy_bp += (int) (dest - source);
1728 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1729 (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1730
1731 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1732 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1733 }
1734
1735 *--yy_cp = (char) c;
1736
1737/* %% [18.0] update yylineno here */
1738
1739 if ( c == '\n' ){
1740 --yylineno;
1741 }
1742
1743 (yytext_ptr) = yy_bp;
1744 (yy_hold_char) = *yy_cp;
1745 (yy_c_buf_p) = yy_cp;
1746}
1747/* %if-c-only */
1748/* %endif */
1749#endif
1750
1751/* %if-c-only */
1752/* %endif */
1753/* %if-c++-only */
1754 int yyFlexLexer::yyinput()
1755/* %endif */
1756{
1757 int c;
1758
1759 *(yy_c_buf_p) = (yy_hold_char);
1760
1761 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1762 {
1763 /* yy_c_buf_p now points to the character we want to return.
1764 * If this occurs *before* the EOB characters, then it's a
1765 * valid NUL; if not, then we've hit the end of the buffer.
1766 */
1767 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1768 /* This was really a NUL. */
1769 *(yy_c_buf_p) = '\0';
1770
1771 else
1772 { /* need more input */
1773 int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
1774 ++(yy_c_buf_p);
1775
1776 switch ( yy_get_next_buffer( ) )
1777 {
1778 case EOB_ACT_LAST_MATCH:
1779 /* This happens because yy_g_n_b()
1780 * sees that we've accumulated a
1781 * token and flags that we need to
1782 * try matching the token before
1783 * proceeding. But for input(),
1784 * there's no matching to consider.
1785 * So convert the EOB_ACT_LAST_MATCH
1786 * to EOB_ACT_END_OF_FILE.
1787 */
1788
1789 /* Reset buffer status. */
1790 yyrestart( yyin );
1791
1792 /*FALLTHROUGH*/
1793
1794 case EOB_ACT_END_OF_FILE:
1795 {
1796 if ( yywrap( ) )
1797 return 0;
1798
1799 if ( ! (yy_did_buffer_switch_on_eof) )
1800 YY_NEW_FILE;
1801#ifdef __cplusplus
1802 return yyinput();
1803#else
1804 return input();
1805#endif
1806 }
1807
1808 case EOB_ACT_CONTINUE_SCAN:
1809 (yy_c_buf_p) = (yytext_ptr) + offset;
1810 break;
1811 }
1812 }
1813 }
1814
1815 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1816 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1817 (yy_hold_char) = *++(yy_c_buf_p);
1818
1819/* %% [19.0] update BOL and yylineno */
1820 if ( c == '\n' )
1821
1822 yylineno++;
1823;
1824
1825 return c;
1826}
1827/* %if-c-only */
1828/* %endif */
1829
1830/** Immediately switch to a different input stream.
1831 * @param input_file A readable stream.
1832 *
1833 * @note This function does not reset the start condition to @c INITIAL .
1834 */
1835/* %if-c-only */
1836/* %endif */
1837/* %if-c++-only */
1838 void yyFlexLexer::yyrestart( std::istream& input_file )
1839/* %endif */
1840{
1841
1842 if ( ! YY_CURRENT_BUFFER ){
1843 yyensure_buffer_stack ();
1844 YY_CURRENT_BUFFER_LVALUE =
1845 yy_create_buffer( yyin, YY_BUF_SIZE );
1846 }
1847
1848 yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1849 yy_load_buffer_state( );
1850}
1851
1852/* %if-c++-only */
1853/** Delegate to the new version that takes an istream reference.
1854 * @param input_file A readable stream.
1855 *
1856 * @note This function does not reset the start condition to @c INITIAL .
1857 */
1858void yyFlexLexer::yyrestart( std::istream* input_file )
1859{
1860 if( ! input_file ) {
1861 input_file = &yyin;
1862 }
1863 yyrestart( *input_file );
1864}
1865/* %endif */
1866
1867/** Switch to a different input buffer.
1868 * @param new_buffer The new input buffer.
1869 *
1870 */
1871/* %if-c-only */
1872/* %endif */
1873/* %if-c++-only */
1874 void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1875/* %endif */
1876{
1877
1878 /* TODO. We should be able to replace this entire function body
1879 * with
1880 * yypop_buffer_state();
1881 * yypush_buffer_state(new_buffer);
1882 */
1883 yyensure_buffer_stack ();
1884 if ( YY_CURRENT_BUFFER == new_buffer )
1885 return;
1886
1887 if ( YY_CURRENT_BUFFER )
1888 {
1889 /* Flush out information for old buffer. */
1890 *(yy_c_buf_p) = (yy_hold_char);
1891 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1892 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1893 }
1894
1895 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1896 yy_load_buffer_state( );
1897
1898 /* We don't actually know whether we did this switch during
1899 * EOF (yywrap()) processing, but the only time this flag
1900 * is looked at is after yywrap() is called, so it's safe
1901 * to go ahead and always set it.
1902 */
1903 (yy_did_buffer_switch_on_eof) = 1;
1904}
1905
1906/* %if-c-only */
1907/* %endif */
1908/* %if-c++-only */
1909 void yyFlexLexer::yy_load_buffer_state()
1910/* %endif */
1911{
1912 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1913 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1914/* %if-c-only */
1915/* %endif */
1916/* %if-c++-only */
1917 yyin.rdbuf(YY_CURRENT_BUFFER_LVALUE->yy_input_file);
1918/* %endif */
1919 (yy_hold_char) = *(yy_c_buf_p);
1920}
1921
1922/** Allocate and initialize an input buffer state.
1923 * @param file A readable stream.
1924 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1925 *
1926 * @return the allocated buffer state.
1927 */
1928/* %if-c-only */
1929/* %endif */
1930/* %if-c++-only */
1931 YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream& file, int size )
1932/* %endif */
1933{
1934 YY_BUFFER_STATE b;
1935
1936 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
1937 if ( ! b )
1938 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1939
1940 b->yy_buf_size = size;
1941
1942 /* yy_ch_buf has to be 2 characters longer than the size given because
1943 * we need to put in 2 end-of-buffer characters.
1944 */
1945 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
1946 if ( ! b->yy_ch_buf )
1947 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1948
1949 b->yy_is_our_buffer = 1;
1950
1951 yy_init_buffer( b, file );
1952
1953 return b;
1954}
1955
1956/* %if-c++-only */
1957/** Delegate creation of buffers to the new version that takes an istream reference.
1958 * @param file A readable stream.
1959 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1960 *
1961 * @return the allocated buffer state.
1962 */
1963 YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
1964{
1965 return yy_create_buffer( *file, size );
1966}
1967/* %endif */
1968
1969/** Destroy the buffer.
1970 * @param b a buffer created with yy_create_buffer()
1971 *
1972 */
1973/* %if-c-only */
1974/* %endif */
1975/* %if-c++-only */
1976 void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
1977/* %endif */
1978{
1979
1980 if ( ! b )
1981 return;
1982
1983 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1984 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1985
1986 if ( b->yy_is_our_buffer )
1987 yyfree( (void *) b->yy_ch_buf );
1988
1989 yyfree( (void *) b );
1990}
1991
1992/* Initializes or reinitializes a buffer.
1993 * This function is sometimes called more than once on the same buffer,
1994 * such as during a yyrestart() or at EOF.
1995 */
1996/* %if-c-only */
1997/* %endif */
1998/* %if-c++-only */
1999 void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream& file )
2000/* %endif */
2001
2002{
2003 int oerrno = errno;
2004
2005 yy_flush_buffer( b );
2006
2007/* %if-c-only */
2008/* %endif */
2009/* %if-c++-only */
2010 b->yy_input_file = file.rdbuf();
2011/* %endif */
2012 b->yy_fill_buffer = 1;
2013
2014 /* If b is the current buffer, then yy_init_buffer was _probably_
2015 * called from yyrestart() or through yy_get_next_buffer.
2016 * In that case, we don't want to reset the lineno or column.
2017 */
2018 if (b != YY_CURRENT_BUFFER){
2019 b->yy_bs_lineno = 1;
2020 b->yy_bs_column = 0;
2021 }
2022
2023/* %if-c-only */
2024/* %endif */
2025/* %if-c++-only */
2026 b->yy_is_interactive = 0;
2027/* %endif */
2028 errno = oerrno;
2029}
2030
2031/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2032 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2033 *
2034 */
2035/* %if-c-only */
2036/* %endif */
2037/* %if-c++-only */
2038 void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
2039/* %endif */
2040{
2041 if ( ! b )
2042 return;
2043
2044 b->yy_n_chars = 0;
2045
2046 /* We always need two end-of-buffer characters. The first causes
2047 * a transition to the end-of-buffer state. The second causes
2048 * a jam in that state.
2049 */
2050 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2051 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2052
2053 b->yy_buf_pos = &b->yy_ch_buf[0];
2054
2055 b->yy_at_bol = 1;
2056 b->yy_buffer_status = YY_BUFFER_NEW;
2057
2058 if ( b == YY_CURRENT_BUFFER )
2059 yy_load_buffer_state( );
2060}
2061
2062/* %if-c-or-c++ */
2063/** Pushes the new state onto the stack. The new state becomes
2064 * the current state. This function will allocate the stack
2065 * if necessary.
2066 * @param new_buffer The new state.
2067 *
2068 */
2069/* %if-c-only */
2070/* %endif */
2071/* %if-c++-only */
2072void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer)
2073/* %endif */
2074{
2075 if (new_buffer == NULL)
2076 return;
2077
2078 yyensure_buffer_stack();
2079
2080 /* This block is copied from yy_switch_to_buffer. */
2081 if ( YY_CURRENT_BUFFER )
2082 {
2083 /* Flush out information for old buffer. */
2084 *(yy_c_buf_p) = (yy_hold_char);
2085 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2086 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2087 }
2088
2089 /* Only push if top exists. Otherwise, replace top. */
2090 if (YY_CURRENT_BUFFER)
2091 (yy_buffer_stack_top)++;
2092 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2093
2094 /* copied from yy_switch_to_buffer. */
2095 yy_load_buffer_state( );
2096 (yy_did_buffer_switch_on_eof) = 1;
2097}
2098/* %endif */
2099
2100/* %if-c-or-c++ */
2101/** Removes and deletes the top of the stack, if present.
2102 * The next element becomes the new top.
2103 *
2104 */
2105/* %if-c-only */
2106/* %endif */
2107/* %if-c++-only */
2108void yyFlexLexer::yypop_buffer_state (void)
2109/* %endif */
2110{
2111 if (!YY_CURRENT_BUFFER)
2112 return;
2113
2114 yy_delete_buffer(YY_CURRENT_BUFFER );
2115 YY_CURRENT_BUFFER_LVALUE = NULL;
2116 if ((yy_buffer_stack_top) > 0)
2117 --(yy_buffer_stack_top);
2118
2119 if (YY_CURRENT_BUFFER) {
2120 yy_load_buffer_state( );
2121 (yy_did_buffer_switch_on_eof) = 1;
2122 }
2123}
2124/* %endif */
2125
2126/* %if-c-or-c++ */
2127/* Allocates the stack if it does not exist.
2128 * Guarantees space for at least one push.
2129 */
2130/* %if-c-only */
2131/* %endif */
2132/* %if-c++-only */
2133void yyFlexLexer::yyensure_buffer_stack(void)
2134/* %endif */
2135{
2136 yy_size_t num_to_alloc;
2137
2138 if (!(yy_buffer_stack)) {
2139
2140 /* First allocation is just for 2 elements, since we don't know if this
2141 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2142 * immediate realloc on the next call.
2143 */
2144 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2145 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2146 (num_to_alloc * sizeof(struct yy_buffer_state*)
2147 );
2148 if ( ! (yy_buffer_stack) )
2149 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2150
2151 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2152
2153 (yy_buffer_stack_max) = num_to_alloc;
2154 (yy_buffer_stack_top) = 0;
2155 return;
2156 }
2157
2158 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2159
2160 /* Increase the buffer to prepare for a possible push. */
2161 yy_size_t grow_size = 8 /* arbitrary grow size */;
2162
2163 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2164 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2165 ((yy_buffer_stack),
2166 num_to_alloc * sizeof(struct yy_buffer_state*)
2167 );
2168 if ( ! (yy_buffer_stack) )
2169 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2170
2171 /* zero only the new slots.*/
2172 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2173 (yy_buffer_stack_max) = num_to_alloc;
2174 }
2175}
2176/* %endif */
2177
2178/* %if-c-only */
2179/* %endif */
2180
2181/* %if-c-only */
2182/* %endif */
2183
2184/* %if-c-only */
2185/* %endif */
2186
2187/* %if-c-only */
2188/* %endif */
2189/* %if-c++-only */
2190 void yyFlexLexer::yy_push_state( int _new_state )
2191/* %endif */
2192{
2193 if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
2194 {
2195 yy_size_t new_size;
2196
2197 (yy_start_stack_depth) += YY_START_STACK_INCR;
2198 new_size = (yy_size_t) (yy_start_stack_depth) * sizeof( int );
2199
2200 if ( ! (yy_start_stack) )
2201 (yy_start_stack) = (int *) yyalloc( new_size );
2202
2203 else
2204 (yy_start_stack) = (int *) yyrealloc(
2205 (void *) (yy_start_stack), new_size );
2206
2207 if ( ! (yy_start_stack) )
2208 YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
2209 }
2210
2211 (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
2212
2213 BEGIN(_new_state);
2214}
2215
2216/* %if-c-only */
2217/* %endif */
2218/* %if-c++-only */
2219 void yyFlexLexer::yy_pop_state()
2220/* %endif */
2221{
2222 if ( --(yy_start_stack_ptr) < 0 )
2223 YY_FATAL_ERROR( "start-condition stack underflow" );
2224
2225 BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
2226}
2227
2228/* %if-c-only */
2229/* %endif */
2230/* %if-c++-only */
2231 int yyFlexLexer::yy_top_state()
2232/* %endif */
2233{
2234 return (yy_start_stack)[(yy_start_stack_ptr) - 1];
2235}
2236
2237#ifndef YY_EXIT_FAILURE
2238#define YY_EXIT_FAILURE 2
2239#endif
2240
2241/* %if-c-only */
2242/* %endif */
2243/* %if-c++-only */
2244void yyFlexLexer::LexerError( const char* msg )
2245{
2246 std::cerr << msg << std::endl;
2247 exit( YY_EXIT_FAILURE );
2248}
2249/* %endif */
2250
2251/* Redefine yyless() so it works in section 3 code. */
2252
2253#undef yyless
2254#define yyless(n) \
2255 do \
2256 { \
2257 /* Undo effects of setting up yytext. */ \
2258 int yyless_macro_arg = (n); \
2259 YY_LESS_LINENO(yyless_macro_arg);\
2260 yytext[yyleng] = (yy_hold_char); \
2261 (yy_c_buf_p) = yytext + yyless_macro_arg; \
2262 (yy_hold_char) = *(yy_c_buf_p); \
2263 *(yy_c_buf_p) = '\0'; \
2264 yyleng = yyless_macro_arg; \
2265 } \
2266 while ( 0 )
2267
2268/* Accessor methods (get/set functions) to struct members. */
2269
2270/* %if-c-only */
2271/* %if-reentrant */
2272/* %endif */
2273/* %if-reentrant */
2274/* %endif */
2275/* %endif */
2276
2277/* %if-reentrant */
2278/* %if-bison-bridge */
2279/* %endif */
2280/* %endif if-c-only */
2281
2282/* %if-c-only */
2283/* %endif */
2284
2285/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
2286/* %if-reentrant */
2287/* %endif */
2288/* %endif */
2289
2290/*
2291 * Internal utility routines.
2292 */
2293
2294#ifndef yytext_ptr
2295static void yy_flex_strncpy (char* s1, const char * s2, int n )
2296{
2297
2298 int i;
2299 for ( i = 0; i < n; ++i )
2300 s1[i] = s2[i];
2301}
2302#endif
2303
2304#ifdef YY_NEED_STRLEN
2305static int yy_flex_strlen (const char * s )
2306{
2307 int n;
2308 for ( n = 0; s[n]; ++n )
2309 ;
2310
2311 return n;
2312}
2313#endif
2314
2315void *yyalloc (yy_size_t size )
2316{
2317 return malloc(size);
2318}
2319
2320void *yyrealloc (void * ptr, yy_size_t size )
2321{
2322
2323 /* The cast to (char *) in the following accommodates both
2324 * implementations that use char* generic pointers, and those
2325 * that use void* generic pointers. It works with the latter
2326 * because both ANSI C and C++ allow castless assignment from
2327 * any pointer type to void*, and deal with argument conversions
2328 * as though doing an assignment.
2329 */
2330 return realloc(ptr, size);
2331}
2332
2333void yyfree (void * ptr )
2334{
2335 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2336}
2337
2338/* %if-tables-serialization definitions */
2339/* %define-yytables The name for this specific scanner's tables. */
2340#define YYTABLES_NAME "yytables"
2341/* %endif */
2342
2343/* %ok-for-header */
2344
2345#line 160 "dreal/dr/scanner.ll"
2346
2347
2348namespace dreal {
2349
2350DrScanner::DrScanner(std::istream* in,
2351 std::ostream* out)
2352 : DrFlexLexer(in, out) {}
2353
2354DrScanner::~DrScanner() {}
2355
2356void DrScanner::set_debug(const bool b) {
2357 yy_flex_debug = b;
2358}
2359} // namespace dreal
2360
2361/* This implementation of DrFlexLexer::yylex() is required to fill the
2362 * vtable of the class DrFlexLexer. We define the scanner's main yylex
2363 * function via YY_DECL to reside in the DrScanner class instead. */
2364
2365#ifdef yylex
2366#undef yylex
2367#endif
2368
2369int DrFlexLexer::yylex()
2370{
2371 std::cerr << "in DrlexLexer::yylex() !" << std::endl;
2372 return 0;
2373}
2374
2375/* When the scanner receives an end-of-file indication from YY_INPUT, it then
2376 * checks the yywrap() function. If yywrap() returns false (zero), then it is
2377 * assumed that the function has gone ahead and set up `yyin' to point to
2378 * another input file, and scanning continues. If it returns true (non-zero),
2379 * then the scanner terminates, returning 0 to its caller. */
2380
2381int DrFlexLexer::yywrap()
2382{
2383 return 1;
2384}
2385
2386#pragma GCC diagnostic pop
2387#ifdef __clang__
2388#pragma clang diagnostic pop
2389#endif
2390