1
/* A lexical scanner generated by flex */
3
/* Scanner skeleton version:
8
#define XML__FLEX_MAJOR_VERSION 2
9
#define XML__FLEX_MINOR_VERSION 5
14
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
29
/* Use prototypes in function declarations. */
30
#define XML__USE_PROTOS
32
/* The "const" storage-class-modifier is valid. */
33
#define XML__USE_CONST
35
#else /* ! __cplusplus */
39
#define XML__USE_PROTOS
40
#define XML__USE_CONST
43
#endif /* ! __cplusplus */
50
#define XML__USE_CONST
51
#define XML__USE_PROTOS
55
#define xml_const const
61
#ifdef XML__USE_PROTOS
62
#define XML__PROTO(proto) proto
64
#define XML__PROTO(proto) ()
68
/* Returned upon end-of-file. */
71
/* Promotes a possibly negative, possibly signed char to an unsigned
72
* integer for use as an array index. If the signed char is negative,
73
* we want to instead treat it as an 8-bit unsigned char, hence the
76
#define XML__SC_TO_UI(c) ((unsigned int) (unsigned char) c)
78
/* Enter a start condition. This macro really ought to take a parameter,
79
* but we do it the disgusting crufty way forced on us by the ()-less
80
* definition of BEGIN.
82
#define BEGIN xml__start = 1 + 2 *
84
/* Translate the current start state into a value that can be later handed
85
* to BEGIN to return to the state. The XML_STATE alias is for lex
88
#define XML__START ((xml__start - 1) / 2)
89
#define XML_STATE XML__START
91
/* Action number for EOF rule of a given start state. */
92
#define XML__STATE_EOF(state) (XML__END_OF_BUFFER + state + 1)
94
/* Special action meaning "start processing a new file". */
95
#define XML__NEW_FILE xml_restart( xml_in )
97
#define XML__END_OF_BUFFER_CHAR 0
99
/* Size of default input buffer. */
100
#define XML__BUF_SIZE 16384
102
typedef struct xml__buffer_state *XML__BUFFER_STATE;
105
extern FILE *xml_in, *xml_out;
107
#define EOB_ACT_CONTINUE_SCAN 0
108
#define EOB_ACT_END_OF_FILE 1
109
#define EOB_ACT_LAST_MATCH 2
111
/* The funky do-while in the following #define is used to turn the definition
112
* int a single C statement (which needs a semi-colon terminator). This
113
* avoids problems with code like:
115
* if ( condition_holds )
118
* do_something_else();
120
* Prior to using the do-while the compiler would get upset at the
121
* "else" because it interpreted the "if" statement as being all
122
* done when it reached the ';' after the xml_less() call.
125
/* Return all but the first 'n' matched characters back to the input stream. */
127
#define xml_less(n) \
130
/* Undo effects of setting up xml_text. */ \
131
*xml__cp = xml__hold_char; \
132
XML__RESTORE_XML__MORE_OFFSET \
133
xml__c_buf_p = xml__cp = xml__bp + n - XML__MORE_ADJ; \
134
XML__DO_BEFORE_ACTION; /* set up xml_text again */ \
138
#define unput(c) xml_unput( c, xml_text_ptr )
140
/* The following is because we cannot portably get our hands on size_t
141
* (without autoconf's help, which isn't available because we want
142
* flex-generated scanners to compile on their own).
144
typedef unsigned int xml__size_t;
147
struct xml__buffer_state
149
FILE *xml__input_file;
151
char *xml__ch_buf; /* input buffer */
152
char *xml__buf_pos; /* current position in input buffer */
154
/* Size of input buffer in bytes, not including room for EOB
157
xml__size_t xml__buf_size;
159
/* Number of characters read into xml__ch_buf, not including EOB
164
/* Whether we "own" the buffer - i.e., we know we created it,
165
* and can realloc() it to grow it, and should free() it to
168
int xml__is_our_buffer;
170
/* Whether this is an "interactive" input source; if so, and
171
* if we're using stdio for input, then we want to use getc()
172
* instead of fread(), to make sure we stop fetching input after
175
int xml__is_interactive;
177
/* Whether we're considered to be at the beginning of a line.
178
* If so, '^' rules will be active on the next match, otherwise
183
/* Whether to try to fill the input buffer when we reach the
186
int xml__fill_buffer;
188
int xml__buffer_status;
189
#define XML__BUFFER_NEW 0
190
#define XML__BUFFER_NORMAL 1
191
/* When an EOF's been seen but there's still some text to process
192
* then we mark the buffer as XML__EOF_PENDING, to indicate that we
193
* shouldn't try reading from the input source any more. We might
194
* still have a bunch of tokens to match, though, because of
195
* possible backing-up.
197
* When we actually see the EOF, we change the status to "new"
198
* (via xml_restart()), so that the user can continue scanning by
199
* just pointing xml_in at a new input file.
201
#define XML__BUFFER_EOF_PENDING 2
204
static XML__BUFFER_STATE xml__current_buffer = 0;
206
/* We provide macros for accessing buffer states in case in the
207
* future we want to put the buffer states in a more general
210
#define XML__CURRENT_BUFFER xml__current_buffer
213
/* xml__hold_char holds the character lost when xml_text is formed. */
214
static char xml__hold_char;
216
static int xml__n_chars; /* number of characters read into xml__ch_buf */
221
/* Points to current character in buffer. */
222
static char *xml__c_buf_p = (char *) 0;
223
static int xml__init = 1; /* whether we need to initialize */
224
static int xml__start = 0; /* start state number */
226
/* Flag which is used to allow xml_wrap()'s to do buffer switches
227
* instead of setting up a fresh xml_in. A bit of a hack ...
229
static int xml__did_buffer_switch_on_eof;
231
void xml_restart XML__PROTO(( FILE *input_file ));
233
void xml__switch_to_buffer XML__PROTO(( XML__BUFFER_STATE new_buffer ));
234
void xml__load_buffer_state XML__PROTO(( void ));
235
XML__BUFFER_STATE xml__create_buffer XML__PROTO(( FILE *file, int size ));
236
void xml__delete_buffer XML__PROTO(( XML__BUFFER_STATE b ));
237
void xml__init_buffer XML__PROTO(( XML__BUFFER_STATE b, FILE *file ));
238
void xml__flush_buffer XML__PROTO(( XML__BUFFER_STATE b ));
239
#define XML__FLUSH_BUFFER xml__flush_buffer( xml__current_buffer )
241
XML__BUFFER_STATE xml__scan_buffer XML__PROTO(( char *base, xml__size_t size ));
242
XML__BUFFER_STATE xml__scan_string XML__PROTO(( xml_const char *xml__str ));
243
XML__BUFFER_STATE xml__scan_bytes XML__PROTO(( xml_const char *bytes, int len ));
245
static void *xml__flex_alloc XML__PROTO(( xml__size_t ));
246
static void *xml__flex_realloc XML__PROTO(( void *, xml__size_t ));
247
static void xml__flex_free XML__PROTO(( void * ));
249
#define xml__new_buffer xml__create_buffer
251
#define xml__set_interactive(is_interactive) \
253
if ( ! xml__current_buffer ) \
254
xml__current_buffer = xml__create_buffer( xml_in, XML__BUF_SIZE ); \
255
xml__current_buffer->xml__is_interactive = is_interactive; \
258
#define xml__set_bol(at_bol) \
260
if ( ! xml__current_buffer ) \
261
xml__current_buffer = xml__create_buffer( xml_in, XML__BUF_SIZE ); \
262
xml__current_buffer->xml__at_bol = at_bol; \
265
#define XML__AT_BOL() (xml__current_buffer->xml__at_bol)
269
#define XML__SKIP_XML_WRAP
270
typedef unsigned char XML__CHAR;
271
FILE *xml_in = (FILE *) 0, *xml_out = (FILE *) 0;
272
typedef int xml__state_type;
273
extern char *xml_text;
274
#define xml_text_ptr xml_text
276
static xml__state_type xml__get_previous_state XML__PROTO(( void ));
277
static xml__state_type xml__try_NUL_trans XML__PROTO(( xml__state_type current_state ));
278
static int xml__get_next_buffer XML__PROTO(( void ));
279
static void xml__fatal_error XML__PROTO(( xml_const char msg[] ));
281
/* Done after the current pattern has been matched and before the
282
* corresponding action - sets up xml_text.
284
#define XML__DO_BEFORE_ACTION \
285
xml_text_ptr = xml__bp; \
286
xml_leng = (int) (xml__cp - xml__bp); \
287
xml__hold_char = *xml__cp; \
289
xml__c_buf_p = xml__cp;
291
#define XML__NUM_RULES 157
292
#define XML__END_OF_BUFFER 158
293
static xml_const short int xml__accept[1064] =
295
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
296
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
297
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
298
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
299
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
300
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
301
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
302
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
303
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
304
0, 0, 0, 0, 158, 156, 23, 10, 10, 23,
306
23, 135, 10, 135, 5, 6, 5, 8, 9, 8,
307
151, 143, 144, 152, 149, 152, 150, 155, 143, 144,
308
155, 157, 157, 27, 10, 27, 27, 27, 25, 157,
309
31, 10, 31, 157, 51, 10, 51, 51, 51, 49,
310
51, 51, 152, 151, 157, 60, 10, 60, 60, 60,
311
58, 60, 64, 10, 64, 157, 72, 10, 72, 72,
312
72, 70, 72, 72, 152, 157, 83, 10, 83, 83,
313
83, 81, 83, 83, 87, 10, 87, 87, 157, 97,
314
10, 97, 97, 97, 95, 97, 97, 97, 101, 10,
315
101, 157, 101, 157, 107, 10, 107, 107, 107, 105,
317
107, 152, 157, 118, 10, 118, 118, 118, 116, 118,
318
118, 152, 157, 131, 10, 131, 131, 131, 129, 131,
319
131, 131, 152, 10, 0, 2, 2, 0, 4, 7,
320
146, 145, 0, 0, 0, 0, 0, 154, 0, 26,
321
28, 0, 0, 0, 0, 0, 0, 50, 52, 52,
322
52, 0, 0, 0, 0, 59, 61, 61, 0, 0,
323
71, 73, 73, 73, 0, 82, 84, 84, 84, 0,
324
0, 96, 98, 98, 98, 98, 0, 0, 106, 108,
325
108, 0, 117, 119, 119, 119, 0, 0, 130, 132,
326
132, 132, 132, 0, 0, 0, 0, 0, 3, 0,
328
0, 0, 0, 0, 0, 0, 153, 0, 0, 0,
329
0, 0, 0, 0, 0, 0, 52, 52, 0, 0,
330
0, 148, 61, 0, 0, 0, 73, 73, 0, 0,
331
84, 84, 0, 0, 0, 98, 98, 98, 0, 0,
332
0, 108, 0, 0, 119, 119, 0, 0, 132, 132,
333
132, 0, 0, 0, 22, 1, 0, 0, 141, 0,
334
0, 0, 138, 137, 0, 0, 0, 0, 0, 0,
335
0, 0, 0, 0, 30, 0, 52, 52, 0, 0,
336
0, 54, 0, 61, 0, 0, 63, 0, 0, 73,
337
73, 0, 0, 75, 0, 84, 84, 0, 0, 86,
339
0, 0, 98, 98, 98, 0, 0, 100, 0, 0,
340
108, 0, 0, 110, 0, 119, 119, 0, 0, 121,
341
0, 132, 132, 132, 0, 0, 134, 0, 0, 0,
342
142, 136, 0, 0, 0, 0, 122, 0, 111, 0,
343
0, 0, 0, 0, 0, 52, 0, 0, 0, 0,
344
0, 73, 0, 0, 0, 0, 0, 0, 0, 0,
345
0, 98, 0, 0, 0, 0, 0, 0, 0, 0,
346
119, 0, 0, 0, 132, 0, 0, 0, 0, 0,
347
0, 0, 0, 12, 0, 139, 140, 0, 76, 122,
348
0, 111, 0, 0, 0, 0, 0, 48, 47, 0,
350
0, 0, 0, 0, 57, 56, 0, 73, 0, 69,
351
68, 0, 0, 80, 79, 0, 78, 77, 0, 0,
352
98, 0, 94, 93, 0, 90, 89, 0, 0, 104,
353
103, 0, 119, 0, 115, 114, 0, 132, 0, 128,
354
127, 0, 124, 123, 0, 0, 0, 11, 24, 76,
355
0, 32, 65, 0, 0, 0, 0, 0, 0, 0,
356
0, 0, 0, 0, 0, 88, 98, 0, 0, 0,
357
0, 0, 120, 132, 0, 133, 0, 0, 24, 55,
358
32, 65, 0, 0, 0, 0, 0, 0, 0, 0,
359
0, 0, 0, 0, 0, 0, 0, 0, 67, 66,
361
0, 0, 85, 88, 0, 0, 0, 0, 0, 113,
362
112, 0, 0, 0, 0, 55, 0, 0, 29, 0,
363
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
364
0, 147, 0, 53, 0, 0, 74, 0, 92, 91,
365
0, 99, 0, 0, 126, 125, 0, 0, 102, 0,
366
0, 44, 0, 0, 0, 0, 0, 0, 43, 0,
367
0, 0, 0, 0, 62, 0, 0, 0, 0, 0,
368
0, 0, 0, 102, 0, 40, 46, 0, 0, 0,
369
0, 39, 45, 0, 0, 0, 0, 0, 0, 0,
370
0, 0, 0, 0, 0, 0, 0, 0, 36, 0,
372
0, 0, 35, 0, 0, 109, 0, 0, 0, 0,
373
0, 0, 0, 0, 0, 38, 0, 0, 37, 0,
374
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
375
0, 0, 42, 0, 41, 0, 0, 0, 0, 0,
376
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
377
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
378
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
379
0, 0, 0, 34, 33, 0, 0, 0, 0, 0,
380
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
381
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
383
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
384
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
385
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
386
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
387
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
388
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
389
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
390
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
391
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
392
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
394
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
395
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
396
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
397
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
398
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
399
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
400
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
401
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
402
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
403
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
405
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
406
0, 0, 0, 0, 0, 0, 0, 0, 0, 20,
407
0, 0, 0, 21, 0, 0, 0, 0, 0, 0,
408
0, 0, 0, 0, 0, 18, 0, 0, 0, 0,
409
0, 0, 0, 0, 0, 0, 17, 0, 14, 0,
410
13, 0, 16, 0, 0, 0, 15, 0, 0, 0,
414
static xml_const int xml__ec[256] =
416
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
417
1, 2, 4, 1, 1, 1, 1, 1, 1, 1,
418
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
419
1, 2, 5, 6, 7, 1, 1, 8, 9, 1,
420
1, 1, 1, 1, 10, 11, 12, 13, 13, 13,
421
13, 13, 13, 13, 13, 13, 13, 14, 15, 16,
422
17, 18, 19, 1, 20, 21, 22, 23, 24, 21,
423
14, 14, 14, 14, 14, 14, 25, 14, 26, 27,
424
14, 14, 28, 29, 14, 14, 14, 14, 30, 14,
425
31, 1, 32, 1, 14, 1, 33, 21, 34, 35,
427
36, 37, 38, 39, 40, 14, 14, 41, 42, 43,
428
44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
429
54, 14, 1, 1, 1, 1, 1, 1, 1, 1,
430
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
431
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
432
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
433
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
435
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
436
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
438
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
439
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
440
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
441
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
442
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
446
static xml_const int xml__meta[55] =
448
1, 2, 2, 2, 1, 1, 1, 1, 1, 3,
449
3, 1, 4, 5, 1, 1, 1, 6, 1, 7,
450
7, 7, 7, 7, 5, 5, 5, 5, 5, 5,
451
1, 1, 7, 7, 7, 7, 7, 5, 5, 5,
452
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
456
static xml_const short int xml__base[1112] =
458
0, 0, 0, 3, 6, 9, 24, 27, 11, 14,
459
15, 17, 29, 38, 45, 52, 59, 61, 67, 70,
460
93, 125, 73, 76, 143, 146, 149, 164, 180, 0,
461
232, 234, 241, 249, 266, 309, 284, 287, 290, 327,
462
330, 333, 351, 354, 370, 0, 422, 424, 431, 439,
463
456, 0, 509, 512, 515, 518, 533, 536, 539, 542,
464
557, 560, 563, 566, 582, 0, 635, 638, 641, 644,
465
659, 662, 665, 668, 683, 686, 702, 745, 727, 762,
466
720, 723, 794, 0, 846, 848, 765, 769, 880, 0,
467
932, 934, 0, 0, 3088, 3089, 3089, 111, 114, 47,
469
62, 3089, 117, 150, 3089, 3089, 3077, 3089, 3089, 3068,
470
3089, 3081, 3081, 932, 3089, 3089, 3089, 3089, 3079, 3079,
471
3049, 3089, 236, 3089, 168, 3062, 0, 155, 3089, 938,
472
3089, 173, 242, 936, 3089, 256, 3061, 0, 159, 3089,
473
3045, 3044, 244, 3044, 940, 3089, 357, 3057, 0, 343,
474
3089, 3041, 3089, 361, 432, 939, 3089, 446, 3055, 0,
475
426, 3089, 3036, 3038, 434, 942, 3089, 689, 3052, 0,
476
528, 3089, 3036, 3024, 3089, 692, 941, 770, 949, 3089,
477
738, 3049, 0, 552, 3089, 3022, 3032, 3020, 3089, 788,
478
964, 958, 774, 962, 3089, 855, 3045, 0, 654, 3089,
480
3029, 1008, 975, 3089, 863, 3043, 0, 678, 3089, 3024,
481
3026, 3046, 977, 3089, 866, 3039, 0, 855, 3089, 3012,
482
3022, 3010, 3041, 869, 34, 2999, 3089, 3041, 3032, 3089,
483
3089, 3089, 37, 40, 3000, 2999, 2997, 3028, 3011, 3089,
484
0, 2997, 260, 3003, 73, 2998, 3007, 3089, 0, 2998,
485
2998, 148, 2990, 3019, 2992, 3089, 0, 2993, 3000, 2984,
486
3089, 0, 2989, 2989, 2982, 3089, 0, 2987, 2976, 2994,
487
2993, 3089, 0, 2984, 2982, 2971, 2980, 2972, 3089, 0,
488
2978, 2971, 3089, 0, 2975, 2975, 2975, 2979, 3089, 0,
489
2973, 2971, 2960, 2977, 2992, 2999, 281, 2966, 3089, 148,
491
0, 2962, 2962, 2990, 2989, 2959, 3089, 2953, 2954, 2959,
492
2957, 2950, 2964, 2949, 997, 1000, 2959, 2944, 2971, 1005,
493
1026, 3089, 2956, 1022, 1029, 2944, 2952, 2953, 1033, 1051,
494
2952, 2939, 1059, 1062, 2937, 2935, 2948, 2935, 1068, 1072,
495
2935, 2945, 1079, 1085, 2942, 2943, 1089, 1092, 2928, 2941,
496
2928, 1109, 1112, 2957, 3089, 3089, 17, 2933, 3089, 2958,
497
2957, 2923, 3089, 3089, 2921, 2936, 2935, 2926, 2921, 2840,
498
2847, 255, 1115, 1118, 3089, 1121, 1138, 2842, 2852, 1141,
499
1147, 3089, 1150, 1154, 1158, 1170, 3089, 1175, 2832, 2820,
500
1178, 1182, 1187, 3089, 1194, 1199, 1204, 1207, 1211, 3089,
502
1216, 2819, 2821, 1220, 1228, 1224, 1236, 3089, 1244, 2810,
503
1247, 1253, 1256, 3089, 1263, 2808, 1266, 1273, 1276, 3089,
504
1282, 2812, 1285, 1294, 1301, 1304, 3089, 1310, 321, 1313,
505
3089, 3089, 2836, 2829, 2788, 2780, 873, 2788, 1055, 2791,
506
2776, 2780, 1321, 1331, 1334, 1342, 2789, 1353, 1358, 1361,
507
1370, 2765, 1374, 1377, 1393, 1396, 1399, 1414, 1417, 1425,
508
2654, 2650, 1432, 1435, 1443, 1448, 1459, 1462, 1465, 1478,
509
2653, 1481, 1484, 1497, 2648, 1500, 1505, 1516, 1520, 1532,
510
698, 2672, 1535, 3089, 2670, 3089, 3089, 2651, 1528, 1538,
511
2650, 1541, 2638, 2646, 2634, 1545, 1552, 3089, 3089, 1562,
513
1565, 2653, 1573, 1578, 3089, 3089, 1586, 1590, 1596, 3089,
514
3089, 1606, 1609, 3089, 3089, 1617, 3089, 3089, 1626, 2624,
515
2628, 1629, 3089, 3089, 1637, 3089, 3089, 1648, 1651, 3089,
516
3089, 1659, 1665, 1669, 3089, 3089, 1681, 2623, 1688, 3089,
517
3089, 1698, 3089, 3089, 1706, 320, 333, 3089, 1709, 1712,
518
2617, 1715, 1718, 2617, 1723, 1726, 1694, 1696, 2645, 1745,
519
1748, 1751, 1758, 1767, 1754, 1771, 1774, 1777, 1784, 1794,
520
1797, 1805, 3089, 1810, 1813, 3089, 284, 41, 1816, 1822,
521
1832, 1835, 2596, 1838, 2606, 2594, 51, 2573, 2569, 2539,
522
2518, 309, 2482, 2213, 2201, 1841, 1844, 1848, 3089, 3089,
524
1861, 1864, 3089, 1867, 1870, 1874, 1882, 1886, 1889, 3089,
525
3089, 1899, 1903, 1911, 505, 1915, 2137, 1919, 3089, 2096,
526
2062, 694, 2026, 2010, 1985, 1920, 1874, 130, 1872, 1858,
527
1825, 3089, 1922, 3089, 1928, 1931, 3089, 1939, 3089, 3089,
528
1948, 3089, 1951, 1954, 3089, 3089, 1997, 283, 1968, 1756,
529
1787, 3089, 1736, 1700, 1670, 1659, 1622, 1650, 3089, 1588,
530
1519, 1436, 1417, 1971, 3089, 1974, 509, 536, 326, 711,
531
228, 1050, 506, 1977, 1373, 3089, 3089, 1344, 1346, 1312,
532
1284, 3089, 3089, 1256, 1286, 1157, 1984, 530, 411, 533,
533
631, 105, 683, 972, 635, 634, 1141, 1089, 3089, 953,
535
943, 914, 3089, 813, 1991, 3089, 1113, 944, 977, 970,
536
996, 1308, 1060, 1088, 2001, 3089, 778, 740, 3089, 689,
537
612, 720, 2004, 1061, 2009, 640, 1086, 1309, 1003, 845,
538
2030, 2040, 3089, 542, 3089, 400, 2022, 2033, 638, 2050,
539
1111, 1049, 1145, 979, 1117, 2053, 2078, 2110, 333, 204,
540
2070, 1157, 1151, 1243, 2073, 2102, 2128, 2131, 1149, 2149,
541
2181, 17, 6, 1291, 1020, 2141, 1080, 2173, 2200, 2203,
542
2206, 1225, 511, 3089, 3089, 1264, 1215, 2212, 1272, 1374,
543
1392, 1394, 1412, 1217, 1300, 508, 1495, 837, 1340, 1477,
544
1534, 1542, 2223, 1021, 556, 1567, 762, 1364, 1396, 1430,
546
1460, 2233, 931, 2240, 1492, 2244, 1329, 1366, 1452, 1473,
547
1604, 2250, 2261, 1533, 2269, 1640, 1656, 1661, 1671, 1619,
548
2279, 632, 1388, 1680, 1598, 1811, 2287, 2290, 2296, 2299,
549
1498, 1814, 1831, 1218, 1332, 2307, 1351, 1422, 2317, 2325,
550
2335, 2343, 1554, 1583, 1630, 1565, 1607, 2353, 1627, 1772,
551
1876, 1920, 1921, 1941, 1972, 1973, 1979, 2045, 1764, 1804,
552
1878, 1705, 1929, 2048, 2103, 1949, 1950, 1669, 1776, 1910,
553
2089, 2090, 2144, 2145, 2177, 2361, 1996, 2032, 1585, 1810,
554
2199, 2204, 2049, 2051, 2052, 2120, 2121, 2122, 2174, 2201,
555
2211, 2227, 2364, 2085, 2256, 1371, 1437, 2231, 2237, 1476,
557
1747, 2251, 2297, 2300, 2318, 2336, 2342, 2354, 2356, 2130,
558
2176, 1863, 2221, 2010, 2248, 2358, 2359, 2295, 2367, 2330,
559
2332, 2362, 2366, 2368, 2370, 2372, 2375, 2278, 2298, 2383,
560
2384, 1457, 2379, 2378, 2380, 2381, 2385, 2259, 2286, 2306,
561
2322, 2382, 2386, 2388, 2389, 2387, 2390, 2392, 2393, 2391,
562
2394, 2397, 2412, 2414, 2416, 2424, 2426, 2427, 2435, 2436,
563
2438, 2439, 2440, 2434, 2437, 2423, 2441, 2442, 2443, 2451,
564
2453, 2448, 2450, 2456, 2457, 2458, 2461, 2462, 2463, 2464,
565
2466, 2455, 2468, 2469, 2470, 1978, 2485, 2477, 2482, 2154,
566
2493, 2471, 2489, 2490, 2491, 2492, 2495, 2496, 2497, 2498,
568
2500, 2515, 2513, 2524, 2505, 2506, 2545, 2517, 2525, 2532,
569
2533, 2535, 2538, 2539, 2540, 2514, 2519, 2562, 2574, 3089,
570
2544, 2551, 2579, 3089, 2553, 2575, 2581, 2576, 2582, 2580,
571
2584, 2586, 2573, 2578, 2603, 3089, 2597, 2592, 2614, 2620,
572
2623, 2626, 2591, 2593, 2631, 2643, 3089, 2648, 3089, 2651,
573
3089, 2654, 3089, 2596, 2601, 2660, 3089, 2642, 2650, 2671,
574
2677, 3089, 3089, 2695, 2702, 2709, 2716, 2723, 2730, 2737,
575
2744, 2751, 2758, 2765, 2772, 2779, 2786, 2793, 2798, 2803,
576
2808, 2813, 2818, 2823, 2828, 2833, 2838, 2845, 2848, 2851,
577
2854, 2857, 2860, 2863, 2866, 2869, 2872, 2879, 2883, 2889,
579
2895, 2901, 2907, 2913, 2919, 2925, 2931, 2937, 2944, 2951,
583
static xml_const short int xml__def[1112] =
585
1064, 1064, 1065, 1065, 1065, 1065, 1066, 1066, 1067, 1067,
586
1068, 1068, 1069, 1069, 1069, 1069, 1070, 1070, 1071, 1071,
587
1072, 1072, 1071, 1071, 1073, 1073, 1071, 1071, 1063, 29,
588
1069, 1069, 1071, 1071, 1074, 1074, 1071, 1071, 1071, 1071,
589
1075, 1075, 1071, 1071, 1063, 45, 1069, 1069, 1071, 1071,
590
1063, 51, 1071, 1071, 1071, 1071, 1071, 1071, 1076, 1076,
591
1076, 1076, 1071, 1071, 1063, 65, 1077, 1077, 1071, 1071,
592
1077, 1077, 1077, 1077, 1071, 1071, 1078, 1078, 1069, 1069,
593
1071, 1071, 1063, 83, 1069, 1069, 1071, 1071, 1063, 89,
594
1069, 1069, 1064, 1064, 1063, 1063, 1063, 1063, 1063, 1063,
596
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
597
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
598
1063, 1063, 1063, 1063, 1063, 1063, 1079, 1063, 1063, 1063,
599
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1080, 1063, 1063,
600
1080, 1080, 1063, 1063, 1063, 1063, 1063, 1063, 1081, 1063,
601
1063, 1081, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1082,
602
1063, 1063, 1082, 1082, 1063, 1063, 1063, 1063, 1063, 1083,
603
1063, 1063, 1083, 1083, 1063, 1063, 1063, 1063, 1063, 1063,
604
1063, 1063, 1084, 1063, 1063, 1084, 1084, 1084, 1063, 1063,
605
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1085, 1063, 1063,
607
1085, 1063, 1063, 1063, 1063, 1063, 1086, 1063, 1063, 1086,
608
1086, 202, 1063, 1063, 1063, 1063, 1087, 1063, 1063, 1087,
609
1087, 1087, 202, 1063, 1088, 1063, 1063, 1063, 1063, 1063,
610
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
611
1079, 1063, 1063, 1063, 1063, 1089, 1063, 1063, 1080, 1080,
612
1080, 1063, 1090, 1063, 1063, 1063, 1081, 1081, 1091, 1063,
613
1063, 1082, 1082, 1082, 1092, 1063, 1083, 1083, 1083, 1093,
614
1063, 1063, 1084, 1084, 1084, 1084, 1094, 1063, 1063, 1085,
615
1085, 1095, 1063, 1086, 1086, 1086, 1096, 1063, 1063, 1087,
616
1087, 1087, 1087, 1097, 1098, 1063, 1098, 1063, 1063, 1063,
618
1099, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
619
1063, 1063, 1063, 1063, 1100, 1100, 1080, 1080, 1063, 1101,
620
1101, 1063, 1081, 1102, 1102, 1063, 1082, 1082, 1103, 1103,
621
1083, 1083, 1104, 1104, 1063, 1084, 1084, 1084, 1105, 1105,
622
1063, 1085, 1106, 1106, 1086, 1086, 1107, 1107, 1087, 1087,
623
1087, 1108, 1108, 1098, 1063, 1063, 1098, 1063, 1063, 1099,
624
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
625
1063, 1063, 1063, 1100, 1063, 1100, 1080, 1080, 1063, 1063,
626
1101, 1063, 1101, 1081, 1063, 1102, 1063, 1102, 1063, 1082,
627
1082, 1063, 1103, 1063, 1103, 1083, 1083, 1063, 1104, 1063,
629
1104, 1063, 1084, 1084, 1084, 1063, 1105, 1063, 1105, 1063,
630
1085, 1063, 1106, 1063, 1106, 1086, 1086, 1063, 1107, 1063,
631
1107, 1087, 1087, 1087, 1063, 1108, 1063, 1108, 1098, 1109,
632
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
633
1063, 1063, 1100, 1063, 1063, 1080, 1063, 1101, 1063, 1063,
634
1102, 1082, 1063, 1063, 1103, 1063, 1063, 1063, 1063, 1104,
635
1063, 1084, 1063, 1063, 1063, 1063, 1105, 1063, 1063, 1106,
636
1086, 1063, 1063, 1107, 1087, 1063, 1063, 1063, 1063, 1108,
637
1098, 1109, 1109, 1063, 1109, 1063, 1063, 1063, 1063, 1063,
638
1063, 1063, 1063, 1063, 1063, 1100, 1063, 1063, 1063, 1063,
640
1063, 1063, 1101, 1063, 1063, 1063, 1102, 1082, 1063, 1063,
641
1063, 1103, 1063, 1063, 1063, 1063, 1063, 1063, 1104, 1063,
642
1084, 1063, 1063, 1063, 1063, 1063, 1063, 1105, 1063, 1063,
643
1063, 1106, 1086, 1063, 1063, 1063, 1107, 1087, 1063, 1063,
644
1063, 1063, 1063, 1063, 1108, 1098, 1109, 1063, 1063, 1063,
645
1063, 1063, 1063, 1063, 1100, 1063, 1063, 1063, 1063, 1101,
646
1102, 1063, 1063, 1103, 1104, 1063, 1084, 1105, 1106, 1063,
647
1063, 1063, 1063, 1087, 1063, 1063, 1098, 1109, 1063, 1063,
648
1063, 1063, 1063, 1100, 1063, 1063, 1063, 1063, 1063, 1063,
649
1063, 1063, 1063, 1063, 1063, 1101, 1102, 1063, 1063, 1063,
651
1103, 1063, 1063, 1063, 1063, 1063, 1105, 1106, 1063, 1063,
652
1063, 1063, 1063, 1098, 1109, 1063, 1063, 1063, 1063, 1063,
653
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
654
1063, 1063, 1063, 1063, 1102, 1063, 1063, 1063, 1063, 1063,
655
1063, 1063, 1106, 1063, 1063, 1063, 1098, 1109, 1063, 1063,
656
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
657
1063, 1063, 1063, 1063, 1063, 1106, 1098, 1098, 1098, 1098,
658
1098, 1098, 1109, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
659
1063, 1063, 1063, 1063, 1063, 1063, 1106, 1098, 1098, 1098,
660
1098, 1098, 1098, 1098, 1098, 1109, 1063, 1063, 1063, 1063,
662
1063, 1063, 1063, 1063, 1063, 1063, 1098, 1098, 1098, 1098,
663
1098, 1098, 1098, 1098, 1109, 1063, 1063, 1063, 1063, 1063,
664
1063, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
665
1109, 1109, 1063, 1063, 1063, 1063, 1098, 1098, 1098, 1098,
666
1098, 1098, 1098, 1098, 1098, 1109, 1110, 1111, 1063, 1063,
667
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1110,
668
1111, 1063, 1063, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
669
1098, 1098, 1109, 1063, 1063, 1098, 1098, 1098, 1098, 1098,
670
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
671
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
673
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
674
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
675
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
676
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
677
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
678
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
679
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
680
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
681
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
682
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
684
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
685
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
686
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
687
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
688
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
689
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
690
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
691
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
692
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
693
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
695
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098,
696
1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1063,
697
1098, 1098, 1098, 1063, 1098, 1098, 1098, 1098, 1098, 1098,
698
1098, 1098, 1098, 1098, 1098, 1063, 1098, 1098, 1098, 1098,
699
1098, 1098, 1098, 1098, 1098, 1098, 1063, 1098, 1063, 1098,
700
1063, 1098, 1063, 1098, 1098, 1098, 1063, 1098, 1098, 1098,
701
1098, 1063, 0, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
702
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
703
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
704
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
706
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
710
static xml_const short int xml__nxt[3144] =
712
1063, 98, 99, 98, 98, 99, 98, 98, 99, 98,
713
98, 99, 98, 106, 775, 100, 106, 109, 100, 109,
714
107, 101, 774, 107, 101, 103, 99, 103, 103, 99,
715
103, 112, 113, 110, 355, 110, 114, 115, 429, 104,
716
112, 113, 104, 296, 116, 114, 115, 112, 113, 300,
717
117, 225, 114, 116, 112, 113, 297, 117, 484, 114,
718
116, 119, 120, 119, 120, 226, 225, 116, 99, 99,
719
99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
720
227, 302, 123, 622, 303, 123, 623, 615, 130, 301,
721
121, 130, 121, 124, 125, 99, 125, 124, 124, 124,
723
124, 124, 124, 124, 126, 124, 313, 124, 128, 124,
724
129, 124, 224, 224, 224, 224, 224, 224, 224, 224,
725
224, 314, 355, 124, 124, 124, 125, 99, 125, 124,
726
124, 124, 124, 124, 124, 124, 126, 124, 659, 124,
727
128, 124, 129, 124, 132, 99, 132, 132, 99, 132,
728
99, 99, 99, 711, 228, 124, 124, 296, 133, 228,
729
300, 133, 359, 228, 134, 99, 99, 99, 227, 224,
730
224, 224, 660, 227, 224, 224, 224, 227, 319, 134,
731
135, 136, 99, 136, 135, 135, 135, 135, 135, 135,
732
135, 137, 135, 138, 135, 139, 135, 140, 135, 138,
734
138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
735
135, 135, 138, 138, 138, 138, 138, 138, 138, 138,
736
138, 138, 141, 138, 138, 138, 138, 138, 138, 138,
737
142, 138, 138, 138, 112, 113, 112, 113, 763, 114,
738
228, 114, 99, 99, 99, 355, 228, 143, 252, 143,
739
99, 99, 99, 246, 227, 253, 145, 224, 224, 224,
740
227, 693, 227, 144, 145, 144, 146, 147, 99, 147,
741
146, 146, 146, 146, 146, 146, 146, 148, 146, 239,
742
146, 150, 146, 151, 146, 99, 99, 99, 99, 99,
743
99, 99, 99, 99, 441, 310, 146, 146, 355, 134,
745
484, 355, 134, 311, 442, 134, 357, 614, 152, 146,
746
147, 99, 147, 146, 146, 146, 146, 146, 146, 146,
747
148, 146, 673, 146, 150, 146, 151, 146, 99, 99,
748
99, 154, 99, 154, 154, 99, 154, 355, 355, 146,
749
146, 628, 134, 355, 629, 155, 577, 228, 155, 481,
750
484, 152, 99, 99, 99, 99, 99, 99, 224, 224,
751
224, 227, 224, 224, 224, 691, 156, 762, 578, 156,
752
157, 158, 99, 158, 157, 157, 157, 157, 157, 157,
753
157, 159, 157, 160, 157, 161, 157, 162, 157, 160,
754
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
756
157, 157, 160, 160, 160, 160, 160, 160, 160, 160,
757
163, 160, 164, 160, 160, 160, 160, 160, 160, 160,
758
160, 160, 160, 160, 112, 113, 112, 113, 355, 114,
759
228, 114, 99, 99, 99, 750, 228, 165, 252, 165,
760
99, 99, 99, 259, 227, 265, 166, 224, 224, 224,
761
227, 708, 227, 144, 166, 144, 167, 168, 99, 168,
762
167, 167, 167, 167, 167, 167, 167, 169, 167, 170,
763
167, 171, 167, 172, 167, 170, 170, 170, 170, 170,
764
170, 170, 170, 170, 170, 170, 167, 167, 170, 170,
765
170, 170, 170, 170, 170, 170, 170, 170, 173, 170,
767
170, 170, 174, 170, 170, 170, 170, 170, 170, 170,
768
99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
769
99, 99, 484, 484, 156, 355, 355, 156, 484, 485,
770
156, 795, 228, 156, 99, 99, 99, 99, 99, 99,
771
176, 99, 176, 176, 99, 176, 227, 355, 156, 696,
772
355, 156, 648, 355, 177, 688, 228, 177, 176, 99,
773
176, 176, 99, 176, 99, 99, 99, 99, 99, 99,
774
227, 689, 178, 355, 709, 178, 707, 749, 179, 690,
775
804, 179, 180, 181, 99, 181, 180, 180, 180, 180,
776
180, 180, 180, 182, 180, 183, 180, 184, 180, 185,
778
180, 183, 183, 183, 183, 183, 183, 183, 183, 183,
779
183, 183, 180, 180, 183, 186, 183, 183, 183, 183,
780
183, 183, 183, 183, 187, 183, 183, 183, 188, 183,
781
183, 183, 183, 183, 183, 183, 190, 99, 190, 190,
782
99, 190, 99, 99, 99, 99, 99, 99, 355, 355,
783
191, 484, 355, 191, 736, 355, 192, 355, 228, 192,
784
190, 99, 190, 190, 99, 190, 190, 99, 190, 190,
785
99, 190, 227, 753, 191, 834, 715, 191, 710, 741,
786
193, 714, 228, 193, 99, 99, 99, 99, 99, 99,
787
224, 224, 224, 224, 224, 224, 227, 735, 194, 652,
789
355, 194, 195, 196, 99, 196, 195, 195, 195, 195,
790
195, 195, 195, 197, 195, 355, 195, 199, 195, 200,
791
195, 99, 99, 99, 99, 99, 99, 546, 355, 112,
792
113, 712, 195, 195, 114, 203, 653, 355, 203, 224,
793
224, 224, 202, 692, 201, 195, 196, 99, 196, 195,
794
195, 195, 195, 195, 195, 195, 197, 195, 144, 195,
795
199, 195, 200, 195, 112, 113, 99, 99, 99, 114,
796
99, 99, 99, 737, 228, 195, 195, 202, 228, 355,
797
213, 270, 734, 733, 213, 277, 806, 201, 227, 224,
798
224, 224, 227, 144, 204, 205, 99, 205, 204, 204,
800
204, 204, 204, 204, 204, 206, 204, 207, 204, 208,
801
204, 209, 204, 207, 207, 207, 207, 207, 207, 207,
802
207, 207, 207, 207, 204, 204, 207, 207, 207, 207,
803
207, 207, 207, 207, 210, 207, 211, 207, 207, 207,
804
207, 207, 207, 207, 207, 207, 207, 207, 112, 113,
805
112, 113, 721, 114, 355, 114, 224, 224, 224, 228,
806
797, 212, 355, 212, 224, 224, 224, 224, 224, 224,
807
224, 224, 224, 227, 490, 490, 490, 144, 745, 144,
808
214, 215, 99, 215, 214, 214, 214, 214, 214, 214,
809
214, 216, 214, 217, 214, 218, 214, 219, 214, 217,
811
217, 217, 217, 217, 217, 217, 217, 217, 217, 217,
812
214, 214, 217, 220, 217, 217, 217, 217, 217, 217,
813
217, 217, 221, 217, 217, 217, 222, 217, 217, 217,
814
217, 217, 217, 217, 112, 113, 112, 113, 233, 114,
815
228, 114, 228, 228, 228, 228, 228, 223, 355, 223,
816
720, 719, 270, 228, 227, 812, 227, 227, 227, 227,
817
227, 355, 228, 144, 234, 144, 228, 227, 228, 235,
818
242, 243, 236, 255, 242, 277, 227, 237, 244, 228,
819
227, 228, 227, 247, 723, 245, 260, 355, 260, 355,
820
271, 255, 718, 227, 355, 227, 355, 255, 373, 373,
822
373, 373, 373, 373, 713, 247, 380, 380, 380, 278,
823
288, 247, 252, 355, 375, 244, 758, 375, 725, 282,
824
355, 724, 382, 385, 385, 385, 227, 380, 380, 380,
825
385, 385, 385, 376, 392, 392, 392, 355, 355, 387,
826
242, 243, 726, 382, 803, 744, 387, 777, 244, 271,
827
394, 239, 392, 392, 392, 245, 492, 492, 492, 383,
828
398, 398, 398, 398, 398, 398, 355, 355, 394, 406,
829
406, 406, 388, 406, 406, 406, 400, 355, 355, 400,
830
412, 412, 412, 694, 756, 408, 412, 412, 412, 408,
831
418, 418, 418, 418, 418, 418, 414, 355, 695, 395,
833
728, 739, 414, 355, 409, 355, 420, 779, 401, 420,
834
425, 425, 425, 425, 425, 425, 373, 373, 373, 373,
835
373, 373, 373, 373, 373, 717, 427, 729, 355, 427,
836
355, 421, 375, 415, 355, 375, 742, 730, 375, 444,
837
444, 444, 380, 380, 380, 722, 716, 428, 380, 380,
838
380, 380, 380, 380, 445, 449, 449, 449, 382, 385,
839
385, 385, 355, 755, 382, 759, 355, 382, 355, 443,
840
450, 385, 385, 385, 355, 387, 385, 385, 385, 453,
841
453, 453, 448, 392, 392, 392, 765, 387, 392, 392,
842
392, 757, 387, 704, 454, 392, 392, 392, 772, 394,
844
456, 456, 456, 766, 394, 458, 458, 458, 398, 398,
845
398, 394, 398, 398, 398, 457, 451, 398, 398, 398,
846
459, 463, 463, 463, 400, 406, 406, 406, 400, 465,
847
465, 465, 355, 400, 355, 355, 464, 406, 406, 406,
848
455, 408, 355, 786, 466, 406, 406, 406, 468, 468,
849
468, 846, 793, 408, 412, 412, 412, 412, 412, 412,
850
355, 408, 460, 469, 412, 412, 412, 472, 472, 472,
851
414, 784, 767, 414, 418, 418, 418, 418, 418, 418,
852
414, 355, 473, 418, 418, 418, 476, 476, 476, 355,
853
420, 785, 467, 420, 703, 478, 478, 478, 702, 420,
855
788, 477, 425, 425, 425, 425, 425, 425, 355, 470,
856
479, 425, 425, 425, 483, 483, 483, 355, 427, 701,
857
776, 427, 373, 373, 373, 355, 355, 427, 794, 474,
858
484, 485, 444, 444, 444, 497, 497, 497, 375, 498,
859
727, 743, 499, 500, 500, 500, 355, 445, 700, 355,
860
480, 699, 816, 496, 380, 380, 380, 355, 501, 449,
861
449, 449, 504, 504, 504, 847, 505, 798, 355, 506,
862
382, 385, 385, 385, 450, 453, 453, 453, 509, 509,
863
509, 355, 510, 355, 849, 511, 698, 387, 355, 817,
864
454, 355, 807, 503, 392, 392, 392, 456, 456, 456,
866
513, 513, 513, 789, 514, 355, 914, 515, 697, 355,
867
394, 355, 457, 355, 507, 458, 458, 458, 516, 516,
868
516, 790, 517, 791, 808, 518, 398, 398, 398, 355,
869
459, 835, 512, 463, 463, 463, 522, 522, 522, 355,
870
523, 792, 400, 524, 465, 465, 465, 355, 464, 525,
871
525, 525, 686, 526, 355, 850, 527, 519, 809, 466,
872
406, 406, 406, 468, 468, 468, 529, 529, 529, 355,
873
530, 685, 915, 531, 355, 818, 408, 355, 469, 412,
874
412, 412, 472, 472, 472, 534, 534, 534, 810, 535,
875
355, 950, 536, 355, 355, 414, 819, 473, 418, 418,
877
418, 476, 476, 476, 799, 528, 539, 539, 539, 355,
878
540, 918, 355, 541, 420, 355, 477, 478, 478, 478,
879
814, 542, 542, 542, 796, 543, 843, 532, 544, 550,
880
550, 550, 479, 425, 425, 425, 483, 483, 483, 490,
881
490, 490, 492, 492, 492, 537, 373, 373, 373, 427,
882
355, 355, 484, 497, 497, 497, 824, 498, 684, 355,
883
499, 800, 375, 500, 500, 500, 556, 556, 556, 801,
884
557, 355, 545, 558, 380, 380, 380, 859, 501, 504,
885
504, 504, 355, 505, 355, 547, 506, 385, 385, 385,
886
382, 562, 562, 562, 805, 555, 683, 509, 509, 509,
888
355, 510, 355, 387, 511, 560, 563, 392, 392, 392,
889
513, 513, 513, 862, 514, 355, 860, 515, 516, 516,
890
516, 355, 517, 394, 355, 518, 561, 398, 398, 398,
891
522, 522, 522, 820, 523, 896, 355, 524, 525, 525,
892
525, 837, 526, 400, 355, 527, 831, 355, 564, 406,
893
406, 406, 529, 529, 529, 863, 530, 355, 682, 531,
894
412, 412, 412, 861, 827, 408, 570, 570, 570, 681,
895
534, 534, 534, 355, 535, 866, 414, 536, 355, 565,
896
828, 571, 572, 572, 572, 829, 355, 568, 355, 539,
897
539, 539, 569, 540, 680, 830, 541, 355, 573, 542,
899
542, 542, 885, 543, 836, 679, 544, 575, 575, 575,
900
579, 579, 579, 550, 550, 550, 581, 581, 581, 582,
901
582, 582, 355, 576, 373, 373, 373, 556, 556, 556,
902
585, 557, 590, 586, 558, 591, 587, 879, 592, 678,
903
375, 677, 588, 589, 593, 594, 380, 380, 380, 385,
904
385, 385, 562, 562, 562, 602, 602, 602, 584, 598,
905
598, 598, 382, 599, 355, 387, 600, 563, 392, 392,
906
392, 603, 604, 604, 604, 605, 605, 605, 406, 406,
907
406, 355, 919, 597, 394, 412, 412, 412, 876, 355,
908
606, 596, 676, 355, 408, 570, 570, 570, 609, 609,
910
609, 414, 610, 675, 601, 611, 572, 572, 572, 886,
911
571, 612, 612, 612, 575, 575, 575, 579, 579, 579,
912
867, 355, 573, 616, 616, 616, 613, 355, 355, 607,
913
576, 355, 608, 581, 581, 581, 582, 582, 582, 618,
914
618, 618, 633, 633, 633, 385, 385, 385, 355, 598,
915
598, 598, 877, 599, 838, 619, 600, 844, 634, 663,
916
897, 387, 636, 636, 636, 602, 602, 602, 604, 604,
917
604, 605, 605, 605, 845, 638, 638, 638, 637, 639,
918
355, 603, 640, 641, 641, 641, 606, 412, 412, 412,
919
609, 609, 609, 355, 610, 355, 635, 611, 930, 642,
921
612, 612, 612, 414, 644, 644, 644, 662, 645, 661,
922
658, 646, 647, 647, 647, 613, 616, 616, 616, 868,
923
618, 618, 618, 633, 633, 633, 878, 355, 355, 664,
924
664, 664, 636, 636, 636, 643, 619, 355, 355, 634,
925
638, 638, 638, 887, 639, 665, 355, 640, 637, 641,
926
641, 641, 412, 412, 412, 644, 644, 644, 355, 645,
927
657, 880, 646, 869, 870, 642, 355, 355, 414, 674,
928
674, 674, 664, 664, 664, 412, 412, 412, 674, 674,
929
674, 883, 884, 1004, 871, 705, 705, 705, 665, 355,
930
355, 414, 705, 705, 705, 355, 355, 666, 647, 647,
932
647, 706, 731, 731, 731, 738, 738, 738, 706, 687,
933
740, 740, 740, 355, 355, 872, 873, 732, 484, 656,
934
932, 355, 874, 751, 751, 751, 355, 355, 894, 667,
935
668, 731, 731, 731, 738, 738, 738, 669, 670, 355,
936
671, 746, 746, 746, 672, 747, 732, 484, 748, 355,
937
355, 740, 740, 740, 746, 746, 746, 484, 747, 655,
938
752, 748, 355, 654, 895, 355, 355, 355, 355, 355,
939
484, 751, 751, 751, 768, 768, 768, 754, 482, 482,
940
482, 482, 482, 482, 482, 482, 482, 355, 875, 482,
941
355, 881, 482, 482, 482, 484, 482, 764, 651, 900,
943
902, 901, 355, 769, 769, 769, 355, 355, 482, 482,
944
482, 482, 482, 482, 482, 482, 482, 482, 482, 355,
945
355, 482, 888, 889, 482, 482, 482, 484, 482, 770,
946
770, 770, 771, 771, 771, 912, 650, 355, 355, 355,
947
482, 482, 778, 778, 778, 355, 882, 355, 355, 482,
948
482, 482, 482, 482, 773, 482, 482, 482, 355, 1007,
949
482, 355, 355, 482, 482, 482, 484, 482, 903, 904,
950
905, 355, 649, 928, 768, 768, 768, 890, 891, 482,
951
482, 482, 482, 482, 482, 482, 482, 482, 482, 773,
952
355, 355, 482, 355, 355, 482, 482, 482, 484, 482,
954
780, 769, 769, 769, 770, 770, 770, 771, 771, 771,
955
892, 482, 482, 778, 778, 778, 355, 355, 355, 929,
956
355, 355, 906, 355, 802, 802, 802, 781, 355, 355,
957
782, 632, 898, 783, 802, 802, 802, 899, 355, 787,
958
355, 813, 813, 813, 355, 815, 815, 815, 355, 907,
959
355, 821, 821, 821, 355, 631, 931, 355, 933, 908,
960
811, 355, 813, 813, 813, 355, 822, 355, 355, 823,
961
815, 815, 815, 355, 825, 909, 355, 826, 355, 916,
962
821, 821, 821, 920, 832, 917, 355, 833, 839, 839,
963
839, 840, 840, 840, 956, 355, 355, 841, 841, 841,
965
842, 842, 842, 355, 355, 936, 913, 355, 848, 848,
966
848, 946, 355, 355, 355, 355, 355, 355, 839, 839,
967
839, 957, 851, 355, 355, 852, 840, 840, 840, 921,
968
853, 947, 922, 854, 355, 355, 841, 841, 841, 355,
969
855, 958, 355, 856, 842, 842, 842, 355, 857, 355,
970
923, 858, 355, 355, 848, 848, 848, 959, 864, 355,
971
355, 865, 893, 893, 893, 893, 893, 893, 924, 910,
972
355, 355, 911, 355, 925, 355, 355, 937, 355, 355,
973
938, 355, 939, 355, 355, 355, 926, 355, 927, 355,
974
934, 935, 355, 948, 949, 355, 355, 355, 355, 355,
976
355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
977
355, 355, 940, 951, 355, 954, 941, 960, 942, 955,
978
943, 961, 944, 962, 963, 945, 966, 967, 952, 355,
979
953, 355, 970, 355, 974, 964, 975, 976, 965, 968,
980
355, 355, 969, 355, 355, 977, 978, 971, 979, 980,
981
981, 355, 355, 355, 355, 355, 355, 355, 355, 355,
982
355, 988, 972, 989, 973, 355, 982, 355, 355, 983,
983
355, 984, 355, 355, 355, 355, 986, 987, 355, 355,
984
355, 355, 990, 355, 991, 355, 355, 355, 355, 985,
985
992, 993, 994, 1004, 355, 995, 996, 997, 998, 355,
987
999, 1007, 355, 1002, 1003, 1000, 355, 355, 355, 355,
988
355, 1005, 355, 355, 355, 355, 1006, 355, 1001, 1008,
989
1018, 1018, 355, 355, 1033, 1019, 1019, 1019, 630, 1034,
990
355, 355, 355, 1016, 355, 1017, 355, 1009, 1010, 1011,
991
1012, 1020, 355, 1013, 1014, 1015, 1023, 1023, 1023, 355,
992
355, 1025, 355, 1021, 1022, 355, 355, 355, 1039, 1026,
993
627, 355, 1024, 1035, 1035, 1035, 1027, 1028, 355, 1029,
994
355, 626, 1030, 1031, 1032, 1019, 1019, 1019, 1037, 1036,
995
1023, 1023, 1023, 1039, 1040, 1038, 1040, 1041, 1041, 1042,
996
355, 1020, 355, 355, 1042, 355, 1024, 355, 355, 355,
998
1045, 355, 1045, 355, 1035, 1035, 1035, 1043, 355, 355,
999
355, 625, 1044, 355, 355, 1046, 1046, 1046, 355, 624,
1000
1036, 1048, 1048, 1048, 1050, 1050, 1050, 1052, 1052, 1052,
1001
1058, 1047, 1056, 1056, 1056, 1059, 621, 1049, 620, 1054,
1002
1051, 1055, 617, 1053, 1046, 1046, 1046, 1060, 1057, 1048,
1003
1048, 1048, 1050, 1050, 1050, 1052, 1052, 1052, 1060, 355,
1004
1047, 1056, 1056, 1056, 595, 1049, 583, 355, 1051, 580,
1005
574, 1053, 1061, 1061, 1061, 567, 566, 1057, 1061, 1061,
1006
1061, 559, 554, 553, 552, 551, 549, 548, 1062, 484,
1007
538, 533, 521, 520, 1062, 96, 96, 96, 96, 96,
1009
96, 96, 97, 97, 97, 97, 97, 97, 97, 102,
1010
102, 102, 102, 102, 102, 102, 105, 105, 105, 105,
1011
105, 105, 105, 108, 108, 108, 108, 108, 108, 108,
1012
111, 111, 111, 111, 111, 111, 111, 118, 118, 118,
1013
118, 118, 118, 118, 122, 122, 122, 122, 122, 122,
1014
122, 127, 127, 127, 127, 127, 127, 127, 131, 131,
1015
131, 131, 131, 131, 131, 149, 149, 149, 149, 149,
1016
149, 149, 153, 153, 153, 153, 153, 153, 153, 175,
1017
175, 175, 175, 175, 175, 175, 189, 189, 189, 189,
1018
189, 189, 189, 198, 198, 198, 198, 198, 198, 198,
1020
241, 241, 241, 508, 241, 249, 249, 249, 502, 249,
1021
257, 257, 257, 495, 257, 262, 262, 262, 494, 262,
1022
267, 267, 267, 493, 267, 273, 273, 273, 491, 273,
1023
280, 280, 280, 489, 280, 284, 284, 284, 488, 284,
1024
290, 290, 290, 487, 290, 295, 295, 295, 295, 295,
1025
486, 295, 315, 475, 315, 320, 471, 320, 324, 442,
1026
324, 329, 462, 329, 333, 461, 333, 339, 452, 339,
1027
343, 441, 343, 347, 447, 347, 352, 446, 352, 354,
1028
354, 354, 354, 354, 354, 354, 360, 440, 439, 360,
1029
374, 374, 374, 374, 374, 374, 381, 381, 381, 381,
1031
381, 381, 386, 386, 386, 386, 386, 386, 393, 393,
1032
393, 393, 393, 393, 399, 399, 399, 399, 399, 399,
1033
407, 407, 407, 407, 407, 407, 413, 413, 413, 413,
1034
413, 413, 419, 419, 419, 419, 419, 419, 426, 426,
1035
426, 426, 426, 426, 482, 482, 482, 482, 482, 482,
1036
482, 760, 760, 760, 760, 760, 760, 760, 761, 761,
1037
761, 761, 761, 761, 761, 438, 437, 436, 435, 434,
1038
433, 432, 431, 430, 355, 424, 423, 422, 417, 416,
1039
411, 410, 405, 404, 403, 402, 397, 396, 391, 390,
1040
389, 384, 379, 378, 377, 372, 371, 370, 369, 368,
1042
367, 366, 365, 364, 363, 362, 361, 358, 356, 355,
1043
353, 351, 350, 349, 310, 348, 346, 345, 344, 342,
1044
341, 340, 338, 337, 336, 335, 334, 332, 331, 330,
1045
328, 327, 326, 325, 323, 311, 322, 321, 318, 317,
1046
313, 316, 312, 309, 308, 307, 306, 305, 304, 299,
1047
296, 298, 294, 293, 292, 291, 289, 287, 286, 285,
1048
283, 281, 279, 276, 275, 274, 272, 269, 268, 266,
1049
264, 263, 261, 258, 256, 254, 251, 250, 248, 240,
1050
238, 232, 231, 232, 231, 230, 229, 1063, 95, 1063,
1051
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
1053
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
1054
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
1055
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
1056
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
1060
static xml_const short int xml__chk[3144] =
1062
0, 3, 3, 3, 4, 4, 4, 5, 5, 5,
1063
6, 6, 6, 9, 763, 3, 10, 11, 4, 12,
1064
9, 5, 762, 10, 6, 7, 7, 7, 8, 8,
1065
8, 13, 13, 11, 357, 12, 13, 13, 357, 7,
1066
14, 14, 8, 225, 13, 14, 14, 15, 15, 233,
1067
15, 100, 15, 14, 16, 16, 225, 16, 578, 16,
1068
15, 17, 17, 18, 18, 100, 101, 16, 19, 19,
1069
19, 20, 20, 20, 23, 23, 23, 24, 24, 24,
1070
101, 234, 19, 587, 234, 20, 587, 578, 23, 233,
1071
17, 24, 18, 21, 21, 21, 21, 21, 21, 21,
1073
21, 21, 21, 21, 21, 21, 245, 21, 21, 21,
1074
21, 21, 98, 98, 98, 99, 99, 99, 103, 103,
1075
103, 245, 692, 21, 21, 22, 22, 22, 22, 22,
1076
22, 22, 22, 22, 22, 22, 22, 22, 628, 22,
1077
22, 22, 22, 22, 25, 25, 25, 26, 26, 26,
1078
27, 27, 27, 692, 104, 22, 22, 252, 25, 128,
1079
300, 26, 300, 139, 27, 28, 28, 28, 104, 125,
1080
125, 125, 628, 128, 132, 132, 132, 139, 252, 28,
1081
29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1082
29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1084
29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1085
29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1086
29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1087
29, 29, 29, 29, 31, 31, 32, 32, 750, 31,
1088
123, 32, 33, 33, 33, 671, 133, 31, 143, 32,
1089
34, 34, 34, 133, 123, 143, 33, 136, 136, 136,
1090
133, 671, 143, 31, 34, 32, 35, 35, 35, 35,
1091
35, 35, 35, 35, 35, 35, 35, 35, 35, 123,
1092
35, 35, 35, 35, 35, 37, 37, 37, 38, 38,
1093
38, 39, 39, 39, 372, 243, 35, 35, 297, 37,
1095
648, 577, 38, 243, 372, 39, 297, 577, 35, 36,
1096
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
1097
36, 36, 648, 36, 36, 36, 36, 36, 40, 40,
1098
40, 41, 41, 41, 42, 42, 42, 546, 429, 36,
1099
36, 592, 40, 669, 592, 41, 546, 150, 42, 429,
1100
547, 36, 43, 43, 43, 44, 44, 44, 147, 147,
1101
147, 150, 154, 154, 154, 669, 43, 749, 547, 44,
1102
45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
1103
45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
1104
45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
1106
45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
1107
45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
1108
45, 45, 45, 45, 47, 47, 48, 48, 689, 47,
1109
161, 48, 49, 49, 49, 736, 155, 47, 165, 48,
1110
50, 50, 50, 155, 161, 165, 49, 158, 158, 158,
1111
155, 689, 165, 47, 50, 48, 51, 51, 51, 51,
1112
51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
1113
51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
1114
51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
1115
51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
1117
51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
1118
53, 53, 53, 54, 54, 54, 55, 55, 55, 56,
1119
56, 56, 615, 673, 53, 786, 667, 54, 773, 773,
1120
55, 786, 171, 56, 57, 57, 57, 58, 58, 58,
1121
59, 59, 59, 60, 60, 60, 171, 688, 57, 673,
1122
690, 58, 615, 668, 59, 667, 184, 60, 61, 61,
1123
61, 62, 62, 62, 63, 63, 63, 64, 64, 64,
1124
184, 668, 61, 795, 690, 62, 688, 734, 63, 668,
1125
795, 64, 65, 65, 65, 65, 65, 65, 65, 65,
1126
65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
1128
65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
1129
65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
1130
65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
1131
65, 65, 65, 65, 65, 65, 67, 67, 67, 68,
1132
68, 68, 69, 69, 69, 70, 70, 70, 691, 822,
1133
67, 696, 695, 68, 721, 739, 69, 726, 199, 70,
1134
71, 71, 71, 72, 72, 72, 73, 73, 73, 74,
1135
74, 74, 199, 739, 71, 822, 696, 72, 691, 726,
1136
73, 695, 208, 74, 75, 75, 75, 76, 76, 76,
1137
168, 168, 168, 176, 176, 176, 208, 720, 75, 622,
1139
693, 76, 77, 77, 77, 77, 77, 77, 77, 77,
1140
77, 77, 77, 77, 77, 481, 77, 77, 77, 77,
1141
77, 81, 81, 81, 82, 82, 82, 481, 670, 79,
1142
79, 693, 77, 77, 79, 81, 622, 722, 82, 181,
1143
181, 181, 79, 670, 77, 78, 78, 78, 78, 78,
1144
78, 78, 78, 78, 78, 78, 78, 78, 79, 78,
1145
78, 78, 78, 78, 80, 80, 87, 87, 87, 80,
1146
88, 88, 88, 722, 178, 78, 78, 80, 193, 797,
1147
87, 178, 718, 717, 88, 193, 797, 78, 178, 190,
1148
190, 190, 193, 80, 83, 83, 83, 83, 83, 83,
1150
83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
1151
83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
1152
83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
1153
83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
1154
83, 83, 83, 83, 83, 83, 83, 83, 85, 85,
1155
86, 86, 704, 85, 788, 86, 196, 196, 196, 218,
1156
788, 85, 730, 86, 205, 205, 205, 215, 215, 215,
1157
224, 224, 224, 218, 437, 437, 437, 85, 730, 86,
1158
89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
1159
89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
1161
89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
1162
89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
1163
89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
1164
89, 89, 89, 89, 91, 91, 92, 92, 114, 91,
1165
134, 92, 130, 156, 145, 177, 166, 91, 803, 92,
1166
702, 701, 177, 179, 134, 803, 130, 156, 145, 177,
1167
166, 708, 192, 91, 114, 92, 194, 179, 191, 114,
1168
130, 130, 114, 145, 166, 191, 192, 114, 130, 203,
1169
194, 213, 191, 134, 708, 130, 156, 710, 177, 694,
1170
179, 192, 700, 203, 709, 213, 744, 191, 315, 315,
1172
315, 316, 316, 316, 694, 192, 320, 320, 320, 194,
1173
213, 191, 202, 711, 315, 203, 744, 316, 710, 202,
1174
729, 709, 320, 324, 324, 324, 202, 321, 321, 321,
1175
325, 325, 325, 316, 329, 329, 329, 765, 794, 324,
1176
202, 202, 711, 321, 794, 729, 325, 765, 202, 202,
1177
329, 202, 330, 330, 330, 202, 439, 439, 439, 321,
1178
333, 333, 333, 334, 334, 334, 742, 672, 330, 339,
1179
339, 339, 325, 340, 340, 340, 333, 713, 724, 334,
1180
343, 343, 343, 672, 742, 339, 344, 344, 344, 340,
1181
347, 347, 347, 348, 348, 348, 343, 767, 672, 330,
1183
713, 724, 344, 727, 340, 714, 347, 767, 334, 348,
1184
352, 352, 352, 353, 353, 353, 373, 373, 373, 374,
1185
374, 374, 376, 376, 376, 698, 352, 714, 741, 353,
1186
707, 348, 373, 344, 745, 374, 727, 714, 376, 377,
1187
377, 377, 380, 380, 380, 707, 697, 353, 381, 381,
1188
381, 383, 383, 383, 377, 384, 384, 384, 380, 385,
1189
385, 385, 743, 741, 381, 745, 759, 383, 753, 376,
1190
384, 386, 386, 386, 752, 385, 388, 388, 388, 391,
1191
391, 391, 383, 392, 392, 392, 752, 386, 393, 393,
1192
393, 743, 388, 686, 391, 395, 395, 395, 759, 392,
1194
396, 396, 396, 753, 393, 397, 397, 397, 398, 398,
1195
398, 395, 399, 399, 399, 396, 388, 401, 401, 401,
1196
397, 404, 404, 404, 398, 406, 406, 406, 399, 405,
1197
405, 405, 777, 401, 784, 834, 404, 407, 407, 407,
1198
395, 406, 772, 777, 405, 409, 409, 409, 411, 411,
1199
411, 834, 784, 407, 412, 412, 412, 413, 413, 413,
1200
754, 409, 401, 411, 415, 415, 415, 417, 417, 417,
1201
412, 772, 754, 413, 418, 418, 418, 419, 419, 419,
1202
415, 776, 417, 421, 421, 421, 423, 423, 423, 779,
1203
418, 776, 409, 419, 685, 424, 424, 424, 684, 421,
1205
779, 423, 425, 425, 425, 426, 426, 426, 764, 415,
1206
424, 428, 428, 428, 430, 430, 430, 785, 425, 681,
1207
764, 426, 443, 443, 443, 712, 728, 428, 785, 421,
1208
430, 430, 444, 444, 444, 445, 445, 445, 443, 445,
1209
712, 728, 445, 446, 446, 446, 807, 444, 680, 835,
1210
428, 679, 807, 443, 448, 448, 448, 789, 446, 449,
1211
449, 449, 450, 450, 450, 835, 450, 789, 837, 450,
1212
448, 451, 451, 451, 449, 453, 453, 453, 454, 454,
1213
454, 798, 454, 808, 837, 454, 678, 451, 896, 808,
1214
453, 780, 798, 448, 455, 455, 455, 456, 456, 456,
1216
457, 457, 457, 780, 457, 823, 896, 457, 675, 781,
1217
455, 782, 456, 799, 451, 458, 458, 458, 459, 459,
1218
459, 781, 459, 782, 799, 459, 460, 460, 460, 783,
1219
458, 823, 455, 463, 463, 463, 464, 464, 464, 838,
1220
464, 783, 460, 464, 465, 465, 465, 800, 463, 466,
1221
466, 466, 663, 466, 897, 838, 466, 460, 800, 465,
1222
467, 467, 467, 468, 468, 468, 469, 469, 469, 809,
1223
469, 662, 897, 469, 932, 809, 467, 801, 468, 470,
1224
470, 470, 472, 472, 472, 473, 473, 473, 801, 473,
1225
810, 932, 473, 900, 790, 470, 810, 472, 474, 474,
1227
474, 476, 476, 476, 790, 467, 477, 477, 477, 805,
1228
477, 900, 787, 477, 474, 831, 476, 478, 478, 478,
1229
805, 479, 479, 479, 787, 479, 831, 470, 479, 489,
1230
489, 489, 478, 480, 480, 480, 483, 483, 483, 490,
1231
490, 490, 492, 492, 492, 474, 496, 496, 496, 480,
1232
814, 791, 483, 497, 497, 497, 814, 497, 661, 792,
1233
497, 791, 496, 500, 500, 500, 501, 501, 501, 792,
1234
501, 843, 480, 501, 503, 503, 503, 843, 500, 504,
1235
504, 504, 846, 504, 796, 483, 504, 507, 507, 507,
1236
503, 508, 508, 508, 796, 496, 660, 509, 509, 509,
1238
844, 509, 879, 507, 509, 503, 508, 512, 512, 512,
1239
513, 513, 513, 846, 513, 825, 844, 513, 516, 516,
1240
516, 811, 516, 512, 847, 516, 507, 519, 519, 519,
1241
522, 522, 522, 811, 522, 879, 820, 522, 525, 525,
1242
525, 825, 525, 519, 849, 525, 820, 845, 512, 528,
1243
528, 528, 529, 529, 529, 847, 529, 816, 658, 529,
1244
532, 532, 532, 845, 816, 528, 533, 533, 533, 657,
1245
534, 534, 534, 817, 534, 849, 532, 534, 818, 519,
1246
817, 533, 537, 537, 537, 818, 868, 528, 819, 539,
1247
539, 539, 532, 539, 656, 819, 539, 824, 537, 542,
1249
542, 542, 868, 542, 824, 655, 542, 545, 545, 545,
1250
549, 549, 549, 550, 550, 550, 552, 552, 552, 553,
1251
553, 553, 862, 545, 555, 555, 555, 556, 556, 556,
1252
557, 556, 558, 557, 556, 558, 557, 862, 558, 654,
1253
555, 653, 557, 557, 558, 558, 560, 560, 560, 561,
1254
561, 561, 562, 562, 562, 565, 565, 565, 555, 563,
1255
563, 563, 560, 563, 901, 561, 563, 562, 564, 564,
1256
564, 565, 566, 566, 566, 567, 567, 567, 568, 568,
1257
568, 859, 901, 561, 564, 569, 569, 569, 859, 850,
1258
567, 560, 651, 869, 568, 570, 570, 570, 571, 571,
1260
571, 569, 571, 650, 564, 571, 572, 572, 572, 869,
1261
570, 574, 574, 574, 575, 575, 575, 579, 579, 579,
1262
850, 860, 572, 580, 580, 580, 574, 880, 826, 568,
1263
575, 832, 569, 581, 581, 581, 582, 582, 582, 584,
1264
584, 584, 596, 596, 596, 597, 597, 597, 833, 598,
1265
598, 598, 860, 598, 826, 584, 598, 832, 596, 631,
1266
880, 597, 601, 601, 601, 602, 602, 602, 604, 604,
1267
604, 605, 605, 605, 833, 606, 606, 606, 601, 606,
1268
912, 602, 606, 607, 607, 607, 605, 608, 608, 608,
1269
609, 609, 609, 851, 609, 861, 597, 609, 912, 607,
1271
612, 612, 612, 608, 613, 613, 613, 630, 613, 629,
1272
627, 613, 614, 614, 614, 612, 616, 616, 616, 851,
1273
618, 618, 618, 633, 633, 633, 861, 870, 614, 635,
1274
635, 635, 636, 636, 636, 608, 618, 852, 853, 633,
1275
638, 638, 638, 870, 638, 635, 863, 638, 636, 641,
1276
641, 641, 643, 643, 643, 644, 644, 644, 854, 644,
1277
626, 863, 644, 852, 853, 641, 866, 867, 643, 649,
1278
649, 649, 664, 664, 664, 666, 666, 666, 674, 674,
1279
674, 866, 867, 986, 854, 687, 687, 687, 664, 855,
1280
856, 666, 705, 705, 705, 986, 857, 643, 647, 647,
1282
647, 687, 715, 715, 715, 723, 723, 723, 705, 666,
1283
725, 725, 725, 877, 647, 855, 856, 715, 715, 625,
1284
914, 723, 857, 737, 737, 737, 725, 914, 877, 647,
1285
647, 731, 731, 731, 738, 738, 738, 647, 647, 737,
1286
647, 732, 732, 732, 647, 732, 731, 731, 732, 878,
1287
738, 740, 740, 740, 746, 746, 746, 732, 746, 624,
1288
738, 746, 858, 623, 878, 864, 883, 740, 884, 885,
1289
746, 751, 751, 751, 755, 755, 755, 740, 747, 747,
1290
747, 747, 747, 747, 747, 747, 747, 751, 858, 747,
1291
755, 864, 747, 747, 747, 747, 747, 751, 621, 883,
1293
885, 884, 894, 756, 756, 756, 871, 872, 747, 747,
1294
748, 748, 748, 748, 748, 748, 748, 748, 748, 756,
1295
865, 748, 871, 872, 748, 748, 748, 748, 748, 757,
1296
757, 757, 758, 758, 758, 894, 620, 886, 887, 888,
1297
748, 748, 766, 766, 766, 757, 865, 910, 758, 760,
1298
760, 760, 760, 760, 760, 760, 760, 760, 766, 990,
1299
760, 873, 874, 760, 760, 760, 760, 760, 886, 887,
1300
888, 990, 617, 910, 768, 768, 768, 873, 874, 760,
1301
760, 761, 761, 761, 761, 761, 761, 761, 761, 761,
1302
768, 889, 761, 911, 875, 761, 761, 761, 761, 761,
1304
768, 769, 769, 769, 770, 770, 770, 771, 771, 771,
1305
875, 761, 761, 778, 778, 778, 881, 769, 890, 911,
1306
770, 882, 889, 771, 793, 793, 793, 769, 891, 778,
1307
770, 595, 881, 771, 802, 802, 802, 882, 913, 778,
1308
793, 804, 804, 804, 892, 806, 806, 806, 898, 890,
1309
802, 812, 812, 812, 899, 594, 913, 804, 915, 891,
1310
802, 806, 813, 813, 813, 915, 813, 812, 902, 813,
1311
815, 815, 815, 895, 815, 892, 938, 815, 813, 898,
1312
821, 821, 821, 902, 821, 899, 815, 821, 827, 827,
1313
827, 828, 828, 828, 938, 928, 821, 829, 829, 829,
1315
830, 830, 830, 939, 827, 918, 895, 828, 836, 836,
1316
836, 928, 918, 829, 903, 929, 830, 904, 839, 839,
1317
839, 939, 839, 940, 836, 839, 840, 840, 840, 903,
1318
840, 929, 904, 840, 839, 905, 841, 841, 841, 941,
1319
841, 940, 840, 841, 842, 842, 842, 920, 842, 921,
1320
905, 842, 841, 906, 848, 848, 848, 941, 848, 907,
1321
842, 848, 876, 876, 876, 893, 893, 893, 906, 893,
1322
848, 908, 893, 909, 907, 916, 917, 919, 876, 922,
1323
920, 893, 921, 923, 919, 924, 908, 925, 909, 926,
1324
916, 917, 927, 930, 931, 934, 933, 935, 936, 942,
1326
930, 931, 937, 943, 946, 944, 945, 947, 950, 948,
1327
949, 951, 922, 933, 952, 936, 923, 942, 924, 937,
1328
925, 943, 926, 944, 945, 927, 948, 949, 934, 953,
1329
935, 954, 952, 955, 956, 946, 957, 958, 947, 950,
1330
966, 956, 951, 957, 958, 959, 960, 953, 961, 962,
1331
963, 964, 959, 960, 965, 961, 962, 963, 967, 968,
1332
969, 970, 954, 971, 955, 972, 964, 973, 970, 965,
1333
971, 966, 982, 974, 975, 976, 968, 969, 977, 978,
1334
979, 980, 972, 981, 973, 983, 984, 985, 992, 967,
1335
974, 975, 976, 987, 988, 977, 978, 979, 980, 989,
1337
981, 991, 987, 984, 985, 982, 993, 994, 995, 996,
1338
991, 988, 997, 998, 999, 1000, 989, 1001, 983, 992,
1339
1002, 1003, 1005, 1006, 1016, 1004, 1004, 1004, 593, 1017,
1340
1003, 1016, 1002, 1000, 1008, 1001, 1017, 993, 994, 995,
1341
996, 1004, 1009, 997, 998, 999, 1007, 1007, 1007, 1010,
1342
1011, 1008, 1012, 1005, 1006, 1013, 1014, 1015, 1025, 1009,
1343
591, 1021, 1007, 1018, 1018, 1018, 1010, 1011, 1022, 1012,
1344
1025, 590, 1013, 1014, 1015, 1019, 1019, 1019, 1021, 1018,
1345
1023, 1023, 1023, 1026, 1028, 1022, 1027, 1029, 1030, 1031,
1346
1033, 1019, 1026, 1028, 1032, 1034, 1023, 1030, 1027, 1029,
1348
1038, 1031, 1037, 1032, 1035, 1035, 1035, 1033, 1043, 1038,
1349
1044, 589, 1034, 1054, 1037, 1039, 1039, 1039, 1055, 588,
1350
1035, 1040, 1040, 1040, 1041, 1041, 1041, 1042, 1042, 1042,
1351
1054, 1039, 1045, 1045, 1045, 1055, 586, 1040, 585, 1043,
1352
1041, 1044, 583, 1042, 1046, 1046, 1046, 1058, 1045, 1048,
1353
1048, 1048, 1050, 1050, 1050, 1052, 1052, 1052, 1059, 1058,
1354
1046, 1056, 1056, 1056, 559, 1048, 554, 1059, 1050, 551,
1355
538, 1052, 1060, 1060, 1060, 521, 520, 1056, 1061, 1061,
1356
1061, 502, 495, 494, 493, 491, 488, 485, 1060, 482,
1357
475, 471, 462, 461, 1061, 1064, 1064, 1064, 1064, 1064,
1359
1064, 1064, 1065, 1065, 1065, 1065, 1065, 1065, 1065, 1066,
1360
1066, 1066, 1066, 1066, 1066, 1066, 1067, 1067, 1067, 1067,
1361
1067, 1067, 1067, 1068, 1068, 1068, 1068, 1068, 1068, 1068,
1362
1069, 1069, 1069, 1069, 1069, 1069, 1069, 1070, 1070, 1070,
1363
1070, 1070, 1070, 1070, 1071, 1071, 1071, 1071, 1071, 1071,
1364
1071, 1072, 1072, 1072, 1072, 1072, 1072, 1072, 1073, 1073,
1365
1073, 1073, 1073, 1073, 1073, 1074, 1074, 1074, 1074, 1074,
1366
1074, 1074, 1075, 1075, 1075, 1075, 1075, 1075, 1075, 1076,
1367
1076, 1076, 1076, 1076, 1076, 1076, 1077, 1077, 1077, 1077,
1368
1077, 1077, 1077, 1078, 1078, 1078, 1078, 1078, 1078, 1078,
1370
1079, 1079, 1079, 452, 1079, 1080, 1080, 1080, 447, 1080,
1371
1081, 1081, 1081, 442, 1081, 1082, 1082, 1082, 441, 1082,
1372
1083, 1083, 1083, 440, 1083, 1084, 1084, 1084, 438, 1084,
1373
1085, 1085, 1085, 436, 1085, 1086, 1086, 1086, 435, 1086,
1374
1087, 1087, 1087, 434, 1087, 1088, 1088, 1088, 1088, 1088,
1375
433, 1088, 1089, 422, 1089, 1090, 416, 1090, 1091, 410,
1376
1091, 1092, 403, 1092, 1093, 402, 1093, 1094, 390, 1094,
1377
1095, 389, 1095, 1096, 379, 1096, 1097, 378, 1097, 1098,
1378
1098, 1098, 1098, 1098, 1098, 1098, 1099, 371, 370, 1099,
1379
1100, 1100, 1100, 1100, 1100, 1100, 1101, 1101, 1101, 1101,
1381
1101, 1101, 1102, 1102, 1102, 1102, 1102, 1102, 1103, 1103,
1382
1103, 1103, 1103, 1103, 1104, 1104, 1104, 1104, 1104, 1104,
1383
1105, 1105, 1105, 1105, 1105, 1105, 1106, 1106, 1106, 1106,
1384
1106, 1106, 1107, 1107, 1107, 1107, 1107, 1107, 1108, 1108,
1385
1108, 1108, 1108, 1108, 1109, 1109, 1109, 1109, 1109, 1109,
1386
1109, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1111, 1111,
1387
1111, 1111, 1111, 1111, 1111, 369, 368, 367, 366, 365,
1388
362, 361, 360, 358, 354, 351, 350, 349, 346, 345,
1389
342, 341, 338, 337, 336, 335, 332, 331, 328, 327,
1390
326, 323, 319, 318, 317, 314, 313, 312, 311, 310,
1392
309, 308, 306, 305, 304, 303, 302, 298, 296, 295,
1393
294, 293, 292, 291, 288, 287, 286, 285, 282, 281,
1394
278, 277, 276, 275, 274, 271, 270, 269, 268, 265,
1395
264, 263, 260, 259, 258, 255, 254, 253, 251, 250,
1396
247, 246, 244, 242, 239, 238, 237, 236, 235, 229,
1397
228, 226, 223, 222, 221, 220, 216, 212, 211, 210,
1398
206, 201, 197, 188, 187, 186, 182, 174, 173, 169,
1399
164, 163, 159, 152, 148, 144, 142, 141, 137, 126,
1400
121, 120, 119, 113, 112, 110, 107, 95, 1063, 1063,
1401
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
1403
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
1404
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
1405
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
1406
1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
1410
static xml__state_type xml__last_accepting_state;
1411
static char *xml__last_accepting_cpos;
1413
/* The intent behind this definition is that it'll catch
1414
* any uses of REJECT which flex missed.
1416
#define REJECT reject_used_but_not_detected
1417
#define xml_more() xml_more_used_but_not_detected
1418
#define XML__MORE_ADJ 0
1419
#define XML__RESTORE_XML__MORE_OFFSET
1421
#line 1 "xmltree_read.l"
1423
/* Validating XML processor for octave.dtd.
1424
* Generated 2004/02/13 14:47:24.
1426
* This program was generated with the FleXML XML processor generator,
1427
* (Id: flexml.pl,v 1.28 2003/02/12 02:55:41 krisrose Exp).
1428
* Copyright � 1999 Kristoffer Rose. All rights reserved.
1430
* You can redistribute and/or modify this program provided the following
1431
* two conditions hold:
1433
* 1. The program is distributed WITHOUT ANY WARRANTY from the author of
1434
* FleXML; without even the implied warranty of MERCHANTABILITY or
1435
* FITNESS FOR A PARTICULAR PURPOSE.
1437
* 2. The program distribution conditions do not in any way affect the
1438
* distribution conditions of the FleXML system used to generate this
1439
* file or any version of FleXML derived from that system.
1441
* Notice that these are explicit rights granted to you for files
1442
* generated by the FleXML system. For your rights in connection with
1443
* the FleXML system itself please consult the GNU General Public License.
1445
#line 25 "xmltree_read.l"
1447
/* Version strings. */
1448
const char rcs_flexml_skeleton[] =
1449
"$" "Id: skel,v 1.16 1999/12/09 04:01:51 krisrose Exp $";
1450
const char rcs_flexml[] =
1451
"$" "Id: flexml.pl,v 1.28 2003/02/12 02:55:41 krisrose Exp $";
1461
/* Generated definitions. */
1462
#define FLEXML_BUFFERSTACKSIZE 100000
1464
/* XML application entry points. */
1465
static void STag_octave(void);
1466
static void ETag_octave(void);
1467
static void STag_scalar(void);
1468
static void ETag_scalar(void);
1469
static void STag_complex(void);
1470
static void ETag_complex(void);
1471
static void STag_string(void);
1472
static void ETag_string(void);
1473
static void STag_array(void);
1474
static void ETag_array(void);
1475
static void STag_matrix(void);
1476
static void ETag_matrix(void);
1477
static void STag_structure(void);
1478
static void ETag_structure(void);
1479
static void STag_list(void);
1480
static void ETag_list(void);
1481
static void STag_cell(void);
1482
static void ETag_cell(void);
1484
/* XML application data. */
1485
typedef char* AT_list_length;
1486
#define AU_list_length NULL
1487
typedef char* AT_matrix_rows;
1488
#define AU_matrix_rows NULL
1489
typedef char* AT_matrix_name;
1490
#define AU_matrix_name NULL
1491
typedef char* AT_cell_columns;
1492
#define AU_cell_columns NULL
1493
typedef char* AT_scalar_name;
1494
#define AU_scalar_name NULL
1495
typedef char* AT_array_name;
1496
#define AU_array_name NULL
1497
typedef char* AT_complex_name;
1498
#define AU_complex_name NULL
1499
typedef char* AT_matrix_columns;
1500
#define AU_matrix_columns NULL
1501
typedef char* AT_cell_name;
1502
#define AU_cell_name NULL
1503
typedef char* AT_string_length;
1504
#define AU_string_length NULL
1505
typedef char* AT_list_name;
1506
#define AU_list_name NULL
1507
typedef enum { AU_scalar_value, A_scalar_value_undefined,A_scalar_value_true,A_scalar_value_false,A_scalar_value_inf,A_scalar_value_neginf,A_scalar_value_na,A_scalar_value_nan } AT_scalar_value;
1508
typedef char* AT_structure_name;
1509
#define AU_structure_name NULL
1510
typedef char* AT_cell_rows;
1511
#define AU_cell_rows NULL
1512
typedef char* AT_array_rows;
1513
#define AU_array_rows NULL
1514
typedef char* AT_string_name;
1515
#define AU_string_name NULL
1517
/* FleXML-provided data. */
1518
static char* pcdata;
1519
static AT_list_length A_list_length;
1520
static AT_matrix_rows A_matrix_rows;
1521
static AT_matrix_name A_matrix_name;
1522
static AT_cell_columns A_cell_columns;
1523
static AT_scalar_name A_scalar_name;
1524
static AT_array_name A_array_name;
1525
static AT_complex_name A_complex_name;
1526
static AT_matrix_columns A_matrix_columns;
1527
static AT_cell_name A_cell_name;
1528
static AT_string_length A_string_length;
1529
static AT_list_name A_list_name;
1530
static AT_scalar_value A_scalar_value;
1531
static AT_structure_name A_structure_name;
1532
static AT_cell_rows A_cell_rows;
1533
static AT_array_rows A_array_rows;
1534
static AT_string_name A_string_name;
1538
# define ENTER(state) debug_enter(state,#state)
1539
# define LEAVE debug_leave()
1540
# define SET(state) debug_set(state,#state)
1541
static void debug_enter(int, char*);
1542
static void debug_leave(void);
1543
static void debug_set(int, char*);
1545
# define ENTER(state) (xml__push_state(state))
1546
# define LEAVE (xml__pop_state())
1547
# define SET(state) BEGIN(state)
1550
/* Generic actions. */
1551
#define SKIP /*skip*/
1552
#define SUCCEED return 0
1554
#define FAIL return fail
1555
static int fail(const char*, ...);
1557
/* Text buffer stack handling. */
1558
char bufferstack[FLEXML_BUFFERSTACKSIZE];
1559
char* limit = bufferstack + FLEXML_BUFFERSTACKSIZE;
1560
typedef struct BufferLast_s {
1561
struct BufferLast_s *old; char* saved; char new[1];
1563
BufferLast* last = (BufferLast*)0;
1564
char* next = bufferstack;
1566
#define BUFFERSET(P) (P = next)
1567
#define BUFFERPUTC(C) (assert(next<limit), *(next++) = (C))
1568
#define BUFFERDONE (BUFFERPUTC('\0'))
1570
#define BUFFERLITERAL(C,P) bufferliteral(C,&(P),xml_text)
1571
static void bufferliteral(char c, char** pp, char* text)
1573
char *s = strchr(text,c), *e = strrchr(text,c);
1574
assert(s <= e); BUFFERSET(*pp);
1576
if (isspace(*s)) { BUFFERPUTC(' '); while (isspace(*s)) ++s; }
1577
else BUFFERPUTC(*s);
1582
#ifdef FLEXML_HasMixed
1583
static void pushbuffer(char* p)
1585
BufferLast* l = (BufferLast*)next;
1586
assert(next < limit);
1593
static char* popbuffer(void)
1595
BufferLast* l = last;
1596
assert(last != (BufferLast*)0);
1603
/* General internal entities are `unput' back onto the input stream... */
1604
#define ENTITYTEXT(T) \
1605
{ char *s = (T), *e = s+strlen(s);\
1606
while (--e >= s) { unput(*e); }}
1607
/* Flex standard options. */
1608
#define XML__STACK_USED 1
1609
#define XML__NO_TOP_STATE 1
1610
#define XML__NO_INPUT 1
1611
/* Flex user-requested options. */
1612
#define XML__NO_UNPUT 1
1613
/* XML character classes (currently restricted to ASCII). */
1614
/* "Common syntactic structures." */
1615
/* "Names and Tokens." */
1616
/* Miscellaneous. */
1617
/* Parser states (flex `exclusive start conditions'):
1619
* PROLOG the XML prolog of the document before <?xml...>
1620
* DOCTYPE the XML prolog of the document after <?xml...>
1621
* EPILOG after the root element
1622
* INCOMMENT inside an XML comment <!--....-->
1623
* INPI inside an XML PI <?...?>
1624
* VALUE1 inside a '...'-delimited literal
1625
* VALUE2 inside a "..."-delimited literal
1626
* CDATA inside a <![CDATA[...]]> section.
1627
* ROOT_<tag> expect root element <tag>
1628
* AL_<tag> inside the attribute list for <tag>
1629
* IN_<tag> inside a <tag> with element contents (ready for end tag)
1630
* IMPOSSIBLE dummy to permit disabling rules; must be last
1641
#define ROOT_octave 9
1642
#define AL_octave 10
1646
#define ROOT_scalar 13
1647
#define AL_scalar 14
1648
#define IN_scalar 15
1650
#define ROOT_complex 16
1651
#define AL_complex 17
1652
#define S_complex 18
1653
#define S_complex_1 19
1654
#define E_complex 20
1656
#define ROOT_string 21
1657
#define AL_string 22
1658
#define IN_string 23
1660
#define ROOT_array 24
1663
#define S_array_1 27
1664
#define S_array_2 28
1665
#define S_array_3 29
1668
#define ROOT_matrix 31
1669
#define AL_matrix 32
1671
#define S_matrix_1 34
1672
#define S_matrix_2 35
1675
#define ROOT_structure 37
1676
#define AL_structure 38
1677
#define IN_structure 39
1679
#define ROOT_list 40
1683
#define ROOT_cell 43
1687
#define IMPOSSIBLE 46
1689
#line 245 "xmltree_read.l"
1691
char* statenames[IMPOSSIBLE];
1693
void FleXML_init(void)
1695
statenames[PROLOG] = NULL;
1696
statenames[DOCTYPE] = NULL;
1697
statenames[EPILOG] = NULL;
1698
statenames[INCOMMENT] = NULL;
1699
statenames[INPI] = NULL;
1700
statenames[VALUE1] = NULL;
1701
statenames[VALUE2] = NULL;
1702
statenames[CDATA] = NULL;
1703
statenames[ROOT_octave] = NULL;
1704
statenames[AL_octave] = NULL;
1705
statenames[S_octave] = "octave";
1706
statenames[E_octave] = "octave";
1707
statenames[ROOT_scalar] = NULL;
1708
statenames[AL_scalar] = NULL;
1709
statenames[IN_scalar] = "scalar";
1710
statenames[ROOT_complex] = NULL;
1711
statenames[AL_complex] = NULL;
1712
statenames[S_complex] = "complex";
1713
statenames[S_complex_1] = "complex";
1714
statenames[E_complex] = "complex";
1715
statenames[ROOT_string] = NULL;
1716
statenames[AL_string] = NULL;
1717
statenames[IN_string] = "string";
1718
statenames[ROOT_array] = NULL;
1719
statenames[AL_array] = NULL;
1720
statenames[S_array] = "array";
1721
statenames[S_array_1] = "array";
1722
statenames[S_array_2] = "array";
1723
statenames[S_array_3] = "array";
1724
statenames[E_array] = "array";
1725
statenames[ROOT_matrix] = NULL;
1726
statenames[AL_matrix] = NULL;
1727
statenames[S_matrix] = "matrix";
1728
statenames[S_matrix_1] = "matrix";
1729
statenames[S_matrix_2] = "matrix";
1730
statenames[E_matrix] = "matrix";
1731
statenames[ROOT_structure] = NULL;
1732
statenames[AL_structure] = NULL;
1733
statenames[IN_structure] = "structure";
1734
statenames[ROOT_list] = NULL;
1735
statenames[AL_list] = NULL;
1736
statenames[IN_list] = "list";
1737
statenames[ROOT_cell] = NULL;
1738
statenames[AL_cell] = NULL;
1739
statenames[IN_cell] = "cell";
1742
/* Macros after this point can all be overridden by user definitions in
1746
#ifndef XML__SKIP_XML_WRAP
1748
extern "C" int xml_wrap XML__PROTO(( void ));
1750
extern int xml_wrap XML__PROTO(( void ));
1754
#ifndef XML__NO_UNPUT
1755
static void xml_unput XML__PROTO(( int c, char *buf_ptr ));
1758
#ifndef xml_text_ptr
1759
static void xml__flex_strncpy XML__PROTO(( char *, xml_const char *, int ));
1762
#ifdef XML__NEED_STRLEN
1763
static int xml__flex_strlen XML__PROTO(( xml_const char * ));
1766
#ifndef XML__NO_INPUT
1768
static int xml_input XML__PROTO(( void ));
1770
static int input XML__PROTO(( void ));
1775
static int xml__start_stack_ptr = 0;
1776
static int xml__start_stack_depth = 0;
1777
static int *xml__start_stack = 0;
1778
#ifndef XML__NO_PUSH_STATE
1779
static void xml__push_state XML__PROTO(( int new_state ));
1781
#ifndef XML__NO_POP_STATE
1782
static void xml__pop_state XML__PROTO(( void ));
1784
#ifndef XML__NO_TOP_STATE
1785
static int xml__top_state XML__PROTO(( void ));
1789
#define XML__NO_PUSH_STATE 1
1790
#define XML__NO_POP_STATE 1
1791
#define XML__NO_TOP_STATE 1
1794
#ifdef XML__MALLOC_DECL
1802
/* Just try to get by without declaring the routines. This will fail
1803
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
1804
* or sizeof(void*) != sizeof(int).
1809
/* Amount of stuff to slurp up with each read. */
1810
#ifndef XML__READ_BUF_SIZE
1811
#define XML__READ_BUF_SIZE 8192
1814
/* Copy whatever the last rule matched to the standard output. */
1817
/* This used to be an fputs(), but since the string might contain NUL's,
1818
* we now use fwrite().
1820
#define ECHO (void) fwrite( xml_text, xml_leng, 1, xml_out )
1823
/* Gets input and stuffs it into "buf". number of characters read, or XML__NULL,
1824
* is returned in "result".
1827
#define XML__INPUT(buf,result,max_size) \
1828
if ( xml__current_buffer->xml__is_interactive ) \
1831
for ( n = 0; n < max_size && \
1832
(c = getc( xml_in )) != EOF && c != '\n'; ++n ) \
1833
buf[n] = (char) c; \
1835
buf[n++] = (char) c; \
1836
if ( c == EOF && ferror( xml_in ) ) \
1837
XML__FATAL_ERROR( "input in flex scanner failed" ); \
1843
while ( (result = fread(buf, 1, max_size, xml_in))==0 && ferror(xml_in)) \
1845
if( errno != EINTR) \
1847
XML__FATAL_ERROR( "input in flex scanner failed" ); \
1856
/* No semi-colon after return; correct usage is to write "xml_terminate();" -
1857
* we don't want an extra ';' after the "return" because that will cause
1858
* some compilers to complain about unreachable statements.
1860
#ifndef xml_terminate
1861
#define xml_terminate() return XML__NULL
1864
/* Number of entries by which start-condition stack grows. */
1865
#ifndef XML__START_STACK_INCR
1866
#define XML__START_STACK_INCR 25
1869
/* Report a fatal error. */
1870
#ifndef XML__FATAL_ERROR
1871
#define XML__FATAL_ERROR(msg) xml__fatal_error( msg )
1874
/* Default declaration of generated scanner - a define so the user can
1875
* easily add parameters.
1878
#define XML__DECL int xml_lex XML__PROTO(( void ))
1881
/* Code executed at the beginning of each rule, after xml_text and xml_leng
1884
#ifndef XML__USER_ACTION
1885
#define XML__USER_ACTION
1888
/* Code executed at the end of each rule. */
1890
#define XML__BREAK break;
1893
#define XML__RULE_SETUP \
1898
register xml__state_type xml__current_state;
1899
register char *xml__cp, *xml__bp;
1900
register int xml__act;
1902
#line 298 "xmltree_read.l"
1905
/* Bypass Flex's default INITIAL state and begin by parsing the XML prolog. */
1906
SET(PROLOG); FleXML_init();
1908
/* COMMENTS and PIs: handled uniformly for efficiency. */
1915
#ifdef XML__USER_INIT
1920
xml__start = 1; /* first start state */
1928
if ( ! xml__current_buffer )
1929
xml__current_buffer =
1930
xml__create_buffer( xml_in, XML__BUF_SIZE );
1932
xml__load_buffer_state();
1935
while ( 1 ) /* loops until end-of-file is reached */
1937
xml__cp = xml__c_buf_p;
1939
/* Support of xml_text. */
1940
*xml__cp = xml__hold_char;
1942
/* xml__bp points to the position in xml__ch_buf of the start of
1947
xml__current_state = xml__start;
1951
register XML__CHAR xml__c = xml__ec[XML__SC_TO_UI(*xml__cp)];
1952
if ( xml__accept[xml__current_state] )
1954
xml__last_accepting_state = xml__current_state;
1955
xml__last_accepting_cpos = xml__cp;
1957
while ( xml__chk[xml__base[xml__current_state] + xml__c] != xml__current_state )
1959
xml__current_state = (int) xml__def[xml__current_state];
1960
if ( xml__current_state >= 1064 )
1961
xml__c = xml__meta[(unsigned int) xml__c];
1963
xml__current_state = xml__nxt[xml__base[xml__current_state] + (unsigned int) xml__c];
1966
while ( xml__base[xml__current_state] != 3089 );
1969
xml__act = xml__accept[xml__current_state];
1970
if ( xml__act == 0 )
1971
{ /* have to back up */
1972
xml__cp = xml__last_accepting_cpos;
1973
xml__current_state = xml__last_accepting_state;
1974
xml__act = xml__accept[xml__current_state];
1977
XML__DO_BEFORE_ACTION;
1980
do_action: /* This label is used only to access EOF actions. */
1984
{ /* beginning of action switch */
1985
case 0: /* must back up */
1986
/* undo the effects of XML__DO_BEFORE_ACTION */
1987
*xml__cp = xml__hold_char;
1988
xml__cp = xml__last_accepting_cpos;
1989
xml__current_state = xml__last_accepting_state;
1990
goto xml__find_action;
1995
#line 306 "xmltree_read.l"
2000
#line 307 "xmltree_read.l"
2007
#line 310 "xmltree_read.l"
2011
#line 312 "xmltree_read.l"
2013
#line 313 "xmltree_read.l"
2016
#line 313 "xmltree_read.l"
2019
case XML__STATE_EOF(INCOMMENT):
2020
#line 314 "xmltree_read.l"
2021
FAIL("EOF in comment.");
2027
#line 317 "xmltree_read.l"
2031
#line 319 "xmltree_read.l"
2034
#line 319 "xmltree_read.l"
2037
case XML__STATE_EOF(INPI):
2038
#line 320 "xmltree_read.l"
2039
FAIL("EOF in PI (processing instruction).");
2042
/* SPACES: skipped uniformly */
2045
#line 325 "xmltree_read.l"
2048
/* PROLOG: determine root element and process it. */
2052
#line 330 "xmltree_read.l"
2057
#line 331 "xmltree_read.l"
2058
FAIL("Bad declaration %s.",xml_text);
2064
#line 335 "xmltree_read.l"
2069
#line 336 "xmltree_read.l"
2074
#line 337 "xmltree_read.l"
2079
#line 338 "xmltree_read.l"
2084
#line 339 "xmltree_read.l"
2089
#line 340 "xmltree_read.l"
2094
#line 341 "xmltree_read.l"
2095
SET(ROOT_structure);
2099
#line 342 "xmltree_read.l"
2104
#line 343 "xmltree_read.l"
2109
#line 344 "xmltree_read.l"
2110
FAIL("Bad declaration %s.",xml_text);
2114
#line 345 "xmltree_read.l"
2115
FAIL("Unexpected character `%c' in prolog.", xml_text[0]);
2117
case XML__STATE_EOF(PROLOG):
2118
case XML__STATE_EOF(DOCTYPE):
2119
#line 346 "xmltree_read.l"
2120
FAIL("EOF in prolog.");
2123
/* RULES DERIVED FROM DTD. */
2126
#line 351 "xmltree_read.l"
2134
#line 356 "xmltree_read.l"
2136
LEAVE; STag_octave(); pcdata = NULL; ENTER(S_octave);
2141
#line 359 "xmltree_read.l"
2142
FAIL("`octave' element cannot be empty.");
2146
#line 360 "xmltree_read.l"
2147
FAIL("Unexpected character `%c' in attribute list of octave element.", xml_text[0]);
2151
#line 361 "xmltree_read.l"
2152
FAIL("Bad attribute `%s' in `octave' element start tag.",xml_text);
2154
case XML__STATE_EOF(AL_octave):
2155
#line 362 "xmltree_read.l"
2156
FAIL("EOF in attribute list of `octave' element.");
2162
#line 366 "xmltree_read.l"
2166
switch (XML__START) {
2167
case ROOT_octave: SET(EPILOG); break;
2173
#line 373 "xmltree_read.l"
2174
FAIL("Unexpected end-tag `%s': `</octave>' expected.",xml_text);
2178
#line 374 "xmltree_read.l"
2179
FAIL("Unexpected character `%c': `</octave>' expected.",xml_text[0]);
2181
case XML__STATE_EOF(E_octave):
2182
#line 375 "xmltree_read.l"
2183
FAIL("Premature EOF: `</octave>' expected.");
2186
/* value (undefined | true | false | inf | neginf | na | nan) "undefined"
2187
* name CDATA #IMPLIED> */
2190
#line 381 "xmltree_read.l"
2192
A_scalar_value = A_scalar_value_undefined;
2193
A_scalar_name = NULL;
2199
#line 389 "xmltree_read.l"
2202
#line 389 "xmltree_read.l"
2203
A_scalar_value = A_scalar_value_undefined;
2206
#line 391 "xmltree_read.l"
2209
#line 391 "xmltree_read.l"
2210
A_scalar_value = A_scalar_value_true;
2213
#line 393 "xmltree_read.l"
2216
#line 393 "xmltree_read.l"
2217
A_scalar_value = A_scalar_value_false;
2220
#line 395 "xmltree_read.l"
2223
#line 395 "xmltree_read.l"
2224
A_scalar_value = A_scalar_value_inf;
2227
#line 397 "xmltree_read.l"
2230
#line 397 "xmltree_read.l"
2231
A_scalar_value = A_scalar_value_neginf;
2234
#line 399 "xmltree_read.l"
2237
#line 399 "xmltree_read.l"
2238
A_scalar_value = A_scalar_value_na;
2241
#line 401 "xmltree_read.l"
2244
#line 401 "xmltree_read.l"
2245
A_scalar_value = A_scalar_value_nan;
2249
#line 403 "xmltree_read.l"
2250
ENTER(VALUE1); BUFFERSET(A_scalar_name);
2254
#line 404 "xmltree_read.l"
2255
ENTER(VALUE2); BUFFERSET(A_scalar_name);
2259
#line 406 "xmltree_read.l"
2261
LEAVE; STag_scalar(); pcdata = BUFFERSET(pcdata); ENTER(IN_scalar);
2266
#line 409 "xmltree_read.l"
2268
LEAVE; STag_scalar(); pcdata = ""; ETag_scalar();
2269
switch (XML__START) {
2270
case S_complex_1: SET(E_complex); break;
2271
case S_octave: SET(E_octave); break;
2272
case S_complex: SET(S_complex_1); break;
2273
case S_matrix_1: case S_matrix: case S_matrix_2: SET(S_matrix_2); break;
2274
case ROOT_scalar: SET(EPILOG); break;
2280
#line 419 "xmltree_read.l"
2281
FAIL("Unexpected character `%c' in attribute list of scalar element.", xml_text[0]);
2285
#line 420 "xmltree_read.l"
2286
FAIL("Bad attribute `%s' in `scalar' element start tag.",xml_text);
2288
case XML__STATE_EOF(AL_scalar):
2289
#line 421 "xmltree_read.l"
2290
FAIL("EOF in attribute list of `scalar' element.");
2296
#line 425 "xmltree_read.l"
2301
switch (XML__START) {
2302
case S_complex_1: SET(E_complex); break;
2303
case S_octave: SET(E_octave); break;
2304
case S_complex: SET(S_complex_1); break;
2305
case S_matrix_1: case S_matrix: case S_matrix_2: SET(S_matrix_2); break;
2306
case ROOT_scalar: SET(EPILOG); break;
2312
#line 437 "xmltree_read.l"
2313
FAIL("Unexpected end-tag `%s': `</scalar>' expected.",xml_text);
2315
case XML__STATE_EOF(IN_scalar):
2316
#line 438 "xmltree_read.l"
2317
FAIL("Premature EOF: `</scalar>' expected.");
2322
#line 441 "xmltree_read.l"
2324
A_complex_name = NULL;
2331
#line 447 "xmltree_read.l"
2332
ENTER(VALUE1); BUFFERSET(A_complex_name);
2336
#line 448 "xmltree_read.l"
2337
ENTER(VALUE2); BUFFERSET(A_complex_name);
2341
#line 450 "xmltree_read.l"
2343
LEAVE; STag_complex(); pcdata = NULL; ENTER(S_complex);
2348
#line 453 "xmltree_read.l"
2349
FAIL("`complex' element cannot be empty.");
2353
#line 454 "xmltree_read.l"
2354
FAIL("Unexpected character `%c' in attribute list of complex element.", xml_text[0]);
2358
#line 455 "xmltree_read.l"
2359
FAIL("Bad attribute `%s' in `complex' element start tag.",xml_text);
2361
case XML__STATE_EOF(AL_complex):
2362
#line 456 "xmltree_read.l"
2363
FAIL("EOF in attribute list of `complex' element.");
2369
#line 460 "xmltree_read.l"
2373
switch (XML__START) {
2374
case S_octave: SET(E_octave); break;
2375
case S_matrix_1: case S_matrix: case S_matrix_2: SET(S_matrix_2); break;
2376
case ROOT_complex: SET(EPILOG); break;
2382
#line 469 "xmltree_read.l"
2383
FAIL("Unexpected end-tag `%s': `</complex>' expected.",xml_text);
2387
#line 470 "xmltree_read.l"
2388
FAIL("Unexpected character `%c': `</complex>' expected.",xml_text[0]);
2390
case XML__STATE_EOF(E_complex):
2391
#line 471 "xmltree_read.l"
2392
FAIL("Premature EOF: `</complex>' expected.");
2395
/* length CDATA #REQUIRED
2396
* name CDATA #IMPLIED> */
2399
#line 477 "xmltree_read.l"
2401
A_string_length = NULL;
2402
A_string_name = NULL;
2409
#line 484 "xmltree_read.l"
2410
ENTER(VALUE1); BUFFERSET(A_string_length);
2414
#line 485 "xmltree_read.l"
2415
ENTER(VALUE2); BUFFERSET(A_string_length);
2419
#line 487 "xmltree_read.l"
2420
ENTER(VALUE1); BUFFERSET(A_string_name);
2424
#line 488 "xmltree_read.l"
2425
ENTER(VALUE2); BUFFERSET(A_string_name);
2429
#line 490 "xmltree_read.l"
2431
if (!A_string_length) FAIL("Required attribute `length' not set for `string' element.");
2432
LEAVE; STag_string(); pcdata = BUFFERSET(pcdata); ENTER(IN_string);
2437
#line 494 "xmltree_read.l"
2439
if (!A_string_length) FAIL("Required attribute `length' not set for `string' element.");
2440
LEAVE; STag_string(); pcdata = ""; ETag_string();
2441
switch (XML__START) {
2442
case S_octave: SET(E_octave); break;
2443
case S_array_2: case S_array_3: case S_array_1: SET(S_array_3); break;
2444
case ROOT_string: SET(EPILOG); break;
2445
case S_array: SET(S_array_1); break;
2451
#line 504 "xmltree_read.l"
2452
FAIL("Unexpected character `%c' in attribute list of string element.", xml_text[0]);
2456
#line 505 "xmltree_read.l"
2457
FAIL("Bad attribute `%s' in `string' element start tag.",xml_text);
2459
case XML__STATE_EOF(AL_string):
2460
#line 506 "xmltree_read.l"
2461
FAIL("EOF in attribute list of `string' element.");
2467
#line 510 "xmltree_read.l"
2472
switch (XML__START) {
2473
case S_octave: SET(E_octave); break;
2474
case S_array_2: case S_array_3: case S_array_1: SET(S_array_3); break;
2475
case ROOT_string: SET(EPILOG); break;
2476
case S_array: SET(S_array_1); break;
2482
#line 521 "xmltree_read.l"
2483
FAIL("Unexpected end-tag `%s': `</string>' expected.",xml_text);
2485
case XML__STATE_EOF(IN_string):
2486
#line 522 "xmltree_read.l"
2487
FAIL("Premature EOF: `</string>' expected.");
2490
/* rows CDATA #REQUIRED
2491
* name CDATA #IMPLIED> */
2494
#line 528 "xmltree_read.l"
2496
A_array_rows = NULL;
2497
A_array_name = NULL;
2504
#line 535 "xmltree_read.l"
2505
ENTER(VALUE1); BUFFERSET(A_array_rows);
2509
#line 536 "xmltree_read.l"
2510
ENTER(VALUE2); BUFFERSET(A_array_rows);
2514
#line 538 "xmltree_read.l"
2515
ENTER(VALUE1); BUFFERSET(A_array_name);
2519
#line 539 "xmltree_read.l"
2520
ENTER(VALUE2); BUFFERSET(A_array_name);
2524
#line 541 "xmltree_read.l"
2526
if (!A_array_rows) FAIL("Required attribute `rows' not set for `array' element.");
2527
LEAVE; STag_array(); pcdata = NULL; ENTER(S_array);
2532
#line 545 "xmltree_read.l"
2533
FAIL("`array' element cannot be empty.");
2537
#line 546 "xmltree_read.l"
2538
FAIL("Unexpected character `%c' in attribute list of array element.", xml_text[0]);
2542
#line 547 "xmltree_read.l"
2543
FAIL("Bad attribute `%s' in `array' element start tag.",xml_text);
2545
case XML__STATE_EOF(AL_array):
2546
#line 548 "xmltree_read.l"
2547
FAIL("EOF in attribute list of `array' element.");
2553
#line 552 "xmltree_read.l"
2557
switch (XML__START) {
2558
case S_octave: SET(E_octave); break;
2559
case ROOT_array: SET(EPILOG); break;
2565
#line 560 "xmltree_read.l"
2566
FAIL("Unexpected end-tag `%s': `</array>' expected.",xml_text);
2570
#line 561 "xmltree_read.l"
2571
FAIL("Unexpected character `%c': `</array>' expected.",xml_text[0]);
2573
case XML__STATE_EOF(S_array_3):
2574
case XML__STATE_EOF(E_array):
2575
#line 562 "xmltree_read.l"
2576
FAIL("Premature EOF: `</array>' expected.");
2579
/* rows CDATA #REQUIRED
2580
* columns CDATA #REQUIRED
2581
* name CDATA #IMPLIED> */
2584
#line 569 "xmltree_read.l"
2586
A_matrix_rows = NULL;
2587
A_matrix_columns = NULL;
2588
A_matrix_name = NULL;
2595
#line 577 "xmltree_read.l"
2596
ENTER(VALUE1); BUFFERSET(A_matrix_rows);
2600
#line 578 "xmltree_read.l"
2601
ENTER(VALUE2); BUFFERSET(A_matrix_rows);
2605
#line 580 "xmltree_read.l"
2606
ENTER(VALUE1); BUFFERSET(A_matrix_columns);
2610
#line 581 "xmltree_read.l"
2611
ENTER(VALUE2); BUFFERSET(A_matrix_columns);
2615
#line 583 "xmltree_read.l"
2616
ENTER(VALUE1); BUFFERSET(A_matrix_name);
2620
#line 584 "xmltree_read.l"
2621
ENTER(VALUE2); BUFFERSET(A_matrix_name);
2625
#line 586 "xmltree_read.l"
2627
if (!A_matrix_rows) FAIL("Required attribute `rows' not set for `matrix' element.");
2628
if (!A_matrix_columns) FAIL("Required attribute `columns' not set for `matrix' element.");
2629
LEAVE; STag_matrix(); pcdata = NULL; ENTER(S_matrix);
2634
#line 591 "xmltree_read.l"
2636
if (!A_matrix_rows) FAIL("Required attribute `rows' not set for `matrix' element.");
2637
if (!A_matrix_columns) FAIL("Required attribute `columns' not set for `matrix' element.");
2638
LEAVE; STag_matrix(); pcdata = NULL; ETag_matrix();
2639
switch (XML__START) {
2640
case ROOT_matrix: SET(EPILOG); break;
2646
#line 599 "xmltree_read.l"
2647
FAIL("Unexpected character `%c' in attribute list of matrix element.", xml_text[0]);
2651
#line 600 "xmltree_read.l"
2652
FAIL("Bad attribute `%s' in `matrix' element start tag.",xml_text);
2654
case XML__STATE_EOF(AL_matrix):
2655
#line 601 "xmltree_read.l"
2656
FAIL("EOF in attribute list of `matrix' element.");
2662
#line 605 "xmltree_read.l"
2666
switch (XML__START) {
2667
case ROOT_matrix: SET(EPILOG); break;
2673
#line 612 "xmltree_read.l"
2674
FAIL("Unexpected end-tag `%s': `</matrix>' expected.",xml_text);
2678
#line 613 "xmltree_read.l"
2679
FAIL("Unexpected character `%c': `</matrix>' expected.",xml_text[0]);
2681
case XML__STATE_EOF(S_matrix):
2682
case XML__STATE_EOF(S_matrix_2):
2683
case XML__STATE_EOF(E_matrix):
2684
#line 614 "xmltree_read.l"
2685
FAIL("Premature EOF: `</matrix>' expected.");
2690
#line 617 "xmltree_read.l"
2692
A_structure_name = NULL;
2693
ENTER(AL_structure);
2699
#line 623 "xmltree_read.l"
2700
ENTER(VALUE1); BUFFERSET(A_structure_name);
2704
#line 624 "xmltree_read.l"
2705
ENTER(VALUE2); BUFFERSET(A_structure_name);
2709
#line 626 "xmltree_read.l"
2711
LEAVE; STag_structure(); pcdata = BUFFERSET(pcdata); ENTER(IN_structure);
2716
#line 629 "xmltree_read.l"
2718
LEAVE; STag_structure(); pcdata = ""; ETag_structure();
2719
switch (XML__START) {
2720
case S_octave: SET(E_octave); break;
2721
case ROOT_structure: SET(EPILOG); break;
2727
#line 636 "xmltree_read.l"
2728
FAIL("Unexpected character `%c' in attribute list of structure element.", xml_text[0]);
2732
#line 637 "xmltree_read.l"
2733
FAIL("Bad attribute `%s' in `structure' element start tag.",xml_text);
2735
case XML__STATE_EOF(AL_structure):
2736
#line 638 "xmltree_read.l"
2737
FAIL("EOF in attribute list of `structure' element.");
2743
#line 642 "xmltree_read.l"
2748
switch (XML__START) {
2749
case S_octave: SET(E_octave); break;
2750
case ROOT_structure: SET(EPILOG); break;
2756
#line 651 "xmltree_read.l"
2757
FAIL("Unexpected end-tag `%s': `</structure>' expected.",xml_text);
2759
case XML__STATE_EOF(IN_structure):
2760
#line 652 "xmltree_read.l"
2761
FAIL("Premature EOF: `</structure>' expected.");
2764
/* length CDATA #REQUIRED
2765
* name CDATA #IMPLIED> */
2768
#line 658 "xmltree_read.l"
2770
A_list_length = NULL;
2778
#line 665 "xmltree_read.l"
2779
ENTER(VALUE1); BUFFERSET(A_list_length);
2783
#line 666 "xmltree_read.l"
2784
ENTER(VALUE2); BUFFERSET(A_list_length);
2788
#line 668 "xmltree_read.l"
2789
ENTER(VALUE1); BUFFERSET(A_list_name);
2793
#line 669 "xmltree_read.l"
2794
ENTER(VALUE2); BUFFERSET(A_list_name);
2798
#line 671 "xmltree_read.l"
2800
if (!A_list_length) FAIL("Required attribute `length' not set for `list' element.");
2801
LEAVE; STag_list(); pcdata = BUFFERSET(pcdata); ENTER(IN_list);
2806
#line 675 "xmltree_read.l"
2808
if (!A_list_length) FAIL("Required attribute `length' not set for `list' element.");
2809
LEAVE; STag_list(); pcdata = ""; ETag_list();
2810
switch (XML__START) {
2811
case S_octave: SET(E_octave); break;
2812
case ROOT_list: SET(EPILOG); break;
2818
#line 683 "xmltree_read.l"
2819
FAIL("Unexpected character `%c' in attribute list of list element.", xml_text[0]);
2823
#line 684 "xmltree_read.l"
2824
FAIL("Bad attribute `%s' in `list' element start tag.",xml_text);
2826
case XML__STATE_EOF(AL_list):
2827
#line 685 "xmltree_read.l"
2828
FAIL("EOF in attribute list of `list' element.");
2834
#line 689 "xmltree_read.l"
2839
switch (XML__START) {
2840
case S_octave: SET(E_octave); break;
2841
case ROOT_list: SET(EPILOG); break;
2847
#line 698 "xmltree_read.l"
2848
FAIL("Unexpected end-tag `%s': `</list>' expected.",xml_text);
2850
case XML__STATE_EOF(IN_list):
2851
#line 699 "xmltree_read.l"
2852
FAIL("Premature EOF: `</list>' expected.");
2855
/* rows CDATA #REQUIRED
2856
* columns CDATA #REQUIRED
2857
* name CDATA #IMPLIED> */
2860
#line 706 "xmltree_read.l"
2863
A_cell_columns = NULL;
2871
#line 714 "xmltree_read.l"
2872
ENTER(VALUE1); BUFFERSET(A_cell_rows);
2876
#line 715 "xmltree_read.l"
2877
ENTER(VALUE2); BUFFERSET(A_cell_rows);
2881
#line 717 "xmltree_read.l"
2882
ENTER(VALUE1); BUFFERSET(A_cell_columns);
2886
#line 718 "xmltree_read.l"
2887
ENTER(VALUE2); BUFFERSET(A_cell_columns);
2891
#line 720 "xmltree_read.l"
2892
ENTER(VALUE1); BUFFERSET(A_cell_name);
2896
#line 721 "xmltree_read.l"
2897
ENTER(VALUE2); BUFFERSET(A_cell_name);
2901
#line 723 "xmltree_read.l"
2903
if (!A_cell_rows) FAIL("Required attribute `rows' not set for `cell' element.");
2904
if (!A_cell_columns) FAIL("Required attribute `columns' not set for `cell' element.");
2905
LEAVE; STag_cell(); pcdata = BUFFERSET(pcdata); ENTER(IN_cell);
2910
#line 728 "xmltree_read.l"
2912
if (!A_cell_rows) FAIL("Required attribute `rows' not set for `cell' element.");
2913
if (!A_cell_columns) FAIL("Required attribute `columns' not set for `cell' element.");
2914
LEAVE; STag_cell(); pcdata = ""; ETag_cell();
2915
switch (XML__START) {
2916
case S_octave: SET(E_octave); break;
2917
case ROOT_cell: SET(EPILOG); break;
2923
#line 737 "xmltree_read.l"
2924
FAIL("Unexpected character `%c' in attribute list of cell element.", xml_text[0]);
2928
#line 738 "xmltree_read.l"
2929
FAIL("Bad attribute `%s' in `cell' element start tag.",xml_text);
2931
case XML__STATE_EOF(AL_cell):
2932
#line 739 "xmltree_read.l"
2933
FAIL("EOF in attribute list of `cell' element.");
2939
#line 743 "xmltree_read.l"
2944
switch (XML__START) {
2945
case S_octave: SET(E_octave); break;
2946
case ROOT_cell: SET(EPILOG); break;
2952
#line 752 "xmltree_read.l"
2953
FAIL("Unexpected end-tag `%s': `</cell>' expected.",xml_text);
2955
case XML__STATE_EOF(IN_cell):
2956
#line 753 "xmltree_read.l"
2957
FAIL("Premature EOF: `</cell>' expected.");
2960
/* EPILOG: after the root element. */
2964
#line 759 "xmltree_read.l"
2965
FAIL("Unexpected character `%c' after document.", xml_text[0]);
2967
case XML__STATE_EOF(EPILOG):
2968
#line 760 "xmltree_read.l"
2972
/* CHARACTER DATA. */
2974
/* Non-defined standard entities... */
2977
#line 767 "xmltree_read.l"
2982
#line 768 "xmltree_read.l"
2987
#line 769 "xmltree_read.l"
2992
#line 770 "xmltree_read.l"
2997
#line 771 "xmltree_read.l"
3000
/* Character entities. */
3003
#line 774 "xmltree_read.l"
3004
BUFFERPUTC((unsigned char)atoi(xml_text+2));
3008
#line 775 "xmltree_read.l"
3009
BUFFERPUTC((unsigned char)strtol(xml_text+3,NULL,16));
3014
#line 780 "xmltree_read.l"
3016
#line 781 "xmltree_read.l"
3018
#line 782 "xmltree_read.l"
3021
#line 782 "xmltree_read.l"
3028
#line 786 "xmltree_read.l"
3033
#line 787 "xmltree_read.l"
3034
FAIL("Unexpected `]]>' in character data.");
3040
#line 791 "xmltree_read.l"
3043
case XML__STATE_EOF(VALUE1):
3044
#line 792 "xmltree_read.l"
3045
FAIL("EOF in literal (\"'\" expected).");
3051
#line 796 "xmltree_read.l"
3054
case XML__STATE_EOF(VALUE2):
3055
#line 797 "xmltree_read.l"
3056
FAIL("EOF in literal (`\"' expected).");
3062
#line 801 "xmltree_read.l"
3063
BUFFERPUTC(xml_text[0]);
3067
#line 802 "xmltree_read.l"
3068
FAIL("Spurious `%c' in character data.",xml_text[0]);
3074
#line 806 "xmltree_read.l"
3079
#line 807 "xmltree_read.l"
3080
BUFFERPUTC(xml_text[0]); BUFFERPUTC(xml_text[1]);
3084
#line 808 "xmltree_read.l"
3085
BUFFERPUTC(xml_text[0]);
3087
case XML__STATE_EOF(CDATA):
3088
#line 809 "xmltree_read.l"
3089
FAIL("EOF in CDATA section.");
3092
/* Impossible rules to avoid warnings from flex(1). */
3096
#line 815 "xmltree_read.l"
3097
FAIL("The Impossible Happened: INITIAL or IMPOSSIBLE state entered?");
3102
#line 818 "xmltree_read.l"
3105
case XML__STATE_EOF(INITIAL):
3106
case XML__STATE_EOF(ROOT_octave):
3107
case XML__STATE_EOF(S_octave):
3108
case XML__STATE_EOF(ROOT_scalar):
3109
case XML__STATE_EOF(ROOT_complex):
3110
case XML__STATE_EOF(S_complex):
3111
case XML__STATE_EOF(S_complex_1):
3112
case XML__STATE_EOF(ROOT_string):
3113
case XML__STATE_EOF(ROOT_array):
3114
case XML__STATE_EOF(S_array):
3115
case XML__STATE_EOF(S_array_1):
3116
case XML__STATE_EOF(S_array_2):
3117
case XML__STATE_EOF(ROOT_matrix):
3118
case XML__STATE_EOF(S_matrix_1):
3119
case XML__STATE_EOF(ROOT_structure):
3120
case XML__STATE_EOF(ROOT_list):
3121
case XML__STATE_EOF(ROOT_cell):
3122
case XML__STATE_EOF(IMPOSSIBLE):
3125
case XML__END_OF_BUFFER:
3127
/* Amount of text matched not including the EOB char. */
3128
int xml__amount_of_matched_text = (int) (xml__cp - xml_text_ptr) - 1;
3130
/* Undo the effects of XML__DO_BEFORE_ACTION. */
3131
*xml__cp = xml__hold_char;
3132
XML__RESTORE_XML__MORE_OFFSET
3134
if ( xml__current_buffer->xml__buffer_status == XML__BUFFER_NEW )
3136
/* We're scanning a new file or input source. It's
3137
* possible that this happened because the user
3138
* just pointed xml_in at a new source and called
3139
* xml_lex(). If so, then we have to assure
3140
* consistency between xml__current_buffer and our
3141
* globals. Here is the right place to do so, because
3142
* this is the first action (other than possibly a
3143
* back-up) that will match for the new input source.
3145
xml__n_chars = xml__current_buffer->xml__n_chars;
3146
xml__current_buffer->xml__input_file = xml_in;
3147
xml__current_buffer->xml__buffer_status = XML__BUFFER_NORMAL;
3150
/* Note that here we test for xml__c_buf_p "<=" to the position
3151
* of the first EOB in the buffer, since xml__c_buf_p will
3152
* already have been incremented past the NUL character
3153
* (since all states make transitions on EOB to the
3154
* end-of-buffer state). Contrast this with the test
3157
if ( xml__c_buf_p <= &xml__current_buffer->xml__ch_buf[xml__n_chars] )
3158
{ /* This was really a NUL. */
3159
xml__state_type xml__next_state;
3161
xml__c_buf_p = xml_text_ptr + xml__amount_of_matched_text;
3163
xml__current_state = xml__get_previous_state();
3165
/* Okay, we're now positioned to make the NUL
3166
* transition. We couldn't have
3167
* xml__get_previous_state() go ahead and do it
3168
* for us because it doesn't know how to deal
3169
* with the possibility of jamming (and we don't
3170
* want to build jamming into it because then it
3171
* will run more slowly).
3174
xml__next_state = xml__try_NUL_trans( xml__current_state );
3176
xml__bp = xml_text_ptr + XML__MORE_ADJ;
3178
if ( xml__next_state )
3180
/* Consume the NUL. */
3181
xml__cp = ++xml__c_buf_p;
3182
xml__current_state = xml__next_state;
3188
xml__cp = xml__c_buf_p;
3189
goto xml__find_action;
3193
else switch ( xml__get_next_buffer() )
3195
case EOB_ACT_END_OF_FILE:
3197
xml__did_buffer_switch_on_eof = 0;
3201
/* Note: because we've taken care in
3202
* xml__get_next_buffer() to have set up
3203
* xml_text, we can now set up
3204
* xml__c_buf_p so that if some total
3205
* hoser (like flex itself) wants to
3206
* call the scanner after we return the
3207
* XML__NULL, it'll still work - another
3208
* XML__NULL will get returned.
3210
xml__c_buf_p = xml_text_ptr + XML__MORE_ADJ;
3212
xml__act = XML__STATE_EOF(XML__START);
3218
if ( ! xml__did_buffer_switch_on_eof )
3224
case EOB_ACT_CONTINUE_SCAN:
3226
xml_text_ptr + xml__amount_of_matched_text;
3228
xml__current_state = xml__get_previous_state();
3230
xml__cp = xml__c_buf_p;
3231
xml__bp = xml_text_ptr + XML__MORE_ADJ;
3234
case EOB_ACT_LAST_MATCH:
3236
&xml__current_buffer->xml__ch_buf[xml__n_chars];
3238
xml__current_state = xml__get_previous_state();
3240
xml__cp = xml__c_buf_p;
3241
xml__bp = xml_text_ptr + XML__MORE_ADJ;
3242
goto xml__find_action;
3249
"fatal flex scanner internal error--no action found" );
3250
} /* end of action switch */
3251
} /* end of scanning one token */
3252
} /* end of xml_lex */
3255
/* xml__get_next_buffer - try to read in a new buffer
3257
* Returns a code representing an action:
3258
* EOB_ACT_LAST_MATCH -
3259
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
3260
* EOB_ACT_END_OF_FILE - end of file
3263
static int xml__get_next_buffer()
3265
register char *dest = xml__current_buffer->xml__ch_buf;
3266
register char *source = xml_text_ptr;
3267
register int number_to_move, i;
3270
if ( xml__c_buf_p > &xml__current_buffer->xml__ch_buf[xml__n_chars + 1] )
3272
"fatal flex scanner internal error--end of buffer missed" );
3274
if ( xml__current_buffer->xml__fill_buffer == 0 )
3275
{ /* Don't try to fill the buffer, so this is an EOF. */
3276
if ( xml__c_buf_p - xml_text_ptr - XML__MORE_ADJ == 1 )
3278
/* We matched a single character, the EOB, so
3279
* treat this as a final EOF.
3281
return EOB_ACT_END_OF_FILE;
3286
/* We matched some text prior to the EOB, first
3289
return EOB_ACT_LAST_MATCH;
3293
/* Try to read more data. */
3295
/* First move last chars to start of buffer. */
3296
number_to_move = (int) (xml__c_buf_p - xml_text_ptr) - 1;
3298
for ( i = 0; i < number_to_move; ++i )
3299
*(dest++) = *(source++);
3301
if ( xml__current_buffer->xml__buffer_status == XML__BUFFER_EOF_PENDING )
3302
/* don't do the read, it's not guaranteed to return an EOF,
3305
xml__current_buffer->xml__n_chars = xml__n_chars = 0;
3310
xml__current_buffer->xml__buf_size - number_to_move - 1;
3312
while ( num_to_read <= 0 )
3313
{ /* Not enough room in the buffer - grow it. */
3314
#ifdef XML__USES_REJECT
3316
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
3319
/* just a shorter name for the current buffer */
3320
XML__BUFFER_STATE b = xml__current_buffer;
3322
int xml__c_buf_p_offset =
3323
(int) (xml__c_buf_p - b->xml__ch_buf);
3325
if ( b->xml__is_our_buffer )
3327
int new_size = b->xml__buf_size * 2;
3329
if ( new_size <= 0 )
3330
b->xml__buf_size += b->xml__buf_size / 8;
3332
b->xml__buf_size *= 2;
3334
b->xml__ch_buf = (char *)
3335
/* Include room in for 2 EOB chars. */
3336
xml__flex_realloc( (void *) b->xml__ch_buf,
3337
b->xml__buf_size + 2 );
3340
/* Can't grow it, we don't own it. */
3343
if ( ! b->xml__ch_buf )
3345
"fatal error - scanner input buffer overflow" );
3347
xml__c_buf_p = &b->xml__ch_buf[xml__c_buf_p_offset];
3349
num_to_read = xml__current_buffer->xml__buf_size -
3354
if ( num_to_read > XML__READ_BUF_SIZE )
3355
num_to_read = XML__READ_BUF_SIZE;
3357
/* Read in more data. */
3358
XML__INPUT( (&xml__current_buffer->xml__ch_buf[number_to_move]),
3359
xml__n_chars, num_to_read );
3361
xml__current_buffer->xml__n_chars = xml__n_chars;
3364
if ( xml__n_chars == 0 )
3366
if ( number_to_move == XML__MORE_ADJ )
3368
ret_val = EOB_ACT_END_OF_FILE;
3369
xml_restart( xml_in );
3374
ret_val = EOB_ACT_LAST_MATCH;
3375
xml__current_buffer->xml__buffer_status =
3376
XML__BUFFER_EOF_PENDING;
3381
ret_val = EOB_ACT_CONTINUE_SCAN;
3383
xml__n_chars += number_to_move;
3384
xml__current_buffer->xml__ch_buf[xml__n_chars] = XML__END_OF_BUFFER_CHAR;
3385
xml__current_buffer->xml__ch_buf[xml__n_chars + 1] = XML__END_OF_BUFFER_CHAR;
3387
xml_text_ptr = &xml__current_buffer->xml__ch_buf[0];
3393
/* xml__get_previous_state - get the state just before the EOB char was reached */
3395
static xml__state_type xml__get_previous_state()
3397
register xml__state_type xml__current_state;
3398
register char *xml__cp;
3400
xml__current_state = xml__start;
3402
for ( xml__cp = xml_text_ptr + XML__MORE_ADJ; xml__cp < xml__c_buf_p; ++xml__cp )
3404
register XML__CHAR xml__c = (*xml__cp ? xml__ec[XML__SC_TO_UI(*xml__cp)] : 1);
3405
if ( xml__accept[xml__current_state] )
3407
xml__last_accepting_state = xml__current_state;
3408
xml__last_accepting_cpos = xml__cp;
3410
while ( xml__chk[xml__base[xml__current_state] + xml__c] != xml__current_state )
3412
xml__current_state = (int) xml__def[xml__current_state];
3413
if ( xml__current_state >= 1064 )
3414
xml__c = xml__meta[(unsigned int) xml__c];
3416
xml__current_state = xml__nxt[xml__base[xml__current_state] + (unsigned int) xml__c];
3419
return xml__current_state;
3423
/* xml__try_NUL_trans - try to make a transition on the NUL character
3426
* next_state = xml__try_NUL_trans( current_state );
3429
#ifdef XML__USE_PROTOS
3430
static xml__state_type xml__try_NUL_trans( xml__state_type xml__current_state )
3432
static xml__state_type xml__try_NUL_trans( xml__current_state )
3433
xml__state_type xml__current_state;
3436
register int xml__is_jam;
3437
register char *xml__cp = xml__c_buf_p;
3439
register XML__CHAR xml__c = 1;
3440
if ( xml__accept[xml__current_state] )
3442
xml__last_accepting_state = xml__current_state;
3443
xml__last_accepting_cpos = xml__cp;
3445
while ( xml__chk[xml__base[xml__current_state] + xml__c] != xml__current_state )
3447
xml__current_state = (int) xml__def[xml__current_state];
3448
if ( xml__current_state >= 1064 )
3449
xml__c = xml__meta[(unsigned int) xml__c];
3451
xml__current_state = xml__nxt[xml__base[xml__current_state] + (unsigned int) xml__c];
3452
xml__is_jam = (xml__current_state == 1063);
3454
return xml__is_jam ? 0 : xml__current_state;
3458
#ifndef XML__NO_UNPUT
3459
#ifdef XML__USE_PROTOS
3460
static void xml_unput( int c, register char *xml__bp )
3462
static void xml_unput( c, xml__bp )
3464
register char *xml__bp;
3467
register char *xml__cp = xml__c_buf_p;
3469
/* undo effects of setting up xml_text */
3470
*xml__cp = xml__hold_char;
3472
if ( xml__cp < xml__current_buffer->xml__ch_buf + 2 )
3473
{ /* need to shift things up to make room */
3474
/* +2 for EOB chars. */
3475
register int number_to_move = xml__n_chars + 2;
3476
register char *dest = &xml__current_buffer->xml__ch_buf[
3477
xml__current_buffer->xml__buf_size + 2];
3478
register char *source =
3479
&xml__current_buffer->xml__ch_buf[number_to_move];
3481
while ( source > xml__current_buffer->xml__ch_buf )
3482
*--dest = *--source;
3484
xml__cp += (int) (dest - source);
3485
xml__bp += (int) (dest - source);
3486
xml__current_buffer->xml__n_chars =
3487
xml__n_chars = xml__current_buffer->xml__buf_size;
3489
if ( xml__cp < xml__current_buffer->xml__ch_buf + 2 )
3490
XML__FATAL_ERROR( "flex scanner push-back overflow" );
3493
*--xml__cp = (char) c;
3496
xml_text_ptr = xml__bp;
3497
xml__hold_char = *xml__cp;
3498
xml__c_buf_p = xml__cp;
3500
#endif /* ifndef XML__NO_UNPUT */
3504
static int xml_input()
3511
*xml__c_buf_p = xml__hold_char;
3513
if ( *xml__c_buf_p == XML__END_OF_BUFFER_CHAR )
3515
/* xml__c_buf_p now points to the character we want to return.
3516
* If this occurs *before* the EOB characters, then it's a
3517
* valid NUL; if not, then we've hit the end of the buffer.
3519
if ( xml__c_buf_p < &xml__current_buffer->xml__ch_buf[xml__n_chars] )
3520
/* This was really a NUL. */
3521
*xml__c_buf_p = '\0';
3524
{ /* need more input */
3525
int offset = xml__c_buf_p - xml_text_ptr;
3528
switch ( xml__get_next_buffer() )
3530
case EOB_ACT_LAST_MATCH:
3531
/* This happens because xml__g_n_b()
3532
* sees that we've accumulated a
3533
* token and flags that we need to
3534
* try matching the token before
3535
* proceeding. But for input(),
3536
* there's no matching to consider.
3537
* So convert the EOB_ACT_LAST_MATCH
3538
* to EOB_ACT_END_OF_FILE.
3541
/* Reset buffer status. */
3542
xml_restart( xml_in );
3546
case EOB_ACT_END_OF_FILE:
3551
if ( ! xml__did_buffer_switch_on_eof )
3560
case EOB_ACT_CONTINUE_SCAN:
3561
xml__c_buf_p = xml_text_ptr + offset;
3567
c = *(unsigned char *) xml__c_buf_p; /* cast for 8-bit char's */
3568
*xml__c_buf_p = '\0'; /* preserve xml_text */
3569
xml__hold_char = *++xml__c_buf_p;
3576
#ifdef XML__USE_PROTOS
3577
void xml_restart( FILE *input_file )
3579
void xml_restart( input_file )
3583
if ( ! xml__current_buffer )
3584
xml__current_buffer = xml__create_buffer( xml_in, XML__BUF_SIZE );
3586
xml__init_buffer( xml__current_buffer, input_file );
3587
xml__load_buffer_state();
3591
#ifdef XML__USE_PROTOS
3592
void xml__switch_to_buffer( XML__BUFFER_STATE new_buffer )
3594
void xml__switch_to_buffer( new_buffer )
3595
XML__BUFFER_STATE new_buffer;
3598
if ( xml__current_buffer == new_buffer )
3601
if ( xml__current_buffer )
3603
/* Flush out information for old buffer. */
3604
*xml__c_buf_p = xml__hold_char;
3605
xml__current_buffer->xml__buf_pos = xml__c_buf_p;
3606
xml__current_buffer->xml__n_chars = xml__n_chars;
3609
xml__current_buffer = new_buffer;
3610
xml__load_buffer_state();
3612
/* We don't actually know whether we did this switch during
3613
* EOF (xml_wrap()) processing, but the only time this flag
3614
* is looked at is after xml_wrap() is called, so it's safe
3615
* to go ahead and always set it.
3617
xml__did_buffer_switch_on_eof = 1;
3621
#ifdef XML__USE_PROTOS
3622
void xml__load_buffer_state( void )
3624
void xml__load_buffer_state()
3627
xml__n_chars = xml__current_buffer->xml__n_chars;
3628
xml_text_ptr = xml__c_buf_p = xml__current_buffer->xml__buf_pos;
3629
xml_in = xml__current_buffer->xml__input_file;
3630
xml__hold_char = *xml__c_buf_p;
3634
#ifdef XML__USE_PROTOS
3635
XML__BUFFER_STATE xml__create_buffer( FILE *file, int size )
3637
XML__BUFFER_STATE xml__create_buffer( file, size )
3642
XML__BUFFER_STATE b;
3644
b = (XML__BUFFER_STATE) xml__flex_alloc( sizeof( struct xml__buffer_state ) );
3646
XML__FATAL_ERROR( "out of dynamic memory in xml__create_buffer()" );
3648
b->xml__buf_size = size;
3650
/* xml__ch_buf has to be 2 characters longer than the size given because
3651
* we need to put in 2 end-of-buffer characters.
3653
b->xml__ch_buf = (char *) xml__flex_alloc( b->xml__buf_size + 2 );
3654
if ( ! b->xml__ch_buf )
3655
XML__FATAL_ERROR( "out of dynamic memory in xml__create_buffer()" );
3657
b->xml__is_our_buffer = 1;
3659
xml__init_buffer( b, file );
3665
#ifdef XML__USE_PROTOS
3666
void xml__delete_buffer( XML__BUFFER_STATE b )
3668
void xml__delete_buffer( b )
3669
XML__BUFFER_STATE b;
3675
if ( b == xml__current_buffer )
3676
xml__current_buffer = (XML__BUFFER_STATE) 0;
3678
if ( b->xml__is_our_buffer )
3679
xml__flex_free( (void *) b->xml__ch_buf );
3681
xml__flex_free( (void *) b );
3688
#ifndef XML__ALWAYS_INTERACTIVE
3689
#ifndef XML__NEVER_INTERACTIVE
3690
extern int isatty XML__PROTO(( int ));
3695
#ifdef XML__USE_PROTOS
3696
void xml__init_buffer( XML__BUFFER_STATE b, FILE *file )
3698
void xml__init_buffer( b, file )
3699
XML__BUFFER_STATE b;
3705
xml__flush_buffer( b );
3707
b->xml__input_file = file;
3708
b->xml__fill_buffer = 1;
3710
#if XML__ALWAYS_INTERACTIVE
3711
b->xml__is_interactive = 1;
3713
#if XML__NEVER_INTERACTIVE
3714
b->xml__is_interactive = 0;
3716
b->xml__is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3722
#ifdef XML__USE_PROTOS
3723
void xml__flush_buffer( XML__BUFFER_STATE b )
3725
void xml__flush_buffer( b )
3726
XML__BUFFER_STATE b;
3733
b->xml__n_chars = 0;
3735
/* We always need two end-of-buffer characters. The first causes
3736
* a transition to the end-of-buffer state. The second causes
3737
* a jam in that state.
3739
b->xml__ch_buf[0] = XML__END_OF_BUFFER_CHAR;
3740
b->xml__ch_buf[1] = XML__END_OF_BUFFER_CHAR;
3742
b->xml__buf_pos = &b->xml__ch_buf[0];
3745
b->xml__buffer_status = XML__BUFFER_NEW;
3747
if ( b == xml__current_buffer )
3748
xml__load_buffer_state();
3752
#ifndef XML__NO_SCAN_BUFFER
3753
#ifdef XML__USE_PROTOS
3754
XML__BUFFER_STATE xml__scan_buffer( char *base, xml__size_t size )
3756
XML__BUFFER_STATE xml__scan_buffer( base, size )
3761
XML__BUFFER_STATE b;
3764
base[size-2] != XML__END_OF_BUFFER_CHAR ||
3765
base[size-1] != XML__END_OF_BUFFER_CHAR )
3766
/* They forgot to leave room for the EOB's. */
3769
b = (XML__BUFFER_STATE) xml__flex_alloc( sizeof( struct xml__buffer_state ) );
3771
XML__FATAL_ERROR( "out of dynamic memory in xml__scan_buffer()" );
3773
b->xml__buf_size = size - 2; /* "- 2" to take care of EOB's */
3774
b->xml__buf_pos = b->xml__ch_buf = base;
3775
b->xml__is_our_buffer = 0;
3776
b->xml__input_file = 0;
3777
b->xml__n_chars = b->xml__buf_size;
3778
b->xml__is_interactive = 0;
3780
b->xml__fill_buffer = 0;
3781
b->xml__buffer_status = XML__BUFFER_NEW;
3783
xml__switch_to_buffer( b );
3790
#ifndef XML__NO_SCAN_STRING
3791
#ifdef XML__USE_PROTOS
3792
XML__BUFFER_STATE xml__scan_string( xml_const char *xml__str )
3794
XML__BUFFER_STATE xml__scan_string( xml__str )
3795
xml_const char *xml__str;
3799
for ( len = 0; xml__str[len]; ++len )
3802
return xml__scan_bytes( xml__str, len );
3807
#ifndef XML__NO_SCAN_BYTES
3808
#ifdef XML__USE_PROTOS
3809
XML__BUFFER_STATE xml__scan_bytes( xml_const char *bytes, int len )
3811
XML__BUFFER_STATE xml__scan_bytes( bytes, len )
3812
xml_const char *bytes;
3816
XML__BUFFER_STATE b;
3821
/* Get memory for full buffer, including space for trailing EOB's. */
3823
buf = (char *) xml__flex_alloc( n );
3825
XML__FATAL_ERROR( "out of dynamic memory in xml__scan_bytes()" );
3827
for ( i = 0; i < len; ++i )
3830
buf[len] = buf[len+1] = XML__END_OF_BUFFER_CHAR;
3832
b = xml__scan_buffer( buf, n );
3834
XML__FATAL_ERROR( "bad buffer in xml__scan_bytes()" );
3836
/* It's okay to grow etc. this buffer, and we should throw it
3837
* away when we're done.
3839
b->xml__is_our_buffer = 1;
3846
#ifndef XML__NO_PUSH_STATE
3847
#ifdef XML__USE_PROTOS
3848
static void xml__push_state( int new_state )
3850
static void xml__push_state( new_state )
3854
if ( xml__start_stack_ptr >= xml__start_stack_depth )
3856
xml__size_t new_size;
3858
xml__start_stack_depth += XML__START_STACK_INCR;
3859
new_size = xml__start_stack_depth * sizeof( int );
3861
if ( ! xml__start_stack )
3862
xml__start_stack = (int *) xml__flex_alloc( new_size );
3865
xml__start_stack = (int *) xml__flex_realloc(
3866
(void *) xml__start_stack, new_size );
3868
if ( ! xml__start_stack )
3870
"out of memory expanding start-condition stack" );
3873
xml__start_stack[xml__start_stack_ptr++] = XML__START;
3880
#ifndef XML__NO_POP_STATE
3881
static void xml__pop_state()
3883
if ( --xml__start_stack_ptr < 0 )
3884
XML__FATAL_ERROR( "start-condition stack underflow" );
3886
BEGIN(xml__start_stack[xml__start_stack_ptr]);
3891
#ifndef XML__NO_TOP_STATE
3892
static int xml__top_state()
3894
return xml__start_stack[xml__start_stack_ptr - 1];
3898
#ifndef XML__EXIT_FAILURE
3899
#define XML__EXIT_FAILURE 2
3902
#ifdef XML__USE_PROTOS
3903
static void xml__fatal_error( xml_const char msg[] )
3905
static void xml__fatal_error( msg )
3909
(void) fprintf( stderr, "%s\n", msg );
3910
exit( XML__EXIT_FAILURE );
3915
/* Redefine xml_less() so it works in section 3 code. */
3918
#define xml_less(n) \
3921
/* Undo effects of setting up xml_text. */ \
3922
xml_text[xml_leng] = xml__hold_char; \
3923
xml__c_buf_p = xml_text + n; \
3924
xml__hold_char = *xml__c_buf_p; \
3925
*xml__c_buf_p = '\0'; \
3931
/* Internal utility routines. */
3933
#ifndef xml_text_ptr
3934
#ifdef XML__USE_PROTOS
3935
static void xml__flex_strncpy( char *s1, xml_const char *s2, int n )
3937
static void xml__flex_strncpy( s1, s2, n )
3944
for ( i = 0; i < n; ++i )
3949
#ifdef XML__NEED_STRLEN
3950
#ifdef XML__USE_PROTOS
3951
static int xml__flex_strlen( xml_const char *s )
3953
static int xml__flex_strlen( s )
3958
for ( n = 0; s[n]; ++n )
3966
#ifdef XML__USE_PROTOS
3967
static void *xml__flex_alloc( xml__size_t size )
3969
static void *xml__flex_alloc( size )
3973
return (void *) malloc( size );
3976
#ifdef XML__USE_PROTOS
3977
static void *xml__flex_realloc( void *ptr, xml__size_t size )
3979
static void *xml__flex_realloc( ptr, size )
3984
/* The cast to (char *) in the following accommodates both
3985
* implementations that use char* generic pointers, and those
3986
* that use void* generic pointers. It works with the latter
3987
* because both ANSI C and C++ allow castless assignment from
3988
* any pointer type to void*, and deal with argument conversions
3989
* as though doing an assignment.
3991
return (void *) realloc( (char *) ptr, size );
3994
#ifdef XML__USE_PROTOS
3995
static void xml__flex_free( void *ptr )
3997
static void xml__flex_free( ptr )
4011
#line 818 "xmltree_read.l"
4014
/* Element context stack lookup. */
4015
int element_context(int i)
4017
return (0<i && i<xml__start_stack_depth
4018
? xml__start_stack[xml__start_stack_ptr - i]
4023
void print_xml__stack(char* fmt, ...)
4025
int i = 0; va_list ap; va_start(ap, fmt);
4026
vfprintf(stderr, fmt, ap);
4027
for (i=1; i<xml__start_stack_ptr; i++)
4028
fprintf(stderr, "%s/", statenames[xml__start_stack[i]]);
4029
fprintf(stderr,"%s\n", statenames[XML__START]);
4033
static void debug_enter(int state, char* statename) {
4034
xml__push_state(state);
4035
if (xml__flex_debug) print_xml__stack("--ENTER(%s) : ",statename);
4038
static void debug_leave(void) {
4039
if (xml__flex_debug) print_xml__stack("--LEAVE : ");
4043
static void debug_set(int state, char* statename) {
4045
if (xml__flex_debug) print_xml__stack("--SET(%s) : ",statename);
4050
static int fail(const char* fmt, ...)
4052
va_list ap; va_start(ap, fmt);
4053
#ifdef FLEXML_xml_lineno
4054
fprintf(stderr, "Invalid XML (XML input line %d, state %d): ", xml_lineno, XML__START);
4056
fprintf(stderr, "Invalid XML (state %d): ",XML__START);
4058
vfprintf(stderr, fmt, ap);
4059
fprintf(stderr, "\n");
4064
#line 30 "xmltree_read.act"
4069
#include "xmltree.h"
4071
#define warning perror
4077
void STag_octave(void)
4079
#line 43 "xmltree_read.act"
4081
root = new_element();
4082
root->def_value = value_data;
4083
current = &(root->child);
4085
lastlist = new_list(lastlist);
4086
lastlist->root = current;
4090
void ETag_octave(void)
4092
#line 52 "xmltree_read.act"
4094
current = lastlist->root;
4095
lastlist = pop_list(lastlist);
4096
current = &((*current)->next);
4100
void STag_scalar(void)
4102
#line 60 "xmltree_read.act"
4104
*current = new_element();
4106
if (A_scalar_name) {
4107
(*current)->name = (char *) malloc(strlen(A_scalar_name)+1);
4108
strcpy ((*current)->name, A_scalar_name);
4111
(*current)->def_value = value_scalar;
4112
switch (A_scalar_value) {
4113
case A_scalar_value_true: (*current)->const_value = const_true; break;
4114
case A_scalar_value_false: (*current)->const_value = const_false; break;
4115
case A_scalar_value_inf: (*current)->const_value = const_inf; break;
4116
case A_scalar_value_neginf: (*current)->const_value = const_neginf; break;
4117
case A_scalar_value_nan: (*current)->const_value = const_nan; break;
4118
case A_scalar_value_na: (*current)->const_value = const_na; break;
4119
default: (*current)->const_value = const_undef;
4124
void ETag_scalar(void)
4126
#line 80 "xmltree_read.act"
4128
if (((*current)->const_value == const_undef) && (pcdata))
4129
(*current)->scalar_value = strtod (pcdata, NULL);
4131
(*(lastlist->root))->nb_elements++;
4133
current = &((*current)->next);
4137
void STag_string(void)
4139
#line 91 "xmltree_read.act"
4141
*current = new_element();
4143
if (A_string_name) {
4144
(*current)->name = (char *) malloc(strlen(A_string_name)+1);
4145
strcpy ((*current)->name, A_string_name);
4148
if (A_string_length)
4149
(*current)->length = strtol (A_string_length, NULL, 10);
4151
(*current)->def_value = value_string;
4155
void ETag_string(void)
4157
#line 105 "xmltree_read.act"
4161
int len = strlen(pcdata);
4162
/* check length parameter */
4163
if ((*current)->length != len) {
4164
warning("incorrect length parameter for string\n");
4165
(*current)->length = len;
4168
(*current)->string_value = (char *) malloc ((len+1) * sizeof(char));
4169
strcpy((*current)->string_value, pcdata);
4172
(*(lastlist->root))->nb_elements++;
4174
current = &((*current)->next);
4178
void STag_complex(void)
4180
#line 126 "xmltree_read.act"
4182
*current = new_element();
4184
if (A_complex_name) {
4185
(*current)->name = (char *) malloc(strlen(A_complex_name)+1);
4186
strcpy ((*current)->name, A_complex_name);
4189
(*current)->def_value = value_complex;
4191
lastlist = new_list(lastlist);
4192
lastlist->root = current;
4193
current = &((*current)->child);
4195
} /* STag_complex */
4197
void ETag_complex(void)
4199
#line 141 "xmltree_read.act"
4201
current = lastlist->root;
4202
lastlist = pop_list(lastlist);
4204
(*(lastlist->root))->nb_elements++;
4206
current = &((*current)->next);
4208
} /* ETag_complex */
4210
void STag_array(void)
4212
#line 152 "xmltree_read.act"
4214
*current = new_element();
4217
(*current)->name = (char *) malloc(strlen(A_array_name)+1);
4218
strcpy ((*current)->name, A_array_name);
4222
(*current)->rows = strtol (A_array_rows, NULL, 10);
4224
(*current)->def_value = value_array;
4226
lastlist = new_list(lastlist);
4227
lastlist->root = current;
4228
current = &((*current)->child);
4232
void ETag_array(void)
4234
#line 170 "xmltree_read.act"
4236
/* check rows parameter */
4237
if ((*(lastlist->root))->rows != (*(lastlist->root))->nb_elements) {
4238
warning("incorrect length parameter for array\n");
4239
(*(lastlist->root))->rows = (*(lastlist->root))->nb_elements;
4242
current = lastlist->root;
4243
lastlist = pop_list(lastlist);
4245
(*(lastlist->root))->nb_elements++;
4247
current = &((*current)->next);
4251
void STag_matrix(void)
4253
#line 187 "xmltree_read.act"
4255
*current = new_element();
4257
if (A_matrix_name) {
4258
(*current)->name = (char *) malloc(strlen(A_matrix_name)+1);
4259
strcpy ((*current)->name, A_matrix_name);
4263
(*current)->rows = strtol (A_matrix_rows, NULL, 10);
4265
if (A_matrix_columns)
4266
(*current)->columns = strtol (A_matrix_columns, NULL, 10);
4268
(*current)->def_value = value_matrix;
4270
lastlist = new_list(lastlist);
4271
lastlist->root = current;
4272
current = &((*current)->child);
4276
void ETag_matrix(void)
4278
#line 208 "xmltree_read.act"
4280
/* check (rows, columns) parameters */
4281
if ((*(lastlist->root))->rows * (*(lastlist->root))->columns !=
4282
(*(lastlist->root))->nb_elements) {
4283
warning("incorrect (rows, columns) parameters for matrix: reshaping matrix into vector\n");
4284
(*(lastlist->root))->rows = 1;
4285
(*(lastlist->root))->columns = (*(lastlist->root))->nb_elements;
4288
current = lastlist->root;
4289
lastlist = pop_list(lastlist);
4291
(*(lastlist->root))->nb_elements++;
4293
current = &((*current)->next);
4297
void STag_structure(void)
4299
#line 227 "xmltree_read.act"
4301
*current = new_element();
4303
if (A_structure_name) {
4304
(*current)->name = (char *) malloc(strlen(A_structure_name)+1);
4305
strcpy ((*current)->name, A_structure_name);
4308
(*current)->def_value = value_structure;
4310
lastlist = new_list(lastlist);
4311
lastlist->root = current;
4312
current = &((*current)->child);
4314
} /* STag_structure */
4316
void ETag_structure(void)
4318
#line 242 "xmltree_read.act"
4320
/* no check possible (sic) */
4322
current = lastlist->root;
4323
lastlist = pop_list(lastlist);
4325
(*(lastlist->root))->nb_elements++;
4327
current = &((*current)->next);
4329
} /* ETag_structure */
4331
void STag_list(void)
4333
#line 255 "xmltree_read.act"
4335
*current = new_element();
4338
(*current)->name = (char *) malloc(strlen(A_list_name)+1);
4339
strcpy ((*current)->name, A_list_name);
4343
(*current)->length = strtol (A_list_length, NULL, 10);
4345
(*current)->def_value = value_list;
4347
lastlist = new_list(lastlist);
4348
lastlist->root = current;
4349
current = &((*current)->child);
4353
void ETag_list(void)
4355
#line 273 "xmltree_read.act"
4357
/* check length parameter */
4358
if ((*(lastlist->root))->length != (*(lastlist->root))->nb_elements) {
4359
warning("incorrect length parameter for list\n");
4360
(*(lastlist->root))->length = (*(lastlist->root))->nb_elements;
4363
current = lastlist->root;
4364
lastlist = pop_list(lastlist);
4366
(*(lastlist->root))->nb_elements++;
4368
current = &((*current)->next);
4372
void STag_cell(void)
4374
#line 290 "xmltree_read.act"
4376
*current = new_element();
4379
(*current)->name = (char *) malloc(strlen(A_cell_name)+1);
4380
strcpy ((*current)->name, A_cell_name);
4384
(*current)->rows = strtol (A_cell_rows, NULL, 10);
4387
(*current)->columns = strtol (A_cell_columns, NULL, 10);
4389
(*current)->def_value = value_cell;
4391
lastlist = new_list(lastlist);
4392
lastlist->root = current;
4393
current = &((*current)->child);
4397
void ETag_cell(void)
4399
#line 311 "xmltree_read.act"
4401
/* check (rows, columns) parameters */
4402
if ((*(lastlist->root))->rows * (*(lastlist->root))->columns !=
4403
(*(lastlist->root))->nb_elements) {
4404
warning("incorrect (rows, columns) parameters for cell: reshaping cell into list\n");
4405
(*(lastlist->root))->def_value = value_list;
4406
(*(lastlist->root))->length = (*(lastlist->root))->nb_elements;
4409
current = lastlist->root;
4410
lastlist = pop_list(lastlist);
4412
(*(lastlist->root))->nb_elements++;
4414
current = &((*current)->next);
4419
#line 346 "xmltree_read.act"
4421
element *read_xmltree (const char *file) {
4427
xml_in = fopen(file, "r");
4429
perror("can't open file\n");
4438
/* XML application entry points. */