FreeCAD

Форк
0
/
QuantityLexer.c 
2684 строки · 73.5 Кб
1
// clang-format off
2
#line 1 "QuantityLexer.c"
3

4
#line 3 "QuantityLexer.c"
5

6
#define  YY_INT_ALIGNED short int
7

8
/* A lexical scanner generated by flex */
9

10
#define FLEX_SCANNER
11
#define YY_FLEX_MAJOR_VERSION 2
12
#define YY_FLEX_MINOR_VERSION 6
13
#define YY_FLEX_SUBMINOR_VERSION 4
14
#if YY_FLEX_SUBMINOR_VERSION > 0
15
#define FLEX_BETA
16
#endif
17

18
/* First, we deal with  platform-specific or compiler-specific issues. */
19

20
/* begin standard C headers. */
21
#include <stdio.h>
22
#include <string.h>
23
#include <errno.h>
24
#include <stdlib.h>
25

26
/* end standard C headers. */
27

28
/* flex integer type definitions */
29

30
#ifndef FLEXINT_H
31
#define FLEXINT_H
32

33
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
34

35
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
36

37
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
38
 * if you want the limit (max/min) macros for int types.
39
 */
40
#ifndef __STDC_LIMIT_MACROS
41
#define __STDC_LIMIT_MACROS 1
42
#endif
43

44
#include <inttypes.h>
45
typedef int8_t flex_int8_t;
46
typedef uint8_t flex_uint8_t;
47
typedef int16_t flex_int16_t;
48
typedef uint16_t flex_uint16_t;
49
typedef int32_t flex_int32_t;
50
typedef uint32_t flex_uint32_t;
51
#else
52
typedef signed char flex_int8_t;
53
typedef short int flex_int16_t;
54
typedef int flex_int32_t;
55
typedef unsigned char flex_uint8_t;
56
typedef unsigned short int flex_uint16_t;
57
typedef unsigned int flex_uint32_t;
58

59
/* Limits of integral types. */
60
#ifndef INT8_MIN
61
#define INT8_MIN               (-128)
62
#endif
63
#ifndef INT16_MIN
64
#define INT16_MIN              (-32767-1)
65
#endif
66
#ifndef INT32_MIN
67
#define INT32_MIN              (-2147483647-1)
68
#endif
69
#ifndef INT8_MAX
70
#define INT8_MAX               (127)
71
#endif
72
#ifndef INT16_MAX
73
#define INT16_MAX              (32767)
74
#endif
75
#ifndef INT32_MAX
76
#define INT32_MAX              (2147483647)
77
#endif
78
#ifndef UINT8_MAX
79
#define UINT8_MAX              (255U)
80
#endif
81
#ifndef UINT16_MAX
82
#define UINT16_MAX             (65535U)
83
#endif
84
#ifndef UINT32_MAX
85
#define UINT32_MAX             (4294967295U)
86
#endif
87

88
#ifndef SIZE_MAX
89
#define SIZE_MAX               (~(size_t)0)
90
#endif
91

92
#endif /* ! C99 */
93

94
#endif /* ! FLEXINT_H */
95

96
/* begin standard C++ headers. */
97

98
/* TODO: this is always defined, so inline it */
99
#define yyconst const
100

101
#if defined(__GNUC__) && __GNUC__ >= 3
102
#define yynoreturn __attribute__((__noreturn__))
103
#else
104
#define yynoreturn
105
#endif
106

107
/* Returned upon end-of-file. */
108
#define YY_NULL 0
109

110
/* Promotes a possibly negative, possibly signed char to an
111
 *   integer in range [0..255] for use as an array index.
112
 */
113
#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
114

115
/* Enter a start condition.  This macro really ought to take a parameter,
116
 * but we do it the disgusting crufty way forced on us by the ()-less
117
 * definition of BEGIN.
118
 */
119
#define BEGIN (yy_start) = 1 + 2 *
120
/* Translate the current start state into a value that can be later handed
121
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
122
 * compatibility.
123
 */
124
#define YY_START (((yy_start) - 1) / 2)
125
#define YYSTATE YY_START
126
/* Action number for EOF rule of a given start state. */
127
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
128
/* Special action meaning "start processing a new file". */
129
#define YY_NEW_FILE yyrestart( yyin  )
130
#define YY_END_OF_BUFFER_CHAR 0
131

132
/* Size of default input buffer. */
133
#ifndef YY_BUF_SIZE
134
#ifdef __ia64__
135
/* On IA-64, the buffer size is 16k, not 8k.
136
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
137
 * Ditto for the __ia64__ case accordingly.
138
 */
139
#define YY_BUF_SIZE 32768
140
#else
141
#define YY_BUF_SIZE 16384
142
#endif /* __ia64__ */
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
#ifndef YY_TYPEDEF_YY_SIZE_T
155
#define YY_TYPEDEF_YY_SIZE_T
156
typedef size_t yy_size_t;
157
#endif
158

159
extern int yyleng;
160

161
extern FILE *yyin, *yyout;
162

163
#define EOB_ACT_CONTINUE_SCAN 0
164
#define EOB_ACT_END_OF_FILE 1
165
#define EOB_ACT_LAST_MATCH 2
166

167
    #define YY_LESS_LINENO(n)
168
    #define YY_LINENO_REWIND_TO(ptr)
169

170
/* Return all but the first "n" matched characters back to the input stream. */
171
#define yyless(n) \
172
	do \
173
		{ \
174
		/* Undo effects of setting up yytext. */ \
175
        int yyless_macro_arg = (n); \
176
        YY_LESS_LINENO(yyless_macro_arg);\
177
		*yy_cp = (yy_hold_char); \
178
		YY_RESTORE_YY_MORE_OFFSET \
179
		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
180
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
181
		} \
182
	while ( 0 )
183
#define unput(c) yyunput( c, (yytext_ptr)  )
184

185
#ifndef YY_STRUCT_YY_BUFFER_STATE
186
#define YY_STRUCT_YY_BUFFER_STATE
187
struct yy_buffer_state
188
	{
189
	FILE *yy_input_file;
190

191
	char *yy_ch_buf;		/* input buffer */
192
	char *yy_buf_pos;		/* current position in input buffer */
193

194
	/* Size of input buffer in bytes, not including room for EOB
195
	 * characters.
196
	 */
197
	int yy_buf_size;
198

199
	/* Number of characters read into yy_ch_buf, not including EOB
200
	 * characters.
201
	 */
202
	int yy_n_chars;
203

204
	/* Whether we "own" the buffer - i.e., we know we created it,
205
	 * and can realloc() it to grow it, and should free() it to
206
	 * delete it.
207
	 */
208
	int yy_is_our_buffer;
209

210
	/* Whether this is an "interactive" input source; if so, and
211
	 * if we're using stdio for input, then we want to use getc()
212
	 * instead of fread(), to make sure we stop fetching input after
213
	 * each newline.
214
	 */
215
	int yy_is_interactive;
216

217
	/* Whether we're considered to be at the beginning of a line.
218
	 * If so, '^' rules will be active on the next match, otherwise
219
	 * not.
220
	 */
221
	int yy_at_bol;
222

223
    int yy_bs_lineno; /**< The line count. */
224
    int yy_bs_column; /**< The column count. */
225

226
	/* Whether to try to fill the input buffer when we reach the
227
	 * end of it.
228
	 */
229
	int yy_fill_buffer;
230

231
	int yy_buffer_status;
232

233
#define YY_BUFFER_NEW 0
234
#define YY_BUFFER_NORMAL 1
235
	/* When an EOF's been seen but there's still some text to process
236
	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
237
	 * shouldn't try reading from the input source any more.  We might
238
	 * still have a bunch of tokens to match, though, because of
239
	 * possible backing-up.
240
	 *
241
	 * When we actually see the EOF, we change the status to "new"
242
	 * (via yyrestart()), so that the user can continue scanning by
243
	 * just pointing yyin at a new input file.
244
	 */
245
#define YY_BUFFER_EOF_PENDING 2
246

247
	};
248
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
249

250
/* Stack of input buffers. */
251
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
252
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
253
static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
254

255
/* We provide macros for accessing buffer states in case in the
256
 * future we want to put the buffer states in a more general
257
 * "scanner state".
258
 *
259
 * Returns the top of the stack, or NULL.
260
 */
261
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
262
                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
263
                          : NULL)
264
/* Same as previous macro, but useful when we know that the buffer stack is not
265
 * NULL or when we need an lvalue. For internal use only.
266
 */
267
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
268

269
/* yy_hold_char holds the character lost when yytext is formed. */
270
static char yy_hold_char;
271
static int yy_n_chars;		/* number of characters read into yy_ch_buf */
272
int yyleng;
273

274
/* Points to current character in buffer. */
275
static char *yy_c_buf_p = NULL;
276
static int yy_init = 0;		/* whether we need to initialize */
277
static int yy_start = 0;	/* start state number */
278

279
/* Flag which is used to allow yywrap()'s to do buffer switches
280
 * instead of setting up a fresh yyin.  A bit of a hack ...
281
 */
282
static int yy_did_buffer_switch_on_eof;
283

284
void yyrestart ( FILE *input_file  );
285
void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer  );
286
YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size  );
287
void yy_delete_buffer ( YY_BUFFER_STATE b  );
288
void yy_flush_buffer ( YY_BUFFER_STATE b  );
289
void yypush_buffer_state ( YY_BUFFER_STATE new_buffer  );
290
void yypop_buffer_state ( void );
291

292
static void yyensure_buffer_stack ( void );
293
static void yy_load_buffer_state ( void );
294
static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file  );
295
#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
296

297
YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size  );
298
YY_BUFFER_STATE yy_scan_string ( const char *yy_str  );
299
YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len  );
300

301
void *yyalloc ( yy_size_t  );
302
void *yyrealloc ( void *, yy_size_t  );
303
void yyfree ( void *  );
304

305
#define yy_new_buffer yy_create_buffer
306
#define yy_set_interactive(is_interactive) \
307
	{ \
308
	if ( ! YY_CURRENT_BUFFER ){ \
309
        yyensure_buffer_stack (); \
310
		YY_CURRENT_BUFFER_LVALUE =    \
311
            yy_create_buffer( yyin, YY_BUF_SIZE ); \
312
	} \
313
	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
314
	}
315
#define yy_set_bol(at_bol) \
316
	{ \
317
	if ( ! YY_CURRENT_BUFFER ){\
318
        yyensure_buffer_stack (); \
319
		YY_CURRENT_BUFFER_LVALUE =    \
320
            yy_create_buffer( yyin, YY_BUF_SIZE ); \
321
	} \
322
	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
323
	}
324
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
325

326
#define yywrap() (/*CONSTCOND*/1)
327
#define YY_SKIP_YYWRAP
328
typedef flex_uint8_t YY_CHAR;
329

330
FILE *yyin = NULL, *yyout = NULL;
331

332
typedef int yy_state_type;
333

334
extern int yylineno;
335
int yylineno = 1;
336

337
extern char *yytext;
338
#ifdef yytext_ptr
339
#undef yytext_ptr
340
#endif
341
#define yytext_ptr yytext
342

343
static yy_state_type yy_get_previous_state ( void );
344
static yy_state_type yy_try_NUL_trans ( yy_state_type current_state  );
345
static int yy_get_next_buffer ( void );
346
static void yynoreturn yy_fatal_error ( const char* msg  );
347

348
/* Done after the current pattern has been matched and before the
349
 * corresponding action - sets up yytext.
350
 */
351
#define YY_DO_BEFORE_ACTION \
352
	(yytext_ptr) = yy_bp; \
353
	yyleng = (int) (yy_cp - yy_bp); \
354
	(yy_hold_char) = *yy_cp; \
355
	*yy_cp = '\0'; \
356
	(yy_c_buf_p) = yy_cp;
357
#define YY_NUM_RULES 154
358
#define YY_END_OF_BUFFER 155
359
/* This struct is not used in this scanner,
360
   but its presence is necessary. */
361
struct yy_trans_info
362
	{
363
	flex_int32_t yy_verify;
364
	flex_int32_t yy_nxt;
365
	};
366
static const flex_int16_t yy_accept[265] =
367
    {   0,
368
        0,    0,    0,    0,  155,  153,    4,    5,   45,   47,
369
        6,  153,    7,  153,  131,  130,   33,   94,   98,   96,
370
      104,  109,   37,  126,   61,  153,  153,   87,   95,   82,
371
       78,    1,  153,  153,  153,  153,  136,  153,   27,   32,
372
      153,  153,   17,   15,  153,  153,  153,  153,   30,   29,
373
      153,  153,  153,  153,    3,  154,    2,    5,  134,  132,
374
      133,  131,  131,    0,  128,  114,    0,    0,   19,   36,
375
        0,   64,    0,    0,   85,    0,    0,  112,    0,   65,
376
        0,    0,   81,   97,  115,    0,    0,    0,    0,    0,
377
        0,   43,    0,   13,    0,    0,    0,   14,  117,    0,
378

379
       46,    0,   44,   35,    0,  111,   63,    0,    0,   86,
380
       83,   80,    0,    0,   28,   16,    0,   55,    0,   34,
381
       99,  105,  110,   38,   62,   88,    0,   84,   79,    0,
382
       26,   51,   18,   12,    0,    0,  102,  108,    9,   57,
383
      103,  135,    0,    0,    0,    0,    0,   58,    0,    0,
384
      101,  107,   40,   90,    0,   24,   10,   50,  122,    0,
385
        0,    0,    0,    0,  133,    0,  131,    0,    0,  131,
386
       22,   68,   21,    0,   67,  119,    0,   91,   23,    0,
387
      113,  143,    0,    0,    0,   69,  120,   54,  141,   59,
388
      123,  142,  125,   20,    0,   66,  116,    0,  118,   76,
389

390
       60,   56,  145,    0,    0,   49,   31,    0,  144,   41,
391
       52,  147,   75,  124,  148,    0,    0,  150,    0,    0,
392
      100,  106,   39,   89,    0,   25,   11,  127,  129,    8,
393
        0,  134,    0,  132,    0,  133,    0,  131,   93,   77,
394
       71,  137,  138,  139,   92,  121,    0,    0,   70,   42,
395
      149,   53,  152,  151,   48,    0,    0,  140,  146,   72,
396
       73,    0,   74,    0
397
    } ;
398

399
static const YY_CHAR yy_ec[256] =
400
    {   0,
401
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
402
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
403
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
404
        1,    2,    1,    4,    1,    1,    1,    1,    5,    6,
405
        6,    6,    7,    8,    9,   10,    6,   11,   12,   13,
406
       14,   14,   14,   14,   14,   14,   14,    1,    1,    1,
407
        6,    1,    1,    1,   15,    1,   16,    1,   17,   18,
408
       19,   20,    1,   21,   22,    1,   23,   24,   25,   26,
409
        1,    1,   27,   28,    1,   29,   30,    1,    1,    1,
410
       31,    1,   32,    6,    1,    1,   33,   34,   35,   36,
411

412
       37,   38,   39,   40,   41,    1,   42,   43,   44,   45,
413
       46,   47,   48,   49,   50,   51,   52,    1,   53,   54,
414
       55,   56,    1,    1,    1,    1,    1,   57,    1,    1,
415
        1,    1,    1,    1,    1,   58,    1,    1,    1,    1,
416
        1,    1,    1,    1,    1,   59,    1,    1,    1,    1,
417
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
418
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
419
        1,    1,    1,    1,    1,   60,    1,   61,   62,    1,
420
       63,    1,    1,    1,    1,    1,    1,    1,    1,    1,
421
        1,    1,    1,   64,    1,    1,    1,    1,    1,    1,
422

423
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
424
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
425
        1,    1,    1,    1,    1,   65,    1,    1,    1,    1,
426
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
427
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
428
        1,    1,    1,    1,    1
429
    } ;
430

431
static const YY_CHAR yy_meta[66] =
432
    {   0,
433
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
434
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
435
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
436
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
437
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
438
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
439
        1,    1,    1,    1,    1
440
    } ;
441

442
static const flex_int16_t yy_base[266] =
443
    {   0,
444
        0,    0,   63,   64,  394,  395,  395,  390,  395,  395,
445
      395,   57,  395,   61,   68,   76,  365,  362,  395,   57,
446
      334,  395,  395,   77,  345,  348,  354,  395,   71,  371,
447
       60,  395,   65,  352,   85,   75,   78,  333,  337,  395,
448
      337,  124,   74,  160,   91,  325,  116,  347,   85,   97,
449
      190,  343,   62,   70,  395,  395,  395,  375,  159,  202,
450
      209,  219,  230,  241,  395,  395,  321,  343,  395,  395,
451
      319,  395,  334,  340,  395,  343,  321,  395,  326,  395,
452
      313,  319,  317,  395,  395,  316,  319,  323,  330,  313,
453
      318,  395,  309,  395,  309,  307,  272,  395,  395,  260,
454

455
      395,  253,  395,  395,  238,  395,  395,  243,  248,  395,
456
      395,  239,  245,  244,  395,  395,  230,  102,  227,  395,
457
      395,  395,  395,  395,  395,  395,  219,  395,  395,  231,
458
      395,   98,  395,  216,  122,  220,  395,  395,  395,  395,
459
      395,  395,  205,  216,  215,  204,  118,  395,  200,  191,
460
      395,  395,  395,  395,  189,  395,  395,  395,  395,  241,
461
      124,  169,  263,  275,  279,  288,  292,  301,  306,  310,
462
      395,  395,  395,  183,  395,  395,  184,  395,  395,  175,
463
      395,  395,  161,  164,  160,  395,  395,  395,  395,  395,
464
      395,  395,  395,  395,  158,  395,  395,  157,  395,  395,
465

466
      395,  395,  186,  148,  146,  395,  395,  150,  395,  395,
467
      395,  395,  395,  395,  152,  140,  132,  139,  125,  120,
468
      395,  395,  395,  395,  118,  395,  395,  395,  395,  395,
469
      314,  319,  323,  327,  331,  335,  339,  343,  395,  395,
470
      395,  395,  395,  147,  395,  395,  144,  103,  395,  395,
471
      395,  395,  395,  395,  395,   98,   93,  395,  395,  395,
472
      395,   57,  395,  395,   97
473
    } ;
474

475
static const flex_int16_t yy_def[266] =
476
    {   0,
477
      264,    1,  265,  265,  264,  264,  264,  264,  264,  264,
478
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
479
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
480
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
481
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
482
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
483
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
484
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
485
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
486
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
487

488
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
489
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
490
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
491
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
492
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
493
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
494
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
495
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
496
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
497
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
498

499
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
500
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
501
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
502
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
503
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
504
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
505
      264,  264,  264,    0,  264
506
    } ;
507

508
static const flex_int16_t yy_nxt[461] =
509
    {   0,
510
        6,    7,    8,    9,   10,   11,   11,   12,   13,   14,
511
       15,   16,   15,   15,   17,   18,    6,   19,   20,   21,
512
       22,   23,   24,   25,   26,   27,   28,   29,   30,   31,
513
       32,    6,   33,   34,   35,   36,   37,   38,   39,   40,
514
       41,   42,   43,   44,   45,   46,   47,    6,   48,   49,
515
       50,   51,    6,    6,   52,    6,    6,    6,    6,    6,
516
        6,    6,    6,   53,   54,   56,   56,   59,   59,   59,
517
       59,   60,   60,   60,   60,   61,   67,   62,   63,   63,
518
       63,   63,   68,   61,   64,   62,   63,   63,   63,   63,
519
       81,   70,   64,   84,   57,   57,   71,   55,   86,   87,
520

521
       72,   73,   74,   75,   64,  263,   99,  118,  137,   85,
522
      138,   97,   64,   76,   88,   89,   82,   91,   98,  119,
523
       92,  159,   93,   77,  160,  146,  161,  162,   94,  149,
524
       95,  100,  147,  141,  139,  148,  150,   96,  104,  201,
525
      206,  262,  207,  105,  106,  202,  261,  107,  108,  109,
526
      110,  260,  111,  112,  259,  216,  142,  209,  113,  258,
527
      114,  143,  115,  257,  210,  144,  217,  116,  256,   59,
528
       59,   59,   59,  117,  120,  163,  255,  121,  254,  122,
529
      123,  124,  253,  125,  228,  229,  126,  127,  128,  129,
530
      252,  251,  250,  130,  249,  163,  248,  247,  131,  246,
531

532
      132,  245,  133,  134,  244,  135,  136,  151,  243,  152,
533
      242,  153,   60,   60,   60,   60,  154,  155,  164,  165,
534
      165,  165,  165,  241,  240,  166,  239,  230,  156,  167,
535
      167,  167,  167,  157,  220,  168,  219,   61,  164,   62,
536
       63,   63,   63,   63,  218,  166,   64,  169,  215,  169,
537
      214,  170,  170,  170,  170,  168,  213,  212,  221,  211,
538
      222,  208,  223,  205,  204,  203,   64,  224,  225,  231,
539
      200,  231,  199,  232,  232,  232,  232,  198,  197,  226,
540
      196,  233,  195,  233,  227,  234,  234,  234,  234,  165,
541
      165,  165,  165,  194,  235,  166,  235,  193,  236,  236,
542

543
      236,  236,  167,  167,  167,  167,  192,  237,  168,  237,
544
      191,  238,  238,  238,  238,  166,  170,  170,  170,  170,
545
      170,  170,  170,  170,  232,  232,  232,  232,  168,  232,
546
      232,  232,  232,  234,  234,  234,  234,  234,  234,  234,
547
      234,  236,  236,  236,  236,  236,  236,  236,  236,  238,
548
      238,  238,  238,  238,  238,  238,  238,  190,  189,  188,
549
      187,  186,  185,  184,  183,  182,  181,  180,  179,  178,
550
      177,  176,  175,  174,  173,  172,  171,   58,  158,  145,
551
      140,  103,  102,  101,   90,   83,   80,   79,   78,   69,
552
       66,   65,   58,  264,    5,  264,  264,  264,  264,  264,
553

554
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
555
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
556
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
557
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
558
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
559
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264
560
    } ;
561

562
static const flex_int16_t yy_chk[461] =
563
    {   0,
564
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
565
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
566
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
567
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
568
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
569
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
570
        1,    1,    1,    1,    1,    3,    4,   12,   12,   12,
571
       12,   14,   14,   14,   14,   15,   20,   15,   15,   15,
572
       15,   15,   20,   16,   15,   16,   16,   16,   16,   16,
573
       29,   24,   16,   31,    3,    4,   24,  265,   33,   33,
574

575
       24,   24,   24,   24,   15,  262,   37,   43,   45,   31,
576
       45,   36,   16,   24,   33,   33,   29,   35,   36,   43,
577
       35,   53,   35,   24,   53,   49,   54,   54,   35,   50,
578
       35,   37,   49,   47,   45,   49,   50,   35,   42,  118,
579
      132,  257,  132,   42,   42,  118,  256,   42,   42,   42,
580
       42,  248,   42,   42,  247,  147,   47,  135,   42,  244,
581
       42,   47,   42,  225,  135,   47,  147,   42,  220,   59,
582
       59,   59,   59,   42,   44,   59,  219,   44,  218,   44,
583
       44,   44,  217,   44,  161,  161,   44,   44,   44,   44,
584
      216,  215,  208,   44,  205,   59,  204,  203,   44,  198,
585

586
       44,  195,   44,   44,  185,   44,   44,   51,  184,   51,
587
      183,   51,   60,   60,   60,   60,   51,   51,   60,   61,
588
       61,   61,   61,  180,  177,   61,  174,  162,   51,   62,
589
       62,   62,   62,   51,  155,   62,  150,   63,   60,   63,
590
       63,   63,   63,   63,  149,   61,   63,   64,  146,   64,
591
      145,   64,   64,   64,   64,   62,  144,  143,  160,  136,
592
      160,  134,  160,  130,  127,  119,   63,  160,  160,  163,
593
      117,  163,  114,  163,  163,  163,  163,  113,  112,  160,
594
      109,  164,  108,  164,  160,  164,  164,  164,  164,  165,
595
      165,  165,  165,  105,  166,  165,  166,  102,  166,  166,
596

597
      166,  166,  167,  167,  167,  167,  100,  168,  167,  168,
598
       97,  168,  168,  168,  168,  165,  169,  169,  169,  169,
599
      170,  170,  170,  170,  231,  231,  231,  231,  167,  232,
600
      232,  232,  232,  233,  233,  233,  233,  234,  234,  234,
601
      234,  235,  235,  235,  235,  236,  236,  236,  236,  237,
602
      237,  237,  237,  238,  238,  238,  238,   96,   95,   93,
603
       91,   90,   89,   88,   87,   86,   83,   82,   81,   79,
604
       77,   76,   74,   73,   71,   68,   67,   58,   52,   48,
605
       46,   41,   39,   38,   34,   30,   27,   26,   25,   21,
606
       18,   17,    8,    5,  264,  264,  264,  264,  264,  264,
607

608
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
609
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
610
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
611
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
612
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
613
      264,  264,  264,  264,  264,  264,  264,  264,  264,  264
614
    } ;
615

616
static yy_state_type yy_last_accepting_state;
617
static char *yy_last_accepting_cpos;
618

619
extern int yy_flex_debug;
620
int yy_flex_debug = 0;
621

622
/* The intent behind this definition is that it'll catch
623
 * any uses of REJECT which flex missed.
624
 */
625
#define REJECT reject_used_but_not_detected
626
#define yymore() yymore_used_but_not_detected
627
#define YY_MORE_ADJ 0
628
#define YY_RESTORE_YY_MORE_OFFSET
629
char *yytext;
630
#line 1 "QuantityParser.l"
631
#line 2 "QuantityParser.l"
632
/***************************************************************************
633
 *   Copyright (c) 2013 Jürgen Riegel <juergen.riegel@web.de>              *
634
 *                                                                         *
635
 *   This library is free software; you can redistribute it and/or         *
636
 *   modify it under the terms of the GNU Library General Public           *
637
 *   License as published by the Free Software Foundation; either          *
638
 *   version 2 of the License, or (at your option) any later version.      *
639
 *                                                                         *
640
 *   This library  is distributed in the hope that it will be useful,      *
641
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
642
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
643
 *   GNU Library General Public License for more details.                  *
644
 *                                                                         *
645
 *   You should have received a copy of the GNU Library General Public     *
646
 *   License along with this library; see the file COPYING.LIB. If not,    *
647
 *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
648
 *   Suite 330, Boston, MA  02111-1307, USA                                *
649
 *                                                                         *
650
 ***************************************************************************/
651

652
/* Lexer for the FreeCAD  Units language   */
653

654
/* use this file to generate the file 'QuantityLexer.c' using the program flex
655
 * the command for this operation is:
656
 * flex --outfile=QuantityLexer.c QuantityParser.l
657
 * (flex for Windows is available here:
658
 *  https://sourceforge.net/projects/winflexbison/
659
 *  (you must then change 'flex' to 'win_flex' in the command)) */
660

661
/* This disables inclusion of unistd.h, which is not available under Visual C++
662
 * on Win32. The C++ scanner uses STL streams instead. */
663
#define YY_NO_UNISTD_H
664

665
#line 664 "QuantityLexer.c"
666
/*** Flex Declarations and Options ***/
667
/* the manual says "somewhat more optimized" */
668
/* no support for include files is planned */
669

670
#line 669 "QuantityLexer.c"
671

672
#define INITIAL 0
673
#define C_COMMENT 1
674

675
#ifndef YY_NO_UNISTD_H
676
/* Special case for "unistd.h", since it is non-ANSI. We include it way
677
 * down here because we want the user's section 1 to have been scanned first.
678
 * The user has a chance to override it with an option.
679
 */
680
#include <unistd.h>
681
#endif
682

683
#ifndef YY_EXTRA_TYPE
684
#define YY_EXTRA_TYPE void *
685
#endif
686

687
static int yy_init_globals ( void );
688

689
/* Accessor methods to globals.
690
   These are made visible to non-reentrant scanners for convenience. */
691

692
int yylex_destroy ( void );
693

694
int yyget_debug ( void );
695

696
void yyset_debug ( int debug_flag  );
697

698
YY_EXTRA_TYPE yyget_extra ( void );
699

700
void yyset_extra ( YY_EXTRA_TYPE user_defined  );
701

702
FILE *yyget_in ( void );
703

704
void yyset_in  ( FILE * _in_str  );
705

706
FILE *yyget_out ( void );
707

708
void yyset_out  ( FILE * _out_str  );
709

710
			int yyget_leng ( void );
711

712
char *yyget_text ( void );
713

714
int yyget_lineno ( void );
715

716
void yyset_lineno ( int _line_number  );
717

718
/* Macros after this point can all be overridden by user definitions in
719
 * section 1.
720
 */
721

722
#ifndef YY_SKIP_YYWRAP
723
#ifdef __cplusplus
724
extern "C" int yywrap ( void );
725
#else
726
extern int yywrap ( void );
727
#endif
728
#endif
729

730
#ifndef YY_NO_UNPUT
731

732
#endif
733

734
#ifndef yytext_ptr
735
static void yy_flex_strncpy ( char *, const char *, int );
736
#endif
737

738
#ifdef YY_NEED_STRLEN
739
static int yy_flex_strlen ( const char * );
740
#endif
741

742
#ifndef YY_NO_INPUT
743
#ifdef __cplusplus
744
static int yyinput ( void );
745
#else
746
static int input ( void );
747
#endif
748

749
#endif
750

751
/* Amount of stuff to slurp up with each read. */
752
#ifndef YY_READ_BUF_SIZE
753
#ifdef __ia64__
754
/* On IA-64, the buffer size is 16k, not 8k */
755
#define YY_READ_BUF_SIZE 16384
756
#else
757
#define YY_READ_BUF_SIZE 8192
758
#endif /* __ia64__ */
759
#endif
760

761
/* Copy whatever the last rule matched to the standard output. */
762
#ifndef ECHO
763
/* This used to be an fputs(), but since the string might contain NUL's,
764
 * we now use fwrite().
765
 */
766
#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
767
#endif
768

769
/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
770
 * is returned in "result".
771
 */
772
#ifndef YY_INPUT
773
#define YY_INPUT(buf,result,max_size) \
774
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
775
		{ \
776
		int c = '*'; \
777
		int n; \
778
		for ( n = 0; n < max_size && \
779
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
780
			buf[n] = (char) c; \
781
		if ( c == '\n' ) \
782
			buf[n++] = (char) c; \
783
		if ( c == EOF && ferror( yyin ) ) \
784
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
785
		result = n; \
786
		} \
787
	else \
788
		{ \
789
		errno=0; \
790
		while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
791
			{ \
792
			if( errno != EINTR) \
793
				{ \
794
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
795
				break; \
796
				} \
797
			errno=0; \
798
			clearerr(yyin); \
799
			} \
800
		}\
801
\
802

803
#endif
804

805
/* No semi-colon after return; correct usage is to write "yyterminate();" -
806
 * we don't want an extra ';' after the "return" because that will cause
807
 * some compilers to complain about unreachable statements.
808
 */
809
#ifndef yyterminate
810
#define yyterminate() return YY_NULL
811
#endif
812

813
/* Number of entries by which start-condition stack grows. */
814
#ifndef YY_START_STACK_INCR
815
#define YY_START_STACK_INCR 25
816
#endif
817

818
/* Report a fatal error. */
819
#ifndef YY_FATAL_ERROR
820
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
821
#endif
822

823
/* end tables serialization structures and prototypes */
824

825
/* Default declaration of generated scanner - a define so the user can
826
 * easily add parameters.
827
 */
828
#ifndef YY_DECL
829
#define YY_DECL_IS_OURS 1
830

831
extern int yylex (void);
832

833
#define YY_DECL int yylex (void)
834
#endif /* !YY_DECL */
835

836
/* Code executed at the beginning of each rule, after yytext and yyleng
837
 * have been set up.
838
 */
839
#ifndef YY_USER_ACTION
840
#define YY_USER_ACTION
841
#endif
842

843
/* Code executed at the end of each rule. */
844
#ifndef YY_BREAK
845
#define YY_BREAK /*LINTED*/break;
846
#endif
847

848
#define YY_RULE_SETUP \
849
	YY_USER_ACTION
850

851
/** The main scanner function which does all the work.
852
 */
853
YY_DECL
854
{
855
	yy_state_type yy_current_state;
856
	char *yy_cp, *yy_bp;
857
	int yy_act;
858

859
	if ( !(yy_init) )
860
		{
861
		(yy_init) = 1;
862

863
#ifdef YY_USER_INIT
864
		YY_USER_INIT;
865
#endif
866

867
		if ( ! (yy_start) )
868
			(yy_start) = 1;	/* first start state */
869

870
		if ( ! yyin )
871
			yyin = stdin;
872

873
		if ( ! yyout )
874
			yyout = stdout;
875

876
		if ( ! YY_CURRENT_BUFFER ) {
877
			yyensure_buffer_stack ();
878
			YY_CURRENT_BUFFER_LVALUE =
879
				yy_create_buffer( yyin, YY_BUF_SIZE );
880
		}
881

882
		yy_load_buffer_state(  );
883
		}
884

885
	{
886
#line 56 "QuantityParser.l"
887

888

889
#line 888 "QuantityLexer.c"
890

891
	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
892
		{
893
		yy_cp = (yy_c_buf_p);
894

895
		/* Support of yytext. */
896
		*yy_cp = (yy_hold_char);
897

898
		/* yy_bp points to the position in yy_ch_buf of the start of
899
		 * the current run.
900
		 */
901
		yy_bp = yy_cp;
902

903
		yy_current_state = (yy_start);
904
yy_match:
905
		do
906
			{
907
			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
908
			if ( yy_accept[yy_current_state] )
909
				{
910
				(yy_last_accepting_state) = yy_current_state;
911
				(yy_last_accepting_cpos) = yy_cp;
912
				}
913
			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
914
				{
915
				yy_current_state = (int) yy_def[yy_current_state];
916
				if ( yy_current_state >= 265 )
917
					yy_c = yy_meta[yy_c];
918
				}
919
			yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
920
			++yy_cp;
921
			}
922
		while ( yy_current_state != 264 );
923
		yy_cp = (yy_last_accepting_cpos);
924
		yy_current_state = (yy_last_accepting_state);
925

926
yy_find_action:
927
		yy_act = yy_accept[yy_current_state];
928

929
		YY_DO_BEFORE_ACTION;
930

931
do_action:	/* This label is used only to access EOF actions. */
932

933
		switch ( yy_act )
934
	{ /* beginning of action switch */
935
			case 0: /* must back up */
936
			/* undo the effects of YY_DO_BEFORE_ACTION */
937
			*yy_cp = (yy_hold_char);
938
			yy_cp = (yy_last_accepting_cpos);
939
			yy_current_state = (yy_last_accepting_state);
940
			goto yy_find_action;
941

942
case 1:
943
YY_RULE_SETUP
944
#line 58 "QuantityParser.l"
945
{ BEGIN(C_COMMENT); }
946
	YY_BREAK
947
case 2:
948
YY_RULE_SETUP
949
#line 59 "QuantityParser.l"
950
{ BEGIN(INITIAL); }
951
	YY_BREAK
952
case 3:
953
YY_RULE_SETUP
954
#line 60 "QuantityParser.l"
955
{ ;}
956
	YY_BREAK
957
case 4:
958
YY_RULE_SETUP
959
#line 63 "QuantityParser.l"
960
;
961
	YY_BREAK
962
case 5:
963
/* rule 5 can match eol */
964
YY_RULE_SETUP
965
#line 64 "QuantityParser.l"
966
;
967
	YY_BREAK
968
case 6:
969
YY_RULE_SETUP
970
#line 66 "QuantityParser.l"
971
{ return *yytext; }
972
	YY_BREAK
973
case 7:
974
YY_RULE_SETUP
975
#line 68 "QuantityParser.l"
976
return MINUSSIGN;
977
	YY_BREAK
978
case 8:
979
YY_RULE_SETUP
980
#line 69 "QuantityParser.l"
981
return MINUSSIGN;
982
	YY_BREAK
983
case 9:
984
YY_RULE_SETUP
985
#line 71 "QuantityParser.l"
986
yylval = Quantity::NanoMetre;           return UNIT; // nano meter
987
	YY_BREAK
988
case 10:
989
YY_RULE_SETUP
990
#line 72 "QuantityParser.l"
991
yylval = Quantity::MicroMetre;          return UNIT; // micro meter
992
	YY_BREAK
993
case 11:
994
YY_RULE_SETUP
995
#line 73 "QuantityParser.l"
996
yylval = Quantity::MicroMetre;          return UNIT; // micro meter    (greek micro in UTF8)
997
	YY_BREAK
998
case 12:
999
YY_RULE_SETUP
1000
#line 74 "QuantityParser.l"
1001
yylval = Quantity::MilliMetre;          return UNIT; // milli meter    (internal standard length)
1002
	YY_BREAK
1003
case 13:
1004
YY_RULE_SETUP
1005
#line 75 "QuantityParser.l"
1006
yylval = Quantity::CentiMetre;          return UNIT; // centi meter
1007
	YY_BREAK
1008
case 14:
1009
YY_RULE_SETUP
1010
#line 76 "QuantityParser.l"
1011
yylval = Quantity::DeciMetre;           return UNIT; // deci meter
1012
	YY_BREAK
1013
case 15:
1014
YY_RULE_SETUP
1015
#line 77 "QuantityParser.l"
1016
yylval = Quantity::Metre;               return UNIT; // Metre
1017
	YY_BREAK
1018
case 16:
1019
YY_RULE_SETUP
1020
#line 78 "QuantityParser.l"
1021
yylval = Quantity::KiloMetre;           return UNIT; // kilo meter
1022
	YY_BREAK
1023
case 17:
1024
YY_RULE_SETUP
1025
#line 80 "QuantityParser.l"
1026
yylval = Quantity::Liter;               return UNIT; // Liter  (dm^3)
1027
	YY_BREAK
1028
case 18:
1029
YY_RULE_SETUP
1030
#line 81 "QuantityParser.l"
1031
yylval = Quantity::MilliLiter;          return UNIT; // milli Liter
1032
	YY_BREAK
1033
case 19:
1034
YY_RULE_SETUP
1035
#line 83 "QuantityParser.l"
1036
yylval = Quantity::Hertz;               return UNIT; // Hertz
1037
	YY_BREAK
1038
case 20:
1039
YY_RULE_SETUP
1040
#line 84 "QuantityParser.l"
1041
yylval = Quantity::KiloHertz;           return UNIT; // kilo Hertz
1042
	YY_BREAK
1043
case 21:
1044
YY_RULE_SETUP
1045
#line 85 "QuantityParser.l"
1046
yylval = Quantity::MegaHertz;           return UNIT; // mega Hertz
1047
	YY_BREAK
1048
case 22:
1049
YY_RULE_SETUP
1050
#line 86 "QuantityParser.l"
1051
yylval = Quantity::GigaHertz;           return UNIT; // giga Hertz
1052
	YY_BREAK
1053
case 23:
1054
YY_RULE_SETUP
1055
#line 87 "QuantityParser.l"
1056
yylval = Quantity::TeraHertz;           return UNIT; // tera Hertz
1057
	YY_BREAK
1058
case 24:
1059
YY_RULE_SETUP
1060
#line 89 "QuantityParser.l"
1061
yylval = Quantity::MicroGram;           return UNIT; // micro gram
1062
	YY_BREAK
1063
case 25:
1064
YY_RULE_SETUP
1065
#line 90 "QuantityParser.l"
1066
yylval = Quantity::MicroGram;           return UNIT; // micro gram
1067
	YY_BREAK
1068
case 26:
1069
YY_RULE_SETUP
1070
#line 91 "QuantityParser.l"
1071
yylval = Quantity::MilliGram;           return UNIT; // milli gram
1072
	YY_BREAK
1073
case 27:
1074
YY_RULE_SETUP
1075
#line 92 "QuantityParser.l"
1076
yylval = Quantity::Gram;                return UNIT; // gram
1077
	YY_BREAK
1078
case 28:
1079
YY_RULE_SETUP
1080
#line 93 "QuantityParser.l"
1081
yylval = Quantity::KiloGram;            return UNIT; // kilo gram      (internal standard for mass)
1082
	YY_BREAK
1083
case 29:
1084
YY_RULE_SETUP
1085
#line 94 "QuantityParser.l"
1086
yylval = Quantity::Ton;                 return UNIT; // Metric Tonne
1087
	YY_BREAK
1088
case 30:
1089
YY_RULE_SETUP
1090
#line 96 "QuantityParser.l"
1091
yylval = Quantity::Second;              return UNIT; // second         (internal standard time)
1092
	YY_BREAK
1093
case 31:
1094
YY_RULE_SETUP
1095
#line 97 "QuantityParser.l"
1096
yylval = Quantity::Minute;              return UNIT; // minute
1097
	YY_BREAK
1098
case 32:
1099
YY_RULE_SETUP
1100
#line 98 "QuantityParser.l"
1101
yylval = Quantity::Hour;                return UNIT; // hour
1102
	YY_BREAK
1103
case 33:
1104
YY_RULE_SETUP
1105
#line 100 "QuantityParser.l"
1106
yylval = Quantity::Ampere;              return UNIT; // Ampere         (internal standard electric current)
1107
	YY_BREAK
1108
case 34:
1109
YY_RULE_SETUP
1110
#line 101 "QuantityParser.l"
1111
yylval = Quantity::MilliAmpere;         return UNIT; // milli Ampere
1112
	YY_BREAK
1113
case 35:
1114
YY_RULE_SETUP
1115
#line 102 "QuantityParser.l"
1116
yylval = Quantity::KiloAmpere;          return UNIT; // kilo Ampere
1117
	YY_BREAK
1118
case 36:
1119
YY_RULE_SETUP
1120
#line 103 "QuantityParser.l"
1121
yylval = Quantity::MegaAmpere;          return UNIT; // mega Ampere
1122
	YY_BREAK
1123
case 37:
1124
YY_RULE_SETUP
1125
#line 105 "QuantityParser.l"
1126
yylval = Quantity::Kelvin;              return UNIT; // Kelvin         (internal standard thermodynamic temperature)
1127
	YY_BREAK
1128
case 38:
1129
YY_RULE_SETUP
1130
#line 106 "QuantityParser.l"
1131
yylval = Quantity::MilliKelvin;         return UNIT; // milli Kelvin
1132
	YY_BREAK
1133
case 39:
1134
YY_RULE_SETUP
1135
#line 107 "QuantityParser.l"
1136
yylval = Quantity::MicroKelvin;         return UNIT; // micro Kelvin
1137
	YY_BREAK
1138
case 40:
1139
YY_RULE_SETUP
1140
#line 108 "QuantityParser.l"
1141
yylval = Quantity::MicroKelvin;         return UNIT; // micro Kelvin
1142
	YY_BREAK
1143
case 41:
1144
YY_RULE_SETUP
1145
#line 110 "QuantityParser.l"
1146
yylval = Quantity::Mole;                return UNIT; // Mole           (internal standard amount of substance)
1147
	YY_BREAK
1148
case 42:
1149
YY_RULE_SETUP
1150
#line 111 "QuantityParser.l"
1151
yylval = Quantity::MilliMole;           return UNIT; // Milli Mole
1152
	YY_BREAK
1153
case 43:
1154
YY_RULE_SETUP
1155
#line 113 "QuantityParser.l"
1156
yylval = Quantity::Candela;             return UNIT; // Candela        (internal standard luminous intensity)
1157
	YY_BREAK
1158
case 44:
1159
YY_RULE_SETUP
1160
#line 115 "QuantityParser.l"
1161
yylval = Quantity::Inch;                return UNIT; // inch
1162
	YY_BREAK
1163
case 45:
1164
YY_RULE_SETUP
1165
#line 116 "QuantityParser.l"
1166
yylval = Quantity::Inch;                return UNIT; // inch
1167
	YY_BREAK
1168
case 46:
1169
YY_RULE_SETUP
1170
#line 117 "QuantityParser.l"
1171
yylval = Quantity::Foot;                return UNIT; // foot
1172
	YY_BREAK
1173
case 47:
1174
YY_RULE_SETUP
1175
#line 118 "QuantityParser.l"
1176
yylval = Quantity::Foot;                return UNIT; // foot
1177
	YY_BREAK
1178
case 48:
1179
YY_RULE_SETUP
1180
#line 119 "QuantityParser.l"
1181
yylval = Quantity::Thou;                return UNIT; // thou (in/1000)
1182
	YY_BREAK
1183
case 49:
1184
YY_RULE_SETUP
1185
#line 120 "QuantityParser.l"
1186
yylval = Quantity::Thou;                return UNIT; // mil  (the thou in US)
1187
	YY_BREAK
1188
case 50:
1189
YY_RULE_SETUP
1190
#line 121 "QuantityParser.l"
1191
yylval = Quantity::Yard;                return UNIT; // yard
1192
	YY_BREAK
1193
case 51:
1194
YY_RULE_SETUP
1195
#line 122 "QuantityParser.l"
1196
yylval = Quantity::Mile;                return UNIT; // mile
1197
	YY_BREAK
1198
case 52:
1199
YY_RULE_SETUP
1200
#line 124 "QuantityParser.l"
1201
yylval = Quantity::MilePerHour;         return UNIT; // mile per hour
1202
	YY_BREAK
1203
case 53:
1204
YY_RULE_SETUP
1205
#line 125 "QuantityParser.l"
1206
yylval = Quantity::SquareFoot;          return UNIT; // square foot
1207
	YY_BREAK
1208
case 54:
1209
YY_RULE_SETUP
1210
#line 126 "QuantityParser.l"
1211
yylval = Quantity::CubicFoot;           return UNIT; // cubic foot
1212
	YY_BREAK
1213
case 55:
1214
YY_RULE_SETUP
1215
#line 128 "QuantityParser.l"
1216
yylval = Quantity::Pound;               return UNIT; // pound
1217
	YY_BREAK
1218
case 56:
1219
YY_RULE_SETUP
1220
#line 129 "QuantityParser.l"
1221
yylval = Quantity::Pound;               return UNIT; // pound
1222
	YY_BREAK
1223
case 57:
1224
YY_RULE_SETUP
1225
#line 130 "QuantityParser.l"
1226
yylval = Quantity::Ounce;               return UNIT; // ounce
1227
	YY_BREAK
1228
case 58:
1229
YY_RULE_SETUP
1230
#line 131 "QuantityParser.l"
1231
yylval = Quantity::Stone;               return UNIT; // Stone
1232
	YY_BREAK
1233
case 59:
1234
YY_RULE_SETUP
1235
#line 132 "QuantityParser.l"
1236
yylval = Quantity::Hundredweights;      return UNIT; // hundredweights
1237
	YY_BREAK
1238
case 60:
1239
YY_RULE_SETUP
1240
#line 134 "QuantityParser.l"
1241
yylval = Quantity::PoundForce;          return UNIT; // pound
1242
	YY_BREAK
1243
case 61:
1244
YY_RULE_SETUP
1245
#line 136 "QuantityParser.l"
1246
yylval = Quantity::Newton;              return UNIT; // Newton (kg*m/s^2)
1247
	YY_BREAK
1248
case 62:
1249
YY_RULE_SETUP
1250
#line 137 "QuantityParser.l"
1251
yylval = Quantity::MilliNewton;         return UNIT; // milli Newton
1252
	YY_BREAK
1253
case 63:
1254
YY_RULE_SETUP
1255
#line 138 "QuantityParser.l"
1256
yylval = Quantity::KiloNewton;          return UNIT; // kilo Newton
1257
	YY_BREAK
1258
case 64:
1259
YY_RULE_SETUP
1260
#line 139 "QuantityParser.l"
1261
yylval = Quantity::MegaNewton;          return UNIT; // mega Newton
1262
	YY_BREAK
1263
case 65:
1264
YY_RULE_SETUP
1265
#line 141 "QuantityParser.l"
1266
yylval = Quantity::Pascal;              return UNIT; // Pascal (kg/m/s^2 or N/m^2)
1267
	YY_BREAK
1268
case 66:
1269
YY_RULE_SETUP
1270
#line 142 "QuantityParser.l"
1271
yylval = Quantity::KiloPascal;          return UNIT; // kilo Pascal
1272
	YY_BREAK
1273
case 67:
1274
YY_RULE_SETUP
1275
#line 143 "QuantityParser.l"
1276
yylval = Quantity::MegaPascal;          return UNIT; // mega Pascal
1277
	YY_BREAK
1278
case 68:
1279
YY_RULE_SETUP
1280
#line 144 "QuantityParser.l"
1281
yylval = Quantity::GigaPascal;          return UNIT; // giga Pascal
1282
	YY_BREAK
1283
case 69:
1284
YY_RULE_SETUP
1285
#line 146 "QuantityParser.l"
1286
yylval = Quantity::Bar;                 return UNIT; // 1 bar = 100 kPa
1287
	YY_BREAK
1288
case 70:
1289
YY_RULE_SETUP
1290
#line 147 "QuantityParser.l"
1291
yylval = Quantity::MilliBar;            return UNIT; // milli Bar
1292
	YY_BREAK
1293
case 71:
1294
YY_RULE_SETUP
1295
#line 149 "QuantityParser.l"
1296
yylval = Quantity::Torr;                return UNIT; // portion of Pascal ( 101325/760 )
1297
	YY_BREAK
1298
case 72:
1299
YY_RULE_SETUP
1300
#line 150 "QuantityParser.l"
1301
yylval = Quantity::mTorr;               return UNIT; //
1302
	YY_BREAK
1303
case 73:
1304
YY_RULE_SETUP
1305
#line 151 "QuantityParser.l"
1306
yylval = Quantity::yTorr;               return UNIT; //
1307
	YY_BREAK
1308
case 74:
1309
YY_RULE_SETUP
1310
#line 152 "QuantityParser.l"
1311
yylval = Quantity::yTorr;               return UNIT; //
1312
	YY_BREAK
1313
case 75:
1314
YY_RULE_SETUP
1315
#line 154 "QuantityParser.l"
1316
yylval = Quantity::PSI;                 return UNIT; // pounds/in^2
1317
	YY_BREAK
1318
case 76:
1319
YY_RULE_SETUP
1320
#line 155 "QuantityParser.l"
1321
yylval = Quantity::KSI;                 return UNIT; // 1000 x pounds/in^2
1322
	YY_BREAK
1323
case 77:
1324
YY_RULE_SETUP
1325
#line 156 "QuantityParser.l"
1326
yylval = Quantity::MPSI;                return UNIT; // 1000 ksi
1327
	YY_BREAK
1328
case 78:
1329
YY_RULE_SETUP
1330
#line 158 "QuantityParser.l"
1331
yylval = Quantity::Watt;                return UNIT; // Watt (kg*m^2/s^3)
1332
	YY_BREAK
1333
case 79:
1334
YY_RULE_SETUP
1335
#line 159 "QuantityParser.l"
1336
yylval = Quantity::MilliWatt;           return UNIT; // milli Watt
1337
	YY_BREAK
1338
case 80:
1339
YY_RULE_SETUP
1340
#line 160 "QuantityParser.l"
1341
yylval = Quantity::KiloWatt;            return UNIT; // kilo Watt
1342
	YY_BREAK
1343
case 81:
1344
YY_RULE_SETUP
1345
#line 161 "QuantityParser.l"
1346
yylval = Quantity::VoltAmpere;          return UNIT; // VoltAmpere (kg*m^2/s^3)
1347
	YY_BREAK
1348
case 82:
1349
YY_RULE_SETUP
1350
#line 163 "QuantityParser.l"
1351
yylval = Quantity::Volt;                return UNIT; // Volt (kg*m^2/A/s^3)
1352
	YY_BREAK
1353
case 83:
1354
YY_RULE_SETUP
1355
#line 164 "QuantityParser.l"
1356
yylval = Quantity::KiloVolt;            return UNIT; // kilo Volt
1357
	YY_BREAK
1358
case 84:
1359
YY_RULE_SETUP
1360
#line 165 "QuantityParser.l"
1361
yylval = Quantity::MilliVolt;           return UNIT; // milli Volt
1362
	YY_BREAK
1363
case 85:
1364
YY_RULE_SETUP
1365
#line 167 "QuantityParser.l"
1366
yylval = Quantity::MegaSiemens;         return UNIT; // mega Siemens
1367
	YY_BREAK
1368
case 86:
1369
YY_RULE_SETUP
1370
#line 168 "QuantityParser.l"
1371
yylval = Quantity::KiloSiemens;         return UNIT; // kilo Siemens
1372
	YY_BREAK
1373
case 87:
1374
YY_RULE_SETUP
1375
#line 169 "QuantityParser.l"
1376
yylval = Quantity::Siemens;             return UNIT; // Siemens (A^2*s^3/kg/m^2)
1377
	YY_BREAK
1378
case 88:
1379
YY_RULE_SETUP
1380
#line 170 "QuantityParser.l"
1381
yylval = Quantity::MilliSiemens;        return UNIT; // milli Siemens
1382
	YY_BREAK
1383
case 89:
1384
YY_RULE_SETUP
1385
#line 171 "QuantityParser.l"
1386
yylval = Quantity::MicroSiemens;   return UNIT; // micro Siemens
1387
	YY_BREAK
1388
case 90:
1389
YY_RULE_SETUP
1390
#line 172 "QuantityParser.l"
1391
yylval = Quantity::MicroSiemens;        return UNIT; // micro Siemens
1392
	YY_BREAK
1393
case 91:
1394
YY_RULE_SETUP
1395
#line 174 "QuantityParser.l"
1396
yylval = Quantity::Ohm;                 return UNIT; // Ohm (kg*m^2/A^2/s^3)
1397
	YY_BREAK
1398
case 92:
1399
YY_RULE_SETUP
1400
#line 175 "QuantityParser.l"
1401
yylval = Quantity::KiloOhm;             return UNIT; // kilo Ohm
1402
	YY_BREAK
1403
case 93:
1404
YY_RULE_SETUP
1405
#line 176 "QuantityParser.l"
1406
yylval = Quantity::MegaOhm;             return UNIT; // mega Ohm
1407
	YY_BREAK
1408
case 94:
1409
YY_RULE_SETUP
1410
#line 178 "QuantityParser.l"
1411
yylval = Quantity::Coulomb;             return UNIT; // Coulomb (A*s)
1412
	YY_BREAK
1413
case 95:
1414
YY_RULE_SETUP
1415
#line 180 "QuantityParser.l"
1416
yylval = Quantity::Tesla;               return UNIT; // Tesla (kg/s^2/A)
1417
	YY_BREAK
1418
case 96:
1419
YY_RULE_SETUP
1420
#line 181 "QuantityParser.l"
1421
yylval = Quantity::Gauss;               return UNIT; // Gauss (1 G = 1e-4 T)
1422
	YY_BREAK
1423
case 97:
1424
YY_RULE_SETUP
1425
#line 183 "QuantityParser.l"
1426
yylval = Quantity::Weber;               return UNIT; // Weber (kg*m^2/s^2/A)
1427
	YY_BREAK
1428
case 98:
1429
YY_RULE_SETUP
1430
#line 185 "QuantityParser.l"
1431
yylval = Quantity::Farad;               return UNIT; // Farad (s^4*A^2/m^2/kg)
1432
	YY_BREAK
1433
case 99:
1434
YY_RULE_SETUP
1435
#line 186 "QuantityParser.l"
1436
yylval = Quantity::MilliFarad;          return UNIT; // milli Farad
1437
	YY_BREAK
1438
case 100:
1439
YY_RULE_SETUP
1440
#line 187 "QuantityParser.l"
1441
yylval = Quantity::MicroFarad;      return UNIT; // micro Farad
1442
	YY_BREAK
1443
case 101:
1444
YY_RULE_SETUP
1445
#line 188 "QuantityParser.l"
1446
yylval = Quantity::MicroFarad;          return UNIT; // micro Farad
1447
	YY_BREAK
1448
case 102:
1449
YY_RULE_SETUP
1450
#line 189 "QuantityParser.l"
1451
yylval = Quantity::NanoFarad;           return UNIT; // nano Farad
1452
	YY_BREAK
1453
case 103:
1454
YY_RULE_SETUP
1455
#line 190 "QuantityParser.l"
1456
yylval = Quantity::PicoFarad;           return UNIT; // pico Farad
1457
	YY_BREAK
1458
case 104:
1459
YY_RULE_SETUP
1460
#line 192 "QuantityParser.l"
1461
yylval = Quantity::Henry;               return UNIT; // Henry (kg*m^2/s^2/A^2)
1462
	YY_BREAK
1463
case 105:
1464
YY_RULE_SETUP
1465
#line 193 "QuantityParser.l"
1466
yylval = Quantity::MilliHenry;          return UNIT; // milli Henry
1467
	YY_BREAK
1468
case 106:
1469
YY_RULE_SETUP
1470
#line 194 "QuantityParser.l"
1471
yylval = Quantity::MicroHenry;      return UNIT; // micro Henry
1472
	YY_BREAK
1473
case 107:
1474
YY_RULE_SETUP
1475
#line 195 "QuantityParser.l"
1476
yylval = Quantity::MicroHenry;          return UNIT; // micro Henry
1477
	YY_BREAK
1478
case 108:
1479
YY_RULE_SETUP
1480
#line 196 "QuantityParser.l"
1481
yylval = Quantity::NanoHenry;           return UNIT; // nano Henry
1482
	YY_BREAK
1483
case 109:
1484
YY_RULE_SETUP
1485
#line 198 "QuantityParser.l"
1486
yylval = Quantity::Joule;               return UNIT; // Joule (kg*m^2/s^2)
1487
	YY_BREAK
1488
case 110:
1489
YY_RULE_SETUP
1490
#line 199 "QuantityParser.l"
1491
yylval = Quantity::MilliJoule;          return UNIT; // milli Joule
1492
	YY_BREAK
1493
case 111:
1494
YY_RULE_SETUP
1495
#line 200 "QuantityParser.l"
1496
yylval = Quantity::KiloJoule;           return UNIT; // kilo Joule
1497
	YY_BREAK
1498
case 112:
1499
YY_RULE_SETUP
1500
#line 201 "QuantityParser.l"
1501
yylval = Quantity::NewtonMeter;         return UNIT; // N*m = Joule
1502
	YY_BREAK
1503
case 113:
1504
YY_RULE_SETUP
1505
#line 202 "QuantityParser.l"
1506
yylval = Quantity::VoltAmpereSecond;    return UNIT; // V*A*s = Joule
1507
	YY_BREAK
1508
case 114:
1509
YY_RULE_SETUP
1510
#line 203 "QuantityParser.l"
1511
yylval = Quantity::WattSecond;          return UNIT; //
1512
	YY_BREAK
1513
case 115:
1514
YY_RULE_SETUP
1515
#line 204 "QuantityParser.l"
1516
yylval = Quantity::WattSecond;          return UNIT; // W*s = Joule
1517
	YY_BREAK
1518
case 116:
1519
YY_RULE_SETUP
1520
#line 205 "QuantityParser.l"
1521
yylval = Quantity::KiloWattHour;        return UNIT; // 1 kWh = 3.6e6 J
1522
	YY_BREAK
1523
case 117:
1524
YY_RULE_SETUP
1525
#line 206 "QuantityParser.l"
1526
yylval = Quantity::ElectronVolt;        return UNIT; // 1 eV = 1.602176634e-19 J
1527
	YY_BREAK
1528
case 118:
1529
YY_RULE_SETUP
1530
#line 207 "QuantityParser.l"
1531
yylval = Quantity::KiloElectronVolt;    return UNIT;
1532
	YY_BREAK
1533
case 119:
1534
YY_RULE_SETUP
1535
#line 208 "QuantityParser.l"
1536
yylval = Quantity::MegaElectronVolt;    return UNIT;
1537
	YY_BREAK
1538
case 120:
1539
YY_RULE_SETUP
1540
#line 209 "QuantityParser.l"
1541
yylval = Quantity::Calorie;             return UNIT; // 1 cal = 4.1868 J
1542
	YY_BREAK
1543
case 121:
1544
YY_RULE_SETUP
1545
#line 210 "QuantityParser.l"
1546
yylval = Quantity::KiloCalorie;         return UNIT;
1547
	YY_BREAK
1548
case 122:
1549
YY_RULE_SETUP
1550
#line 212 "QuantityParser.l"
1551
yylval = Quantity::Degree;              return UNIT; // degree         (internal standard angle)
1552
	YY_BREAK
1553
case 123:
1554
YY_RULE_SETUP
1555
#line 213 "QuantityParser.l"
1556
yylval = Quantity::Degree;              return UNIT; // degree         (internal standard angle)
1557
	YY_BREAK
1558
case 124:
1559
YY_RULE_SETUP
1560
#line 214 "QuantityParser.l"
1561
yylval = Quantity::Radian;              return UNIT; // radian
1562
	YY_BREAK
1563
case 125:
1564
YY_RULE_SETUP
1565
#line 215 "QuantityParser.l"
1566
yylval = Quantity::Gon;                 return UNIT; // gon
1567
	YY_BREAK
1568
case 126:
1569
YY_RULE_SETUP
1570
#line 216 "QuantityParser.l"
1571
yylval = Quantity::AngMinute;           return UNIT; // minute(Angular)
1572
	YY_BREAK
1573
case 127:
1574
YY_RULE_SETUP
1575
#line 217 "QuantityParser.l"
1576
yylval = Quantity::AngMinute;       return UNIT; // minute(Angular)
1577
	YY_BREAK
1578
case 128:
1579
YY_RULE_SETUP
1580
#line 218 "QuantityParser.l"
1581
yylval = Quantity::AngSecond;           return UNIT; // second(Angular)
1582
	YY_BREAK
1583
case 129:
1584
YY_RULE_SETUP
1585
#line 219 "QuantityParser.l"
1586
yylval = Quantity::AngSecond;       return UNIT; // second(Angular)
1587
	YY_BREAK
1588
case 130:
1589
YY_RULE_SETUP
1590
#line 221 "QuantityParser.l"
1591
yylval = Quantity(1.0);                 return ONE;
1592
	YY_BREAK
1593
case 131:
1594
YY_RULE_SETUP
1595
#line 222 "QuantityParser.l"
1596
{  yylval = Quantity(num_change(yytext,'.',','));return NUM;  }
1597
	YY_BREAK
1598
case 132:
1599
YY_RULE_SETUP
1600
#line 223 "QuantityParser.l"
1601
{  yylval = Quantity(num_change(yytext,'.',','));return NUM;  }
1602
	YY_BREAK
1603
case 133:
1604
YY_RULE_SETUP
1605
#line 224 "QuantityParser.l"
1606
{  yylval = Quantity(num_change(yytext,',','.'));return NUM;  }
1607
	YY_BREAK
1608
case 134:
1609
YY_RULE_SETUP
1610
#line 225 "QuantityParser.l"
1611
{  yylval = Quantity(num_change(yytext,',','.'));return NUM;  }
1612
	YY_BREAK
1613
case 135:
1614
YY_RULE_SETUP
1615
#line 228 "QuantityParser.l"
1616
{yylval = Quantity(M_PI)          ; return NUM;} // constant pi
1617
	YY_BREAK
1618
case 136:
1619
YY_RULE_SETUP
1620
#line 229 "QuantityParser.l"
1621
{yylval = Quantity(M_E)           ; return NUM;} // constant e
1622
	YY_BREAK
1623
case 137:
1624
YY_RULE_SETUP
1625
#line 231 "QuantityParser.l"
1626
return ACOS;
1627
	YY_BREAK
1628
case 138:
1629
YY_RULE_SETUP
1630
#line 232 "QuantityParser.l"
1631
return ASIN;
1632
	YY_BREAK
1633
case 139:
1634
YY_RULE_SETUP
1635
#line 233 "QuantityParser.l"
1636
return ATAN;
1637
	YY_BREAK
1638
case 140:
1639
YY_RULE_SETUP
1640
#line 234 "QuantityParser.l"
1641
return ATAN2;
1642
	YY_BREAK
1643
case 141:
1644
YY_RULE_SETUP
1645
#line 235 "QuantityParser.l"
1646
return COS;
1647
	YY_BREAK
1648
case 142:
1649
YY_RULE_SETUP
1650
#line 236 "QuantityParser.l"
1651
return EXP;
1652
	YY_BREAK
1653
case 143:
1654
YY_RULE_SETUP
1655
#line 237 "QuantityParser.l"
1656
return ABS;
1657
	YY_BREAK
1658
case 144:
1659
YY_RULE_SETUP
1660
#line 238 "QuantityParser.l"
1661
return MOD;
1662
	YY_BREAK
1663
case 145:
1664
YY_RULE_SETUP
1665
#line 239 "QuantityParser.l"
1666
return LOG;
1667
	YY_BREAK
1668
case 146:
1669
YY_RULE_SETUP
1670
#line 240 "QuantityParser.l"
1671
return LOG10;
1672
	YY_BREAK
1673
case 147:
1674
YY_RULE_SETUP
1675
#line 241 "QuantityParser.l"
1676
return POW;
1677
	YY_BREAK
1678
case 148:
1679
YY_RULE_SETUP
1680
#line 242 "QuantityParser.l"
1681
return SIN;
1682
	YY_BREAK
1683
case 149:
1684
YY_RULE_SETUP
1685
#line 243 "QuantityParser.l"
1686
return SINH;
1687
	YY_BREAK
1688
case 150:
1689
YY_RULE_SETUP
1690
#line 244 "QuantityParser.l"
1691
return TAN;
1692
	YY_BREAK
1693
case 151:
1694
YY_RULE_SETUP
1695
#line 245 "QuantityParser.l"
1696
return TANH;
1697
	YY_BREAK
1698
case 152:
1699
YY_RULE_SETUP
1700
#line 246 "QuantityParser.l"
1701
return SQRT;
1702
	YY_BREAK
1703
case 153:
1704
YY_RULE_SETUP
1705
#line 248 "QuantityParser.l"
1706
return *yytext;
1707
	YY_BREAK
1708
case 154:
1709
YY_RULE_SETUP
1710
#line 249 "QuantityParser.l"
1711
ECHO;
1712
	YY_BREAK
1713
#line 1712 "QuantityLexer.c"
1714
case YY_STATE_EOF(INITIAL):
1715
case YY_STATE_EOF(C_COMMENT):
1716
	yyterminate();
1717

1718
	case YY_END_OF_BUFFER:
1719
		{
1720
		/* Amount of text matched not including the EOB char. */
1721
		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1722

1723
		/* Undo the effects of YY_DO_BEFORE_ACTION. */
1724
		*yy_cp = (yy_hold_char);
1725
		YY_RESTORE_YY_MORE_OFFSET
1726

1727
		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1728
			{
1729
			/* We're scanning a new file or input source.  It's
1730
			 * possible that this happened because the user
1731
			 * just pointed yyin at a new source and called
1732
			 * yylex().  If so, then we have to assure
1733
			 * consistency between YY_CURRENT_BUFFER and our
1734
			 * globals.  Here is the right place to do so, because
1735
			 * this is the first action (other than possibly a
1736
			 * back-up) that will match for the new input source.
1737
			 */
1738
			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1739
			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1740
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1741
			}
1742

1743
		/* Note that here we test for yy_c_buf_p "<=" to the position
1744
		 * of the first EOB in the buffer, since yy_c_buf_p will
1745
		 * already have been incremented past the NUL character
1746
		 * (since all states make transitions on EOB to the
1747
		 * end-of-buffer state).  Contrast this with the test
1748
		 * in input().
1749
		 */
1750
		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1751
			{ /* This was really a NUL. */
1752
			yy_state_type yy_next_state;
1753

1754
			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1755

1756
			yy_current_state = yy_get_previous_state(  );
1757

1758
			/* Okay, we're now positioned to make the NUL
1759
			 * transition.  We couldn't have
1760
			 * yy_get_previous_state() go ahead and do it
1761
			 * for us because it doesn't know how to deal
1762
			 * with the possibility of jamming (and we don't
1763
			 * want to build jamming into it because then it
1764
			 * will run more slowly).
1765
			 */
1766

1767
			yy_next_state = yy_try_NUL_trans( yy_current_state );
1768

1769
			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1770

1771
			if ( yy_next_state )
1772
				{
1773
				/* Consume the NUL. */
1774
				yy_cp = ++(yy_c_buf_p);
1775
				yy_current_state = yy_next_state;
1776
				goto yy_match;
1777
				}
1778

1779
			else
1780
				{
1781
				yy_cp = (yy_last_accepting_cpos);
1782
				yy_current_state = (yy_last_accepting_state);
1783
				goto yy_find_action;
1784
				}
1785
			}
1786

1787
		else switch ( yy_get_next_buffer(  ) )
1788
			{
1789
			case EOB_ACT_END_OF_FILE:
1790
				{
1791
				(yy_did_buffer_switch_on_eof) = 0;
1792

1793
				if ( yywrap(  ) )
1794
					{
1795
					/* Note: because we've taken care in
1796
					 * yy_get_next_buffer() to have set up
1797
					 * yytext, we can now set up
1798
					 * yy_c_buf_p so that if some total
1799
					 * hoser (like flex itself) wants to
1800
					 * call the scanner after we return the
1801
					 * YY_NULL, it'll still work - another
1802
					 * YY_NULL will get returned.
1803
					 */
1804
					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1805

1806
					yy_act = YY_STATE_EOF(YY_START);
1807
					goto do_action;
1808
					}
1809

1810
				else
1811
					{
1812
					if ( ! (yy_did_buffer_switch_on_eof) )
1813
						YY_NEW_FILE;
1814
					}
1815
				break;
1816
				}
1817

1818
			case EOB_ACT_CONTINUE_SCAN:
1819
				(yy_c_buf_p) =
1820
					(yytext_ptr) + yy_amount_of_matched_text;
1821

1822
				yy_current_state = yy_get_previous_state(  );
1823

1824
				yy_cp = (yy_c_buf_p);
1825
				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1826
				goto yy_match;
1827

1828
			case EOB_ACT_LAST_MATCH:
1829
				(yy_c_buf_p) =
1830
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1831

1832
				yy_current_state = yy_get_previous_state(  );
1833

1834
				yy_cp = (yy_c_buf_p);
1835
				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1836
				goto yy_find_action;
1837
			}
1838
		break;
1839
		}
1840

1841
	default:
1842
		YY_FATAL_ERROR(
1843
			"fatal flex scanner internal error--no action found" );
1844
	} /* end of action switch */
1845
		} /* end of scanning one token */
1846
	} /* end of user's declarations */
1847
} /* end of yylex */
1848

1849
/* yy_get_next_buffer - try to read in a new buffer
1850
 *
1851
 * Returns a code representing an action:
1852
 *	EOB_ACT_LAST_MATCH -
1853
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1854
 *	EOB_ACT_END_OF_FILE - end of file
1855
 */
1856
static int yy_get_next_buffer (void)
1857
{
1858
    	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1859
	char *source = (yytext_ptr);
1860
	int number_to_move, i;
1861
	int ret_val;
1862

1863
	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1864
		YY_FATAL_ERROR(
1865
		"fatal flex scanner internal error--end of buffer missed" );
1866

1867
	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1868
		{ /* Don't try to fill the buffer, so this is an EOF. */
1869
		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1870
			{
1871
			/* We matched a single character, the EOB, so
1872
			 * treat this as a final EOF.
1873
			 */
1874
			return EOB_ACT_END_OF_FILE;
1875
			}
1876

1877
		else
1878
			{
1879
			/* We matched some text prior to the EOB, first
1880
			 * process it.
1881
			 */
1882
			return EOB_ACT_LAST_MATCH;
1883
			}
1884
		}
1885

1886
	/* Try to read more data. */
1887

1888
	/* First move last chars to start of buffer. */
1889
	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1890

1891
	for ( i = 0; i < number_to_move; ++i )
1892
		*(dest++) = *(source++);
1893

1894
	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1895
		/* don't do the read, it's not guaranteed to return an EOF,
1896
		 * just force an EOF
1897
		 */
1898
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1899

1900
	else
1901
		{
1902
			int num_to_read =
1903
			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1904

1905
		while ( num_to_read <= 0 )
1906
			{ /* Not enough room in the buffer - grow it. */
1907

1908
			/* just a shorter name for the current buffer */
1909
			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1910

1911
			int yy_c_buf_p_offset =
1912
				(int) ((yy_c_buf_p) - b->yy_ch_buf);
1913

1914
			if ( b->yy_is_our_buffer )
1915
				{
1916
				int new_size = b->yy_buf_size * 2;
1917

1918
				if ( new_size <= 0 )
1919
					b->yy_buf_size += b->yy_buf_size / 8;
1920
				else
1921
					b->yy_buf_size *= 2;
1922

1923
				b->yy_ch_buf = (char *)
1924
					/* Include room in for 2 EOB chars. */
1925
					yyrealloc( (void *) b->yy_ch_buf,
1926
							 (yy_size_t) (b->yy_buf_size + 2)  );
1927
				}
1928
			else
1929
				/* Can't grow it, we don't own it. */
1930
				b->yy_ch_buf = NULL;
1931

1932
			if ( ! b->yy_ch_buf )
1933
				YY_FATAL_ERROR(
1934
				"fatal error - scanner input buffer overflow" );
1935

1936
			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1937

1938
			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1939
						number_to_move - 1;
1940

1941
			}
1942

1943
		if ( num_to_read > YY_READ_BUF_SIZE )
1944
			num_to_read = YY_READ_BUF_SIZE;
1945

1946
		/* Read in more data. */
1947
		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1948
			(yy_n_chars), num_to_read );
1949

1950
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1951
		}
1952

1953
	if ( (yy_n_chars) == 0 )
1954
		{
1955
		if ( number_to_move == YY_MORE_ADJ )
1956
			{
1957
			ret_val = EOB_ACT_END_OF_FILE;
1958
			yyrestart( yyin  );
1959
			}
1960

1961
		else
1962
			{
1963
			ret_val = EOB_ACT_LAST_MATCH;
1964
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1965
				YY_BUFFER_EOF_PENDING;
1966
			}
1967
		}
1968

1969
	else
1970
		ret_val = EOB_ACT_CONTINUE_SCAN;
1971

1972
	if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1973
		/* Extend the array by 50%, plus the number we really need. */
1974
		int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1975
		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1976
			(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size  );
1977
		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1978
			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1979
		/* "- 2" to take care of EOB's */
1980
		YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1981
	}
1982

1983
	(yy_n_chars) += number_to_move;
1984
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1985
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1986

1987
	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1988

1989
	return ret_val;
1990
}
1991

1992
/* yy_get_previous_state - get the state just before the EOB char was reached */
1993

1994
    static yy_state_type yy_get_previous_state (void)
1995
{
1996
	yy_state_type yy_current_state;
1997
	char *yy_cp;
1998

1999
	yy_current_state = (yy_start);
2000

2001
	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2002
		{
2003
		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2004
		if ( yy_accept[yy_current_state] )
2005
			{
2006
			(yy_last_accepting_state) = yy_current_state;
2007
			(yy_last_accepting_cpos) = yy_cp;
2008
			}
2009
		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2010
			{
2011
			yy_current_state = (int) yy_def[yy_current_state];
2012
			if ( yy_current_state >= 265 )
2013
				yy_c = yy_meta[yy_c];
2014
			}
2015
		yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2016
		}
2017

2018
	return yy_current_state;
2019
}
2020

2021
/* yy_try_NUL_trans - try to make a transition on the NUL character
2022
 *
2023
 * synopsis
2024
 *	next_state = yy_try_NUL_trans( current_state );
2025
 */
2026
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
2027
{
2028
	int yy_is_jam;
2029
    	char *yy_cp = (yy_c_buf_p);
2030

2031
	YY_CHAR yy_c = 1;
2032
	if ( yy_accept[yy_current_state] )
2033
		{
2034
		(yy_last_accepting_state) = yy_current_state;
2035
		(yy_last_accepting_cpos) = yy_cp;
2036
		}
2037
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2038
		{
2039
		yy_current_state = (int) yy_def[yy_current_state];
2040
		if ( yy_current_state >= 265 )
2041
			yy_c = yy_meta[yy_c];
2042
		}
2043
	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2044
	yy_is_jam = (yy_current_state == 264);
2045

2046
		return yy_is_jam ? 0 : yy_current_state;
2047
}
2048

2049
#ifndef YY_NO_UNPUT
2050

2051
#endif
2052

2053
#ifndef YY_NO_INPUT
2054
#ifdef __cplusplus
2055
    static int yyinput (void)
2056
#else
2057
    static int input  (void)
2058
#endif
2059

2060
{
2061
	int c;
2062

2063
	*(yy_c_buf_p) = (yy_hold_char);
2064

2065
	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2066
		{
2067
		/* yy_c_buf_p now points to the character we want to return.
2068
		 * If this occurs *before* the EOB characters, then it's a
2069
		 * valid NUL; if not, then we've hit the end of the buffer.
2070
		 */
2071
		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2072
			/* This was really a NUL. */
2073
			*(yy_c_buf_p) = '\0';
2074

2075
		else
2076
			{ /* need more input */
2077
			int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
2078
			++(yy_c_buf_p);
2079

2080
			switch ( yy_get_next_buffer(  ) )
2081
				{
2082
				case EOB_ACT_LAST_MATCH:
2083
					/* This happens because yy_g_n_b()
2084
					 * sees that we've accumulated a
2085
					 * token and flags that we need to
2086
					 * try matching the token before
2087
					 * proceeding.  But for input(),
2088
					 * there's no matching to consider.
2089
					 * So convert the EOB_ACT_LAST_MATCH
2090
					 * to EOB_ACT_END_OF_FILE.
2091
					 */
2092

2093
					/* Reset buffer status. */
2094
					yyrestart( yyin );
2095

2096
					/*FALLTHROUGH*/
2097

2098
				case EOB_ACT_END_OF_FILE:
2099
					{
2100
					if ( yywrap(  ) )
2101
						return 0;
2102

2103
					if ( ! (yy_did_buffer_switch_on_eof) )
2104
						YY_NEW_FILE;
2105
#ifdef __cplusplus
2106
					return yyinput();
2107
#else
2108
					return input();
2109
#endif
2110
					}
2111

2112
				case EOB_ACT_CONTINUE_SCAN:
2113
					(yy_c_buf_p) = (yytext_ptr) + offset;
2114
					break;
2115
				}
2116
			}
2117
		}
2118

2119
	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
2120
	*(yy_c_buf_p) = '\0';	/* preserve yytext */
2121
	(yy_hold_char) = *++(yy_c_buf_p);
2122

2123
	return c;
2124
}
2125
#endif	/* ifndef YY_NO_INPUT */
2126

2127
/** Immediately switch to a different input stream.
2128
 * @param input_file A readable stream.
2129
 *
2130
 * @note This function does not reset the start condition to @c INITIAL .
2131
 */
2132
    void yyrestart  (FILE * input_file )
2133
{
2134

2135
	if ( ! YY_CURRENT_BUFFER ){
2136
        yyensure_buffer_stack ();
2137
		YY_CURRENT_BUFFER_LVALUE =
2138
            yy_create_buffer( yyin, YY_BUF_SIZE );
2139
	}
2140

2141
	yy_init_buffer( YY_CURRENT_BUFFER, input_file );
2142
	yy_load_buffer_state(  );
2143
}
2144

2145
/** Switch to a different input buffer.
2146
 * @param new_buffer The new input buffer.
2147
 *
2148
 */
2149
    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
2150
{
2151

2152
	/* TODO: We should be able to replace this entire function body
2153
	 * with
2154
	 *		yypop_buffer_state();
2155
	 *		yypush_buffer_state(new_buffer);
2156
     */
2157
	yyensure_buffer_stack ();
2158
	if ( YY_CURRENT_BUFFER == new_buffer )
2159
		return;
2160

2161
	if ( YY_CURRENT_BUFFER )
2162
		{
2163
		/* Flush out information for old buffer. */
2164
		*(yy_c_buf_p) = (yy_hold_char);
2165
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2166
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2167
		}
2168

2169
	YY_CURRENT_BUFFER_LVALUE = new_buffer;
2170
	yy_load_buffer_state(  );
2171

2172
	/* We don't actually know whether we did this switch during
2173
	 * EOF (yywrap()) processing, but the only time this flag
2174
	 * is looked at is after yywrap() is called, so it's safe
2175
	 * to go ahead and always set it.
2176
	 */
2177
	(yy_did_buffer_switch_on_eof) = 1;
2178
}
2179

2180
static void yy_load_buffer_state  (void)
2181
{
2182
    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2183
	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2184
	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2185
	(yy_hold_char) = *(yy_c_buf_p);
2186
}
2187

2188
/** Allocate and initialize an input buffer state.
2189
 * @param file A readable stream.
2190
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2191
 *
2192
 * @return the allocated buffer state.
2193
 */
2194
    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
2195
{
2196
	YY_BUFFER_STATE b;
2197

2198
	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
2199
	if ( ! b )
2200
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2201

2202
	b->yy_buf_size = size;
2203

2204
	/* yy_ch_buf has to be 2 characters longer than the size given because
2205
	 * we need to put in 2 end-of-buffer characters.
2206
	 */
2207
	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2)  );
2208
	if ( ! b->yy_ch_buf )
2209
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2210

2211
	b->yy_is_our_buffer = 1;
2212

2213
	yy_init_buffer( b, file );
2214

2215
	return b;
2216
}
2217

2218
/** Destroy the buffer.
2219
 * @param b a buffer created with yy_create_buffer()
2220
 *
2221
 */
2222
    void yy_delete_buffer (YY_BUFFER_STATE  b )
2223
{
2224

2225
	if ( ! b )
2226
		return;
2227

2228
	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2229
		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2230

2231
	if ( b->yy_is_our_buffer )
2232
		yyfree( (void *) b->yy_ch_buf  );
2233

2234
	yyfree( (void *) b  );
2235
}
2236

2237
/* Initializes or reinitializes a buffer.
2238
 * This function is sometimes called more than once on the same buffer,
2239
 * such as during a yyrestart() or at EOF.
2240
 */
2241
    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
2242

2243
{
2244
	int oerrno = errno;
2245

2246
	yy_flush_buffer( b );
2247

2248
	b->yy_input_file = file;
2249
	b->yy_fill_buffer = 1;
2250

2251
    /* If b is the current buffer, then yy_init_buffer was _probably_
2252
     * called from yyrestart() or through yy_get_next_buffer.
2253
     * In that case, we don't want to reset the lineno or column.
2254
     */
2255
    if (b != YY_CURRENT_BUFFER){
2256
        b->yy_bs_lineno = 1;
2257
        b->yy_bs_column = 0;
2258
    }
2259

2260
        b->yy_is_interactive = 0;
2261

2262
	errno = oerrno;
2263
}
2264

2265
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2266
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2267
 *
2268
 */
2269
    void yy_flush_buffer (YY_BUFFER_STATE  b )
2270
{
2271
    	if ( ! b )
2272
		return;
2273

2274
	b->yy_n_chars = 0;
2275

2276
	/* We always need two end-of-buffer characters.  The first causes
2277
	 * a transition to the end-of-buffer state.  The second causes
2278
	 * a jam in that state.
2279
	 */
2280
	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2281
	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2282

2283
	b->yy_buf_pos = &b->yy_ch_buf[0];
2284

2285
	b->yy_at_bol = 1;
2286
	b->yy_buffer_status = YY_BUFFER_NEW;
2287

2288
	if ( b == YY_CURRENT_BUFFER )
2289
		yy_load_buffer_state(  );
2290
}
2291

2292
/** Pushes the new state onto the stack. The new state becomes
2293
 *  the current state. This function will allocate the stack
2294
 *  if necessary.
2295
 *  @param new_buffer The new state.
2296
 *
2297
 */
2298
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2299
{
2300
    	if (new_buffer == NULL)
2301
		return;
2302

2303
	yyensure_buffer_stack();
2304

2305
	/* This block is copied from yy_switch_to_buffer. */
2306
	if ( YY_CURRENT_BUFFER )
2307
		{
2308
		/* Flush out information for old buffer. */
2309
		*(yy_c_buf_p) = (yy_hold_char);
2310
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2311
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2312
		}
2313

2314
	/* Only push if top exists. Otherwise, replace top. */
2315
	if (YY_CURRENT_BUFFER)
2316
		(yy_buffer_stack_top)++;
2317
	YY_CURRENT_BUFFER_LVALUE = new_buffer;
2318

2319
	/* copied from yy_switch_to_buffer. */
2320
	yy_load_buffer_state(  );
2321
	(yy_did_buffer_switch_on_eof) = 1;
2322
}
2323

2324
/** Removes and deletes the top of the stack, if present.
2325
 *  The next element becomes the new top.
2326
 *
2327
 */
2328
void yypop_buffer_state (void)
2329
{
2330
    	if (!YY_CURRENT_BUFFER)
2331
		return;
2332

2333
	yy_delete_buffer(YY_CURRENT_BUFFER );
2334
	YY_CURRENT_BUFFER_LVALUE = NULL;
2335
	if ((yy_buffer_stack_top) > 0)
2336
		--(yy_buffer_stack_top);
2337

2338
	if (YY_CURRENT_BUFFER) {
2339
		yy_load_buffer_state(  );
2340
		(yy_did_buffer_switch_on_eof) = 1;
2341
	}
2342
}
2343

2344
/* Allocates the stack if it does not exist.
2345
 *  Guarantees space for at least one push.
2346
 */
2347
static void yyensure_buffer_stack (void)
2348
{
2349
	yy_size_t num_to_alloc;
2350

2351
	if (!(yy_buffer_stack)) {
2352

2353
		/* First allocation is just for 2 elements, since we don't know if this
2354
		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2355
		 * immediate realloc on the next call.
2356
         */
2357
      num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2358
		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2359
								(num_to_alloc * sizeof(struct yy_buffer_state*)
2360
								);
2361
		if ( ! (yy_buffer_stack) )
2362
			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2363

2364
		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2365

2366
		(yy_buffer_stack_max) = num_to_alloc;
2367
		(yy_buffer_stack_top) = 0;
2368
		return;
2369
	}
2370

2371
	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2372

2373
		/* Increase the buffer to prepare for a possible push. */
2374
		yy_size_t grow_size = 8 /* arbitrary grow size */;
2375

2376
		num_to_alloc = (yy_buffer_stack_max) + grow_size;
2377
		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2378
								((yy_buffer_stack),
2379
								num_to_alloc * sizeof(struct yy_buffer_state*)
2380
								);
2381
		if ( ! (yy_buffer_stack) )
2382
			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2383

2384
		/* zero only the new slots.*/
2385
		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2386
		(yy_buffer_stack_max) = num_to_alloc;
2387
	}
2388
}
2389

2390
/** Setup the input buffer state to scan directly from a user-specified character buffer.
2391
 * @param base the character buffer
2392
 * @param size the size in bytes of the character buffer
2393
 *
2394
 * @return the newly allocated buffer state object.
2395
 */
2396
YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
2397
{
2398
	YY_BUFFER_STATE b;
2399

2400
	if ( size < 2 ||
2401
	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
2402
	     base[size-1] != YY_END_OF_BUFFER_CHAR )
2403
		/* They forgot to leave room for the EOB's. */
2404
		return NULL;
2405

2406
	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
2407
	if ( ! b )
2408
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2409

2410
	b->yy_buf_size = (int) (size - 2);	/* "- 2" to take care of EOB's */
2411
	b->yy_buf_pos = b->yy_ch_buf = base;
2412
	b->yy_is_our_buffer = 0;
2413
	b->yy_input_file = NULL;
2414
	b->yy_n_chars = b->yy_buf_size;
2415
	b->yy_is_interactive = 0;
2416
	b->yy_at_bol = 1;
2417
	b->yy_fill_buffer = 0;
2418
	b->yy_buffer_status = YY_BUFFER_NEW;
2419

2420
	yy_switch_to_buffer( b  );
2421

2422
	return b;
2423
}
2424

2425
/** Setup the input buffer state to scan a string. The next call to yylex() will
2426
 * scan from a @e copy of @a str.
2427
 * @param yystr a NUL-terminated string to scan
2428
 *
2429
 * @return the newly allocated buffer state object.
2430
 * @note If you want to scan bytes that may contain NUL values, then use
2431
 *       yy_scan_bytes() instead.
2432
 */
2433
YY_BUFFER_STATE yy_scan_string (const char * yystr )
2434
{
2435

2436
	return yy_scan_bytes( yystr, (int) strlen(yystr) );
2437
}
2438

2439
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2440
 * scan from a @e copy of @a bytes.
2441
 * @param yybytes the byte buffer to scan
2442
 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2443
 *
2444
 * @return the newly allocated buffer state object.
2445
 */
2446
YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len )
2447
{
2448
	YY_BUFFER_STATE b;
2449
	char *buf;
2450
	yy_size_t n;
2451
	int i;
2452

2453
	/* Get memory for full buffer, including space for trailing EOB's. */
2454
	n = (yy_size_t) (_yybytes_len + 2);
2455
	buf = (char *) yyalloc( n  );
2456
	if ( ! buf )
2457
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2458

2459
	for ( i = 0; i < _yybytes_len; ++i )
2460
		buf[i] = yybytes[i];
2461

2462
	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2463

2464
	b = yy_scan_buffer( buf, n );
2465
	if ( ! b )
2466
		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2467

2468
	/* It's okay to grow etc. this buffer, and we should throw it
2469
	 * away when we're done.
2470
	 */
2471
	b->yy_is_our_buffer = 1;
2472

2473
	return b;
2474
}
2475

2476
#ifndef YY_EXIT_FAILURE
2477
#define YY_EXIT_FAILURE 2
2478
#endif
2479

2480
static void yynoreturn yy_fatal_error (const char* msg )
2481
{
2482
			fprintf( stderr, "%s\n", msg );
2483
	exit( YY_EXIT_FAILURE );
2484
}
2485

2486
/* Redefine yyless() so it works in section 3 code. */
2487

2488
#undef yyless
2489
#define yyless(n) \
2490
	do \
2491
		{ \
2492
		/* Undo effects of setting up yytext. */ \
2493
        int yyless_macro_arg = (n); \
2494
        YY_LESS_LINENO(yyless_macro_arg);\
2495
		yytext[yyleng] = (yy_hold_char); \
2496
		(yy_c_buf_p) = yytext + yyless_macro_arg; \
2497
		(yy_hold_char) = *(yy_c_buf_p); \
2498
		*(yy_c_buf_p) = '\0'; \
2499
		yyleng = yyless_macro_arg; \
2500
		} \
2501
	while ( 0 )
2502

2503
/* Accessor  methods (get/set functions) to struct members. */
2504

2505
/** Get the current line number.
2506
 *
2507
 */
2508
int yyget_lineno  (void)
2509
{
2510

2511
    return yylineno;
2512
}
2513

2514
/** Get the input stream.
2515
 *
2516
 */
2517
FILE *yyget_in  (void)
2518
{
2519
        return yyin;
2520
}
2521

2522
/** Get the output stream.
2523
 *
2524
 */
2525
FILE *yyget_out  (void)
2526
{
2527
        return yyout;
2528
}
2529

2530
/** Get the length of the current token.
2531
 *
2532
 */
2533
int yyget_leng  (void)
2534
{
2535
        return yyleng;
2536
}
2537

2538
/** Get the current token.
2539
 *
2540
 */
2541

2542
char *yyget_text  (void)
2543
{
2544
        return yytext;
2545
}
2546

2547
/** Set the current line number.
2548
 * @param _line_number line number
2549
 *
2550
 */
2551
void yyset_lineno (int  _line_number )
2552
{
2553

2554
    yylineno = _line_number;
2555
}
2556

2557
/** Set the input stream. This does not discard the current
2558
 * input buffer.
2559
 * @param _in_str A readable stream.
2560
 *
2561
 * @see yy_switch_to_buffer
2562
 */
2563
void yyset_in (FILE *  _in_str )
2564
{
2565
        yyin = _in_str ;
2566
}
2567

2568
void yyset_out (FILE *  _out_str )
2569
{
2570
        yyout = _out_str ;
2571
}
2572

2573
int yyget_debug  (void)
2574
{
2575
        return yy_flex_debug;
2576
}
2577

2578
void yyset_debug (int  _bdebug )
2579
{
2580
        yy_flex_debug = _bdebug ;
2581
}
2582

2583
static int yy_init_globals (void)
2584
{
2585
        /* Initialization is the same as for the non-reentrant scanner.
2586
     * This function is called from yylex_destroy(), so don't allocate here.
2587
     */
2588

2589
    (yy_buffer_stack) = NULL;
2590
    (yy_buffer_stack_top) = 0;
2591
    (yy_buffer_stack_max) = 0;
2592
    (yy_c_buf_p) = NULL;
2593
    (yy_init) = 0;
2594
    (yy_start) = 0;
2595

2596
/* Defined in main.c */
2597
#ifdef YY_STDINIT
2598
    yyin = stdin;
2599
    yyout = stdout;
2600
#else
2601
    yyin = NULL;
2602
    yyout = NULL;
2603
#endif
2604

2605
    /* For future reference: Set errno on error, since we are called by
2606
     * yylex_init()
2607
     */
2608
    return 0;
2609
}
2610

2611
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
2612
int yylex_destroy  (void)
2613
{
2614

2615
    /* Pop the buffer stack, destroying each element. */
2616
	while(YY_CURRENT_BUFFER){
2617
		yy_delete_buffer( YY_CURRENT_BUFFER  );
2618
		YY_CURRENT_BUFFER_LVALUE = NULL;
2619
		yypop_buffer_state();
2620
	}
2621

2622
	/* Destroy the stack itself. */
2623
	yyfree((yy_buffer_stack) );
2624
	(yy_buffer_stack) = NULL;
2625

2626
    /* Reset the globals. This is important in a non-reentrant scanner so the next time
2627
     * yylex() is called, initialization will occur. */
2628
    yy_init_globals( );
2629

2630
    return 0;
2631
}
2632

2633
/*
2634
 * Internal utility routines.
2635
 */
2636

2637
#ifndef yytext_ptr
2638
static void yy_flex_strncpy (char* s1, const char * s2, int n )
2639
{
2640

2641
	int i;
2642
	for ( i = 0; i < n; ++i )
2643
		s1[i] = s2[i];
2644
}
2645
#endif
2646

2647
#ifdef YY_NEED_STRLEN
2648
static int yy_flex_strlen (const char * s )
2649
{
2650
	int n;
2651
	for ( n = 0; s[n]; ++n )
2652
		;
2653

2654
	return n;
2655
}
2656
#endif
2657

2658
void *yyalloc (yy_size_t  size )
2659
{
2660
			return malloc(size);
2661
}
2662

2663
void *yyrealloc  (void * ptr, yy_size_t  size )
2664
{
2665

2666
	/* The cast to (char *) in the following accommodates both
2667
	 * implementations that use char* generic pointers, and those
2668
	 * that use void* generic pointers.  It works with the latter
2669
	 * because both ANSI C and C++ allow castless assignment from
2670
	 * any pointer type to void*, and deal with argument conversions
2671
	 * as though doing an assignment.
2672
	 */
2673
	return realloc(ptr, size);
2674
}
2675

2676
void yyfree (void * ptr )
2677
{
2678
			free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
2679
}
2680

2681
#define YYTABLES_NAME "yytables"
2682

2683
#line 249 "QuantityParser.l"
2684
// clang-format on
2685

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.