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
14 #define yyleng attrleng
17 #define yyrestart attrrestart
18 #define yytext attrtext
21 /* A lexical scanner generated by flex */
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 $
28 #define YY_FLEX_MAJOR_VERSION 2
29 #define YY_FLEX_MINOR_VERSION 5
35 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
47 /* Use prototypes in function declarations. */
50 /* The "const" storage-class-modifier is valid. */
53 #else /* ! __cplusplus */
61 #endif /* ! __cplusplus */
80 #define YY_PROTO(proto) proto
82 #define YY_PROTO(proto) ()
85 /* Returned upon end-of-file. */
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
93 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
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.
99 #define BEGIN yy_start = 1 + 2 *
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
105 #define YY_START ((yy_start - 1) / 2)
106 #define YYSTATE YY_START
108 /* Action number for EOF rule of a given start state. */
109 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
111 /* Special action meaning "start processing a new file". */
112 #define YY_NEW_FILE yyrestart( yyin )
114 #define YY_END_OF_BUFFER_CHAR 0
116 /* Size of default input buffer. */
117 #define YY_BUF_SIZE 16384
119 typedef struct yy_buffer_state *YY_BUFFER_STATE;
122 extern FILE *yyin, *yyout;
124 #define EOB_ACT_CONTINUE_SCAN 0
125 #define EOB_ACT_END_OF_FILE 1
126 #define EOB_ACT_LAST_MATCH 2
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:
132 * if ( condition_holds )
135 * do_something_else();
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.
142 /* Return all but the first 'n' matched characters back to the input stream. */
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 */ \
155 #define unput(c) yyunput( c, yytext_ptr )
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).
161 typedef unsigned int yy_size_t;
164 struct yy_buffer_state
168 char *yy_ch_buf; /* input buffer */
169 char *yy_buf_pos; /* current position in input buffer */
171 /* Size of input buffer in bytes, not including room for EOB
174 yy_size_t yy_buf_size;
176 /* Number of characters read into yy_ch_buf, not including EOB
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
185 int yy_is_our_buffer;
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
192 int yy_is_interactive;
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
200 /* Whether to try to fill the input buffer when we reach the
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.
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.
218 #define YY_BUFFER_EOF_PENDING 2
221 static YY_BUFFER_STATE yy_current_buffer = 0;
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
227 #define YY_CURRENT_BUFFER yy_current_buffer
230 /* yy_hold_char holds the character lost when yytext is formed. */
231 static char yy_hold_char;
233 static int yy_n_chars; /* number of characters read into yy_ch_buf */
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 */
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 ...
246 static int yy_did_buffer_switch_on_eof;
248 void yyrestart YY_PROTO(( FILE *input_file ));
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 )
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 ));
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 * ));
266 #define yy_new_buffer yy_create_buffer
268 #define yy_set_interactive(is_interactive) \
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; \
275 #define yy_set_bol(at_bol) \
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; \
282 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
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;
291 #define yytext_ptr yytext
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[] ));
298 /* Done after the current pattern has been matched and before the
299 * corresponding action - sets up yytext.
301 #define YY_DO_BEFORE_ACTION \
302 yytext_ptr = yy_bp; \
303 yyleng = (int) (yy_cp - yy_bp); \
304 yy_hold_char = *yy_cp; \
308 #define YY_NUM_RULES 22
309 #define YY_END_OF_BUFFER 23
310 static yyconst short int yy_accept[56] =
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,
320 static yyconst int yy_ec[256] =
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,
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,
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,
352 static yyconst int yy_meta[24] =
354 1, 2, 1, 2, 3, 1, 1, 3, 1, 3,
355 3, 1, 3, 3, 3, 3, 3, 3, 3, 3,
359 static yyconst short int yy_base[61] =
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
369 static yyconst short int yy_def[61] =
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
379 static yyconst short int yy_nxt[198] =
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,
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
405 static yyconst short int yy_chk[198] =
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,
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
431 static yy_state_type yy_last_accepting_state;
432 static char *yy_last_accepting_cpos;
434 /* The intent behind this definition is that it'll catch
435 * any uses of REJECT which flex missed.
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
445 //%LICENSE////////////////////////////////////////////////////////////////
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
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:
461 // The above copyright notice and this permission notice shall be included
462 // in all copies or substantial portions of the Software.
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.
472 //////////////////////////////////////////////////////////////////////////
474 /*****************************************************************************
475 * Description: encode/decode attribute lists
477 * Originated: March 6, 2000
478 * Original Author: Mike Day md@soft-hackle.net
482 * Copyright (c) 2001 - 2003 IBM
483 * Copyright (c) 2000 - 2003 Michael Day
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:
492 * The above copyright notice and this permission notice shall be included in
493 * all copies or substantial portions of the Software.
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.
504 *****************************************************************************/
509 #define YY_NEVER_INTERACTIVE 1
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"
517 static int16 heapIndex;
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);
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.
548 /* Macros after this point can all be overridden by user definitions in
552 #ifndef YY_SKIP_YYWRAP
554 extern "C" int yywrap YY_PROTO(( void ));
556 extern int yywrap YY_PROTO(( void ));
561 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
565 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
568 #ifdef YY_NEED_STRLEN
569 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
574 static int yyinput YY_PROTO(( void ));
576 static int input YY_PROTO(( void ));
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 ));
587 #ifndef YY_NO_POP_STATE
588 static void yy_pop_state YY_PROTO(( void ));
590 #ifndef YY_NO_TOP_STATE
591 static int yy_top_state YY_PROTO(( void ));
595 #define YY_NO_PUSH_STATE 1
596 #define YY_NO_POP_STATE 1
597 #define YY_NO_TOP_STATE 1
600 #ifdef YY_MALLOC_DECL
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).
615 /* Amount of stuff to slurp up with each read. */
616 #ifndef YY_READ_BUF_SIZE
617 #define YY_READ_BUF_SIZE 8192
620 /* Copy whatever the last rule matched to the standard output. */
623 /* This used to be an fputs(), but since the string might contain NUL's,
624 * we now use fwrite().
626 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
629 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
630 * is returned in "result".
633 #define YY_INPUT(buf,result,max_size) \
634 if ( yy_current_buffer->yy_is_interactive ) \
637 for ( n = 0; n < max_size && \
638 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
641 buf[n++] = (char) c; \
642 if ( c == EOF && ferror( yyin ) ) \
643 YY_FATAL_ERROR( "input in flex scanner failed" ); \
646 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
647 && ferror( yyin ) ) \
648 YY_FATAL_ERROR( "input in flex scanner failed" );
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.
656 #define yyterminate() return YY_NULL
659 /* Number of entries by which start-condition stack grows. */
660 #ifndef YY_START_STACK_INCR
661 #define YY_START_STACK_INCR 25
664 /* Report a fatal error. */
665 #ifndef YY_FATAL_ERROR
666 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
669 /* Default declaration of generated scanner - a define so the user can
670 * easily add parameters.
673 #define YY_DECL int yylex YY_PROTO(( void ))
676 /* Code executed at the beginning of each rule, after yytext and yyleng
679 #ifndef YY_USER_ACTION
680 #define YY_USER_ACTION
683 /* Code executed at the end of each rule. */
685 #define YY_BREAK break;
688 #define YY_RULE_SETUP \
693 register yy_state_type yy_current_state;
694 register char *yy_cp = NULL, *yy_bp = NULL;
711 yy_start = 1; /* first start state */
719 if ( ! yy_current_buffer )
721 yy_create_buffer( yyin, YY_BUF_SIZE );
723 yy_load_buffer_state();
726 while ( 1 ) /* loops until end-of-file is reached */
730 /* Support of yytext. */
731 *yy_cp = yy_hold_char;
733 /* yy_bp points to the position in yy_ch_buf of the start of
738 yy_current_state = yy_start;
742 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
743 if ( yy_accept[yy_current_state] )
745 yy_last_accepting_state = yy_current_state;
746 yy_last_accepting_cpos = yy_cp;
748 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
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];
754 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
757 while ( yy_base[yy_current_state] != 174 );
760 yy_act = yy_accept[yy_current_state];
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];
771 do_action: /* This label is used only to access EOF actions. */
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;
791 { attrlval._i = *attrtext; return(attrlval._i); }
796 { BEGIN ATTR; attrlval._i = *attrtext; return(attrlval._i); }
803 if(NULL != (attrlval._s = _lslp_strdup(attrtext)))
810 /* anything else in the initial state is an error */
814 {attrerror("error in lexer - initial state\n");}
824 {BEGIN VALUE; attrlval._i = *attrtext; return(attrlval._i);}
831 if(NULL != (attrlval._s = _lslp_strdup(attrtext)))
838 /* make it legal to have just an attr tag enclosed in parens */
842 {BEGIN INITIAL; attrlval._i = *attrtext; return(attrlval._i); }
844 /* anything else in the attribute state is an error */
848 {attrerror("error in lexer - attribute state\n");}
858 {attrlval._i = *attrtext; return(_MULTIVAL);}
865 { attrlval._i = strtol(attrtext, (char **) 0, 0);
873 { attrlval._i = strtoul(attrtext, (char **)0, 0);
891 if(NULL != (attrlval._s = _lslp_strdup(attrtext)))
901 {BEGIN INITIAL; attrlval._i = *attrtext; return(attrlval._i);}
903 /* anything else in the value state is an error */
915 case YY_STATE_EOF(INITIAL):
916 case YY_STATE_EOF(ATTR):
917 case YY_STATE_EOF(VALUE):
920 case YY_END_OF_BUFFER:
922 /* Amount of text matched not including the EOB char. */
923 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
925 /* Undo the effects of YY_DO_BEFORE_ACTION. */
926 *yy_cp = yy_hold_char;
927 YY_RESTORE_YY_MORE_OFFSET
929 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
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.
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;
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
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;
956 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
958 yy_current_state = yy_get_previous_state();
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).
969 yy_next_state = yy_try_NUL_trans( yy_current_state );
971 yy_bp = yytext_ptr + YY_MORE_ADJ;
975 /* Consume the NUL. */
976 yy_cp = ++yy_c_buf_p;
977 yy_current_state = yy_next_state;
988 else switch ( yy_get_next_buffer() )
990 case EOB_ACT_END_OF_FILE:
992 yy_did_buffer_switch_on_eof = 0;
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.
1005 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1007 yy_act = YY_STATE_EOF(YY_START);
1013 if ( ! yy_did_buffer_switch_on_eof )
1019 case EOB_ACT_CONTINUE_SCAN:
1021 yytext_ptr + yy_amount_of_matched_text;
1023 yy_current_state = yy_get_previous_state();
1026 yy_bp = yytext_ptr + YY_MORE_ADJ;
1029 case EOB_ACT_LAST_MATCH:
1031 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1033 yy_current_state = yy_get_previous_state();
1036 yy_bp = yytext_ptr + YY_MORE_ADJ;
1037 goto yy_find_action;
1044 "fatal flex scanner internal error--no action found" );
1045 } /* end of action switch */
1046 } /* end of scanning one token */
1047 } /* end of yylex */
1050 /* yy_get_next_buffer - try to read in a new buffer
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
1058 static int yy_get_next_buffer()
1060 register char *dest = yy_current_buffer->yy_ch_buf;
1061 register char *source = yytext_ptr;
1062 register int number_to_move, i;
1065 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1067 "fatal flex scanner internal error--end of buffer missed" );
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 )
1073 /* We matched a single character, the EOB, so
1074 * treat this as a final EOF.
1076 return EOB_ACT_END_OF_FILE;
1081 /* We matched some text prior to the EOB, first
1084 return EOB_ACT_LAST_MATCH;
1088 /* Try to read more data. */
1090 /* First move last chars to start of buffer. */
1091 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1093 for ( i = 0; i < number_to_move; ++i )
1094 *(dest++) = *(source++);
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,
1100 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1105 yy_current_buffer->yy_buf_size - number_to_move - 1;
1107 while ( num_to_read <= 0 )
1108 { /* Not enough room in the buffer - grow it. */
1109 #ifdef YY_USES_REJECT
1111 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1114 /* just a shorter name for the current buffer */
1115 YY_BUFFER_STATE b = yy_current_buffer;
1117 int yy_c_buf_p_offset =
1118 (int) (yy_c_buf_p - b->yy_ch_buf);
1120 if ( b->yy_is_our_buffer )
1122 int new_size = b->yy_buf_size * 2;
1124 if ( new_size <= 0 )
1125 b->yy_buf_size += b->yy_buf_size / 8;
1127 b->yy_buf_size *= 2;
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 );
1135 /* Can't grow it, we don't own it. */
1138 if ( ! b->yy_ch_buf )
1140 "fatal error - scanner input buffer overflow" );
1142 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1144 num_to_read = yy_current_buffer->yy_buf_size -
1149 if ( num_to_read > YY_READ_BUF_SIZE )
1150 num_to_read = YY_READ_BUF_SIZE;
1152 /* Read in more data. */
1153 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1154 yy_n_chars, num_to_read );
1156 yy_current_buffer->yy_n_chars = yy_n_chars;
1159 if ( yy_n_chars == 0 )
1161 if ( number_to_move == YY_MORE_ADJ )
1163 ret_val = EOB_ACT_END_OF_FILE;
1169 ret_val = EOB_ACT_LAST_MATCH;
1170 yy_current_buffer->yy_buffer_status =
1171 YY_BUFFER_EOF_PENDING;
1176 ret_val = EOB_ACT_CONTINUE_SCAN;
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;
1182 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1188 /* yy_get_previous_state - get the state just before the EOB char was reached */
1190 static yy_state_type yy_get_previous_state()
1192 register yy_state_type yy_current_state;
1193 register char *yy_cp;
1195 yy_current_state = yy_start;
1197 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1199 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1200 if ( yy_accept[yy_current_state] )
1202 yy_last_accepting_state = yy_current_state;
1203 yy_last_accepting_cpos = yy_cp;
1205 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
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];
1211 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1214 return yy_current_state;
1218 /* yy_try_NUL_trans - try to make a transition on the NUL character
1221 * next_state = yy_try_NUL_trans( current_state );
1224 #ifdef YY_USE_PROTOS
1225 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1227 static yy_state_type yy_try_NUL_trans( yy_current_state )
1228 yy_state_type yy_current_state;
1231 register int yy_is_jam;
1232 register char *yy_cp = yy_c_buf_p;
1234 register YY_CHAR yy_c = 1;
1235 if ( yy_accept[yy_current_state] )
1237 yy_last_accepting_state = yy_current_state;
1238 yy_last_accepting_cpos = yy_cp;
1240 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
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];
1246 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1247 yy_is_jam = (yy_current_state == 55);
1249 return yy_is_jam ? 0 : yy_current_state;
1254 #ifdef YY_USE_PROTOS
1255 static void yyunput( int c, register char *yy_bp )
1257 static void yyunput( c, yy_bp )
1259 register char *yy_bp;
1262 register char *yy_cp = yy_c_buf_p;
1264 /* undo effects of setting up yytext */
1265 *yy_cp = yy_hold_char;
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];
1276 while ( source > yy_current_buffer->yy_ch_buf )
1277 *--dest = *--source;
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;
1284 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1285 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1288 *--yy_cp = (char) c;
1292 yy_hold_char = *yy_cp;
1295 #endif /* ifndef YY_NO_UNPUT */
1300 static int yyinput()
1307 *yy_c_buf_p = yy_hold_char;
1309 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
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.
1315 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1316 /* This was really a NUL. */
1320 { /* need more input */
1321 int offset = yy_c_buf_p - yytext_ptr;
1324 switch ( yy_get_next_buffer() )
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.
1337 /* Reset buffer status. */
1342 case EOB_ACT_END_OF_FILE:
1347 if ( ! yy_did_buffer_switch_on_eof )
1356 case EOB_ACT_CONTINUE_SCAN:
1357 yy_c_buf_p = yytext_ptr + offset;
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;
1370 #endif /* YY_NO_INPUT */
1372 #ifdef YY_USE_PROTOS
1373 void yyrestart( FILE *input_file )
1375 void yyrestart( input_file )
1379 if ( ! yy_current_buffer )
1380 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1382 yy_init_buffer( yy_current_buffer, input_file );
1383 yy_load_buffer_state();
1387 #ifdef YY_USE_PROTOS
1388 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1390 void yy_switch_to_buffer( new_buffer )
1391 YY_BUFFER_STATE new_buffer;
1394 if ( yy_current_buffer == new_buffer )
1397 if ( yy_current_buffer )
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;
1405 yy_current_buffer = new_buffer;
1406 yy_load_buffer_state();
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.
1413 yy_did_buffer_switch_on_eof = 1;
1417 #ifdef YY_USE_PROTOS
1418 void yy_load_buffer_state( void )
1420 void yy_load_buffer_state()
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;
1430 #ifdef YY_USE_PROTOS
1431 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1433 YY_BUFFER_STATE yy_create_buffer( file, size )
1440 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1442 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1444 b->yy_buf_size = size;
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.
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()" );
1453 b->yy_is_our_buffer = 1;
1455 yy_init_buffer( b, file );
1461 #ifdef YY_USE_PROTOS
1462 void yy_delete_buffer( YY_BUFFER_STATE b )
1464 void yy_delete_buffer( b )
1471 if ( b == yy_current_buffer )
1472 yy_current_buffer = (YY_BUFFER_STATE) 0;
1474 if ( b->yy_is_our_buffer )
1475 yy_flex_free( (void *) b->yy_ch_buf );
1477 yy_flex_free( (void *) b );
1482 #ifdef YY_USE_PROTOS
1483 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1485 void yy_init_buffer( b, file )
1492 yy_flush_buffer( b );
1494 b->yy_input_file = file;
1495 b->yy_fill_buffer = 1;
1497 #if YY_ALWAYS_INTERACTIVE
1498 b->yy_is_interactive = 1;
1500 #if YY_NEVER_INTERACTIVE
1501 b->yy_is_interactive = 0;
1503 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1509 #ifdef YY_USE_PROTOS
1510 void yy_flush_buffer( YY_BUFFER_STATE b )
1512 void yy_flush_buffer( b )
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.
1526 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1527 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1529 b->yy_buf_pos = &b->yy_ch_buf[0];
1532 b->yy_buffer_status = YY_BUFFER_NEW;
1534 if ( b == yy_current_buffer )
1535 yy_load_buffer_state();
1539 #ifndef YY_NO_SCAN_BUFFER
1540 #ifdef YY_USE_PROTOS
1541 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1543 YY_BUFFER_STATE yy_scan_buffer( base, size )
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. */
1556 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1558 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
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;
1567 b->yy_fill_buffer = 0;
1568 b->yy_buffer_status = YY_BUFFER_NEW;
1570 yy_switch_to_buffer( b );
1577 #ifndef YY_NO_SCAN_STRING
1578 #ifdef YY_USE_PROTOS
1579 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1581 YY_BUFFER_STATE yy_scan_string( yy_str )
1582 yyconst char *yy_str;
1586 for ( len = 0; yy_str[len]; ++len )
1589 return yy_scan_bytes( yy_str, len );
1594 #ifndef YY_NO_SCAN_BYTES
1595 #ifdef YY_USE_PROTOS
1596 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1598 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1599 yyconst char *bytes;
1608 /* Get memory for full buffer, including space for trailing EOB's. */
1610 buf = (char *) yy_flex_alloc( n );
1612 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1614 for ( i = 0; i < len; ++i )
1617 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1619 b = yy_scan_buffer( buf, n );
1621 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1623 /* It's okay to grow etc. this buffer, and we should throw it
1624 * away when we're done.
1626 b->yy_is_our_buffer = 1;
1633 #ifndef YY_NO_PUSH_STATE
1634 #ifdef YY_USE_PROTOS
1635 static void yy_push_state( int new_state )
1637 static void yy_push_state( new_state )
1641 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1645 yy_start_stack_depth += YY_START_STACK_INCR;
1646 new_size = yy_start_stack_depth * sizeof( int );
1648 if ( ! yy_start_stack )
1649 yy_start_stack = (int *) yy_flex_alloc( new_size );
1652 yy_start_stack = (int *) yy_flex_realloc(
1653 (void *) yy_start_stack, new_size );
1655 if ( ! yy_start_stack )
1657 "out of memory expanding start-condition stack" );
1660 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1667 #ifndef YY_NO_POP_STATE
1668 static void yy_pop_state()
1670 if ( --yy_start_stack_ptr < 0 )
1671 YY_FATAL_ERROR( "start-condition stack underflow" );
1673 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1678 #ifndef YY_NO_TOP_STATE
1679 static int yy_top_state()
1681 return yy_start_stack[yy_start_stack_ptr - 1];
1685 #ifndef YY_EXIT_FAILURE
1686 #define YY_EXIT_FAILURE 2
1689 #ifdef YY_USE_PROTOS
1690 static void yy_fatal_error( yyconst char msg[] )
1692 static void yy_fatal_error( msg )
1696 (void) fprintf( stderr, "%s\n", msg );
1697 exit( YY_EXIT_FAILURE );
1702 /* Redefine yyless() so it works in section 3 code. */
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'; \
1718 /* Internal utility routines. */
1721 #ifdef YY_USE_PROTOS
1722 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1724 static void yy_flex_strncpy( s1, s2, n )
1731 for ( i = 0; i < n; ++i )
1736 #ifdef YY_NEED_STRLEN
1737 #ifdef YY_USE_PROTOS
1738 static int yy_flex_strlen( yyconst char *s )
1740 static int yy_flex_strlen( s )
1745 for ( n = 0; s[n]; ++n )
1753 #ifdef YY_USE_PROTOS
1754 static void *yy_flex_alloc( yy_size_t size )
1756 static void *yy_flex_alloc( size )
1760 return (void *) malloc( size );
1763 #ifdef YY_USE_PROTOS
1764 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1766 static void *yy_flex_realloc( ptr, size )
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.
1778 return (void *) realloc( (char *) ptr, size );
1781 #ifdef YY_USE_PROTOS
1782 static void yy_flex_free( void *ptr )
1784 static void yy_flex_free( ptr )
1801 static char *_lslp_strdup(const char *s)
1803 char *p = &heap[heapIndex];
1805 while ((heap[heapIndex++] = *s++))
1811 void attr_close_lexer(size_t handle)
1813 PEGASUS_ASSERT(handle);
1814 PEGASUS_ASSERT(buf);
1815 PEGASUS_ASSERT(heap);
1816 attr_delete_buffer((YY_BUFFER_STATE)handle);
1822 size_t attr_init_lexer(const char *s)
1824 size_t len = strlen(s) + 2;
1826 if (!(heap = (char*)malloc(len)))
1830 if (!(buf = (char*)malloc(len)))
1839 return ((size_t) attr_scan_buffer(buf, len));
1843 void attrerror(const char *s, ...)
1853 int main(int argc, char *argv[])