1 #define yy_create_buffer dml_create_buffer
2 #define yy_delete_buffer dml_delete_buffer
3 #define yy_scan_buffer dml_scan_buffer
4 #define yy_scan_string dml_scan_string
5 #define yy_scan_bytes dml_scan_bytes
6 #define yy_flex_debug dml_flex_debug
7 #define yy_init_buffer dml_init_buffer
8 #define yy_flush_buffer dml_flush_buffer
9 #define yy_load_buffer_state dml_load_buffer_state
10 #define yy_switch_to_buffer dml_switch_to_buffer
11 #define yyin dmlin
12 #define yyleng dmlleng
13 #define yylex dmllex
14 #define yyout dmlout
15 #define yyrestart dmlrestart
16 #define yytext dmltext
17 
18 /* A lexical scanner generated by flex */
19 
20 /* Scanner skeleton version:
21  * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
22  */
23 
24 #define FLEX_SCANNER
25 #define YY_FLEX_MAJOR_VERSION 2
26 #define YY_FLEX_MINOR_VERSION 5
27 
28 #include <stdio.h>
29 
30 
31 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
32 #ifdef c_plusplus
33 #ifndef __cplusplus
34 #define __cplusplus
35 #endif
36 #endif
37 
38 
39 #ifdef __cplusplus
40 
41 #include <stdlib.h>
42 #include <unistd.h>
43 
44 /* Use prototypes in function declarations. */
45 #define YY_USE_PROTOS
46 
47 /* The "const" storage-class-modifier is valid. */
48 #define YY_USE_CONST
49 
50 #else	/* ! __cplusplus */
51 
52 #if __STDC__
53 
54 #define YY_USE_PROTOS
55 #define YY_USE_CONST
56 
57 #endif	/* __STDC__ */
58 #endif	/* ! __cplusplus */
59 
60 #ifdef __TURBOC__
61 #pragma warn -rch
62 #pragma warn -use
63 #include <io.h>
64 #include <stdlib.h>
65 #define YY_USE_CONST
66 #define YY_USE_PROTOS
67 #endif
68 
69 #ifdef YY_USE_CONST
70 #define yyconst const
71 #else
72 #define yyconst
73 #endif
74 
75 
76 #ifdef YY_USE_PROTOS
77 #define YY_PROTO(proto) proto
78 #else
79 #define YY_PROTO(proto) ()
80 #endif
81 
82 /* Returned upon end-of-file. */
83 #define YY_NULL 0
84 
85 /* Promotes a possibly negative, possibly signed char to an unsigned
86  * integer for use as an array index.  If the signed char is negative,
87  * we want to instead treat it as an 8-bit unsigned char, hence the
88  * double cast.
89  */
90 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
91 
92 /* Enter a start condition.  This macro really ought to take a parameter,
93  * but we do it the disgusting crufty way forced on us by the ()-less
94  * definition of BEGIN.
95  */
96 #define BEGIN yy_start = 1 + 2 *
97 
98 /* Translate the current start state into a value that can be later handed
99  * to BEGIN to return to the state.  The YYSTATE alias is for lex
100  * compatibility.
101  */
102 #define YY_START ((yy_start - 1) / 2)
103 #define YYSTATE YY_START
104 
105 /* Action number for EOF rule of a given start state. */
106 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
107 
108 /* Special action meaning "start processing a new file". */
109 #define YY_NEW_FILE yyrestart( yyin )
110 
111 #define YY_END_OF_BUFFER_CHAR 0
112 
113 /* Size of default input buffer. */
114 #define YY_BUF_SIZE 16384
115 
116 typedef struct yy_buffer_state* YY_BUFFER_STATE;
117 
118 extern int yyleng;
119 extern FILE* yyin, *yyout;
120 
121 #define EOB_ACT_CONTINUE_SCAN 0
122 #define EOB_ACT_END_OF_FILE 1
123 #define EOB_ACT_LAST_MATCH 2
124 
125 /* The funky do-while in the following #define is used to turn the definition
126  * int a single C statement (which needs a semi-colon terminator).  This
127  * avoids problems with code like:
128  *
129  * 	if ( condition_holds )
130  *		yyless( 5 );
131  *	else
132  *		do_something_else();
133  *
134  * Prior to using the do-while the compiler would get upset at the
135  * "else" because it interpreted the "if" statement as being all
136  * done when it reached the ';' after the yyless() call.
137  */
138 
139 /* Return all but the first 'n' matched characters back to the input stream. */
140 
141 #define yyless(n) \
142 	do \
143 		{ \
144 		/* Undo effects of setting up yytext. */ \
145 		*yy_cp = yy_hold_char; \
146 		YY_RESTORE_YY_MORE_OFFSET \
147 		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
148 		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
149 		} \
150 	while ( 0 )
151 
152 #define unput(c) yyunput( c, yytext_ptr )
153 
154 /* The following is because we cannot portably get our hands on size_t
155  * (without autoconf's help, which isn't available because we want
156  * flex-generated scanners to compile on their own).
157  */
158 typedef unsigned int yy_size_t;
159 
160 
161 struct yy_buffer_state
162 {
163     FILE* yy_input_file;
164 
165     char* yy_ch_buf;		/* input buffer */
166     char* yy_buf_pos;		/* current position in input buffer */
167 
168     /* Size of input buffer in bytes, not including room for EOB
169      * characters.
170      */
171     yy_size_t yy_buf_size;
172 
173     /* Number of characters read into yy_ch_buf, not including EOB
174      * characters.
175      */
176     int yy_n_chars;
177 
178     /* Whether we "own" the buffer - i.e., we know we created it,
179      * and can realloc() it to grow it, and should free() it to
180      * delete it.
181      */
182     int yy_is_our_buffer;
183 
184     /* Whether this is an "interactive" input source; if so, and
185      * if we're using stdio for input, then we want to use getc()
186      * instead of fread(), to make sure we stop fetching input after
187      * each newline.
188      */
189     int yy_is_interactive;
190 
191     /* Whether we're considered to be at the beginning of a line.
192      * If so, '^' rules will be active on the next match, otherwise
193      * not.
194      */
195     int yy_at_bol;
196 
197     /* Whether to try to fill the input buffer when we reach the
198      * end of it.
199      */
200     int yy_fill_buffer;
201 
202     int yy_buffer_status;
203 #define YY_BUFFER_NEW 0
204 #define YY_BUFFER_NORMAL 1
205     /* When an EOF's been seen but there's still some text to process
206      * then we mark the buffer as YY_EOF_PENDING, to indicate that we
207      * shouldn't try reading from the input source any more.  We might
208      * still have a bunch of tokens to match, though, because of
209      * possible backing-up.
210      *
211      * When we actually see the EOF, we change the status to "new"
212      * (via yyrestart()), so that the user can continue scanning by
213      * just pointing yyin at a new input file.
214      */
215 #define YY_BUFFER_EOF_PENDING 2
216 };
217 
218 static YY_BUFFER_STATE yy_current_buffer = 0;
219 
220 /* We provide macros for accessing buffer states in case in the
221  * future we want to put the buffer states in a more general
222  * "scanner state".
223  */
224 #define YY_CURRENT_BUFFER yy_current_buffer
225 
226 
227 /* yy_hold_char holds the character lost when yytext is formed. */
228 static char yy_hold_char;
229 
230 static int yy_n_chars;		/* number of characters read into yy_ch_buf */
231 
232 
233 int yyleng;
234 
235 /* Points to current character in buffer. */
236 static char* yy_c_buf_p = (char*) 0;
237 static int yy_init = 1;		/* whether we need to initialize */
238 static int yy_start = 0;	/* start state number */
239 
240 /* Flag which is used to allow yywrap()'s to do buffer switches
241  * instead of setting up a fresh yyin.  A bit of a hack ...
242  */
243 static int yy_did_buffer_switch_on_eof;
244 
245 void yyrestart YY_PROTO(( FILE* input_file ));
246 
247 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
248 void yy_load_buffer_state YY_PROTO(( void ));
249 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE* file, int size ));
250 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
251 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE* file ));
252 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
253 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
254 
255 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char* base, yy_size_t size ));
256 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char* yy_str ));
257 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char* bytes, int len ));
258 
259 static void* yy_flex_alloc YY_PROTO(( yy_size_t ));
260 static void* yy_flex_realloc YY_PROTO(( void*, yy_size_t ));
261 static void yy_flex_free YY_PROTO(( void* ));
262 
263 #define yy_new_buffer yy_create_buffer
264 
265 #define yy_set_interactive(is_interactive) \
266 	{ \
267 	if ( ! yy_current_buffer ) \
268 		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
269 	yy_current_buffer->yy_is_interactive = is_interactive; \
270 	}
271 
272 #define yy_set_bol(at_bol) \
273 	{ \
274 	if ( ! yy_current_buffer ) \
275 		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
276 	yy_current_buffer->yy_at_bol = at_bol; \
277 	}
278 
279 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
280 
281 
282 #define yywrap() 1
283 #define YY_SKIP_YYWRAP
284 typedef unsigned char YY_CHAR;
285 FILE* yyin = (FILE*) 0, *yyout = (FILE*) 0;
286 typedef int yy_state_type;
287 extern char* yytext;
288 #define yytext_ptr yytext
289 
290 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
291 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
292 static int yy_get_next_buffer YY_PROTO(( void ));
293 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
294 
295 /* Done after the current pattern has been matched and before the
296  * corresponding action - sets up yytext.
297  */
298 #define YY_DO_BEFORE_ACTION \
299 	yytext_ptr = yy_bp; \
300 	yyleng = (int) (yy_cp - yy_bp); \
301 	yy_hold_char = *yy_cp; \
302 	*yy_cp = '\0'; \
303 	yy_c_buf_p = yy_cp;
304 
305 #define YY_NUM_RULES 103
306 #define YY_END_OF_BUFFER 104
307 static yyconst short int yy_accept[394] =
308 {
309     0,
310     0,    0,    0,    0,    0,    0,  104,  103,  101,  100,
311     97,   90,   90,   90,   90,   93,  103,   86,   84,   87,
312     91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
313     91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
314     91,   91,  103,   98,   99,  101,   95,   93,  102,   95,
315     94,   93,    0,   92,   88,   85,   89,   91,   91,   91,
316     9,   91,   91,   91,   13,   91,   91,   91,   91,   91,
317     91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
318     91,   91,   41,   46,   91,   91,   91,   91,   91,   91,
319     91,   53,   54,   91,   57,   91,   91,   91,   91,   91,
320 
321     91,   91,   91,   91,   91,   73,   91,   91,   91,   91,
322     91,   91,   91,   91,    0,   98,  102,   94,    0,   96,
323     92,    1,    2,    8,   10,   91,    3,   91,   91,   91,
324     91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
325     91,   91,   91,   91,   91,   91,   33,   91,   91,    0,
326     91,   91,   91,   91,   91,   91,   44,   47,   91,   91,
327     5,    4,   50,   91,   91,   91,   91,   91,   91,   91,
328     91,   91,   91,   91,   91,   91,   68,   91,   91,   91,
329     6,   91,   91,   91,   91,   91,   91,   91,   91,   91,
330     91,   91,   14,   91,   91,   91,   91,   91,   91,   91,
331 
332     91,   91,   91,   91,   91,   26,   91,   91,   91,   91,
333     91,   91,   91,   91,   36,    0,   37,   91,   91,   91,
334     91,   91,   91,   45,   91,   49,   51,   91,   55,   91,
335     91,   91,   91,   91,   91,   91,   64,   91,   91,   91,
336     91,   70,   91,   91,   91,   91,   91,   77,   91,   79,
337     91,   91,   82,   83,   91,   91,   91,   15,   16,   91,
338     91,    7,   91,   91,   91,   91,   91,   91,   91,   91,
339     91,   91,   91,   31,   32,   91,   35,   37,   38,   39,
340     91,   91,   91,   91,   91,   91,   91,   58,   91,   91,
341     91,   91,   91,   91,   91,   91,   91,   91,   72,   74,
342 
343     91,   91,   91,   91,   81,   91,   91,   91,   17,   91,
344     19,   91,   21,   91,   91,   91,   25,   91,   28,   29,
345     30,   91,   40,   91,   43,   91,   91,   91,   56,   91,
346     91,   91,   91,   63,   91,   91,   67,   91,   91,   75,
347     76,   78,   91,   91,   12,   91,   91,   20,   22,   23,
348     24,   91,   34,   91,   44,   91,   52,   91,   60,   91,
349     91,   91,   91,   91,   71,   91,   91,   91,   18,   27,
350     91,   48,   91,   91,   91,   91,   66,   69,   80,   91,
351     14,   42,   59,   91,   62,   91,   91,   61,   65,   91,
352     91,   11,    0
353 
354 } ;
355 
356 static yyconst int yy_ec[256] =
357 {
358     0,
359     1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
360     1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
361     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
362     1,    2,    1,    1,    1,    1,    1,    1,    5,    6,
363     6,    6,    7,    6,    8,    9,    6,   10,   10,   10,
364     10,   10,   10,   10,   10,   10,   10,   11,    6,   12,
365     13,   14,    1,    1,   16,   17,   18,   19,   20,   21,
366     22,   23,   24,   25,   26,   27,   28,   29,   30,   31,
367     32,   33,   34,   35,   36,   37,   38,   39,   40,   41,
368     1,    1,    1,    1,   15,    1,   16,   17,   18,   19,
369 
370     20,   21,   22,   23,   24,   25,   26,   27,   28,   29,
371     30,   31,   32,   33,   34,   35,   36,   37,   38,   39,
372     40,   41,    1,    1,    1,    1,    1,    1,    1,    1,
373     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
374     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
375     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
376     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
377     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
378     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
379     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
380 
381     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
382     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
383     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
384     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
385     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
386     1,    1,    1,    1,    1
387 } ;
388 
389 static yyconst int yy_meta[42] =
390 {
391     0,
392     1,    1,    2,    1,    1,    1,    1,    1,    1,    3,
393     1,    1,    1,    1,    3,    4,    4,    4,    4,    4,
394     4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
395     4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
396     4
397 } ;
398 
399 static yyconst short int yy_base[401] =
400 {
401     0,
402     0,    0,  425,  424,  423,  422,  426,  431,   40,  431,
403     431,  431,   36,   39,  415,   41,    0,   39,  431,  411,
404     28,   23,   43,   47,   20,   48,   39,  407,   51,    0,
405     402,   58,   67,   54,   65,   56,   67,   73,   72,   77,
406     83,   89,  416,  431,  431,   54,  410,  105,    0,   90,
407     106,  108,  113,    0,  431,  431,  431,    0,  392,  103,
408     400,  382,  394,  380,    0,  111,  384,  101,  393,  379,
409     114,  377,  374,  391,  384,  372,  376,  100,  375,  122,
410     122,  367,  115,    0,  363,  373,  375,  361,  370,  363,
411     112,    0,    0,  124,  378,  131,  379,  126,  368,  118,
412 
413     378,  365,  365,  363,  373,    0,  365,  369,  367,  359,
414     365,  364,  348,  349,  376,  431,    0,  136,  370,  369,
415     0,    0,    0,    0,    0,  355,    0,  339,  343,  357,
416     340,  345,  337,  342,  354,  129,  140,  353,  348,  349,
417     331,  348,  348,  329,  344,  345,  340,  330,  330,  152,
418     327,  327,  319,  330,  329,  332,  138,    0,  329,  330,
419     0,    0,    0,  322,  328,  318,  322,  325,  326,   67,
420     325,  315,  314,  320,  312,  318,    0,  310,  316,  317,
421     0,  307,  139,  317,  299,  295,  292,  137,  306,  302,
422     297,  306,  309,  298,  303,  298,  297,  285,  284,  298,
423 
424     287,  288,  299,  278,  278,    0,  288,  284,  279,  274,
425     285,  272,  282,  286,    0,  274,    0,  268,  271,  272,
426     282,  266,  276,    0,  261,    0,    0,  263,    0,  265,
427     261,  269,  276,  267,  270,  265,    0,  255,  270,  268,
428     258,    0,  254,  263,  253,  245,  245,    0,  259,    0,
429     258,  257,    0,    0,  243,  255,  256,    0,    0,  238,
430     243,    0,  251,  241,  236,  252,  234,  239,  245,  235,
431     243,  242,  227,    0,    0,  238,    0,  431,    0,    0,
432     237,  242,  222,  236,  239,  230,  224,    0,  218,  218,
433     223,  230,  230,  227,  230,  210,  220,  224,    0,    0,
434 
435     222,  221,  206,  202,    0,  214,  208,  201,    0,  199,
436     0,  199,    0,  206,  212,  196,    0,  212,    0,    0,
437     0,  200,    0,  193,    0,  194,  204,  207,    0,  200,
438     183,  202,  185,    0,  191,  201,    0,  189,  197,    0,
439     0,    0,  196,  174,    0,  194,  193,    0,    0,    0,
440     0,  177,    0,  181,    0,  190,    0,  179,    0,  186,
441     170,  168,  159,  149,    0,  150,  166,  148,    0,    0,
442     147,    0,  150,  158,  157,  156,    0,    0,    0,  140,
443     0,    0,    0,  140,    0,  139,  148,    0,    0,  135,
444     131,    0,  431,  187,  191,   56,  193,  197,  201,  203
445 
446 } ;
447 
448 static yyconst short int yy_def[401] =
449 {
450     0,
451     393,    1,  394,  394,  395,  395,  393,  393,  393,  393,
452     393,  393,  393,  393,  393,  393,  396,  393,  393,  393,
453     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
454     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
455     397,  397,  398,  393,  393,  393,  393,  393,  399,  393,
456     393,  393,  393,  400,  393,  393,  393,  397,  397,  397,
457     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
458     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
459     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
460     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
461 
462     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
463     397,  397,  397,  397,  398,  393,  399,  393,  393,  393,
464     400,  397,  397,  397,  397,  397,  397,  397,  397,  397,
465     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
466     397,  397,  397,  397,  397,  397,  397,  397,  397,  393,
467     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
468     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
469     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
470     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
471     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
472 
473     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
474     397,  397,  397,  397,  397,  393,  397,  397,  397,  397,
475     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
476     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
477     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
478     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
479     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
480     397,  397,  397,  397,  397,  397,  397,  393,  397,  397,
481     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
482     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
483 
484     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
485     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
486     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
487     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
488     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
489     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
490     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
491     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
492     397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
493     397,  397,    0,  393,  393,  393,  393,  393,  393,  393
494 
495 } ;
496 
497 static yyconst short int yy_nxt[473] =
498 {
499     0,
500     8,    9,   10,    9,   11,   12,   13,   14,   15,   16,
501     17,   18,   19,   20,    8,   21,   22,   23,   24,   25,
502     26,   27,   28,   29,   30,   31,   32,   33,   34,   35,
503     36,   30,   37,   38,   39,   40,   41,   42,   30,   30,
504     30,   46,   64,   46,   47,   48,   49,   47,   48,   51,
505     52,   55,   56,   74,   59,   46,   60,   46,   75,   54,
506     53,   61,   65,   62,   63,   66,   71,   76,   80,   67,
507     72,   81,   68,   86,   77,   69,   73,   78,   70,   83,
508     79,   87,   88,   90,   84,   92,   98,  105,   96,   91,
509     89,   97,  100,   93,  233,   94,   99,   95,  110,   50,
510 
511     101,  106,  102,  234,  103,  107,  111,  108,  104,   53,
512     109,  112,  113,   51,   52,  118,   51,   52,  114,  119,
513     119,  123,  120,  150,   53,   53,  129,   53,  132,  133,
514     130,  137,  147,  155,  138,  148,  134,  152,  164,  165,
515     139,  173,  124,  166,  176,  118,  174,  140,  156,  157,
516     169,  153,  177,  150,  170,   53,  151,  223,  167,  392,
517     171,  200,  201,  202,  391,  251,  203,  224,  245,  252,
518     246,  390,  389,  388,  387,  386,  385,  384,  383,  382,
519     381,  380,  379,  378,  377,  376,  216,   43,   43,   43,
520     43,    8,    8,    8,    8,   58,   58,  115,  115,  115,
521 
522     115,  117,  375,  117,  117,  121,  121,  374,  373,  372,
523     371,  370,  369,  368,  367,  366,  365,  364,  363,  362,
524     361,  360,  359,  358,  357,  356,  355,  354,  353,  352,
525     351,  350,  349,  348,  347,  346,  345,  344,  343,  342,
526     341,  340,  339,  338,  337,  336,  335,  334,  333,  332,
527     331,  330,  329,  328,  327,  326,  325,  324,  323,  322,
528     321,  320,  319,  318,  317,  316,  315,  314,  313,  312,
529     311,  310,  309,  308,  307,  306,  305,  304,  303,  302,
530     301,  300,  299,  298,  297,  296,  295,  294,  293,  292,
531     291,  290,  289,  288,  287,  286,  285,  284,  283,  282,
532 
533     281,  280,  279,  278,  277,  276,  275,  274,  273,  272,
534     271,  270,  269,  268,  267,  266,  265,  264,  263,  262,
535     261,  260,  259,  258,  257,  256,  255,  254,  253,  250,
536     249,  248,  247,  244,  243,  242,  241,  240,  239,  238,
537     237,  236,  235,  232,  231,  230,  229,  228,  227,  226,
538     225,  222,  221,  220,  219,  218,  217,  215,  214,  213,
539     212,  211,  210,  209,  208,  207,  206,  205,  204,  199,
540     198,  197,  196,  195,  194,  193,  192,  191,  120,  120,
541     116,  190,  189,  188,  187,  186,  185,  184,  183,  182,
542     181,  180,  179,  178,  175,  172,  168,  163,  162,  161,
543 
544     160,  159,  158,  154,  149,  146,  145,  144,  143,  142,
545     141,  136,  135,  131,  128,  127,  126,  125,  122,   50,
546     116,   85,   82,   57,   50,  393,   45,   45,   44,   44,
547     7,  393,  393,  393,  393,  393,  393,  393,  393,  393,
548     393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
549     393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
550     393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
551     393,  393
552 } ;
553 
554 static yyconst short int yy_chk[473] =
555 {
556     0,
557     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
558     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
559     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
560     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
561     1,    9,   22,    9,   13,   13,   14,   14,   14,   16,
562     16,   18,   18,   25,   21,   46,   21,   46,   25,  396,
563     16,   21,   22,   21,   21,   23,   24,   26,   27,   23,
564     24,   27,   23,   32,   26,   23,   24,   26,   23,   29,
565     26,   32,   33,   34,   29,   35,   37,   39,   36,   34,
566     33,   36,   38,   35,  170,   35,   37,   35,   41,   50,
567 
568     38,   39,   38,  170,   38,   40,   41,   40,   38,   50,
569     40,   42,   42,   48,   48,   51,   52,   52,   42,   53,
570     53,   60,   53,   80,   48,   51,   66,   52,   68,   68,
571     66,   71,   78,   83,   71,   78,   68,   81,   91,   91,
572     71,   98,   60,   94,  100,  118,   98,   71,   83,   83,
573     96,   81,  100,  150,   96,  118,   80,  157,   94,  391,
574     96,  136,  136,  137,  390,  188,  137,  157,  183,  188,
575     183,  387,  386,  384,  380,  376,  375,  374,  373,  371,
576     368,  367,  366,  364,  363,  362,  150,  394,  394,  394,
577     394,  395,  395,  395,  395,  397,  397,  398,  398,  398,
578 
579     398,  399,  361,  399,  399,  400,  400,  360,  358,  356,
580     354,  352,  347,  346,  344,  343,  339,  338,  336,  335,
581     333,  332,  331,  330,  328,  327,  326,  324,  322,  318,
582     316,  315,  314,  312,  310,  308,  307,  306,  304,  303,
583     302,  301,  298,  297,  296,  295,  294,  293,  292,  291,
584     290,  289,  287,  286,  285,  284,  283,  282,  281,  276,
585     273,  272,  271,  270,  269,  268,  267,  266,  265,  264,
586     263,  261,  260,  257,  256,  255,  252,  251,  249,  247,
587     246,  245,  244,  243,  241,  240,  239,  238,  236,  235,
588     234,  233,  232,  231,  230,  228,  225,  223,  222,  221,
589 
590     220,  219,  218,  216,  214,  213,  212,  211,  210,  209,
591     208,  207,  205,  204,  203,  202,  201,  200,  199,  198,
592     197,  196,  195,  194,  193,  192,  191,  190,  189,  187,
593     186,  185,  184,  182,  180,  179,  178,  176,  175,  174,
594     173,  172,  171,  169,  168,  167,  166,  165,  164,  160,
595     159,  156,  155,  154,  153,  152,  151,  149,  148,  147,
596     146,  145,  144,  143,  142,  141,  140,  139,  138,  135,
597     134,  133,  132,  131,  130,  129,  128,  126,  120,  119,
598     115,  114,  113,  112,  111,  110,  109,  108,  107,  105,
599     104,  103,  102,  101,   99,   97,   95,   90,   89,   88,
600 
601     87,   86,   85,   82,   79,   77,   76,   75,   74,   73,
602     72,   70,   69,   67,   64,   63,   62,   61,   59,   47,
603     43,   31,   28,   20,   15,    7,    6,    5,    4,    3,
604     393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
605     393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
606     393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
607     393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
608     393,  393
609 } ;
610 
611 static yy_state_type yy_last_accepting_state;
612 static char* yy_last_accepting_cpos;
613 
614 /* The intent behind this definition is that it'll catch
615  * any uses of REJECT which flex missed.
616  */
617 #define REJECT reject_used_but_not_detected
618 #define yymore() yymore_used_but_not_detected
619 #define YY_MORE_ADJ 0
620 #define YY_RESTORE_YY_MORE_OFFSET
621 char* yytext;
622 #define INITIAL 0
623 
624 /* $Id: dml.l 8707 2012-07-13 19:08:12Z rdempsey $ */
625 #include <iostream>
626 #include <vector>
627 #include <stdio.h>
628 #include <cstring>
629 #include "dmlparser.h"
630 
631 #undef DECIMAL
632 #undef DELETE
633 #undef IN
634 #ifdef _MSC_VER
635 #include "dml-gram-win.h"
636 #else
637 #include "dml-gram.h"
638 #endif
639 #ifdef _MSC_VER
640 #define YY_NO_UNISTD_H
641 extern "C" int _isatty(int);
642 #define isatty _isatty
643 #endif
644 
645 /* These don't seem to be covered by the prefix option of flex 2.5.4
646  * Bison 2.0 puts extern dml_yylval in dml-gram.h. */
647 
648 /*#define yylval dml_yylval
649 #define yyerror dml_yyerror*/
650 using namespace dmlpackage;
651 
652 void dmlerror(char const* s);
653 
654 namespace dmlpackage
655 {
656 int lineno = 1;
657 
658 
659 /* Handles to the buffer that the lexer uses internally */
660 static YY_BUFFER_STATE scanbufhandle;
661 static char* scanbuf;
662 
663 static char* scanner_copy (char* str);
664 
665 
666 /* macro to save the text and return a token */
667 #define TOK(name) { dmllval.strval = scanner_copy(dmltext); return name; }
668 }
669 
670 #define YY_NO_UNPUT 1
671 #define inquote 1
672 
673 #define endquote 2
674 
675 
676 /* Macros after this point can all be overridden by user definitions in
677  * section 1.
678  */
679 
680 #ifndef YY_SKIP_YYWRAP
681 #ifdef __cplusplus
682 extern "C" int yywrap YY_PROTO(( void ));
683 #else
684 extern int yywrap YY_PROTO(( void ));
685 #endif
686 #endif
687 
688 #ifndef YY_NO_UNPUT
689 static void yyunput YY_PROTO(( int c, char* buf_ptr ));
690 #endif
691 
692 #ifndef yytext_ptr
693 static void yy_flex_strncpy YY_PROTO(( char*, yyconst char*, int ));
694 #endif
695 
696 #ifdef YY_NEED_STRLEN
697 static int yy_flex_strlen YY_PROTO(( yyconst char* ));
698 #endif
699 
700 #ifndef YY_NO_INPUT
701 #ifdef __cplusplus
702 static int yyinput YY_PROTO(( void ));
703 #else
704 static int input YY_PROTO(( void ));
705 #endif
706 #endif
707 
708 #if YY_STACK_USED
709 static int yy_start_stack_ptr = 0;
710 static int yy_start_stack_depth = 0;
711 static int* yy_start_stack = 0;
712 #ifndef YY_NO_PUSH_STATE
713 static void yy_push_state YY_PROTO(( int new_state ));
714 #endif
715 #ifndef YY_NO_POP_STATE
716 static void yy_pop_state YY_PROTO(( void ));
717 #endif
718 #ifndef YY_NO_TOP_STATE
719 static int yy_top_state YY_PROTO(( void ));
720 #endif
721 
722 #else
723 #define YY_NO_PUSH_STATE 1
724 #define YY_NO_POP_STATE 1
725 #define YY_NO_TOP_STATE 1
726 #endif
727 
728 #ifdef YY_MALLOC_DECL
729 YY_MALLOC_DECL
730 #else
731 #if __STDC__
732 #ifndef __cplusplus
733 #include <stdlib.h>
734 #endif
735 #else
736 /* Just try to get by without declaring the routines.  This will fail
737  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
738  * or sizeof(void*) != sizeof(int).
739  */
740 #endif
741 #endif
742 
743 /* Amount of stuff to slurp up with each read. */
744 #ifndef YY_READ_BUF_SIZE
745 #define YY_READ_BUF_SIZE 8192
746 #endif
747 
748 /* Copy whatever the last rule matched to the standard output. */
749 
750 #ifndef ECHO
751 /* This used to be an fputs(), but since the string might contain NUL's,
752  * we now use fwrite().
753  */
754 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
755 #endif
756 
757 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
758  * is returned in "result".
759  */
760 #ifndef YY_INPUT
761 #define YY_INPUT(buf,result,max_size) \
762 	if ( yy_current_buffer->yy_is_interactive ) \
763 		{ \
764 		int c = '*', n; \
765 		for ( n = 0; n < max_size && \
766 			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
767 			buf[n] = (char) c; \
768 		if ( c == '\n' ) \
769 			buf[n++] = (char) c; \
770 		if ( c == EOF && ferror( yyin ) ) \
771 			YY_FATAL_ERROR( "input in flex scanner failed" ); \
772 		result = n; \
773 		} \
774 	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
775 		  && ferror( yyin ) ) \
776 		YY_FATAL_ERROR( "input in flex scanner failed" );
777 #endif
778 
779 /* No semi-colon after return; correct usage is to write "yyterminate();" -
780  * we don't want an extra ';' after the "return" because that will cause
781  * some compilers to complain about unreachable statements.
782  */
783 #ifndef yyterminate
784 #define yyterminate() return YY_NULL
785 #endif
786 
787 /* Number of entries by which start-condition stack grows. */
788 #ifndef YY_START_STACK_INCR
789 #define YY_START_STACK_INCR 25
790 #endif
791 
792 /* Report a fatal error. */
793 #ifndef YY_FATAL_ERROR
794 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
795 #endif
796 
797 /* Default declaration of generated scanner - a define so the user can
798  * easily add parameters.
799  */
800 #ifndef YY_DECL
801 #define YY_DECL int yylex YY_PROTO(( void ))
802 #endif
803 
804 /* Code executed at the beginning of each rule, after yytext and yyleng
805  * have been set up.
806  */
807 #ifndef YY_USER_ACTION
808 #define YY_USER_ACTION
809 #endif
810 
811 /* Code executed at the end of each rule. */
812 #ifndef YY_BREAK
813 #define YY_BREAK break;
814 #endif
815 
816 #define YY_RULE_SETUP \
817 	YY_USER_ACTION
818 
819 YY_DECL
820 {
821     register yy_state_type yy_current_state;
822     register char* yy_cp, *yy_bp;
823     register int yy_act;
824 
825 
826 
827 
828     if ( yy_init )
829     {
830         yy_init = 0;
831 
832 #ifdef YY_USER_INIT
833         YY_USER_INIT;
834 #endif
835 
836         if ( ! yy_start )
837             yy_start = 1;	/* first start state */
838 
839         if ( ! yyin )
840             yyin = stdin;
841 
842         if ( ! yyout )
843             yyout = stdout;
844 
845         if ( ! yy_current_buffer )
846             yy_current_buffer =
847             yy_create_buffer( yyin, YY_BUF_SIZE );
848 
849         yy_load_buffer_state();
850     }
851 
852     while ( 1 )		/* loops until end-of-file is reached */
853     {
854         yy_cp = yy_c_buf_p;
855 
856         /* Support of yytext. */
857         *yy_cp = yy_hold_char;
858 
859         /* yy_bp points to the position in yy_ch_buf of the start of
860          * the current run.
861          */
862         yy_bp = yy_cp;
863 
864         yy_current_state = yy_start;
865 yy_match:
866 
867         do
868         {
869             register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
870 
871             if ( yy_accept[yy_current_state] )
872             {
873                 yy_last_accepting_state = yy_current_state;
874                 yy_last_accepting_cpos = yy_cp;
875             }
876 
877             while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
878             {
879                 yy_current_state = (int) yy_def[yy_current_state];
880 
881                 if ( yy_current_state >= 394 )
882                     yy_c = yy_meta[(unsigned int) yy_c];
883             }
884 
885             yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
886             ++yy_cp;
887         }
888         while ( yy_base[yy_current_state] != 431 );
889 
890 yy_find_action:
891         yy_act = yy_accept[yy_current_state];
892 
893         if ( yy_act == 0 )
894         {
895             /* have to back up */
896             yy_cp = yy_last_accepting_cpos;
897             yy_current_state = yy_last_accepting_state;
898             yy_act = yy_accept[yy_current_state];
899         }
900 
901         YY_DO_BEFORE_ACTION;
902 
903 
904 do_action:	/* This label is used only to access EOF actions. */
905 
906 
907         switch ( yy_act )
908         {
909             /* beginning of action switch */
910             case 0: /* must back up */
911                 /* undo the effects of YY_DO_BEFORE_ACTION */
912                 *yy_cp = yy_hold_char;
913                 yy_cp = yy_last_accepting_cpos;
914                 yy_current_state = yy_last_accepting_state;
915                 goto yy_find_action;
916 
917             case 1:
918                 YY_RULE_SETUP
919                 TOK(ALL)
920                 YY_BREAK
921             case 2:
922                 YY_RULE_SETUP
923                 TOK(AND)
924                 YY_BREAK
925             case 3:
926                 YY_RULE_SETUP
927                 TOK(AMMSC)
928                 YY_BREAK
929             case 4:
930                 YY_RULE_SETUP
931                 TOK(AMMSC)
932                 YY_BREAK
933             case 5:
934                 YY_RULE_SETUP
935                 TOK(AMMSC)
936                 YY_BREAK
937             case 6:
938                 YY_RULE_SETUP
939                 TOK(AMMSC)
940                 YY_BREAK
941             case 7:
942                 YY_RULE_SETUP
943                 TOK(AMMSC)
944                 YY_BREAK
945             case 8:
946                 YY_RULE_SETUP
947                 TOK(ANY)
948                 YY_BREAK
949             case 9:
950                 YY_RULE_SETUP
951                 TOK(AS)
952                 YY_BREAK
953             case 10:
954                 YY_RULE_SETUP
955                 TOK(ASC)
956                 YY_BREAK
957             case 11:
958                 YY_RULE_SETUP
959                 TOK(AUTHORIZATION)
960                 YY_BREAK
961             case 12:
962                 YY_RULE_SETUP
963                 TOK(BETWEEN)
964                 YY_BREAK
965             case 13:
966                 YY_RULE_SETUP
967                 TOK(BY)
968                 YY_BREAK
969             case 14:
970                 YY_RULE_SETUP
971                 TOK(CHARACTER)
972                 YY_BREAK
973             case 15:
974                 YY_RULE_SETUP
975                 TOK(CHECK)
976                 YY_BREAK
977             case 16:
978                 YY_RULE_SETUP
979                 TOK(CLOSE)
980                 YY_BREAK
981             case 17:
982                 YY_RULE_SETUP
983                 TOK(COMMIT)
984                 YY_BREAK
985             case 18:
986                 YY_RULE_SETUP
987                 TOK(CONTINUE)
988                 YY_BREAK
989             case 19:
990                 YY_RULE_SETUP
991                 TOK(CREATE)
992                 YY_BREAK
993             case 20:
994                 YY_RULE_SETUP
995                 TOK(CURRENT)
996                 YY_BREAK
997             case 21:
998                 YY_RULE_SETUP
999                 TOK(CURSOR)
1000                 YY_BREAK
1001             case 22:
1002                 YY_RULE_SETUP
1003                 TOK(IDB_DECIMAL)
1004                 YY_BREAK
1005             case 23:
1006                 YY_RULE_SETUP
1007                 TOK(DECLARE)
1008                 YY_BREAK
1009             case 24:
1010                 YY_RULE_SETUP
1011                 TOK(DEFAULT)
1012                 YY_BREAK
1013             case 25:
1014                 YY_RULE_SETUP
1015                 TOK(DELETE)
1016                 YY_BREAK
1017             case 26:
1018                 YY_RULE_SETUP
1019                 TOK(DESC)
1020                 YY_BREAK
1021             case 27:
1022                 YY_RULE_SETUP
1023                 TOK(ALL)
1024                 YY_BREAK
1025             case 28:
1026                 YY_RULE_SETUP
1027                 TOK(IDB_DOUBLE)
1028                 YY_BREAK
1029             case 29:
1030                 YY_RULE_SETUP
1031                 TOK(ESCAPE)
1032                 YY_BREAK
1033             case 30:
1034                 YY_RULE_SETUP
1035                 TOK(EXISTS)
1036                 YY_BREAK
1037             case 31:
1038                 YY_RULE_SETUP
1039                 TOK(FETCH)
1040                 YY_BREAK
1041             case 32:
1042                 YY_RULE_SETUP
1043                 TOK(IDB_FLOAT)
1044                 YY_BREAK
1045             case 33:
1046                 YY_RULE_SETUP
1047                 TOK(FOR)
1048                 YY_BREAK
1049             case 34:
1050                 YY_RULE_SETUP
1051                 TOK(FOREIGN)
1052                 YY_BREAK
1053             case 35:
1054                 YY_RULE_SETUP
1055                 TOK(FOUND)
1056                 YY_BREAK
1057             case 36:
1058                 YY_RULE_SETUP
1059                 TOK(FROM)
1060                 YY_BREAK
1061             case 37:
1062                 YY_RULE_SETUP
1063                 TOK(GOTO)
1064                 YY_BREAK
1065             case 38:
1066                 YY_RULE_SETUP
1067                 TOK(GRANT)
1068                 YY_BREAK
1069             case 39:
1070                 YY_RULE_SETUP
1071                 TOK(IDB_GROUP)
1072                 YY_BREAK
1073             case 40:
1074                 YY_RULE_SETUP
1075                 TOK(HAVING)
1076                 YY_BREAK
1077             case 41:
1078                 YY_RULE_SETUP
1079                 TOK(IN)
1080                 YY_BREAK
1081             case 42:
1082                 YY_RULE_SETUP
1083                 TOK(INDICATOR)
1084                 YY_BREAK
1085             case 43:
1086                 YY_RULE_SETUP
1087                 TOK(INSERT)
1088                 YY_BREAK
1089             case 44:
1090                 YY_RULE_SETUP
1091                 TOK(INTEGER)
1092                 YY_BREAK
1093             case 45:
1094                 YY_RULE_SETUP
1095                 TOK(INTO)
1096                 YY_BREAK
1097             case 46:
1098                 YY_RULE_SETUP
1099                 TOK(IS)
1100                 YY_BREAK
1101             case 47:
1102                 YY_RULE_SETUP
1103                 TOK(KEY)
1104                 YY_BREAK
1105             case 48:
1106                 YY_RULE_SETUP
1107                 TOK(LANGUAGE)
1108                 YY_BREAK
1109             case 49:
1110                 YY_RULE_SETUP
1111                 TOK(LIKE)
1112                 YY_BREAK
1113             case 50:
1114                 YY_RULE_SETUP
1115                 TOK(NOT)
1116                 YY_BREAK
1117             case 51:
1118                 YY_RULE_SETUP
1119                 TOK(NULLX)
1120                 YY_BREAK
1121             case 52:
1122                 YY_RULE_SETUP
1123                 TOK(NUMERIC)
1124                 YY_BREAK
1125             case 53:
1126                 YY_RULE_SETUP
1127                 TOK(OF)
1128                 YY_BREAK
1129             case 54:
1130                 YY_RULE_SETUP
1131                 TOK(ON)
1132                 YY_BREAK
1133             case 55:
1134                 YY_RULE_SETUP
1135                 TOK(OPEN)
1136                 YY_BREAK
1137             case 56:
1138                 YY_RULE_SETUP
1139                 TOK(OPTION)
1140                 YY_BREAK
1141             case 57:
1142                 YY_RULE_SETUP
1143                 TOK(OR)
1144                 YY_BREAK
1145             case 58:
1146                 YY_RULE_SETUP
1147                 TOK(ORDER)
1148                 YY_BREAK
1149             case 59:
1150                 YY_RULE_SETUP
1151                 TOK(PRECISION)
1152                 YY_BREAK
1153             case 60:
1154                 YY_RULE_SETUP
1155                 TOK(PRIMARY)
1156                 YY_BREAK
1157             case 61:
1158                 YY_RULE_SETUP
1159                 TOK(PRIVILEGES)
1160                 YY_BREAK
1161             case 62:
1162                 YY_RULE_SETUP
1163                 TOK(PROCEDURE)
1164                 YY_BREAK
1165             case 63:
1166                 YY_RULE_SETUP
1167                 TOK(PUBLIC)
1168                 YY_BREAK
1169             case 64:
1170                 YY_RULE_SETUP
1171                 TOK(REAL)
1172                 YY_BREAK
1173             case 65:
1174                 YY_RULE_SETUP
1175                 TOK(REFERENCES)
1176                 YY_BREAK
1177             case 66:
1178                 YY_RULE_SETUP
1179                 TOK(ROLLBACK)
1180                 YY_BREAK
1181             case 67:
1182                 YY_RULE_SETUP
1183                 TOK(SELECT)
1184                 YY_BREAK
1185             case 68:
1186                 YY_RULE_SETUP
1187                 TOK(SET)
1188                 YY_BREAK
1189             case 69:
1190                 YY_RULE_SETUP
1191                 TOK(SMALLINT)
1192                 YY_BREAK
1193             case 70:
1194                 YY_RULE_SETUP
1195                 TOK(SOME)
1196                 YY_BREAK
1197             case 71:
1198                 YY_RULE_SETUP
1199                 TOK(SQLCODE)
1200                 YY_BREAK
1201             case 72:
1202                 YY_RULE_SETUP
1203                 TOK(TABLE)
1204                 YY_BREAK
1205             case 73:
1206                 YY_RULE_SETUP
1207                 TOK(TO)
1208                 YY_BREAK
1209             case 74:
1210                 YY_RULE_SETUP
1211                 TOK(UNION)
1212                 YY_BREAK
1213             case 75:
1214                 YY_RULE_SETUP
1215                 TOK(UNIQUE)
1216                 YY_BREAK
1217             case 76:
1218                 YY_RULE_SETUP
1219                 TOK(UPDATE)
1220                 YY_BREAK
1221             case 77:
1222                 YY_RULE_SETUP
1223                 TOK(USER)
1224                 YY_BREAK
1225             case 78:
1226                 YY_RULE_SETUP
1227                 TOK(VALUES)
1228                 YY_BREAK
1229             case 79:
1230                 YY_RULE_SETUP
1231                 TOK(VIEW)
1232                 YY_BREAK
1233             case 80:
1234                 YY_RULE_SETUP
1235                 TOK(WHENEVER)
1236                 YY_BREAK
1237             case 81:
1238                 YY_RULE_SETUP
1239                 TOK(WHERE)
1240                 YY_BREAK
1241             case 82:
1242                 YY_RULE_SETUP
1243                 TOK(WITH)
1244                 YY_BREAK
1245             case 83:
1246                 YY_RULE_SETUP
1247                 TOK(WORK)
1248                 YY_BREAK
1249 
1250             /* punctuation */
1251             case 84:
1252             case 85:
1253             case 86:
1254             case 87:
1255             case 88:
1256             case 89:
1257                 YY_RULE_SETUP
1258                 TOK(COMPARISON)
1259                 YY_BREAK
1260             case 90:
1261                 YY_RULE_SETUP
1262                 {  TOK(yytext[0]) }
1263                 YY_BREAK
1264 
1265             /* names */
1266             case 91:
1267                 YY_RULE_SETUP
1268                 { TOK(NAME) }
1269                 YY_BREAK
1270 
1271             /* parameters */
1272             case 92:
1273                 YY_RULE_SETUP
1274                 {
1275                     return PARAMETER;
1276                 }
1277                 YY_BREAK
1278 
1279             /* numbers */
1280             case 93:
1281             case 94:
1282             case 95:
1283                 YY_RULE_SETUP
1284                 {  TOK(INTNUM) }
1285                 YY_BREAK
1286 
1287             case 96:
1288                 YY_RULE_SETUP
1289                 { TOK(APPROXNUM) }
1290                 YY_BREAK
1291 
1292             case 97:
1293                 YY_RULE_SETUP
1294                 {BEGIN(inquote);}
1295                 YY_BREAK
1296 
1297             case 98:
1298                 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1299                 yy_c_buf_p = yy_cp -= 1;
1300                 YY_DO_BEFORE_ACTION; /* set up yytext again */
1301                 YY_RULE_SETUP
1302                 {BEGIN(endquote); TOK(STRING) }
1303                 YY_BREAK
1304 
1305             case 99:
1306                 YY_RULE_SETUP
1307                 {BEGIN(0);}
1308                 YY_BREAK
1309 
1310             /* @bug 1870. Since MySQL parser will error out all the unterminated string, we don't actually need it here. */
1311             /* '[^'\n]*$	{	dmlerror("Unterminated string"); } */
1312             case 100:
1313                 YY_RULE_SETUP
1314                 { lineno++;}
1315                 YY_BREAK
1316 
1317             case 101:
1318                 YY_RULE_SETUP
1319                 ;	/* white space */
1320                 YY_BREAK
1321 
1322             case 102:
1323                 YY_RULE_SETUP
1324                 ;	/* comment */
1325                 YY_BREAK
1326 
1327             case 103:
1328                 YY_RULE_SETUP
1329                 ECHO;
1330                 YY_BREAK
1331 
1332             case YY_STATE_EOF(INITIAL):
1333             case YY_STATE_EOF(inquote):
1334             case YY_STATE_EOF(endquote):
1335                 yyterminate();
1336 
1337             case YY_END_OF_BUFFER:
1338             {
1339                 /* Amount of text matched not including the EOB char. */
1340                 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1341 
1342                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1343                 *yy_cp = yy_hold_char;
1344                 YY_RESTORE_YY_MORE_OFFSET
1345 
1346                 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1347                 {
1348                     /* We're scanning a new file or input source.  It's
1349                      * possible that this happened because the user
1350                      * just pointed yyin at a new source and called
1351                      * yylex().  If so, then we have to assure
1352                      * consistency between yy_current_buffer and our
1353                      * globals.  Here is the right place to do so, because
1354                      * this is the first action (other than possibly a
1355                      * back-up) that will match for the new input source.
1356                      */
1357                     yy_n_chars = yy_current_buffer->yy_n_chars;
1358                     yy_current_buffer->yy_input_file = yyin;
1359                     yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1360                 }
1361 
1362                 /* Note that here we test for yy_c_buf_p "<=" to the position
1363                  * of the first EOB in the buffer, since yy_c_buf_p will
1364                  * already have been incremented past the NUL character
1365                  * (since all states make transitions on EOB to the
1366                  * end-of-buffer state).  Contrast this with the test
1367                  * in input().
1368                  */
1369                 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1370                 {
1371                     /* This was really a NUL. */
1372                     yy_state_type yy_next_state;
1373 
1374                     yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1375 
1376                     yy_current_state = yy_get_previous_state();
1377 
1378                     /* Okay, we're now positioned to make the NUL
1379                      * transition.  We couldn't have
1380                      * yy_get_previous_state() go ahead and do it
1381                      * for us because it doesn't know how to deal
1382                      * with the possibility of jamming (and we don't
1383                      * want to build jamming into it because then it
1384                      * will run more slowly).
1385                      */
1386 
1387                     yy_next_state = yy_try_NUL_trans( yy_current_state );
1388 
1389                     yy_bp = yytext_ptr + YY_MORE_ADJ;
1390 
1391                     if ( yy_next_state )
1392                     {
1393                         /* Consume the NUL. */
1394                         yy_cp = ++yy_c_buf_p;
1395                         yy_current_state = yy_next_state;
1396                         goto yy_match;
1397                     }
1398 
1399                     else
1400                     {
1401                         yy_cp = yy_c_buf_p;
1402                         goto yy_find_action;
1403                     }
1404                 }
1405 
1406                 else switch ( yy_get_next_buffer() )
1407                     {
1408                         case EOB_ACT_END_OF_FILE:
1409                         {
1410                             yy_did_buffer_switch_on_eof = 0;
1411 
1412                             if ( yywrap() )
1413                             {
1414                                 /* Note: because we've taken care in
1415                                  * yy_get_next_buffer() to have set up
1416                                  * yytext, we can now set up
1417                                  * yy_c_buf_p so that if some total
1418                                  * hoser (like flex itself) wants to
1419                                  * call the scanner after we return the
1420                                  * YY_NULL, it'll still work - another
1421                                  * YY_NULL will get returned.
1422                                  */
1423                                 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1424 
1425                                 yy_act = YY_STATE_EOF(YY_START);
1426                                 goto do_action;
1427                             }
1428 
1429                             else
1430                             {
1431                                 if ( ! yy_did_buffer_switch_on_eof )
1432                                     YY_NEW_FILE;
1433                             }
1434 
1435                             break;
1436                         }
1437 
1438                         case EOB_ACT_CONTINUE_SCAN:
1439                             yy_c_buf_p =
1440                                 yytext_ptr + yy_amount_of_matched_text;
1441 
1442                             yy_current_state = yy_get_previous_state();
1443 
1444                             yy_cp = yy_c_buf_p;
1445                             yy_bp = yytext_ptr + YY_MORE_ADJ;
1446                             goto yy_match;
1447 
1448                         case EOB_ACT_LAST_MATCH:
1449                             yy_c_buf_p =
1450                                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1451 
1452                             yy_current_state = yy_get_previous_state();
1453 
1454                             yy_cp = yy_c_buf_p;
1455                             yy_bp = yytext_ptr + YY_MORE_ADJ;
1456                             goto yy_find_action;
1457                     }
1458 
1459                 break;
1460             }
1461 
1462             default:
1463                 YY_FATAL_ERROR(
1464                     "fatal flex scanner internal error--no action found" );
1465         } /* end of action switch */
1466     } /* end of scanning one token */
1467 } /* end of yylex */
1468 
1469 
1470 /* yy_get_next_buffer - try to read in a new buffer
1471  *
1472  * Returns a code representing an action:
1473  *	EOB_ACT_LAST_MATCH -
1474  *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1475  *	EOB_ACT_END_OF_FILE - end of file
1476  */
1477 
1478 static int yy_get_next_buffer()
1479 {
1480     register char* dest = yy_current_buffer->yy_ch_buf;
1481     register char* source = yytext_ptr;
1482     register int number_to_move, i;
1483     int ret_val;
1484 
1485     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1486         YY_FATAL_ERROR(
1487             "fatal flex scanner internal error--end of buffer missed" );
1488 
1489     if ( yy_current_buffer->yy_fill_buffer == 0 )
1490     {
1491         /* Don't try to fill the buffer, so this is an EOF. */
1492         if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1493         {
1494             /* We matched a single character, the EOB, so
1495              * treat this as a final EOF.
1496              */
1497             return EOB_ACT_END_OF_FILE;
1498         }
1499 
1500         else
1501         {
1502             /* We matched some text prior to the EOB, first
1503              * process it.
1504              */
1505             return EOB_ACT_LAST_MATCH;
1506         }
1507     }
1508 
1509     /* Try to read more data. */
1510 
1511     /* First move last chars to start of buffer. */
1512     number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1513 
1514     for ( i = 0; i < number_to_move; ++i )
1515         *(dest++) = *(source++);
1516 
1517     if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1518         /* don't do the read, it's not guaranteed to return an EOF,
1519          * just force an EOF
1520          */
1521         yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1522 
1523     else
1524     {
1525         int num_to_read =
1526             yy_current_buffer->yy_buf_size - number_to_move - 1;
1527 
1528         while ( num_to_read <= 0 )
1529         {
1530             /* Not enough room in the buffer - grow it. */
1531 #ifdef YY_USES_REJECT
1532             YY_FATAL_ERROR(
1533                 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1534 #else
1535 
1536             /* just a shorter name for the current buffer */
1537             YY_BUFFER_STATE b = yy_current_buffer;
1538 
1539             int yy_c_buf_p_offset =
1540                 (int) (yy_c_buf_p - b->yy_ch_buf);
1541 
1542             if ( b->yy_is_our_buffer )
1543             {
1544                 int new_size = b->yy_buf_size * 2;
1545 
1546                 if ( new_size <= 0 )
1547                     b->yy_buf_size += b->yy_buf_size / 8;
1548                 else
1549                     b->yy_buf_size *= 2;
1550 
1551                 b->yy_ch_buf = (char*)
1552                                /* Include room in for 2 EOB chars. */
1553                                yy_flex_realloc( (void*) b->yy_ch_buf,
1554                                                 b->yy_buf_size + 2 );
1555             }
1556             else
1557                 /* Can't grow it, we don't own it. */
1558                 b->yy_ch_buf = 0;
1559 
1560             if ( ! b->yy_ch_buf )
1561                 YY_FATAL_ERROR(
1562                     "fatal error - scanner input buffer overflow" );
1563 
1564             yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1565 
1566             num_to_read = yy_current_buffer->yy_buf_size -
1567                           number_to_move - 1;
1568 #endif
1569         }
1570 
1571         if ( num_to_read > YY_READ_BUF_SIZE )
1572             num_to_read = YY_READ_BUF_SIZE;
1573 
1574         /* Read in more data. */
1575         YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1576                   yy_n_chars, num_to_read );
1577 
1578         yy_current_buffer->yy_n_chars = yy_n_chars;
1579     }
1580 
1581     if ( yy_n_chars == 0 )
1582     {
1583         if ( number_to_move == YY_MORE_ADJ )
1584         {
1585             ret_val = EOB_ACT_END_OF_FILE;
1586             yyrestart( yyin );
1587         }
1588 
1589         else
1590         {
1591             ret_val = EOB_ACT_LAST_MATCH;
1592             yy_current_buffer->yy_buffer_status =
1593                 YY_BUFFER_EOF_PENDING;
1594         }
1595     }
1596 
1597     else
1598         ret_val = EOB_ACT_CONTINUE_SCAN;
1599 
1600     yy_n_chars += number_to_move;
1601     yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1602     yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1603 
1604     yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1605 
1606     return ret_val;
1607 }
1608 
1609 
1610 /* yy_get_previous_state - get the state just before the EOB char was reached */
1611 
yy_get_previous_state()1612 static yy_state_type yy_get_previous_state()
1613 {
1614     register yy_state_type yy_current_state;
1615     register char* yy_cp;
1616 
1617     yy_current_state = yy_start;
1618 
1619     for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1620     {
1621         register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1622 
1623         if ( yy_accept[yy_current_state] )
1624         {
1625             yy_last_accepting_state = yy_current_state;
1626             yy_last_accepting_cpos = yy_cp;
1627         }
1628 
1629         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1630         {
1631             yy_current_state = (int) yy_def[yy_current_state];
1632 
1633             if ( yy_current_state >= 394 )
1634                 yy_c = yy_meta[(unsigned int) yy_c];
1635         }
1636 
1637         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1638     }
1639 
1640     return yy_current_state;
1641 }
1642 
1643 
1644 /* yy_try_NUL_trans - try to make a transition on the NUL character
1645  *
1646  * synopsis
1647  *	next_state = yy_try_NUL_trans( current_state );
1648  */
1649 
1650 #ifdef YY_USE_PROTOS
yy_try_NUL_trans(yy_state_type yy_current_state)1651 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1652 #else
1653 static yy_state_type yy_try_NUL_trans( yy_current_state )
1654 yy_state_type yy_current_state;
1655 #endif
1656 {
1657     register int yy_is_jam;
1658     register char* yy_cp = yy_c_buf_p;
1659 
1660     register YY_CHAR yy_c = 1;
1661 
1662     if ( yy_accept[yy_current_state] )
1663     {
1664         yy_last_accepting_state = yy_current_state;
1665         yy_last_accepting_cpos = yy_cp;
1666     }
1667 
1668     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1669     {
1670         yy_current_state = (int) yy_def[yy_current_state];
1671 
1672         if ( yy_current_state >= 394 )
1673             yy_c = yy_meta[(unsigned int) yy_c];
1674     }
1675 
1676     yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1677     yy_is_jam = (yy_current_state == 393);
1678 
1679     return yy_is_jam ? 0 : yy_current_state;
1680 }
1681 
1682 
1683 #ifndef YY_NO_UNPUT
1684 #ifdef YY_USE_PROTOS
yyunput(int c,register char * yy_bp)1685 static void yyunput( int c, register char* yy_bp )
1686 #else
1687 static void yyunput( c, yy_bp )
1688 int c;
1689 register char* yy_bp;
1690 #endif
1691 {
1692     register char* yy_cp = yy_c_buf_p;
1693 
1694     /* undo effects of setting up yytext */
1695     *yy_cp = yy_hold_char;
1696 
1697     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1698     {
1699         /* need to shift things up to make room */
1700         /* +2 for EOB chars. */
1701         register int number_to_move = yy_n_chars + 2;
1702         register char* dest = &yy_current_buffer->yy_ch_buf[
1703                            yy_current_buffer->yy_buf_size + 2];
1704         register char* source =
1705             &yy_current_buffer->yy_ch_buf[number_to_move];
1706 
1707         while ( source > yy_current_buffer->yy_ch_buf )
1708             *--dest = *--source;
1709 
1710         yy_cp += (int) (dest - source);
1711         yy_bp += (int) (dest - source);
1712         yy_current_buffer->yy_n_chars =
1713             yy_n_chars = yy_current_buffer->yy_buf_size;
1714 
1715         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1716             YY_FATAL_ERROR( "flex scanner push-back overflow" );
1717     }
1718 
1719     *--yy_cp = (char) c;
1720 
1721 
1722     yytext_ptr = yy_bp;
1723     yy_hold_char = *yy_cp;
1724     yy_c_buf_p = yy_cp;
1725 }
1726 #endif	/* ifndef YY_NO_UNPUT */
1727 
1728 
1729 #ifdef __cplusplus
yyinput()1730 static int yyinput()
1731 #else
1732 static int input()
1733 #endif
1734 {
1735     int c;
1736 
1737     *yy_c_buf_p = yy_hold_char;
1738 
1739     if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1740     {
1741         /* yy_c_buf_p now points to the character we want to return.
1742          * If this occurs *before* the EOB characters, then it's a
1743          * valid NUL; if not, then we've hit the end of the buffer.
1744          */
1745         if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1746             /* This was really a NUL. */
1747             *yy_c_buf_p = '\0';
1748 
1749         else
1750         {
1751             /* need more input */
1752             int offset = yy_c_buf_p - yytext_ptr;
1753             ++yy_c_buf_p;
1754 
1755             switch ( yy_get_next_buffer() )
1756             {
1757                 case EOB_ACT_LAST_MATCH:
1758                     /* This happens because yy_g_n_b()
1759                      * sees that we've accumulated a
1760                      * token and flags that we need to
1761                      * try matching the token before
1762                      * proceeding.  But for input(),
1763                      * there's no matching to consider.
1764                      * So convert the EOB_ACT_LAST_MATCH
1765                      * to EOB_ACT_END_OF_FILE.
1766                      */
1767 
1768                     /* Reset buffer status. */
1769                     yyrestart( yyin );
1770 
1771                 /* fall through */
1772 
1773                 case EOB_ACT_END_OF_FILE:
1774                 {
1775                     if ( yywrap() )
1776                         return EOF;
1777 
1778                     if ( ! yy_did_buffer_switch_on_eof )
1779                         YY_NEW_FILE;
1780 
1781 #ifdef __cplusplus
1782                     return yyinput();
1783 #else
1784                     return input();
1785 #endif
1786                 }
1787 
1788                 case EOB_ACT_CONTINUE_SCAN:
1789                     yy_c_buf_p = yytext_ptr + offset;
1790                     break;
1791             }
1792         }
1793     }
1794 
1795     c = *(unsigned char*) yy_c_buf_p;	/* cast for 8-bit char's */
1796     *yy_c_buf_p = '\0';	/* preserve yytext */
1797     yy_hold_char = *++yy_c_buf_p;
1798 
1799 
1800     return c;
1801 }
1802 
1803 
1804 #ifdef YY_USE_PROTOS
yyrestart(FILE * input_file)1805 void yyrestart( FILE* input_file )
1806 #else
1807 void yyrestart( input_file )
1808 FILE* input_file;
1809 #endif
1810 {
1811     if ( ! yy_current_buffer )
1812         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1813 
1814     yy_init_buffer( yy_current_buffer, input_file );
1815     yy_load_buffer_state();
1816 }
1817 
1818 
1819 #ifdef YY_USE_PROTOS
yy_switch_to_buffer(YY_BUFFER_STATE new_buffer)1820 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1821 #else
1822 void yy_switch_to_buffer( new_buffer )
1823 YY_BUFFER_STATE new_buffer;
1824 #endif
1825 {
1826     if ( yy_current_buffer == new_buffer )
1827         return;
1828 
1829     if ( yy_current_buffer )
1830     {
1831         /* Flush out information for old buffer. */
1832         *yy_c_buf_p = yy_hold_char;
1833         yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1834         yy_current_buffer->yy_n_chars = yy_n_chars;
1835     }
1836 
1837     yy_current_buffer = new_buffer;
1838     yy_load_buffer_state();
1839 
1840     /* We don't actually know whether we did this switch during
1841      * EOF (yywrap()) processing, but the only time this flag
1842      * is looked at is after yywrap() is called, so it's safe
1843      * to go ahead and always set it.
1844      */
1845     yy_did_buffer_switch_on_eof = 1;
1846 }
1847 
1848 
1849 #ifdef YY_USE_PROTOS
yy_load_buffer_state(void)1850 void yy_load_buffer_state( void )
1851 #else
1852 void yy_load_buffer_state()
1853 #endif
1854 {
1855     yy_n_chars = yy_current_buffer->yy_n_chars;
1856     yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1857     yyin = yy_current_buffer->yy_input_file;
1858     yy_hold_char = *yy_c_buf_p;
1859 }
1860 
1861 
1862 #ifdef YY_USE_PROTOS
yy_create_buffer(FILE * file,int size)1863 YY_BUFFER_STATE yy_create_buffer( FILE* file, int size )
1864 #else
1865 YY_BUFFER_STATE yy_create_buffer( file, size )
1866 FILE* file;
1867 int size;
1868 #endif
1869 {
1870     YY_BUFFER_STATE b;
1871 
1872     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1873 
1874     if ( ! b )
1875         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1876 
1877     b->yy_buf_size = size;
1878 
1879     /* yy_ch_buf has to be 2 characters longer than the size given because
1880      * we need to put in 2 end-of-buffer characters.
1881      */
1882     b->yy_ch_buf = (char*) yy_flex_alloc( b->yy_buf_size + 2 );
1883 
1884     if ( ! b->yy_ch_buf )
1885         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1886 
1887     b->yy_is_our_buffer = 1;
1888 
1889     yy_init_buffer( b, file );
1890 
1891     return b;
1892 }
1893 
1894 
1895 #ifdef YY_USE_PROTOS
yy_delete_buffer(YY_BUFFER_STATE b)1896 void yy_delete_buffer( YY_BUFFER_STATE b )
1897 #else
1898 void yy_delete_buffer( b )
1899 YY_BUFFER_STATE b;
1900 #endif
1901 {
1902     if ( ! b )
1903         return;
1904 
1905     if ( b == yy_current_buffer )
1906         yy_current_buffer = (YY_BUFFER_STATE) 0;
1907 
1908     if ( b->yy_is_our_buffer )
1909         yy_flex_free( (void*) b->yy_ch_buf );
1910 
1911     yy_flex_free( (void*) b );
1912 }
1913 
1914 
1915 #ifndef YY_ALWAYS_INTERACTIVE
1916 #ifndef YY_NEVER_INTERACTIVE
1917 extern int isatty YY_PROTO(( int ));
1918 #endif
1919 #endif
1920 
1921 #ifdef YY_USE_PROTOS
yy_init_buffer(YY_BUFFER_STATE b,FILE * file)1922 void yy_init_buffer( YY_BUFFER_STATE b, FILE* file )
1923 #else
1924 void yy_init_buffer( b, file )
1925 YY_BUFFER_STATE b;
1926 FILE* file;
1927 #endif
1928 
1929 
1930 {
1931     yy_flush_buffer( b );
1932 
1933     b->yy_input_file = file;
1934     b->yy_fill_buffer = 1;
1935 
1936 #if YY_ALWAYS_INTERACTIVE
1937     b->yy_is_interactive = 1;
1938 #else
1939 #if YY_NEVER_INTERACTIVE
1940     b->yy_is_interactive = 0;
1941 #else
1942     b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1943 #endif
1944 #endif
1945 }
1946 
1947 
1948 #ifdef YY_USE_PROTOS
yy_flush_buffer(YY_BUFFER_STATE b)1949 void yy_flush_buffer( YY_BUFFER_STATE b )
1950 #else
1951 void yy_flush_buffer( b )
1952 YY_BUFFER_STATE b;
1953 #endif
1954 
1955 {
1956     if ( ! b )
1957         return;
1958 
1959     b->yy_n_chars = 0;
1960 
1961     /* We always need two end-of-buffer characters.  The first causes
1962      * a transition to the end-of-buffer state.  The second causes
1963      * a jam in that state.
1964      */
1965     b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1966     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1967 
1968     b->yy_buf_pos = &b->yy_ch_buf[0];
1969 
1970     b->yy_at_bol = 1;
1971     b->yy_buffer_status = YY_BUFFER_NEW;
1972 
1973     if ( b == yy_current_buffer )
1974         yy_load_buffer_state();
1975 }
1976 
1977 
1978 #ifndef YY_NO_SCAN_BUFFER
1979 #ifdef YY_USE_PROTOS
yy_scan_buffer(char * base,yy_size_t size)1980 YY_BUFFER_STATE yy_scan_buffer( char* base, yy_size_t size )
1981 #else
1982 YY_BUFFER_STATE yy_scan_buffer( base, size )
1983 char* base;
1984 yy_size_t size;
1985 #endif
1986 {
1987     YY_BUFFER_STATE b;
1988 
1989     if ( size < 2 ||
1990             base[size - 2] != YY_END_OF_BUFFER_CHAR ||
1991             base[size - 1] != YY_END_OF_BUFFER_CHAR )
1992         /* They forgot to leave room for the EOB's. */
1993         return 0;
1994 
1995     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1996 
1997     if ( ! b )
1998         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1999 
2000     b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
2001     b->yy_buf_pos = b->yy_ch_buf = base;
2002     b->yy_is_our_buffer = 0;
2003     b->yy_input_file = 0;
2004     b->yy_n_chars = b->yy_buf_size;
2005     b->yy_is_interactive = 0;
2006     b->yy_at_bol = 1;
2007     b->yy_fill_buffer = 0;
2008     b->yy_buffer_status = YY_BUFFER_NEW;
2009 
2010     yy_switch_to_buffer( b );
2011 
2012     return b;
2013 }
2014 #endif
2015 
2016 
2017 #ifndef YY_NO_SCAN_STRING
2018 #ifdef YY_USE_PROTOS
yy_scan_string(yyconst char * yy_str)2019 YY_BUFFER_STATE yy_scan_string( yyconst char* yy_str )
2020 #else
2021 YY_BUFFER_STATE yy_scan_string( yy_str )
2022 yyconst char* yy_str;
2023 #endif
2024 {
2025     int len;
2026 
2027     for ( len = 0; yy_str[len]; ++len )
2028         ;
2029 
2030     return yy_scan_bytes( yy_str, len );
2031 }
2032 #endif
2033 
2034 
2035 #ifndef YY_NO_SCAN_BYTES
2036 #ifdef YY_USE_PROTOS
yy_scan_bytes(yyconst char * bytes,int len)2037 YY_BUFFER_STATE yy_scan_bytes( yyconst char* bytes, int len )
2038 #else
2039 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2040 yyconst char* bytes;
2041 int len;
2042 #endif
2043 {
2044     YY_BUFFER_STATE b;
2045     char* buf;
2046     yy_size_t n;
2047     int i;
2048 
2049     /* Get memory for full buffer, including space for trailing EOB's. */
2050     n = len + 2;
2051     buf = (char*) yy_flex_alloc( n );
2052 
2053     if ( ! buf )
2054         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2055 
2056     for ( i = 0; i < len; ++i )
2057         buf[i] = bytes[i];
2058 
2059     buf[len] = buf[len + 1] = YY_END_OF_BUFFER_CHAR;
2060 
2061     b = yy_scan_buffer( buf, n );
2062 
2063     if ( ! b )
2064         YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2065 
2066     /* It's okay to grow etc. this buffer, and we should throw it
2067      * away when we're done.
2068      */
2069     b->yy_is_our_buffer = 1;
2070 
2071     return b;
2072 }
2073 #endif
2074 
2075 
2076 #ifndef YY_NO_PUSH_STATE
2077 #ifdef YY_USE_PROTOS
yy_push_state(int new_state)2078 static void yy_push_state( int new_state )
2079 #else
2080 static void yy_push_state( new_state )
2081 int new_state;
2082 #endif
2083 {
2084     if ( yy_start_stack_ptr >= yy_start_stack_depth )
2085     {
2086         yy_size_t new_size;
2087 
2088         yy_start_stack_depth += YY_START_STACK_INCR;
2089         new_size = yy_start_stack_depth * sizeof( int );
2090 
2091         if ( ! yy_start_stack )
2092             yy_start_stack = (int*) yy_flex_alloc( new_size );
2093 
2094         else
2095             yy_start_stack = (int*) yy_flex_realloc(
2096                                  (void*) yy_start_stack, new_size );
2097 
2098         if ( ! yy_start_stack )
2099             YY_FATAL_ERROR(
2100                 "out of memory expanding start-condition stack" );
2101     }
2102 
2103     yy_start_stack[yy_start_stack_ptr++] = YY_START;
2104 
2105     BEGIN(new_state);
2106 }
2107 #endif
2108 
2109 
2110 #ifndef YY_NO_POP_STATE
yy_pop_state()2111 static void yy_pop_state()
2112 {
2113     if ( --yy_start_stack_ptr < 0 )
2114         YY_FATAL_ERROR( "start-condition stack underflow" );
2115 
2116     BEGIN(yy_start_stack[yy_start_stack_ptr]);
2117 }
2118 #endif
2119 
2120 
2121 #ifndef YY_NO_TOP_STATE
yy_top_state()2122 static int yy_top_state()
2123 {
2124     return yy_start_stack[yy_start_stack_ptr - 1];
2125 }
2126 #endif
2127 
2128 #ifndef YY_EXIT_FAILURE
2129 #define YY_EXIT_FAILURE 2
2130 #endif
2131 
2132 #ifdef YY_USE_PROTOS
yy_fatal_error(yyconst char msg[])2133 static void yy_fatal_error( yyconst char msg[] )
2134 #else
2135 static void yy_fatal_error( msg )
2136 char msg[];
2137 #endif
2138 {
2139     (void) fprintf( stderr, "%s\n", msg );
2140     exit( YY_EXIT_FAILURE );
2141 }
2142 
2143 
2144 
2145 /* Redefine yyless() so it works in section 3 code. */
2146 
2147 #undef yyless
2148 #define yyless(n) \
2149 	do \
2150 		{ \
2151 		/* Undo effects of setting up yytext. */ \
2152 		yytext[yyleng] = yy_hold_char; \
2153 		yy_c_buf_p = yytext + n; \
2154 		yy_hold_char = *yy_c_buf_p; \
2155 		*yy_c_buf_p = '\0'; \
2156 		yyleng = n; \
2157 		} \
2158 	while ( 0 )
2159 
2160 
2161 /* Internal utility routines. */
2162 
2163 #ifndef yytext_ptr
2164 #ifdef YY_USE_PROTOS
yy_flex_strncpy(char * s1,yyconst char * s2,int n)2165 static void yy_flex_strncpy( char* s1, yyconst char* s2, int n )
2166 #else
2167 static void yy_flex_strncpy( s1, s2, n )
2168 char* s1;
2169 yyconst char* s2;
2170 int n;
2171 #endif
2172 {
2173     register int i;
2174 
2175     for ( i = 0; i < n; ++i )
2176         s1[i] = s2[i];
2177 }
2178 #endif
2179 
2180 #ifdef YY_NEED_STRLEN
2181 #ifdef YY_USE_PROTOS
yy_flex_strlen(yyconst char * s)2182 static int yy_flex_strlen( yyconst char* s )
2183 #else
2184 static int yy_flex_strlen( s )
2185 yyconst char* s;
2186 #endif
2187 {
2188     register int n;
2189 
2190     for ( n = 0; s[n]; ++n )
2191         ;
2192 
2193     return n;
2194 }
2195 #endif
2196 
2197 
2198 #ifdef YY_USE_PROTOS
yy_flex_alloc(yy_size_t size)2199 static void* yy_flex_alloc( yy_size_t size )
2200 #else
2201 static void* yy_flex_alloc( size )
2202 yy_size_t size;
2203 #endif
2204 {
2205     return (void*) malloc( size );
2206 }
2207 
2208 #ifdef YY_USE_PROTOS
yy_flex_realloc(void * ptr,yy_size_t size)2209 static void* yy_flex_realloc( void* ptr, yy_size_t size )
2210 #else
2211 static void* yy_flex_realloc( ptr, size )
2212 void* ptr;
2213 yy_size_t size;
2214 #endif
2215 {
2216     /* The cast to (char *) in the following accommodates both
2217      * implementations that use char* generic pointers, and those
2218      * that use void* generic pointers.  It works with the latter
2219      * because both ANSI C and C++ allow castless assignment from
2220      * any pointer type to void*, and deal with argument conversions
2221      * as though doing an assignment.
2222      */
2223     return (void*) realloc( (char*) ptr, size );
2224 }
2225 
2226 #ifdef YY_USE_PROTOS
yy_flex_free(void * ptr)2227 static void yy_flex_free( void* ptr )
2228 #else
2229 static void yy_flex_free( ptr )
2230 void* ptr;
2231 #endif
2232 {
2233     free( ptr );
2234 }
2235 
2236 #if YY_MAIN
main()2237 int main()
2238 {
2239     yylex();
2240     return 0;
2241 }
2242 #endif
2243 
2244 using namespace dmlpackage;
2245 
dmlerror(char const * s)2246 void dmlerror(char const* s)
2247 {
2248     printf("yyerror: %d: %s at %s\n", lineno, s, yytext);
2249 }
2250 
2251 namespace dmlpackage
2252 {
2253 
2254 static valbuf_t valbuf;
2255 
get_valbuffer(void)2256 valbuf_t get_valbuffer(void)
2257 {
2258     return valbuf;
2259 }
2260 
2261 /*
2262  * Called before any actual parsing is done
2263  */
scanner_init(const char * str)2264 void scanner_init(const char* str)
2265 {
2266     size_t slen = strlen(str);
2267 
2268     /*
2269      * Might be left over after ereport()
2270      */
2271     if (YY_CURRENT_BUFFER)
2272         yy_delete_buffer(YY_CURRENT_BUFFER);
2273 
2274     /*
2275      * Make a scan buffer with special termination needed by flex.
2276      */
2277     scanbuf =  (char*)malloc(slen + 2);
2278     memcpy(scanbuf, str, slen);
2279     scanbuf[slen] = scanbuf[slen + 1] = YY_END_OF_BUFFER_CHAR;
2280     scanbufhandle = yy_scan_buffer(scanbuf, slen + 2);
2281 
2282     BEGIN(INITIAL);
2283 
2284 
2285     valbuf.clear();
2286 }
2287 
2288 
2289 /*
2290  * Called after parsing is done to clean up after scanner_init()
2291  */
2292 
2293 
scanner_finish(void)2294 void scanner_finish(void)
2295 {
2296     char* str;
2297 
2298     yy_delete_buffer(scanbufhandle);
2299     free(scanbuf);
2300     unsigned int i;
2301 
2302     for (i = 0; i < valbuf.size(); i++)
2303     {
2304         str = valbuf[i];
2305 
2306         if (str)
2307         {
2308             //std::cout << "valbuf:(" << str << ")" << std::endl;
2309             free(valbuf[i]);
2310         }
2311     }
2312 
2313     valbuf.clear();
2314 }
2315 
scanner_copy(char * str)2316 char* scanner_copy (char* str)
2317 {
2318     char* nv = strdup(str);
2319 
2320     if (nv)
2321         valbuf.push_back(nv);
2322 
2323     return nv;
2324 }
2325 
2326 }
2327