expr_lex.cc 60.1 KB
Newer Older
1
#line 2 "expr_lex.cc"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
2

3
#line 4 "expr_lex.cc"
4
5
6
7

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
8
9
10

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
Uwe Schulzweida's avatar
Uwe Schulzweida committed
11
#define YY_FLEX_MINOR_VERSION 6
12
#define YY_FLEX_SUBMINOR_VERSION 1
13
14
15
16
17
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif

/* First, we deal with  platform-specific or compiler-specific issues. */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
18

19
/* begin standard C headers. */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
20
#include <stdio.h>
21
22
23
#include <string.h>
#include <errno.h>
#include <stdlib.h>
Uwe Schulzweida's avatar
Uwe Schulzweida committed
24

25
/* end standard C headers. */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
26

27
28
29
30
31
32
33
/* flex integer type definitions */

#ifndef FLEXINT_H
#define FLEXINT_H

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

34
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
35
36
37
38
39
40

/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
 * if you want the limit (max/min) macros for int types. 
 */
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
Uwe Schulzweida's avatar
Uwe Schulzweida committed
41
42
#endif

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

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

87
88
#endif /* ! C99 */

89
#endif /* ! FLEXINT_H */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
90

91
/* TODO: this is always defined, so inline it */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
92
#define yyconst const
93
94
95

#if defined(__GNUC__) && __GNUC__ >= 3
#define yynoreturn __attribute__((__noreturn__))
Uwe Schulzweida's avatar
Uwe Schulzweida committed
96
#else
97
#define yynoreturn
Uwe Schulzweida's avatar
Uwe Schulzweida committed
98
99
100
101
102
103
104
105
106
107
108
109
#endif

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

/* Promotes a possibly negative, possibly signed char to an unsigned
 * integer for use as an array index.  If the signed char is negative,
 * we want to instead treat it as an 8-bit unsigned char, hence the
 * double cast.
 */
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)

110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
#define YY_TYPEDEF_YY_SCANNER_T
typedef void* yyscan_t;
#endif

/* For convenience, these vars (plus the bison vars far below)
   are macros in the reentrant scanner. */
#define yyin yyg->yyin_r
#define yyout yyg->yyout_r
#define yyextra yyg->yyextra_r
#define yyleng yyg->yyleng_r
#define yytext yyg->yytext_r
#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
#define yy_flex_debug yyg->yy_flex_debug_r

Uwe Schulzweida's avatar
Uwe Schulzweida committed
127
128
129
130
/* Enter a start condition.  This macro really ought to take a parameter,
 * but we do it the disgusting crufty way forced on us by the ()-less
 * definition of BEGIN.
 */
131
#define BEGIN yyg->yy_start = 1 + 2 *
Uwe Schulzweida's avatar
Uwe Schulzweida committed
132
133
134
135
136

/* Translate the current start state into a value that can be later handed
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
 * compatibility.
 */
137
#define YY_START ((yyg->yy_start - 1) / 2)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
138
139
140
141
142
143
#define YYSTATE YY_START

/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)

/* Special action meaning "start processing a new file". */
144
#define YY_NEW_FILE yyrestart(yyin ,yyscanner )
Uwe Schulzweida's avatar
Uwe Schulzweida committed
145
146
147
148

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
149
#ifndef YY_BUF_SIZE
Uwe Schulzweida's avatar
Uwe Schulzweida committed
150
151
152
153
154
155
156
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
 * Ditto for the __ia64__ case accordingly.
 */
#define YY_BUF_SIZE 32768
#else
Uwe Schulzweida's avatar
Uwe Schulzweida committed
157
#define YY_BUF_SIZE 16384
Uwe Schulzweida's avatar
Uwe Schulzweida committed
158
#endif /* __ia64__ */
159
#endif
Uwe Schulzweida's avatar
Uwe Schulzweida committed
160

161
162
163
164
165
166
/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
Uwe Schulzweida's avatar
Uwe Schulzweida committed
167
typedef struct yy_buffer_state *YY_BUFFER_STATE;
168
#endif
Uwe Schulzweida's avatar
Uwe Schulzweida committed
169

170
171
172
173
174
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif

Uwe Schulzweida's avatar
Uwe Schulzweida committed
175
176
177
178
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2

179
    #define YY_LESS_LINENO(n)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
180
    #define YY_LINENO_REWIND_TO(ptr)
181
182
    
/* Return all but the first "n" matched characters back to the input stream. */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
183
184
185
186
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
187
188
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
189
		*yy_cp = yyg->yy_hold_char; \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
190
		YY_RESTORE_YY_MORE_OFFSET \
191
		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
192
193
194
195
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
		} \
	while ( 0 )

196
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
Uwe Schulzweida's avatar
Uwe Schulzweida committed
197

198
199
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
Uwe Schulzweida's avatar
Uwe Schulzweida committed
200
201
202
203
204
205
206
207
208
209
struct yy_buffer_state
	{
	FILE *yy_input_file;

	char *yy_ch_buf;		/* input buffer */
	char *yy_buf_pos;		/* current position in input buffer */

	/* Size of input buffer in bytes, not including room for EOB
	 * characters.
	 */
210
	int yy_buf_size;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
211
212
213
214

	/* Number of characters read into yy_ch_buf, not including EOB
	 * characters.
	 */
215
	int yy_n_chars;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235

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

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

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

236
237
238
    int yy_bs_lineno; /**< The line count. */
    int yy_bs_column; /**< The column count. */
    
Uwe Schulzweida's avatar
Uwe Schulzweida committed
239
240
241
242
243
244
	/* Whether to try to fill the input buffer when we reach the
	 * end of it.
	 */
	int yy_fill_buffer;

	int yy_buffer_status;
245

Uwe Schulzweida's avatar
Uwe Schulzweida committed
246
247
248
249
250
251
252
253
254
255
256
257
258
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
	/* When an EOF's been seen but there's still some text to process
	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
	 * shouldn't try reading from the input source any more.  We might
	 * still have a bunch of tokens to match, though, because of
	 * possible backing-up.
	 *
	 * When we actually see the EOF, we change the status to "new"
	 * (via yyrestart()), so that the user can continue scanning by
	 * just pointing yyin at a new input file.
	 */
#define YY_BUFFER_EOF_PENDING 2
259

Uwe Schulzweida's avatar
Uwe Schulzweida committed
260
	};
261
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
262
263
264
265

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
266
267
 *
 * Returns the top of the stack, or NULL.
Uwe Schulzweida's avatar
Uwe Schulzweida committed
268
 */
269
270
#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
                          ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
271
                          : NULL)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
272

273
274
275
/* Same as previous macro, but useful when we know that the buffer stack is not
 * NULL or when we need an lvalue. For internal use only.
 */
276
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
Uwe Schulzweida's avatar
Uwe Schulzweida committed
277

278
279
280
281
282
283
284
void yyrestart (FILE *input_file ,yyscan_t yyscanner );
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
void yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
void yypop_buffer_state (yyscan_t yyscanner );
Uwe Schulzweida's avatar
Uwe Schulzweida committed
285

286
287
288
static void yyensure_buffer_stack (yyscan_t yyscanner );
static void yy_load_buffer_state (yyscan_t yyscanner );
static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
Uwe Schulzweida's avatar
Uwe Schulzweida committed
289

290
#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
291

292
293
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
294
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
Uwe Schulzweida's avatar
Uwe Schulzweida committed
295

296
297
298
void *yyalloc (yy_size_t ,yyscan_t yyscanner );
void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
void yyfree (void * ,yyscan_t yyscanner );
Uwe Schulzweida's avatar
Uwe Schulzweida committed
299
300
301
302
303

#define yy_new_buffer yy_create_buffer

#define yy_set_interactive(is_interactive) \
	{ \
304
	if ( ! YY_CURRENT_BUFFER ){ \
305
        yyensure_buffer_stack (yyscanner); \
306
		YY_CURRENT_BUFFER_LVALUE =    \
307
            yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
308
309
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
310
311
312
313
	}

#define yy_set_bol(at_bol) \
	{ \
314
	if ( ! YY_CURRENT_BUFFER ){\
315
        yyensure_buffer_stack (yyscanner); \
316
		YY_CURRENT_BUFFER_LVALUE =    \
317
            yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
318
319
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
320
321
	}

322
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
323

324
/* Begin user sect3 */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
325

Uwe Schulzweida's avatar
Uwe Schulzweida committed
326
#define yywrap(yyscanner) (/*CONSTCOND*/1)
327
#define YY_SKIP_YYWRAP
328

329
typedef unsigned char YY_CHAR;
330

Uwe Schulzweida's avatar
Uwe Schulzweida committed
331
typedef int yy_state_type;
332

333
#define yytext_ptr yytext_r
Uwe Schulzweida's avatar
Uwe Schulzweida committed
334

335
336
337
static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);
static int yy_get_next_buffer (yyscan_t yyscanner );
338
static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner );
Uwe Schulzweida's avatar
Uwe Schulzweida committed
339
340
341
342
343

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up yytext.
 */
#define YY_DO_BEFORE_ACTION \
344
	yyg->yytext_ptr = yy_bp; \
345
	yyleng = (int) (yy_cp - yy_bp); \
346
	yyg->yy_hold_char = *yy_cp; \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
347
	*yy_cp = '\0'; \
348
	yyg->yy_c_buf_p = yy_cp;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
349

350
351
#define YY_NUM_RULES 25
#define YY_END_OF_BUFFER 26
352
353
354
355
356
357
358
/* This struct is not used in this scanner,
   but its presence is necessary. */
struct yy_trans_info
	{
	flex_int32_t yy_verify;
	flex_int32_t yy_nxt;
	};
359
static yyconst flex_int16_t yy_acclist[164] =
Uwe Schulzweida's avatar
Uwe Schulzweida committed
360
    {   0,
361
362
363
364
365
366
367
368
369
370
371
        4,    4,   26,   24,   25,   23,   24,   25,   23,   25,
       24,   25,    1,   24,   25,   24,   25,   11,   24,   25,
        4,   11,   24,   25,    4,   24,   25,   22,   24,   25,
       16,   24,   25,   11,   24,   25,   15,   24,   25,   21,
       24,   25,    9,   10,   24,   25,16391,    4,    9,   10,
       24,   25,16391,    9,   10,   24,   25,16391,    9,   10,
       24,   25,16391,    9,   10,   24,   25,16391,    9,   10,
       24,   25,16391,   24,   25,   23,   18,    1,   19,    4,
        4,    4,    4,   10,    4,   10,   10,   14,   17,   13,
     8199,    8,    9,   10,16391,    9,   10,16391,    4,    9,

372
       10,16391,    9,   10,16391,    9,   10,16391,    9,   10,
373
374
375
376
377
378
    16391,   20,    4,   10,   10,    4,   10,   12,    8,    4,
        4,    9,   10,16391,    3,    9,   10,16391,    9,   10,
    16391,    9,   10,16391,    9,   10,16391,    4,   10,    4,
        2,    9,   10,16391,    9,   10,16391,    9,   10,16391,
        9,   10,16391,    9,   10,16391,    6, 8199,    9,   10,
    16391,    5, 8199
Uwe Schulzweida's avatar
Uwe Schulzweida committed
379
380
    } ;

381
static yyconst flex_int16_t yy_accept[76] =
Uwe Schulzweida's avatar
Uwe Schulzweida committed
382
    {   0,
383
        1,    2,    3,    4,    6,    9,   11,   13,   16,   18,
384
385
386
387
388
389
390
       21,   25,   28,   31,   34,   37,   40,   43,   48,   54,
       59,   64,   69,   74,   76,   77,   78,   79,   80,   81,
       82,   82,   83,   84,   85,   87,   88,   89,   90,   91,
       91,   92,   93,   96,   99,   99,  103,  106,  109,  112,
      113,  113,  114,  115,  116,  118,  119,  120,  121,  125,
      129,  132,  135,  138,  140,  141,  145,  148,  151,  154,
      157,  159,  162,  164,  164
Uwe Schulzweida's avatar
Uwe Schulzweida committed
391
392
    } ;

Uwe Schulzweida's avatar
Uwe Schulzweida committed
393
static yyconst YY_CHAR yy_ec[256] =
Uwe Schulzweida's avatar
Uwe Schulzweida committed
394
395
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
396
        1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
397
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
398
        1,    4,    5,    1,    6,    1,    1,    7,    1,    8,
399
        9,    9,   10,    9,   10,   11,    9,   12,   12,   12,
400
401
402
403
404
405
406
407
408
       12,   12,   12,   12,   12,   12,   12,   13,    9,   14,
       15,   16,   17,    1,   18,   18,   18,   19,   20,   18,
       18,   18,   21,   18,   18,   19,   22,   18,   18,   23,
       18,   18,   18,   18,   18,   18,   18,   18,   18,   18,
        1,    1,    1,    9,   24,    1,   18,   18,   18,   19,

       25,   18,   18,   18,   26,   18,   18,   19,   27,   28,
       29,   30,   18,   31,   18,   32,   18,   33,   18,   18,
       18,   18,    9,   34,    9,    1,    1,    1,    1,    1,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,

        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1
    } ;

425
static yyconst YY_CHAR yy_meta[35] =
Uwe Schulzweida's avatar
Uwe Schulzweida committed
426
    {   0,
427
        1,    1,    2,    3,    1,    1,    1,    3,    1,    1,
428
        4,    5,    1,    1,    1,    1,    1,    6,    6,    6,
429
        6,    6,    6,    6,    6,    6,    6,    6,    6,    6,
430
        6,    6,    6,    1
Uwe Schulzweida's avatar
Uwe Schulzweida committed
431
432
    } ;

433
static yyconst flex_uint16_t yy_base[80] =
Uwe Schulzweida's avatar
Uwe Schulzweida committed
434
    {   0,
435
436
437
438
439
440
441
442
        0,    0,  134,  135,   33,   36,  118,    0,  125,  135,
       29,   31,  135,  116,  115,  114,  135,   49,   51,   34,
      104,   96,  101,   91,   62,  135,    0,  135,   55,  135,
       35,   57,   59,  112,  111,   71,  106,  135,  135,   64,
      135,    0,    0,    0,  109,   73,   66,   94,   92,  135,
      106,   75,  105,  104,   76,  135,    0,   78,    0,    0,
       94,   86,   84,   87,  135,    0,   64,   60,   83,   48,
      135,   50,  135,  135,   97,  100,  104,  106,   46
Uwe Schulzweida's avatar
Uwe Schulzweida committed
443
444
    } ;

445
static yyconst flex_int16_t yy_def[80] =
Uwe Schulzweida's avatar
Uwe Schulzweida committed
446
    {   0,
447
448
449
450
451
452
453
454
       74,    1,   74,   74,   74,   74,   74,   75,   74,   74,
       74,   76,   74,   74,   74,   74,   74,   77,   77,   19,
       19,   19,   19,   74,   74,   74,   75,   74,   74,   74,
       74,   74,   76,   78,   78,   78,   74,   74,   74,   74,
       74,   79,   19,   19,   74,   19,   19,   19,   19,   74,
       74,   74,   78,   78,   78,   74,   79,   74,   19,   19,
       19,   19,   19,   78,   74,   19,   19,   19,   19,   19,
       74,   19,   74,    0,   74,   74,   74,   74,   74
Uwe Schulzweida's avatar
Uwe Schulzweida committed
455
456
    } ;

457
static yyconst flex_uint16_t yy_nxt[170] =
Uwe Schulzweida's avatar
Uwe Schulzweida committed
458
    {   0,
459
        4,    5,    6,    5,    7,    8,    9,   10,   10,   10,
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
       11,   12,   13,   14,   15,   16,   17,   18,   19,   20,
       18,   21,   18,   18,   20,   18,   18,   18,   18,   22,
       23,   18,   18,   24,   25,   25,   25,   25,   25,   25,
       29,   32,   33,   45,   51,   46,   52,   30,   31,   35,
       36,   57,   40,   31,   40,   36,   41,   73,   41,   42,
       43,   42,   43,   25,   25,   25,   29,   40,   29,   32,
       33,   41,   72,   30,   31,   30,   31,   35,   36,   31,
       45,   31,   55,   36,   46,   60,   52,   55,   61,   58,
       71,   59,   70,   30,   64,   69,   65,   27,   53,   27,

       27,   27,   27,   34,   34,   34,   44,   44,   44,   44,
       54,   54,   68,   67,   66,   53,   53,   52,   63,   62,
       58,   56,   53,   53,   50,   49,   48,   47,   39,   38,
       37,   28,   26,   74,    3,   74,   74,   74,   74,   74,
       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
       74,   74,   74,   74,   74,   74,   74,   74,   74
Uwe Schulzweida's avatar
Uwe Schulzweida committed
477
478
    } ;

479
static yyconst flex_int16_t yy_chk[170] =
Uwe Schulzweida's avatar
Uwe Schulzweida committed
480
481
482
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Uwe Schulzweida's avatar
Uwe Schulzweida committed
483
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
        1,    1,    1,    1,    5,    5,    5,    6,    6,    6,
       11,   12,   12,   20,   31,   20,   31,   11,   11,   12,
       12,   79,   18,   11,   19,   12,   18,   72,   19,   18,
       18,   19,   19,   25,   25,   25,   29,   40,   32,   33,
       33,   40,   70,   29,   29,   32,   32,   33,   33,   29,
       36,   32,   36,   33,   46,   47,   52,   55,   47,   58,
       69,   46,   68,   52,   55,   67,   58,   75,   64,   75,

       75,   75,   75,   76,   76,   76,   77,   77,   77,   77,
       78,   78,   63,   62,   61,   54,   53,   51,   49,   48,
       45,   37,   35,   34,   24,   23,   22,   21,   16,   15,
       14,    9,    7,    3,   74,   74,   74,   74,   74,   74,
       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
       74,   74,   74,   74,   74,   74,   74,   74,   74
Uwe Schulzweida's avatar
Uwe Schulzweida committed
499
500
501
502
503
504
    } ;

#define YY_TRAILING_MASK 0x2000
#define YY_TRAILING_HEAD_MASK 0x4000
#define REJECT \
{ \
505
506
*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ \
yy_cp = yyg->yy_full_match; /* restore poss. backed-over text */ \
507
508
yyg->yy_lp = yyg->yy_full_lp; /* restore orig. accepting pos. */ \
yyg->yy_state_ptr = yyg->yy_full_state; /* restore orig. state */ \
509
510
yy_current_state = *yyg->yy_state_ptr; /* restore curr. state */ \
++yyg->yy_lp; \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
511
512
goto find_rule; \
}
513

Uwe Schulzweida's avatar
Uwe Schulzweida committed
514
515
516
517
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
#line 1 "expr_lex.l"
518
/* flex -oexpr_lex.c expr_lex.l */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
519
#line 3 "expr_lex.l"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
520
521
#include <string.h>
#include <stdlib.h>
522
#include <math.h>
Uwe Schulzweida's avatar
Uwe Schulzweida committed
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541

#ifndef M_E
#define M_E		2.7182818284590452354	/* e */
#endif

#ifndef M_PI
#define M_PI		3.14159265358979323846	/* pi */
#endif

#include "expr.h"
#include "expr_yacc.h"

/* Definitions:  LMB92 p. 153
   Definitions are named regular expressions, e.g., DGT [0-9]
   Definitions enclosed in braces in rules section, e.g. {DGT}, are interpreted literally
   DGT [0-9] Digit
   LPH [A-Za-z_] Alphabetic character
   LPHDGT [A-Za-z0-9_] Alphanumeric character
   XPN [eE][+-]?[0-9]+ Real number Exponent */
542
#line 543 "expr_lex.cc"
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557

#define INITIAL 0

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

#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif

558
559
560
561
562
563
564
565
566
567
568
569
570
/* Holds the entire state of the reentrant scanner. */
struct yyguts_t
    {

    /* User-defined. Not touched by flex. */
    YY_EXTRA_TYPE yyextra_r;

    /* The rest are the same as the globals declared in the non-reentrant scanner. */
    FILE *yyin_r, *yyout_r;
    size_t yy_buffer_stack_top; /**< index of top of stack. */
    size_t yy_buffer_stack_max; /**< capacity of stack. */
    YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
    char yy_hold_char;
571
572
    int yy_n_chars;
    int yyleng_r;
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
    char *yy_c_buf_p;
    int yy_init;
    int yy_start;
    int yy_did_buffer_switch_on_eof;
    int yy_start_stack_ptr;
    int yy_start_stack_depth;
    int *yy_start_stack;
    yy_state_type yy_last_accepting_state;
    char* yy_last_accepting_cpos;

    int yylineno_r;
    int yy_flex_debug_r;

    yy_state_type *yy_state_buf;
    yy_state_type *yy_state_ptr;
    char *yy_full_match;
    int yy_lp;

591
592
593
594
595
596
    /* These are only needed for trailing context rules,
     * but there's no conditional variable for that yet. */
    int yy_looking_for_trail_begin;
    int yy_full_lp;
    int *yy_full_state;

597
598
599
600
601
602
603
604
605
606
607
608
609
610
    char *yytext_r;
    int yy_more_flag;
    int yy_more_len;

    YYSTYPE * yylval_r;

    }; /* end struct yyguts_t */

static int yy_init_globals (yyscan_t yyscanner );

    /* This must go here because YYSTYPE and YYLTYPE are included
     * from bison output in section 1.*/
    #    define yylval yyg->yylval_r
    
611
612
613
614
int yylex_init (yyscan_t* scanner);

int yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);

615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
/* Accessor methods to globals.
   These are made visible to non-reentrant scanners for convenience. */

int yylex_destroy (yyscan_t yyscanner );

int yyget_debug (yyscan_t yyscanner );

void yyset_debug (int debug_flag ,yyscan_t yyscanner );

YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner );

void yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );

FILE *yyget_in (yyscan_t yyscanner );

Uwe Schulzweida's avatar
Uwe Schulzweida committed
630
void yyset_in  (FILE * _in_str ,yyscan_t yyscanner );
631
632
633

FILE *yyget_out (yyscan_t yyscanner );

Uwe Schulzweida's avatar
Uwe Schulzweida committed
634
void yyset_out  (FILE * _out_str ,yyscan_t yyscanner );
635

636
			int yyget_leng (yyscan_t yyscanner );
637
638
639
640
641

char *yyget_text (yyscan_t yyscanner );

int yyget_lineno (yyscan_t yyscanner );

Uwe Schulzweida's avatar
Uwe Schulzweida committed
642
void yyset_lineno (int _line_number ,yyscan_t yyscanner );
643

644
645
int yyget_column  (yyscan_t yyscanner );

Uwe Schulzweida's avatar
Uwe Schulzweida committed
646
void yyset_column (int _column_no ,yyscan_t yyscanner );
647

648
649
650
YYSTYPE * yyget_lval (yyscan_t yyscanner );

void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
Uwe Schulzweida's avatar
Uwe Schulzweida committed
651
652
653
654
655
656
657

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

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
658
extern "C" int yywrap (yyscan_t yyscanner );
Uwe Schulzweida's avatar
Uwe Schulzweida committed
659
#else
660
extern int yywrap (yyscan_t yyscanner );
Uwe Schulzweida's avatar
Uwe Schulzweida committed
661
662
663
#endif
#endif

Uwe Schulzweida's avatar
Uwe Schulzweida committed
664
665
666
667
#ifndef YY_NO_UNPUT
    
#endif

Uwe Schulzweida's avatar
Uwe Schulzweida committed
668
#ifndef yytext_ptr
669
static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
670
671
672
#endif

#ifdef YY_NEED_STRLEN
673
static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
674
675
676
#endif

#ifndef YY_NO_INPUT
677

Uwe Schulzweida's avatar
Uwe Schulzweida committed
678
#ifdef __cplusplus
679
static int yyinput (yyscan_t yyscanner );
Uwe Schulzweida's avatar
Uwe Schulzweida committed
680
#else
681
static int input (yyscan_t yyscanner );
Uwe Schulzweida's avatar
Uwe Schulzweida committed
682
683
684
685
686
687
#endif

#endif

/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
Uwe Schulzweida's avatar
Uwe Schulzweida committed
688
689
690
691
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
Uwe Schulzweida's avatar
Uwe Schulzweida committed
692
#define YY_READ_BUF_SIZE 8192
Uwe Schulzweida's avatar
Uwe Schulzweida committed
693
#endif /* __ia64__ */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
694
695
696
697
698
699
700
#endif

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
701
#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
702
703
704
705
706
707
708
#endif

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
709
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
710
		{ \
711
		int c = '*'; \
712
		size_t n; \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
713
714
715
716
717
718
719
720
721
		for ( n = 0; n < max_size && \
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( yyin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
722
723
724
	else \
		{ \
		errno=0; \
725
		while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
726
727
728
729
730
731
732
733
734
735
736
737
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
			clearerr(yyin); \
			} \
		}\
\

Uwe Schulzweida's avatar
Uwe Schulzweida committed
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
#endif

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

/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif

/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
755
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
756
757
#endif

758
759
/* end tables serialization structures and prototypes */

Uwe Schulzweida's avatar
Uwe Schulzweida committed
760
761
762
763
/* Default declaration of generated scanner - a define so the user can
 * easily add parameters.
 */
#ifndef YY_DECL
764
765
#define YY_DECL_IS_OURS 1

766
767
extern int yylex \
               (YYSTYPE * yylval_param ,yyscan_t yyscanner);
768

769
770
#define YY_DECL int yylex \
               (YYSTYPE * yylval_param , yyscan_t yyscanner)
771
#endif /* !YY_DECL */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
772
773
774
775
776
777
778
779
780
781

/* Code executed at the beginning of each rule, after yytext and yyleng
 * have been set up.
 */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

/* Code executed at the end of each rule. */
#ifndef YY_BREAK
Uwe Schulzweida's avatar
Uwe Schulzweida committed
782
#define YY_BREAK /*LINTED*/break;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
783
784
785
786
787
#endif

#define YY_RULE_SETUP \
	YY_USER_ACTION

788
789
/** The main scanner function which does all the work.
 */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
790
YY_DECL
791
{
Uwe Schulzweida's avatar
Uwe Schulzweida committed
792
793
794
	yy_state_type yy_current_state;
	char *yy_cp, *yy_bp;
	int yy_act;
795
796
797
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yylval = yylval_param;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
798

799
	if ( !yyg->yy_init )
Uwe Schulzweida's avatar
Uwe Schulzweida committed
800
		{
801
		yyg->yy_init = 1;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
802
803
804
805
806

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

807
        /* Create the reject buffer large enough to save one state per allowed character. */
808
809
        if ( ! yyg->yy_state_buf )
            yyg->yy_state_buf = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE  ,yyscanner);
810
811
            if ( ! yyg->yy_state_buf )
                YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
812

813
814
		if ( ! yyg->yy_start )
			yyg->yy_start = 1;	/* first start state */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
815
816
817
818
819
820
821

		if ( ! yyin )
			yyin = stdin;

		if ( ! yyout )
			yyout = stdout;

822
		if ( ! YY_CURRENT_BUFFER ) {
823
			yyensure_buffer_stack (yyscanner);
824
			YY_CURRENT_BUFFER_LVALUE =
825
				yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
826
		}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
827

828
		yy_load_buffer_state(yyscanner );
Uwe Schulzweida's avatar
Uwe Schulzweida committed
829
830
		}

Uwe Schulzweida's avatar
Uwe Schulzweida committed
831
832
833
834
	{
#line 36 "expr_lex.l"


835
#line 836 "expr_lex.cc"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
836
837

	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
838
		{
839
		yy_cp = yyg->yy_c_buf_p;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
840
841

		/* Support of yytext. */
842
		*yy_cp = yyg->yy_hold_char;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
843
844
845
846
847
848

		/* yy_bp points to the position in yy_ch_buf of the start of
		 * the current run.
		 */
		yy_bp = yy_cp;

849
		yy_current_state = yyg->yy_start;
850

851
852
		yyg->yy_state_ptr = yyg->yy_state_buf;
		*yyg->yy_state_ptr++ = yy_current_state;
853

Uwe Schulzweida's avatar
Uwe Schulzweida committed
854
855
856
yy_match:
		do
			{
Uwe Schulzweida's avatar
Uwe Schulzweida committed
857
			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
858
859
860
			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
				{
				yy_current_state = (int) yy_def[yy_current_state];
861
				if ( yy_current_state >= 75 )
Uwe Schulzweida's avatar
Uwe Schulzweida committed
862
863
					yy_c = yy_meta[(unsigned int) yy_c];
				}
864
			yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
865
			*yyg->yy_state_ptr++ = yy_current_state;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
866
867
			++yy_cp;
			}
868
		while ( yy_base[yy_current_state] != 135 );
Uwe Schulzweida's avatar
Uwe Schulzweida committed
869
870

yy_find_action:
871
872
		yy_current_state = *--yyg->yy_state_ptr;
		yyg->yy_lp = yy_accept[yy_current_state];
Uwe Schulzweida's avatar
Uwe Schulzweida committed
873
874
875
find_rule: /* we branch to this label when backing up */
		for ( ; ; ) /* until we find what rule we matched */
			{
876
			if ( yyg->yy_lp && yyg->yy_lp < yy_accept[yy_current_state + 1] )
Uwe Schulzweida's avatar
Uwe Schulzweida committed
877
				{
878
				yy_act = yy_acclist[yyg->yy_lp];
Uwe Schulzweida's avatar
Uwe Schulzweida committed
879
				if ( yy_act & YY_TRAILING_HEAD_MASK ||
880
				     yyg->yy_looking_for_trail_begin )
Uwe Schulzweida's avatar
Uwe Schulzweida committed
881
					{
882
					if ( yy_act == yyg->yy_looking_for_trail_begin )
Uwe Schulzweida's avatar
Uwe Schulzweida committed
883
						{
884
						yyg->yy_looking_for_trail_begin = 0;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
885
886
887
888
889
890
						yy_act &= ~YY_TRAILING_HEAD_MASK;
						break;
						}
					}
				else if ( yy_act & YY_TRAILING_MASK )
					{
891
892
					yyg->yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
					yyg->yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
893
894
895
					}
				else
					{
896
					yyg->yy_full_match = yy_cp;
897
898
					yyg->yy_full_state = yyg->yy_state_ptr;
					yyg->yy_full_lp = yyg->yy_lp;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
899
900
					break;
					}
901
				++yyg->yy_lp;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
902
903
904
				goto find_rule;
				}
			--yy_cp;
905
906
			yy_current_state = *--yyg->yy_state_ptr;
			yyg->yy_lp = yy_accept[yy_current_state];
Uwe Schulzweida's avatar
Uwe Schulzweida committed
907
908
909
910
911
912
913
914
915
916
			}

		YY_DO_BEFORE_ACTION;

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

		switch ( yy_act )
	{ /* beginning of action switch */
case 1:
YY_RULE_SETUP
Uwe Schulzweida's avatar
Uwe Schulzweida committed
917
#line 38 "expr_lex.l"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
918
919
920
921
; /* ignore comments */
	YY_BREAK
case 2:
YY_RULE_SETUP
Uwe Schulzweida's avatar
Uwe Schulzweida committed
922
#line 40 "expr_lex.l"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
923
924
925
926
927
928
929
{
                yylval->cvalue = M_PI;
                return CONSTANT;
             }
	YY_BREAK
case 3:
YY_RULE_SETUP
Uwe Schulzweida's avatar
Uwe Schulzweida committed
930
#line 45 "expr_lex.l"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
931
932
933
934
935
936
937
{
                yylval->cvalue = M_E;
                return CONSTANT;
             }
	YY_BREAK
case 4:
YY_RULE_SETUP
Uwe Schulzweida's avatar
Uwe Schulzweida committed
938
#line 50 "expr_lex.l"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
939
940
941
942
943
944
945
946
947
948
949
{
               /* constant */
               /* NB: Tempted to prepend lexer expressions for floats and doubles with [+-]? 
                so that unary plus/minus is handled in lexer rather than parser.
                However, this has unintended side effects so let parser handle it for now */
                yylval->cvalue = strtod(yytext, (char **)NULL);
                return CONSTANT;
             } /* end constant */
	YY_BREAK
case 5:
YY_RULE_SETUP
950
951
952
953
954
955
#line 59 "expr_lex.l"
{ return REMOVE; }
	YY_BREAK
case 6:
YY_RULE_SETUP
#line 61 "expr_lex.l"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
956
957
958
959
960
{ return PRINT; }
	YY_BREAK
case 7:
YY_RULE_SETUP
#line 63 "expr_lex.l"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
961
{
Uwe Schulzweida's avatar
Uwe Schulzweida committed
962
                yylval->fname = strdup(yytext);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
963
964
965
                return FUNCTION;
             } /* end functions */
	YY_BREAK
Uwe Schulzweida's avatar
Uwe Schulzweida committed
966
case 8:
Uwe Schulzweida's avatar
Uwe Schulzweida committed
967
YY_RULE_SETUP
Uwe Schulzweida's avatar
Uwe Schulzweida committed
968
#line 68 "expr_lex.l"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
969
{
970
                /* Recognize coordinates, e.g., var_nm.x (lon of var_nm) */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
971
                yylval->varnm = strdup(yytext);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
972
973
974
                return VARIABLE;
             }
	YY_BREAK
Uwe Schulzweida's avatar
Uwe Schulzweida committed
975
case 9:
Uwe Schulzweida's avatar
Uwe Schulzweida committed
976
YY_RULE_SETUP
Uwe Schulzweida's avatar
Uwe Schulzweida committed
977
#line 74 "expr_lex.l"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
978
{
979
980
                yylval->varnm = strdup(yytext);
                return VARIABLE;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
981
982
             }
	YY_BREAK
Uwe Schulzweida's avatar
Uwe Schulzweida committed
983
case 10:
Uwe Schulzweida's avatar
Uwe Schulzweida committed
984
YY_RULE_SETUP
985
#line 79 "expr_lex.l"
986
{
987
988
                yylval->varnm = strdup(yytext);
                return VARIABLE;
989
             }
Uwe Schulzweida's avatar
Uwe Schulzweida committed
990
991
992
	YY_BREAK
case 11:
YY_RULE_SETUP
993
994
995
996
#line 85 "expr_lex.l"
{
                return *yytext;
             }
Uwe Schulzweida's avatar
Uwe Schulzweida committed
997
998
999
	YY_BREAK
case 12:
YY_RULE_SETUP
1000
1001
#line 89 "expr_lex.l"
return LEG;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1002
1003
1004
	YY_BREAK
case 13:
YY_RULE_SETUP
1005
1006
#line 90 "expr_lex.l"
return GE;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1007
1008
1009
	YY_BREAK
case 14:
YY_RULE_SETUP
1010
1011
#line 91 "expr_lex.l"
return LE;
1012
1013
1014
	YY_BREAK
case 15:
YY_RULE_SETUP
1015
1016
#line 92 "expr_lex.l"
return GT;
1017
1018
1019
	YY_BREAK
case 16:
YY_RULE_SETUP
1020
1021
#line 93 "expr_lex.l"
return LT;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1022
1023
1024
	YY_BREAK
case 17:
YY_RULE_SETUP
1025
1026
#line 94 "expr_lex.l"
return EQ;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1027
1028
1029
	YY_BREAK
case 18:
YY_RULE_SETUP
1030
1031
#line 95 "expr_lex.l"
return NE;
1032
	YY_BREAK
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1033
case 19:
1034
YY_RULE_SETUP
1035
1036
#line 96 "expr_lex.l"
return AND;
1037
1038
1039
	YY_BREAK
case 20:
YY_RULE_SETUP
1040
1041
#line 97 "expr_lex.l"
return OR;
1042
1043
1044
	YY_BREAK
case 21:
YY_RULE_SETUP
1045
1046
#line 98 "expr_lex.l"
return QUESTION;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1047
1048
1049
	YY_BREAK
case 22:
YY_RULE_SETUP
1050
1051
1052
1053
1054
1055
#line 99 "expr_lex.l"
return COLON;
	YY_BREAK
case 23:
/* rule 23 can match eol */
YY_RULE_SETUP
1056
#line 101 "expr_lex.l"
1057
1058
1059
1060
1061
;       /* ignore whitespace */
	YY_BREAK
case 24:
YY_RULE_SETUP
#line 103 "expr_lex.l"
1062
1063
yyerror(NULL, NULL, "Unknown character");
	YY_BREAK
1064
case 25:
1065
YY_RULE_SETUP
1066
#line 104 "expr_lex.l"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1067
1068
ECHO;
	YY_BREAK
1069
#line 1070 "expr_lex.cc"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1070
1071
1072
1073
1074
1075
			case YY_STATE_EOF(INITIAL):
				yyterminate();

	case YY_END_OF_BUFFER:
		{
		/* Amount of text matched not including the EOB char. */
1076
		int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1077
1078

		/* Undo the effects of YY_DO_BEFORE_ACTION. */
1079
		*yy_cp = yyg->yy_hold_char;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1080
1081
		YY_RESTORE_YY_MORE_OFFSET

1082
		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1083
1084
1085
1086
1087
			{
			/* We're scanning a new file or input source.  It's
			 * possible that this happened because the user
			 * just pointed yyin at a new source and called
			 * yylex().  If so, then we have to assure
1088
			 * consistency between YY_CURRENT_BUFFER and our
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1089
1090
1091
1092
			 * globals.  Here is the right place to do so, because
			 * this is the first action (other than possibly a
			 * back-up) that will match for the new input source.
			 */
1093
			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1094
1095
			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1096
1097
1098
1099
1100
1101
1102
1103
1104
			}

		/* Note that here we test for yy_c_buf_p "<=" to the position
		 * of the first EOB in the buffer, since yy_c_buf_p will
		 * already have been incremented past the NUL character
		 * (since all states make transitions on EOB to the
		 * end-of-buffer state).  Contrast this with the test
		 * in input().
		 */
1105
		if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1106
1107
1108
			{ /* This was really a NUL. */
			yy_state_type yy_next_state;

1109
			yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1110

1111
			yy_current_state = yy_get_previous_state( yyscanner );
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121

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

1122
			yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1123

1124
			yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1125
1126
1127
1128

			if ( yy_next_state )
				{
				/* Consume the NUL. */
1129
				yy_cp = ++yyg->yy_c_buf_p;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1130
1131
1132
1133
1134
1135
				yy_current_state = yy_next_state;
				goto yy_match;
				}

			else
				{
1136
				yy_cp = yyg->yy_c_buf_p;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1137
1138
1139
1140
				goto yy_find_action;
				}
			}

1141
		else switch ( yy_get_next_buffer( yyscanner ) )
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1142
1143
1144
			{
			case EOB_ACT_END_OF_FILE:
				{
1145
				yyg->yy_did_buffer_switch_on_eof = 0;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1146

1147
				if ( yywrap(yyscanner ) )
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
					{
					/* Note: because we've taken care in
					 * yy_get_next_buffer() to have set up
					 * yytext, we can now set up
					 * yy_c_buf_p so that if some total
					 * hoser (like flex itself) wants to
					 * call the scanner after we return the
					 * YY_NULL, it'll still work - another
					 * YY_NULL will get returned.
					 */
1158
					yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1159
1160
1161
1162
1163
1164
1165

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

				else
					{
1166
					if ( ! yyg->yy_did_buffer_switch_on_eof )
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1167
1168
1169
1170
1171
1172
						YY_NEW_FILE;
					}
				break;
				}

			case EOB_ACT_CONTINUE_SCAN:
1173
1174
				yyg->yy_c_buf_p =
					yyg->yytext_ptr + yy_amount_of_matched_text;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1175

1176
				yy_current_state = yy_get_previous_state( yyscanner );
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1177

1178
1179
				yy_cp = yyg->yy_c_buf_p;
				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1180
1181
1182
				goto yy_match;

			case EOB_ACT_LAST_MATCH:
1183
1184
				yyg->yy_c_buf_p =
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1185

1186
				yy_current_state = yy_get_previous_state( yyscanner );
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1187

1188
1189
				yy_cp = yyg->yy_c_buf_p;
				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
				goto yy_find_action;
			}
		break;
		}

	default:
		YY_FATAL_ERROR(
			"fatal flex scanner internal error--no action found" );
	} /* end of action switch */
		} /* end of scanning one token */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1200
	} /* end of user's declarations */
1201
} /* end of yylex */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1202
1203
1204
1205
1206
1207
1208
1209

/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */