BUG#: 8628
[tpot/pegasus.git.bak/pegasus.git] / src / slp / slp_client / src / cmd-utils / slp_client / l_attr.cpp
1 /* NOCHKSRC*/
2
3 #define yy_create_buffer attr_create_buffer
4 #define yy_delete_buffer attr_delete_buffer
5 #define yy_scan_buffer attr_scan_buffer
6 #define yy_scan_string attr_scan_string
7 #define yy_scan_bytes attr_scan_bytes
8 #define yy_flex_debug attr_flex_debug
9 #define yy_init_buffer attr_init_buffer
10 #define yy_flush_buffer attr_flush_buffer
11 #define yy_load_buffer_state attr_load_buffer_state
12 #define yy_switch_to_buffer attr_switch_to_buffer
13 #define yyin attrin
14 #define yyleng attrleng
15 #define yylex attrlex
16 #define yyout attrout
17 #define yyrestart attrrestart
18 #define yytext attrtext
19
20 #line 19 "l_attr.c"
21 /* A lexical scanner generated by flex */
22
23 /* Scanner skeleton version:
24  * $Header: /cvs/MSB/pegasus/src/slp/slp_client/src/cmd-utils/slp_client/l_attr.cpp,v 1.17 2009/10/05 15:55:31 venkat.puvvada Exp $
25  */
26
27 #define FLEX_SCANNER
28 #define YY_FLEX_MAJOR_VERSION 2
29 #define YY_FLEX_MINOR_VERSION 5
30
31 #include <stdio.h>
32 #include <unistd.h>
33
34
35 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
36 #ifdef c_plusplus
37 #ifndef __cplusplus
38 #define __cplusplus
39 #endif
40 #endif
41
42
43 #ifdef __cplusplus
44
45 #include <stdlib.h>
46
47 /* Use prototypes in function declarations. */
48 #define YY_USE_PROTOS
49
50 /* The "const" storage-class-modifier is valid. */
51 #define YY_USE_CONST
52
53 #else   /* ! __cplusplus */
54
55 #if __STDC__
56
57 #define YY_USE_PROTOS
58 #define YY_USE_CONST
59
60 #endif  /* __STDC__ */
61 #endif  /* ! __cplusplus */
62
63 #ifdef __TURBOC__
64  #pragma warn -rch
65  #pragma warn -use
66 #include <io.h>
67 #include <stdlib.h>
68 #define YY_USE_CONST
69 #define YY_USE_PROTOS
70 #endif
71
72 #ifdef YY_USE_CONST
73 #define yyconst const
74 #else
75 #define yyconst
76 #endif
77
78
79 #ifdef YY_USE_PROTOS
80 #define YY_PROTO(proto) proto
81 #else
82 #define YY_PROTO(proto) ()
83 #endif
84
85 /* Returned upon end-of-file. */
86 #define YY_NULL 0
87
88 /* Promotes a possibly negative, possibly signed char to an unsigned
89  * integer for use as an array index.  If the signed char is negative,
90  * we want to instead treat it as an 8-bit unsigned char, hence the
91  * double cast.
92  */
93 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
94
95 /* Enter a start condition.  This macro really ought to take a parameter,
96  * but we do it the disgusting crufty way forced on us by the ()-less
97  * definition of BEGIN.
98  */
99 #define BEGIN yy_start = 1 + 2 *
100
101 /* Translate the current start state into a value that can be later handed
102  * to BEGIN to return to the state.  The YYSTATE alias is for lex
103  * compatibility.
104  */
105 #define YY_START ((yy_start - 1) / 2)
106 #define YYSTATE YY_START
107
108 /* Action number for EOF rule of a given start state. */
109 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
110
111 /* Special action meaning "start processing a new file". */
112 #define YY_NEW_FILE yyrestart( yyin )
113
114 #define YY_END_OF_BUFFER_CHAR 0
115
116 /* Size of default input buffer. */
117 #define YY_BUF_SIZE 16384
118
119 typedef struct yy_buffer_state *YY_BUFFER_STATE;
120
121 extern int yyleng;
122 extern FILE *yyin, *yyout;
123
124 #define EOB_ACT_CONTINUE_SCAN 0
125 #define EOB_ACT_END_OF_FILE 1
126 #define EOB_ACT_LAST_MATCH 2
127
128 /* The funky do-while in the following #define is used to turn the definition
129  * int a single C statement (which needs a semi-colon terminator).  This
130  * avoids problems with code like:
131  *
132  *      if ( condition_holds )
133  *              yyless( 5 );
134  *      else
135  *              do_something_else();
136  *
137  * Prior to using the do-while the compiler would get upset at the
138  * "else" because it interpreted the "if" statement as being all
139  * done when it reached the ';' after the yyless() call.
140  */
141
142 /* Return all but the first 'n' matched characters back to the input stream. */
143
144 #define yyless(n) \
145         do \
146                 { \
147                 /* Undo effects of setting up yytext. */ \
148                 *yy_cp = yy_hold_char; \
149                 YY_RESTORE_YY_MORE_OFFSET \
150                 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
151                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
152                 } \
153         while ( 0 )
154
155 #define unput(c) yyunput( c, yytext_ptr )
156
157 /* The following is because we cannot portably get our hands on size_t
158  * (without autoconf's help, which isn't available because we want
159  * flex-generated scanners to compile on their own).
160  */
161 typedef unsigned int yy_size_t;
162
163
164 struct yy_buffer_state
165         {
166         FILE *yy_input_file;
167
168         char *yy_ch_buf;                /* input buffer */
169         char *yy_buf_pos;               /* current position in input buffer */
170
171         /* Size of input buffer in bytes, not including room for EOB
172          * characters.
173          */
174         yy_size_t yy_buf_size;
175
176         /* Number of characters read into yy_ch_buf, not including EOB
177          * characters.
178          */
179         int yy_n_chars;
180
181         /* Whether we "own" the buffer - i.e., we know we created it,
182          * and can realloc() it to grow it, and should free() it to
183          * delete it.
184          */
185         int yy_is_our_buffer;
186
187         /* Whether this is an "interactive" input source; if so, and
188          * if we're using stdio for input, then we want to use getc()
189          * instead of fread(), to make sure we stop fetching input after
190          * each newline.
191          */
192         int yy_is_interactive;
193
194         /* Whether we're considered to be at the beginning of a line.
195          * If so, '^' rules will be active on the next match, otherwise
196          * not.
197          */
198         int yy_at_bol;
199
200         /* Whether to try to fill the input buffer when we reach the
201          * end of it.
202          */
203         int yy_fill_buffer;
204
205         int yy_buffer_status;
206 #define YY_BUFFER_NEW 0
207 #define YY_BUFFER_NORMAL 1
208         /* When an EOF's been seen but there's still some text to process
209          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
210          * shouldn't try reading from the input source any more.  We might
211          * still have a bunch of tokens to match, though, because of
212          * possible backing-up.
213          *
214          * When we actually see the EOF, we change the status to "new"
215          * (via yyrestart()), so that the user can continue scanning by
216          * just pointing yyin at a new input file.
217          */
218 #define YY_BUFFER_EOF_PENDING 2
219         };
220
221 static YY_BUFFER_STATE yy_current_buffer = 0;
222
223 /* We provide macros for accessing buffer states in case in the
224  * future we want to put the buffer states in a more general
225  * "scanner state".
226  */
227 #define YY_CURRENT_BUFFER yy_current_buffer
228
229
230 /* yy_hold_char holds the character lost when yytext is formed. */
231 static char yy_hold_char;
232
233 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
234
235
236 int yyleng;
237
238 /* Points to current character in buffer. */
239 static char *yy_c_buf_p = (char *) 0;
240 static int yy_init = 1;         /* whether we need to initialize */
241 static int yy_start = 0;        /* start state number */
242
243 /* Flag which is used to allow yywrap()'s to do buffer switches
244  * instead of setting up a fresh yyin.  A bit of a hack ...
245  */
246 static int yy_did_buffer_switch_on_eof;
247
248 void yyrestart YY_PROTO(( FILE *input_file ));
249
250 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
251 void yy_load_buffer_state YY_PROTO(( void ));
252 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
253 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
254 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
255 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
256 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
257
258 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
259 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
260 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
261
262 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
263 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
264 static void yy_flex_free YY_PROTO(( void * ));
265
266 #define yy_new_buffer yy_create_buffer
267
268 #define yy_set_interactive(is_interactive) \
269         { \
270         if ( ! yy_current_buffer ) \
271                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
272         yy_current_buffer->yy_is_interactive = is_interactive; \
273         }
274
275 #define yy_set_bol(at_bol) \
276         { \
277         if ( ! yy_current_buffer ) \
278                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
279         yy_current_buffer->yy_at_bol = at_bol; \
280         }
281
282 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
283
284
285 #define yywrap() 1
286 #define YY_SKIP_YYWRAP
287 typedef unsigned char YY_CHAR;
288 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
289 typedef int yy_state_type;
290 extern char *yytext;
291 #define yytext_ptr yytext
292
293 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
294 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
295 static int yy_get_next_buffer YY_PROTO(( void ));
296 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
297
298 /* Done after the current pattern has been matched and before the
299  * corresponding action - sets up yytext.
300  */
301 #define YY_DO_BEFORE_ACTION \
302         yytext_ptr = yy_bp; \
303         yyleng = (int) (yy_cp - yy_bp); \
304         yy_hold_char = *yy_cp; \
305         *yy_cp = '\0'; \
306         yy_c_buf_p = yy_cp;
307
308 #define YY_NUM_RULES 22
309 #define YY_END_OF_BUFFER 23
310 static yyconst short int yy_accept[56] =
311     {   0,
312         1,    1,    6,    6,   11,   11,   23,    5,    1,   22,
313         4,    3,    2,   10,    6,    8,    9,    7,   21,   11,
314        11,   19,   20,   19,   12,   15,   15,   19,   19,   19,
315         1,    4,    6,    8,   11,   11,   19,   19,   13,   13,
316        15,   19,   19,   19,   19,   19,   16,   19,   19,   19,
317        14,   19,   17,   18,    0
318     } ;
319
320 static yyconst int yy_ec[256] =
321     {   0,
322         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
323         2,    2,    1,    1,    1,    1,    1,    1,    1,    1,
324         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
325         1,    4,    1,    5,    5,    5,    5,    5,    5,    6,
326         7,    5,    8,    9,    8,    5,    5,   10,   11,   11,
327        11,   11,   11,   11,   11,   11,   11,    5,    5,    1,
328        12,    1,    5,    5,   13,   14,   14,   14,   15,   16,
329         5,    5,    5,    5,    5,   17,    5,    5,    5,    5,
330         5,   18,   19,   20,   21,    5,    5,   22,    5,    5,
331         5,   23,    5,    5,    5,    5,   13,   14,   14,   14,
332
333        15,   16,    5,    5,    5,    5,    5,   17,    5,    5,
334         5,    5,    5,   18,   19,   20,   21,    5,    5,   22,
335         5,    5,    5,    5,    5,    1,    5,    5,    5,    5,
336         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
337         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
338         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
339         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
340         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
341         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
342         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
343
344         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
345         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
346         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
347         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
348         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
349         5,    5,    5,    5,    5
350     } ;
351
352 static yyconst int yy_meta[24] =
353     {   0,
354         1,    2,    1,    2,    3,    1,    1,    3,    1,    3,
355         3,    1,    3,    3,    3,    3,    3,    3,    3,    3,
356         3,    3,    2
357     } ;
358
359 static yyconst short int yy_base[61] =
360     {   0,
361         0,   23,   46,   69,   92,    0,   60,  174,    6,  174,
362         0,  174,  174,  174,    9,    0,  174,  174,  174,   12,
363        13,   16,  174,  114,  174,    9,   11,   27,   23,  128,
364        40,    0,   41,    0,   52,   57,   60,    0,   41,   47,
365        54,  135,   57,  107,  142,  149,    0,  110,   74,   76,
366         0,  112,   80,  120,  174,  165,  168,   25,    2,  170
367     } ;
368
369 static yyconst short int yy_def[61] =
370     {   0,
371        56,   56,   57,   57,   55,    5,   55,   55,   55,   55,
372        58,   55,   55,   55,   55,   59,   55,   55,   55,   55,
373        60,   60,   55,   60,   55,   24,   24,   24,   24,   24,
374        55,   58,   55,   59,   55,   60,   60,   30,   24,   24,
375        24,   24,   24,   24,   24,   24,   42,   24,   24,   24,
376        46,   24,   24,   24,    0,   55,   55,   55,   55,   55
377     } ;
378
379 static yyconst short int yy_nxt[198] =
380     {   0,
381         8,    9,   10,    9,   34,   12,    8,   31,   13,   31,
382        33,    8,   33,   35,   35,   35,   36,   55,   41,   41,
383        41,   41,    8,    8,    9,   10,    9,   32,   12,    8,
384        42,   13,   37,   37,    8,   38,   37,   37,   38,   43,
385        44,   31,   33,   31,   33,    8,   14,   15,   10,   15,
386        40,   14,   17,   35,   14,   35,   40,   18,   35,   55,
387        36,   55,   46,   41,   41,   55,   37,   37,   14,   14,
388        15,   10,   15,   48,   14,   17,   55,   14,   55,   38,
389        18,   55,   38,   37,   37,   37,   37,   55,   53,   37,
390        37,   14,   19,   20,   10,   21,   22,   19,   23,   24,
391
392        25,   26,   27,   19,   22,   22,   22,   28,   22,   22,
393        22,   29,   22,   22,   30,   55,   37,   37,   55,   37,
394        37,   37,   37,   39,   40,   55,   54,   49,   52,   37,
395        37,   55,   55,   55,   55,   55,   38,   45,   45,   55,
396        45,   45,   45,   45,   47,   47,   55,   47,   47,   47,
397        47,   50,   50,   55,   50,   50,   50,   50,   51,   51,
398        55,   51,   51,   51,   51,   11,   11,   11,   16,   16,
399        16,   37,   37,    7,   55,   55,   55,   55,   55,   55,
400        55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
401        55,   55,   55,   55,   55,   55,   55
402
403     } ;
404
405 static yyconst short int yy_chk[198] =
406     {   0,
407         1,    1,    1,    1,   59,    1,    1,    9,    1,    9,
408        15,    1,   15,   20,   21,   20,   21,   22,   26,   26,
409        27,   27,    1,    2,    2,    2,    2,   58,    2,    2,
410        26,    2,   29,   29,    2,   21,   28,   28,   22,   28,
411        29,   31,   33,   31,   33,    2,    3,    3,    3,    3,
412        39,    3,    3,   35,    3,   35,   40,    3,   36,    7,
413        36,   37,   39,   41,   41,    0,   43,   43,    3,    4,
414         4,    4,    4,   43,    4,    4,    0,    4,    0,   36,
415         4,    0,   37,   49,   49,   50,   50,    0,   49,   53,
416        53,    4,    5,    5,    5,    5,    5,    5,    5,    5,
417
418         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
419         5,    5,    5,    5,    5,   24,   44,   44,    0,   48,
420        48,   52,   52,   24,   24,    0,   52,   44,   48,   54,
421        54,    0,    0,    0,    0,    0,   24,   30,   30,    0,
422        30,   30,   30,   30,   42,   42,    0,   42,   42,   42,
423        42,   45,   45,    0,   45,   45,   45,   45,   46,   46,
424         0,   46,   46,   46,   46,   56,   56,   56,   57,   57,
425        57,   60,   60,   55,   55,   55,   55,   55,   55,   55,
426        55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
427        55,   55,   55,   55,   55,   55,   55
428
429     } ;
430
431 static yy_state_type yy_last_accepting_state;
432 static char *yy_last_accepting_cpos;
433
434 /* The intent behind this definition is that it'll catch
435  * any uses of REJECT which flex missed.
436  */
437 #define REJECT reject_used_but_not_detected
438 #define yymore() yymore_used_but_not_detected
439 #define YY_MORE_ADJ 0
440 #define YY_RESTORE_YY_MORE_OFFSET
441 char *yytext;
442 #line 1 "attr.l"
443 #define INITIAL 0
444 /*
445 //%LICENSE////////////////////////////////////////////////////////////////
446 //
447 // Licensed to The Open Group (TOG) under one or more contributor license
448 // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
449 // this work for additional information regarding copyright ownership.
450 // Each contributor licenses this file to you under the OpenPegasus Open
451 // Source License; you may not use this file except in compliance with the
452 // License.
453 //
454 // Permission is hereby granted, free of charge, to any person obtaining a
455 // copy of this software and associated documentation files (the "Software"),
456 // to deal in the Software without restriction, including without limitation
457 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
458 // and/or sell copies of the Software, and to permit persons to whom the
459 // Software is furnished to do so, subject to the following conditions:
460 //
461 // The above copyright notice and this permission notice shall be included
462 // in all copies or substantial portions of the Software.
463 //
464 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
465 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
466 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
467 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
468 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
469 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
470 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
471 //
472 //////////////////////////////////////////////////////////////////////////
473 */
474 /*****************************************************************************
475  *  Description: encode/decode attribute lists
476  *
477  *  Originated: March 6, 2000
478  *  Original Author: Mike Day md@soft-hackle.net
479  *                                mdd@us.ibm.com
480  *
481  *
482  *  Copyright (c) 2001 - 2003  IBM
483  *  Copyright (c) 2000 - 2003 Michael Day
484  *
485  *  Permission is hereby granted, free of charge, to any person obtaining a
486  *  copy of this software and associated documentation files (the "Software"),
487  *  to deal in the Software without restriction, including without limitation
488  *  the rights to use, copy, modify, merge, publish, distribute, sublicense,
489  *  and/or sell copies of the Software, and to permit persons to whom the
490  *  Software is furnished to do so, subject to the following conditions:
491  *
492  *  The above copyright notice and this permission notice shall be included in
493  *  all copies or substantial portions of the Software.
494  *
495  *
496  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
497  *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
498  *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
499  *  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
500  *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
501  *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
502  *  DEALINGS IN THE SOFTWARE.
503  *
504  *****************************************************************************/
505 #line 67 "attr.l"
506
507 #undef YYLMAX
508 #define YYLMAX 2048
509 #define YY_NEVER_INTERACTIVE 1
510 #undef YY_INPUT
511 #define YY_INPUT(b, r, m) abort()
512 #define exit(i) abort()
513 #define fread(a, b, c, d) abort()
514 #include "slp_client.h"
515 #include "y_attr.h"
516
517 static int16 heapIndex;
518 static char *heap;
519 static char *buf;
520 static char *_lslp_strdup(const char *s);
521 void attrerror(const char *, ...);
522 void attr_close_lexer(size_t handle);
523 size_t attr_init_lexer(const char *s);
524
525 /* {}   */
526 /*
527 this lexer cycles through three states. in the initial state,
528 it is looking strictly for attribute tags. If, in the initial
529 state it finds a '(' it anticipates an attribute-value pair
530 and changes to ATTRIBUTE state .
531 in the ATTRIBUTE state is is looking for either a closing ')'
532 or a '='. If it sees a closing ')' it changes to the initial state.
533 if it sees an '=' it changes to the VALUE state and looks for
534 the attribute value. After seeing the attribute value, it looks
535 for a either a ')' or a ','. If it sees a ')' it closes the attribute
536 and returns to the initial state.
537 if, during the VALUE state the lexer sees a ',' it decides it is
538 looking at a multi-valued attribute and returns a special _MULTIVAL
539 token to the parser. The parser uses this to construct additional
540 attribute-value pairs for each value in the multi-val statement.
541 */
542 #define ATTR 1
543
544 #define VALUE 2
545
546 #line 545 "l_attr.c"
547
548 /* Macros after this point can all be overridden by user definitions in
549  * section 1.
550  */
551
552 #ifndef YY_SKIP_YYWRAP
553 #ifdef __cplusplus
554 extern "C" int yywrap YY_PROTO(( void ));
555 #else
556 extern int yywrap YY_PROTO(( void ));
557 #endif
558 #endif
559
560 #ifndef YY_NO_UNPUT
561 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
562 #endif
563
564 #ifndef yytext_ptr
565 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
566 #endif
567
568 #ifdef YY_NEED_STRLEN
569 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
570 #endif
571
572 #ifndef YY_NO_INPUT
573 #ifdef __cplusplus
574 static int yyinput YY_PROTO(( void ));
575 #else
576 static int input YY_PROTO(( void ));
577 #endif
578 #endif
579
580 #if YY_STACK_USED
581 static int yy_start_stack_ptr = 0;
582 static int yy_start_stack_depth = 0;
583 static int *yy_start_stack = 0;
584 #ifndef YY_NO_PUSH_STATE
585 static void yy_push_state YY_PROTO(( int new_state ));
586 #endif
587 #ifndef YY_NO_POP_STATE
588 static void yy_pop_state YY_PROTO(( void ));
589 #endif
590 #ifndef YY_NO_TOP_STATE
591 static int yy_top_state YY_PROTO(( void ));
592 #endif
593
594 #else
595 #define YY_NO_PUSH_STATE 1
596 #define YY_NO_POP_STATE 1
597 #define YY_NO_TOP_STATE 1
598 #endif
599
600 #ifdef YY_MALLOC_DECL
601 YY_MALLOC_DECL
602 #else
603 #if __STDC__
604 #ifndef __cplusplus
605 #include <stdlib.h>
606 #endif
607 #else
608 /* Just try to get by without declaring the routines.  This will fail
609  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
610  * or sizeof(void*) != sizeof(int).
611  */
612 #endif
613 #endif
614
615 /* Amount of stuff to slurp up with each read. */
616 #ifndef YY_READ_BUF_SIZE
617 #define YY_READ_BUF_SIZE 8192
618 #endif
619
620 /* Copy whatever the last rule matched to the standard output. */
621
622 #ifndef ECHO
623 /* This used to be an fputs(), but since the string might contain NUL's,
624  * we now use fwrite().
625  */
626 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
627 #endif
628
629 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
630  * is returned in "result".
631  */
632 #ifndef YY_INPUT
633 #define YY_INPUT(buf,result,max_size) \
634         if ( yy_current_buffer->yy_is_interactive ) \
635                 { \
636                 int c = '*', n; \
637                 for ( n = 0; n < max_size && \
638                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
639                         buf[n] = (char) c; \
640                 if ( c == '\n' ) \
641                         buf[n++] = (char) c; \
642                 if ( c == EOF && ferror( yyin ) ) \
643                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
644                 result = n; \
645                 } \
646         else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
647                   && ferror( yyin ) ) \
648                 YY_FATAL_ERROR( "input in flex scanner failed" );
649 #endif
650
651 /* No semi-colon after return; correct usage is to write "yyterminate();" -
652  * we don't want an extra ';' after the "return" because that will cause
653  * some compilers to complain about unreachable statements.
654  */
655 #ifndef yyterminate
656 #define yyterminate() return YY_NULL
657 #endif
658
659 /* Number of entries by which start-condition stack grows. */
660 #ifndef YY_START_STACK_INCR
661 #define YY_START_STACK_INCR 25
662 #endif
663
664 /* Report a fatal error. */
665 #ifndef YY_FATAL_ERROR
666 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
667 #endif
668
669 /* Default declaration of generated scanner - a define so the user can
670  * easily add parameters.
671  */
672 #ifndef YY_DECL
673 #define YY_DECL int yylex YY_PROTO(( void ))
674 #endif
675
676 /* Code executed at the beginning of each rule, after yytext and yyleng
677  * have been set up.
678  */
679 #ifndef YY_USER_ACTION
680 #define YY_USER_ACTION
681 #endif
682
683 /* Code executed at the end of each rule. */
684 #ifndef YY_BREAK
685 #define YY_BREAK break;
686 #endif
687
688 #define YY_RULE_SETUP \
689         YY_USER_ACTION
690
691 YY_DECL
692         {
693         register yy_state_type yy_current_state;
694         register char *yy_cp = NULL, *yy_bp = NULL;
695         register int yy_act;
696
697 #line 120 "attr.l"
698
699
700 #line 699 "l_attr.c"
701
702         if ( yy_init )
703                 {
704                 yy_init = 0;
705
706 #ifdef YY_USER_INIT
707                 YY_USER_INIT;
708 #endif
709
710                 if ( ! yy_start )
711                         yy_start = 1;   /* first start state */
712
713                 if ( ! yyin )
714                         yyin = stdin;
715
716                 if ( ! yyout )
717                         yyout = stdout;
718
719                 if ( ! yy_current_buffer )
720                         yy_current_buffer =
721                                 yy_create_buffer( yyin, YY_BUF_SIZE );
722
723                 yy_load_buffer_state();
724                 }
725
726         while ( 1 )             /* loops until end-of-file is reached */
727                 {
728                 yy_cp = yy_c_buf_p;
729
730                 /* Support of yytext. */
731                 *yy_cp = yy_hold_char;
732
733                 /* yy_bp points to the position in yy_ch_buf of the start of
734                  * the current run.
735                  */
736                 yy_bp = yy_cp;
737
738                 yy_current_state = yy_start;
739 yy_match:
740                 do
741                         {
742                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
743                         if ( yy_accept[yy_current_state] )
744                                 {
745                                 yy_last_accepting_state = yy_current_state;
746                                 yy_last_accepting_cpos = yy_cp;
747                                 }
748                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
749                                 {
750                                 yy_current_state = (int) yy_def[yy_current_state];
751                                 if ( yy_current_state >= 56 )
752                                         yy_c = yy_meta[(unsigned int) yy_c];
753                                 }
754                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
755                         ++yy_cp;
756                         }
757                 while ( yy_base[yy_current_state] != 174 );
758
759 yy_find_action:
760                 yy_act = yy_accept[yy_current_state];
761                 if ( yy_act == 0 )
762                         { /* have to back up */
763                         yy_cp = yy_last_accepting_cpos;
764                         yy_current_state = yy_last_accepting_state;
765                         yy_act = yy_accept[yy_current_state];
766                         }
767
768                 YY_DO_BEFORE_ACTION;
769
770
771 do_action:      /* This label is used only to access EOF actions. */
772
773
774                 switch ( yy_act )
775         { /* beginning of action switch */
776                         case 0: /* must back up */
777                         /* undo the effects of YY_DO_BEFORE_ACTION */
778                         *yy_cp = yy_hold_char;
779                         yy_cp = yy_last_accepting_cpos;
780                         yy_current_state = yy_last_accepting_state;
781                         goto yy_find_action;
782
783 case 1:
784 YY_RULE_SETUP
785 #line 122 "attr.l"
786 { ; }
787         YY_BREAK
788 case 2:
789 YY_RULE_SETUP
790 #line 124 "attr.l"
791 { attrlval._i = *attrtext; return(attrlval._i); }
792         YY_BREAK
793 case 3:
794 YY_RULE_SETUP
795 #line 125 "attr.l"
796 { BEGIN ATTR; attrlval._i = *attrtext; return(attrlval._i); }
797         YY_BREAK
798 case 4:
799 YY_RULE_SETUP
800 #line 126 "attr.l"
801 {
802                if (attrleng > 0) {
803                   if(NULL != (attrlval._s = _lslp_strdup(attrtext)))
804                                  return(_TAG);
805                               else
806                                  return(0L);
807                            }
808                         }
809         YY_BREAK
810 /* anything else in the initial state is an error */
811 case 5:
812 YY_RULE_SETUP
813 #line 136 "attr.l"
814 {attrerror("error in lexer - initial state\n");}
815         YY_BREAK
816 case 6:
817 YY_RULE_SETUP
818 #line 138 "attr.l"
819 { ; }
820         YY_BREAK
821 case 7:
822 YY_RULE_SETUP
823 #line 139 "attr.l"
824 {BEGIN VALUE; attrlval._i = *attrtext; return(attrlval._i);}
825         YY_BREAK
826 case 8:
827 YY_RULE_SETUP
828 #line 140 "attr.l"
829 {
830                           if (attrleng > 0 ) {
831                              if(NULL != (attrlval._s = _lslp_strdup(attrtext)))
832                                 return(_TAG);
833                              else
834                                 return(0L);
835                            }
836                         }
837         YY_BREAK
838 /* make it legal to have just an attr tag enclosed in parens */
839 case 9:
840 YY_RULE_SETUP
841 #line 150 "attr.l"
842 {BEGIN INITIAL; attrlval._i = *attrtext; return(attrlval._i); }
843         YY_BREAK
844 /* anything else in the attribute state is an error */
845 case 10:
846 YY_RULE_SETUP
847 #line 153 "attr.l"
848 {attrerror("error in lexer - attribute state\n");}
849         YY_BREAK
850 case 11:
851 YY_RULE_SETUP
852 #line 155 "attr.l"
853 { ; }
854         YY_BREAK
855 case 12:
856 YY_RULE_SETUP
857 #line 156 "attr.l"
858 {attrlval._i = *attrtext; return(_MULTIVAL);}
859         YY_BREAK
860 case 13:
861 #line 159 "attr.l"
862 case 14:
863 YY_RULE_SETUP
864 #line 159 "attr.l"
865 { attrlval._i = strtol(attrtext, (char **) 0, 0);
866                                 return _INT ;};
867         YY_BREAK
868 case 15:
869 #line 163 "attr.l"
870 case 16:
871 YY_RULE_SETUP
872 #line 163 "attr.l"
873 { attrlval._i = strtoul(attrtext, (char **)0, 0);
874                                 return _INT; };
875         YY_BREAK
876 case 17:
877 YY_RULE_SETUP
878 #line 167 "attr.l"
879 {return(_TRUE);}
880         YY_BREAK
881 case 18:
882 YY_RULE_SETUP
883 #line 168 "attr.l"
884 {return(_FALSE);}
885         YY_BREAK
886 case 19:
887 YY_RULE_SETUP
888 #line 169 "attr.l"
889 {
890                            if (attrleng > 0) {
891                               if(NULL != (attrlval._s = _lslp_strdup(attrtext)))
892                                  return(_STRING);
893                               else
894                                  return(0L);
895                            }
896                         }
897         YY_BREAK
898 case 20:
899 YY_RULE_SETUP
900 #line 178 "attr.l"
901 {BEGIN INITIAL; attrlval._i = *attrtext; return(attrlval._i);}
902         YY_BREAK
903 /* anything else in the value state is an error */
904 case 21:
905 YY_RULE_SETUP
906 #line 181 "attr.l"
907 {BEGIN INITIAL;}
908         YY_BREAK
909 case 22:
910 YY_RULE_SETUP
911 #line 183 "attr.l"
912 ECHO;
913         YY_BREAK
914 #line 913 "l_attr.c"
915 case YY_STATE_EOF(INITIAL):
916 case YY_STATE_EOF(ATTR):
917 case YY_STATE_EOF(VALUE):
918         yyterminate();
919
920         case YY_END_OF_BUFFER:
921                 {
922                 /* Amount of text matched not including the EOB char. */
923                 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
924
925                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
926                 *yy_cp = yy_hold_char;
927                 YY_RESTORE_YY_MORE_OFFSET
928
929                 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
930                         {
931                         /* We're scanning a new file or input source.  It's
932                          * possible that this happened because the user
933                          * just pointed yyin at a new source and called
934                          * yylex().  If so, then we have to assure
935                          * consistency between yy_current_buffer and our
936                          * globals.  Here is the right place to do so, because
937                          * this is the first action (other than possibly a
938                          * back-up) that will match for the new input source.
939                          */
940                         yy_n_chars = yy_current_buffer->yy_n_chars;
941                         yy_current_buffer->yy_input_file = yyin;
942                         yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
943                         }
944
945                 /* Note that here we test for yy_c_buf_p "<=" to the position
946                  * of the first EOB in the buffer, since yy_c_buf_p will
947                  * already have been incremented past the NUL character
948                  * (since all states make transitions on EOB to the
949                  * end-of-buffer state).  Contrast this with the test
950                  * in input().
951                  */
952                 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
953                         { /* This was really a NUL. */
954                         yy_state_type yy_next_state;
955
956                         yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
957
958                         yy_current_state = yy_get_previous_state();
959
960                         /* Okay, we're now positioned to make the NUL
961                          * transition.  We couldn't have
962                          * yy_get_previous_state() go ahead and do it
963                          * for us because it doesn't know how to deal
964                          * with the possibility of jamming (and we don't
965                          * want to build jamming into it because then it
966                          * will run more slowly).
967                          */
968
969                         yy_next_state = yy_try_NUL_trans( yy_current_state );
970
971                         yy_bp = yytext_ptr + YY_MORE_ADJ;
972
973                         if ( yy_next_state )
974                                 {
975                                 /* Consume the NUL. */
976                                 yy_cp = ++yy_c_buf_p;
977                                 yy_current_state = yy_next_state;
978                                 goto yy_match;
979                                 }
980
981                         else
982                                 {
983                                 yy_cp = yy_c_buf_p;
984                                 goto yy_find_action;
985                                 }
986                         }
987
988                 else switch ( yy_get_next_buffer() )
989                         {
990                         case EOB_ACT_END_OF_FILE:
991                                 {
992                                 yy_did_buffer_switch_on_eof = 0;
993
994                                 if ( yywrap() )
995                                         {
996                                         /* Note: because we've taken care in
997                                          * yy_get_next_buffer() to have set up
998                                          * yytext, we can now set up
999                                          * yy_c_buf_p so that if some total
1000                                          * hoser (like flex itself) wants to
1001                                          * call the scanner after we return the
1002                                          * YY_NULL, it'll still work - another
1003                                          * YY_NULL will get returned.
1004                                          */
1005                                         yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1006
1007                                         yy_act = YY_STATE_EOF(YY_START);
1008                                         goto do_action;
1009                                         }
1010
1011                                 else
1012                                         {
1013                                         if ( ! yy_did_buffer_switch_on_eof )
1014                                                 YY_NEW_FILE;
1015                                         }
1016                                 break;
1017                                 }
1018
1019                         case EOB_ACT_CONTINUE_SCAN:
1020                                 yy_c_buf_p =
1021                                         yytext_ptr + yy_amount_of_matched_text;
1022
1023                                 yy_current_state = yy_get_previous_state();
1024
1025                                 yy_cp = yy_c_buf_p;
1026                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
1027                                 goto yy_match;
1028
1029                         case EOB_ACT_LAST_MATCH:
1030                                 yy_c_buf_p =
1031                                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1032
1033                                 yy_current_state = yy_get_previous_state();
1034
1035                                 yy_cp = yy_c_buf_p;
1036                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
1037                                 goto yy_find_action;
1038                         }
1039                 break;
1040                 }
1041
1042         default:
1043                 YY_FATAL_ERROR(
1044                         "fatal flex scanner internal error--no action found" );
1045         } /* end of action switch */
1046                 } /* end of scanning one token */
1047         } /* end of yylex */
1048
1049
1050 /* yy_get_next_buffer - try to read in a new buffer
1051  *
1052  * Returns a code representing an action:
1053  *      EOB_ACT_LAST_MATCH -
1054  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1055  *      EOB_ACT_END_OF_FILE - end of file
1056  */
1057
1058 static int yy_get_next_buffer()
1059         {
1060         register char *dest = yy_current_buffer->yy_ch_buf;
1061         register char *source = yytext_ptr;
1062         register int number_to_move, i;
1063         int ret_val;
1064
1065         if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1066                 YY_FATAL_ERROR(
1067                 "fatal flex scanner internal error--end of buffer missed" );
1068
1069         if ( yy_current_buffer->yy_fill_buffer == 0 )
1070                 { /* Don't try to fill the buffer, so this is an EOF. */
1071                 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1072                         {
1073                         /* We matched a single character, the EOB, so
1074                          * treat this as a final EOF.
1075                          */
1076                         return EOB_ACT_END_OF_FILE;
1077                         }
1078
1079                 else
1080                         {
1081                         /* We matched some text prior to the EOB, first
1082                          * process it.
1083                          */
1084                         return EOB_ACT_LAST_MATCH;
1085                         }
1086                 }
1087
1088         /* Try to read more data. */
1089
1090         /* First move last chars to start of buffer. */
1091         number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1092
1093         for ( i = 0; i < number_to_move; ++i )
1094                 *(dest++) = *(source++);
1095
1096         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1097                 /* don't do the read, it's not guaranteed to return an EOF,
1098                  * just force an EOF
1099                  */
1100                 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1101
1102         else
1103                 {
1104                 int num_to_read =
1105                         yy_current_buffer->yy_buf_size - number_to_move - 1;
1106
1107                 while ( num_to_read <= 0 )
1108                         { /* Not enough room in the buffer - grow it. */
1109 #ifdef YY_USES_REJECT
1110                         YY_FATAL_ERROR(
1111 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1112 #else
1113
1114                         /* just a shorter name for the current buffer */
1115                         YY_BUFFER_STATE b = yy_current_buffer;
1116
1117                         int yy_c_buf_p_offset =
1118                                 (int) (yy_c_buf_p - b->yy_ch_buf);
1119
1120                         if ( b->yy_is_our_buffer )
1121                                 {
1122                                 int new_size = b->yy_buf_size * 2;
1123
1124                                 if ( new_size <= 0 )
1125                                         b->yy_buf_size += b->yy_buf_size / 8;
1126                                 else
1127                                         b->yy_buf_size *= 2;
1128
1129                                 b->yy_ch_buf = (char *)
1130                                         /* Include room in for 2 EOB chars. */
1131                                         yy_flex_realloc( (void *) b->yy_ch_buf,
1132                                                          b->yy_buf_size + 2 );
1133                                 }
1134                         else
1135                                 /* Can't grow it, we don't own it. */
1136                                 b->yy_ch_buf = 0;
1137
1138                         if ( ! b->yy_ch_buf )
1139                                 YY_FATAL_ERROR(
1140                                 "fatal error - scanner input buffer overflow" );
1141
1142                         yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1143
1144                         num_to_read = yy_current_buffer->yy_buf_size -
1145                                                 number_to_move - 1;
1146 #endif
1147                         }
1148
1149                 if ( num_to_read > YY_READ_BUF_SIZE )
1150                         num_to_read = YY_READ_BUF_SIZE;
1151
1152                 /* Read in more data. */
1153                 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1154                         yy_n_chars, num_to_read );
1155
1156                 yy_current_buffer->yy_n_chars = yy_n_chars;
1157                 }
1158
1159         if ( yy_n_chars == 0 )
1160                 {
1161                 if ( number_to_move == YY_MORE_ADJ )
1162                         {
1163                         ret_val = EOB_ACT_END_OF_FILE;
1164                         yyrestart( yyin );
1165                         }
1166
1167                 else
1168                         {
1169                         ret_val = EOB_ACT_LAST_MATCH;
1170                         yy_current_buffer->yy_buffer_status =
1171                                 YY_BUFFER_EOF_PENDING;
1172                         }
1173                 }
1174
1175         else
1176                 ret_val = EOB_ACT_CONTINUE_SCAN;
1177
1178         yy_n_chars += number_to_move;
1179         yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1180         yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1181
1182         yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1183
1184         return ret_val;
1185         }
1186
1187
1188 /* yy_get_previous_state - get the state just before the EOB char was reached */
1189
1190 static yy_state_type yy_get_previous_state()
1191         {
1192         register yy_state_type yy_current_state;
1193         register char *yy_cp;
1194
1195         yy_current_state = yy_start;
1196
1197         for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1198                 {
1199                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1200                 if ( yy_accept[yy_current_state] )
1201                         {
1202                         yy_last_accepting_state = yy_current_state;
1203                         yy_last_accepting_cpos = yy_cp;
1204                         }
1205                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1206                         {
1207                         yy_current_state = (int) yy_def[yy_current_state];
1208                         if ( yy_current_state >= 56 )
1209                                 yy_c = yy_meta[(unsigned int) yy_c];
1210                         }
1211                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1212                 }
1213
1214         return yy_current_state;
1215         }
1216
1217
1218 /* yy_try_NUL_trans - try to make a transition on the NUL character
1219  *
1220  * synopsis
1221  *      next_state = yy_try_NUL_trans( current_state );
1222  */
1223
1224 #ifdef YY_USE_PROTOS
1225 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1226 #else
1227 static yy_state_type yy_try_NUL_trans( yy_current_state )
1228 yy_state_type yy_current_state;
1229 #endif
1230         {
1231         register int yy_is_jam;
1232         register char *yy_cp = yy_c_buf_p;
1233
1234         register YY_CHAR yy_c = 1;
1235         if ( yy_accept[yy_current_state] )
1236                 {
1237                 yy_last_accepting_state = yy_current_state;
1238                 yy_last_accepting_cpos = yy_cp;
1239                 }
1240         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1241                 {
1242                 yy_current_state = (int) yy_def[yy_current_state];
1243                 if ( yy_current_state >= 56 )
1244                         yy_c = yy_meta[(unsigned int) yy_c];
1245                 }
1246         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1247         yy_is_jam = (yy_current_state == 55);
1248
1249         return yy_is_jam ? 0 : yy_current_state;
1250         }
1251
1252
1253 #ifndef YY_NO_UNPUT
1254 #ifdef YY_USE_PROTOS
1255 static void yyunput( int c, register char *yy_bp )
1256 #else
1257 static void yyunput( c, yy_bp )
1258 int c;
1259 register char *yy_bp;
1260 #endif
1261         {
1262         register char *yy_cp = yy_c_buf_p;
1263
1264         /* undo effects of setting up yytext */
1265         *yy_cp = yy_hold_char;
1266
1267         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1268                 { /* need to shift things up to make room */
1269                 /* +2 for EOB chars. */
1270                 register int number_to_move = yy_n_chars + 2;
1271                 register char *dest = &yy_current_buffer->yy_ch_buf[
1272                                         yy_current_buffer->yy_buf_size + 2];
1273                 register char *source =
1274                                 &yy_current_buffer->yy_ch_buf[number_to_move];
1275
1276                 while ( source > yy_current_buffer->yy_ch_buf )
1277                         *--dest = *--source;
1278
1279                 yy_cp += (int) (dest - source);
1280                 yy_bp += (int) (dest - source);
1281                 yy_current_buffer->yy_n_chars =
1282                         yy_n_chars = yy_current_buffer->yy_buf_size;
1283
1284                 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1285                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
1286                 }
1287
1288         *--yy_cp = (char) c;
1289
1290
1291         yytext_ptr = yy_bp;
1292         yy_hold_char = *yy_cp;
1293         yy_c_buf_p = yy_cp;
1294         }
1295 #endif  /* ifndef YY_NO_UNPUT */
1296
1297
1298 #ifndef YY_NO_INPUT
1299 #ifdef __cplusplus
1300 static int yyinput()
1301 #else
1302 static int input()
1303 #endif
1304         {
1305         int c;
1306
1307         *yy_c_buf_p = yy_hold_char;
1308
1309         if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1310                 {
1311                 /* yy_c_buf_p now points to the character we want to return.
1312                  * If this occurs *before* the EOB characters, then it's a
1313                  * valid NUL; if not, then we've hit the end of the buffer.
1314                  */
1315                 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1316                         /* This was really a NUL. */
1317                         *yy_c_buf_p = '\0';
1318
1319                 else
1320                         { /* need more input */
1321                         int offset = yy_c_buf_p - yytext_ptr;
1322                         ++yy_c_buf_p;
1323
1324                         switch ( yy_get_next_buffer() )
1325                                 {
1326                                 case EOB_ACT_LAST_MATCH:
1327                                         /* This happens because yy_g_n_b()
1328                                          * sees that we've accumulated a
1329                                          * token and flags that we need to
1330                                          * try matching the token before
1331                                          * proceeding.  But for input(),
1332                                          * there's no matching to consider.
1333                                          * So convert the EOB_ACT_LAST_MATCH
1334                                          * to EOB_ACT_END_OF_FILE.
1335                                          */
1336
1337                                         /* Reset buffer status. */
1338                                         yyrestart( yyin );
1339
1340                                         /* fall through */
1341
1342                                 case EOB_ACT_END_OF_FILE:
1343                                         {
1344                                         if ( yywrap() )
1345                                                 return EOF;
1346
1347                                         if ( ! yy_did_buffer_switch_on_eof )
1348                                                 YY_NEW_FILE;
1349 #ifdef __cplusplus
1350                                         return yyinput();
1351 #else
1352                                         return input();
1353 #endif
1354                                         }
1355
1356                                 case EOB_ACT_CONTINUE_SCAN:
1357                                         yy_c_buf_p = yytext_ptr + offset;
1358                                         break;
1359                                 }
1360                         }
1361                 }
1362
1363         c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
1364         *yy_c_buf_p = '\0';     /* preserve yytext */
1365         yy_hold_char = *++yy_c_buf_p;
1366
1367
1368         return c;
1369         }
1370 #endif /* YY_NO_INPUT */
1371
1372 #ifdef YY_USE_PROTOS
1373 void yyrestart( FILE *input_file )
1374 #else
1375 void yyrestart( input_file )
1376 FILE *input_file;
1377 #endif
1378         {
1379         if ( ! yy_current_buffer )
1380                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1381
1382         yy_init_buffer( yy_current_buffer, input_file );
1383         yy_load_buffer_state();
1384         }
1385
1386
1387 #ifdef YY_USE_PROTOS
1388 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1389 #else
1390 void yy_switch_to_buffer( new_buffer )
1391 YY_BUFFER_STATE new_buffer;
1392 #endif
1393         {
1394         if ( yy_current_buffer == new_buffer )
1395                 return;
1396
1397         if ( yy_current_buffer )
1398                 {
1399                 /* Flush out information for old buffer. */
1400                 *yy_c_buf_p = yy_hold_char;
1401                 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1402                 yy_current_buffer->yy_n_chars = yy_n_chars;
1403                 }
1404
1405         yy_current_buffer = new_buffer;
1406         yy_load_buffer_state();
1407
1408         /* We don't actually know whether we did this switch during
1409          * EOF (yywrap()) processing, but the only time this flag
1410          * is looked at is after yywrap() is called, so it's safe
1411          * to go ahead and always set it.
1412          */
1413         yy_did_buffer_switch_on_eof = 1;
1414         }
1415
1416
1417 #ifdef YY_USE_PROTOS
1418 void yy_load_buffer_state( void )
1419 #else
1420 void yy_load_buffer_state()
1421 #endif
1422         {
1423         yy_n_chars = yy_current_buffer->yy_n_chars;
1424         yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1425         yyin = yy_current_buffer->yy_input_file;
1426         yy_hold_char = *yy_c_buf_p;
1427         }
1428
1429
1430 #ifdef YY_USE_PROTOS
1431 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1432 #else
1433 YY_BUFFER_STATE yy_create_buffer( file, size )
1434 FILE *file;
1435 int size;
1436 #endif
1437         {
1438         YY_BUFFER_STATE b;
1439
1440         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1441         if ( ! b )
1442                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1443
1444         b->yy_buf_size = size;
1445
1446         /* yy_ch_buf has to be 2 characters longer than the size given because
1447          * we need to put in 2 end-of-buffer characters.
1448          */
1449         b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1450         if ( ! b->yy_ch_buf )
1451                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1452
1453         b->yy_is_our_buffer = 1;
1454
1455         yy_init_buffer( b, file );
1456
1457         return b;
1458         }
1459
1460
1461 #ifdef YY_USE_PROTOS
1462 void yy_delete_buffer( YY_BUFFER_STATE b )
1463 #else
1464 void yy_delete_buffer( b )
1465 YY_BUFFER_STATE b;
1466 #endif
1467         {
1468         if ( ! b )
1469                 return;
1470
1471         if ( b == yy_current_buffer )
1472                 yy_current_buffer = (YY_BUFFER_STATE) 0;
1473
1474         if ( b->yy_is_our_buffer )
1475                 yy_flex_free( (void *) b->yy_ch_buf );
1476
1477         yy_flex_free( (void *) b );
1478         }
1479
1480
1481
1482 #ifdef YY_USE_PROTOS
1483 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1484 #else
1485 void yy_init_buffer( b, file )
1486 YY_BUFFER_STATE b;
1487 FILE *file;
1488 #endif
1489
1490
1491         {
1492         yy_flush_buffer( b );
1493
1494         b->yy_input_file = file;
1495         b->yy_fill_buffer = 1;
1496
1497 #if YY_ALWAYS_INTERACTIVE
1498         b->yy_is_interactive = 1;
1499 #else
1500 #if YY_NEVER_INTERACTIVE
1501         b->yy_is_interactive = 0;
1502 #else
1503         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1504 #endif
1505 #endif
1506         }
1507
1508
1509 #ifdef YY_USE_PROTOS
1510 void yy_flush_buffer( YY_BUFFER_STATE b )
1511 #else
1512 void yy_flush_buffer( b )
1513 YY_BUFFER_STATE b;
1514 #endif
1515
1516         {
1517         if ( ! b )
1518                 return;
1519
1520         b->yy_n_chars = 0;
1521
1522         /* We always need two end-of-buffer characters.  The first causes
1523          * a transition to the end-of-buffer state.  The second causes
1524          * a jam in that state.
1525          */
1526         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1527         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1528
1529         b->yy_buf_pos = &b->yy_ch_buf[0];
1530
1531         b->yy_at_bol = 1;
1532         b->yy_buffer_status = YY_BUFFER_NEW;
1533
1534         if ( b == yy_current_buffer )
1535                 yy_load_buffer_state();
1536         }
1537
1538
1539 #ifndef YY_NO_SCAN_BUFFER
1540 #ifdef YY_USE_PROTOS
1541 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1542 #else
1543 YY_BUFFER_STATE yy_scan_buffer( base, size )
1544 char *base;
1545 yy_size_t size;
1546 #endif
1547         {
1548         YY_BUFFER_STATE b;
1549
1550         if ( size < 2 ||
1551              base[size-2] != YY_END_OF_BUFFER_CHAR ||
1552              base[size-1] != YY_END_OF_BUFFER_CHAR )
1553                 /* They forgot to leave room for the EOB's. */
1554                 return 0;
1555
1556         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1557         if ( ! b )
1558                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1559
1560         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
1561         b->yy_buf_pos = b->yy_ch_buf = base;
1562         b->yy_is_our_buffer = 0;
1563         b->yy_input_file = 0;
1564         b->yy_n_chars = b->yy_buf_size;
1565         b->yy_is_interactive = 0;
1566         b->yy_at_bol = 1;
1567         b->yy_fill_buffer = 0;
1568         b->yy_buffer_status = YY_BUFFER_NEW;
1569
1570         yy_switch_to_buffer( b );
1571
1572         return b;
1573         }
1574 #endif
1575
1576
1577 #ifndef YY_NO_SCAN_STRING
1578 #ifdef YY_USE_PROTOS
1579 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1580 #else
1581 YY_BUFFER_STATE yy_scan_string( yy_str )
1582 yyconst char *yy_str;
1583 #endif
1584         {
1585         int len;
1586         for ( len = 0; yy_str[len]; ++len )
1587                 ;
1588
1589         return yy_scan_bytes( yy_str, len );
1590         }
1591 #endif
1592
1593
1594 #ifndef YY_NO_SCAN_BYTES
1595 #ifdef YY_USE_PROTOS
1596 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1597 #else
1598 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1599 yyconst char *bytes;
1600 int len;
1601 #endif
1602         {
1603         YY_BUFFER_STATE b;
1604         char *buf;
1605         yy_size_t n;
1606         int i;
1607
1608         /* Get memory for full buffer, including space for trailing EOB's. */
1609         n = len + 2;
1610         buf = (char *) yy_flex_alloc( n );
1611         if ( ! buf )
1612                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1613
1614         for ( i = 0; i < len; ++i )
1615                 buf[i] = bytes[i];
1616
1617         buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1618
1619         b = yy_scan_buffer( buf, n );
1620         if ( ! b )
1621                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1622
1623         /* It's okay to grow etc. this buffer, and we should throw it
1624          * away when we're done.
1625          */
1626         b->yy_is_our_buffer = 1;
1627
1628         return b;
1629         }
1630 #endif
1631
1632
1633 #ifndef YY_NO_PUSH_STATE
1634 #ifdef YY_USE_PROTOS
1635 static void yy_push_state( int new_state )
1636 #else
1637 static void yy_push_state( new_state )
1638 int new_state;
1639 #endif
1640         {
1641         if ( yy_start_stack_ptr >= yy_start_stack_depth )
1642                 {
1643                 yy_size_t new_size;
1644
1645                 yy_start_stack_depth += YY_START_STACK_INCR;
1646                 new_size = yy_start_stack_depth * sizeof( int );
1647
1648                 if ( ! yy_start_stack )
1649                         yy_start_stack = (int *) yy_flex_alloc( new_size );
1650
1651                 else
1652                         yy_start_stack = (int *) yy_flex_realloc(
1653                                         (void *) yy_start_stack, new_size );
1654
1655                 if ( ! yy_start_stack )
1656                         YY_FATAL_ERROR(
1657                         "out of memory expanding start-condition stack" );
1658                 }
1659
1660         yy_start_stack[yy_start_stack_ptr++] = YY_START;
1661
1662         BEGIN(new_state);
1663         }
1664 #endif
1665
1666
1667 #ifndef YY_NO_POP_STATE
1668 static void yy_pop_state()
1669         {
1670         if ( --yy_start_stack_ptr < 0 )
1671                 YY_FATAL_ERROR( "start-condition stack underflow" );
1672
1673         BEGIN(yy_start_stack[yy_start_stack_ptr]);
1674         }
1675 #endif
1676
1677
1678 #ifndef YY_NO_TOP_STATE
1679 static int yy_top_state()
1680         {
1681         return yy_start_stack[yy_start_stack_ptr - 1];
1682         }
1683 #endif
1684
1685 #ifndef YY_EXIT_FAILURE
1686 #define YY_EXIT_FAILURE 2
1687 #endif
1688
1689 #ifdef YY_USE_PROTOS
1690 static void yy_fatal_error( yyconst char msg[] )
1691 #else
1692 static void yy_fatal_error( msg )
1693 char msg[];
1694 #endif
1695         {
1696         (void) fprintf( stderr, "%s\n", msg );
1697         exit( YY_EXIT_FAILURE );
1698         }
1699
1700
1701
1702 /* Redefine yyless() so it works in section 3 code. */
1703
1704 #undef yyless
1705 #define yyless(n) \
1706         do \
1707                 { \
1708                 /* Undo effects of setting up yytext. */ \
1709                 yytext[yyleng] = yy_hold_char; \
1710                 yy_c_buf_p = yytext + n; \
1711                 yy_hold_char = *yy_c_buf_p; \
1712                 *yy_c_buf_p = '\0'; \
1713                 yyleng = n; \
1714                 } \
1715         while ( 0 )
1716
1717
1718 /* Internal utility routines. */
1719
1720 #ifndef yytext_ptr
1721 #ifdef YY_USE_PROTOS
1722 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1723 #else
1724 static void yy_flex_strncpy( s1, s2, n )
1725 char *s1;
1726 yyconst char *s2;
1727 int n;
1728 #endif
1729         {
1730         register int i;
1731         for ( i = 0; i < n; ++i )
1732                 s1[i] = s2[i];
1733         }
1734 #endif
1735
1736 #ifdef YY_NEED_STRLEN
1737 #ifdef YY_USE_PROTOS
1738 static int yy_flex_strlen( yyconst char *s )
1739 #else
1740 static int yy_flex_strlen( s )
1741 yyconst char *s;
1742 #endif
1743         {
1744         register int n;
1745         for ( n = 0; s[n]; ++n )
1746                 ;
1747
1748         return n;
1749         }
1750 #endif
1751
1752
1753 #ifdef YY_USE_PROTOS
1754 static void *yy_flex_alloc( yy_size_t size )
1755 #else
1756 static void *yy_flex_alloc( size )
1757 yy_size_t size;
1758 #endif
1759         {
1760         return (void *) malloc( size );
1761         }
1762
1763 #ifdef YY_USE_PROTOS
1764 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1765 #else
1766 static void *yy_flex_realloc( ptr, size )
1767 void *ptr;
1768 yy_size_t size;
1769 #endif
1770         {
1771         /* The cast to (char *) in the following accommodates both
1772          * implementations that use char* generic pointers, and those
1773          * that use void* generic pointers.  It works with the latter
1774          * because both ANSI C and C++ allow castless assignment from
1775          * any pointer type to void*, and deal with argument conversions
1776          * as though doing an assignment.
1777          */
1778         return (void *) realloc( (char *) ptr, size );
1779         }
1780
1781 #ifdef YY_USE_PROTOS
1782 static void yy_flex_free( void *ptr )
1783 #else
1784 static void yy_flex_free( ptr )
1785 void *ptr;
1786 #endif
1787         {
1788         free( ptr );
1789         }
1790
1791 #if YY_MAIN
1792 int main()
1793         {
1794         yylex();
1795         return 0;
1796         }
1797 #endif
1798 #line 183 "attr.l"
1799
1800
1801 static char *_lslp_strdup(const char *s)
1802 {
1803   char *p = &heap[heapIndex];
1804
1805   while ((heap[heapIndex++] = *s++))
1806       ;
1807
1808   return p;
1809 }
1810
1811 void attr_close_lexer(size_t handle)
1812 {
1813   PEGASUS_ASSERT(handle);
1814   PEGASUS_ASSERT(buf);
1815   PEGASUS_ASSERT(heap);
1816   attr_delete_buffer((YY_BUFFER_STATE)handle);
1817   free(buf);
1818   free(heap);
1819   buf = heap = 0;
1820 }
1821
1822 size_t attr_init_lexer(const char *s)
1823 {
1824   size_t len = strlen(s) + 2;
1825
1826   if (!(heap = (char*)malloc(len)))
1827   {
1828       return 0;
1829   }
1830   if (!(buf = (char*)malloc(len)))
1831   {
1832       free (heap);
1833       return 0;
1834   }
1835   heapIndex = 0;
1836   strcpy(buf, s);
1837   buf[len - 1] = 0;
1838
1839   return ((size_t) attr_scan_buffer(buf, len));
1840 }
1841
1842
1843 void attrerror(const char *s, ...)
1844 {
1845
1846  /* (va, s);
1847     printf(s, va);
1848     return;
1849 */
1850 }
1851
1852 /*
1853 int main(int argc, char *argv[])
1854 {
1855
1856 }
1857
1858 */
1859
1860