~ubuntu-branches/ubuntu/saucy/octave-miscellaneous/saucy-proposed

« back to all changes in this revision

Viewing changes to src/xmltree_read.c

  • Committer: Package Import Robot
  • Author(s): Sébastien Villemot, Sébastien Villemot, Rafael Laboissiere
  • Date: 2012-04-02 13:20:23 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120402132023-t41xaso7sl5cex90
Tags: 1.1.0-1
[ Sébastien Villemot ]
* Imported Upstream version 1.1.0
* debian/patches/match-cell-array.patch: remove patch (applied upstream)
* debian/patches/waitbar-rename.patch: remove patch (applied upstream)
* debian/patches/no-flexml.patch: remove obsolete patch, flex no longer used
  (Closes: #666294)
* debian/copyright: reflect upstream changes
* debian/octave-miscellaneous.docs: remove, no more docs in the package
* debian/clean: remove obsolete file
* debian/rules: remove hack for wrong permissions in upstream tarball

[ Rafael Laboissiere ]
* debian/watch: Use the SourceForge redirector

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* A lexical scanner generated by flex */
2
 
 
3
 
/* Scanner skeleton version:
4
 
 * $Header$
5
 
 */
6
 
 
7
 
#define FLEX_SCANNER
8
 
#define XML__FLEX_MAJOR_VERSION 2
9
 
#define XML__FLEX_MINOR_VERSION 5
10
 
 
11
 
#include <stdio.h>
12
 
#include <errno.h>
13
 
 
14
 
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
15
 
#ifdef c_plusplus
16
 
#ifndef __cplusplus
17
 
#define __cplusplus
18
 
#endif
19
 
#endif
20
 
 
21
 
 
22
 
#ifdef __cplusplus
23
 
 
24
 
#include <stdlib.h>
25
 
#ifndef _WIN32
26
 
#include <unistd.h>
27
 
#endif
28
 
 
29
 
/* Use prototypes in function declarations. */
30
 
#define XML__USE_PROTOS
31
 
 
32
 
/* The "const" storage-class-modifier is valid. */
33
 
#define XML__USE_CONST
34
 
 
35
 
#else   /* ! __cplusplus */
36
 
 
37
 
#if __STDC__
38
 
 
39
 
#define XML__USE_PROTOS
40
 
#define XML__USE_CONST
41
 
 
42
 
#endif  /* __STDC__ */
43
 
#endif  /* ! __cplusplus */
44
 
 
45
 
#ifdef __TURBOC__
46
 
 #pragma warn -rch
47
 
 #pragma warn -use
48
 
#include <io.h>
49
 
#include <stdlib.h>
50
 
#define XML__USE_CONST
51
 
#define XML__USE_PROTOS
52
 
#endif
53
 
 
54
 
#ifdef XML__USE_CONST
55
 
#define xml_const const
56
 
#else
57
 
#define xml_const
58
 
#endif
59
 
 
60
 
 
61
 
#ifdef XML__USE_PROTOS
62
 
#define XML__PROTO(proto) proto
63
 
#else
64
 
#define XML__PROTO(proto) ()
65
 
#endif
66
 
 
67
 
 
68
 
/* Returned upon end-of-file. */
69
 
#define XML__NULL 0
70
 
 
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
74
 
 * double cast.
75
 
 */
76
 
#define XML__SC_TO_UI(c) ((unsigned int) (unsigned char) c)
77
 
 
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.
81
 
 */
82
 
#define BEGIN xml__start = 1 + 2 *
83
 
 
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
86
 
 * compatibility.
87
 
 */
88
 
#define XML__START ((xml__start - 1) / 2)
89
 
#define XML_STATE XML__START
90
 
 
91
 
/* Action number for EOF rule of a given start state. */
92
 
#define XML__STATE_EOF(state) (XML__END_OF_BUFFER + state + 1)
93
 
 
94
 
/* Special action meaning "start processing a new file". */
95
 
#define XML__NEW_FILE xml_restart( xml_in )
96
 
 
97
 
#define XML__END_OF_BUFFER_CHAR 0
98
 
 
99
 
/* Size of default input buffer. */
100
 
#define XML__BUF_SIZE 16384
101
 
 
102
 
typedef struct xml__buffer_state *XML__BUFFER_STATE;
103
 
 
104
 
extern int xml_leng;
105
 
extern FILE *xml_in, *xml_out;
106
 
 
107
 
#define EOB_ACT_CONTINUE_SCAN 0
108
 
#define EOB_ACT_END_OF_FILE 1
109
 
#define EOB_ACT_LAST_MATCH 2
110
 
 
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:
114
 
 *
115
 
 *      if ( condition_holds )
116
 
 *              xml_less( 5 );
117
 
 *      else
118
 
 *              do_something_else();
119
 
 *
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.
123
 
 */
124
 
 
125
 
/* Return all but the first 'n' matched characters back to the input stream. */
126
 
 
127
 
#define xml_less(n) \
128
 
        do \
129
 
                { \
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 */ \
135
 
                } \
136
 
        while ( 0 )
137
 
 
138
 
#define unput(c) xml_unput( c, xml_text_ptr )
139
 
 
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).
143
 
 */
144
 
typedef unsigned int xml__size_t;
145
 
 
146
 
 
147
 
struct xml__buffer_state
148
 
        {
149
 
        FILE *xml__input_file;
150
 
 
151
 
        char *xml__ch_buf;              /* input buffer */
152
 
        char *xml__buf_pos;             /* current position in input buffer */
153
 
 
154
 
        /* Size of input buffer in bytes, not including room for EOB
155
 
         * characters.
156
 
         */
157
 
        xml__size_t xml__buf_size;
158
 
 
159
 
        /* Number of characters read into xml__ch_buf, not including EOB
160
 
         * characters.
161
 
         */
162
 
        int xml__n_chars;
163
 
 
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
166
 
         * delete it.
167
 
         */
168
 
        int xml__is_our_buffer;
169
 
 
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
173
 
         * each newline.
174
 
         */
175
 
        int xml__is_interactive;
176
 
 
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
179
 
         * not.
180
 
         */
181
 
        int xml__at_bol;
182
 
 
183
 
        /* Whether to try to fill the input buffer when we reach the
184
 
         * end of it.
185
 
         */
186
 
        int xml__fill_buffer;
187
 
 
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.
196
 
         *
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.
200
 
         */
201
 
#define XML__BUFFER_EOF_PENDING 2
202
 
        };
203
 
 
204
 
static XML__BUFFER_STATE xml__current_buffer = 0;
205
 
 
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
208
 
 * "scanner state".
209
 
 */
210
 
#define XML__CURRENT_BUFFER xml__current_buffer
211
 
 
212
 
 
213
 
/* xml__hold_char holds the character lost when xml_text is formed. */
214
 
static char xml__hold_char;
215
 
 
216
 
static int xml__n_chars;                /* number of characters read into xml__ch_buf */
217
 
 
218
 
 
219
 
int xml_leng;
220
 
 
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 */
225
 
 
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 ...
228
 
 */
229
 
static int xml__did_buffer_switch_on_eof;
230
 
 
231
 
void xml_restart XML__PROTO(( FILE *input_file ));
232
 
 
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 )
240
 
 
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 ));
244
 
 
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 * ));
248
 
 
249
 
#define xml__new_buffer xml__create_buffer
250
 
 
251
 
#define xml__set_interactive(is_interactive) \
252
 
        { \
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; \
256
 
        }
257
 
 
258
 
#define xml__set_bol(at_bol) \
259
 
        { \
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; \
263
 
        }
264
 
 
265
 
#define XML__AT_BOL() (xml__current_buffer->xml__at_bol)
266
 
 
267
 
 
268
 
#define xml_wrap() 1
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
275
 
 
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[] ));
280
 
 
281
 
/* Done after the current pattern has been matched and before the
282
 
 * corresponding action - sets up xml_text.
283
 
 */
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; \
288
 
        *xml__cp = '\0'; \
289
 
        xml__c_buf_p = xml__cp;
290
 
 
291
 
#define XML__NUM_RULES 157
292
 
#define XML__END_OF_BUFFER 158
293
 
static xml_const short int xml__accept[1064] =
294
 
    {   0,
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,
305
 
 
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,
316
 
 
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,
327
 
 
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,
338
 
 
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,
349
 
 
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,
360
 
 
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,
371
 
 
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,
382
 
 
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,
393
 
 
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,
404
 
 
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,
411
 
        0,   19,    0
412
 
    } ;
413
 
 
414
 
static xml_const int xml__ec[256] =
415
 
    {   0,
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,
426
 
 
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,
437
 
 
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,
443
 
        1,    1,    1,    1,    1
444
 
    } ;
445
 
 
446
 
static xml_const int xml__meta[55] =
447
 
    {   0,
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,
453
 
        5,    5,    5,    5
454
 
    } ;
455
 
 
456
 
static xml_const short int xml__base[1112] =
457
 
    {   0,
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,
468
 
 
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,
479
 
 
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,
490
 
 
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,
501
 
 
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,
512
 
 
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,
523
 
 
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,
534
 
 
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,
545
 
 
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,
556
 
 
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,
567
 
 
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,
578
 
 
579
 
     2895, 2901, 2907, 2913, 2919, 2925, 2931, 2937, 2944, 2951,
580
 
     2958
581
 
    } ;
582
 
 
583
 
static xml_const short int xml__def[1112] =
584
 
    {   0,
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,
595
 
 
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,
606
 
 
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,
617
 
 
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,
628
 
 
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,
639
 
 
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,
650
 
 
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,
661
 
 
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,
672
 
 
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,
683
 
 
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,
694
 
 
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,
705
 
 
706
 
     1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
707
 
     1063
708
 
    } ;
709
 
 
710
 
static xml_const short int xml__nxt[3144] =
711
 
    {   0,
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,
722
 
 
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,
733
 
 
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,
744
 
 
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,
755
 
 
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,
766
 
 
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,
777
 
 
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,
788
 
 
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,
799
 
 
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,
810
 
 
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,
821
 
 
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,
832
 
 
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,
843
 
 
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,
854
 
 
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,
865
 
 
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,
876
 
 
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,
887
 
 
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,
898
 
 
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,
909
 
 
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,
920
 
 
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,
931
 
 
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,
942
 
 
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,
953
 
 
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,
964
 
 
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,
975
 
 
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,
986
 
 
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,
997
 
 
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,
1008
 
 
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,
1019
 
 
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,
1030
 
 
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,
1041
 
 
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,
1052
 
 
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,
1057
 
     1063, 1063, 1063
1058
 
    } ;
1059
 
 
1060
 
static xml_const short int xml__chk[3144] =
1061
 
    {   0,
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,
1072
 
 
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,
1083
 
 
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,
1094
 
 
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,
1105
 
 
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,
1116
 
 
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,
1127
 
 
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,
1138
 
 
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,
1149
 
 
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,
1160
 
 
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,
1171
 
 
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,
1182
 
 
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,
1193
 
 
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,
1204
 
 
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,
1215
 
 
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,
1226
 
 
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,
1237
 
 
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,
1248
 
 
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,
1259
 
 
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,
1270
 
 
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,
1281
 
 
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,
1292
 
 
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,
1303
 
 
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,
1314
 
 
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,
1325
 
 
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,
1336
 
 
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,
1347
 
 
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,
1358
 
 
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,
1369
 
 
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,
1380
 
 
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,
1391
 
 
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,
1402
 
 
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,
1407
 
     1063, 1063, 1063
1408
 
    } ;
1409
 
 
1410
 
static xml__state_type xml__last_accepting_state;
1411
 
static char *xml__last_accepting_cpos;
1412
 
 
1413
 
/* The intent behind this definition is that it'll catch
1414
 
 * any uses of REJECT which flex missed.
1415
 
 */
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
1420
 
char *xml_text;
1421
 
#line 1 "xmltree_read.l"
1422
 
#define INITIAL 0
1423
 
/* Validating XML processor for octave.dtd.
1424
 
 * Generated 2004/02/13 14:47:24.
1425
 
 *
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.
1429
 
 *
1430
 
 * You can redistribute and/or modify this program provided the following
1431
 
 * two conditions hold:
1432
 
 *
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.
1436
 
 *
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.
1440
 
 *
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.
1444
 
 */
1445
 
#line 25 "xmltree_read.l"
1446
 
 
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 $";
1452
 
 
1453
 
/* ANSI headers. */
1454
 
#include <unistd.h>
1455
 
#include <stdio.h>
1456
 
#include <string.h>
1457
 
#include <assert.h>
1458
 
#include <stdarg.h>
1459
 
#include <ctype.h>
1460
 
 
1461
 
/* Generated definitions. */
1462
 
#define FLEXML_BUFFERSTACKSIZE 100000
1463
 
 
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);
1483
 
 
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
1516
 
 
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;
1535
 
 
1536
 
/* XML state. */
1537
 
#ifdef FLEX_DEBUG
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*);
1544
 
#else
1545
 
# define ENTER(state)   (xml__push_state(state))
1546
 
# define LEAVE          (xml__pop_state())
1547
 
# define SET(state)     BEGIN(state)
1548
 
#endif
1549
 
 
1550
 
/* Generic actions. */
1551
 
#define SKIP    /*skip*/
1552
 
#define SUCCEED return 0
1553
 
 
1554
 
#define FAIL    return fail
1555
 
static int fail(const char*, ...);
1556
 
 
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];
1562
 
} BufferLast;
1563
 
BufferLast* last = (BufferLast*)0;
1564
 
char* next = bufferstack;
1565
 
 
1566
 
#define BUFFERSET(P)  (P = next)
1567
 
#define BUFFERPUTC(C) (assert(next<limit), *(next++) = (C))
1568
 
#define BUFFERDONE    (BUFFERPUTC('\0'))
1569
 
 
1570
 
#define BUFFERLITERAL(C,P) bufferliteral(C,&(P),xml_text)
1571
 
static void bufferliteral(char c, char** pp, char* text)
1572
 
{
1573
 
  char *s = strchr(text,c), *e = strrchr(text,c);
1574
 
  assert(s <= e); BUFFERSET(*pp);
1575
 
  while (++s<e) {
1576
 
    if (isspace(*s)) { BUFFERPUTC(' '); while (isspace(*s)) ++s; }
1577
 
    else BUFFERPUTC(*s);
1578
 
  } 
1579
 
  BUFFERDONE;
1580
 
}
1581
 
 
1582
 
#ifdef FLEXML_HasMixed
1583
 
static void pushbuffer(char* p)
1584
 
{
1585
 
  BufferLast* l = (BufferLast*)next;
1586
 
  assert(next < limit);
1587
 
  l->old = last;
1588
 
  l->saved = p;
1589
 
  next = l->new;
1590
 
  last = l;
1591
 
}
1592
 
 
1593
 
static char* popbuffer(void)
1594
 
{
1595
 
  BufferLast* l = last;
1596
 
  assert(last != (BufferLast*)0);
1597
 
  last = l->old;
1598
 
  next = (char*)l;
1599
 
  return l->saved;
1600
 
}
1601
 
#endif
1602
 
 
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'):
1618
 
 *
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
1631
 
 */
1632
 
#define PROLOG 1
1633
 
#define DOCTYPE 2
1634
 
#define EPILOG 3
1635
 
#define INCOMMENT 4
1636
 
#define INPI 5
1637
 
#define VALUE1 6
1638
 
#define VALUE2 7
1639
 
#define CDATA 8
1640
 
 
1641
 
#define ROOT_octave 9
1642
 
#define AL_octave 10
1643
 
#define S_octave 11
1644
 
#define E_octave 12
1645
 
 
1646
 
#define ROOT_scalar 13
1647
 
#define AL_scalar 14
1648
 
#define IN_scalar 15
1649
 
 
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
1655
 
 
1656
 
#define ROOT_string 21
1657
 
#define AL_string 22
1658
 
#define IN_string 23
1659
 
 
1660
 
#define ROOT_array 24
1661
 
#define AL_array 25
1662
 
#define S_array 26
1663
 
#define S_array_1 27
1664
 
#define S_array_2 28
1665
 
#define S_array_3 29
1666
 
#define E_array 30
1667
 
 
1668
 
#define ROOT_matrix 31
1669
 
#define AL_matrix 32
1670
 
#define S_matrix 33
1671
 
#define S_matrix_1 34
1672
 
#define S_matrix_2 35
1673
 
#define E_matrix 36
1674
 
 
1675
 
#define ROOT_structure 37
1676
 
#define AL_structure 38
1677
 
#define IN_structure 39
1678
 
 
1679
 
#define ROOT_list 40
1680
 
#define AL_list 41
1681
 
#define IN_list 42
1682
 
 
1683
 
#define ROOT_cell 43
1684
 
#define AL_cell 44
1685
 
#define IN_cell 45
1686
 
 
1687
 
#define IMPOSSIBLE 46
1688
 
 
1689
 
#line 245 "xmltree_read.l"
1690
 
/* State names. */
1691
 
char* statenames[IMPOSSIBLE];
1692
 
 
1693
 
void FleXML_init(void)
1694
 
{
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";
1740
 
}
1741
 
 
1742
 
/* Macros after this point can all be overridden by user definitions in
1743
 
 * section 1.
1744
 
 */
1745
 
 
1746
 
#ifndef XML__SKIP_XML_WRAP
1747
 
#ifdef __cplusplus
1748
 
extern "C" int xml_wrap XML__PROTO(( void ));
1749
 
#else
1750
 
extern int xml_wrap XML__PROTO(( void ));
1751
 
#endif
1752
 
#endif
1753
 
 
1754
 
#ifndef XML__NO_UNPUT
1755
 
static void xml_unput XML__PROTO(( int c, char *buf_ptr ));
1756
 
#endif
1757
 
 
1758
 
#ifndef xml_text_ptr
1759
 
static void xml__flex_strncpy XML__PROTO(( char *, xml_const char *, int ));
1760
 
#endif
1761
 
 
1762
 
#ifdef XML__NEED_STRLEN
1763
 
static int xml__flex_strlen XML__PROTO(( xml_const char * ));
1764
 
#endif
1765
 
 
1766
 
#ifndef XML__NO_INPUT
1767
 
#ifdef __cplusplus
1768
 
static int xml_input XML__PROTO(( void ));
1769
 
#else
1770
 
static int input XML__PROTO(( void ));
1771
 
#endif
1772
 
#endif
1773
 
 
1774
 
#if XML__STACK_USED
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 ));
1780
 
#endif
1781
 
#ifndef XML__NO_POP_STATE
1782
 
static void xml__pop_state XML__PROTO(( void ));
1783
 
#endif
1784
 
#ifndef XML__NO_TOP_STATE
1785
 
static int xml__top_state XML__PROTO(( void ));
1786
 
#endif
1787
 
 
1788
 
#else
1789
 
#define XML__NO_PUSH_STATE 1
1790
 
#define XML__NO_POP_STATE 1
1791
 
#define XML__NO_TOP_STATE 1
1792
 
#endif
1793
 
 
1794
 
#ifdef XML__MALLOC_DECL
1795
 
XML__MALLOC_DECL
1796
 
#else
1797
 
#if __STDC__
1798
 
#ifndef __cplusplus
1799
 
#include <stdlib.h>
1800
 
#endif
1801
 
#else
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).
1805
 
 */
1806
 
#endif
1807
 
#endif
1808
 
 
1809
 
/* Amount of stuff to slurp up with each read. */
1810
 
#ifndef XML__READ_BUF_SIZE
1811
 
#define XML__READ_BUF_SIZE 8192
1812
 
#endif
1813
 
 
1814
 
/* Copy whatever the last rule matched to the standard output. */
1815
 
 
1816
 
#ifndef ECHO
1817
 
/* This used to be an fputs(), but since the string might contain NUL's,
1818
 
 * we now use fwrite().
1819
 
 */
1820
 
#define ECHO (void) fwrite( xml_text, xml_leng, 1, xml_out )
1821
 
#endif
1822
 
 
1823
 
/* Gets input and stuffs it into "buf".  number of characters read, or XML__NULL,
1824
 
 * is returned in "result".
1825
 
 */
1826
 
#ifndef XML__INPUT
1827
 
#define XML__INPUT(buf,result,max_size) \
1828
 
        if ( xml__current_buffer->xml__is_interactive ) \
1829
 
                { \
1830
 
                int c = '*', n; \
1831
 
                for ( n = 0; n < max_size && \
1832
 
                             (c = getc( xml_in )) != EOF && c != '\n'; ++n ) \
1833
 
                        buf[n] = (char) c; \
1834
 
                if ( c == '\n' ) \
1835
 
                        buf[n++] = (char) c; \
1836
 
                if ( c == EOF && ferror( xml_in ) ) \
1837
 
                        XML__FATAL_ERROR( "input in flex scanner failed" ); \
1838
 
                result = n; \
1839
 
                } \
1840
 
        else \
1841
 
                { \
1842
 
                errno=0; \
1843
 
                while ( (result = fread(buf, 1, max_size, xml_in))==0 && ferror(xml_in)) \
1844
 
                        { \
1845
 
                        if( errno != EINTR) \
1846
 
                                { \
1847
 
                                XML__FATAL_ERROR( "input in flex scanner failed" ); \
1848
 
                                break; \
1849
 
                                } \
1850
 
                        errno=0; \
1851
 
                        clearerr(xml_in); \
1852
 
                        } \
1853
 
                }
1854
 
#endif
1855
 
 
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.
1859
 
 */
1860
 
#ifndef xml_terminate
1861
 
#define xml_terminate() return XML__NULL
1862
 
#endif
1863
 
 
1864
 
/* Number of entries by which start-condition stack grows. */
1865
 
#ifndef XML__START_STACK_INCR
1866
 
#define XML__START_STACK_INCR 25
1867
 
#endif
1868
 
 
1869
 
/* Report a fatal error. */
1870
 
#ifndef XML__FATAL_ERROR
1871
 
#define XML__FATAL_ERROR(msg) xml__fatal_error( msg )
1872
 
#endif
1873
 
 
1874
 
/* Default declaration of generated scanner - a define so the user can
1875
 
 * easily add parameters.
1876
 
 */
1877
 
#ifndef XML__DECL
1878
 
#define XML__DECL int xml_lex XML__PROTO(( void ))
1879
 
#endif
1880
 
 
1881
 
/* Code executed at the beginning of each rule, after xml_text and xml_leng
1882
 
 * have been set up.
1883
 
 */
1884
 
#ifndef XML__USER_ACTION
1885
 
#define XML__USER_ACTION
1886
 
#endif
1887
 
 
1888
 
/* Code executed at the end of each rule. */
1889
 
#ifndef XML__BREAK
1890
 
#define XML__BREAK break;
1891
 
#endif
1892
 
 
1893
 
#define XML__RULE_SETUP \
1894
 
        XML__USER_ACTION
1895
 
 
1896
 
XML__DECL
1897
 
        {
1898
 
        register xml__state_type xml__current_state;
1899
 
        register char *xml__cp, *xml__bp;
1900
 
        register int xml__act;
1901
 
 
1902
 
#line 298 "xmltree_read.l"
1903
 
 
1904
 
 
1905
 
 /* Bypass Flex's default INITIAL state and begin by parsing the XML prolog. */
1906
 
 SET(PROLOG); FleXML_init();
1907
 
 
1908
 
 /* COMMENTS and PIs: handled uniformly for efficiency. */
1909
 
 
1910
 
 
1911
 
        if ( xml__init )
1912
 
                {
1913
 
                xml__init = 0;
1914
 
 
1915
 
#ifdef XML__USER_INIT
1916
 
                XML__USER_INIT;
1917
 
#endif
1918
 
 
1919
 
                if ( ! xml__start )
1920
 
                        xml__start = 1; /* first start state */
1921
 
 
1922
 
                if ( ! xml_in )
1923
 
                        xml_in = stdin;
1924
 
 
1925
 
                if ( ! xml_out )
1926
 
                        xml_out = stdout;
1927
 
 
1928
 
                if ( ! xml__current_buffer )
1929
 
                        xml__current_buffer =
1930
 
                                xml__create_buffer( xml_in, XML__BUF_SIZE );
1931
 
 
1932
 
                xml__load_buffer_state();
1933
 
                }
1934
 
 
1935
 
        while ( 1 )             /* loops until end-of-file is reached */
1936
 
                {
1937
 
                xml__cp = xml__c_buf_p;
1938
 
 
1939
 
                /* Support of xml_text. */
1940
 
                *xml__cp = xml__hold_char;
1941
 
 
1942
 
                /* xml__bp points to the position in xml__ch_buf of the start of
1943
 
                 * the current run.
1944
 
                 */
1945
 
                xml__bp = xml__cp;
1946
 
 
1947
 
                xml__current_state = xml__start;
1948
 
xml__match:
1949
 
                do
1950
 
                        {
1951
 
                        register XML__CHAR xml__c = xml__ec[XML__SC_TO_UI(*xml__cp)];
1952
 
                        if ( xml__accept[xml__current_state] )
1953
 
                                {
1954
 
                                xml__last_accepting_state = xml__current_state;
1955
 
                                xml__last_accepting_cpos = xml__cp;
1956
 
                                }
1957
 
                        while ( xml__chk[xml__base[xml__current_state] + xml__c] != xml__current_state )
1958
 
                                {
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];
1962
 
                                }
1963
 
                        xml__current_state = xml__nxt[xml__base[xml__current_state] + (unsigned int) xml__c];
1964
 
                        ++xml__cp;
1965
 
                        }
1966
 
                while ( xml__base[xml__current_state] != 3089 );
1967
 
 
1968
 
xml__find_action:
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];
1975
 
                        }
1976
 
 
1977
 
                XML__DO_BEFORE_ACTION;
1978
 
 
1979
 
 
1980
 
do_action:      /* This label is used only to access EOF actions. */
1981
 
 
1982
 
 
1983
 
                switch ( xml__act )
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;
1991
 
 
1992
 
 
1993
 
case 1:
1994
 
XML__RULE_SETUP
1995
 
#line 306 "xmltree_read.l"
1996
 
ENTER(INCOMMENT);
1997
 
        XML__BREAK
1998
 
case 2:
1999
 
XML__RULE_SETUP
2000
 
#line 307 "xmltree_read.l"
2001
 
ENTER(INPI);
2002
 
        XML__BREAK
2003
 
 
2004
 
 
2005
 
case 3:
2006
 
XML__RULE_SETUP
2007
 
#line 310 "xmltree_read.l"
2008
 
LEAVE;
2009
 
        XML__BREAK
2010
 
case 4:
2011
 
#line 312 "xmltree_read.l"
2012
 
case 5:
2013
 
#line 313 "xmltree_read.l"
2014
 
case 6:
2015
 
XML__RULE_SETUP
2016
 
#line 313 "xmltree_read.l"
2017
 
SKIP;
2018
 
        XML__BREAK
2019
 
case XML__STATE_EOF(INCOMMENT):
2020
 
#line 314 "xmltree_read.l"
2021
 
FAIL("EOF in comment.");
2022
 
        XML__BREAK
2023
 
 
2024
 
 
2025
 
case 7:
2026
 
XML__RULE_SETUP
2027
 
#line 317 "xmltree_read.l"
2028
 
LEAVE;
2029
 
        XML__BREAK
2030
 
case 8:
2031
 
#line 319 "xmltree_read.l"
2032
 
case 9:
2033
 
XML__RULE_SETUP
2034
 
#line 319 "xmltree_read.l"
2035
 
SKIP;
2036
 
        XML__BREAK
2037
 
case XML__STATE_EOF(INPI):
2038
 
#line 320 "xmltree_read.l"
2039
 
FAIL("EOF in PI (processing instruction).");
2040
 
        XML__BREAK
2041
 
 
2042
 
/* SPACES: skipped uniformly */
2043
 
case 10:
2044
 
XML__RULE_SETUP
2045
 
#line 325 "xmltree_read.l"
2046
 
SKIP;
2047
 
        XML__BREAK
2048
 
/* PROLOG: determine root element and process it. */
2049
 
 
2050
 
case 11:
2051
 
XML__RULE_SETUP
2052
 
#line 330 "xmltree_read.l"
2053
 
SET(DOCTYPE);
2054
 
        XML__BREAK
2055
 
case 12:
2056
 
XML__RULE_SETUP
2057
 
#line 331 "xmltree_read.l"
2058
 
FAIL("Bad declaration %s.",xml_text);
2059
 
        XML__BREAK
2060
 
 
2061
 
 
2062
 
case 13:
2063
 
XML__RULE_SETUP
2064
 
#line 335 "xmltree_read.l"
2065
 
SET(ROOT_scalar);
2066
 
        XML__BREAK
2067
 
case 14:
2068
 
XML__RULE_SETUP
2069
 
#line 336 "xmltree_read.l"
2070
 
SET(ROOT_octave);
2071
 
        XML__BREAK
2072
 
case 15:
2073
 
XML__RULE_SETUP
2074
 
#line 337 "xmltree_read.l"
2075
 
SET(ROOT_complex);
2076
 
        XML__BREAK
2077
 
case 16:
2078
 
XML__RULE_SETUP
2079
 
#line 338 "xmltree_read.l"
2080
 
SET(ROOT_string);
2081
 
        XML__BREAK
2082
 
case 17:
2083
 
XML__RULE_SETUP
2084
 
#line 339 "xmltree_read.l"
2085
 
SET(ROOT_matrix);
2086
 
        XML__BREAK
2087
 
case 18:
2088
 
XML__RULE_SETUP
2089
 
#line 340 "xmltree_read.l"
2090
 
SET(ROOT_array);
2091
 
        XML__BREAK
2092
 
case 19:
2093
 
XML__RULE_SETUP
2094
 
#line 341 "xmltree_read.l"
2095
 
SET(ROOT_structure);
2096
 
        XML__BREAK
2097
 
case 20:
2098
 
XML__RULE_SETUP
2099
 
#line 342 "xmltree_read.l"
2100
 
SET(ROOT_cell);
2101
 
        XML__BREAK
2102
 
case 21:
2103
 
XML__RULE_SETUP
2104
 
#line 343 "xmltree_read.l"
2105
 
SET(ROOT_list);
2106
 
        XML__BREAK
2107
 
case 22:
2108
 
XML__RULE_SETUP
2109
 
#line 344 "xmltree_read.l"
2110
 
FAIL("Bad declaration %s.",xml_text);
2111
 
        XML__BREAK
2112
 
case 23:
2113
 
XML__RULE_SETUP
2114
 
#line 345 "xmltree_read.l"
2115
 
FAIL("Unexpected character `%c' in prolog.", xml_text[0]);
2116
 
        XML__BREAK
2117
 
case XML__STATE_EOF(PROLOG):
2118
 
case XML__STATE_EOF(DOCTYPE):
2119
 
#line 346 "xmltree_read.l"
2120
 
FAIL("EOF in prolog.");
2121
 
        XML__BREAK
2122
 
 
2123
 
/* RULES DERIVED FROM DTD. */
2124
 
case 24:
2125
 
XML__RULE_SETUP
2126
 
#line 351 "xmltree_read.l"
2127
 
{
2128
 
  ENTER(AL_octave);
2129
 
  }
2130
 
        XML__BREAK
2131
 
 
2132
 
case 25:
2133
 
XML__RULE_SETUP
2134
 
#line 356 "xmltree_read.l"
2135
 
{
2136
 
  LEAVE; STag_octave(); pcdata = NULL; ENTER(S_octave);
2137
 
 }
2138
 
        XML__BREAK
2139
 
case 26:
2140
 
XML__RULE_SETUP
2141
 
#line 359 "xmltree_read.l"
2142
 
FAIL("`octave' element cannot be empty.");
2143
 
        XML__BREAK
2144
 
case 27:
2145
 
XML__RULE_SETUP
2146
 
#line 360 "xmltree_read.l"
2147
 
FAIL("Unexpected character `%c' in attribute list of octave element.", xml_text[0]);
2148
 
        XML__BREAK
2149
 
case 28:
2150
 
XML__RULE_SETUP
2151
 
#line 361 "xmltree_read.l"
2152
 
FAIL("Bad attribute `%s' in `octave' element start tag.",xml_text);
2153
 
        XML__BREAK
2154
 
case XML__STATE_EOF(AL_octave):
2155
 
#line 362 "xmltree_read.l"
2156
 
FAIL("EOF in attribute list of `octave' element.");
2157
 
        XML__BREAK
2158
 
 
2159
 
 
2160
 
case 29:
2161
 
XML__RULE_SETUP
2162
 
#line 366 "xmltree_read.l"
2163
 
{
2164
 
  LEAVE;
2165
 
  ETag_octave();
2166
 
  switch (XML__START) {
2167
 
   case ROOT_octave: SET(EPILOG); break;
2168
 
  }
2169
 
 }
2170
 
        XML__BREAK
2171
 
case 30:
2172
 
XML__RULE_SETUP
2173
 
#line 373 "xmltree_read.l"
2174
 
FAIL("Unexpected end-tag `%s': `</octave>' expected.",xml_text);
2175
 
        XML__BREAK
2176
 
case 31:
2177
 
XML__RULE_SETUP
2178
 
#line 374 "xmltree_read.l"
2179
 
FAIL("Unexpected character `%c': `</octave>' expected.",xml_text[0]);
2180
 
        XML__BREAK
2181
 
case XML__STATE_EOF(E_octave):
2182
 
#line 375 "xmltree_read.l"
2183
 
FAIL("Premature EOF: `</octave>' expected.");
2184
 
        XML__BREAK
2185
 
 
2186
 
/*      value (undefined | true | false | inf | neginf | na | nan) "undefined"
2187
 
  *     name CDATA #IMPLIED>  */
2188
 
case 32:
2189
 
XML__RULE_SETUP
2190
 
#line 381 "xmltree_read.l"
2191
 
{
2192
 
  A_scalar_value = A_scalar_value_undefined;
2193
 
  A_scalar_name = NULL;
2194
 
  ENTER(AL_scalar);
2195
 
  }
2196
 
        XML__BREAK
2197
 
 
2198
 
case 33:
2199
 
#line 389 "xmltree_read.l"
2200
 
case 34:
2201
 
XML__RULE_SETUP
2202
 
#line 389 "xmltree_read.l"
2203
 
A_scalar_value = A_scalar_value_undefined;
2204
 
        XML__BREAK
2205
 
case 35:
2206
 
#line 391 "xmltree_read.l"
2207
 
case 36:
2208
 
XML__RULE_SETUP
2209
 
#line 391 "xmltree_read.l"
2210
 
A_scalar_value = A_scalar_value_true;
2211
 
        XML__BREAK
2212
 
case 37:
2213
 
#line 393 "xmltree_read.l"
2214
 
case 38:
2215
 
XML__RULE_SETUP
2216
 
#line 393 "xmltree_read.l"
2217
 
A_scalar_value = A_scalar_value_false;
2218
 
        XML__BREAK
2219
 
case 39:
2220
 
#line 395 "xmltree_read.l"
2221
 
case 40:
2222
 
XML__RULE_SETUP
2223
 
#line 395 "xmltree_read.l"
2224
 
A_scalar_value = A_scalar_value_inf;
2225
 
        XML__BREAK
2226
 
case 41:
2227
 
#line 397 "xmltree_read.l"
2228
 
case 42:
2229
 
XML__RULE_SETUP
2230
 
#line 397 "xmltree_read.l"
2231
 
A_scalar_value = A_scalar_value_neginf;
2232
 
        XML__BREAK
2233
 
case 43:
2234
 
#line 399 "xmltree_read.l"
2235
 
case 44:
2236
 
XML__RULE_SETUP
2237
 
#line 399 "xmltree_read.l"
2238
 
A_scalar_value = A_scalar_value_na;
2239
 
        XML__BREAK
2240
 
case 45:
2241
 
#line 401 "xmltree_read.l"
2242
 
case 46:
2243
 
XML__RULE_SETUP
2244
 
#line 401 "xmltree_read.l"
2245
 
A_scalar_value = A_scalar_value_nan;
2246
 
        XML__BREAK
2247
 
case 47:
2248
 
XML__RULE_SETUP
2249
 
#line 403 "xmltree_read.l"
2250
 
ENTER(VALUE1); BUFFERSET(A_scalar_name);
2251
 
        XML__BREAK
2252
 
case 48:
2253
 
XML__RULE_SETUP
2254
 
#line 404 "xmltree_read.l"
2255
 
ENTER(VALUE2); BUFFERSET(A_scalar_name);
2256
 
        XML__BREAK
2257
 
case 49:
2258
 
XML__RULE_SETUP
2259
 
#line 406 "xmltree_read.l"
2260
 
{
2261
 
  LEAVE; STag_scalar(); pcdata = BUFFERSET(pcdata); ENTER(IN_scalar);
2262
 
 }
2263
 
        XML__BREAK
2264
 
case 50:
2265
 
XML__RULE_SETUP
2266
 
#line 409 "xmltree_read.l"
2267
 
{
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;
2275
 
  }
2276
 
 }
2277
 
        XML__BREAK
2278
 
case 51:
2279
 
XML__RULE_SETUP
2280
 
#line 419 "xmltree_read.l"
2281
 
FAIL("Unexpected character `%c' in attribute list of scalar element.", xml_text[0]);
2282
 
        XML__BREAK
2283
 
case 52:
2284
 
XML__RULE_SETUP
2285
 
#line 420 "xmltree_read.l"
2286
 
FAIL("Bad attribute `%s' in `scalar' element start tag.",xml_text);
2287
 
        XML__BREAK
2288
 
case XML__STATE_EOF(AL_scalar):
2289
 
#line 421 "xmltree_read.l"
2290
 
FAIL("EOF in attribute list of `scalar' element.");
2291
 
        XML__BREAK
2292
 
 
2293
 
 
2294
 
case 53:
2295
 
XML__RULE_SETUP
2296
 
#line 425 "xmltree_read.l"
2297
 
{
2298
 
  LEAVE;
2299
 
  BUFFERDONE;
2300
 
  ETag_scalar();
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;
2307
 
  }
2308
 
 }
2309
 
        XML__BREAK
2310
 
case 54:
2311
 
XML__RULE_SETUP
2312
 
#line 437 "xmltree_read.l"
2313
 
FAIL("Unexpected end-tag `%s': `</scalar>' expected.",xml_text);
2314
 
        XML__BREAK
2315
 
case XML__STATE_EOF(IN_scalar):
2316
 
#line 438 "xmltree_read.l"
2317
 
FAIL("Premature EOF: `</scalar>' expected.");
2318
 
        XML__BREAK
2319
 
 
2320
 
case 55:
2321
 
XML__RULE_SETUP
2322
 
#line 441 "xmltree_read.l"
2323
 
{
2324
 
  A_complex_name = NULL;
2325
 
  ENTER(AL_complex);
2326
 
  }
2327
 
        XML__BREAK
2328
 
 
2329
 
case 56:
2330
 
XML__RULE_SETUP
2331
 
#line 447 "xmltree_read.l"
2332
 
ENTER(VALUE1); BUFFERSET(A_complex_name);
2333
 
        XML__BREAK
2334
 
case 57:
2335
 
XML__RULE_SETUP
2336
 
#line 448 "xmltree_read.l"
2337
 
ENTER(VALUE2); BUFFERSET(A_complex_name);
2338
 
        XML__BREAK
2339
 
case 58:
2340
 
XML__RULE_SETUP
2341
 
#line 450 "xmltree_read.l"
2342
 
{
2343
 
  LEAVE; STag_complex(); pcdata = NULL; ENTER(S_complex);
2344
 
 }
2345
 
        XML__BREAK
2346
 
case 59:
2347
 
XML__RULE_SETUP
2348
 
#line 453 "xmltree_read.l"
2349
 
FAIL("`complex' element cannot be empty.");
2350
 
        XML__BREAK
2351
 
case 60:
2352
 
XML__RULE_SETUP
2353
 
#line 454 "xmltree_read.l"
2354
 
FAIL("Unexpected character `%c' in attribute list of complex element.", xml_text[0]);
2355
 
        XML__BREAK
2356
 
case 61:
2357
 
XML__RULE_SETUP
2358
 
#line 455 "xmltree_read.l"
2359
 
FAIL("Bad attribute `%s' in `complex' element start tag.",xml_text);
2360
 
        XML__BREAK
2361
 
case XML__STATE_EOF(AL_complex):
2362
 
#line 456 "xmltree_read.l"
2363
 
FAIL("EOF in attribute list of `complex' element.");
2364
 
        XML__BREAK
2365
 
 
2366
 
 
2367
 
case 62:
2368
 
XML__RULE_SETUP
2369
 
#line 460 "xmltree_read.l"
2370
 
{
2371
 
  LEAVE;
2372
 
  ETag_complex();
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;
2377
 
  }
2378
 
 }
2379
 
        XML__BREAK
2380
 
case 63:
2381
 
XML__RULE_SETUP
2382
 
#line 469 "xmltree_read.l"
2383
 
FAIL("Unexpected end-tag `%s': `</complex>' expected.",xml_text);
2384
 
        XML__BREAK
2385
 
case 64:
2386
 
XML__RULE_SETUP
2387
 
#line 470 "xmltree_read.l"
2388
 
FAIL("Unexpected character `%c': `</complex>' expected.",xml_text[0]);
2389
 
        XML__BREAK
2390
 
case XML__STATE_EOF(E_complex):
2391
 
#line 471 "xmltree_read.l"
2392
 
FAIL("Premature EOF: `</complex>' expected.");
2393
 
        XML__BREAK
2394
 
 
2395
 
/*      length CDATA #REQUIRED
2396
 
  *     name CDATA #IMPLIED>  */
2397
 
case 65:
2398
 
XML__RULE_SETUP
2399
 
#line 477 "xmltree_read.l"
2400
 
{
2401
 
  A_string_length = NULL;
2402
 
  A_string_name = NULL;
2403
 
  ENTER(AL_string);
2404
 
  }
2405
 
        XML__BREAK
2406
 
 
2407
 
case 66:
2408
 
XML__RULE_SETUP
2409
 
#line 484 "xmltree_read.l"
2410
 
ENTER(VALUE1); BUFFERSET(A_string_length);
2411
 
        XML__BREAK
2412
 
case 67:
2413
 
XML__RULE_SETUP
2414
 
#line 485 "xmltree_read.l"
2415
 
ENTER(VALUE2); BUFFERSET(A_string_length);
2416
 
        XML__BREAK
2417
 
case 68:
2418
 
XML__RULE_SETUP
2419
 
#line 487 "xmltree_read.l"
2420
 
ENTER(VALUE1); BUFFERSET(A_string_name);
2421
 
        XML__BREAK
2422
 
case 69:
2423
 
XML__RULE_SETUP
2424
 
#line 488 "xmltree_read.l"
2425
 
ENTER(VALUE2); BUFFERSET(A_string_name);
2426
 
        XML__BREAK
2427
 
case 70:
2428
 
XML__RULE_SETUP
2429
 
#line 490 "xmltree_read.l"
2430
 
{
2431
 
  if (!A_string_length) FAIL("Required attribute `length' not set for `string' element.");
2432
 
  LEAVE; STag_string(); pcdata = BUFFERSET(pcdata); ENTER(IN_string);
2433
 
 }
2434
 
        XML__BREAK
2435
 
case 71:
2436
 
XML__RULE_SETUP
2437
 
#line 494 "xmltree_read.l"
2438
 
{
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;
2446
 
  }
2447
 
 }
2448
 
        XML__BREAK
2449
 
case 72:
2450
 
XML__RULE_SETUP
2451
 
#line 504 "xmltree_read.l"
2452
 
FAIL("Unexpected character `%c' in attribute list of string element.", xml_text[0]);
2453
 
        XML__BREAK
2454
 
case 73:
2455
 
XML__RULE_SETUP
2456
 
#line 505 "xmltree_read.l"
2457
 
FAIL("Bad attribute `%s' in `string' element start tag.",xml_text);
2458
 
        XML__BREAK
2459
 
case XML__STATE_EOF(AL_string):
2460
 
#line 506 "xmltree_read.l"
2461
 
FAIL("EOF in attribute list of `string' element.");
2462
 
        XML__BREAK
2463
 
 
2464
 
 
2465
 
case 74:
2466
 
XML__RULE_SETUP
2467
 
#line 510 "xmltree_read.l"
2468
 
{
2469
 
  LEAVE;
2470
 
  BUFFERDONE;
2471
 
  ETag_string();
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;
2477
 
  }
2478
 
 }
2479
 
        XML__BREAK
2480
 
case 75:
2481
 
XML__RULE_SETUP
2482
 
#line 521 "xmltree_read.l"
2483
 
FAIL("Unexpected end-tag `%s': `</string>' expected.",xml_text);
2484
 
        XML__BREAK
2485
 
case XML__STATE_EOF(IN_string):
2486
 
#line 522 "xmltree_read.l"
2487
 
FAIL("Premature EOF: `</string>' expected.");
2488
 
        XML__BREAK
2489
 
 
2490
 
/*      rows CDATA #REQUIRED
2491
 
  *     name CDATA #IMPLIED>  */
2492
 
case 76:
2493
 
XML__RULE_SETUP
2494
 
#line 528 "xmltree_read.l"
2495
 
{
2496
 
  A_array_rows = NULL;
2497
 
  A_array_name = NULL;
2498
 
  ENTER(AL_array);
2499
 
  }
2500
 
        XML__BREAK
2501
 
 
2502
 
case 77:
2503
 
XML__RULE_SETUP
2504
 
#line 535 "xmltree_read.l"
2505
 
ENTER(VALUE1); BUFFERSET(A_array_rows);
2506
 
        XML__BREAK
2507
 
case 78:
2508
 
XML__RULE_SETUP
2509
 
#line 536 "xmltree_read.l"
2510
 
ENTER(VALUE2); BUFFERSET(A_array_rows);
2511
 
        XML__BREAK
2512
 
case 79:
2513
 
XML__RULE_SETUP
2514
 
#line 538 "xmltree_read.l"
2515
 
ENTER(VALUE1); BUFFERSET(A_array_name);
2516
 
        XML__BREAK
2517
 
case 80:
2518
 
XML__RULE_SETUP
2519
 
#line 539 "xmltree_read.l"
2520
 
ENTER(VALUE2); BUFFERSET(A_array_name);
2521
 
        XML__BREAK
2522
 
case 81:
2523
 
XML__RULE_SETUP
2524
 
#line 541 "xmltree_read.l"
2525
 
{
2526
 
  if (!A_array_rows) FAIL("Required attribute `rows' not set for `array' element.");
2527
 
  LEAVE; STag_array(); pcdata = NULL; ENTER(S_array);
2528
 
 }
2529
 
        XML__BREAK
2530
 
case 82:
2531
 
XML__RULE_SETUP
2532
 
#line 545 "xmltree_read.l"
2533
 
FAIL("`array' element cannot be empty.");
2534
 
        XML__BREAK
2535
 
case 83:
2536
 
XML__RULE_SETUP
2537
 
#line 546 "xmltree_read.l"
2538
 
FAIL("Unexpected character `%c' in attribute list of array element.", xml_text[0]);
2539
 
        XML__BREAK
2540
 
case 84:
2541
 
XML__RULE_SETUP
2542
 
#line 547 "xmltree_read.l"
2543
 
FAIL("Bad attribute `%s' in `array' element start tag.",xml_text);
2544
 
        XML__BREAK
2545
 
case XML__STATE_EOF(AL_array):
2546
 
#line 548 "xmltree_read.l"
2547
 
FAIL("EOF in attribute list of `array' element.");
2548
 
        XML__BREAK
2549
 
 
2550
 
 
2551
 
case 85:
2552
 
XML__RULE_SETUP
2553
 
#line 552 "xmltree_read.l"
2554
 
{
2555
 
  LEAVE;
2556
 
  ETag_array();
2557
 
  switch (XML__START) {
2558
 
   case S_octave: SET(E_octave); break;
2559
 
   case ROOT_array: SET(EPILOG); break;
2560
 
  }
2561
 
 }
2562
 
        XML__BREAK
2563
 
case 86:
2564
 
XML__RULE_SETUP
2565
 
#line 560 "xmltree_read.l"
2566
 
FAIL("Unexpected end-tag `%s': `</array>' expected.",xml_text);
2567
 
        XML__BREAK
2568
 
case 87:
2569
 
XML__RULE_SETUP
2570
 
#line 561 "xmltree_read.l"
2571
 
FAIL("Unexpected character `%c': `</array>' expected.",xml_text[0]);
2572
 
        XML__BREAK
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.");
2577
 
        XML__BREAK
2578
 
 
2579
 
/*      rows CDATA #REQUIRED
2580
 
  *     columns  CDATA #REQUIRED
2581
 
  *     name CDATA #IMPLIED>  */
2582
 
case 88:
2583
 
XML__RULE_SETUP
2584
 
#line 569 "xmltree_read.l"
2585
 
{
2586
 
  A_matrix_rows = NULL;
2587
 
  A_matrix_columns = NULL;
2588
 
  A_matrix_name = NULL;
2589
 
  ENTER(AL_matrix);
2590
 
  }
2591
 
        XML__BREAK
2592
 
 
2593
 
case 89:
2594
 
XML__RULE_SETUP
2595
 
#line 577 "xmltree_read.l"
2596
 
ENTER(VALUE1); BUFFERSET(A_matrix_rows);
2597
 
        XML__BREAK
2598
 
case 90:
2599
 
XML__RULE_SETUP
2600
 
#line 578 "xmltree_read.l"
2601
 
ENTER(VALUE2); BUFFERSET(A_matrix_rows);
2602
 
        XML__BREAK
2603
 
case 91:
2604
 
XML__RULE_SETUP
2605
 
#line 580 "xmltree_read.l"
2606
 
ENTER(VALUE1); BUFFERSET(A_matrix_columns);
2607
 
        XML__BREAK
2608
 
case 92:
2609
 
XML__RULE_SETUP
2610
 
#line 581 "xmltree_read.l"
2611
 
ENTER(VALUE2); BUFFERSET(A_matrix_columns);
2612
 
        XML__BREAK
2613
 
case 93:
2614
 
XML__RULE_SETUP
2615
 
#line 583 "xmltree_read.l"
2616
 
ENTER(VALUE1); BUFFERSET(A_matrix_name);
2617
 
        XML__BREAK
2618
 
case 94:
2619
 
XML__RULE_SETUP
2620
 
#line 584 "xmltree_read.l"
2621
 
ENTER(VALUE2); BUFFERSET(A_matrix_name);
2622
 
        XML__BREAK
2623
 
case 95:
2624
 
XML__RULE_SETUP
2625
 
#line 586 "xmltree_read.l"
2626
 
{
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);
2630
 
 }
2631
 
        XML__BREAK
2632
 
case 96:
2633
 
XML__RULE_SETUP
2634
 
#line 591 "xmltree_read.l"
2635
 
{
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;
2641
 
  }
2642
 
 }
2643
 
        XML__BREAK
2644
 
case 97:
2645
 
XML__RULE_SETUP
2646
 
#line 599 "xmltree_read.l"
2647
 
FAIL("Unexpected character `%c' in attribute list of matrix element.", xml_text[0]);
2648
 
        XML__BREAK
2649
 
case 98:
2650
 
XML__RULE_SETUP
2651
 
#line 600 "xmltree_read.l"
2652
 
FAIL("Bad attribute `%s' in `matrix' element start tag.",xml_text);
2653
 
        XML__BREAK
2654
 
case XML__STATE_EOF(AL_matrix):
2655
 
#line 601 "xmltree_read.l"
2656
 
FAIL("EOF in attribute list of `matrix' element.");
2657
 
        XML__BREAK
2658
 
 
2659
 
 
2660
 
case 99:
2661
 
XML__RULE_SETUP
2662
 
#line 605 "xmltree_read.l"
2663
 
{
2664
 
  LEAVE;
2665
 
  ETag_matrix();
2666
 
  switch (XML__START) {
2667
 
   case ROOT_matrix: SET(EPILOG); break;
2668
 
  }
2669
 
 }
2670
 
        XML__BREAK
2671
 
case 100:
2672
 
XML__RULE_SETUP
2673
 
#line 612 "xmltree_read.l"
2674
 
FAIL("Unexpected end-tag `%s': `</matrix>' expected.",xml_text);
2675
 
        XML__BREAK
2676
 
case 101:
2677
 
XML__RULE_SETUP
2678
 
#line 613 "xmltree_read.l"
2679
 
FAIL("Unexpected character `%c': `</matrix>' expected.",xml_text[0]);
2680
 
        XML__BREAK
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.");
2686
 
        XML__BREAK
2687
 
 
2688
 
case 102:
2689
 
XML__RULE_SETUP
2690
 
#line 617 "xmltree_read.l"
2691
 
{
2692
 
  A_structure_name = NULL;
2693
 
  ENTER(AL_structure);
2694
 
  }
2695
 
        XML__BREAK
2696
 
 
2697
 
case 103:
2698
 
XML__RULE_SETUP
2699
 
#line 623 "xmltree_read.l"
2700
 
ENTER(VALUE1); BUFFERSET(A_structure_name);
2701
 
        XML__BREAK
2702
 
case 104:
2703
 
XML__RULE_SETUP
2704
 
#line 624 "xmltree_read.l"
2705
 
ENTER(VALUE2); BUFFERSET(A_structure_name);
2706
 
        XML__BREAK
2707
 
case 105:
2708
 
XML__RULE_SETUP
2709
 
#line 626 "xmltree_read.l"
2710
 
{
2711
 
  LEAVE; STag_structure(); pcdata = BUFFERSET(pcdata); ENTER(IN_structure);
2712
 
 }
2713
 
        XML__BREAK
2714
 
case 106:
2715
 
XML__RULE_SETUP
2716
 
#line 629 "xmltree_read.l"
2717
 
{
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;
2722
 
  }
2723
 
 }
2724
 
        XML__BREAK
2725
 
case 107:
2726
 
XML__RULE_SETUP
2727
 
#line 636 "xmltree_read.l"
2728
 
FAIL("Unexpected character `%c' in attribute list of structure element.", xml_text[0]);
2729
 
        XML__BREAK
2730
 
case 108:
2731
 
XML__RULE_SETUP
2732
 
#line 637 "xmltree_read.l"
2733
 
FAIL("Bad attribute `%s' in `structure' element start tag.",xml_text);
2734
 
        XML__BREAK
2735
 
case XML__STATE_EOF(AL_structure):
2736
 
#line 638 "xmltree_read.l"
2737
 
FAIL("EOF in attribute list of `structure' element.");
2738
 
        XML__BREAK
2739
 
 
2740
 
 
2741
 
case 109:
2742
 
XML__RULE_SETUP
2743
 
#line 642 "xmltree_read.l"
2744
 
{
2745
 
  LEAVE;
2746
 
  BUFFERDONE;
2747
 
  ETag_structure();
2748
 
  switch (XML__START) {
2749
 
   case S_octave: SET(E_octave); break;
2750
 
   case ROOT_structure: SET(EPILOG); break;
2751
 
  }
2752
 
 }
2753
 
        XML__BREAK
2754
 
case 110:
2755
 
XML__RULE_SETUP
2756
 
#line 651 "xmltree_read.l"
2757
 
FAIL("Unexpected end-tag `%s': `</structure>' expected.",xml_text);
2758
 
        XML__BREAK
2759
 
case XML__STATE_EOF(IN_structure):
2760
 
#line 652 "xmltree_read.l"
2761
 
FAIL("Premature EOF: `</structure>' expected.");
2762
 
        XML__BREAK
2763
 
 
2764
 
/*      length CDATA #REQUIRED
2765
 
  *     name CDATA #IMPLIED>  */
2766
 
case 111:
2767
 
XML__RULE_SETUP
2768
 
#line 658 "xmltree_read.l"
2769
 
{
2770
 
  A_list_length = NULL;
2771
 
  A_list_name = NULL;
2772
 
  ENTER(AL_list);
2773
 
  }
2774
 
        XML__BREAK
2775
 
 
2776
 
case 112:
2777
 
XML__RULE_SETUP
2778
 
#line 665 "xmltree_read.l"
2779
 
ENTER(VALUE1); BUFFERSET(A_list_length);
2780
 
        XML__BREAK
2781
 
case 113:
2782
 
XML__RULE_SETUP
2783
 
#line 666 "xmltree_read.l"
2784
 
ENTER(VALUE2); BUFFERSET(A_list_length);
2785
 
        XML__BREAK
2786
 
case 114:
2787
 
XML__RULE_SETUP
2788
 
#line 668 "xmltree_read.l"
2789
 
ENTER(VALUE1); BUFFERSET(A_list_name);
2790
 
        XML__BREAK
2791
 
case 115:
2792
 
XML__RULE_SETUP
2793
 
#line 669 "xmltree_read.l"
2794
 
ENTER(VALUE2); BUFFERSET(A_list_name);
2795
 
        XML__BREAK
2796
 
case 116:
2797
 
XML__RULE_SETUP
2798
 
#line 671 "xmltree_read.l"
2799
 
{
2800
 
  if (!A_list_length) FAIL("Required attribute `length' not set for `list' element.");
2801
 
  LEAVE; STag_list(); pcdata = BUFFERSET(pcdata); ENTER(IN_list);
2802
 
 }
2803
 
        XML__BREAK
2804
 
case 117:
2805
 
XML__RULE_SETUP
2806
 
#line 675 "xmltree_read.l"
2807
 
{
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;
2813
 
  }
2814
 
 }
2815
 
        XML__BREAK
2816
 
case 118:
2817
 
XML__RULE_SETUP
2818
 
#line 683 "xmltree_read.l"
2819
 
FAIL("Unexpected character `%c' in attribute list of list element.", xml_text[0]);
2820
 
        XML__BREAK
2821
 
case 119:
2822
 
XML__RULE_SETUP
2823
 
#line 684 "xmltree_read.l"
2824
 
FAIL("Bad attribute `%s' in `list' element start tag.",xml_text);
2825
 
        XML__BREAK
2826
 
case XML__STATE_EOF(AL_list):
2827
 
#line 685 "xmltree_read.l"
2828
 
FAIL("EOF in attribute list of `list' element.");
2829
 
        XML__BREAK
2830
 
 
2831
 
 
2832
 
case 120:
2833
 
XML__RULE_SETUP
2834
 
#line 689 "xmltree_read.l"
2835
 
{
2836
 
  LEAVE;
2837
 
  BUFFERDONE;
2838
 
  ETag_list();
2839
 
  switch (XML__START) {
2840
 
   case S_octave: SET(E_octave); break;
2841
 
   case ROOT_list: SET(EPILOG); break;
2842
 
  }
2843
 
 }
2844
 
        XML__BREAK
2845
 
case 121:
2846
 
XML__RULE_SETUP
2847
 
#line 698 "xmltree_read.l"
2848
 
FAIL("Unexpected end-tag `%s': `</list>' expected.",xml_text);
2849
 
        XML__BREAK
2850
 
case XML__STATE_EOF(IN_list):
2851
 
#line 699 "xmltree_read.l"
2852
 
FAIL("Premature EOF: `</list>' expected.");
2853
 
        XML__BREAK
2854
 
 
2855
 
/*      rows CDATA #REQUIRED
2856
 
  *     columns CDATA #REQUIRED
2857
 
  *     name CDATA #IMPLIED>  */
2858
 
case 122:
2859
 
XML__RULE_SETUP
2860
 
#line 706 "xmltree_read.l"
2861
 
{
2862
 
  A_cell_rows = NULL;
2863
 
  A_cell_columns = NULL;
2864
 
  A_cell_name = NULL;
2865
 
  ENTER(AL_cell);
2866
 
  }
2867
 
        XML__BREAK
2868
 
 
2869
 
case 123:
2870
 
XML__RULE_SETUP
2871
 
#line 714 "xmltree_read.l"
2872
 
ENTER(VALUE1); BUFFERSET(A_cell_rows);
2873
 
        XML__BREAK
2874
 
case 124:
2875
 
XML__RULE_SETUP
2876
 
#line 715 "xmltree_read.l"
2877
 
ENTER(VALUE2); BUFFERSET(A_cell_rows);
2878
 
        XML__BREAK
2879
 
case 125:
2880
 
XML__RULE_SETUP
2881
 
#line 717 "xmltree_read.l"
2882
 
ENTER(VALUE1); BUFFERSET(A_cell_columns);
2883
 
        XML__BREAK
2884
 
case 126:
2885
 
XML__RULE_SETUP
2886
 
#line 718 "xmltree_read.l"
2887
 
ENTER(VALUE2); BUFFERSET(A_cell_columns);
2888
 
        XML__BREAK
2889
 
case 127:
2890
 
XML__RULE_SETUP
2891
 
#line 720 "xmltree_read.l"
2892
 
ENTER(VALUE1); BUFFERSET(A_cell_name);
2893
 
        XML__BREAK
2894
 
case 128:
2895
 
XML__RULE_SETUP
2896
 
#line 721 "xmltree_read.l"
2897
 
ENTER(VALUE2); BUFFERSET(A_cell_name);
2898
 
        XML__BREAK
2899
 
case 129:
2900
 
XML__RULE_SETUP
2901
 
#line 723 "xmltree_read.l"
2902
 
{
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);
2906
 
 }
2907
 
        XML__BREAK
2908
 
case 130:
2909
 
XML__RULE_SETUP
2910
 
#line 728 "xmltree_read.l"
2911
 
{
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;
2918
 
  }
2919
 
 }
2920
 
        XML__BREAK
2921
 
case 131:
2922
 
XML__RULE_SETUP
2923
 
#line 737 "xmltree_read.l"
2924
 
FAIL("Unexpected character `%c' in attribute list of cell element.", xml_text[0]);
2925
 
        XML__BREAK
2926
 
case 132:
2927
 
XML__RULE_SETUP
2928
 
#line 738 "xmltree_read.l"
2929
 
FAIL("Bad attribute `%s' in `cell' element start tag.",xml_text);
2930
 
        XML__BREAK
2931
 
case XML__STATE_EOF(AL_cell):
2932
 
#line 739 "xmltree_read.l"
2933
 
FAIL("EOF in attribute list of `cell' element.");
2934
 
        XML__BREAK
2935
 
 
2936
 
 
2937
 
case 133:
2938
 
XML__RULE_SETUP
2939
 
#line 743 "xmltree_read.l"
2940
 
{
2941
 
  LEAVE;
2942
 
  BUFFERDONE;
2943
 
  ETag_cell();
2944
 
  switch (XML__START) {
2945
 
   case S_octave: SET(E_octave); break;
2946
 
   case ROOT_cell: SET(EPILOG); break;
2947
 
  }
2948
 
 }
2949
 
        XML__BREAK
2950
 
case 134:
2951
 
XML__RULE_SETUP
2952
 
#line 752 "xmltree_read.l"
2953
 
FAIL("Unexpected end-tag `%s': `</cell>' expected.",xml_text);
2954
 
        XML__BREAK
2955
 
case XML__STATE_EOF(IN_cell):
2956
 
#line 753 "xmltree_read.l"
2957
 
FAIL("Premature EOF: `</cell>' expected.");
2958
 
        XML__BREAK
2959
 
 
2960
 
/* EPILOG: after the root element. */
2961
 
 
2962
 
case 135:
2963
 
XML__RULE_SETUP
2964
 
#line 759 "xmltree_read.l"
2965
 
FAIL("Unexpected character `%c' after document.", xml_text[0]);
2966
 
        XML__BREAK
2967
 
case XML__STATE_EOF(EPILOG):
2968
 
#line 760 "xmltree_read.l"
2969
 
SUCCEED;
2970
 
        XML__BREAK
2971
 
 
2972
 
/* CHARACTER DATA. */
2973
 
 
2974
 
/* Non-defined standard entities... */
2975
 
case 136:
2976
 
XML__RULE_SETUP
2977
 
#line 767 "xmltree_read.l"
2978
 
BUFFERPUTC('&');
2979
 
        XML__BREAK
2980
 
case 137:
2981
 
XML__RULE_SETUP
2982
 
#line 768 "xmltree_read.l"
2983
 
BUFFERPUTC('<');
2984
 
        XML__BREAK
2985
 
case 138:
2986
 
XML__RULE_SETUP
2987
 
#line 769 "xmltree_read.l"
2988
 
BUFFERPUTC('>');
2989
 
        XML__BREAK
2990
 
case 139:
2991
 
XML__RULE_SETUP
2992
 
#line 770 "xmltree_read.l"
2993
 
BUFFERPUTC('\'');
2994
 
        XML__BREAK
2995
 
case 140:
2996
 
XML__RULE_SETUP
2997
 
#line 771 "xmltree_read.l"
2998
 
BUFFERPUTC('"');
2999
 
        XML__BREAK
3000
 
/* Character entities. */
3001
 
case 141:
3002
 
XML__RULE_SETUP
3003
 
#line 774 "xmltree_read.l"
3004
 
BUFFERPUTC((unsigned char)atoi(xml_text+2));
3005
 
        XML__BREAK
3006
 
case 142:
3007
 
XML__RULE_SETUP
3008
 
#line 775 "xmltree_read.l"
3009
 
BUFFERPUTC((unsigned char)strtol(xml_text+3,NULL,16));
3010
 
        XML__BREAK
3011
 
 
3012
 
 
3013
 
case 143:
3014
 
#line 780 "xmltree_read.l"
3015
 
case 144:
3016
 
#line 781 "xmltree_read.l"
3017
 
case 145:
3018
 
#line 782 "xmltree_read.l"
3019
 
case 146:
3020
 
XML__RULE_SETUP
3021
 
#line 782 "xmltree_read.l"
3022
 
BUFFERPUTC('\n');
3023
 
        XML__BREAK
3024
 
 
3025
 
 
3026
 
case 147:
3027
 
XML__RULE_SETUP
3028
 
#line 786 "xmltree_read.l"
3029
 
ENTER(CDATA);
3030
 
        XML__BREAK
3031
 
case 148:
3032
 
XML__RULE_SETUP
3033
 
#line 787 "xmltree_read.l"
3034
 
FAIL("Unexpected `]]>' in character data.");
3035
 
        XML__BREAK
3036
 
 
3037
 
 
3038
 
case 149:
3039
 
XML__RULE_SETUP
3040
 
#line 791 "xmltree_read.l"
3041
 
BUFFERDONE; LEAVE;
3042
 
        XML__BREAK
3043
 
case XML__STATE_EOF(VALUE1):
3044
 
#line 792 "xmltree_read.l"
3045
 
FAIL("EOF in literal (\"'\" expected).");
3046
 
        XML__BREAK
3047
 
 
3048
 
 
3049
 
case 150:
3050
 
XML__RULE_SETUP
3051
 
#line 796 "xmltree_read.l"
3052
 
BUFFERDONE; LEAVE;
3053
 
        XML__BREAK
3054
 
case XML__STATE_EOF(VALUE2):
3055
 
#line 797 "xmltree_read.l"
3056
 
FAIL("EOF in literal (`\"' expected).");
3057
 
        XML__BREAK
3058
 
 
3059
 
 
3060
 
case 151:
3061
 
XML__RULE_SETUP
3062
 
#line 801 "xmltree_read.l"
3063
 
BUFFERPUTC(xml_text[0]);
3064
 
        XML__BREAK
3065
 
case 152:
3066
 
XML__RULE_SETUP
3067
 
#line 802 "xmltree_read.l"
3068
 
FAIL("Spurious `%c' in character data.",xml_text[0]);
3069
 
        XML__BREAK
3070
 
 
3071
 
 
3072
 
case 153:
3073
 
XML__RULE_SETUP
3074
 
#line 806 "xmltree_read.l"
3075
 
LEAVE;
3076
 
        XML__BREAK
3077
 
case 154:
3078
 
XML__RULE_SETUP
3079
 
#line 807 "xmltree_read.l"
3080
 
BUFFERPUTC(xml_text[0]); BUFFERPUTC(xml_text[1]);
3081
 
        XML__BREAK
3082
 
case 155:
3083
 
XML__RULE_SETUP
3084
 
#line 808 "xmltree_read.l"
3085
 
BUFFERPUTC(xml_text[0]);
3086
 
        XML__BREAK
3087
 
case XML__STATE_EOF(CDATA):
3088
 
#line 809 "xmltree_read.l"
3089
 
FAIL("EOF in CDATA section.");
3090
 
        XML__BREAK
3091
 
 
3092
 
/* Impossible rules to avoid warnings from flex(1). */
3093
 
 
3094
 
case 156:
3095
 
XML__RULE_SETUP
3096
 
#line 815 "xmltree_read.l"
3097
 
FAIL("The Impossible Happened: INITIAL or IMPOSSIBLE state entered?");
3098
 
        XML__BREAK
3099
 
 
3100
 
case 157:
3101
 
XML__RULE_SETUP
3102
 
#line 818 "xmltree_read.l"
3103
 
ECHO;
3104
 
        XML__BREAK
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):
3123
 
        xml_terminate();
3124
 
 
3125
 
        case XML__END_OF_BUFFER:
3126
 
                {
3127
 
                /* Amount of text matched not including the EOB char. */
3128
 
                int xml__amount_of_matched_text = (int) (xml__cp - xml_text_ptr) - 1;
3129
 
 
3130
 
                /* Undo the effects of XML__DO_BEFORE_ACTION. */
3131
 
                *xml__cp = xml__hold_char;
3132
 
                XML__RESTORE_XML__MORE_OFFSET
3133
 
 
3134
 
                if ( xml__current_buffer->xml__buffer_status == XML__BUFFER_NEW )
3135
 
                        {
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.
3144
 
                         */
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;
3148
 
                        }
3149
 
 
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
3155
 
                 * in input().
3156
 
                 */
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;
3160
 
 
3161
 
                        xml__c_buf_p = xml_text_ptr + xml__amount_of_matched_text;
3162
 
 
3163
 
                        xml__current_state = xml__get_previous_state();
3164
 
 
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).
3172
 
                         */
3173
 
 
3174
 
                        xml__next_state = xml__try_NUL_trans( xml__current_state );
3175
 
 
3176
 
                        xml__bp = xml_text_ptr + XML__MORE_ADJ;
3177
 
 
3178
 
                        if ( xml__next_state )
3179
 
                                {
3180
 
                                /* Consume the NUL. */
3181
 
                                xml__cp = ++xml__c_buf_p;
3182
 
                                xml__current_state = xml__next_state;
3183
 
                                goto xml__match;
3184
 
                                }
3185
 
 
3186
 
                        else
3187
 
                                {
3188
 
                                xml__cp = xml__c_buf_p;
3189
 
                                goto xml__find_action;
3190
 
                                }
3191
 
                        }
3192
 
 
3193
 
                else switch ( xml__get_next_buffer() )
3194
 
                        {
3195
 
                        case EOB_ACT_END_OF_FILE:
3196
 
                                {
3197
 
                                xml__did_buffer_switch_on_eof = 0;
3198
 
 
3199
 
                                if ( xml_wrap() )
3200
 
                                        {
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.
3209
 
                                         */
3210
 
                                        xml__c_buf_p = xml_text_ptr + XML__MORE_ADJ;
3211
 
 
3212
 
                                        xml__act = XML__STATE_EOF(XML__START);
3213
 
                                        goto do_action;
3214
 
                                        }
3215
 
 
3216
 
                                else
3217
 
                                        {
3218
 
                                        if ( ! xml__did_buffer_switch_on_eof )
3219
 
                                                XML__NEW_FILE;
3220
 
                                        }
3221
 
                                break;
3222
 
                                }
3223
 
 
3224
 
                        case EOB_ACT_CONTINUE_SCAN:
3225
 
                                xml__c_buf_p =
3226
 
                                        xml_text_ptr + xml__amount_of_matched_text;
3227
 
 
3228
 
                                xml__current_state = xml__get_previous_state();
3229
 
 
3230
 
                                xml__cp = xml__c_buf_p;
3231
 
                                xml__bp = xml_text_ptr + XML__MORE_ADJ;
3232
 
                                goto xml__match;
3233
 
 
3234
 
                        case EOB_ACT_LAST_MATCH:
3235
 
                                xml__c_buf_p =
3236
 
                                &xml__current_buffer->xml__ch_buf[xml__n_chars];
3237
 
 
3238
 
                                xml__current_state = xml__get_previous_state();
3239
 
 
3240
 
                                xml__cp = xml__c_buf_p;
3241
 
                                xml__bp = xml_text_ptr + XML__MORE_ADJ;
3242
 
                                goto xml__find_action;
3243
 
                        }
3244
 
                break;
3245
 
                }
3246
 
 
3247
 
        default:
3248
 
                XML__FATAL_ERROR(
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 */
3253
 
 
3254
 
 
3255
 
/* xml__get_next_buffer - try to read in a new buffer
3256
 
 *
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
3261
 
 */
3262
 
 
3263
 
static int xml__get_next_buffer()
3264
 
        {
3265
 
        register char *dest = xml__current_buffer->xml__ch_buf;
3266
 
        register char *source = xml_text_ptr;
3267
 
        register int number_to_move, i;
3268
 
        int ret_val;
3269
 
 
3270
 
        if ( xml__c_buf_p > &xml__current_buffer->xml__ch_buf[xml__n_chars + 1] )
3271
 
                XML__FATAL_ERROR(
3272
 
                "fatal flex scanner internal error--end of buffer missed" );
3273
 
 
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 )
3277
 
                        {
3278
 
                        /* We matched a single character, the EOB, so
3279
 
                         * treat this as a final EOF.
3280
 
                         */
3281
 
                        return EOB_ACT_END_OF_FILE;
3282
 
                        }
3283
 
 
3284
 
                else
3285
 
                        {
3286
 
                        /* We matched some text prior to the EOB, first
3287
 
                         * process it.
3288
 
                         */
3289
 
                        return EOB_ACT_LAST_MATCH;
3290
 
                        }
3291
 
                }
3292
 
 
3293
 
        /* Try to read more data. */
3294
 
 
3295
 
        /* First move last chars to start of buffer. */
3296
 
        number_to_move = (int) (xml__c_buf_p - xml_text_ptr) - 1;
3297
 
 
3298
 
        for ( i = 0; i < number_to_move; ++i )
3299
 
                *(dest++) = *(source++);
3300
 
 
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,
3303
 
                 * just force an EOF
3304
 
                 */
3305
 
                xml__current_buffer->xml__n_chars = xml__n_chars = 0;
3306
 
 
3307
 
        else
3308
 
                {
3309
 
                int num_to_read =
3310
 
                        xml__current_buffer->xml__buf_size - number_to_move - 1;
3311
 
 
3312
 
                while ( num_to_read <= 0 )
3313
 
                        { /* Not enough room in the buffer - grow it. */
3314
 
#ifdef XML__USES_REJECT
3315
 
                        XML__FATAL_ERROR(
3316
 
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
3317
 
#else
3318
 
 
3319
 
                        /* just a shorter name for the current buffer */
3320
 
                        XML__BUFFER_STATE b = xml__current_buffer;
3321
 
 
3322
 
                        int xml__c_buf_p_offset =
3323
 
                                (int) (xml__c_buf_p - b->xml__ch_buf);
3324
 
 
3325
 
                        if ( b->xml__is_our_buffer )
3326
 
                                {
3327
 
                                int new_size = b->xml__buf_size * 2;
3328
 
 
3329
 
                                if ( new_size <= 0 )
3330
 
                                        b->xml__buf_size += b->xml__buf_size / 8;
3331
 
                                else
3332
 
                                        b->xml__buf_size *= 2;
3333
 
 
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 );
3338
 
                                }
3339
 
                        else
3340
 
                                /* Can't grow it, we don't own it. */
3341
 
                                b->xml__ch_buf = 0;
3342
 
 
3343
 
                        if ( ! b->xml__ch_buf )
3344
 
                                XML__FATAL_ERROR(
3345
 
                                "fatal error - scanner input buffer overflow" );
3346
 
 
3347
 
                        xml__c_buf_p = &b->xml__ch_buf[xml__c_buf_p_offset];
3348
 
 
3349
 
                        num_to_read = xml__current_buffer->xml__buf_size -
3350
 
                                                number_to_move - 1;
3351
 
#endif
3352
 
                        }
3353
 
 
3354
 
                if ( num_to_read > XML__READ_BUF_SIZE )
3355
 
                        num_to_read = XML__READ_BUF_SIZE;
3356
 
 
3357
 
                /* Read in more data. */
3358
 
                XML__INPUT( (&xml__current_buffer->xml__ch_buf[number_to_move]),
3359
 
                        xml__n_chars, num_to_read );
3360
 
 
3361
 
                xml__current_buffer->xml__n_chars = xml__n_chars;
3362
 
                }
3363
 
 
3364
 
        if ( xml__n_chars == 0 )
3365
 
                {
3366
 
                if ( number_to_move == XML__MORE_ADJ )
3367
 
                        {
3368
 
                        ret_val = EOB_ACT_END_OF_FILE;
3369
 
                        xml_restart( xml_in );
3370
 
                        }
3371
 
 
3372
 
                else
3373
 
                        {
3374
 
                        ret_val = EOB_ACT_LAST_MATCH;
3375
 
                        xml__current_buffer->xml__buffer_status =
3376
 
                                XML__BUFFER_EOF_PENDING;
3377
 
                        }
3378
 
                }
3379
 
 
3380
 
        else
3381
 
                ret_val = EOB_ACT_CONTINUE_SCAN;
3382
 
 
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;
3386
 
 
3387
 
        xml_text_ptr = &xml__current_buffer->xml__ch_buf[0];
3388
 
 
3389
 
        return ret_val;
3390
 
        }
3391
 
 
3392
 
 
3393
 
/* xml__get_previous_state - get the state just before the EOB char was reached */
3394
 
 
3395
 
static xml__state_type xml__get_previous_state()
3396
 
        {
3397
 
        register xml__state_type xml__current_state;
3398
 
        register char *xml__cp;
3399
 
 
3400
 
        xml__current_state = xml__start;
3401
 
 
3402
 
        for ( xml__cp = xml_text_ptr + XML__MORE_ADJ; xml__cp < xml__c_buf_p; ++xml__cp )
3403
 
                {
3404
 
                register XML__CHAR xml__c = (*xml__cp ? xml__ec[XML__SC_TO_UI(*xml__cp)] : 1);
3405
 
                if ( xml__accept[xml__current_state] )
3406
 
                        {
3407
 
                        xml__last_accepting_state = xml__current_state;
3408
 
                        xml__last_accepting_cpos = xml__cp;
3409
 
                        }
3410
 
                while ( xml__chk[xml__base[xml__current_state] + xml__c] != xml__current_state )
3411
 
                        {
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];
3415
 
                        }
3416
 
                xml__current_state = xml__nxt[xml__base[xml__current_state] + (unsigned int) xml__c];
3417
 
                }
3418
 
 
3419
 
        return xml__current_state;
3420
 
        }
3421
 
 
3422
 
 
3423
 
/* xml__try_NUL_trans - try to make a transition on the NUL character
3424
 
 *
3425
 
 * synopsis
3426
 
 *      next_state = xml__try_NUL_trans( current_state );
3427
 
 */
3428
 
 
3429
 
#ifdef XML__USE_PROTOS
3430
 
static xml__state_type xml__try_NUL_trans( xml__state_type xml__current_state )
3431
 
#else
3432
 
static xml__state_type xml__try_NUL_trans( xml__current_state )
3433
 
xml__state_type xml__current_state;
3434
 
#endif
3435
 
        {
3436
 
        register int xml__is_jam;
3437
 
        register char *xml__cp = xml__c_buf_p;
3438
 
 
3439
 
        register XML__CHAR xml__c = 1;
3440
 
        if ( xml__accept[xml__current_state] )
3441
 
                {
3442
 
                xml__last_accepting_state = xml__current_state;
3443
 
                xml__last_accepting_cpos = xml__cp;
3444
 
                }
3445
 
        while ( xml__chk[xml__base[xml__current_state] + xml__c] != xml__current_state )
3446
 
                {
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];
3450
 
                }
3451
 
        xml__current_state = xml__nxt[xml__base[xml__current_state] + (unsigned int) xml__c];
3452
 
        xml__is_jam = (xml__current_state == 1063);
3453
 
 
3454
 
        return xml__is_jam ? 0 : xml__current_state;
3455
 
        }
3456
 
 
3457
 
 
3458
 
#ifndef XML__NO_UNPUT
3459
 
#ifdef XML__USE_PROTOS
3460
 
static void xml_unput( int c, register char *xml__bp )
3461
 
#else
3462
 
static void xml_unput( c, xml__bp )
3463
 
int c;
3464
 
register char *xml__bp;
3465
 
#endif
3466
 
        {
3467
 
        register char *xml__cp = xml__c_buf_p;
3468
 
 
3469
 
        /* undo effects of setting up xml_text */
3470
 
        *xml__cp = xml__hold_char;
3471
 
 
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];
3480
 
 
3481
 
                while ( source > xml__current_buffer->xml__ch_buf )
3482
 
                        *--dest = *--source;
3483
 
 
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;
3488
 
 
3489
 
                if ( xml__cp < xml__current_buffer->xml__ch_buf + 2 )
3490
 
                        XML__FATAL_ERROR( "flex scanner push-back overflow" );
3491
 
                }
3492
 
 
3493
 
        *--xml__cp = (char) c;
3494
 
 
3495
 
 
3496
 
        xml_text_ptr = xml__bp;
3497
 
        xml__hold_char = *xml__cp;
3498
 
        xml__c_buf_p = xml__cp;
3499
 
        }
3500
 
#endif  /* ifndef XML__NO_UNPUT */
3501
 
 
3502
 
 
3503
 
#ifdef __cplusplus
3504
 
static int xml_input()
3505
 
#else
3506
 
static int input()
3507
 
#endif
3508
 
        {
3509
 
        int c;
3510
 
 
3511
 
        *xml__c_buf_p = xml__hold_char;
3512
 
 
3513
 
        if ( *xml__c_buf_p == XML__END_OF_BUFFER_CHAR )
3514
 
                {
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.
3518
 
                 */
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';
3522
 
 
3523
 
                else
3524
 
                        { /* need more input */
3525
 
                        int offset = xml__c_buf_p - xml_text_ptr;
3526
 
                        ++xml__c_buf_p;
3527
 
 
3528
 
                        switch ( xml__get_next_buffer() )
3529
 
                                {
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.
3539
 
                                         */
3540
 
 
3541
 
                                        /* Reset buffer status. */
3542
 
                                        xml_restart( xml_in );
3543
 
 
3544
 
                                        /* fall through */
3545
 
 
3546
 
                                case EOB_ACT_END_OF_FILE:
3547
 
                                        {
3548
 
                                        if ( xml_wrap() )
3549
 
                                                return EOF;
3550
 
 
3551
 
                                        if ( ! xml__did_buffer_switch_on_eof )
3552
 
                                                XML__NEW_FILE;
3553
 
#ifdef __cplusplus
3554
 
                                        return xml_input();
3555
 
#else
3556
 
                                        return input();
3557
 
#endif
3558
 
                                        }
3559
 
 
3560
 
                                case EOB_ACT_CONTINUE_SCAN:
3561
 
                                        xml__c_buf_p = xml_text_ptr + offset;
3562
 
                                        break;
3563
 
                                }
3564
 
                        }
3565
 
                }
3566
 
 
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;
3570
 
 
3571
 
 
3572
 
        return c;
3573
 
        }
3574
 
 
3575
 
 
3576
 
#ifdef XML__USE_PROTOS
3577
 
void xml_restart( FILE *input_file )
3578
 
#else
3579
 
void xml_restart( input_file )
3580
 
FILE *input_file;
3581
 
#endif
3582
 
        {
3583
 
        if ( ! xml__current_buffer )
3584
 
                xml__current_buffer = xml__create_buffer( xml_in, XML__BUF_SIZE );
3585
 
 
3586
 
        xml__init_buffer( xml__current_buffer, input_file );
3587
 
        xml__load_buffer_state();
3588
 
        }
3589
 
 
3590
 
 
3591
 
#ifdef XML__USE_PROTOS
3592
 
void xml__switch_to_buffer( XML__BUFFER_STATE new_buffer )
3593
 
#else
3594
 
void xml__switch_to_buffer( new_buffer )
3595
 
XML__BUFFER_STATE new_buffer;
3596
 
#endif
3597
 
        {
3598
 
        if ( xml__current_buffer == new_buffer )
3599
 
                return;
3600
 
 
3601
 
        if ( xml__current_buffer )
3602
 
                {
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;
3607
 
                }
3608
 
 
3609
 
        xml__current_buffer = new_buffer;
3610
 
        xml__load_buffer_state();
3611
 
 
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.
3616
 
         */
3617
 
        xml__did_buffer_switch_on_eof = 1;
3618
 
        }
3619
 
 
3620
 
 
3621
 
#ifdef XML__USE_PROTOS
3622
 
void xml__load_buffer_state( void )
3623
 
#else
3624
 
void xml__load_buffer_state()
3625
 
#endif
3626
 
        {
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;
3631
 
        }
3632
 
 
3633
 
 
3634
 
#ifdef XML__USE_PROTOS
3635
 
XML__BUFFER_STATE xml__create_buffer( FILE *file, int size )
3636
 
#else
3637
 
XML__BUFFER_STATE xml__create_buffer( file, size )
3638
 
FILE *file;
3639
 
int size;
3640
 
#endif
3641
 
        {
3642
 
        XML__BUFFER_STATE b;
3643
 
 
3644
 
        b = (XML__BUFFER_STATE) xml__flex_alloc( sizeof( struct xml__buffer_state ) );
3645
 
        if ( ! b )
3646
 
                XML__FATAL_ERROR( "out of dynamic memory in xml__create_buffer()" );
3647
 
 
3648
 
        b->xml__buf_size = size;
3649
 
 
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.
3652
 
         */
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()" );
3656
 
 
3657
 
        b->xml__is_our_buffer = 1;
3658
 
 
3659
 
        xml__init_buffer( b, file );
3660
 
 
3661
 
        return b;
3662
 
        }
3663
 
 
3664
 
 
3665
 
#ifdef XML__USE_PROTOS
3666
 
void xml__delete_buffer( XML__BUFFER_STATE b )
3667
 
#else
3668
 
void xml__delete_buffer( b )
3669
 
XML__BUFFER_STATE b;
3670
 
#endif
3671
 
        {
3672
 
        if ( ! b )
3673
 
                return;
3674
 
 
3675
 
        if ( b == xml__current_buffer )
3676
 
                xml__current_buffer = (XML__BUFFER_STATE) 0;
3677
 
 
3678
 
        if ( b->xml__is_our_buffer )
3679
 
                xml__flex_free( (void *) b->xml__ch_buf );
3680
 
 
3681
 
        xml__flex_free( (void *) b );
3682
 
        }
3683
 
 
3684
 
 
3685
 
#ifndef _WIN32
3686
 
#include <unistd.h>
3687
 
#else
3688
 
#ifndef XML__ALWAYS_INTERACTIVE
3689
 
#ifndef XML__NEVER_INTERACTIVE
3690
 
extern int isatty XML__PROTO(( int ));
3691
 
#endif
3692
 
#endif
3693
 
#endif
3694
 
 
3695
 
#ifdef XML__USE_PROTOS
3696
 
void xml__init_buffer( XML__BUFFER_STATE b, FILE *file )
3697
 
#else
3698
 
void xml__init_buffer( b, file )
3699
 
XML__BUFFER_STATE b;
3700
 
FILE *file;
3701
 
#endif
3702
 
 
3703
 
 
3704
 
        {
3705
 
        xml__flush_buffer( b );
3706
 
 
3707
 
        b->xml__input_file = file;
3708
 
        b->xml__fill_buffer = 1;
3709
 
 
3710
 
#if XML__ALWAYS_INTERACTIVE
3711
 
        b->xml__is_interactive = 1;
3712
 
#else
3713
 
#if XML__NEVER_INTERACTIVE
3714
 
        b->xml__is_interactive = 0;
3715
 
#else
3716
 
        b->xml__is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3717
 
#endif
3718
 
#endif
3719
 
        }
3720
 
 
3721
 
 
3722
 
#ifdef XML__USE_PROTOS
3723
 
void xml__flush_buffer( XML__BUFFER_STATE b )
3724
 
#else
3725
 
void xml__flush_buffer( b )
3726
 
XML__BUFFER_STATE b;
3727
 
#endif
3728
 
 
3729
 
        {
3730
 
        if ( ! b )
3731
 
                return;
3732
 
 
3733
 
        b->xml__n_chars = 0;
3734
 
 
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.
3738
 
         */
3739
 
        b->xml__ch_buf[0] = XML__END_OF_BUFFER_CHAR;
3740
 
        b->xml__ch_buf[1] = XML__END_OF_BUFFER_CHAR;
3741
 
 
3742
 
        b->xml__buf_pos = &b->xml__ch_buf[0];
3743
 
 
3744
 
        b->xml__at_bol = 1;
3745
 
        b->xml__buffer_status = XML__BUFFER_NEW;
3746
 
 
3747
 
        if ( b == xml__current_buffer )
3748
 
                xml__load_buffer_state();
3749
 
        }
3750
 
 
3751
 
 
3752
 
#ifndef XML__NO_SCAN_BUFFER
3753
 
#ifdef XML__USE_PROTOS
3754
 
XML__BUFFER_STATE xml__scan_buffer( char *base, xml__size_t size )
3755
 
#else
3756
 
XML__BUFFER_STATE xml__scan_buffer( base, size )
3757
 
char *base;
3758
 
xml__size_t size;
3759
 
#endif
3760
 
        {
3761
 
        XML__BUFFER_STATE b;
3762
 
 
3763
 
        if ( size < 2 ||
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. */
3767
 
                return 0;
3768
 
 
3769
 
        b = (XML__BUFFER_STATE) xml__flex_alloc( sizeof( struct xml__buffer_state ) );
3770
 
        if ( ! b )
3771
 
                XML__FATAL_ERROR( "out of dynamic memory in xml__scan_buffer()" );
3772
 
 
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;
3779
 
        b->xml__at_bol = 1;
3780
 
        b->xml__fill_buffer = 0;
3781
 
        b->xml__buffer_status = XML__BUFFER_NEW;
3782
 
 
3783
 
        xml__switch_to_buffer( b );
3784
 
 
3785
 
        return b;
3786
 
        }
3787
 
#endif
3788
 
 
3789
 
 
3790
 
#ifndef XML__NO_SCAN_STRING
3791
 
#ifdef XML__USE_PROTOS
3792
 
XML__BUFFER_STATE xml__scan_string( xml_const char *xml__str )
3793
 
#else
3794
 
XML__BUFFER_STATE xml__scan_string( xml__str )
3795
 
xml_const char *xml__str;
3796
 
#endif
3797
 
        {
3798
 
        int len;
3799
 
        for ( len = 0; xml__str[len]; ++len )
3800
 
                ;
3801
 
 
3802
 
        return xml__scan_bytes( xml__str, len );
3803
 
        }
3804
 
#endif
3805
 
 
3806
 
 
3807
 
#ifndef XML__NO_SCAN_BYTES
3808
 
#ifdef XML__USE_PROTOS
3809
 
XML__BUFFER_STATE xml__scan_bytes( xml_const char *bytes, int len )
3810
 
#else
3811
 
XML__BUFFER_STATE xml__scan_bytes( bytes, len )
3812
 
xml_const char *bytes;
3813
 
int len;
3814
 
#endif
3815
 
        {
3816
 
        XML__BUFFER_STATE b;
3817
 
        char *buf;
3818
 
        xml__size_t n;
3819
 
        int i;
3820
 
 
3821
 
        /* Get memory for full buffer, including space for trailing EOB's. */
3822
 
        n = len + 2;
3823
 
        buf = (char *) xml__flex_alloc( n );
3824
 
        if ( ! buf )
3825
 
                XML__FATAL_ERROR( "out of dynamic memory in xml__scan_bytes()" );
3826
 
 
3827
 
        for ( i = 0; i < len; ++i )
3828
 
                buf[i] = bytes[i];
3829
 
 
3830
 
        buf[len] = buf[len+1] = XML__END_OF_BUFFER_CHAR;
3831
 
 
3832
 
        b = xml__scan_buffer( buf, n );
3833
 
        if ( ! b )
3834
 
                XML__FATAL_ERROR( "bad buffer in xml__scan_bytes()" );
3835
 
 
3836
 
        /* It's okay to grow etc. this buffer, and we should throw it
3837
 
         * away when we're done.
3838
 
         */
3839
 
        b->xml__is_our_buffer = 1;
3840
 
 
3841
 
        return b;
3842
 
        }
3843
 
#endif
3844
 
 
3845
 
 
3846
 
#ifndef XML__NO_PUSH_STATE
3847
 
#ifdef XML__USE_PROTOS
3848
 
static void xml__push_state( int new_state )
3849
 
#else
3850
 
static void xml__push_state( new_state )
3851
 
int new_state;
3852
 
#endif
3853
 
        {
3854
 
        if ( xml__start_stack_ptr >= xml__start_stack_depth )
3855
 
                {
3856
 
                xml__size_t new_size;
3857
 
 
3858
 
                xml__start_stack_depth += XML__START_STACK_INCR;
3859
 
                new_size = xml__start_stack_depth * sizeof( int );
3860
 
 
3861
 
                if ( ! xml__start_stack )
3862
 
                        xml__start_stack = (int *) xml__flex_alloc( new_size );
3863
 
 
3864
 
                else
3865
 
                        xml__start_stack = (int *) xml__flex_realloc(
3866
 
                                        (void *) xml__start_stack, new_size );
3867
 
 
3868
 
                if ( ! xml__start_stack )
3869
 
                        XML__FATAL_ERROR(
3870
 
                        "out of memory expanding start-condition stack" );
3871
 
                }
3872
 
 
3873
 
        xml__start_stack[xml__start_stack_ptr++] = XML__START;
3874
 
 
3875
 
        BEGIN(new_state);
3876
 
        }
3877
 
#endif
3878
 
 
3879
 
 
3880
 
#ifndef XML__NO_POP_STATE
3881
 
static void xml__pop_state()
3882
 
        {
3883
 
        if ( --xml__start_stack_ptr < 0 )
3884
 
                XML__FATAL_ERROR( "start-condition stack underflow" );
3885
 
 
3886
 
        BEGIN(xml__start_stack[xml__start_stack_ptr]);
3887
 
        }
3888
 
#endif
3889
 
 
3890
 
 
3891
 
#ifndef XML__NO_TOP_STATE
3892
 
static int xml__top_state()
3893
 
        {
3894
 
        return xml__start_stack[xml__start_stack_ptr - 1];
3895
 
        }
3896
 
#endif
3897
 
 
3898
 
#ifndef XML__EXIT_FAILURE
3899
 
#define XML__EXIT_FAILURE 2
3900
 
#endif
3901
 
 
3902
 
#ifdef XML__USE_PROTOS
3903
 
static void xml__fatal_error( xml_const char msg[] )
3904
 
#else
3905
 
static void xml__fatal_error( msg )
3906
 
char msg[];
3907
 
#endif
3908
 
        {
3909
 
        (void) fprintf( stderr, "%s\n", msg );
3910
 
        exit( XML__EXIT_FAILURE );
3911
 
        }
3912
 
 
3913
 
 
3914
 
 
3915
 
/* Redefine xml_less() so it works in section 3 code. */
3916
 
 
3917
 
#undef xml_less
3918
 
#define xml_less(n) \
3919
 
        do \
3920
 
                { \
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'; \
3926
 
                xml_leng = n; \
3927
 
                } \
3928
 
        while ( 0 )
3929
 
 
3930
 
 
3931
 
/* Internal utility routines. */
3932
 
 
3933
 
#ifndef xml_text_ptr
3934
 
#ifdef XML__USE_PROTOS
3935
 
static void xml__flex_strncpy( char *s1, xml_const char *s2, int n )
3936
 
#else
3937
 
static void xml__flex_strncpy( s1, s2, n )
3938
 
char *s1;
3939
 
xml_const char *s2;
3940
 
int n;
3941
 
#endif
3942
 
        {
3943
 
        register int i;
3944
 
        for ( i = 0; i < n; ++i )
3945
 
                s1[i] = s2[i];
3946
 
        }
3947
 
#endif
3948
 
 
3949
 
#ifdef XML__NEED_STRLEN
3950
 
#ifdef XML__USE_PROTOS
3951
 
static int xml__flex_strlen( xml_const char *s )
3952
 
#else
3953
 
static int xml__flex_strlen( s )
3954
 
xml_const char *s;
3955
 
#endif
3956
 
        {
3957
 
        register int n;
3958
 
        for ( n = 0; s[n]; ++n )
3959
 
                ;
3960
 
 
3961
 
        return n;
3962
 
        }
3963
 
#endif
3964
 
 
3965
 
 
3966
 
#ifdef XML__USE_PROTOS
3967
 
static void *xml__flex_alloc( xml__size_t size )
3968
 
#else
3969
 
static void *xml__flex_alloc( size )
3970
 
xml__size_t size;
3971
 
#endif
3972
 
        {
3973
 
        return (void *) malloc( size );
3974
 
        }
3975
 
 
3976
 
#ifdef XML__USE_PROTOS
3977
 
static void *xml__flex_realloc( void *ptr, xml__size_t size )
3978
 
#else
3979
 
static void *xml__flex_realloc( ptr, size )
3980
 
void *ptr;
3981
 
xml__size_t size;
3982
 
#endif
3983
 
        {
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.
3990
 
         */
3991
 
        return (void *) realloc( (char *) ptr, size );
3992
 
        }
3993
 
 
3994
 
#ifdef XML__USE_PROTOS
3995
 
static void xml__flex_free( void *ptr )
3996
 
#else
3997
 
static void xml__flex_free( ptr )
3998
 
void *ptr;
3999
 
#endif
4000
 
        {
4001
 
        free( ptr );
4002
 
        }
4003
 
 
4004
 
#if XML__MAIN
4005
 
int main()
4006
 
        {
4007
 
        xml_lex();
4008
 
        return 0;
4009
 
        }
4010
 
#endif
4011
 
#line 818 "xmltree_read.l"
4012
 
 
4013
 
 
4014
 
/* Element context stack lookup. */
4015
 
int element_context(int i)
4016
 
{
4017
 
  return (0<i && i<xml__start_stack_depth
4018
 
          ? xml__start_stack[xml__start_stack_ptr - i]
4019
 
          : 0);
4020
 
}
4021
 
 
4022
 
#ifdef FLEX_DEBUG
4023
 
void print_xml__stack(char* fmt, ...)
4024
 
{
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]);
4030
 
  va_end(ap);
4031
 
}
4032
 
 
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);
4036
 
}
4037
 
 
4038
 
static void debug_leave(void) {
4039
 
  if (xml__flex_debug) print_xml__stack("--LEAVE : ");
4040
 
  xml__pop_state();
4041
 
}
4042
 
 
4043
 
static void debug_set(int state, char* statename) {
4044
 
  BEGIN(state);
4045
 
  if (xml__flex_debug) print_xml__stack("--SET(%s) : ",statename);
4046
 
}
4047
 
#endif
4048
 
 
4049
 
 
4050
 
static int fail(const char* fmt, ...)
4051
 
{
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);
4055
 
#else
4056
 
  fprintf(stderr, "Invalid XML (state %d): ",XML__START);
4057
 
#endif
4058
 
  vfprintf(stderr, fmt, ap);
4059
 
  fprintf(stderr, "\n");
4060
 
  va_end(ap);
4061
 
  return 1;
4062
 
}
4063
 
 
4064
 
#line 30 "xmltree_read.act"
4065
 
 
4066
 
#ifndef _MSC_VER
4067
 
#include <stdlib.h>
4068
 
#endif
4069
 
#include "xmltree.h"
4070
 
 
4071
 
#define warning perror
4072
 
 
4073
 
element **current;
4074
 
element *root;
4075
 
list *lastlist;
4076
 
 
4077
 
void STag_octave(void)
4078
 
{
4079
 
#line 43 "xmltree_read.act"
4080
 
 
4081
 
root = new_element();
4082
 
root->def_value = value_data;
4083
 
current = &(root->child);
4084
 
 
4085
 
lastlist = new_list(lastlist);
4086
 
lastlist->root = current;
4087
 
 
4088
 
} /* STag_octave */
4089
 
 
4090
 
void ETag_octave(void)
4091
 
{
4092
 
#line 52 "xmltree_read.act"
4093
 
 
4094
 
current = lastlist->root;
4095
 
lastlist = pop_list(lastlist);
4096
 
current = &((*current)->next);
4097
 
 
4098
 
} /* ETag_octave */
4099
 
 
4100
 
void STag_scalar(void)
4101
 
{
4102
 
#line 60 "xmltree_read.act"
4103
 
 
4104
 
*current = new_element();
4105
 
 
4106
 
if (A_scalar_name) {
4107
 
  (*current)->name = (char *) malloc(strlen(A_scalar_name)+1);
4108
 
  strcpy ((*current)->name, A_scalar_name);
4109
 
}
4110
 
 
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;
4120
 
}
4121
 
 
4122
 
} /* STag_scalar */
4123
 
 
4124
 
void ETag_scalar(void)
4125
 
{
4126
 
#line 80 "xmltree_read.act"
4127
 
 
4128
 
if (((*current)->const_value == const_undef) && (pcdata))
4129
 
  (*current)->scalar_value = strtod (pcdata, NULL);
4130
 
 
4131
 
(*(lastlist->root))->nb_elements++;
4132
 
 
4133
 
current = &((*current)->next);
4134
 
 
4135
 
} /* ETag_scalar */
4136
 
 
4137
 
void STag_string(void)
4138
 
{
4139
 
#line 91 "xmltree_read.act"
4140
 
 
4141
 
*current = new_element();
4142
 
 
4143
 
if (A_string_name) {
4144
 
  (*current)->name = (char *) malloc(strlen(A_string_name)+1);
4145
 
  strcpy ((*current)->name, A_string_name);
4146
 
}
4147
 
 
4148
 
if (A_string_length)
4149
 
  (*current)->length = strtol (A_string_length, NULL, 10);
4150
 
 
4151
 
(*current)->def_value = value_string;
4152
 
 
4153
 
} /* STag_string */
4154
 
 
4155
 
void ETag_string(void)
4156
 
{
4157
 
#line 105 "xmltree_read.act"
4158
 
 
4159
 
if (pcdata) {
4160
 
 
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;
4166
 
  }
4167
 
 
4168
 
  (*current)->string_value = (char *) malloc ((len+1) * sizeof(char));
4169
 
  strcpy((*current)->string_value, pcdata);
4170
 
}
4171
 
 
4172
 
(*(lastlist->root))->nb_elements++;
4173
 
 
4174
 
current = &((*current)->next);
4175
 
 
4176
 
} /* ETag_string */
4177
 
 
4178
 
void STag_complex(void)
4179
 
{
4180
 
#line 126 "xmltree_read.act"
4181
 
 
4182
 
*current = new_element();
4183
 
 
4184
 
if (A_complex_name) {
4185
 
  (*current)->name = (char *) malloc(strlen(A_complex_name)+1);
4186
 
  strcpy ((*current)->name, A_complex_name);
4187
 
}
4188
 
 
4189
 
(*current)->def_value = value_complex;
4190
 
 
4191
 
lastlist = new_list(lastlist);
4192
 
lastlist->root = current;
4193
 
current = &((*current)->child);
4194
 
 
4195
 
} /* STag_complex */
4196
 
 
4197
 
void ETag_complex(void)
4198
 
{
4199
 
#line 141 "xmltree_read.act"
4200
 
 
4201
 
current = lastlist->root;
4202
 
lastlist = pop_list(lastlist);
4203
 
 
4204
 
(*(lastlist->root))->nb_elements++;
4205
 
 
4206
 
current = &((*current)->next);
4207
 
 
4208
 
} /* ETag_complex */
4209
 
 
4210
 
void STag_array(void)
4211
 
{
4212
 
#line 152 "xmltree_read.act"
4213
 
 
4214
 
*current = new_element();
4215
 
 
4216
 
if (A_array_name) {
4217
 
  (*current)->name = (char *) malloc(strlen(A_array_name)+1);
4218
 
  strcpy ((*current)->name, A_array_name);
4219
 
}
4220
 
 
4221
 
if (A_array_rows)
4222
 
  (*current)->rows = strtol (A_array_rows, NULL, 10);
4223
 
 
4224
 
(*current)->def_value = value_array;
4225
 
 
4226
 
lastlist = new_list(lastlist);
4227
 
lastlist->root = current;
4228
 
current = &((*current)->child);
4229
 
 
4230
 
} /* STag_array */
4231
 
 
4232
 
void ETag_array(void)
4233
 
{
4234
 
#line 170 "xmltree_read.act"
4235
 
 
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;
4240
 
}
4241
 
 
4242
 
current = lastlist->root;
4243
 
lastlist = pop_list(lastlist);
4244
 
 
4245
 
(*(lastlist->root))->nb_elements++;
4246
 
 
4247
 
current = &((*current)->next);
4248
 
 
4249
 
} /* ETag_array */
4250
 
 
4251
 
void STag_matrix(void)
4252
 
{
4253
 
#line 187 "xmltree_read.act"
4254
 
 
4255
 
*current = new_element();
4256
 
 
4257
 
if (A_matrix_name) {
4258
 
  (*current)->name = (char *) malloc(strlen(A_matrix_name)+1);
4259
 
  strcpy ((*current)->name, A_matrix_name);
4260
 
}
4261
 
 
4262
 
if (A_matrix_rows)
4263
 
  (*current)->rows = strtol (A_matrix_rows, NULL, 10);
4264
 
 
4265
 
if (A_matrix_columns)
4266
 
  (*current)->columns = strtol (A_matrix_columns, NULL, 10);
4267
 
 
4268
 
(*current)->def_value = value_matrix;
4269
 
 
4270
 
lastlist = new_list(lastlist);
4271
 
lastlist->root = current;
4272
 
current = &((*current)->child);
4273
 
 
4274
 
} /* STag_matrix */
4275
 
 
4276
 
void ETag_matrix(void)
4277
 
{
4278
 
#line 208 "xmltree_read.act"
4279
 
 
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;  
4286
 
}
4287
 
 
4288
 
current = lastlist->root;
4289
 
lastlist = pop_list(lastlist);
4290
 
 
4291
 
(*(lastlist->root))->nb_elements++;
4292
 
 
4293
 
current = &((*current)->next);
4294
 
 
4295
 
} /* ETag_matrix */
4296
 
 
4297
 
void STag_structure(void)
4298
 
{
4299
 
#line 227 "xmltree_read.act"
4300
 
 
4301
 
*current = new_element();
4302
 
 
4303
 
if (A_structure_name) {
4304
 
  (*current)->name = (char *) malloc(strlen(A_structure_name)+1);
4305
 
  strcpy ((*current)->name, A_structure_name);
4306
 
}
4307
 
 
4308
 
(*current)->def_value = value_structure;
4309
 
 
4310
 
lastlist = new_list(lastlist);
4311
 
lastlist->root = current;
4312
 
current = &((*current)->child);
4313
 
 
4314
 
} /* STag_structure */
4315
 
 
4316
 
void ETag_structure(void)
4317
 
{
4318
 
#line 242 "xmltree_read.act"
4319
 
 
4320
 
/* no check possible (sic) */
4321
 
 
4322
 
current = lastlist->root;
4323
 
lastlist = pop_list(lastlist);
4324
 
 
4325
 
(*(lastlist->root))->nb_elements++;
4326
 
 
4327
 
current = &((*current)->next);
4328
 
 
4329
 
} /* ETag_structure */
4330
 
 
4331
 
void STag_list(void)
4332
 
{
4333
 
#line 255 "xmltree_read.act"
4334
 
 
4335
 
*current = new_element();
4336
 
 
4337
 
if (A_list_name) {
4338
 
  (*current)->name = (char *) malloc(strlen(A_list_name)+1);
4339
 
  strcpy ((*current)->name, A_list_name);
4340
 
}
4341
 
 
4342
 
if (A_list_length)
4343
 
  (*current)->length = strtol (A_list_length, NULL, 10);
4344
 
 
4345
 
(*current)->def_value = value_list;
4346
 
 
4347
 
lastlist = new_list(lastlist);
4348
 
lastlist->root = current;
4349
 
current = &((*current)->child);
4350
 
 
4351
 
} /* STag_list */
4352
 
 
4353
 
void ETag_list(void)
4354
 
{
4355
 
#line 273 "xmltree_read.act"
4356
 
 
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;
4361
 
}
4362
 
 
4363
 
current = lastlist->root;
4364
 
lastlist = pop_list(lastlist);
4365
 
 
4366
 
(*(lastlist->root))->nb_elements++;
4367
 
 
4368
 
current = &((*current)->next);
4369
 
 
4370
 
} /* ETag_list */
4371
 
 
4372
 
void STag_cell(void)
4373
 
{
4374
 
#line 290 "xmltree_read.act"
4375
 
 
4376
 
*current = new_element();
4377
 
 
4378
 
if (A_cell_name) {
4379
 
  (*current)->name = (char *) malloc(strlen(A_cell_name)+1);
4380
 
  strcpy ((*current)->name, A_cell_name);
4381
 
}
4382
 
 
4383
 
if (A_cell_rows)
4384
 
  (*current)->rows = strtol (A_cell_rows, NULL, 10);
4385
 
 
4386
 
if (A_cell_columns)
4387
 
  (*current)->columns = strtol (A_cell_columns, NULL, 10);
4388
 
 
4389
 
(*current)->def_value = value_cell;
4390
 
 
4391
 
lastlist = new_list(lastlist);
4392
 
lastlist->root = current;
4393
 
current = &((*current)->child);
4394
 
 
4395
 
} /* STag_cell */
4396
 
 
4397
 
void ETag_cell(void)
4398
 
{
4399
 
#line 311 "xmltree_read.act"
4400
 
 
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;  
4407
 
}
4408
 
 
4409
 
current = lastlist->root;
4410
 
lastlist = pop_list(lastlist);
4411
 
 
4412
 
(*(lastlist->root))->nb_elements++;
4413
 
 
4414
 
current = &((*current)->next);
4415
 
 
4416
 
} /* ETag_cell */
4417
 
 
4418
 
 
4419
 
#line 346 "xmltree_read.act"
4420
 
 
4421
 
element *read_xmltree (const char *file) {
4422
 
 
4423
 
  current = NULL;
4424
 
  root = NULL;
4425
 
  lastlist = NULL;
4426
 
 
4427
 
  xml_in = fopen(file, "r");
4428
 
  if (!xml_in)
4429
 
    perror("can't open file\n");
4430
 
 
4431
 
  xml_lex();
4432
 
  fclose(xml_in);
4433
 
  
4434
 
  return root;
4435
 
}
4436
 
 
4437
 
 
4438
 
/* XML application entry points. */