source: git/Singular/scanner.cc @ f24b9c

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