source: git/Singular/libparse.cc @ d3f95ab

fieker-DuValspielwiese
Last change on this file since d3f95ab was d3f95ab, checked in by Hans Schönemann <hannes@…>, 19 years ago
*hannes: check return codes git-svn-id: file:///usr/local/Singular/svn/trunk@8273 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 104.1 KB
Line 
1#define yy_create_buffer yylp_create_buffer
2#define yy_delete_buffer yylp_delete_buffer
3#define yy_scan_buffer yylp_scan_buffer
4#define yy_scan_string yylp_scan_string
5#define yy_scan_bytes yylp_scan_bytes
6#define yy_flex_debug yylp_flex_debug
7#define yy_init_buffer yylp_init_buffer
8#define yy_flush_buffer yylp_flush_buffer
9#define yy_load_buffer_state yylp_load_buffer_state
10#define yy_switch_to_buffer yylp_switch_to_buffer
11#define yyin yylpin
12#define yyleng yylpleng
13#define yylex yylplex
14#define yyout yylpout
15#define yyrestart yylprestart
16#define yytext yylptext
17#define yywrap yylpwrap
18
19/* A lexical scanner generated by flex */
20
21/* Scanner skeleton version:
22 * $Header: /exports/cvsroot-2/cvsroot/Singular/libparse.cc,v 1.6 2005-05-23 08:46:17 Singular Exp $
23 */
24
25#define FLEX_SCANNER
26#define YY_FLEX_MAJOR_VERSION 2
27#define YY_FLEX_MINOR_VERSION 5
28
29#include <stdio.h>
30
31
32/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
33#ifdef c_plusplus
34#ifndef __cplusplus
35#define __cplusplus
36#endif
37#endif
38
39
40#ifdef __cplusplus
41
42#include <stdlib.h>
43#include <unistd.h>
44
45/* Use prototypes in function declarations. */
46#define YY_USE_PROTOS
47
48/* The "const" storage-class-modifier is valid. */
49#define YY_USE_CONST
50
51#else   /* ! __cplusplus */
52
53#if __STDC__
54
55#define YY_USE_PROTOS
56#define YY_USE_CONST
57
58#endif  /* __STDC__ */
59#endif  /* ! __cplusplus */
60
61#ifdef __TURBOC__
62 #pragma warn -rch
63 #pragma warn -use
64#include <io.h>
65#include <stdlib.h>
66#define YY_USE_CONST
67#define YY_USE_PROTOS
68#endif
69
70#ifdef YY_USE_CONST
71#define yyconst const
72#else
73#define yyconst
74#endif
75
76
77#ifdef YY_USE_PROTOS
78#define YY_PROTO(proto) proto
79#else
80#define YY_PROTO(proto) ()
81#endif
82
83/* Returned upon end-of-file. */
84#define YY_NULL 0
85
86/* Promotes a possibly negative, possibly signed char to an unsigned
87 * integer for use as an array index.  If the signed char is negative,
88 * we want to instead treat it as an 8-bit unsigned char, hence the
89 * double cast.
90 */
91#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
92
93/* Enter a start condition.  This macro really ought to take a parameter,
94 * but we do it the disgusting crufty way forced on us by the ()-less
95 * definition of BEGIN.
96 */
97#define BEGIN yy_start = 1 + 2 *
98
99/* Translate the current start state into a value that can be later handed
100 * to BEGIN to return to the state.  The YYSTATE alias is for lex
101 * compatibility.
102 */
103#define YY_START ((yy_start - 1) / 2)
104#define YYSTATE YY_START
105
106/* Action number for EOF rule of a given start state. */
107#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
108
109/* Special action meaning "start processing a new file". */
110#define YY_NEW_FILE yyrestart( yyin )
111
112#define YY_END_OF_BUFFER_CHAR 0
113
114/* Size of default input buffer. */
115#define YY_BUF_SIZE 16384
116
117typedef struct yy_buffer_state *YY_BUFFER_STATE;
118
119extern int yyleng;
120extern FILE *yyin, *yyout;
121
122#define EOB_ACT_CONTINUE_SCAN 0
123#define EOB_ACT_END_OF_FILE 1
124#define EOB_ACT_LAST_MATCH 2
125
126/* The funky do-while in the following #define is used to turn the definition
127 * int a single C statement (which needs a semi-colon terminator).  This
128 * avoids problems with code like:
129 *
130 *      if ( condition_holds )
131 *              yyless( 5 );
132 *      else
133 *              do_something_else();
134 *
135 * Prior to using the do-while the compiler would get upset at the
136 * "else" because it interpreted the "if" statement as being all
137 * done when it reached the ';' after the yyless() call.
138 */
139
140/* Return all but the first 'n' matched characters back to the input stream. */
141
142#define yyless(n) \
143        do \
144                { \
145                /* Undo effects of setting up yytext. */ \
146                *yy_cp = yy_hold_char; \
147                YY_RESTORE_YY_MORE_OFFSET \
148                yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
149                YY_DO_BEFORE_ACTION; /* set up yytext again */ \
150                } \
151        while ( 0 )
152
153#define unput(c) yyunput( c, yytext_ptr )
154
155/* The following is because we cannot portably get our hands on size_t
156 * (without autoconf's help, which isn't available because we want
157 * flex-generated scanners to compile on their own).
158 */
159typedef unsigned int yy_size_t;
160
161
162struct yy_buffer_state
163        {
164        FILE *yy_input_file;
165
166        char *yy_ch_buf;                /* input buffer */
167        char *yy_buf_pos;               /* current position in input buffer */
168
169        /* Size of input buffer in bytes, not including room for EOB
170         * characters.
171         */
172        yy_size_t yy_buf_size;
173
174        /* Number of characters read into yy_ch_buf, not including EOB
175         * characters.
176         */
177        int yy_n_chars;
178
179        /* Whether we "own" the buffer - i.e., we know we created it,
180         * and can realloc() it to grow it, and should free() it to
181         * delete it.
182         */
183        int yy_is_our_buffer;
184
185        /* Whether this is an "interactive" input source; if so, and
186         * if we're using stdio for input, then we want to use getc()
187         * instead of fread(), to make sure we stop fetching input after
188         * each newline.
189         */
190        int yy_is_interactive;
191
192        /* Whether we're considered to be at the beginning of a line.
193         * If so, '^' rules will be active on the next match, otherwise
194         * not.
195         */
196        int yy_at_bol;
197
198        /* Whether to try to fill the input buffer when we reach the
199         * end of it.
200         */
201        int yy_fill_buffer;
202
203        int yy_buffer_status;
204#define YY_BUFFER_NEW 0
205#define YY_BUFFER_NORMAL 1
206        /* When an EOF's been seen but there's still some text to process
207         * then we mark the buffer as YY_EOF_PENDING, to indicate that we
208         * shouldn't try reading from the input source any more.  We might
209         * still have a bunch of tokens to match, though, because of
210         * possible backing-up.
211         *
212         * When we actually see the EOF, we change the status to "new"
213         * (via yyrestart()), so that the user can continue scanning by
214         * just pointing yyin at a new input file.
215         */
216#define YY_BUFFER_EOF_PENDING 2
217        };
218
219static YY_BUFFER_STATE yy_current_buffer = 0;
220
221/* We provide macros for accessing buffer states in case in the
222 * future we want to put the buffer states in a more general
223 * "scanner state".
224 */
225#define YY_CURRENT_BUFFER yy_current_buffer
226
227
228/* yy_hold_char holds the character lost when yytext is formed. */
229static char yy_hold_char;
230
231static int yy_n_chars;          /* number of characters read into yy_ch_buf */
232
233
234int yyleng;
235
236/* Points to current character in buffer. */
237static char *yy_c_buf_p = (char *) 0;
238static int yy_init = 1;         /* whether we need to initialize */
239static int yy_start = 0;        /* start state number */
240
241/* Flag which is used to allow yywrap()'s to do buffer switches
242 * instead of setting up a fresh yyin.  A bit of a hack ...
243 */
244static int yy_did_buffer_switch_on_eof;
245
246void yyrestart YY_PROTO(( FILE *input_file ));
247
248void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
249void yy_load_buffer_state YY_PROTO(( void ));
250YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
251void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
252void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
253void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
254#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
255
256YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
257YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
258YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
259
260static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
261static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
262static void yy_flex_free YY_PROTO(( void * ));
263
264#define yy_new_buffer yy_create_buffer
265
266#define yy_set_interactive(is_interactive) \
267        { \
268        if ( ! yy_current_buffer ) \
269                yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
270        yy_current_buffer->yy_is_interactive = is_interactive; \
271        }
272
273#define yy_set_bol(at_bol) \
274        { \
275        if ( ! yy_current_buffer ) \
276                yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
277        yy_current_buffer->yy_at_bol = at_bol; \
278        }
279
280#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
281
282typedef unsigned char YY_CHAR;
283FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
284typedef int yy_state_type;
285extern char *yytext;
286#define yytext_ptr yytext
287
288static yy_state_type yy_get_previous_state YY_PROTO(( void ));
289static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
290static int yy_get_next_buffer YY_PROTO(( void ));
291static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
292
293/* Done after the current pattern has been matched and before the
294 * corresponding action - sets up yytext.
295 */
296#define YY_DO_BEFORE_ACTION \
297        yytext_ptr = yy_bp; \
298        yytext_ptr -= yy_more_len; \
299        yyleng = (int) (yy_cp - yytext_ptr); \
300        yy_hold_char = *yy_cp; \
301        *yy_cp = '\0'; \
302        yy_c_buf_p = yy_cp;
303
304#define YY_NUM_RULES 95
305#define YY_END_OF_BUFFER 96
306static yyconst short int yy_accept[457] =
307    {   0,
308        0,    0,    0,    0,   27,   27,    0,    0,    0,    0,
309        0,    0,    0,    0,    0,    0,   48,   48,    0,    0,
310        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
311        0,    0,    0,    0,    0,    0,   96,   94,    1,   91,
312       92,    2,   93,   94,   94,   94,   94,   94,   94,   94,
313       94,   19,   18,   19,   19,   19,   19,   19,   19,   19,
314       28,   27,   26,   28,   28,   28,   28,   28,   28,   28,
315       95,   29,   95,   95,   95,   38,   31,   35,   32,   33,
316       37,   34,   42,   42,   95,   42,   42,   42,   42,   42,
317       42,   41,   46,   45,   46,   44,   48,   50,   47,   49,
318
319       62,   61,   52,   57,   58,   62,   59,   60,   62,   55,
320       56,   82,   81,   74,   77,   78,   82,   79,   80,   75,
321       76,   87,   86,   83,   87,   72,   71,   69,   72,   90,
322       89,   90,   65,   64,   63,   68,   67,   66,    0,    1,
323        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
324        0,    0,    0,    0,    0,    0,   27,   27,    0,    0,
325        0,    0,    0,    0,    0,   29,    0,   30,    0,    0,
326       36,    0,    0,    0,    0,    0,    0,    0,   41,    0,
327        0,    0,    0,    0,   41,   41,   43,   48,   51,    0,
328       73,   85,   84,   70,   88,    0,    1,    1,    0,    1,
329
330        0,    0,    0,    0,    0,    0,    0,    0,    0,   13,
331       12,    0,    0,    0,    0,    0,   27,   27,   27,   27,
332       21,   20,    0,    0,    0,    0,    0,   36,   36,    0,
333        0,    0,   40,    0,   41,    0,    0,    0,    0,    0,
334       51,    0,   73,    0,    0,    0,    1,    0,    0,    0,
335        0,    0,    0,    0,    0,   13,   12,   12,    0,    0,
336        0,    0,    0,   27,   21,   20,   20,    0,    0,    0,
337        0,    0,    0,    0,   40,    0,    0,   39,    0,   40,
338        0,    0,    0,    9,   10,    0,    0,    0,    0,    0,
339        0,    0,    0,    0,   12,    0,    0,    0,    0,   16,
340
341        0,   14,   20,    0,    0,    0,    0,   24,    0,   23,
342        0,    0,   39,    0,    0,    0,    0,    0,    0,    0,
343        0,    0,    7,    7,    6,    0,    0,   11,    0,    0,
344       15,    0,   17,    0,    0,   22,    0,   25,    0,    0,
345        0,    0,    0,   54,    0,    0,    7,    7,    0,    8,
346        0,    0,    3,    0,    0,    7,    7,    7,    0,    0,
347       11,   11,   11,    0,    0,    0,    0,    0,    0,    7,
348        7,    7,    0,    3,    3,    0,    0,    0,    0,    0,
349        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
350        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
351
352        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
353        0,    0,    0,    5,    0,    0,   11,    0,    0,    0,
354        0,    0,    0,   53,    0,    0,    0,    0,    0,    4,
355        0,    0,    5,    5,   11,   11,   11,    0,    0,    0,
356        0,    0,    0,    0,    4,    4,    0,    0,    0,    0,
357        0,    0,    0,    0,    0,    0
358    } ;
359
360static yyconst int yy_ec[256] =
361    {   0,
362        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
363        1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
364        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
365        1,    5,    6,    7,    8,    9,   10,   11,   12,   13,
366       14,   15,   11,   16,   11,   10,   17,   18,   18,   18,
367       18,   18,   18,   18,   18,   18,   18,   19,   20,   11,
368       21,   11,   11,   12,   22,   23,   22,   22,   22,   22,
369       22,   24,   25,   22,   22,   26,   22,   22,   22,   22,
370       22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
371       27,   28,   29,   30,   31,   11,   32,   22,   33,   34,
372
373       35,   36,   37,   22,   38,   22,   22,   39,   40,   41,
374       42,   43,   22,   44,   45,   46,   22,   47,   22,   48,
375       49,   22,   50,   11,   51,   11,    1,    1,    1,    1,
376        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
377        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
378        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
379        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
380        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
381        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
382        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
383
384        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
385        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
386        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
387        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
388        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
389        1,    1,    1,    1,    1
390    } ;
391
392static yyconst int yy_meta[52] =
393    {   0,
394        1,    2,    3,    4,    2,    1,    5,    6,    1,    5,
395        1,    7,    8,    9,    5,   10,    5,   11,    5,    1,
396        1,    7,    7,    7,    7,    7,    1,    1,    1,    5,
397        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
398        7,    7,    7,    7,    7,    7,    7,    7,    7,    4,
399        1
400    } ;
401
402static yyconst short int yy_base[505] =
403    {   0,
404        0,   46,    6,   91,  137,  183,  230,  281,  332,  383,
405        5,   11,  434,    0,    9,   12,   62,   68,  483,  532,
406        0,    0,  581,  630,   24,   71,   79,   85,   26,   31,
407       51,   53,   80,   93,    0,    0, 1182, 2024, 1129, 2024,
408     2024, 1146, 2024, 1137, 1148, 1120, 1102, 1107, 1100, 1092,
409     1102, 2024, 2024, 1119,   60, 1100, 1089, 1089, 1085, 1059,
410     2024,   93, 2024, 1084,   89, 1068, 1058, 1061, 1067, 1043,
411     2024, 2024, 1073, 1065, 1062, 2024, 2024, 2024, 2024, 2024,
412     1042, 2024, 2024,  680,    0,    0,  123,  730,  141,  148,
413      154, 2024, 2024, 2024,  995, 2024,   99, 2024, 2024, 2024,
414
415     2024, 2024, 2024, 2024, 2024, 1026, 2024, 2024,  997, 2024,
416     2024, 2024, 2024, 2024, 2024, 2024, 1019, 2024, 2024, 2024,
417     2024, 2024, 2024, 2024,    4, 2024, 2024, 2024,   14, 2024,
418     2024,  965, 2024, 2024, 2024, 2024, 2024, 2024,  937,  963,
419      956,  971,  930,  943,  938,  931,  940,  925,  114,  962,
420      950,  916,  925,  916,  935,  914,  100,  780,  948,  933,
421      894,  897,  888,  908,  887, 2024,  921, 2024,  905,  910,
422      897,    0,    0,  161,    0,  169,  175,  188, 2024,  906,
423      905,  203,  903,   83,  830,  194, 2024,  109,    0,  861,
424        0, 2024, 2024, 2024, 2024,  853,    0,  873,  209,    0,
425
426      749,  743,  635,  643,  629,  629,  210,  111,  655,    0,
427      654,  635,  627,  621,  215,  631,  639,  638,  636,  631,
428        0,  629,  603,  594,  590,  222,  601,    0,  607,  261,
429      267,  316,    0,  322,  616,    0,    0,  366,    0,  610,
430        0,  582,    0,  574,  247,  599,    0,  566,  554,  353,
431      223,  555,  547,  546,  535,    0,    0,  550,  529,  360,
432      527,  291,  559,    0,    0,    0,  541,  518,  490,  510,
433      412,  542,  373,  500, 2024,  512,  518,    0,  526, 2024,
434      539,  274,  240, 2024, 2024,  498,  499,  346,  549,  311,
435      503,  482,  486,  494,  491,  457,  403,  597,  449, 2024,
436
437      482, 2024,  471,  445,  569,  609,  390, 2024,  424, 2024,
438      575,  617,    0,  396,  880,  884,  933,  496,  386,  394,
439      647,  982,   91, 2024, 2024,  387,  392, 1033,  378,  658,
440     2024,  380, 2024,  376,  897, 2024,  377, 2024,  903,  273,
441      384,  295,  504, 2024,  310,    0,  129, 2024,  360, 2024,
442      392,  372,    0,  347,  340,  131,  163,  171,  637,  309,
443        0, 1084,  321,  281,  918,  273,  922,  939,  555,  192,
444      230,  382,  624, 2024,  307, 1046, 1061,  259, 1053, 1073,
445     1112, 1104, 1118, 1124,  940,  275, 1152,  947, 1153, 1183,
446     1173, 1138, 1203, 1213, 1233,  280, 1190, 1283, 1289, 1295,
447
448     1304, 1310,  878, 1068,  246,    0,  253, 1133,   72, 1316,
449     1336,  255,  249,    0,  239,  233, 1387, 1415, 1421, 1416,
450      574,  156, 1400, 2024, 1172, 1171, 1427,  211,  196,    0,
451      176,  134, 2024,  130,    0, 1458,  113, 1444,  377, 1508,
452     1472, 1486, 1538, 1468, 2024,  108, 1514,    0,   96, 1544,
453      216, 1550,  578,  242, 1558, 2024, 1589, 1600, 1611, 1622,
454     1633, 1644, 1655, 1666, 1677, 1688, 1699, 1710, 1721, 1732,
455     1743, 1750, 1757, 1768, 1779, 1790, 1801, 1812, 1823, 1834,
456     1845, 1856, 1866, 1872, 1878, 1888, 1889, 1900,   73, 1905,
457     1916, 1926, 1936, 1942, 1948, 1953,   50, 1964, 1974, 1984,
458
459     1991, 2001, 2007, 2012
460    } ;
461
462static yyconst short int yy_def[505] =
463    {   0,
464      457,  457,  458,  458,  459,  459,  460,  460,  461,  461,
465      462,  462,  456,   13,  463,  463,  464,  464,  465,  465,
466      464,  464,  466,  466,  467,  467,  468,  468,  469,  469,
467      470,  470,  471,  471,  464,  464,  456,  456,  456,  456,
468      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
469      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
470      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
471      456,  456,  472,  456,  473,  456,  456,  456,  456,  456,
472      456,  456,  456,  456,   84,   84,   84,  456,   84,   84,
473       84,  456,  456,  456,  456,  456,  456,  456,  456,  456,
474
475      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
476      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
477      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
478      456,  456,  456,  456,  456,  456,  456,  456,  456,  474,
479      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
480      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
481      456,  456,  456,  456,  456,  456,  472,  456,  456,  473,
482      475,   84,   84,   84,   88,   84,   84,   84,  456,   88,
483       88,   88,   88,   88,  456,   84,  456,  456,  476,  456,
484      477,  456,  456,  456,  456,  456,  474,  474,  456,  478,
485
486      456,  456,  456,  456,  456,  456,  456,  456,  456,  479,
487      480,  456,  456,  456,  456,  456,  158,  158,  158,  158,
488      481,  482,  456,  456,  456,  456,  456,  475,  475,   84,
489       88,   88,  185,   88,   88,  185,  185,  456,  185,  185,
490      476,  456,  477,  456,  456,  456,  478,  456,  456,  456,
491      456,  456,  456,  456,  456,  479,  480,  480,  456,  456,
492      456,  456,  456,  158,  481,  482,  482,  456,  456,  456,
493      456,  456,   84,   84,  456,   88,   88,  185,  456,  456,
494      185,  483,  456,  456,  456,  456,  456,  456,  456,  484,
495      456,  456,  456,  456,  480,  456,  456,  456,  456,  456,
496
497      456,  456,  482,  456,  456,  456,  456,  456,  456,  456,
498      185,  185,  185,  483,  485,  483,  485,  486,  456,  456,
499      456,  456,  487,  456,  456,  456,  456,  488,  456,  456,
500      456,  456,  456,  456,  456,  456,  456,  456,  456,  317,
501      489,  317,  317,  456,  316,  317,  490,  456,  456,  456,
502      322,  322,  322,  322,  322,  487,  487,  487,  456,  456,
503      491,  488,  362,  456,  456,  456,  456,  492,  493,  490,
504      490,  490,  456,  456,  322,  456,  456,  456,  456,  456,
505      456,  456,  456,  456,  494,  456,  495,  492,  492,  495,
506      493,  456,  456,  456,  456,  456,  456,  456,  456,  456,
507
508      456,  456,  496,  456,  497,  390,  456,  389,  389,  456,
509      456,  395,  395,  395,  395,  395,  498,  456,  456,  496,
510      456,  456,  456,  456,  499,  500,  496,  411,  411,  411,
511      411,  411,  456,  395,  501,  498,  436,  502,  456,  503,
512      499,  499,  503,  500,  456,  411,  504,  443,  456,  442,
513      442,  504,  456,  456,  504,    0,  456,  456,  456,  456,
514      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
515      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
516      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
517      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
518
519      456,  456,  456,  456
520    } ;
521
522static yyconst short int yy_nxt[2076] =
523    {   0,
524      456,   39,   40,   41,   39,  456,   77,   78,   53,   77,
525      192,   94,   77,   78,   94,   77,   42,   79,   80,   43,
526      194,   81,   54,   79,   80,   44,  123,   81,  131,   45,
527      124,  193,   46,  131,   47,   55,   95,   48,   56,   95,
528      132,  194,   49,   57,   50,  132,   51,   39,   40,   41,
529       39,  125,   58,  134,   82,  134,  425,  135,   96,  135,
530       82,   96,   42,   97,   98,   43,   97,  150,   99,   97,
531       98,   44,   97,  123,   99,   45,  151,  124,   46,  368,
532       47,  127,  137,   48,  407,  128,  138,  127,   49,  234,
533       50,  128,   51,   53,  157,  137,  159,  157,  125,  138,
534
535      188,  157,  409,  188,  157,  160,  129,   54,  357,  455,
536      188,  100,  129,  188,  445,  207,   59,  100,  207,  208,
537       55,  358,  208,   56,  174,  177,  177,  174,   57,  177,
538      209,  437,  235,   60,  254,  255,  433,   58,   62,   63,
539      446,   62,  174,  177,  177,  174,  371,  177,  357,  174,
540      177,  177,  174,   64,  177,  174,  177,  177,  174,  372,
541      177,  358,  174,  177,  177,  174,   65,  177,  407,   66,
542      174,  177,  177,  174,   67,  177,  174,  177,  177,  174,
543      357,  177,  445,   68,   62,   63,  422,   62,  357,  174,
544      177,  177,  174,  358,  177,  174,  177,  177,  174,   64,
545
546      177,  358,  445,  186,  231,  232,  232,  231,   69,  371,
547      245,  207,   65,  245,  207,   66,  262,  445,  208,  262,
548       67,  246,  372,  271,  290,   70,  271,  290,  449,   68,
549       71,   71,   71,   71,   71,   71,   72,  186,   71,  434,
550       71,  318,   71,   71,  318,  433,  451,  371,  245,   71,
551       71,  245,  233,  284,  449,  433,   71,   71,   71,  246,
552      372,  433,  273,  274,  274,  273,  427,  230,  231,  232,
553      232,  231,  454,  230,  339,  314,  426,  339,  314,   71,
554       71,   71,   71,   71,   71,   71,   71,   72,  404,   71,
555      405,   71,  262,   71,   71,  262,  339,  300,  417,  339,
556
557       71,   71,  396,  301,  316,  340,  317,   71,   71,   71,
558      275,  345,  290,  374,  345,  290,  233,  231,  232,  232,
559      231,  382,  230,  276,  277,  277,  276,  340,  230,  379,
560       71,   71,   71,   71,   71,   71,   71,   71,   74,  363,
561       71,  324,   71,  378,   71,   71,  375,  288,  288,  288,
562      288,   71,   71,  374,  288,  288,  288,  288,   71,   71,
563       71,  297,  297,  297,  297,  233,  289,  279,  279,  279,
564      279,  278,  238,  289,  273,  274,  274,  273,  374,  177,
565      298,   71,   71,   71,   71,   71,   71,   71,   71,   74,
566      404,   71,  405,   71,  250,   71,   71,  314,  374,  371,
567
568      314,  260,   71,   71,  297,  297,  297,  297,  373,   71,
569       71,   71,  372,  271,  369,  280,  271,  367,  308,  366,
570      365,  364,  275,  298,  309,  360,  316,  359,  350,  349,
571      338,  337,   71,   71,   83,   84,   85,   86,   84,   87,
572       88,   87,   89,   87,   87,   89,   87,   87,   87,   87,
573       87,   89,   87,   87,   87,   90,   90,   90,   90,   90,
574       87,   91,   87,   87,   87,   90,   90,   90,   90,   90,
575       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
576       90,   90,   90,   92,   87,  102,  334,  267,  333,  103,
577      332,  305,  305,  305,  305,  104,  105,  318,  329,  106,
578
579      318,  273,  274,  274,  273,  339,  177,  258,  339,  107,
580      306,  108,  328,  276,  277,  277,  276,  327,  230,  276,
581      277,  277,  276,  326,  230,  109,  348,  279,  279,  279,
582      279,  269,  110,  111,  102,  325,  340,  320,  103,  319,
583      311,  312,  312,  311,  104,  105,  310,  307,  106,  275,
584      321,  321,  321,  321,  304,  322,  385,  303,  107,  385,
585      108,  278,  386,  302,  299,  296,  295,  278,  294,  289,
586      305,  305,  305,  305,  109,  280,  311,  312,  312,  311,
587      293,  110,  111,  113,  292,  391,  407,  114,  313,  306,
588      449,  421,  291,  115,  116,  453,  287,  117,  330,  330,
589
590      330,  330,  286,  331,  422,  285,  283,  118,  454,  119,
591      335,  335,  335,  335,  282,  336,  281,  298,  311,  312,
592      312,  311,  230,  229,  313,  392,  392,  392,  392,  306,
593      120,  121,  113,  272,  270,  269,  114,  268,  376,  376,
594      376,  376,  115,  116,  393,  267,  117,  264,  321,  321,
595      321,  321,  217,  322,  217,  217,  118,  377,  119,  330,
596      330,  330,  330,  263,  331,  261,  313,  289,  260,  259,
597      258,  149,  373,  253,  252,  251,  250,  359,  298,  120,
598      121,  172,  173,  173,  172,  174,  175,  174,  176,  174,
599      174,  176,  174,  174,  174,  174,  174,  176,  174,  174,
600
601      174,  177,  177,  177,  177,  177,  174,  178,  174,  174,
602      174,  177,  177,  177,  177,  177,  177,  177,  177,  177,
603      177,  177,  177,  177,  177,  177,  177,  177,  177,  179,
604      174,  180,  181,  181,  180,  180,  182,  180,  183,  180,
605      180,  183,  180,  180,  180,  180,  180,  183,  180,  180,
606      180,  181,  181,  181,  181,  181,  180,  184,  180,  180,
607      180,  181,  181,  181,  181,  181,  181,  181,  181,  181,
608      181,  181,  181,  181,  181,  181,  181,  181,  181,  185,
609      180,  217,  249,  248,  217,  217,  218,  217,  219,  217,
610      217,  219,  217,  217,  217,  217,  220,  219,  217,  217,
611
612      217,  218,  218,  218,  218,  218,  217,  217,  217,  217,
613      217,  218,  218,  218,  218,  218,  218,  218,  218,  218,
614      218,  218,  218,  218,  218,  218,  218,  218,  218,  217,
615      217,  236,  237,  237,  236,  236,  238,  236,  239,  236,
616      236,  239,  236,  236,  236,  236,  236,  239,  236,  236,
617      236,  237,  237,  237,  237,  237,  236,  240,  236,  236,
618      236,  237,  237,  237,  237,  237,  237,  237,  237,  237,
619      237,  237,  237,  237,  237,  237,  237,  237,  237,  236,
620      236,  339,  339,  339,  339,  339,  339,  339,  339,  198,
621      407,  404,  341,  405,  244,  421,  341,  342,  335,  335,
622
623      335,  335,  242,  336,  339,  339,  339,  339,  422,  230,
624      343,  230,  230,  229,  316,  341,  169,  306,  168,  380,
625      380,  380,  380,  383,  383,  383,  383,  166,  227,  344,
626      226,  225,  224,  344,  345,  339,  339,  345,  381,  223,
627      385,  385,  384,  385,  385,  341,  386,  386,  385,  222,
628      342,  385,  344,  221,  386,  216,  388,  215,  365,  214,
629      213,  212,  367,  343,  388,  346,  211,  210,  206,  389,
630      386,  205,  204,  203,  202,  201,  200,  389,  199,  198,
631      196,  195,  344,  351,  352,  352,  351,  351,  353,  351,
632      354,  351,  351,  354,  351,  351,  351,  351,  351,  354,
633
634      351,  351,  351,  352,  352,  352,  352,  352,  351,  355,
635      351,  351,  351,  352,  352,  352,  352,  352,  352,  352,
636      352,  352,  352,  352,  352,  352,  352,  352,  352,  352,
637      352,  351,  351,  361,  361,  191,  361,  361,  361,  361,
638      190,  361,  189,  361,  187,  361,  361,  376,  376,  376,
639      376,  363,  361,  361,  397,  397,  397,  397,  171,  361,
640      361,  361,  394,  394,  394,  394,  377,  395,  169,  423,
641      423,  423,  423,  398,  380,  380,  380,  380,  168,  166,
642      341,  377,  361,  361,  361,  361,  165,  361,  361,  361,
643      361,  164,  361,  381,  361,  163,  361,  361,  162,  161,
644
645      158,  379,  156,  361,  361,  400,  400,  400,  400,  155,
646      361,  361,  361,  399,  399,  399,  399,  424,  331,  383,
647      383,  383,  383,  154,  401,  402,  402,  402,  402,  153,
648      336,  152,  381,  361,  361,  149,  148,  147,  384,  392,
649      392,  392,  392,  146,  384,  407,  456,  145,  456,  144,
650      408,  143,  382,  385,  385,  142,  385,  385,  393,  386,
651      386,  141,  140,  409,  407,  404,  404,  405,  405,  408,
652      388,  139,  438,  438,  385,  438,  438,  385,  439,  439,
653      386,  456,  409,  389,  385,  456,  404,  385,  405,  441,
654      386,  397,  397,  397,  397,  407,  404,  456,  405,  456,
655
656      408,  444,  442,  391,  410,  410,  410,  410,  456,  411,
657      398,  456,  456,  409,  394,  394,  394,  394,  456,  395,
658      456,  456,  456,  393,  456,  456,  456,  456,  456,  456,
659      456,  456,  456,  377,  412,  413,  413,  412,  412,  414,
660      412,  415,  412,  412,  415,  412,  412,  412,  412,  412,
661      415,  412,  412,  412,  413,  413,  413,  413,  413,  412,
662      416,  412,  412,  412,  413,  413,  413,  413,  413,  413,
663      413,  413,  413,  413,  413,  413,  413,  413,  413,  413,
664      413,  413,  412,  412,  418,  418,  418,  418,  456,  331,
665      399,  399,  399,  399,  456,  331,  400,  400,  400,  400,
666
667      456,  456,  456,  398,  456,  419,  419,  419,  419,  381,
668      336,  402,  402,  402,  402,  401,  336,  410,  410,  410,
669      410,  456,  411,  456,  401,  456,  456,  456,  456,  456,
670      384,  456,  456,  456,  456,  456,  393,  428,  429,  429,
671      428,  428,  430,  428,  431,  428,  428,  431,  428,  428,
672      428,  428,  428,  431,  428,  428,  428,  429,  429,  429,
673      429,  429,  428,  432,  428,  428,  428,  429,  429,  429,
674      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
675      429,  429,  429,  429,  429,  428,  428,  435,  435,  456,
676      435,  435,  435,  435,  456,  435,  456,  435,  456,  435,
677
678      435,  423,  423,  423,  423,  437,  435,  435,  456,  456,
679      456,  456,  456,  435,  435,  435,  418,  418,  418,  418,
680      456,  331,  419,  419,  419,  419,  456,  336,  407,  456,
681      456,  456,  456,  421,  456,  398,  435,  435,  456,  407,
682      404,  401,  405,  456,  421,  438,  422,  456,  438,  424,
683      456,  439,  456,  456,  456,  456,  456,  422,  435,  435,
684      456,  435,  435,  435,  435,  456,  435,  456,  435,  438,
685      435,  435,  438,  438,  439,  439,  438,  435,  435,  439,
686      456,  404,  456,  405,  435,  435,  435,  438,  456,  441,
687      438,  456,  456,  439,  456,  456,  456,  456,  444,  404,
688
689      456,  405,  442,  441,  456,  456,  456,  435,  435,  438,
690      456,  456,  438,  456,  456,  439,  442,  456,  456,  456,
691      449,  404,  456,  405,  456,  450,  449,  404,  456,  405,
692      456,  453,  456,  456,  456,  456,  456,  456,  451,  438,
693      456,  456,  438,  456,  454,  439,  456,  456,  456,  456,
694      449,  404,  456,  405,  456,  450,  449,  456,  456,  456,
695      456,  450,  449,  456,  456,  456,  456,  453,  451,  456,
696      449,  404,  456,  405,  451,  453,  456,  456,  456,  456,
697      454,  456,  456,  456,  456,  456,  456,  456,  454,   38,
698       38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
699
700       52,   52,   52,   52,   52,   52,   52,   52,   52,   52,
701       52,   61,   61,   61,   61,   61,   61,   61,   61,   61,
702       61,   61,   73,   73,   73,   73,   73,   73,   73,   73,
703       73,   73,   73,   75,   75,   75,   75,   75,   75,   75,
704       75,   75,   75,   75,   76,   76,   76,   76,   76,   76,
705       76,   76,   76,   76,   76,   93,   93,   93,   93,   93,
706       93,   93,   93,   93,   93,   93,   71,   71,   71,   71,
707       71,   71,   71,   71,   71,   71,   71,  101,  101,  101,
708      101,  101,  101,  101,  101,  101,  101,  101,  112,  112,
709      112,  112,  112,  112,  112,  112,  112,  112,  112,  122,
710
711      122,  122,  122,  122,  122,  122,  122,  122,  122,  122,
712      126,  126,  126,  126,  126,  126,  126,  126,  126,  126,
713      126,  130,  130,  130,  130,  130,  130,  130,  130,  130,
714      130,  130,  133,  133,  133,  133,  133,  133,  133,  133,
715      133,  133,  133,  136,  136,  136,  136,  136,  136,  136,
716      136,  136,  136,  136,  167,  167,  167,  456,  456,  167,
717      167,  170,  170,  170,  456,  456,  170,  170,  197,  197,
718      456,  197,  197,  197,  197,  197,  197,  197,  197,  228,
719      228,  456,  228,  228,  228,  228,  228,  228,  228,  228,
720      241,  241,  456,  241,  241,  241,  241,  241,  241,  241,
721
722      241,  243,  243,  456,  243,  243,  243,  243,  243,  243,
723      243,  243,  247,  247,  456,  247,  247,  247,  247,  247,
724      247,  247,  247,  256,  256,  456,  256,  256,  256,  256,
725      256,  256,  256,  256,  257,  257,  456,  257,  257,  257,
726      257,  257,  257,  257,  257,  265,  265,  456,  265,  265,
727      265,  265,  265,  265,  265,  265,  266,  266,  456,  266,
728      266,  266,  266,  266,  266,  266,  266,  315,  456,  456,
729      456,  456,  315,  323,  456,  456,  456,  456,  323,  340,
730      340,  340,  456,  456,  340,  340,  456,  456,  340,  347,
731      456,  456,  456,  456,  347,  356,  456,  456,  456,  356,
732
733      362,  362,  456,  362,  362,  362,  362,  362,  362,  362,
734      362,  370,  456,  456,  456,  370,  361,  361,  456,  361,
735      361,  361,  361,  361,  361,  361,  361,  387,  456,  456,
736      456,  387,  387,  456,  456,  456,  387,  390,  456,  456,
737      456,  390,  390,  403,  456,  456,  456,  403,  403,  406,
738      456,  456,  456,  406,  406,  406,  406,  406,  406,  420,
739      420,  420,  420,  420,  436,  436,  456,  436,  436,  436,
740      436,  436,  436,  436,  436,  440,  456,  456,  456,  440,
741      440,  456,  456,  456,  440,  443,  456,  456,  456,  443,
742      443,  435,  435,  456,  435,  435,  435,  435,  435,  435,
743
744      435,  435,  447,  456,  456,  456,  447,  447,  448,  456,
745      456,  456,  448,  448,  448,  448,  448,  448,  452,  452,
746      452,  452,  452,   37,  456,  456,  456,  456,  456,  456,
747      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
748      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
749      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
750      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
751      456,  456,  456,  456,  456
752    } ;
753
754static yyconst short int yy_chk[2076] =
755    {   0,
756        0,    1,    1,    1,    1,    0,   11,   11,    3,   11,
757      125,   15,   12,   12,   16,   12,    1,   11,   11,    1,
758      129,   11,    3,   12,   12,    1,   25,   12,   29,    1,
759       25,  125,    1,   30,    1,    3,   15,    1,    3,   16,
760       29,  129,    1,    3,    1,   30,    1,    2,    2,    2,
761        2,   25,    3,   31,   11,   32,  497,   31,   15,   32,
762       12,   16,    2,   17,   17,    2,   17,   55,   17,   18,
763       18,    2,   18,   26,   18,    2,   55,   26,    2,  489,
764        2,   27,   33,    2,  409,   27,   33,   28,    2,  184,
765        2,   28,    2,    4,   62,   34,   65,   62,   26,   34,
766
767       97,  157,  409,   97,  157,   65,   27,    4,  323,  449,
768      188,   17,   28,  188,  446,  149,    4,   18,  149,  208,
769        4,  323,  149,    4,   87,   87,   87,   87,    4,   87,
770      149,  437,  184,    4,  208,  208,  434,    4,    5,    5,
771      432,    5,   89,   89,   89,   89,  347,   89,  356,   90,
772       90,   90,   90,    5,   90,   91,   91,   91,   91,  347,
773       91,  356,  174,  174,  174,  174,    5,  174,  422,    5,
774      176,  176,  176,  176,    5,  176,  177,  177,  177,  177,
775      357,  177,  431,    5,    6,    6,  422,    6,  358,  178,
776      178,  178,  178,  357,  178,  186,  186,  186,  186,    6,
777
778      186,  358,  429,   91,  182,  182,  182,  182,    6,  370,
779      199,  207,    6,  199,  207,    6,  215,  428,  207,  215,
780        6,  199,  370,  226,  251,    6,  226,  251,  451,    6,
781        7,    7,    7,    7,    7,    7,    7,  178,    7,  416,
782        7,  283,    7,    7,  283,  415,  451,  371,  245,    7,
783        7,  245,  182,  245,  454,  413,    7,    7,    7,  245,
784      371,  412,  230,  230,  230,  230,  407,  230,  231,  231,
785      231,  231,  454,  231,  340,  282,  405,  340,  282,    7,
786        7,    8,    8,    8,    8,    8,    8,    8,  386,    8,
787      386,    8,  262,    8,    8,  262,  342,  262,  396,  342,
788
789        8,    8,  378,  262,  282,  340,  282,    8,    8,    8,
790      230,  345,  290,  375,  345,  290,  231,  232,  232,  232,
791      232,  366,  232,  234,  234,  234,  234,  342,  234,  364,
792        8,    8,    9,    9,    9,    9,    9,    9,    9,  363,
793        9,  290,    9,  360,    9,    9,  355,  288,  288,  288,
794      288,    9,    9,  354,  250,  250,  250,  250,    9,    9,
795        9,  260,  260,  260,  260,  232,  288,  238,  238,  238,
796      238,  234,  238,  250,  273,  273,  273,  273,  352,  273,
797      260,    9,    9,   10,   10,   10,   10,   10,   10,   10,
798      439,   10,  439,   10,  250,   10,   10,  314,  351,  372,
799
800      314,  260,   10,   10,  297,  297,  297,  297,  349,   10,
801       10,   10,  372,  271,  341,  238,  271,  337,  271,  334,
802      332,  329,  273,  297,  271,  327,  314,  326,  320,  319,
803      309,  307,   10,   10,   13,   13,   13,   13,   13,   13,
804       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
805       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
806       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
807       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
808       13,   13,   13,   13,   13,   19,  304,  303,  301,   19,
809      299,  269,  269,  269,  269,   19,   19,  318,  296,   19,
810
811      318,  274,  274,  274,  274,  343,  274,  295,  343,   19,
812      269,   19,  294,  276,  276,  276,  276,  293,  276,  277,
813      277,  277,  277,  292,  277,   19,  318,  279,  279,  279,
814      279,  269,   19,   19,   20,  291,  343,  287,   20,  286,
815      281,  281,  281,  281,   20,   20,  272,  270,   20,  274,
816      289,  289,  289,  289,  268,  289,  369,  267,   20,  369,
817       20,  276,  369,  263,  261,  259,  258,  277,  255,  289,
818      305,  305,  305,  305,   20,  279,  311,  311,  311,  311,
819      254,   20,   20,   23,  253,  369,  421,   23,  281,  305,
820      453,  421,  252,   23,   23,  453,  249,   23,  298,  298,
821
822      298,  298,  248,  298,  421,  246,  244,   23,  453,   23,
823      306,  306,  306,  306,  242,  306,  240,  298,  312,  312,
824      312,  312,  235,  229,  311,  373,  373,  373,  373,  306,
825       23,   23,   24,  227,  225,  224,   24,  223,  359,  359,
826      359,  359,   24,   24,  373,  222,   24,  220,  321,  321,
827      321,  321,  219,  321,  218,  217,   24,  359,   24,  330,
828      330,  330,  330,  216,  330,  214,  312,  321,  213,  212,
829      211,  209,  373,  206,  205,  204,  203,  359,  330,   24,
830       24,   84,   84,   84,   84,   84,   84,   84,   84,   84,
831       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
832
833       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
834       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
835       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
836       84,   88,   88,   88,   88,   88,   88,   88,   88,   88,
837       88,   88,   88,   88,   88,   88,   88,   88,   88,   88,
838       88,   88,   88,   88,   88,   88,   88,   88,   88,   88,
839       88,   88,   88,   88,   88,   88,   88,   88,   88,   88,
840       88,   88,   88,   88,   88,   88,   88,   88,   88,   88,
841       88,  158,  202,  201,  158,  158,  158,  158,  158,  158,
842      158,  158,  158,  158,  158,  158,  158,  158,  158,  158,
843
844      158,  158,  158,  158,  158,  158,  158,  158,  158,  158,
845      158,  158,  158,  158,  158,  158,  158,  158,  158,  158,
846      158,  158,  158,  158,  158,  158,  158,  158,  158,  158,
847      158,  185,  185,  185,  185,  185,  185,  185,  185,  185,
848      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
849      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
850      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
851      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
852      185,  315,  315,  315,  315,  316,  316,  316,  316,  198,
853      403,  403,  315,  403,  196,  403,  316,  315,  335,  335,
854
855      335,  335,  190,  335,  339,  339,  339,  339,  403,  183,
856      315,  181,  180,  171,  316,  339,  170,  335,  169,  365,
857      365,  365,  365,  367,  367,  367,  367,  167,  165,  315,
858      164,  163,  162,  316,  317,  317,  317,  317,  365,  161,
859      368,  385,  367,  368,  385,  317,  368,  385,  388,  160,
860      317,  388,  339,  159,  388,  156,  368,  155,  365,  154,
861      153,  152,  367,  317,  388,  317,  151,  150,  148,  368,
862      385,  147,  146,  145,  144,  143,  142,  388,  141,  140,
863      139,  132,  317,  322,  322,  322,  322,  322,  322,  322,
864      322,  322,  322,  322,  322,  322,  322,  322,  322,  322,
865
866      322,  322,  322,  322,  322,  322,  322,  322,  322,  322,
867      322,  322,  322,  322,  322,  322,  322,  322,  322,  322,
868      322,  322,  322,  322,  322,  322,  322,  322,  322,  322,
869      322,  322,  322,  328,  328,  117,  328,  328,  328,  328,
870      109,  328,  106,  328,   95,  328,  328,  376,  376,  376,
871      376,  328,  328,  328,  379,  379,  379,  379,   81,  328,
872      328,  328,  377,  377,  377,  377,  376,  377,   75,  404,
873      404,  404,  404,  379,  380,  380,  380,  380,   74,   73,
874      404,  377,  328,  328,  362,  362,   70,  362,  362,  362,
875      362,   69,  362,  380,  362,   68,  362,  362,   67,   66,
876
877       64,  379,   60,  362,  362,  382,  382,  382,  382,   59,
878      362,  362,  362,  381,  381,  381,  381,  404,  381,  383,
879      383,  383,  383,   58,  382,  384,  384,  384,  384,   57,
880      384,   56,  381,  362,  362,   54,   51,   50,  383,  392,
881      392,  392,  392,   49,  384,  408,  408,   48,  408,   47,
882      408,   46,  382,  387,  389,   45,  387,  389,  392,  387,
883      389,   44,   42,  408,  387,  387,  389,  387,  389,  387,
884      389,   39,  426,  425,  391,  426,  425,  391,  426,  425,
885      391,   37,  387,  389,  390,    0,  391,  390,  391,  425,
886      390,  397,  397,  397,  397,  390,  390,    0,  390,    0,
887
888      390,  426,  425,  391,  393,  393,  393,  393,    0,  393,
889      397,    0,    0,  390,  394,  394,  394,  394,    0,  394,
890        0,    0,    0,  393,    0,    0,    0,    0,    0,    0,
891        0,    0,    0,  394,  395,  395,  395,  395,  395,  395,
892      395,  395,  395,  395,  395,  395,  395,  395,  395,  395,
893      395,  395,  395,  395,  395,  395,  395,  395,  395,  395,
894      395,  395,  395,  395,  395,  395,  395,  395,  395,  395,
895      395,  395,  395,  395,  395,  395,  395,  395,  395,  395,
896      395,  395,  395,  395,  398,  398,  398,  398,    0,  398,
897      399,  399,  399,  399,    0,  399,  400,  400,  400,  400,
898
899        0,    0,    0,  398,    0,  401,  401,  401,  401,  399,
900      401,  402,  402,  402,  402,  400,  402,  410,  410,  410,
901      410,    0,  410,    0,  401,    0,    0,    0,    0,    0,
902      402,    0,    0,    0,    0,    0,  410,  411,  411,  411,
903      411,  411,  411,  411,  411,  411,  411,  411,  411,  411,
904      411,  411,  411,  411,  411,  411,  411,  411,  411,  411,
905      411,  411,  411,  411,  411,  411,  411,  411,  411,  411,
906      411,  411,  411,  411,  411,  411,  411,  411,  411,  411,
907      411,  411,  411,  411,  411,  411,  411,  417,  417,    0,
908      417,  417,  417,  417,    0,  417,    0,  417,    0,  417,
909
910      417,  423,  423,  423,  423,  417,  417,  417,    0,    0,
911        0,    0,    0,  417,  417,  417,  418,  418,  418,  418,
912        0,  418,  419,  419,  419,  419,    0,  419,  420,  420,
913        0,  420,    0,  420,    0,  418,  417,  417,    0,  427,
914      427,  419,  427,    0,  427,  438,  420,    0,  438,  423,
915        0,  438,    0,    0,    0,    0,    0,  427,  436,  436,
916        0,  436,  436,  436,  436,    0,  436,    0,  436,  444,
917      436,  436,  444,  441,  438,  444,  441,  436,  436,  441,
918        0,  444,    0,  444,  436,  436,  436,  442,    0,  441,
919      442,    0,    0,  442,    0,    0,    0,    0,  444,  442,
920
921        0,  442,  441,  442,    0,    0,    0,  436,  436,  440,
922        0,    0,  440,    0,    0,  440,  442,    0,    0,    0,
923      440,  440,    0,  440,    0,  440,  447,  447,    0,  447,
924        0,  447,    0,    0,    0,    0,    0,    0,  440,  443,
925        0,    0,  443,    0,  447,  443,    0,    0,    0,    0,
926      443,  443,    0,  443,    0,  443,  450,  450,    0,  450,
927        0,  450,  452,  452,    0,  452,    0,  452,  443,    0,
928      455,  455,    0,  455,  450,  455,    0,    0,    0,    0,
929      452,    0,    0,    0,    0,    0,    0,    0,  455,  457,
930      457,  457,  457,  457,  457,  457,  457,  457,  457,  457,
931
932      458,  458,  458,  458,  458,  458,  458,  458,  458,  458,
933      458,  459,  459,  459,  459,  459,  459,  459,  459,  459,
934      459,  459,  460,  460,  460,  460,  460,  460,  460,  460,
935      460,  460,  460,  461,  461,  461,  461,  461,  461,  461,
936      461,  461,  461,  461,  462,  462,  462,  462,  462,  462,
937      462,  462,  462,  462,  462,  463,  463,  463,  463,  463,
938      463,  463,  463,  463,  463,  463,  464,  464,  464,  464,
939      464,  464,  464,  464,  464,  464,  464,  465,  465,  465,
940      465,  465,  465,  465,  465,  465,  465,  465,  466,  466,
941      466,  466,  466,  466,  466,  466,  466,  466,  466,  467,
942
943      467,  467,  467,  467,  467,  467,  467,  467,  467,  467,
944      468,  468,  468,  468,  468,  468,  468,  468,  468,  468,
945      468,  469,  469,  469,  469,  469,  469,  469,  469,  469,
946      469,  469,  470,  470,  470,  470,  470,  470,  470,  470,
947      470,  470,  470,  471,  471,  471,  471,  471,  471,  471,
948      471,  471,  471,  471,  472,  472,  472,    0,    0,  472,
949      472,  473,  473,  473,    0,    0,  473,  473,  474,  474,
950        0,  474,  474,  474,  474,  474,  474,  474,  474,  475,
951      475,    0,  475,  475,  475,  475,  475,  475,  475,  475,
952      476,  476,    0,  476,  476,  476,  476,  476,  476,  476,
953
954      476,  477,  477,    0,  477,  477,  477,  477,  477,  477,
955      477,  477,  478,  478,    0,  478,  478,  478,  478,  478,
956      478,  478,  478,  479,  479,    0,  479,  479,  479,  479,
957      479,  479,  479,  479,  480,  480,    0,  480,  480,  480,
958      480,  480,  480,  480,  480,  481,  481,    0,  481,  481,
959      481,  481,  481,  481,  481,  481,  482,  482,    0,  482,
960      482,  482,  482,  482,  482,  482,  482,  483,    0,    0,
961        0,    0,  483,  484,    0,    0,    0,    0,  484,  485,
962      485,  485,    0,    0,  485,  485,    0,    0,  485,  486,
963        0,    0,    0,    0,  486,  487,    0,    0,    0,  487,
964
965      488,  488,    0,  488,  488,  488,  488,  488,  488,  488,
966      488,  490,    0,    0,    0,  490,  491,  491,    0,  491,
967      491,  491,  491,  491,  491,  491,  491,  492,    0,    0,
968        0,  492,  492,    0,    0,    0,  492,  493,    0,    0,
969        0,  493,  493,  494,    0,    0,    0,  494,  494,  495,
970        0,    0,    0,  495,  495,  495,  495,  495,  495,  496,
971      496,  496,  496,  496,  498,  498,    0,  498,  498,  498,
972      498,  498,  498,  498,  498,  499,    0,    0,    0,  499,
973      499,    0,    0,    0,  499,  500,    0,    0,    0,  500,
974      500,  501,  501,    0,  501,  501,  501,  501,  501,  501,
975
976      501,  501,  502,    0,    0,    0,  502,  502,  503,    0,
977        0,    0,  503,  503,  503,  503,  503,  503,  504,  504,
978      504,  504,  504,  456,  456,  456,  456,  456,  456,  456,
979      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
980      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
981      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
982      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
983      456,  456,  456,  456,  456
984    } ;
985
986static yy_state_type yy_last_accepting_state;
987static char *yy_last_accepting_cpos;
988
989/* The intent behind this definition is that it'll catch
990 * any uses of REJECT which flex missed.
991 */
992#define REJECT reject_used_but_not_detected
993static int yy_more_flag = 0;
994static int yy_more_len = 0;
995#define yymore() (yy_more_flag = 1)
996#define YY_MORE_ADJ yy_more_len
997#define YY_RESTORE_YY_MORE_OFFSET
998char *yytext;
999#line 1 "libparse.l"
1000#define INITIAL 0
1001#line 2 "libparse.l"
1002/****************************************
1003*  Computer Algebra System SINGULAR     *
1004****************************************/
1005/* $Id: libparse.cc,v 1.6 2005-05-23 08:46:17 Singular Exp $ */
1006#include <stdio.h>
1007#include <string.h>
1008#include <stdlib.h>
1009#include <ctype.h>
1010#include "mod2.h"
1011#ifdef STANDALONE_PARSER
1012  #include "utils.h"
1013  #define HAVE_LIBPARSER
1014  #define YYLPDEBUG 1
1015  #include "../kernel/febase.cc"
1016#else
1017  #include "subexpr.h"
1018  #include "grammar.h"
1019  #include "ipshell.h"
1020  #include "ipid.h"
1021  #include "tok.h"
1022  #include "febase.h"
1023  #include "omalloc.h"
1024#endif
1025#include "libparse.h"
1026
1027#ifdef HAVE_LIBPARSER
1028#define YY_SKIP_YYWRAP
1029
1030typedef enum { LP_NONE, LP_INFO, LP_CATEGORY, LP_VERSION} lib_cmds;
1031
1032int libread(FILE* f, char* buf, int max_size);
1033int current_pos(int i);
1034void print_version(lp_modes mode, char *p);
1035void copy_string(lp_modes mode);
1036extern void piCleanUp(procinfov pi);
1037void make_version(char *p, int what);
1038
1039int brace1 = 0;  /* { } */
1040int brace2 = 0;  /* ( ) */
1041int brace3 = 0;  /* [ ] */
1042int quote  = 0;  /* " */
1043int offset = 0;
1044BOOLEAN p_static = FALSE;
1045int old_state = 0;
1046lib_cmds last_cmd = LP_NONE;
1047
1048char libnamebuf[128];
1049char *text_buffer=NULL;
1050long string_start;
1051
1052char *yylp_buffer_start;
1053int yylplineno = 1;
1054int lpverbose = 0, check = 0;
1055int texinfo_out = 0;
1056int found_info=0,
1057    found_cat=0,
1058    found_version=0,
1059    found_oldhelp = 0,
1060    found_proc_in_proc = 0;
1061
1062char *yylp_errlist[]= {
1063   "",
1064   "missing close bracket ')' for proc definition in line %d.",  /*  1 */
1065   "missing close bracket ')' for procbody in line %d.",         /*  2 */
1066   "missing close bracket ']' for procbody in line %d.",         /*  3 */
1067   "too many ')' closed brackets in line %d.",                   /*  4 */
1068   "too many ']' closed brackets in line %d.",                   /*  5 */
1069   "missing close bracket ')' for example in line %d.",          /*  6 */
1070   "missing close bracket ']' for example in line %d.",          /*  7 */
1071   "cannot assign character '%c' in line %d to any group.",      /*  8 */
1072   "there must be a quote missing somewhere before line %d.",    /*  9 */
1073   "missing close bracket '}' at end of library in line %d.",    /* 10 */
1074   "missing close bracket ')' at end of library in line %d.",    /* 11 */
1075   "missing close bracket ']' at end of library in line %d.",    /* 12 */
1076   NULL
1077};
1078int yylp_errno = 0;
1079
1080#ifdef __MWERKS__
1081#ifdef __cplusplus
1082extern "C" {
1083#endif
1084long   ftell(FILE *fp);
1085#ifdef macintosh
1086int    fileno(FILE *stream);
1087FILE   *fdopen(int filedes, char *type);
1088int    isatty(int filedes);
1089#else
1090int    _fileno(FILE *stream);
1091FILE   *_fdopen(int filedes, char *type);
1092int    _isatty(int filedes);
1093#define fileno  _fileno
1094#define fdopen  _fdopen
1095#define isatty  _isatty
1096#endif /* macintosh */
1097#ifdef __cplusplus
1098}
1099#endif
1100#endif
1101
1102#ifdef STANDALONE_PARSER
1103procinfov pi;
1104int category_out = 0;
1105void printpi(procinfov pi);
1106void pi_clear(procinfov pi);
1107extern "C" {
1108  int yylpwrap();
1109}
1110void main_init(int argc, char *argv[]);
1111void main_result(char *libname);
1112#else /* STANDALONE_PARSER */
1113idhdl h0;
1114#ifdef HAVE_NS
1115idhdl h_top;
1116#endif
1117#define pi IDPROC(h0)
1118extern "C"
1119{
1120  int yylpwrap();
1121}
1122extern libstackv library_stack;
1123#endif /* STANDALONE_PARSER */
1124
1125static unsigned long help_chksum;
1126
1127#define SET_DEF_END(mode, pi, p) \
1128  if ( mode == LOAD_LIB) pi->data.s.def_end = p;
1129#define SET_HELP_START(mode, pi, p) \
1130  if ( mode == LOAD_LIB) {pi->data.s.help_start = p; help_chksum = 0;}
1131#define SET_HELP_END(mode, pi, p) \
1132  if ( mode == LOAD_LIB) {pi->data.s.help_end = p;  \
1133              pi->data.s.help_chksum = help_chksum;}
1134
1135#define SET_BODY_START(mode, pi, l, p) \
1136     if ( mode == LOAD_LIB)            \
1137     {                                 \
1138       pi->data.s.body_lineno = l;     \
1139       pi->data.s.body_start = p;      \
1140     }
1141#define SET_BODY_END(mode, pi, p) \
1142     if ( mode == LOAD_LIB)       \
1143     {                            \
1144       pi->data.s.body_end = p-1; \
1145       pi->data.s.proc_end = p-1; \
1146     }
1147
1148#define SET_EXAMPLE_START(mode, pi, l, p) \
1149   if ( mode == LOAD_LIB)                 \
1150   {                                      \
1151     pi->data.s.example_lineno = l;       \
1152     pi->data.s.example_start = p;        \
1153   }
1154#define SET_PROC_END(mode, pi, p)   \
1155     if ( mode == LOAD_LIB)         \
1156     {                              \
1157       pi->data.s.proc_end = p-1;   \
1158       if(pi->data.s.body_end==0)   \
1159         pi->data.s.body_end = p-1; \
1160     }
1161
1162#define ROTATE_RIGHT(c) if ((c) & 01) (c) = ((c) >>1) + 0x8000; else (c) >>= 1;
1163#define IncrCheckSum(c)                          \
1164do                                            \
1165{                                             \
1166  ROTATE_RIGHT(help_chksum);                  \
1167  help_chksum += c;                           \
1168  help_chksum &= 0xffff;                      \
1169}                                             \
1170while(0)
1171
1172#undef YY_DECL
1173#ifdef HAVE_NS
1174#define YY_DECL int yylex(char *newlib, char *libfile, \
1175                           lib_style_types *lib_style, \
1176                           idhdl pl, BOOLEAN autoexport, lp_modes mode)
1177#else
1178#define YY_DECL int yylex(char *newlib, char *libfile, \
1179                           lib_style_types *lib_style, \
1180                           lp_modes mode)
1181#endif /* HAVE_NS */
1182
1183#undef YY_INPUT
1184#define YY_INPUT(buf,result,max_size) \
1185          if ( ((result = libread( (yyin), (char *) buf, max_size )) < 0 ) \
1186                  && ferror( yyin ) ) \
1187                YY_FATAL_ERROR( "read in flex scanner failed" );
1188
1189#define YY_USER_INIT { \
1190       BEGIN(header); \
1191       yylplineno = 1; \
1192       yylp_errno = 0; \
1193       *lib_style = OLD_LIBSTYLE; \
1194       strcpy(libnamebuf,"(**unknown version**)"); \
1195     }
1196
1197#if 0
1198<pbody>proc[ \t]+{name}  {
1199                           printf("MISSING: PROC-cmd found. ERROR!\n"); }
1200<pbody>example[ \t]*\n   {
1201                           yylplineno++;
1202                           printf("MISSING: EXAMPLE-cmd found. ERROR!\n"); }
1203info=+"\"" {
1204#endif
1205
1206/* %start START */
1207#define header 1
1208
1209#define help 2
1210
1211#define libcmd 3
1212
1213#define libcmd2 4
1214
1215#define pdef 5
1216
1217#define phead 6
1218
1219#define poldhelp 7
1220
1221#define phelp 8
1222
1223#define pbody 9
1224
1225#define pstr 10
1226
1227#define pexample 11
1228
1229#define pestr 12
1230
1231#define string 13
1232
1233#define comment 14
1234
1235#define info 15
1236
1237#define category 16
1238
1239#define version 17
1240
1241
1242/* Macros after this point can all be overridden by user definitions in
1243 * section 1.
1244 */
1245
1246#ifndef YY_SKIP_YYWRAP
1247#ifdef __cplusplus
1248extern "C" int yywrap YY_PROTO(( void ));
1249#else
1250extern int yywrap YY_PROTO(( void ));
1251#endif
1252#endif
1253
1254#ifndef YY_NO_UNPUT
1255static void yyunput YY_PROTO(( int c, char *buf_ptr ));
1256#endif
1257
1258#ifndef yytext_ptr
1259static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
1260#endif
1261
1262#ifdef YY_NEED_STRLEN
1263static int yy_flex_strlen YY_PROTO(( yyconst char * ));
1264#endif
1265
1266#ifndef YY_NO_INPUT
1267#ifdef __cplusplus
1268static int yyinput YY_PROTO(( void ));
1269#else
1270static int input YY_PROTO(( void ));
1271#endif
1272#endif
1273
1274#if YY_STACK_USED
1275static int yy_start_stack_ptr = 0;
1276static int yy_start_stack_depth = 0;
1277static int *yy_start_stack = 0;
1278#ifndef YY_NO_PUSH_STATE
1279static void yy_push_state YY_PROTO(( int new_state ));
1280#endif
1281#ifndef YY_NO_POP_STATE
1282static void yy_pop_state YY_PROTO(( void ));
1283#endif
1284#ifndef YY_NO_TOP_STATE
1285static int yy_top_state YY_PROTO(( void ));
1286#endif
1287
1288#else
1289#define YY_NO_PUSH_STATE 1
1290#define YY_NO_POP_STATE 1
1291#define YY_NO_TOP_STATE 1
1292#endif
1293
1294#ifdef YY_MALLOC_DECL
1295YY_MALLOC_DECL
1296#else
1297#if __STDC__
1298#ifndef __cplusplus
1299#include <stdlib.h>
1300#endif
1301#else
1302/* Just try to get by without declaring the routines.  This will fail
1303 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
1304 * or sizeof(void*) != sizeof(int).
1305 */
1306#endif
1307#endif
1308
1309/* Amount of stuff to slurp up with each read. */
1310#ifndef YY_READ_BUF_SIZE
1311#define YY_READ_BUF_SIZE 8192
1312#endif
1313
1314/* Copy whatever the last rule matched to the standard output. */
1315
1316#ifndef ECHO
1317/* This used to be an fputs(), but since the string might contain NUL's,
1318 * we now use fwrite().
1319 */
1320#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
1321#endif
1322
1323/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
1324 * is returned in "result".
1325 */
1326#ifndef YY_INPUT
1327#define YY_INPUT(buf,result,max_size) \
1328        if ( yy_current_buffer->yy_is_interactive ) \
1329                { \
1330                int c = '*', n; \
1331                for ( n = 0; n < max_size && \
1332                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1333                        buf[n] = (char) c; \
1334                if ( c == '\n' ) \
1335                        buf[n++] = (char) c; \
1336                if ( c == EOF && ferror( yyin ) ) \
1337                        YY_FATAL_ERROR( "input in flex scanner failed" ); \
1338                result = n; \
1339                } \
1340        else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
1341                  && ferror( yyin ) ) \
1342                YY_FATAL_ERROR( "input in flex scanner failed" );
1343#endif
1344
1345/* No semi-colon after return; correct usage is to write "yyterminate();" -
1346 * we don't want an extra ';' after the "return" because that will cause
1347 * some compilers to complain about unreachable statements.
1348 */
1349#ifndef yyterminate
1350#define yyterminate() return YY_NULL
1351#endif
1352
1353/* Number of entries by which start-condition stack grows. */
1354#ifndef YY_START_STACK_INCR
1355#define YY_START_STACK_INCR 25
1356#endif
1357
1358/* Report a fatal error. */
1359#ifndef YY_FATAL_ERROR
1360#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1361#endif
1362
1363/* Default declaration of generated scanner - a define so the user can
1364 * easily add parameters.
1365 */
1366#ifndef YY_DECL
1367#define YY_DECL int yylex YY_PROTO(( void ))
1368#endif
1369
1370/* Code executed at the beginning of each rule, after yytext and yyleng
1371 * have been set up.
1372 */
1373#ifndef YY_USER_ACTION
1374#define YY_USER_ACTION
1375#endif
1376
1377/* Code executed at the end of each rule. */
1378#ifndef YY_BREAK
1379#define YY_BREAK break;
1380#endif
1381
1382#define YY_RULE_SETUP \
1383        if ( yyleng > 0 ) \
1384                yy_current_buffer->yy_at_bol = \
1385                                (yytext[yyleng - 1] == '\n'); \
1386        YY_USER_ACTION
1387
1388YY_DECL
1389        {
1390        register yy_state_type yy_current_state;
1391        register char *yy_cp = NULL, *yy_bp = NULL;
1392        register int yy_act;
1393
1394#line 258 "libparse.l"
1395
1396
1397        if ( yy_init )
1398                {
1399                yy_init = 0;
1400
1401#ifdef YY_USER_INIT
1402                YY_USER_INIT;
1403#endif
1404
1405                if ( ! yy_start )
1406                        yy_start = 1;   /* first start state */
1407
1408                if ( ! yyin )
1409                        yyin = stdin;
1410
1411                if ( ! yyout )
1412                        yyout = stdout;
1413
1414                if ( ! yy_current_buffer )
1415                        yy_current_buffer =
1416                                yy_create_buffer( yyin, YY_BUF_SIZE );
1417
1418                yy_load_buffer_state();
1419                }
1420
1421        while ( 1 )             /* loops until end-of-file is reached */
1422                {
1423                yy_more_len = 0;
1424                if ( yy_more_flag )
1425                        {
1426                        yy_more_len = yy_c_buf_p - yytext_ptr;
1427                        yy_more_flag = 0;
1428                        }
1429                yy_cp = yy_c_buf_p;
1430
1431                /* Support of yytext. */
1432                *yy_cp = yy_hold_char;
1433
1434                /* yy_bp points to the position in yy_ch_buf of the start of
1435                 * the current run.
1436                 */
1437                yy_bp = yy_cp;
1438
1439                yy_current_state = yy_start;
1440                yy_current_state += YY_AT_BOL();
1441yy_match:
1442                do
1443                        {
1444                        register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1445                        if ( yy_accept[yy_current_state] )
1446                                {
1447                                yy_last_accepting_state = yy_current_state;
1448                                yy_last_accepting_cpos = yy_cp;
1449                                }
1450                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1451                                {
1452                                yy_current_state = (int) yy_def[yy_current_state];
1453                                if ( yy_current_state >= 457 )
1454                                        yy_c = yy_meta[(unsigned int) yy_c];
1455                                }
1456                        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1457                        ++yy_cp;
1458                        }
1459                while ( yy_base[yy_current_state] != 2024 );
1460
1461yy_find_action:
1462                yy_act = yy_accept[yy_current_state];
1463                if ( yy_act == 0 )
1464                        { /* have to back up */
1465                        yy_cp = yy_last_accepting_cpos;
1466                        yy_current_state = yy_last_accepting_state;
1467                        yy_act = yy_accept[yy_current_state];
1468                        }
1469
1470                YY_DO_BEFORE_ACTION;
1471
1472
1473do_action:      /* This label is used only to access EOF actions. */
1474
1475
1476                switch ( yy_act )
1477        { /* beginning of action switch */
1478                        case 0: /* must back up */
1479                        /* undo the effects of YY_DO_BEFORE_ACTION */
1480                        *yy_cp = yy_hold_char;
1481                        yy_cp = yy_last_accepting_cpos;
1482                        yy_current_state = yy_last_accepting_state;
1483                        goto yy_find_action;
1484
1485case 1:
1486YY_RULE_SETUP
1487#line 259 "libparse.l"
1488{ }
1489        YY_BREAK
1490case 2:
1491YY_RULE_SETUP
1492#line 260 "libparse.l"
1493{ old_state = YYSTATE; BEGIN(comment); }
1494        YY_BREAK
1495case 3:
1496YY_RULE_SETUP
1497#line 262 "libparse.l"
1498{
1499         yyless(4); old_state = YYSTATE; BEGIN(info);
1500       }
1501        YY_BREAK
1502case 4:
1503YY_RULE_SETUP
1504#line 265 "libparse.l"
1505{
1506         yyless(8); old_state = YYSTATE; BEGIN(category);
1507       }
1508        YY_BREAK
1509case 5:
1510YY_RULE_SETUP
1511#line 268 "libparse.l"
1512{
1513             found_version++;
1514             if ( mode != GET_INFO )
1515             {
1516               make_version(yytext,1);
1517               #ifdef STANDALONE_PARSER
1518               if (texinfo_out)
1519               {
1520                 char *c = libnamebuf;
1521                 printf("$version = \"");
1522                 while (*c != '\0')
1523                 {
1524                    if (*== '$' || *== '@') putchar('\\');
1525                    if (*c != '\r') putchar(*c);
1526                    if (*== '\\')
1527                    {
1528                      c++;
1529                      if (*c != '"') putchar('\\');
1530                    }
1531                    else
1532                      c++;
1533                 }
1534                 printf("\";\n");
1535               }
1536               else if (!category_out)
1537                 printf("Version:%s;\n", libnamebuf);
1538               #else
1539               if (text_buffer!=NULL) omFree((ADDRESS)text_buffer);
1540               text_buffer = omStrDup(libnamebuf);
1541               omMarkAsStaticAddr(text_buffer);
1542               #endif
1543             }
1544           }
1545        YY_BREAK
1546case 6:
1547YY_RULE_SETUP
1548#line 302 "libparse.l"
1549{ p_static=TRUE; }
1550        YY_BREAK
1551case 7:
1552YY_RULE_SETUP
1553#line 304 "libparse.l"
1554{
1555             char proc[256];
1556             BEGIN(pdef);
1557             found_proc_in_proc = 0;
1558             proc[0]='\0';
1559             sscanf( yytext, "%*[^p]proc %s", proc);
1560             if(strlen(proc)<1) sscanf( yytext, "proc %s", proc);
1561             #if YYLPDEBUG > 1
1562             printf("Newlib:%s\n", newlib);
1563             #endif
1564             #ifdef STANDALONE_PARSER
1565             if ( pi != NULL )
1566             {
1567               printpi(pi);
1568               pi_clear(pi);
1569             }
1570             #ifdef STANDALONE_PARSER
1571             pi = (procinfo *)malloc(sizeof(procinfo));
1572             #else
1573             pi = (procinfo *)omAlloc(sizeof(procinfo));
1574             #endif
1575             iiInitSingularProcinfo(pi, newlib, proc, yylplineno,
1576                                    current_pos(0), p_static);
1577             #else /*STANDALONE_PARSER*/
1578             if( mode == LOAD_LIB)
1579             {
1580               #ifdef HAVE_NS
1581               h0 = enterid( proc, 0 /*myynest*/, PROC_CMD,
1582                                 &(IDPACKAGE(pl)->idroot), TRUE);
1583               if (h0==NULL) return(1);
1584               if(!p_static && autoexport)
1585               {
1586                  h_top = enterid( proc, 0 /*myynest*/, PROC_CMD,
1587                                 &(basePack->idroot), FALSE );
1588                  if (h_top==NULL) return(1);
1589               }
1590               #else
1591               h0 = enterid( proc, 0 /*myynest*/, PROC_CMD,
1592                                   &IDROOT, TRUE );
1593               #endif /* HAVE_NS */
1594               /* omCheckAddr(IDID(h0)); */
1595               if (h0!=NULL)
1596               {
1597                 iiInitSingularProcinfo(IDPROC(h0), newlib, proc,
1598                                yylplineno, current_pos(0),p_static);
1599                 #ifdef HAVE_NS
1600                 if (!p_static && h_top != NULL && autoexport)
1601                 {
1602                   if(IDPROC(h_top)!=NULL) piCleanUp((procinfo *)IDPROC(h_top));
1603                   IDPROC(h_top)=IDPROC(h0);
1604                   IDPROC(h_top)->ref++;
1605                 }
1606                 IDPROC(h0)->pack=IDPACKAGE(pl);
1607                 #endif /* HAVE_NS */
1608                 if (BVERBOSE(V_LOAD_PROC))
1609                   Warn( "     proc '%s' registered", proc );
1610               }
1611               #endif /*STANDALONE_PARSER*/
1612               SET_DEF_END(mode, pi, current_pos(yyleng+1));
1613               #if YYLPDEBUG
1614               if(lpverbose)
1615               {
1616                  printf("// PROCEDURE '%s' status: %s, ", proc,
1617                      p_static ? "local" : "global");
1618                  printf("starting at line %d,%d: definition end: %d (%d).\n",
1619                      yylplineno, current_pos(0), (int)pi->data.s.def_end, brace1);
1620               }
1621               #endif
1622               p_static=FALSE;
1623             #ifndef STANDALONE_PARSER
1624             }
1625             #endif /*STANDALONE_PARSER*/
1626           }
1627        YY_BREAK
1628case 8:
1629YY_RULE_SETUP
1630#line 377 "libparse.l"
1631{
1632             BEGIN(pexample);
1633             SET_EXAMPLE_START(mode, pi, yylplineno, current_pos(0));
1634             #if YYLPDEBUG
1635             if(lpverbose)
1636             {
1637                printf("//     EXAMPLE at line %d,%d (%d)\n", yylplineno,
1638                    current_pos(0), brace1);
1639             }
1640             #endif
1641           }
1642        YY_BREAK
1643case 9:
1644YY_RULE_SETUP
1645#line 389 "libparse.l"
1646{ quote++;
1647             BEGIN(libcmd);
1648           }
1649        YY_BREAK
1650case 10:
1651YY_RULE_SETUP
1652#line 393 "libparse.l"
1653{ quote++; brace2++;
1654             BEGIN(libcmd2);
1655           }
1656        YY_BREAK
1657case 11:
1658YY_RULE_SETUP
1659#line 397 "libparse.l"
1660{
1661             make_version(yytext, 0);
1662             #if YYLPDEBUG > 1
1663             printf("+(id)HEAD:%s\n", yytext);
1664             #endif
1665           }
1666        YY_BREAK
1667case 12:
1668YY_RULE_SETUP
1669#line 403 "libparse.l"
1670{
1671             #if YYLPDEBUG
1672             printf("+(cmt)HEAD:%s\n", yytext);
1673             #endif
1674           }
1675        YY_BREAK
1676case 13:
1677YY_RULE_SETUP
1678#line 408 "libparse.l"
1679{
1680             #if YYLPDEBUG > 1
1681             printf("-HEAD:%s\n", yytext);
1682             #endif
1683           }
1684        YY_BREAK
1685case 14:
1686YY_RULE_SETUP
1687#line 413 "libparse.l"
1688{ yyless(0);
1689             BEGIN(INITIAL);
1690             yymore();
1691           }
1692        YY_BREAK
1693case 15:
1694YY_RULE_SETUP
1695#line 417 "libparse.l"
1696{
1697             yyless(0);
1698             *lib_style = NEW_LIBSTYLE;
1699             BEGIN(INITIAL);
1700             yymore();
1701           }
1702        YY_BREAK
1703case 16:
1704YY_RULE_SETUP
1705#line 424 "libparse.l"
1706{ quote++;
1707             BEGIN(libcmd);
1708           }
1709        YY_BREAK
1710case 17:
1711YY_RULE_SETUP
1712#line 427 "libparse.l"
1713{ quote++; brace2++;
1714             BEGIN(libcmd2);
1715           }
1716        YY_BREAK
1717case 18:
1718YY_RULE_SETUP
1719#line 430 "libparse.l"
1720{ yylplineno++; }
1721        YY_BREAK
1722case 19:
1723YY_RULE_SETUP
1724#line 431 "libparse.l"
1725{
1726             #if YYLPDEBUG > 1
1727             printf(" HEAD:%s\n", yytext);
1728             #endif
1729             yyless(0);
1730             BEGIN(help);
1731           }
1732        YY_BREAK
1733case 20:
1734YY_RULE_SETUP
1735#line 438 "libparse.l"
1736{
1737             #if YYLPDEBUG > 1
1738             printf(" HELP:%s\n", yytext);
1739             #endif
1740             BEGIN(INITIAL); }
1741        YY_BREAK
1742case 21:
1743YY_RULE_SETUP
1744#line 443 "libparse.l"
1745{
1746             #if YYLPDEBUG > 1
1747             printf(" HELP:%s\n", yytext);
1748             #endif
1749             BEGIN(INITIAL);
1750           }
1751        YY_BREAK
1752case 22:
1753YY_RULE_SETUP
1754#line 449 "libparse.l"
1755{
1756             yyless(0);
1757             *lib_style = NEW_LIBSTYLE;
1758             BEGIN(INITIAL);
1759             yymore();
1760           }
1761        YY_BREAK
1762case 23:
1763YY_RULE_SETUP
1764#line 455 "libparse.l"
1765{
1766             yyless(0);
1767             //printf("2) proc found.\n");
1768             BEGIN(INITIAL);
1769             yymore();
1770           }
1771        YY_BREAK
1772case 24:
1773YY_RULE_SETUP
1774#line 461 "libparse.l"
1775{ quote++;
1776             BEGIN(libcmd);
1777           }
1778        YY_BREAK
1779case 25:
1780YY_RULE_SETUP
1781#line 464 "libparse.l"
1782{ quote++; brace2++;
1783             BEGIN(libcmd2);
1784           }
1785        YY_BREAK
1786case 26:
1787YY_RULE_SETUP
1788#line 468 "libparse.l"
1789{ yylplineno++; }
1790        YY_BREAK
1791case 27:
1792YY_RULE_SETUP
1793#line 469 "libparse.l"
1794{
1795             #if YYLPDEBUG
1796             if(lpverbose>2) printf("--->%s<---\n", yytext);
1797             #endif
1798           }
1799        YY_BREAK
1800case 28:
1801YY_RULE_SETUP
1802#line 474 "libparse.l"
1803{
1804             found_oldhelp=1;
1805             #if YYLPDEBUG > 1
1806             printf("-HELP:%s\n", yytext);
1807             #endif
1808           }
1809        YY_BREAK
1810case 29:
1811YY_RULE_SETUP
1812#line 482 "libparse.l"
1813{ quote--;
1814             yytext[yyleng-1] = '\0';
1815             #ifndef STANDALONE_PARSER
1816             if ( mode == LOAD_LIB )
1817             {
1818               library_stack->push(newlib, yytext);
1819             }
1820             #endif /* STANDALONE_PARSER */
1821             #if YYLPDEBUG
1822             if(lpverbose>1) printf("LIB:'%s'\n", yytext);
1823             #endif
1824             BEGIN(INITIAL);
1825           }
1826        YY_BREAK
1827case 30:
1828YY_RULE_SETUP
1829#line 495 "libparse.l"
1830{ quote--; brace2--;
1831             yytext[yyleng-1] = '\0';
1832             #ifndef STANDALONE_PARSER
1833             if ( mode == LOAD_LIB )
1834             {
1835               library_stack->push(newlib, yytext);
1836             }
1837             #endif /* STANDALONE_PARSER */
1838             #if YYLPDEBUG
1839             if(lpverbose>1) printf("LIB:'%s'\n", yytext);
1840             #endif
1841             BEGIN(INITIAL);
1842           }
1843        YY_BREAK
1844case 31:
1845YY_RULE_SETUP
1846#line 509 "libparse.l"
1847{ }
1848        YY_BREAK
1849case 32:
1850YY_RULE_SETUP
1851#line 510 "libparse.l"
1852{
1853             brace2++;
1854             #if YYLPDEBUG > 1
1855             printf("%s", yytext);
1856             #endif
1857           }
1858        YY_BREAK
1859case 33:
1860YY_RULE_SETUP
1861#line 516 "libparse.l"
1862{
1863             brace2--;
1864             #if YYLPDEBUG > 1
1865             printf(">%s<\n", yytext);
1866             printf("{=%d, (=%d, [=%d\n", brace1, brace2, brace3);
1867             #endif
1868             if(brace2<=0)
1869             {
1870               #if YYLPDEBUG > 1
1871               printf("BEGIN(phead){=%d, (=%d, [=%d\n", brace1, brace2, brace3);
1872               #endif
1873               SET_DEF_END(mode, pi, current_pos(yyleng));
1874               BEGIN(phead);
1875             }
1876           }
1877        YY_BREAK
1878case 34:
1879YY_RULE_SETUP
1880#line 531 "libparse.l"
1881{
1882             if(brace2>0)
1883             {
1884               #if YYLPDEBUG > 1
1885               printf("{=%d, (=%d, [=%d\n", brace1, brace2, brace3);
1886               #endif
1887               yylp_errno = YYLP_DEF_BR2;
1888               return(1);
1889             }
1890             else
1891             {
1892               brace1++; BEGIN(pbody);
1893               if(lpverbose)
1894                  printf("//     BODY at line %d,%d (%d)\n", yylplineno,
1895                      current_pos(0), brace1);
1896               SET_BODY_START(mode, pi, yylplineno, current_pos(0));
1897             }
1898           }
1899        YY_BREAK
1900case 35:
1901YY_RULE_SETUP
1902#line 549 "libparse.l"
1903{ yylplineno++;
1904              if(brace2<=0)
1905              {
1906#if YYLPDEBUG > 1
1907                printf("BEGIN(phead-2){=%d, (=%d, [=%d\n", brace1, brace2, brace3);
1908#endif
1909                BEGIN(phead);
1910              }
1911            }
1912        YY_BREAK
1913case 36:
1914YY_RULE_SETUP
1915#line 558 "libparse.l"
1916{ }
1917        YY_BREAK
1918case 37:
1919YY_RULE_SETUP
1920#line 559 "libparse.l"
1921{ old_state = YYSTATE; BEGIN(comment); }
1922        YY_BREAK
1923case 38:
1924YY_RULE_SETUP
1925#line 560 "libparse.l"
1926{
1927             if(brace2<=0)
1928             {
1929               BEGIN(phead);
1930               yyless(0);
1931             }
1932           }
1933        YY_BREAK
1934case 39:
1935YY_RULE_SETUP
1936#line 568 "libparse.l"
1937{
1938              #if YYLPDEBUG
1939              if(lpverbose>2)printf("0-Len=%d;\n", yyleng);
1940              #endif
1941              if(check)
1942              {
1943                printf("Procedure %s (line %d) has OLD-STYLE-HELP!\n",
1944                       pi->procname, pi->data.s.proc_lineno);
1945              }
1946              SET_HELP_START(mode, pi, current_pos(0));
1947              BEGIN(poldhelp);
1948              yyless(0);
1949           }
1950        YY_BREAK
1951case 40:
1952YY_RULE_SETUP
1953#line 581 "libparse.l"
1954{
1955              #if YYLPDEBUG
1956              if(lpverbose>2)printf("1-Len=%d;\n", yyleng);
1957              #endif
1958              BEGIN(phelp);
1959              yyless(0);
1960           }
1961        YY_BREAK
1962case 41:
1963YY_RULE_SETUP
1964#line 588 "libparse.l"
1965{
1966              if(check && yyleng>2)
1967              {
1968                printf("Procedure %s (line %d) has OLD-STYLE-HELP!\n",
1969                       pi->procname, pi->data.s.proc_lineno);
1970              }
1971              #if YYLPDEBUG
1972              if(lpverbose>2 && yyleng>2)
1973                 printf("2-Len=%d, %s;\n", yyleng, pi->procname);
1974              #endif
1975              SET_HELP_START(mode, pi, current_pos(0));
1976              BEGIN(poldhelp);
1977              yyless(0);
1978           }
1979        YY_BREAK
1980case 42:
1981YY_RULE_SETUP
1982#line 602 "libparse.l"
1983{ printf("[%s]", yytext); }
1984        YY_BREAK
1985case 43:
1986YY_RULE_SETUP
1987#line 604 "libparse.l"
1988{ }
1989        YY_BREAK
1990case 44:
1991YY_RULE_SETUP
1992#line 605 "libparse.l"
1993{
1994                SET_HELP_END(mode, pi, current_pos(0));
1995                brace1++; BEGIN(pbody);
1996                if(lpverbose)
1997                {
1998                   printf("//     HELP from %d to %d\n",
1999                       (int)pi->data.s.help_start, (int)pi->data.s.help_end);
2000                   printf("//     BODY at line %d,%d (%d)\n", yylplineno,
2001                       current_pos(0), brace1);
2002                }
2003#if YYLPDEBUG > 1
2004                printf("BEGIN(pbody){=%d, (=%d, [=%d\n", brace1, brace2, brace3);
2005#endif
2006                SET_BODY_START(mode, pi, yylplineno, current_pos(0));
2007#if YYLPDEBUG > 1
2008                printf("BODY at %d/%d", yylplineno, current_pos(0));
2009#endif
2010              }
2011        YY_BREAK
2012case 45:
2013YY_RULE_SETUP
2014#line 623 "libparse.l"
2015{ yylplineno++; }
2016        YY_BREAK
2017case 46:
2018YY_RULE_SETUP
2019#line 624 "libparse.l"
2020{ }
2021        YY_BREAK
2022case 47:
2023YY_RULE_SETUP
2024#line 626 "libparse.l"
2025{
2026             old_state = YYSTATE;
2027             BEGIN(string);
2028             SET_HELP_START(mode, pi, current_pos(1));
2029           }
2030        YY_BREAK
2031case 48:
2032YY_RULE_SETUP
2033#line 631 "libparse.l"
2034{}
2035        YY_BREAK
2036case 49:
2037YY_RULE_SETUP
2038#line 632 "libparse.l"
2039{
2040             brace1++; BEGIN(pbody);
2041             if(lpverbose)
2042             {
2043                printf("//     HELP from %d to %d\n",
2044                    (int)pi->data.s.help_start, (int)pi->data.s.help_end);
2045                printf("//     BODY at line %d,%d (%d)\n", yylplineno,
2046                    current_pos(0), brace1);
2047             }
2048             #if YYLPDEBUG > 1
2049             printf("BEGIN(pbody){=%d, (=%d, [=%d\n", brace1, brace2, brace3);
2050             #endif
2051             SET_BODY_START(mode, pi, yylplineno, current_pos(0));
2052             #if YYLPDEBUG > 1
2053             printf("BODY at %d/%d", yylplineno, current_pos(0));
2054             #endif
2055           }
2056        YY_BREAK
2057case 50:
2058YY_RULE_SETUP
2059#line 649 "libparse.l"
2060{ yylplineno++;}
2061        YY_BREAK
2062case 51:
2063YY_RULE_SETUP
2064#line 651 "libparse.l"
2065{ }
2066        YY_BREAK
2067case 52:
2068YY_RULE_SETUP
2069#line 652 "libparse.l"
2070{ quote++; old_state = YYSTATE;
2071                 BEGIN(string); /* printf("%s", yytext); */
2072               }
2073        YY_BREAK
2074case 53:
2075YY_RULE_SETUP
2076#line 656 "libparse.l"
2077{
2078             if(check) printf("*** found 2 proc whithin procedure '%s'.\n",
2079                          pi->procname);
2080             yyless(yyleng-1);
2081           }
2082        YY_BREAK
2083case 54:
2084YY_RULE_SETUP
2085#line 661 "libparse.l"
2086{
2087             if(check) printf("*** found 1 proc whithin procedure '%s'.\n",
2088                          pi->procname);
2089             yyless(yyleng-1);
2090           }
2091        YY_BREAK
2092case 55:
2093YY_RULE_SETUP
2094#line 666 "libparse.l"
2095{
2096                 brace1++;
2097                 #if YYLPDEBUG > 1
2098                 printf("line: %d, (%d)%s\n", yylplineno, brace1, yytext);
2099                 #endif
2100                }
2101        YY_BREAK
2102case 56:
2103YY_RULE_SETUP
2104#line 672 "libparse.l"
2105{
2106                           #if YYLPDEBUG > 1
2107                           printf("line: %d, (%d)%s\n",
2108                             yylplineno, brace1, yytext);
2109                           #endif
2110                           brace1--;
2111                           if(brace2>0)
2112                           {
2113                             yylp_errno = YYLP_BODY_BR2;
2114                             return(1);
2115                           }
2116                           if(brace3>0)
2117                           {
2118                             yylp_errno = YYLP_BODY_BR3;
2119                             return(1);
2120                           }
2121                           if(brace1<=0)
2122                           {
2123                             SET_BODY_END(mode, pi, current_pos(yyleng));
2124                             SET_PROC_END(mode, pi, current_pos(yyleng));
2125                             #if YYLPDEBUG > 1
2126                               printf("-%d\n", current_pos(0));
2127                             #endif
2128                             BEGIN(INITIAL);
2129                           }
2130                         }
2131        YY_BREAK
2132case 57:
2133YY_RULE_SETUP
2134#line 698 "libparse.l"
2135{
2136                           brace2++; /* printf("%s", yytext); */
2137                         }
2138        YY_BREAK
2139case 58:
2140YY_RULE_SETUP
2141#line 701 "libparse.l"
2142{
2143                           brace2--; /* printf("%s", yytext); */
2144                           if(brace2<0) {
2145                             yylp_errno = YYLP_BODY_TMBR2;
2146                             return(1);
2147                           }
2148                         }
2149        YY_BREAK
2150case 59:
2151YY_RULE_SETUP
2152#line 708 "libparse.l"
2153{
2154                           brace3++; /* printf("%s", yytext); */
2155                         }
2156        YY_BREAK
2157case 60:
2158YY_RULE_SETUP
2159#line 711 "libparse.l"
2160{
2161                           brace3--; /* printf("%s", yytext); */
2162                           if(brace3<0) {
2163                             yylp_errno = YYLP_BODY_TMBR3;
2164                             return(1);
2165                           }
2166                         }
2167        YY_BREAK
2168case 61:
2169YY_RULE_SETUP
2170#line 718 "libparse.l"
2171{ yylplineno++; }
2172        YY_BREAK
2173case 62:
2174YY_RULE_SETUP
2175#line 719 "libparse.l"
2176{ }
2177        YY_BREAK
2178case 63:
2179YY_RULE_SETUP
2180#line 721 "libparse.l"
2181{
2182             quote++; BEGIN(string);
2183             found_info++;
2184             string_start = current_pos(yyleng);
2185             *lib_style = NEW_LIBSTYLE;
2186             last_cmd = LP_INFO;
2187       }
2188        YY_BREAK
2189case 64:
2190YY_RULE_SETUP
2191#line 728 "libparse.l"
2192{ yylplineno++; }
2193        YY_BREAK
2194case 65:
2195YY_RULE_SETUP
2196#line 729 "libparse.l"
2197{ }
2198        YY_BREAK
2199case 66:
2200YY_RULE_SETUP
2201#line 731 "libparse.l"
2202{
2203             quote++; BEGIN(string);
2204             found_cat++;
2205             string_start = current_pos(yyleng);
2206             *lib_style = NEW_LIBSTYLE;
2207             last_cmd = LP_CATEGORY;
2208       }
2209        YY_BREAK
2210case 67:
2211YY_RULE_SETUP
2212#line 738 "libparse.l"
2213{ yylplineno++; }
2214        YY_BREAK
2215case 68:
2216YY_RULE_SETUP
2217#line 739 "libparse.l"
2218{ }
2219        YY_BREAK
2220case 69:
2221YY_RULE_SETUP
2222#line 741 "libparse.l"
2223{ quote--;
2224                           copy_string(mode);
2225                           last_cmd = LP_NONE;
2226                           if(old_state==phelp)
2227                           {
2228                              SET_HELP_END(mode, pi, current_pos(0));
2229                           }
2230                           BEGIN(old_state); /* printf("%s", yytext); */
2231                         }
2232        YY_BREAK
2233case 70:
2234YY_RULE_SETUP
2235#line 750 "libparse.l"
2236{ if (old_state == phelp) IncrCheckSum(*yytext);}
2237        YY_BREAK
2238case 71:
2239YY_RULE_SETUP
2240#line 751 "libparse.l"
2241{ yylplineno++; if (old_state == phelp) IncrCheckSum('\n');}
2242        YY_BREAK
2243case 72:
2244YY_RULE_SETUP
2245#line 752 "libparse.l"
2246{ if (old_state == phelp) IncrCheckSum(*yytext);}
2247        YY_BREAK
2248case 73:
2249YY_RULE_SETUP
2250#line 754 "libparse.l"
2251{ }
2252        YY_BREAK
2253case 74:
2254YY_RULE_SETUP
2255#line 755 "libparse.l"
2256{ quote++; old_state = YYSTATE;
2257                           BEGIN(string); /* printf("%s", yytext); */
2258                         }
2259        YY_BREAK
2260case 75:
2261YY_RULE_SETUP
2262#line 758 "libparse.l"
2263{
2264                           brace1++; /* printf("(%d)%s", brace1, yytext); */
2265                         }
2266        YY_BREAK
2267case 76:
2268YY_RULE_SETUP
2269#line 761 "libparse.l"
2270{
2271                           brace1--; /* printf("(%d)%s", brace1, yytext); */
2272                           if(brace1<=0) {
2273                             if(brace2>0) { yylp_errno=YYLP_EX_BR2; return(1); }
2274                             if(brace3>0) { yylp_errno=YYLP_EX_BR3; return(1); }
2275                             BEGIN(INITIAL);
2276                             SET_PROC_END(mode, pi, current_pos(yyleng));
2277                           }
2278                         }
2279        YY_BREAK
2280case 77:
2281YY_RULE_SETUP
2282#line 770 "libparse.l"
2283{
2284                           brace2++; /* printf("%s", yytext); */
2285                         }
2286        YY_BREAK
2287case 78:
2288YY_RULE_SETUP
2289#line 773 "libparse.l"
2290{
2291                           brace2--; /* printf("%s", yytext); */
2292                         }
2293        YY_BREAK
2294case 79:
2295YY_RULE_SETUP
2296#line 776 "libparse.l"
2297{
2298                           brace3++; /* printf("%s", yytext); */
2299                         }
2300        YY_BREAK
2301case 80:
2302YY_RULE_SETUP
2303#line 779 "libparse.l"
2304{
2305                           brace3--; /* printf("%s", yytext); */
2306                         }
2307        YY_BREAK
2308case 81:
2309YY_RULE_SETUP
2310#line 782 "libparse.l"
2311{ yylplineno++; }
2312        YY_BREAK
2313case 82:
2314YY_RULE_SETUP
2315#line 783 "libparse.l"
2316{ }
2317        YY_BREAK
2318case 83:
2319YY_RULE_SETUP
2320#line 785 "libparse.l"
2321{ quote--;
2322                           BEGIN(pexample); /* printf("%s", yytext); */
2323                         }
2324        YY_BREAK
2325case 84:
2326YY_RULE_SETUP
2327#line 788 "libparse.l"
2328{ }
2329        YY_BREAK
2330case 85:
2331YY_RULE_SETUP
2332#line 789 "libparse.l"
2333{ }
2334        YY_BREAK
2335case 86:
2336YY_RULE_SETUP
2337#line 790 "libparse.l"
2338{ yylplineno++; }
2339        YY_BREAK
2340case 87:
2341YY_RULE_SETUP
2342#line 791 "libparse.l"
2343{ }
2344        YY_BREAK
2345case 88:
2346YY_RULE_SETUP
2347#line 793 "libparse.l"
2348{ BEGIN(old_state); }
2349        YY_BREAK
2350case 89:
2351YY_RULE_SETUP
2352#line 794 "libparse.l"
2353{ yylplineno++; }
2354        YY_BREAK
2355case 90:
2356YY_RULE_SETUP
2357#line 795 "libparse.l"
2358{ }
2359        YY_BREAK
2360case 91:
2361YY_RULE_SETUP
2362#line 797 "libparse.l"
2363{ yylplineno++; }
2364        YY_BREAK
2365case 92:
2366YY_RULE_SETUP
2367#line 798 "libparse.l"
2368{ }
2369        YY_BREAK
2370case 93:
2371YY_RULE_SETUP
2372#line 799 "libparse.l"
2373{ p_static = FALSE;
2374                            #if YYLPDEBUG > 1
2375                            printf("%s", yytext);
2376                            #endif
2377                         }
2378        YY_BREAK
2379case 94:
2380YY_RULE_SETUP
2381#line 804 "libparse.l"
2382{ p_static = FALSE;
2383                           yylp_errno = YYLP_BAD_CHAR;
2384                           #ifdef STANDALONE_PARSER
2385                           printf("[%d]", *yytext);
2386                           #else
2387                           if (text_buffer!=NULL) omFree((ADDRESS)text_buffer);
2388                           text_buffer = omStrDup(yytext);
2389                           omMarkAsStaticAddr(text_buffer);
2390                           #endif
2391                           #if YYLPDEBUG > 1
2392                             printf("[%s]", yytext);
2393                           #endif
2394                           return(1);
2395                         }
2396        YY_BREAK
2397case 95:
2398YY_RULE_SETUP
2399#line 819 "libparse.l"
2400ECHO;
2401        YY_BREAK
2402case YY_STATE_EOF(INITIAL):
2403case YY_STATE_EOF(header):
2404case YY_STATE_EOF(help):
2405case YY_STATE_EOF(libcmd):
2406case YY_STATE_EOF(libcmd2):
2407case YY_STATE_EOF(pdef):
2408case YY_STATE_EOF(phead):
2409case YY_STATE_EOF(poldhelp):
2410case YY_STATE_EOF(phelp):
2411case YY_STATE_EOF(pbody):
2412case YY_STATE_EOF(pstr):
2413case YY_STATE_EOF(pexample):
2414case YY_STATE_EOF(pestr):
2415case YY_STATE_EOF(string):
2416case YY_STATE_EOF(comment):
2417case YY_STATE_EOF(info):
2418case YY_STATE_EOF(category):
2419case YY_STATE_EOF(version):
2420        yyterminate();
2421
2422        case YY_END_OF_BUFFER:
2423                {
2424                /* Amount of text matched not including the EOB char. */
2425                int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
2426
2427                /* Undo the effects of YY_DO_BEFORE_ACTION. */
2428                *yy_cp = yy_hold_char;
2429                YY_RESTORE_YY_MORE_OFFSET
2430
2431                if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
2432                        {
2433                        /* We're scanning a new file or input source.  It's
2434                         * possible that this happened because the user
2435                         * just pointed yyin at a new source and called
2436                         * yylex().  If so, then we have to assure
2437                         * consistency between yy_current_buffer and our
2438                         * globals.  Here is the right place to do so, because
2439                         * this is the first action (other than possibly a
2440                         * back-up) that will match for the new input source.
2441                         */
2442                        yy_n_chars = yy_current_buffer->yy_n_chars;
2443                        yy_current_buffer->yy_input_file = yyin;
2444                        yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
2445                        }
2446
2447                /* Note that here we test for yy_c_buf_p "<=" to the position
2448                 * of the first EOB in the buffer, since yy_c_buf_p will
2449                 * already have been incremented past the NUL character
2450                 * (since all states make transitions on EOB to the
2451                 * end-of-buffer state).  Contrast this with the test
2452                 * in input().
2453                 */
2454                if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2455                        { /* This was really a NUL. */
2456                        yy_state_type yy_next_state;
2457
2458                        yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
2459
2460                        yy_current_state = yy_get_previous_state();
2461
2462                        /* Okay, we're now positioned to make the NUL
2463                         * transition.  We couldn't have
2464                         * yy_get_previous_state() go ahead and do it
2465                         * for us because it doesn't know how to deal
2466                         * with the possibility of jamming (and we don't
2467                         * want to build jamming into it because then it
2468                         * will run more slowly).
2469                         */
2470
2471                        yy_next_state = yy_try_NUL_trans( yy_current_state );
2472
2473                        yy_bp = yytext_ptr + YY_MORE_ADJ;
2474
2475                        if ( yy_next_state )
2476                                {
2477                                /* Consume the NUL. */
2478                                yy_cp = ++yy_c_buf_p;
2479                                yy_current_state = yy_next_state;
2480                                goto yy_match;
2481                                }
2482
2483                        else
2484                                {
2485                                yy_cp = yy_c_buf_p;
2486                                goto yy_find_action;
2487                                }
2488                        }
2489
2490                else switch ( yy_get_next_buffer() )
2491                        {
2492                        case EOB_ACT_END_OF_FILE:
2493                                {
2494                                yy_did_buffer_switch_on_eof = 0;
2495
2496                                if ( yywrap() )
2497                                        {
2498                                        /* Note: because we've taken care in
2499                                         * yy_get_next_buffer() to have set up
2500                                         * yytext, we can now set up
2501                                         * yy_c_buf_p so that if some total
2502                                         * hoser (like flex itself) wants to
2503                                         * call the scanner after we return the
2504                                         * YY_NULL, it'll still work - another
2505                                         * YY_NULL will get returned.
2506                                         */
2507                                        yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
2508
2509                                        yy_act = YY_STATE_EOF(YY_START);
2510                                        goto do_action;
2511                                        }
2512
2513                                else
2514                                        {
2515                                        if ( ! yy_did_buffer_switch_on_eof )
2516                                                YY_NEW_FILE;
2517                                        }
2518                                break;
2519                                }
2520
2521                        case EOB_ACT_CONTINUE_SCAN:
2522                                yy_c_buf_p =
2523                                        yytext_ptr + yy_amount_of_matched_text;
2524
2525                                yy_current_state = yy_get_previous_state();
2526
2527                                yy_cp = yy_c_buf_p;
2528                                yy_bp = yytext_ptr + YY_MORE_ADJ;
2529                                goto yy_match;
2530
2531                        case EOB_ACT_LAST_MATCH:
2532                                yy_c_buf_p =
2533                                &yy_current_buffer->yy_ch_buf[yy_n_chars];
2534
2535                                yy_current_state = yy_get_previous_state();
2536
2537                                yy_cp = yy_c_buf_p;
2538                                yy_bp = yytext_ptr + YY_MORE_ADJ;
2539                                goto yy_find_action;
2540                        }
2541                break;
2542                }
2543
2544        default:
2545                YY_FATAL_ERROR(
2546                        "fatal flex scanner internal error--no action found" );
2547        } /* end of action switch */
2548                } /* end of scanning one token */
2549        } /* end of yylex */
2550
2551
2552/* yy_get_next_buffer - try to read in a new buffer
2553 *
2554 * Returns a code representing an action:
2555 *      EOB_ACT_LAST_MATCH -
2556 *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2557 *      EOB_ACT_END_OF_FILE - end of file
2558 */
2559
2560static int yy_get_next_buffer()
2561        {
2562        register char *dest = yy_current_buffer->yy_ch_buf;
2563        register char *source = yytext_ptr;
2564        register int number_to_move, i;
2565        int ret_val;
2566
2567        if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
2568                YY_FATAL_ERROR(
2569                "fatal flex scanner internal error--end of buffer missed" );
2570
2571        if ( yy_current_buffer->yy_fill_buffer == 0 )
2572                { /* Don't try to fill the buffer, so this is an EOF. */
2573                if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
2574                        {
2575                        /* We matched a single character, the EOB, so
2576                         * treat this as a final EOF.
2577                         */
2578                        return EOB_ACT_END_OF_FILE;
2579                        }
2580
2581                else
2582                        {
2583                        /* We matched some text prior to the EOB, first
2584                         * process it.
2585                         */
2586                        return EOB_ACT_LAST_MATCH;
2587                        }
2588                }
2589
2590        /* Try to read more data. */
2591
2592        /* First move last chars to start of buffer. */
2593        number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
2594
2595        for ( i = 0; i < number_to_move; ++i )
2596                *(dest++) = *(source++);
2597
2598        if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2599                /* don't do the read, it's not guaranteed to return an EOF,
2600                 * just force an EOF
2601                 */
2602                yy_current_buffer->yy_n_chars = yy_n_chars = 0;
2603
2604        else
2605                {
2606                int num_to_read =
2607                        yy_current_buffer->yy_buf_size - number_to_move - 1;
2608
2609                while ( num_to_read <= 0 )
2610                        { /* Not enough room in the buffer - grow it. */
2611#ifdef YY_USES_REJECT
2612                        YY_FATAL_ERROR(
2613"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2614#else
2615
2616                        /* just a shorter name for the current buffer */
2617                        YY_BUFFER_STATE b = yy_current_buffer;
2618
2619                        int yy_c_buf_p_offset =
2620                                (int) (yy_c_buf_p - b->yy_ch_buf);
2621
2622                        if ( b->yy_is_our_buffer )
2623                                {
2624                                int new_size = b->yy_buf_size * 2;
2625
2626                                if ( new_size <= 0 )
2627                                        b->yy_buf_size += b->yy_buf_size / 8;
2628                                else
2629                                        b->yy_buf_size *= 2;
2630
2631                                b->yy_ch_buf = (char *)
2632                                        /* Include room in for 2 EOB chars. */
2633                                        yy_flex_realloc( (void *) b->yy_ch_buf,
2634                                                         b->yy_buf_size + 2 );
2635                                }
2636                        else
2637                                /* Can't grow it, we don't own it. */
2638                                b->yy_ch_buf = 0;
2639
2640                        if ( ! b->yy_ch_buf )
2641                                YY_FATAL_ERROR(
2642                                "fatal error - scanner input buffer overflow" );
2643
2644                        yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2645
2646                        num_to_read = yy_current_buffer->yy_buf_size -
2647                                                number_to_move - 1;
2648#endif
2649                        }
2650
2651                if ( num_to_read > YY_READ_BUF_SIZE )
2652                        num_to_read = YY_READ_BUF_SIZE;
2653
2654                /* Read in more data. */
2655                YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
2656                        yy_n_chars, num_to_read );
2657
2658                yy_current_buffer->yy_n_chars = yy_n_chars;
2659                }
2660
2661        if ( yy_n_chars == 0 )
2662                {
2663                if ( number_to_move == YY_MORE_ADJ )
2664                        {
2665                        ret_val = EOB_ACT_END_OF_FILE;
2666                        yyrestart( yyin );
2667                        }
2668
2669                else
2670                        {
2671                        ret_val = EOB_ACT_LAST_MATCH;
2672                        yy_current_buffer->yy_buffer_status =
2673                                YY_BUFFER_EOF_PENDING;
2674                        }
2675                }
2676
2677        else
2678                ret_val = EOB_ACT_CONTINUE_SCAN;
2679
2680        yy_n_chars += number_to_move;
2681        yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2682        yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2683
2684        yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
2685
2686        return ret_val;
2687        }
2688
2689
2690/* yy_get_previous_state - get the state just before the EOB char was reached */
2691
2692static yy_state_type yy_get_previous_state()
2693        {
2694        register yy_state_type yy_current_state;
2695        register char *yy_cp;
2696
2697        yy_current_state = yy_start;
2698        yy_current_state += YY_AT_BOL();
2699
2700        for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2701                {
2702                register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2703                if ( yy_accept[yy_current_state] )
2704                        {
2705                        yy_last_accepting_state = yy_current_state;
2706                        yy_last_accepting_cpos = yy_cp;
2707                        }
2708                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2709                        {
2710                        yy_current_state = (int) yy_def[yy_current_state];
2711                        if ( yy_current_state >= 457 )
2712                                yy_c = yy_meta[(unsigned int) yy_c];
2713                        }
2714                yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2715                }
2716
2717        return yy_current_state;
2718        }
2719
2720
2721/* yy_try_NUL_trans - try to make a transition on the NUL character
2722 *
2723 * synopsis
2724 *      next_state = yy_try_NUL_trans( current_state );
2725 */
2726
2727#ifdef YY_USE_PROTOS
2728static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2729#else
2730static yy_state_type yy_try_NUL_trans( yy_current_state )
2731yy_state_type yy_current_state;
2732#endif
2733        {
2734        register int yy_is_jam;
2735        register char *yy_cp = yy_c_buf_p;
2736
2737        register YY_CHAR yy_c = 1;
2738        if ( yy_accept[yy_current_state] )
2739                {
2740                yy_last_accepting_state = yy_current_state;
2741                yy_last_accepting_cpos = yy_cp;
2742                }
2743        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2744                {
2745                yy_current_state = (int) yy_def[yy_current_state];
2746                if ( yy_current_state >= 457 )
2747                        yy_c = yy_meta[(unsigned int) yy_c];
2748                }
2749        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2750        yy_is_jam = (yy_current_state == 456);
2751
2752        return yy_is_jam ? 0 : yy_current_state;
2753        }
2754
2755
2756#ifndef YY_NO_UNPUT
2757#ifdef YY_USE_PROTOS
2758static void yyunput( int c, register char *yy_bp )
2759#else
2760static void yyunput( c, yy_bp )
2761int c;
2762register char *yy_bp;
2763#endif
2764        {
2765        register char *yy_cp = yy_c_buf_p;
2766
2767        /* undo effects of setting up yytext */
2768        *yy_cp = yy_hold_char;
2769
2770        if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2771                { /* need to shift things up to make room */
2772                /* +2 for EOB chars. */
2773                register int number_to_move = yy_n_chars + 2;
2774                register char *dest = &yy_current_buffer->yy_ch_buf[
2775                                        yy_current_buffer->yy_buf_size + 2];
2776                register char *source =
2777                                &yy_current_buffer->yy_ch_buf[number_to_move];
2778
2779                while ( source > yy_current_buffer->yy_ch_buf )
2780                        *--dest = *--source;
2781
2782                yy_cp += (int) (dest - source);
2783                yy_bp += (int) (dest - source);
2784                yy_current_buffer->yy_n_chars =
2785                        yy_n_chars = yy_current_buffer->yy_buf_size;
2786
2787                if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2788                        YY_FATAL_ERROR( "flex scanner push-back overflow" );
2789                }
2790
2791        *--yy_cp = (char) c;
2792
2793
2794        yytext_ptr = yy_bp;
2795        yy_hold_char = *yy_cp;
2796        yy_c_buf_p = yy_cp;
2797        }
2798#endif  /* ifndef YY_NO_UNPUT */
2799
2800
2801#ifdef __cplusplus
2802static int yyinput()
2803#else
2804static int input()
2805#endif
2806        {
2807        int c;
2808
2809        *yy_c_buf_p = yy_hold_char;
2810
2811        if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2812                {
2813                /* yy_c_buf_p now points to the character we want to return.
2814                 * If this occurs *before* the EOB characters, then it's a
2815                 * valid NUL; if not, then we've hit the end of the buffer.
2816                 */
2817                if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2818                        /* This was really a NUL. */
2819                        *yy_c_buf_p = '\0';
2820
2821                else
2822                        { /* need more input */
2823                        int offset = yy_c_buf_p - yytext_ptr;
2824                        ++yy_c_buf_p;
2825
2826                        switch ( yy_get_next_buffer() )
2827                                {
2828                                case EOB_ACT_LAST_MATCH:
2829                                        /* This happens because yy_g_n_b()
2830                                         * sees that we've accumulated a
2831                                         * token and flags that we need to
2832                                         * try matching the token before
2833                                         * proceeding.  But for input(),
2834                                         * there's no matching to consider.
2835                                         * So convert the EOB_ACT_LAST_MATCH
2836                                         * to EOB_ACT_END_OF_FILE.
2837                                         */
2838
2839                                        /* Reset buffer status. */
2840                                        yyrestart( yyin );
2841
2842                                        /* fall through */
2843
2844                                case EOB_ACT_END_OF_FILE:
2845                                        {
2846                                        if ( yywrap() )
2847                                                return EOF;
2848
2849                                        if ( ! yy_did_buffer_switch_on_eof )
2850                                                YY_NEW_FILE;
2851#ifdef __cplusplus
2852                                        return yyinput();
2853#else
2854                                        return input();
2855#endif
2856                                        }
2857
2858                                case EOB_ACT_CONTINUE_SCAN:
2859                                        yy_c_buf_p = yytext_ptr + offset;
2860                                        break;
2861                                }
2862                        }
2863                }
2864
2865        c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
2866        *yy_c_buf_p = '\0';     /* preserve yytext */
2867        yy_hold_char = *++yy_c_buf_p;
2868
2869        yy_current_buffer->yy_at_bol = (c == '\n');
2870
2871        return c;
2872        }
2873
2874
2875#ifdef YY_USE_PROTOS
2876void yyrestart( FILE *input_file )
2877#else
2878void yyrestart( input_file )
2879FILE *input_file;
2880#endif
2881        {
2882        if ( ! yy_current_buffer )
2883                yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2884
2885        yy_init_buffer( yy_current_buffer, input_file );
2886        yy_load_buffer_state();
2887        }
2888
2889
2890#ifdef YY_USE_PROTOS
2891void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2892#else
2893void yy_switch_to_buffer( new_buffer )
2894YY_BUFFER_STATE new_buffer;
2895#endif
2896        {
2897        if ( yy_current_buffer == new_buffer )
2898                return;
2899
2900        if ( yy_current_buffer )
2901                {
2902                /* Flush out information for old buffer. */
2903                *yy_c_buf_p = yy_hold_char;
2904                yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2905                yy_current_buffer->yy_n_chars = yy_n_chars;
2906                }
2907
2908        yy_current_buffer = new_buffer;
2909        yy_load_buffer_state();
2910
2911        /* We don't actually know whether we did this switch during
2912         * EOF (yywrap()) processing, but the only time this flag
2913         * is looked at is after yywrap() is called, so it's safe
2914         * to go ahead and always set it.
2915         */
2916        yy_did_buffer_switch_on_eof = 1;
2917        }
2918
2919
2920#ifdef YY_USE_PROTOS
2921void yy_load_buffer_state( void )
2922#else
2923void yy_load_buffer_state()
2924#endif
2925        {
2926        yy_n_chars = yy_current_buffer->yy_n_chars;
2927        yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2928        yyin = yy_current_buffer->yy_input_file;
2929        yy_hold_char = *yy_c_buf_p;
2930        }
2931
2932
2933#ifdef YY_USE_PROTOS
2934YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2935#else
2936YY_BUFFER_STATE yy_create_buffer( file, size )
2937FILE *file;
2938int size;
2939#endif
2940        {
2941        YY_BUFFER_STATE b;
2942
2943        b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2944        if ( ! b )
2945                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2946
2947        b->yy_buf_size = size;
2948
2949        /* yy_ch_buf has to be 2 characters longer than the size given because
2950         * we need to put in 2 end-of-buffer characters.
2951         */
2952        b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2953        if ( ! b->yy_ch_buf )
2954                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2955
2956        b->yy_is_our_buffer = 1;
2957
2958        yy_init_buffer( b, file );
2959
2960        return b;
2961        }
2962
2963
2964#ifdef YY_USE_PROTOS
2965void yy_delete_buffer( YY_BUFFER_STATE b )
2966#else
2967void yy_delete_buffer( b )
2968YY_BUFFER_STATE b;
2969#endif
2970        {
2971        if ( ! b )
2972                return;
2973
2974        if ( b == yy_current_buffer )
2975                yy_current_buffer = (YY_BUFFER_STATE) 0;
2976
2977        if ( b->yy_is_our_buffer )
2978                yy_flex_free( (void *) b->yy_ch_buf );
2979
2980        yy_flex_free( (void *) b );
2981        }
2982
2983
2984#ifndef YY_ALWAYS_INTERACTIVE
2985#ifndef YY_NEVER_INTERACTIVE
2986extern int isatty YY_PROTO(( int ));
2987#endif
2988#endif
2989
2990#ifdef YY_USE_PROTOS
2991void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2992#else
2993void yy_init_buffer( b, file )
2994YY_BUFFER_STATE b;
2995FILE *file;
2996#endif
2997
2998
2999        {
3000        yy_flush_buffer( b );
3001
3002        b->yy_input_file = file;
3003        b->yy_fill_buffer = 1;
3004
3005#if YY_ALWAYS_INTERACTIVE
3006        b->yy_is_interactive = 1;
3007#else
3008#if YY_NEVER_INTERACTIVE
3009        b->yy_is_interactive = 0;
3010#else
3011        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3012#endif
3013#endif
3014        }
3015
3016
3017#ifdef YY_USE_PROTOS
3018void yy_flush_buffer( YY_BUFFER_STATE b )
3019#else
3020void yy_flush_buffer( b )
3021YY_BUFFER_STATE b;
3022#endif
3023
3024        {
3025        if ( ! b )
3026                return;
3027
3028        b->yy_n_chars = 0;
3029
3030        /* We always need two end-of-buffer characters.  The first causes
3031         * a transition to the end-of-buffer state.  The second causes
3032         * a jam in that state.
3033         */
3034        b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
3035        b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
3036
3037        b->yy_buf_pos = &b->yy_ch_buf[0];
3038
3039        b->yy_at_bol = 1;
3040        b->yy_buffer_status = YY_BUFFER_NEW;
3041
3042        if ( b == yy_current_buffer )
3043                yy_load_buffer_state();
3044        }
3045
3046
3047#ifndef YY_NO_SCAN_BUFFER
3048#ifdef YY_USE_PROTOS
3049YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
3050#else
3051YY_BUFFER_STATE yy_scan_buffer( base, size )
3052char *base;
3053yy_size_t size;
3054#endif
3055        {
3056        YY_BUFFER_STATE b;
3057
3058        if ( size < 2 ||
3059             base[size-2] != YY_END_OF_BUFFER_CHAR ||
3060             base[size-1] != YY_END_OF_BUFFER_CHAR )
3061                /* They forgot to leave room for the EOB's. */
3062                return 0;
3063
3064        b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
3065        if ( ! b )
3066                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3067
3068        b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
3069        b->yy_buf_pos = b->yy_ch_buf = base;
3070        b->yy_is_our_buffer = 0;
3071        b->yy_input_file = 0;
3072        b->yy_n_chars = b->yy_buf_size;
3073        b->yy_is_interactive = 0;
3074        b->yy_at_bol = 1;
3075        b->yy_fill_buffer = 0;
3076        b->yy_buffer_status = YY_BUFFER_NEW;
3077
3078        yy_switch_to_buffer( b );
3079
3080        return b;
3081        }
3082#endif
3083
3084
3085#ifndef YY_NO_SCAN_STRING
3086#ifdef YY_USE_PROTOS
3087YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
3088#else
3089YY_BUFFER_STATE yy_scan_string( yy_str )
3090yyconst char *yy_str;
3091#endif
3092        {
3093        int len;
3094        for ( len = 0; yy_str[len]; ++len )
3095                ;
3096
3097        return yy_scan_bytes( yy_str, len );
3098        }
3099#endif
3100
3101
3102#ifndef YY_NO_SCAN_BYTES
3103#ifdef YY_USE_PROTOS
3104YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
3105#else
3106YY_BUFFER_STATE yy_scan_bytes( bytes, len )
3107yyconst char *bytes;
3108int len;
3109#endif
3110        {
3111        YY_BUFFER_STATE b;
3112        char *buf;
3113        yy_size_t n;
3114        int i;
3115
3116        /* Get memory for full buffer, including space for trailing EOB's. */
3117        n = len + 2;
3118        buf = (char *) yy_flex_alloc( n );
3119        if ( ! buf )
3120                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3121
3122        for ( i = 0; i < len; ++i )
3123                buf[i] = bytes[i];
3124
3125        buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
3126
3127        b = yy_scan_buffer( buf, n );
3128        if ( ! b )
3129                YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3130
3131        /* It's okay to grow etc. this buffer, and we should throw it
3132         * away when we're done.
3133         */
3134        b->yy_is_our_buffer = 1;
3135
3136        return b;
3137        }
3138#endif
3139
3140
3141#ifndef YY_NO_PUSH_STATE
3142#ifdef YY_USE_PROTOS
3143static void yy_push_state( int new_state )
3144#else
3145static void yy_push_state( new_state )
3146int new_state;
3147#endif
3148        {
3149        if ( yy_start_stack_ptr >= yy_start_stack_depth )
3150                {
3151                yy_size_t new_size;
3152
3153                yy_start_stack_depth += YY_START_STACK_INCR;
3154                new_size = yy_start_stack_depth * sizeof( int );
3155
3156                if ( ! yy_start_stack )
3157                        yy_start_stack = (int *) yy_flex_alloc( new_size );
3158
3159                else
3160                        yy_start_stack = (int *) yy_flex_realloc(
3161                                        (void *) yy_start_stack, new_size );
3162
3163                if ( ! yy_start_stack )
3164                        YY_FATAL_ERROR(
3165                        "out of memory expanding start-condition stack" );
3166                }
3167
3168        yy_start_stack[yy_start_stack_ptr++] = YY_START;
3169
3170        BEGIN(new_state);
3171        }
3172#endif
3173
3174
3175#ifndef YY_NO_POP_STATE
3176static void yy_pop_state()
3177        {
3178        if ( --yy_start_stack_ptr < 0 )
3179                YY_FATAL_ERROR( "start-condition stack underflow" );
3180
3181        BEGIN(yy_start_stack[yy_start_stack_ptr]);
3182        }
3183#endif
3184
3185
3186#ifndef YY_NO_TOP_STATE
3187static int yy_top_state()
3188        {
3189        return yy_start_stack[yy_start_stack_ptr - 1];
3190        }
3191#endif
3192
3193#ifndef YY_EXIT_FAILURE
3194#define YY_EXIT_FAILURE 2
3195#endif
3196
3197#ifdef YY_USE_PROTOS
3198static void yy_fatal_error( yyconst char msg[] )
3199#else
3200static void yy_fatal_error( msg )
3201char msg[];
3202#endif
3203        {
3204        (void) fprintf( stderr, "%s\n", msg );
3205        exit( YY_EXIT_FAILURE );
3206        }
3207
3208
3209
3210/* Redefine yyless() so it works in section 3 code. */
3211
3212#undef yyless
3213#define yyless(n) \
3214        do \
3215                { \
3216                /* Undo effects of setting up yytext. */ \
3217                yytext[yyleng] = yy_hold_char; \
3218                yy_c_buf_p = yytext + n; \
3219                yy_hold_char = *yy_c_buf_p; \
3220                *yy_c_buf_p = '\0'; \
3221                yyleng = n; \
3222                } \
3223        while ( 0 )
3224
3225
3226/* Internal utility routines. */
3227
3228#ifndef yytext_ptr
3229#ifdef YY_USE_PROTOS
3230static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
3231#else
3232static void yy_flex_strncpy( s1, s2, n )
3233char *s1;
3234yyconst char *s2;
3235int n;
3236#endif
3237        {
3238        register int i;
3239        for ( i = 0; i < n; ++i )
3240                s1[i] = s2[i];
3241        }
3242#endif
3243
3244#ifdef YY_NEED_STRLEN
3245#ifdef YY_USE_PROTOS
3246static int yy_flex_strlen( yyconst char *s )
3247#else
3248static int yy_flex_strlen( s )
3249yyconst char *s;
3250#endif
3251        {
3252        register int n;
3253        for ( n = 0; s[n]; ++n )
3254                ;
3255
3256        return n;
3257        }
3258#endif
3259
3260
3261#ifdef YY_USE_PROTOS
3262static void *yy_flex_alloc( yy_size_t size )
3263#else
3264static void *yy_flex_alloc( size )
3265yy_size_t size;
3266#endif
3267        {
3268        return (void *) malloc( size );
3269        }
3270
3271#ifdef YY_USE_PROTOS
3272static void *yy_flex_realloc( void *ptr, yy_size_t size )
3273#else
3274static void *yy_flex_realloc( ptr, size )
3275void *ptr;
3276yy_size_t size;
3277#endif
3278        {
3279        /* The cast to (char *) in the following accommodates both
3280         * implementations that use char* generic pointers, and those
3281         * that use void* generic pointers.  It works with the latter
3282         * because both ANSI C and C++ allow castless assignment from
3283         * any pointer type to void*, and deal with argument conversions
3284         * as though doing an assignment.
3285         */
3286        return (void *) realloc( (char *) ptr, size );
3287        }
3288
3289#ifdef YY_USE_PROTOS
3290static void yy_flex_free( void *ptr )
3291#else
3292static void yy_flex_free( ptr )
3293void *ptr;
3294#endif
3295        {
3296        free( ptr );
3297        }
3298
3299#if YY_MAIN
3300int main()
3301        {
3302        yylex();
3303        return 0;
3304        }
3305#endif
3306#line 819 "libparse.l"
3307
3308
3309int current_pos(int i)
3310{
3311  return(i+offset+(int)(yytext-yylp_buffer_start));
3312}
3313
3314int libread(FILE* f, char* buf, int max_size)
3315{ int rc;
3316
3317  offset = ftell(f);
3318  rc  = myfread( buf, 1, max_size, f );
3319  #if YYLPDEBUG >2
3320    printf("fread: %d of %d\n", rc, max_size);
3321  #endif
3322  yylp_buffer_start = buf;
3323  return rc;
3324}
3325
3326extern "C" {
3327  int yylpwrap()
3328  {
3329    //printf("======================= YYWRAP ====================\n");
3330    if(brace1>0) { yylp_errno=YYLP_MISS_BR1; }
3331    if(brace2>0) { yylp_errno=YYLP_MISS_BR2; }
3332    if(brace3>0) { yylp_errno=YYLP_MISS_BR3; }
3333    if(quote>0) { yylp_errno=YYLP_MISSQUOT; }
3334    /* printf("{=%d, (=%d, [=%d\n", brace1, brace2, brace3);/**/
3335    if(feof(yyin)) return 1; else return 0;
3336  }
3337}
3338
3339void reinit_yylp()
3340{
3341   brace1 = 0;
3342   brace2 = 0;
3343   brace3 = 0;
3344   quote  = 0;
3345   yy_init=1;
3346   yy_delete_buffer(yy_current_buffer);
3347}
3348
3349void make_version(char *p,int what)
3350{
3351  char ver[10];
3352  char date[16];
3353  ver[0]='?'; ver[1]='.'; ver[2]='?'; ver[3]='\0';
3354  date[0]='?'; date[1]='\0';
3355  if(what) sscanf(p,"%*[^=]= %*s %*s %10s %16s",ver,date);
3356  else sscanf(p,"// %*s %*s %10s %16s",ver,date);
3357  strcpy(libnamebuf,"(");
3358  strcat(libnamebuf,ver);
3359  strcat(libnamebuf,",");
3360  strcat(libnamebuf,date);
3361  strcat(libnamebuf,")");
3362  if(what && strcmp(libnamebuf, "(?.?,?)")==0)
3363  {
3364    sscanf(p,"%*[^\"]\"%[^\"]\"",libnamebuf);
3365  }
3366  //printf("ID=(%d)%s; \n", what, p);
3367}
3368
3369void copy_string(lp_modes mode)
3370{
3371#ifdef STANDALONE_PARSER
3372  if ((texinfo_out && (last_cmd == LP_INFO || last_cmd == LP_CATEGORY)) ||
3373      (category_out && last_cmd == LP_CATEGORY))
3374  {
3375    long current_location = ftell(yylpin), i = string_start, quote = 0;
3376    char c;
3377    if (texinfo_out)
3378    {
3379     if (last_cmd == LP_INFO)
3380     {
3381       printf("$info = <<EOT;\n");
3382     }
3383     else
3384     {
3385       printf("$category = <<EOT;\n");
3386     }
3387    }
3388    fseek (yylpin, i, SEEK_SET);
3389    while (i< current_location)
3390    {
3391      c = fgetc(yylpin);
3392      if (c == '\\')
3393      {
3394        quote = (! quote);
3395      }
3396      else if (c == '"')
3397      {
3398        if (! quote) break;
3399      }
3400      else
3401        quote = 0;
3402      if (c == '@' || c == '$') putchar('\\');
3403      if (c != '\r') putchar(c);
3404      i++;
3405    }
3406    if (category_out) exit(0);
3407    fseek (yylpin, current_location, SEEK_SET);
3408    printf("\nEOT\n");
3409  }
3410#else
3411  if((last_cmd == LP_INFO)&&(mode == GET_INFO))
3412  {
3413    int i, offset=0;
3414    long current_location = ftell(yylpin);
3415    int len = (int)(current_pos(0) - string_start);
3416    fseek(yylpin, string_start, SEEK_SET);
3417    if (text_buffer!=NULL) omFree((ADDRESS)text_buffer);
3418    text_buffer = (char *)omAlloc(len+2);
3419    omMarkAsStaticAddr(text_buffer);
3420    myfread(text_buffer, len, 1, yylpin);
3421    fseek(yylpin, current_location, SEEK_SET);
3422    text_buffer[len]='\0';
3423    offset=0;
3424    for(i=0;i<=len; i++)
3425    {
3426      if(text_buffer[i]=='\\' &&
3427         (text_buffer[i+1]=='\"' || text_buffer[i+1]=='{' ||
3428          text_buffer[i+1]=='}' || text_buffer[i+1]=='\\'))
3429      {
3430        i++;
3431        offset++;
3432      }
3433      if(offset>0) text_buffer[i-offset] = text_buffer[i];
3434    }
3435  }
3436#endif /* STANDALONE_PARSER */
3437}
3438
3439void print_init()
3440{
3441   printf("Init=%d\n", yy_init);
3442}
3443
3444void print_version(lp_modes mode, char *p)
3445{
3446#ifdef STANDALONE_PARSER
3447  //printf("loading %s%s", p, libnamebuf);
3448#else
3449  if ( mode == LOAD_LIB )
3450  {
3451    if (BVERBOSE(V_LOAD_LIB) && p!=NULL ) Print(" %s...", p);
3452       //Warn( "loading %s%s", p, libnamebuf);
3453  }
3454#endif
3455}
3456
3457#ifdef STANDALONE_PARSER
3458main( int argc, char *argv[] )
3459{
3460  lib_style_types lib_style;
3461  main_init(argc, argv);
3462  if(yyin == NULL) {
3463    fprintf(stderr, "No library found to parse.\n");
3464    exit(1);
3465  }
3466  if (! (texinfo_out || category_out))
3467  {
3468    if(lpverbose)printf("Verbose level=%d\n", lpverbose);
3469    if(check)printf("Reporting most possible annomalies.\n");
3470    if(lpverbose||check)printf("\n");
3471
3472    printf( "  %-15s  %20s      %s,%s    %s,%s     %s,%s\n", "Library",
3473            "function", "line", "start-eod", "line", "body-eob",
3474            "line", "example-eoe");
3475  }
3476#ifdef HAVE_NS
3477  yylplex(argv[0], argv[0], &lib_style,NULL);
3478#else
3479  yylplex(argv[0], argv[0], &lib_style);
3480#endif
3481  if(yylp_errno) {
3482    printf("ERROR occured: [%d] ", yylp_errno);
3483    printf(yylp_errlist[yylp_errno], yylplineno);
3484    printf("\n");
3485  }
3486  else if(pi!=NULL) printpi(pi);
3487  if (texinfo_out)
3488    printf("1;");
3489  exit(0);
3490}
3491
3492#endif /* STANDALONE_PARSER */
3493#endif /* HAVE_LIBPARSE */
Note: See TracBrowser for help on using the repository browser.