source: git/Singular/scanner.cc

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