source: git/Singular/libparse.cc @ 4ccb094

fieker-DuValspielwiese
Last change on this file since 4ccb094 was af68ef, checked in by Hans Schönemann <hannes@…>, 19 years ago
*hannes: PORT git-svn-id: file:///usr/local/Singular/svn/trunk@7971 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.5 2005-04-30 17:38:40 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.5 2005-04-30 17:38:40 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(!p_static && autoexport)
1584               {
1585                  h_top = enterid( proc, 0 /*myynest*/, PROC_CMD,
1586                                 &(basePack->idroot), FALSE );
1587               }
1588               #else
1589               h0 = enterid( proc, 0 /*myynest*/, PROC_CMD,
1590                                   &IDROOT, TRUE );
1591               #endif /* HAVE_NS */
1592               /* omCheckAddr(IDID(h0)); */
1593               if (h0!=NULL)
1594               {
1595                 iiInitSingularProcinfo(IDPROC(h0), newlib, proc,
1596                                yylplineno, current_pos(0),p_static);
1597                 #ifdef HAVE_NS
1598                 if (!p_static && h_top != NULL && autoexport)
1599                 {
1600                   if(IDPROC(h_top)!=NULL) piCleanUp((procinfo *)IDPROC(h_top));
1601                   IDPROC(h_top)=IDPROC(h0);
1602                   IDPROC(h_top)->ref++;
1603                 }
1604                 IDPROC(h0)->pack=IDPACKAGE(pl);
1605                 #endif /* HAVE_NS */
1606                 if (BVERBOSE(V_LOAD_PROC))
1607                   Warn( "     proc '%s' registered", proc );
1608               }
1609               #endif /*STANDALONE_PARSER*/
1610               SET_DEF_END(mode, pi, current_pos(yyleng+1));
1611               #if YYLPDEBUG
1612               if(lpverbose)
1613               {
1614                  printf("// PROCEDURE '%s' status: %s, ", proc,
1615                      p_static ? "local" : "global");
1616                  printf("starting at line %d,%d: definition end: %d (%d).\n",
1617                      yylplineno, current_pos(0), (int)pi->data.s.def_end, brace1);
1618               }
1619               #endif
1620               p_static=FALSE;
1621             #ifndef STANDALONE_PARSER
1622             }
1623             #endif /*STANDALONE_PARSER*/
1624           }
1625        YY_BREAK
1626case 8:
1627YY_RULE_SETUP
1628#line 375 "libparse.l"
1629{
1630             BEGIN(pexample);
1631             SET_EXAMPLE_START(mode, pi, yylplineno, current_pos(0));
1632             #if YYLPDEBUG
1633             if(lpverbose)
1634             {
1635                printf("//     EXAMPLE at line %d,%d (%d)\n", yylplineno,
1636                    current_pos(0), brace1);
1637             }
1638             #endif
1639           }
1640        YY_BREAK
1641case 9:
1642YY_RULE_SETUP
1643#line 387 "libparse.l"
1644{ quote++;
1645             BEGIN(libcmd);
1646           }
1647        YY_BREAK
1648case 10:
1649YY_RULE_SETUP
1650#line 391 "libparse.l"
1651{ quote++; brace2++;
1652             BEGIN(libcmd2);
1653           }
1654        YY_BREAK
1655case 11:
1656YY_RULE_SETUP
1657#line 395 "libparse.l"
1658{
1659             make_version(yytext, 0);
1660             #if YYLPDEBUG > 1
1661             printf("+(id)HEAD:%s\n", yytext);
1662             #endif
1663           }
1664        YY_BREAK
1665case 12:
1666YY_RULE_SETUP
1667#line 401 "libparse.l"
1668{
1669             #if YYLPDEBUG
1670             printf("+(cmt)HEAD:%s\n", yytext);
1671             #endif
1672           }
1673        YY_BREAK
1674case 13:
1675YY_RULE_SETUP
1676#line 406 "libparse.l"
1677{
1678             #if YYLPDEBUG > 1
1679             printf("-HEAD:%s\n", yytext);
1680             #endif
1681           }
1682        YY_BREAK
1683case 14:
1684YY_RULE_SETUP
1685#line 411 "libparse.l"
1686{ yyless(0);
1687             BEGIN(INITIAL);
1688             yymore();
1689           }
1690        YY_BREAK
1691case 15:
1692YY_RULE_SETUP
1693#line 415 "libparse.l"
1694{
1695             yyless(0);
1696             *lib_style = NEW_LIBSTYLE;
1697             BEGIN(INITIAL);
1698             yymore();
1699           }
1700        YY_BREAK
1701case 16:
1702YY_RULE_SETUP
1703#line 422 "libparse.l"
1704{ quote++;
1705             BEGIN(libcmd);
1706           }
1707        YY_BREAK
1708case 17:
1709YY_RULE_SETUP
1710#line 425 "libparse.l"
1711{ quote++; brace2++;
1712             BEGIN(libcmd2);
1713           }
1714        YY_BREAK
1715case 18:
1716YY_RULE_SETUP
1717#line 428 "libparse.l"
1718{ yylplineno++; }
1719        YY_BREAK
1720case 19:
1721YY_RULE_SETUP
1722#line 429 "libparse.l"
1723{
1724             #if YYLPDEBUG > 1
1725             printf(" HEAD:%s\n", yytext);
1726             #endif
1727             yyless(0);
1728             BEGIN(help);
1729           }
1730        YY_BREAK
1731case 20:
1732YY_RULE_SETUP
1733#line 436 "libparse.l"
1734{
1735             #if YYLPDEBUG > 1
1736             printf(" HELP:%s\n", yytext);
1737             #endif
1738             BEGIN(INITIAL); }
1739        YY_BREAK
1740case 21:
1741YY_RULE_SETUP
1742#line 441 "libparse.l"
1743{
1744             #if YYLPDEBUG > 1
1745             printf(" HELP:%s\n", yytext);
1746             #endif
1747             BEGIN(INITIAL);
1748           }
1749        YY_BREAK
1750case 22:
1751YY_RULE_SETUP
1752#line 447 "libparse.l"
1753{
1754             yyless(0);
1755             *lib_style = NEW_LIBSTYLE;
1756             BEGIN(INITIAL);
1757             yymore();
1758           }
1759        YY_BREAK
1760case 23:
1761YY_RULE_SETUP
1762#line 453 "libparse.l"
1763{
1764             yyless(0);
1765             //printf("2) proc found.\n");
1766             BEGIN(INITIAL);
1767             yymore();
1768           }
1769        YY_BREAK
1770case 24:
1771YY_RULE_SETUP
1772#line 459 "libparse.l"
1773{ quote++;
1774             BEGIN(libcmd);
1775           }
1776        YY_BREAK
1777case 25:
1778YY_RULE_SETUP
1779#line 462 "libparse.l"
1780{ quote++; brace2++;
1781             BEGIN(libcmd2);
1782           }
1783        YY_BREAK
1784case 26:
1785YY_RULE_SETUP
1786#line 466 "libparse.l"
1787{ yylplineno++; }
1788        YY_BREAK
1789case 27:
1790YY_RULE_SETUP
1791#line 467 "libparse.l"
1792{
1793             #if YYLPDEBUG
1794             if(lpverbose>2) printf("--->%s<---\n", yytext);
1795             #endif
1796           }
1797        YY_BREAK
1798case 28:
1799YY_RULE_SETUP
1800#line 472 "libparse.l"
1801{
1802             found_oldhelp=1;
1803             #if YYLPDEBUG > 1
1804             printf("-HELP:%s\n", yytext);
1805             #endif
1806           }
1807        YY_BREAK
1808case 29:
1809YY_RULE_SETUP
1810#line 480 "libparse.l"
1811{ quote--;
1812             yytext[yyleng-1] = '\0';
1813             #ifndef STANDALONE_PARSER
1814             if ( mode == LOAD_LIB )
1815             {
1816               library_stack->push(newlib, yytext);
1817             }
1818             #endif /* STANDALONE_PARSER */
1819             #if YYLPDEBUG
1820             if(lpverbose>1) printf("LIB:'%s'\n", yytext);
1821             #endif
1822             BEGIN(INITIAL);
1823           }
1824        YY_BREAK
1825case 30:
1826YY_RULE_SETUP
1827#line 493 "libparse.l"
1828{ quote--; brace2--;
1829             yytext[yyleng-1] = '\0';
1830             #ifndef STANDALONE_PARSER
1831             if ( mode == LOAD_LIB )
1832             {
1833               library_stack->push(newlib, yytext);
1834             }
1835             #endif /* STANDALONE_PARSER */
1836             #if YYLPDEBUG
1837             if(lpverbose>1) printf("LIB:'%s'\n", yytext);
1838             #endif
1839             BEGIN(INITIAL);
1840           }
1841        YY_BREAK
1842case 31:
1843YY_RULE_SETUP
1844#line 507 "libparse.l"
1845{ }
1846        YY_BREAK
1847case 32:
1848YY_RULE_SETUP
1849#line 508 "libparse.l"
1850{
1851             brace2++;
1852             #if YYLPDEBUG > 1
1853             printf("%s", yytext);
1854             #endif
1855           }
1856        YY_BREAK
1857case 33:
1858YY_RULE_SETUP
1859#line 514 "libparse.l"
1860{
1861             brace2--;
1862             #if YYLPDEBUG > 1
1863             printf(">%s<\n", yytext);
1864             printf("{=%d, (=%d, [=%d\n", brace1, brace2, brace3);
1865             #endif
1866             if(brace2<=0)
1867             {
1868               #if YYLPDEBUG > 1
1869               printf("BEGIN(phead){=%d, (=%d, [=%d\n", brace1, brace2, brace3);
1870               #endif
1871               SET_DEF_END(mode, pi, current_pos(yyleng));
1872               BEGIN(phead);
1873             }
1874           }
1875        YY_BREAK
1876case 34:
1877YY_RULE_SETUP
1878#line 529 "libparse.l"
1879{
1880             if(brace2>0)
1881             {
1882               #if YYLPDEBUG > 1
1883               printf("{=%d, (=%d, [=%d\n", brace1, brace2, brace3);
1884               #endif
1885               yylp_errno = YYLP_DEF_BR2;
1886               return(1);
1887             }
1888             else
1889             {
1890               brace1++; BEGIN(pbody);
1891               if(lpverbose)
1892                  printf("//     BODY at line %d,%d (%d)\n", yylplineno,
1893                      current_pos(0), brace1);
1894               SET_BODY_START(mode, pi, yylplineno, current_pos(0));
1895             }
1896           }
1897        YY_BREAK
1898case 35:
1899YY_RULE_SETUP
1900#line 547 "libparse.l"
1901{ yylplineno++;
1902              if(brace2<=0)
1903              {
1904#if YYLPDEBUG > 1
1905                printf("BEGIN(phead-2){=%d, (=%d, [=%d\n", brace1, brace2, brace3);
1906#endif
1907                BEGIN(phead);
1908              }
1909            }
1910        YY_BREAK
1911case 36:
1912YY_RULE_SETUP
1913#line 556 "libparse.l"
1914{ }
1915        YY_BREAK
1916case 37:
1917YY_RULE_SETUP
1918#line 557 "libparse.l"
1919{ old_state = YYSTATE; BEGIN(comment); }
1920        YY_BREAK
1921case 38:
1922YY_RULE_SETUP
1923#line 558 "libparse.l"
1924{
1925             if(brace2<=0)
1926             {
1927               BEGIN(phead);
1928               yyless(0);
1929             }
1930           }
1931        YY_BREAK
1932case 39:
1933YY_RULE_SETUP
1934#line 566 "libparse.l"
1935{
1936              #if YYLPDEBUG
1937              if(lpverbose>2)printf("0-Len=%d;\n", yyleng);
1938              #endif
1939              if(check)
1940              {
1941                printf("Procedure %s (line %d) has OLD-STYLE-HELP!\n",
1942                       pi->procname, pi->data.s.proc_lineno);
1943              }
1944              SET_HELP_START(mode, pi, current_pos(0));
1945              BEGIN(poldhelp);
1946              yyless(0);
1947           }
1948        YY_BREAK
1949case 40:
1950YY_RULE_SETUP
1951#line 579 "libparse.l"
1952{
1953              #if YYLPDEBUG
1954              if(lpverbose>2)printf("1-Len=%d;\n", yyleng);
1955              #endif
1956              BEGIN(phelp);
1957              yyless(0);
1958           }
1959        YY_BREAK
1960case 41:
1961YY_RULE_SETUP
1962#line 586 "libparse.l"
1963{
1964              if(check && yyleng>2)
1965              {
1966                printf("Procedure %s (line %d) has OLD-STYLE-HELP!\n",
1967                       pi->procname, pi->data.s.proc_lineno);
1968              }
1969              #if YYLPDEBUG
1970              if(lpverbose>2 && yyleng>2)
1971                 printf("2-Len=%d, %s;\n", yyleng, pi->procname);
1972              #endif
1973              SET_HELP_START(mode, pi, current_pos(0));
1974              BEGIN(poldhelp);
1975              yyless(0);
1976           }
1977        YY_BREAK
1978case 42:
1979YY_RULE_SETUP
1980#line 600 "libparse.l"
1981{ printf("[%s]", yytext); }
1982        YY_BREAK
1983case 43:
1984YY_RULE_SETUP
1985#line 602 "libparse.l"
1986{ }
1987        YY_BREAK
1988case 44:
1989YY_RULE_SETUP
1990#line 603 "libparse.l"
1991{
1992                SET_HELP_END(mode, pi, current_pos(0));
1993                brace1++; BEGIN(pbody);
1994                if(lpverbose)
1995                {
1996                   printf("//     HELP from %d to %d\n",
1997                       (int)pi->data.s.help_start, (int)pi->data.s.help_end);
1998                   printf("//     BODY at line %d,%d (%d)\n", yylplineno,
1999                       current_pos(0), brace1);
2000                }
2001#if YYLPDEBUG > 1
2002                printf("BEGIN(pbody){=%d, (=%d, [=%d\n", brace1, brace2, brace3);
2003#endif
2004                SET_BODY_START(mode, pi, yylplineno, current_pos(0));
2005#if YYLPDEBUG > 1
2006                printf("BODY at %d/%d", yylplineno, current_pos(0));
2007#endif
2008              }
2009        YY_BREAK
2010case 45:
2011YY_RULE_SETUP
2012#line 621 "libparse.l"
2013{ yylplineno++; }
2014        YY_BREAK
2015case 46:
2016YY_RULE_SETUP
2017#line 622 "libparse.l"
2018{ }
2019        YY_BREAK
2020case 47:
2021YY_RULE_SETUP
2022#line 624 "libparse.l"
2023{
2024             old_state = YYSTATE;
2025             BEGIN(string);
2026             SET_HELP_START(mode, pi, current_pos(1));
2027           }
2028        YY_BREAK
2029case 48:
2030YY_RULE_SETUP
2031#line 629 "libparse.l"
2032{}
2033        YY_BREAK
2034case 49:
2035YY_RULE_SETUP
2036#line 630 "libparse.l"
2037{
2038             brace1++; BEGIN(pbody);
2039             if(lpverbose)
2040             {
2041                printf("//     HELP from %d to %d\n",
2042                    (int)pi->data.s.help_start, (int)pi->data.s.help_end);
2043                printf("//     BODY at line %d,%d (%d)\n", yylplineno,
2044                    current_pos(0), brace1);
2045             }
2046             #if YYLPDEBUG > 1
2047             printf("BEGIN(pbody){=%d, (=%d, [=%d\n", brace1, brace2, brace3);
2048             #endif
2049             SET_BODY_START(mode, pi, yylplineno, current_pos(0));
2050             #if YYLPDEBUG > 1
2051             printf("BODY at %d/%d", yylplineno, current_pos(0));
2052             #endif
2053           }
2054        YY_BREAK
2055case 50:
2056YY_RULE_SETUP
2057#line 647 "libparse.l"
2058{ yylplineno++;}
2059        YY_BREAK
2060case 51:
2061YY_RULE_SETUP
2062#line 649 "libparse.l"
2063{ }
2064        YY_BREAK
2065case 52:
2066YY_RULE_SETUP
2067#line 650 "libparse.l"
2068{ quote++; old_state = YYSTATE;
2069                 BEGIN(string); /* printf("%s", yytext); */
2070               }
2071        YY_BREAK
2072case 53:
2073YY_RULE_SETUP
2074#line 654 "libparse.l"
2075{
2076             if(check) printf("*** found 2 proc whithin procedure '%s'.\n",
2077                          pi->procname);
2078             yyless(yyleng-1);
2079           }
2080        YY_BREAK
2081case 54:
2082YY_RULE_SETUP
2083#line 659 "libparse.l"
2084{
2085             if(check) printf("*** found 1 proc whithin procedure '%s'.\n",
2086                          pi->procname);
2087             yyless(yyleng-1);
2088           }
2089        YY_BREAK
2090case 55:
2091YY_RULE_SETUP
2092#line 664 "libparse.l"
2093{
2094                 brace1++;
2095                 #if YYLPDEBUG > 1
2096                 printf("line: %d, (%d)%s\n", yylplineno, brace1, yytext);
2097                 #endif
2098                }
2099        YY_BREAK
2100case 56:
2101YY_RULE_SETUP
2102#line 670 "libparse.l"
2103{
2104                           #if YYLPDEBUG > 1
2105                           printf("line: %d, (%d)%s\n",
2106                             yylplineno, brace1, yytext);
2107                           #endif
2108                           brace1--;
2109                           if(brace2>0)
2110                           {
2111                             yylp_errno = YYLP_BODY_BR2;
2112                             return(1);
2113                           }
2114                           if(brace3>0)
2115                           {
2116                             yylp_errno = YYLP_BODY_BR3;
2117                             return(1);
2118                           }
2119                           if(brace1<=0)
2120                           {
2121                             SET_BODY_END(mode, pi, current_pos(yyleng));
2122                             SET_PROC_END(mode, pi, current_pos(yyleng));
2123                             #if YYLPDEBUG > 1
2124                               printf("-%d\n", current_pos(0));
2125                             #endif
2126                             BEGIN(INITIAL);
2127                           }
2128                         }
2129        YY_BREAK
2130case 57:
2131YY_RULE_SETUP
2132#line 696 "libparse.l"
2133{
2134                           brace2++; /* printf("%s", yytext); */
2135                         }
2136        YY_BREAK
2137case 58:
2138YY_RULE_SETUP
2139#line 699 "libparse.l"
2140{
2141                           brace2--; /* printf("%s", yytext); */
2142                           if(brace2<0) {
2143                             yylp_errno = YYLP_BODY_TMBR2;
2144                             return(1);
2145                           }
2146                         }
2147        YY_BREAK
2148case 59:
2149YY_RULE_SETUP
2150#line 706 "libparse.l"
2151{
2152                           brace3++; /* printf("%s", yytext); */
2153                         }
2154        YY_BREAK
2155case 60:
2156YY_RULE_SETUP
2157#line 709 "libparse.l"
2158{
2159                           brace3--; /* printf("%s", yytext); */
2160                           if(brace3<0) {
2161                             yylp_errno = YYLP_BODY_TMBR3;
2162                             return(1);
2163                           }
2164                         }
2165        YY_BREAK
2166case 61:
2167YY_RULE_SETUP
2168#line 716 "libparse.l"
2169{ yylplineno++; }
2170        YY_BREAK
2171case 62:
2172YY_RULE_SETUP
2173#line 717 "libparse.l"
2174{ }
2175        YY_BREAK
2176case 63:
2177YY_RULE_SETUP
2178#line 719 "libparse.l"
2179{
2180             quote++; BEGIN(string);
2181             found_info++;
2182             string_start = current_pos(yyleng);
2183             *lib_style = NEW_LIBSTYLE;
2184             last_cmd = LP_INFO;
2185       }
2186        YY_BREAK
2187case 64:
2188YY_RULE_SETUP
2189#line 726 "libparse.l"
2190{ yylplineno++; }
2191        YY_BREAK
2192case 65:
2193YY_RULE_SETUP
2194#line 727 "libparse.l"
2195{ }
2196        YY_BREAK
2197case 66:
2198YY_RULE_SETUP
2199#line 729 "libparse.l"
2200{
2201             quote++; BEGIN(string);
2202             found_cat++;
2203             string_start = current_pos(yyleng);
2204             *lib_style = NEW_LIBSTYLE;
2205             last_cmd = LP_CATEGORY;
2206       }
2207        YY_BREAK
2208case 67:
2209YY_RULE_SETUP
2210#line 736 "libparse.l"
2211{ yylplineno++; }
2212        YY_BREAK
2213case 68:
2214YY_RULE_SETUP
2215#line 737 "libparse.l"
2216{ }
2217        YY_BREAK
2218case 69:
2219YY_RULE_SETUP
2220#line 739 "libparse.l"
2221{ quote--;
2222                           copy_string(mode);
2223                           last_cmd = LP_NONE;
2224                           if(old_state==phelp)
2225                           {
2226                              SET_HELP_END(mode, pi, current_pos(0));
2227                           }
2228                           BEGIN(old_state); /* printf("%s", yytext); */
2229                         }
2230        YY_BREAK
2231case 70:
2232YY_RULE_SETUP
2233#line 748 "libparse.l"
2234{ if (old_state == phelp) IncrCheckSum(*yytext);}
2235        YY_BREAK
2236case 71:
2237YY_RULE_SETUP
2238#line 749 "libparse.l"
2239{ yylplineno++; if (old_state == phelp) IncrCheckSum('\n');}
2240        YY_BREAK
2241case 72:
2242YY_RULE_SETUP
2243#line 750 "libparse.l"
2244{ if (old_state == phelp) IncrCheckSum(*yytext);}
2245        YY_BREAK
2246case 73:
2247YY_RULE_SETUP
2248#line 752 "libparse.l"
2249{ }
2250        YY_BREAK
2251case 74:
2252YY_RULE_SETUP
2253#line 753 "libparse.l"
2254{ quote++; old_state = YYSTATE;
2255                           BEGIN(string); /* printf("%s", yytext); */
2256                         }
2257        YY_BREAK
2258case 75:
2259YY_RULE_SETUP
2260#line 756 "libparse.l"
2261{
2262                           brace1++; /* printf("(%d)%s", brace1, yytext); */
2263                         }
2264        YY_BREAK
2265case 76:
2266YY_RULE_SETUP
2267#line 759 "libparse.l"
2268{
2269                           brace1--; /* printf("(%d)%s", brace1, yytext); */
2270                           if(brace1<=0) {
2271                             if(brace2>0) { yylp_errno=YYLP_EX_BR2; return(1); }
2272                             if(brace3>0) { yylp_errno=YYLP_EX_BR3; return(1); }
2273                             BEGIN(INITIAL);
2274                             SET_PROC_END(mode, pi, current_pos(yyleng));
2275                           }
2276                         }
2277        YY_BREAK
2278case 77:
2279YY_RULE_SETUP
2280#line 768 "libparse.l"
2281{
2282                           brace2++; /* printf("%s", yytext); */
2283                         }
2284        YY_BREAK
2285case 78:
2286YY_RULE_SETUP
2287#line 771 "libparse.l"
2288{
2289                           brace2--; /* printf("%s", yytext); */
2290                         }
2291        YY_BREAK
2292case 79:
2293YY_RULE_SETUP
2294#line 774 "libparse.l"
2295{
2296                           brace3++; /* printf("%s", yytext); */
2297                         }
2298        YY_BREAK
2299case 80:
2300YY_RULE_SETUP
2301#line 777 "libparse.l"
2302{
2303                           brace3--; /* printf("%s", yytext); */
2304                         }
2305        YY_BREAK
2306case 81:
2307YY_RULE_SETUP
2308#line 780 "libparse.l"
2309{ yylplineno++; }
2310        YY_BREAK
2311case 82:
2312YY_RULE_SETUP
2313#line 781 "libparse.l"
2314{ }
2315        YY_BREAK
2316case 83:
2317YY_RULE_SETUP
2318#line 783 "libparse.l"
2319{ quote--;
2320                           BEGIN(pexample); /* printf("%s", yytext); */
2321                         }
2322        YY_BREAK
2323case 84:
2324YY_RULE_SETUP
2325#line 786 "libparse.l"
2326{ }
2327        YY_BREAK
2328case 85:
2329YY_RULE_SETUP
2330#line 787 "libparse.l"
2331{ }
2332        YY_BREAK
2333case 86:
2334YY_RULE_SETUP
2335#line 788 "libparse.l"
2336{ yylplineno++; }
2337        YY_BREAK
2338case 87:
2339YY_RULE_SETUP
2340#line 789 "libparse.l"
2341{ }
2342        YY_BREAK
2343case 88:
2344YY_RULE_SETUP
2345#line 791 "libparse.l"
2346{ BEGIN(old_state); }
2347        YY_BREAK
2348case 89:
2349YY_RULE_SETUP
2350#line 792 "libparse.l"
2351{ yylplineno++; }
2352        YY_BREAK
2353case 90:
2354YY_RULE_SETUP
2355#line 793 "libparse.l"
2356{ }
2357        YY_BREAK
2358case 91:
2359YY_RULE_SETUP
2360#line 795 "libparse.l"
2361{ yylplineno++; }
2362        YY_BREAK
2363case 92:
2364YY_RULE_SETUP
2365#line 796 "libparse.l"
2366{ }
2367        YY_BREAK
2368case 93:
2369YY_RULE_SETUP
2370#line 797 "libparse.l"
2371{ p_static = FALSE;
2372                            #if YYLPDEBUG > 1
2373                            printf("%s", yytext);
2374                            #endif
2375                         }
2376        YY_BREAK
2377case 94:
2378YY_RULE_SETUP
2379#line 802 "libparse.l"
2380{ p_static = FALSE;
2381                           yylp_errno = YYLP_BAD_CHAR;
2382                           #ifdef STANDALONE_PARSER
2383                           printf("[%d]", *yytext);
2384                           #else
2385                           if (text_buffer!=NULL) omFree((ADDRESS)text_buffer);
2386                           text_buffer = omStrDup(yytext);
2387                           omMarkAsStaticAddr(text_buffer);
2388                           #endif
2389                           #if YYLPDEBUG > 1
2390                             printf("[%s]", yytext);
2391                           #endif
2392                           return(1);
2393                         }
2394        YY_BREAK
2395case 95:
2396YY_RULE_SETUP
2397#line 817 "libparse.l"
2398ECHO;
2399        YY_BREAK
2400case YY_STATE_EOF(INITIAL):
2401case YY_STATE_EOF(header):
2402case YY_STATE_EOF(help):
2403case YY_STATE_EOF(libcmd):
2404case YY_STATE_EOF(libcmd2):
2405case YY_STATE_EOF(pdef):
2406case YY_STATE_EOF(phead):
2407case YY_STATE_EOF(poldhelp):
2408case YY_STATE_EOF(phelp):
2409case YY_STATE_EOF(pbody):
2410case YY_STATE_EOF(pstr):
2411case YY_STATE_EOF(pexample):
2412case YY_STATE_EOF(pestr):
2413case YY_STATE_EOF(string):
2414case YY_STATE_EOF(comment):
2415case YY_STATE_EOF(info):
2416case YY_STATE_EOF(category):
2417case YY_STATE_EOF(version):
2418        yyterminate();
2419
2420        case YY_END_OF_BUFFER:
2421                {
2422                /* Amount of text matched not including the EOB char. */
2423                int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
2424
2425                /* Undo the effects of YY_DO_BEFORE_ACTION. */
2426                *yy_cp = yy_hold_char;
2427                YY_RESTORE_YY_MORE_OFFSET
2428
2429                if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
2430                        {
2431                        /* We're scanning a new file or input source.  It's
2432                         * possible that this happened because the user
2433                         * just pointed yyin at a new source and called
2434                         * yylex().  If so, then we have to assure
2435                         * consistency between yy_current_buffer and our
2436                         * globals.  Here is the right place to do so, because
2437                         * this is the first action (other than possibly a
2438                         * back-up) that will match for the new input source.
2439                         */
2440                        yy_n_chars = yy_current_buffer->yy_n_chars;
2441                        yy_current_buffer->yy_input_file = yyin;
2442                        yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
2443                        }
2444
2445                /* Note that here we test for yy_c_buf_p "<=" to the position
2446                 * of the first EOB in the buffer, since yy_c_buf_p will
2447                 * already have been incremented past the NUL character
2448                 * (since all states make transitions on EOB to the
2449                 * end-of-buffer state).  Contrast this with the test
2450                 * in input().
2451                 */
2452                if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2453                        { /* This was really a NUL. */
2454                        yy_state_type yy_next_state;
2455
2456                        yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
2457
2458                        yy_current_state = yy_get_previous_state();
2459
2460                        /* Okay, we're now positioned to make the NUL
2461                         * transition.  We couldn't have
2462                         * yy_get_previous_state() go ahead and do it
2463                         * for us because it doesn't know how to deal
2464                         * with the possibility of jamming (and we don't
2465                         * want to build jamming into it because then it
2466                         * will run more slowly).
2467                         */
2468
2469                        yy_next_state = yy_try_NUL_trans( yy_current_state );
2470
2471                        yy_bp = yytext_ptr + YY_MORE_ADJ;
2472
2473                        if ( yy_next_state )
2474                                {
2475                                /* Consume the NUL. */
2476                                yy_cp = ++yy_c_buf_p;
2477                                yy_current_state = yy_next_state;
2478                                goto yy_match;
2479                                }
2480
2481                        else
2482                                {
2483                                yy_cp = yy_c_buf_p;
2484                                goto yy_find_action;
2485                                }
2486                        }
2487
2488                else switch ( yy_get_next_buffer() )
2489                        {
2490                        case EOB_ACT_END_OF_FILE:
2491                                {
2492                                yy_did_buffer_switch_on_eof = 0;
2493
2494                                if ( yywrap() )
2495                                        {
2496                                        /* Note: because we've taken care in
2497                                         * yy_get_next_buffer() to have set up
2498                                         * yytext, we can now set up
2499                                         * yy_c_buf_p so that if some total
2500                                         * hoser (like flex itself) wants to
2501                                         * call the scanner after we return the
2502                                         * YY_NULL, it'll still work - another
2503                                         * YY_NULL will get returned.
2504                                         */
2505                                        yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
2506
2507                                        yy_act = YY_STATE_EOF(YY_START);
2508                                        goto do_action;
2509                                        }
2510
2511                                else
2512                                        {
2513                                        if ( ! yy_did_buffer_switch_on_eof )
2514                                                YY_NEW_FILE;
2515                                        }
2516                                break;
2517                                }
2518
2519                        case EOB_ACT_CONTINUE_SCAN:
2520                                yy_c_buf_p =
2521                                        yytext_ptr + yy_amount_of_matched_text;
2522
2523                                yy_current_state = yy_get_previous_state();
2524
2525                                yy_cp = yy_c_buf_p;
2526                                yy_bp = yytext_ptr + YY_MORE_ADJ;
2527                                goto yy_match;
2528
2529                        case EOB_ACT_LAST_MATCH:
2530                                yy_c_buf_p =
2531                                &yy_current_buffer->yy_ch_buf[yy_n_chars];
2532
2533                                yy_current_state = yy_get_previous_state();
2534
2535                                yy_cp = yy_c_buf_p;
2536                                yy_bp = yytext_ptr + YY_MORE_ADJ;
2537                                goto yy_find_action;
2538                        }
2539                break;
2540                }
2541
2542        default:
2543                YY_FATAL_ERROR(
2544                        "fatal flex scanner internal error--no action found" );
2545        } /* end of action switch */
2546                } /* end of scanning one token */
2547        } /* end of yylex */
2548
2549
2550/* yy_get_next_buffer - try to read in a new buffer
2551 *
2552 * Returns a code representing an action:
2553 *      EOB_ACT_LAST_MATCH -
2554 *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2555 *      EOB_ACT_END_OF_FILE - end of file
2556 */
2557
2558static int yy_get_next_buffer()
2559        {
2560        register char *dest = yy_current_buffer->yy_ch_buf;
2561        register char *source = yytext_ptr;
2562        register int number_to_move, i;
2563        int ret_val;
2564
2565        if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
2566                YY_FATAL_ERROR(
2567                "fatal flex scanner internal error--end of buffer missed" );
2568
2569        if ( yy_current_buffer->yy_fill_buffer == 0 )
2570                { /* Don't try to fill the buffer, so this is an EOF. */
2571                if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
2572                        {
2573                        /* We matched a single character, the EOB, so
2574                         * treat this as a final EOF.
2575                         */
2576                        return EOB_ACT_END_OF_FILE;
2577                        }
2578
2579                else
2580                        {
2581                        /* We matched some text prior to the EOB, first
2582                         * process it.
2583                         */
2584                        return EOB_ACT_LAST_MATCH;
2585                        }
2586                }
2587
2588        /* Try to read more data. */
2589
2590        /* First move last chars to start of buffer. */
2591        number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
2592
2593        for ( i = 0; i < number_to_move; ++i )
2594                *(dest++) = *(source++);
2595
2596        if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2597                /* don't do the read, it's not guaranteed to return an EOF,
2598                 * just force an EOF
2599                 */
2600                yy_current_buffer->yy_n_chars = yy_n_chars = 0;
2601
2602        else
2603                {
2604                int num_to_read =
2605                        yy_current_buffer->yy_buf_size - number_to_move - 1;
2606
2607                while ( num_to_read <= 0 )
2608                        { /* Not enough room in the buffer - grow it. */
2609#ifdef YY_USES_REJECT
2610                        YY_FATAL_ERROR(
2611"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2612#else
2613
2614                        /* just a shorter name for the current buffer */
2615                        YY_BUFFER_STATE b = yy_current_buffer;
2616
2617                        int yy_c_buf_p_offset =
2618                                (int) (yy_c_buf_p - b->yy_ch_buf);
2619
2620                        if ( b->yy_is_our_buffer )
2621                                {
2622                                int new_size = b->yy_buf_size * 2;
2623
2624                                if ( new_size <= 0 )
2625                                        b->yy_buf_size += b->yy_buf_size / 8;
2626                                else
2627                                        b->yy_buf_size *= 2;
2628
2629                                b->yy_ch_buf = (char *)
2630                                        /* Include room in for 2 EOB chars. */
2631                                        yy_flex_realloc( (void *) b->yy_ch_buf,
2632                                                         b->yy_buf_size + 2 );
2633                                }
2634                        else
2635                                /* Can't grow it, we don't own it. */
2636                                b->yy_ch_buf = 0;
2637
2638                        if ( ! b->yy_ch_buf )
2639                                YY_FATAL_ERROR(
2640                                "fatal error - scanner input buffer overflow" );
2641
2642                        yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2643
2644                        num_to_read = yy_current_buffer->yy_buf_size -
2645                                                number_to_move - 1;
2646#endif
2647                        }
2648
2649                if ( num_to_read > YY_READ_BUF_SIZE )
2650                        num_to_read = YY_READ_BUF_SIZE;
2651
2652                /* Read in more data. */
2653                YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
2654                        yy_n_chars, num_to_read );
2655
2656                yy_current_buffer->yy_n_chars = yy_n_chars;
2657                }
2658
2659        if ( yy_n_chars == 0 )
2660                {
2661                if ( number_to_move == YY_MORE_ADJ )
2662                        {
2663                        ret_val = EOB_ACT_END_OF_FILE;
2664                        yyrestart( yyin );
2665                        }
2666
2667                else
2668                        {
2669                        ret_val = EOB_ACT_LAST_MATCH;
2670                        yy_current_buffer->yy_buffer_status =
2671                                YY_BUFFER_EOF_PENDING;
2672                        }
2673                }
2674
2675        else
2676                ret_val = EOB_ACT_CONTINUE_SCAN;
2677
2678        yy_n_chars += number_to_move;
2679        yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2680        yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2681
2682        yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
2683
2684        return ret_val;
2685        }
2686
2687
2688/* yy_get_previous_state - get the state just before the EOB char was reached */
2689
2690static yy_state_type yy_get_previous_state()
2691        {
2692        register yy_state_type yy_current_state;
2693        register char *yy_cp;
2694
2695        yy_current_state = yy_start;
2696        yy_current_state += YY_AT_BOL();
2697
2698        for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2699                {
2700                register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2701                if ( yy_accept[yy_current_state] )
2702                        {
2703                        yy_last_accepting_state = yy_current_state;
2704                        yy_last_accepting_cpos = yy_cp;
2705                        }
2706                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2707                        {
2708                        yy_current_state = (int) yy_def[yy_current_state];
2709                        if ( yy_current_state >= 457 )
2710                                yy_c = yy_meta[(unsigned int) yy_c];
2711                        }
2712                yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2713                }
2714
2715        return yy_current_state;
2716        }
2717
2718
2719/* yy_try_NUL_trans - try to make a transition on the NUL character
2720 *
2721 * synopsis
2722 *      next_state = yy_try_NUL_trans( current_state );
2723 */
2724
2725#ifdef YY_USE_PROTOS
2726static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2727#else
2728static yy_state_type yy_try_NUL_trans( yy_current_state )
2729yy_state_type yy_current_state;
2730#endif
2731        {
2732        register int yy_is_jam;
2733        register char *yy_cp = yy_c_buf_p;
2734
2735        register YY_CHAR yy_c = 1;
2736        if ( yy_accept[yy_current_state] )
2737                {
2738                yy_last_accepting_state = yy_current_state;
2739                yy_last_accepting_cpos = yy_cp;
2740                }
2741        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2742                {
2743                yy_current_state = (int) yy_def[yy_current_state];
2744                if ( yy_current_state >= 457 )
2745                        yy_c = yy_meta[(unsigned int) yy_c];
2746                }
2747        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2748        yy_is_jam = (yy_current_state == 456);
2749
2750        return yy_is_jam ? 0 : yy_current_state;
2751        }
2752
2753
2754#ifndef YY_NO_UNPUT
2755#ifdef YY_USE_PROTOS
2756static void yyunput( int c, register char *yy_bp )
2757#else
2758static void yyunput( c, yy_bp )
2759int c;
2760register char *yy_bp;
2761#endif
2762        {
2763        register char *yy_cp = yy_c_buf_p;
2764
2765        /* undo effects of setting up yytext */
2766        *yy_cp = yy_hold_char;
2767
2768        if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2769                { /* need to shift things up to make room */
2770                /* +2 for EOB chars. */
2771                register int number_to_move = yy_n_chars + 2;
2772                register char *dest = &yy_current_buffer->yy_ch_buf[
2773                                        yy_current_buffer->yy_buf_size + 2];
2774                register char *source =
2775                                &yy_current_buffer->yy_ch_buf[number_to_move];
2776
2777                while ( source > yy_current_buffer->yy_ch_buf )
2778                        *--dest = *--source;
2779
2780                yy_cp += (int) (dest - source);
2781                yy_bp += (int) (dest - source);
2782                yy_current_buffer->yy_n_chars =
2783                        yy_n_chars = yy_current_buffer->yy_buf_size;
2784
2785                if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2786                        YY_FATAL_ERROR( "flex scanner push-back overflow" );
2787                }
2788
2789        *--yy_cp = (char) c;
2790
2791
2792        yytext_ptr = yy_bp;
2793        yy_hold_char = *yy_cp;
2794        yy_c_buf_p = yy_cp;
2795        }
2796#endif  /* ifndef YY_NO_UNPUT */
2797
2798
2799#ifdef __cplusplus
2800static int yyinput()
2801#else
2802static int input()
2803#endif
2804        {
2805        int c;
2806
2807        *yy_c_buf_p = yy_hold_char;
2808
2809        if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2810                {
2811                /* yy_c_buf_p now points to the character we want to return.
2812                 * If this occurs *before* the EOB characters, then it's a
2813                 * valid NUL; if not, then we've hit the end of the buffer.
2814                 */
2815                if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2816                        /* This was really a NUL. */
2817                        *yy_c_buf_p = '\0';
2818
2819                else
2820                        { /* need more input */
2821                        int offset = yy_c_buf_p - yytext_ptr;
2822                        ++yy_c_buf_p;
2823
2824                        switch ( yy_get_next_buffer() )
2825                                {
2826                                case EOB_ACT_LAST_MATCH:
2827                                        /* This happens because yy_g_n_b()
2828                                         * sees that we've accumulated a
2829                                         * token and flags that we need to
2830                                         * try matching the token before
2831                                         * proceeding.  But for input(),
2832                                         * there's no matching to consider.
2833                                         * So convert the EOB_ACT_LAST_MATCH
2834                                         * to EOB_ACT_END_OF_FILE.
2835                                         */
2836
2837                                        /* Reset buffer status. */
2838                                        yyrestart( yyin );
2839
2840                                        /* fall through */
2841
2842                                case EOB_ACT_END_OF_FILE:
2843                                        {
2844                                        if ( yywrap() )
2845                                                return EOF;
2846
2847                                        if ( ! yy_did_buffer_switch_on_eof )
2848                                                YY_NEW_FILE;
2849#ifdef __cplusplus
2850                                        return yyinput();
2851#else
2852                                        return input();
2853#endif
2854                                        }
2855
2856                                case EOB_ACT_CONTINUE_SCAN:
2857                                        yy_c_buf_p = yytext_ptr + offset;
2858                                        break;
2859                                }
2860                        }
2861                }
2862
2863        c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
2864        *yy_c_buf_p = '\0';     /* preserve yytext */
2865        yy_hold_char = *++yy_c_buf_p;
2866
2867        yy_current_buffer->yy_at_bol = (c == '\n');
2868
2869        return c;
2870        }
2871
2872
2873#ifdef YY_USE_PROTOS
2874void yyrestart( FILE *input_file )
2875#else
2876void yyrestart( input_file )
2877FILE *input_file;
2878#endif
2879        {
2880        if ( ! yy_current_buffer )
2881                yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2882
2883        yy_init_buffer( yy_current_buffer, input_file );
2884        yy_load_buffer_state();
2885        }
2886
2887
2888#ifdef YY_USE_PROTOS
2889void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2890#else
2891void yy_switch_to_buffer( new_buffer )
2892YY_BUFFER_STATE new_buffer;
2893#endif
2894        {
2895        if ( yy_current_buffer == new_buffer )
2896                return;
2897
2898        if ( yy_current_buffer )
2899                {
2900                /* Flush out information for old buffer. */
2901                *yy_c_buf_p = yy_hold_char;
2902                yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2903                yy_current_buffer->yy_n_chars = yy_n_chars;
2904                }
2905
2906        yy_current_buffer = new_buffer;
2907        yy_load_buffer_state();
2908
2909        /* We don't actually know whether we did this switch during
2910         * EOF (yywrap()) processing, but the only time this flag
2911         * is looked at is after yywrap() is called, so it's safe
2912         * to go ahead and always set it.
2913         */
2914        yy_did_buffer_switch_on_eof = 1;
2915        }
2916
2917
2918#ifdef YY_USE_PROTOS
2919void yy_load_buffer_state( void )
2920#else
2921void yy_load_buffer_state()
2922#endif
2923        {
2924        yy_n_chars = yy_current_buffer->yy_n_chars;
2925        yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2926        yyin = yy_current_buffer->yy_input_file;
2927        yy_hold_char = *yy_c_buf_p;
2928        }
2929
2930
2931#ifdef YY_USE_PROTOS
2932YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2933#else
2934YY_BUFFER_STATE yy_create_buffer( file, size )
2935FILE *file;
2936int size;
2937#endif
2938        {
2939        YY_BUFFER_STATE b;
2940
2941        b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2942        if ( ! b )
2943                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2944
2945        b->yy_buf_size = size;
2946
2947        /* yy_ch_buf has to be 2 characters longer than the size given because
2948         * we need to put in 2 end-of-buffer characters.
2949         */
2950        b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2951        if ( ! b->yy_ch_buf )
2952                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2953
2954        b->yy_is_our_buffer = 1;
2955
2956        yy_init_buffer( b, file );
2957
2958        return b;
2959        }
2960
2961
2962#ifdef YY_USE_PROTOS
2963void yy_delete_buffer( YY_BUFFER_STATE b )
2964#else
2965void yy_delete_buffer( b )
2966YY_BUFFER_STATE b;
2967#endif
2968        {
2969        if ( ! b )
2970                return;
2971
2972        if ( b == yy_current_buffer )
2973                yy_current_buffer = (YY_BUFFER_STATE) 0;
2974
2975        if ( b->yy_is_our_buffer )
2976                yy_flex_free( (void *) b->yy_ch_buf );
2977
2978        yy_flex_free( (void *) b );
2979        }
2980
2981
2982#ifndef YY_ALWAYS_INTERACTIVE
2983#ifndef YY_NEVER_INTERACTIVE
2984extern int isatty YY_PROTO(( int ));
2985#endif
2986#endif
2987
2988#ifdef YY_USE_PROTOS
2989void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2990#else
2991void yy_init_buffer( b, file )
2992YY_BUFFER_STATE b;
2993FILE *file;
2994#endif
2995
2996
2997        {
2998        yy_flush_buffer( b );
2999
3000        b->yy_input_file = file;
3001        b->yy_fill_buffer = 1;
3002
3003#if YY_ALWAYS_INTERACTIVE
3004        b->yy_is_interactive = 1;
3005#else
3006#if YY_NEVER_INTERACTIVE
3007        b->yy_is_interactive = 0;
3008#else
3009        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3010#endif
3011#endif
3012        }
3013
3014
3015#ifdef YY_USE_PROTOS
3016void yy_flush_buffer( YY_BUFFER_STATE b )
3017#else
3018void yy_flush_buffer( b )
3019YY_BUFFER_STATE b;
3020#endif
3021
3022        {
3023        if ( ! b )
3024                return;
3025
3026        b->yy_n_chars = 0;
3027
3028        /* We always need two end-of-buffer characters.  The first causes
3029         * a transition to the end-of-buffer state.  The second causes
3030         * a jam in that state.
3031         */
3032        b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
3033        b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
3034
3035        b->yy_buf_pos = &b->yy_ch_buf[0];
3036
3037        b->yy_at_bol = 1;
3038        b->yy_buffer_status = YY_BUFFER_NEW;
3039
3040        if ( b == yy_current_buffer )
3041                yy_load_buffer_state();
3042        }
3043
3044
3045#ifndef YY_NO_SCAN_BUFFER
3046#ifdef YY_USE_PROTOS
3047YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
3048#else
3049YY_BUFFER_STATE yy_scan_buffer( base, size )
3050char *base;
3051yy_size_t size;
3052#endif
3053        {
3054        YY_BUFFER_STATE b;
3055
3056        if ( size < 2 ||
3057             base[size-2] != YY_END_OF_BUFFER_CHAR ||
3058             base[size-1] != YY_END_OF_BUFFER_CHAR )
3059                /* They forgot to leave room for the EOB's. */
3060                return 0;
3061
3062        b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
3063        if ( ! b )
3064                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3065
3066        b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
3067        b->yy_buf_pos = b->yy_ch_buf = base;
3068        b->yy_is_our_buffer = 0;
3069        b->yy_input_file = 0;
3070        b->yy_n_chars = b->yy_buf_size;
3071        b->yy_is_interactive = 0;
3072        b->yy_at_bol = 1;
3073        b->yy_fill_buffer = 0;
3074        b->yy_buffer_status = YY_BUFFER_NEW;
3075
3076        yy_switch_to_buffer( b );
3077
3078        return b;
3079        }
3080#endif
3081
3082
3083#ifndef YY_NO_SCAN_STRING
3084#ifdef YY_USE_PROTOS
3085YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
3086#else
3087YY_BUFFER_STATE yy_scan_string( yy_str )
3088yyconst char *yy_str;
3089#endif
3090        {
3091        int len;
3092        for ( len = 0; yy_str[len]; ++len )
3093                ;
3094
3095        return yy_scan_bytes( yy_str, len );
3096        }
3097#endif
3098
3099
3100#ifndef YY_NO_SCAN_BYTES
3101#ifdef YY_USE_PROTOS
3102YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
3103#else
3104YY_BUFFER_STATE yy_scan_bytes( bytes, len )
3105yyconst char *bytes;
3106int len;
3107#endif
3108        {
3109        YY_BUFFER_STATE b;
3110        char *buf;
3111        yy_size_t n;
3112        int i;
3113
3114        /* Get memory for full buffer, including space for trailing EOB's. */
3115        n = len + 2;
3116        buf = (char *) yy_flex_alloc( n );
3117        if ( ! buf )
3118                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3119
3120        for ( i = 0; i < len; ++i )
3121                buf[i] = bytes[i];
3122
3123        buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
3124
3125        b = yy_scan_buffer( buf, n );
3126        if ( ! b )
3127                YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3128
3129        /* It's okay to grow etc. this buffer, and we should throw it
3130         * away when we're done.
3131         */
3132        b->yy_is_our_buffer = 1;
3133
3134        return b;
3135        }
3136#endif
3137
3138
3139#ifndef YY_NO_PUSH_STATE
3140#ifdef YY_USE_PROTOS
3141static void yy_push_state( int new_state )
3142#else
3143static void yy_push_state( new_state )
3144int new_state;
3145#endif
3146        {
3147        if ( yy_start_stack_ptr >= yy_start_stack_depth )
3148                {
3149                yy_size_t new_size;
3150
3151                yy_start_stack_depth += YY_START_STACK_INCR;
3152                new_size = yy_start_stack_depth * sizeof( int );
3153
3154                if ( ! yy_start_stack )
3155                        yy_start_stack = (int *) yy_flex_alloc( new_size );
3156
3157                else
3158                        yy_start_stack = (int *) yy_flex_realloc(
3159                                        (void *) yy_start_stack, new_size );
3160
3161                if ( ! yy_start_stack )
3162                        YY_FATAL_ERROR(
3163                        "out of memory expanding start-condition stack" );
3164                }
3165
3166        yy_start_stack[yy_start_stack_ptr++] = YY_START;
3167
3168        BEGIN(new_state);
3169        }
3170#endif
3171
3172
3173#ifndef YY_NO_POP_STATE
3174static void yy_pop_state()
3175        {
3176        if ( --yy_start_stack_ptr < 0 )
3177                YY_FATAL_ERROR( "start-condition stack underflow" );
3178
3179        BEGIN(yy_start_stack[yy_start_stack_ptr]);
3180        }
3181#endif
3182
3183
3184#ifndef YY_NO_TOP_STATE
3185static int yy_top_state()
3186        {
3187        return yy_start_stack[yy_start_stack_ptr - 1];
3188        }
3189#endif
3190
3191#ifndef YY_EXIT_FAILURE
3192#define YY_EXIT_FAILURE 2
3193#endif
3194
3195#ifdef YY_USE_PROTOS
3196static void yy_fatal_error( yyconst char msg[] )
3197#else
3198static void yy_fatal_error( msg )
3199char msg[];
3200#endif
3201        {
3202        (void) fprintf( stderr, "%s\n", msg );
3203        exit( YY_EXIT_FAILURE );
3204        }
3205
3206
3207
3208/* Redefine yyless() so it works in section 3 code. */
3209
3210#undef yyless
3211#define yyless(n) \
3212        do \
3213                { \
3214                /* Undo effects of setting up yytext. */ \
3215                yytext[yyleng] = yy_hold_char; \
3216                yy_c_buf_p = yytext + n; \
3217                yy_hold_char = *yy_c_buf_p; \
3218                *yy_c_buf_p = '\0'; \
3219                yyleng = n; \
3220                } \
3221        while ( 0 )
3222
3223
3224/* Internal utility routines. */
3225
3226#ifndef yytext_ptr
3227#ifdef YY_USE_PROTOS
3228static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
3229#else
3230static void yy_flex_strncpy( s1, s2, n )
3231char *s1;
3232yyconst char *s2;
3233int n;
3234#endif
3235        {
3236        register int i;
3237        for ( i = 0; i < n; ++i )
3238                s1[i] = s2[i];
3239        }
3240#endif
3241
3242#ifdef YY_NEED_STRLEN
3243#ifdef YY_USE_PROTOS
3244static int yy_flex_strlen( yyconst char *s )
3245#else
3246static int yy_flex_strlen( s )
3247yyconst char *s;
3248#endif
3249        {
3250        register int n;
3251        for ( n = 0; s[n]; ++n )
3252                ;
3253
3254        return n;
3255        }
3256#endif
3257
3258
3259#ifdef YY_USE_PROTOS
3260static void *yy_flex_alloc( yy_size_t size )
3261#else
3262static void *yy_flex_alloc( size )
3263yy_size_t size;
3264#endif
3265        {
3266        return (void *) malloc( size );
3267        }
3268
3269#ifdef YY_USE_PROTOS
3270static void *yy_flex_realloc( void *ptr, yy_size_t size )
3271#else
3272static void *yy_flex_realloc( ptr, size )
3273void *ptr;
3274yy_size_t size;
3275#endif
3276        {
3277        /* The cast to (char *) in the following accommodates both
3278         * implementations that use char* generic pointers, and those
3279         * that use void* generic pointers.  It works with the latter
3280         * because both ANSI C and C++ allow castless assignment from
3281         * any pointer type to void*, and deal with argument conversions
3282         * as though doing an assignment.
3283         */
3284        return (void *) realloc( (char *) ptr, size );
3285        }
3286
3287#ifdef YY_USE_PROTOS
3288static void yy_flex_free( void *ptr )
3289#else
3290static void yy_flex_free( ptr )
3291void *ptr;
3292#endif
3293        {
3294        free( ptr );
3295        }
3296
3297#if YY_MAIN
3298int main()
3299        {
3300        yylex();
3301        return 0;
3302        }
3303#endif
3304#line 817 "libparse.l"
3305
3306
3307int current_pos(int i)
3308{
3309  return(i+offset+(int)(yytext-yylp_buffer_start));
3310}
3311
3312int libread(FILE* f, char* buf, int max_size)
3313{ int rc;
3314
3315  offset = ftell(f);
3316  rc  = myfread( buf, 1, max_size, f );
3317  #if YYLPDEBUG >2
3318    printf("fread: %d of %d\n", rc, max_size);
3319  #endif
3320  yylp_buffer_start = buf;
3321  return rc;
3322}
3323
3324extern "C" {
3325  int yylpwrap()
3326  {
3327    //printf("======================= YYWRAP ====================\n");
3328    if(brace1>0) { yylp_errno=YYLP_MISS_BR1; }
3329    if(brace2>0) { yylp_errno=YYLP_MISS_BR2; }
3330    if(brace3>0) { yylp_errno=YYLP_MISS_BR3; }
3331    if(quote>0) { yylp_errno=YYLP_MISSQUOT; }
3332    /* printf("{=%d, (=%d, [=%d\n", brace1, brace2, brace3);/**/
3333    if(feof(yyin)) return 1; else return 0;
3334  }
3335}
3336
3337void reinit_yylp()
3338{
3339   brace1 = 0;
3340   brace2 = 0;
3341   brace3 = 0;
3342   quote  = 0;
3343   yy_init=1;
3344   yy_delete_buffer(yy_current_buffer);
3345}
3346
3347void make_version(char *p,int what)
3348{
3349  char ver[10];
3350  char date[16];
3351  ver[0]='?'; ver[1]='.'; ver[2]='?'; ver[3]='\0';
3352  date[0]='?'; date[1]='\0';
3353  if(what) sscanf(p,"%*[^=]= %*s %*s %10s %16s",ver,date);
3354  else sscanf(p,"// %*s %*s %10s %16s",ver,date);
3355  strcpy(libnamebuf,"(");
3356  strcat(libnamebuf,ver);
3357  strcat(libnamebuf,",");
3358  strcat(libnamebuf,date);
3359  strcat(libnamebuf,")");
3360  if(what && strcmp(libnamebuf, "(?.?,?)")==0)
3361  {
3362    sscanf(p,"%*[^\"]\"%[^\"]\"",libnamebuf);
3363  }
3364  //printf("ID=(%d)%s; \n", what, p);
3365}
3366
3367void copy_string(lp_modes mode)
3368{
3369#ifdef STANDALONE_PARSER
3370  if ((texinfo_out && (last_cmd == LP_INFO || last_cmd == LP_CATEGORY)) ||
3371      (category_out && last_cmd == LP_CATEGORY))
3372  {
3373    long current_location = ftell(yylpin), i = string_start, quote = 0;
3374    char c;
3375    if (texinfo_out)
3376    {
3377     if (last_cmd == LP_INFO)
3378     {
3379       printf("$info = <<EOT;\n");
3380     }
3381     else
3382     {
3383       printf("$category = <<EOT;\n");
3384     }
3385    }
3386    fseek (yylpin, i, SEEK_SET);
3387    while (i< current_location)
3388    {
3389      c = fgetc(yylpin);
3390      if (c == '\\')
3391      {
3392        quote = (! quote);
3393      }
3394      else if (c == '"')
3395      {
3396        if (! quote) break;
3397      }
3398      else
3399        quote = 0;
3400      if (c == '@' || c == '$') putchar('\\');
3401      if (c != '\r') putchar(c);
3402      i++;
3403    }
3404    if (category_out) exit(0);
3405    fseek (yylpin, current_location, SEEK_SET);
3406    printf("\nEOT\n");
3407  }
3408#else
3409  if((last_cmd == LP_INFO)&&(mode == GET_INFO))
3410  {
3411    int i, offset=0;
3412    long current_location = ftell(yylpin);
3413    int len = (int)(current_pos(0) - string_start);
3414    fseek(yylpin, string_start, SEEK_SET);
3415    if (text_buffer!=NULL) omFree((ADDRESS)text_buffer);
3416    text_buffer = (char *)omAlloc(len+2);
3417    omMarkAsStaticAddr(text_buffer);
3418    myfread(text_buffer, len, 1, yylpin);
3419    fseek(yylpin, current_location, SEEK_SET);
3420    text_buffer[len]='\0';
3421    offset=0;
3422    for(i=0;i<=len; i++)
3423    {
3424      if(text_buffer[i]=='\\' &&
3425         (text_buffer[i+1]=='\"' || text_buffer[i+1]=='{' ||
3426          text_buffer[i+1]=='}' || text_buffer[i+1]=='\\'))
3427      {
3428        i++;
3429        offset++;
3430      }
3431      if(offset>0) text_buffer[i-offset] = text_buffer[i];
3432    }
3433  }
3434#endif /* STANDALONE_PARSER */
3435}
3436
3437void print_init()
3438{
3439   printf("Init=%d\n", yy_init);
3440}
3441
3442void print_version(lp_modes mode, char *p)
3443{
3444#ifdef STANDALONE_PARSER
3445  //printf("loading %s%s", p, libnamebuf);
3446#else
3447  if ( mode == LOAD_LIB )
3448  {
3449    if (BVERBOSE(V_LOAD_LIB) && p!=NULL ) Print(" %s...", p);
3450       //Warn( "loading %s%s", p, libnamebuf);
3451  }
3452#endif
3453}
3454
3455#ifdef STANDALONE_PARSER
3456main( int argc, char *argv[] )
3457{
3458  lib_style_types lib_style;
3459  main_init(argc, argv);
3460  if(yyin == NULL) {
3461    fprintf(stderr, "No library found to parse.\n");
3462    exit(1);
3463  }
3464  if (! (texinfo_out || category_out))
3465  {
3466    if(lpverbose)printf("Verbose level=%d\n", lpverbose);
3467    if(check)printf("Reporting most possible annomalies.\n");
3468    if(lpverbose||check)printf("\n");
3469
3470    printf( "  %-15s  %20s      %s,%s    %s,%s     %s,%s\n", "Library",
3471            "function", "line", "start-eod", "line", "body-eob",
3472            "line", "example-eoe");
3473  }
3474#ifdef HAVE_NS
3475  yylplex(argv[0], argv[0], &lib_style,NULL);
3476#else
3477  yylplex(argv[0], argv[0], &lib_style);
3478#endif
3479  if(yylp_errno) {
3480    printf("ERROR occured: [%d] ", yylp_errno);
3481    printf(yylp_errlist[yylp_errno], yylplineno);
3482    printf("\n");
3483  }
3484  else if(pi!=NULL) printpi(pi);
3485  if (texinfo_out)
3486    printf("1;");
3487  exit(0);
3488}
3489
3490#endif /* STANDALONE_PARSER */
3491#endif /* HAVE_LIBPARSE */
Note: See TracBrowser for help on using the repository browser.