source: git/Singular/scanner.cc @ 5476e83

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