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