source: git/Singular/scanner.cc @ 00c93d

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