source: git/Singular/scanner.cc @ 908905

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