source: git/Singular/libparse.cc @ eff324

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