From: <car...@us...> - 2012-03-13 02:51:52
|
Revision: 9845 http://octave.svn.sourceforge.net/octave/?rev=9845&view=rev Author: carandraug Date: 2012-03-13 02:51:42 +0000 (Tue, 13 Mar 2012) Log Message: ----------- xmlread: moving from miscellaneous to IO package. Updating Makefiles Modified Paths: -------------- trunk/octave-forge/main/io/src/Makefile trunk/octave-forge/main/miscellaneous/src/Makefile Added Paths: ----------- trunk/octave-forge/main/io/src/octave.dtd trunk/octave-forge/main/io/src/xmlread.cc trunk/octave-forge/main/io/src/xmltree.c trunk/octave-forge/main/io/src/xmltree.h trunk/octave-forge/main/io/src/xmltree_read.act trunk/octave-forge/main/io/src/xmltree_read.c trunk/octave-forge/main/io/src/xmltree_read.h trunk/octave-forge/main/io/src/xmltree_read.l Removed Paths: ------------- trunk/octave-forge/main/miscellaneous/src/octave.dtd trunk/octave-forge/main/miscellaneous/src/xmlread.cc trunk/octave-forge/main/miscellaneous/src/xmltree.c trunk/octave-forge/main/miscellaneous/src/xmltree.h trunk/octave-forge/main/miscellaneous/src/xmltree_read.act trunk/octave-forge/main/miscellaneous/src/xmltree_read.c trunk/octave-forge/main/miscellaneous/src/xmltree_read.h trunk/octave-forge/main/miscellaneous/src/xmltree_read.l Modified: trunk/octave-forge/main/io/src/Makefile =================================================================== --- trunk/octave-forge/main/io/src/Makefile 2012-03-13 02:41:21 UTC (rev 9844) +++ trunk/octave-forge/main/io/src/Makefile 2012-03-13 02:51:42 UTC (rev 9845) @@ -1,5 +1,29 @@ -all: csvexplode.oct csv2cell.oct csvconcat.oct cell2csv.oct +all: csvexplode.oct csv2cell.oct csvconcat.oct cell2csv.oct xmlread.oct +ifdef FLEXML +# flexml is a dead project. It requires flex 2.5.4a-6 (flex-old on Debian). +# Further, we have modified the resulting xmltree_read.c by hand, changing +# all occurrences of yy to xml_ and YY to XML_. Some other changes have be +# mode so the ouput of flexml won't be as correct as the actual committed C +# file +xmltree_read.l: xmltree_read.act octave.dtd + $(FLEXML) -A -a $^ +xmltree_read.c: xmltree_read.l + $(FLEX) -B -Pxml_ -o$@ $< +endif + +xmltree.o: xmltree.c xmltree.h + mkoctfile -Wall -c $< + +xmltree_read.o: xmltree_read.c xmltree_read.h + mkoctfile -Wall -c $< + +xmlread.o: xmlread.cc xmltree_read.h xmltree.h + mkoctfile -Wall -c $< + +xmlread.oct: xmlread.o xmltree_read.o xmltree.o + mkoctfile -Wall $^ + %.oct: %.cc mkoctfile -Wall $< Copied: trunk/octave-forge/main/io/src/octave.dtd (from rev 9841, trunk/octave-forge/main/miscellaneous/src/octave.dtd) =================================================================== --- trunk/octave-forge/main/io/src/octave.dtd (rev 0) +++ trunk/octave-forge/main/io/src/octave.dtd 2012-03-13 02:51:42 UTC (rev 9845) @@ -0,0 +1,39 @@ +<!ELEMENT octave (scalar | complex | string | array | structure | list | cell)> + +<!ELEMENT scalar (#PCDATA)> +<!ATTLIST scalar + value (undefined | true | false | inf | neginf | na | nan) "undefined" + name CDATA #IMPLIED> + +<!ELEMENT complex (scalar, scalar)> +<!ATTLIST complex name CDATA #IMPLIED> + +<!ELEMENT string (#PCDATA)> +<!ATTLIST string + length CDATA #REQUIRED + name CDATA #IMPLIED> + +<!ELEMENT array (string, string+)> +<!ATTLIST array + rows CDATA #REQUIRED + name CDATA #IMPLIED> + +<!ELEMENT matrix (scalar | complex)*> +<!ATTLIST matrix + rows CDATA #REQUIRED + columns CDATA #REQUIRED + name CDATA #IMPLIED> + +<!ELEMENT structure ANY> +<!ATTLIST structure name CDATA #IMPLIED> + +<!ELEMENT list ANY> +<!ATTLIST list + length CDATA #REQUIRED + name CDATA #IMPLIED> + +<!ELEMENT cell ANY> +<!ATTLIST cell + rows CDATA #REQUIRED + columns CDATA #REQUIRED + name CDATA #IMPLIED> Copied: trunk/octave-forge/main/io/src/xmlread.cc (from rev 9841, trunk/octave-forge/main/miscellaneous/src/xmlread.cc) =================================================================== --- trunk/octave-forge/main/io/src/xmlread.cc (rev 0) +++ trunk/octave-forge/main/io/src/xmlread.cc 2012-03-13 02:51:42 UTC (rev 9845) @@ -0,0 +1,152 @@ +// Copyright (C) 2004 Laurent Mazet <ma...@cr...> +// +// This program is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation; either version 3 of the License, or (at your option) any later +// version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// this program; if not, see <http://www.gnu.org/licenses/>. + +#include <octave/oct.h> +#include <octave/lo-ieee.h> +#include <octave/oct-map.h> +#include <octave/Cell.h> + +extern "C" { +#include "xmltree.h" +#include "xmltree_read.h" +} + +octave_value get_element (element *root) { + int length, rows, columns; + + string_vector tmp_array; + ComplexMatrix tmp_matrix; + Octave_map tmp_structure; + Cell tmp_cell; + octave_value_list tmp_list; + + octave_value retval; + + if (!root) + return retval; + + switch (root->def_value) { + case value_scalar: + switch (root->const_value) { + case const_true: retval = octave_value(true); break; + case const_false: retval = octave_value(false); break; + case const_inf: retval = octave_value(octave_Inf); break; + case const_neginf: retval = octave_value(-octave_Inf); break; + case const_nan: retval = octave_value(octave_NaN); break; + case const_na: retval = octave_value(octave_NA); break; + case const_undef: retval = octave_value(root->scalar_value); break; + } + break; + + case value_complex: + retval = + octave_value(Complex(get_element(root->child).double_value(), + get_element(root->child->next).double_value())); + break; + + case value_string: + retval = octave_value(root->string_value); + break; + + case value_array: + rows = root->rows; + root = root->child; + tmp_array = string_vector(rows); + for (int k=0; (k<rows) && (root); k++, root = root->next) + tmp_array(k) = get_element(root).string_value(); + retval = octave_value(tmp_array); + break; + + case value_matrix: + rows = root->rows; + columns = root->columns; + root = root->child; + tmp_matrix = ComplexMatrix(rows, columns); + for (int k=0; (k<rows) && (root); k++) + for (int l=0; (l<columns) && (root); l++, root = root->next) + tmp_matrix(k, l) = get_element(root).complex_value(); + if (tmp_matrix.all_elements_are_real()) + retval = octave_value(real(tmp_matrix)); + else + retval = octave_value(tmp_matrix); + break; + + case value_structure: + root = root->child; + for (int k=0; root; root = root->next) + if (root->name) + tmp_structure.assign(root->name, get_element(root)); + else { + char *name = new char[7]; + sprintf (name, "__%04d", k++); + warning ("no field name in structure."); + tmp_structure.assign(name, get_element(root)); + delete[] name; + } + retval = octave_value(tmp_structure); + break; + + case value_list: + length = root->length; + root = root->child; + //tmp_list = octave_value_list(length); + for (int k=0; (k<length) && (root); k++, root = root->next) + tmp_list(k) = get_element(root); + retval = octave_value(tmp_list); + break; + + case value_cell: + rows = root->rows; + columns = root->columns; + root = root->child; + tmp_cell = Cell(rows, columns); + for (int k=0; (k<rows) && (root); k++) + for (int l=0; (l<columns) && (root); l++, root = root->next) + tmp_cell(k, l) = get_element(root); + retval = octave_value(tmp_cell); + break; + + default: + warning ("unknown type.\n"); + } + + return retval; +} + +DEFUN_DLD (xmlread, args, nargout, + "-*- texinfo -*-\n" + "@deftypefn {Function File} {@var{value}} xmlread(@var{filename})\n" + "\n" + "Read a @var{value} from @var{filename} as an XML file\n" + "@end deftypefn") { + + /* Check argument */ + if (args.length() != 1) { + print_usage (); + return octave_value_list(); + } + + /* Read file */ + std::string filename = args(0).string_value(); + element *root = read_xmltree(filename.c_str()); + if (!root) + return octave_value_list(); + + /* step down into the element tree */ + octave_value retval = get_element (root->child); + free_element (root); + + return retval; +} Copied: trunk/octave-forge/main/io/src/xmltree.c (from rev 9841, trunk/octave-forge/main/miscellaneous/src/xmltree.c) =================================================================== --- trunk/octave-forge/main/io/src/xmltree.c (rev 0) +++ trunk/octave-forge/main/io/src/xmltree.c 2012-03-13 02:51:42 UTC (rev 9845) @@ -0,0 +1,173 @@ +// Copyright (C) 2004 Laurent Mazet <ma...@cr...> +// +// This program is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation; either version 3 of the License, or (at your option) any later +// version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// this program; if not, see <http://www.gnu.org/licenses/>. + +#include <stdio.h> +#include <stdlib.h> + +#include "xmltree.h" + +element *new_element () { + + element *new; + new = (element *) malloc (sizeof(element)); + if (!new) + perror("xml: no enough memory for new_element()\n"); + + new->next = new->child = NULL; + + new->def_value = value_undef; + new->const_value = const_undef; + new->scalar_value = 0; + new->string_value = NULL; + + new->name = NULL; + new->length = new->rows = new->columns = new->nb_elements = 0; + + return new; +} + +element *new_next (element *pred) { + + element *new = new_element(); + + if (pred) + pred->next = new; + + return new; +} + +element *new_child (element *father) { + + element *new = new_element(); + + if (father) + father->child = new; + + return new; +} + +void free_element (element *root) { + + if (!root) + return; + + if (root->next) + free_element (root->next); + if (root->child) + free_element (root->child); + + if (root->string_value) + free (root->string_value); + if (root->name) + free (root->name); + + free (root); +} + +void print_level(int l) { + int i; + for (i=0; i<l; i++) + printf (" "); +} + +void print_element (element *root, int l) { + + if (!root) + return; + + if (root->name) { + print_level(l); + printf ("name: %s\n", root->name); + } + + print_level(l); + switch (root->def_value) { + case value_scalar: + printf ("scalar: "); + switch (root->const_value) { + case const_true: printf ("true\n"); break; + case const_false: printf ("false\n"); break; + case const_inf: printf ("inf\n"); break; + case const_neginf: printf ("neginf\n"); break; + case const_nan: printf ("nan\n"); break; + case const_na: printf ("na\n"); break; + case const_undef: printf ("%f\n", root->scalar_value); break; + } + break; + case value_data: + printf ("data:\n"); + break; + case value_complex: + printf ("complex:\n"); + break; + case value_string: + printf ("string (%d): %s\n", root->length, root->string_value); + break; + case value_array: + printf ("array (%d):\n", root->rows); + break; + case value_matrix: + printf ("matrix (%d, %d):\n", root->rows, root->columns); + break; + case value_structure: + printf ("structure:\n"); + break; + case value_list: + printf ("list (%d):\n", root->length); + break; + case value_cell: + printf ("cell (%d, %d):\n", root->rows, root->columns); + break; + default: + printf ("???:\n"); + } + + if (root->child) { + print_level(l); + printf ("child:\n"); + print_element (root->child, l+1); + } + + if (root->next) { + print_level(l); + printf ("next:\n"); + print_element (root->next, l); + } +} + +list *new_list(list *father) { + + list *new; + new = (list *) malloc (sizeof(list)); + if (!new) + perror("xml: no enough memory for new_list()\n"); + + new->prev = father; + + new->root = NULL; + + return new; +} + +list *pop_list(list *child) { + list *father; + + father = child->prev; + free (child); + + return father; +} + + Copied: trunk/octave-forge/main/io/src/xmltree.h (from rev 9841, trunk/octave-forge/main/miscellaneous/src/xmltree.h) =================================================================== --- trunk/octave-forge/main/io/src/xmltree.h (rev 0) +++ trunk/octave-forge/main/io/src/xmltree.h 2012-03-13 02:51:42 UTC (rev 9845) @@ -0,0 +1,80 @@ +// Copyright (C) 2004 Laurent Mazet <ma...@cr...> +// +// This program is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation; either version 3 of the License, or (at your option) any later +// version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// this program; if not, see <http://www.gnu.org/licenses/>. + +/* + xmltree structure + */ + +#if !defined(__XMLTREE_H__) +#define __XMLTREE_H__ + +typedef enum { + value_undef = 0, + value_scalar, + value_complex, + value_string, + value_array, + value_matrix, + value_structure, + value_list, + value_cell, + value_data } t_value; + +typedef enum { + const_undef = 0, + const_true, + const_false, + const_inf, + const_neginf, + const_na, + const_nan } t_const; + +typedef struct _element { + struct _element *next; + struct _element *child; + + /* values */ + t_value def_value; + t_const const_value; + double scalar_value; + char *string_value; + + /* parameters */ + char *name; + int length; + int rows; + int columns; + + /* check */ + int nb_elements; + +} element; + +typedef struct _list { + struct _list *prev; + + element **root; +} list; + +element *new_element (); +element *new_next (element *pred); +element *new_child (element *father); +void free_element (element *root); +void print_element (element *root, int l); + +list *new_list(list *father); +list *pop_list(list *child); + +#endif /* __XMLTREE_H__ */ Copied: trunk/octave-forge/main/io/src/xmltree_read.act (from rev 9841, trunk/octave-forge/main/miscellaneous/src/xmltree_read.act) =================================================================== --- trunk/octave-forge/main/io/src/xmltree_read.act (rev 0) +++ trunk/octave-forge/main/io/src/xmltree_read.act 2012-03-13 02:51:42 UTC (rev 9845) @@ -0,0 +1,345 @@ +<!-- -*- XML -*- --> +<!-- + Copyright (C) 2004 Laurent Mazet <ma...@cr...> + + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; either version 3 of the License, or (at your option) any later + version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + details. + + You should have received a copy of the GNU General Public License along with + this program; if not, see <http://www.gnu.org/licenses/>. + --> + +<!DOCTYPE actions SYSTEM "flexml-act.dtd"> + +<actions> + +<!-- Top --> + +<top><![CDATA[ +#ifndef _MSC_VER +#include <stdlib.h> +#endif +#include "xmltree.h" + +#define warning perror + +element **current; +element *root; +list *lastlist; +]]></top> + +<!-- Data --> + +<start tag='octave'><![CDATA[ +root = new_element(); +root->def_value = value_data; +current = &(root->child); + +lastlist = new_list(lastlist); +lastlist->root = current; +]]></start> + +<end tag='octave'><![CDATA[ +current = lastlist->root; +lastlist = pop_list(lastlist); +current = &((*current)->next); +]]></end> + +<!-- Scalar --> + +<start tag='scalar'><![CDATA[ +*current = new_element(); + +if ({name}) { + (*current)->name = (char *) malloc(strlen({name})+1); + strcpy ((*current)->name, {name}); +} + +(*current)->def_value = value_scalar; +switch ({value}) { + case {value=true}: (*current)->const_value = const_true; break; + case {value=false}: (*current)->const_value = const_false; break; + case {value=inf}: (*current)->const_value = const_inf; break; + case {value=neginf}: (*current)->const_value = const_neginf; break; + case {value=nan}: (*current)->const_value = const_nan; break; + case {value=na}: (*current)->const_value = const_na; break; + default: (*current)->const_value = const_undef; +} +]]></start> + +<end tag='scalar'><![CDATA[ +if (((*current)->const_value == const_undef) && ({#PCDATA})) + (*current)->scalar_value = strtod ({#PCDATA}, NULL); + +(*(lastlist->root))->nb_elements++; + +current = &((*current)->next); +]]></end> + +<!-- String --> + +<start tag='string'><![CDATA[ +*current = new_element(); + +if ({name}) { + (*current)->name = (char *) malloc(strlen({name})+1); + strcpy ((*current)->name, {name}); +} + +if ({length}) + (*current)->length = strtol ({length}, NULL, 10); + +(*current)->def_value = value_string; +]]></start> + +<end tag='string'><![CDATA[ +if ({#PCDATA}) { + + int len = strlen({#PCDATA}); + /* check length parameter */ + if ((*current)->length != len) { + warning("incorrect length parameter for string\n"); + (*current)->length = len; + } + + (*current)->string_value = (char *) malloc ((len+1) * sizeof(char)); + strcpy((*current)->string_value, {#PCDATA}); +} + +(*(lastlist->root))->nb_elements++; + +current = &((*current)->next); +]]></end> + +<!-- Complex --> + +<start tag='complex'><![CDATA[ +*current = new_element(); + +if ({name}) { + (*current)->name = (char *) malloc(strlen({name})+1); + strcpy ((*current)->name, {name}); +} + +(*current)->def_value = value_complex; + +lastlist = new_list(lastlist); +lastlist->root = current; +current = &((*current)->child); +]]></start> + +<end tag='complex'><![CDATA[ +current = lastlist->root; +lastlist = pop_list(lastlist); + +(*(lastlist->root))->nb_elements++; + +current = &((*current)->next); +]]></end> + +<!-- Array --> + +<start tag='array'><![CDATA[ +*current = new_element(); + +if ({name}) { + (*current)->name = (char *) malloc(strlen({name})+1); + strcpy ((*current)->name, {name}); +} + +if ({rows}) + (*current)->rows = strtol ({rows}, NULL, 10); + +(*current)->def_value = value_array; + +lastlist = new_list(lastlist); +lastlist->root = current; +current = &((*current)->child); +]]></start> + +<end tag='array'><![CDATA[ +/* check rows parameter */ +if ((*(lastlist->root))->rows != (*(lastlist->root))->nb_elements) { + warning("incorrect length parameter for array\n"); + (*(lastlist->root))->rows = (*(lastlist->root))->nb_elements; +} + +current = lastlist->root; +lastlist = pop_list(lastlist); + +(*(lastlist->root))->nb_elements++; + +current = &((*current)->next); +]]></end> + +<!-- Matrix --> + +<start tag='matrix'><![CDATA[ +*current = new_element(); + +if ({name}) { + (*current)->name = (char *) malloc(strlen({name})+1); + strcpy ((*current)->name, {name}); +} + +if ({rows}) + (*current)->rows = strtol ({rows}, NULL, 10); + +if ({columns}) + (*current)->columns = strtol ({columns}, NULL, 10); + +(*current)->def_value = value_matrix; + +lastlist = new_list(lastlist); +lastlist->root = current; +current = &((*current)->child); +]]></start> + +<end tag='matrix'><![CDATA[ +/* check (rows, columns) parameters */ +if ((*(lastlist->root))->rows * (*(lastlist->root))->columns != + (*(lastlist->root))->nb_elements) { + warning("incorrect (rows, columns) parameters for matrix: reshaping matrix into vector\n"); + (*(lastlist->root))->rows = 1; + (*(lastlist->root))->columns = (*(lastlist->root))->nb_elements; +} + +current = lastlist->root; +lastlist = pop_list(lastlist); + +(*(lastlist->root))->nb_elements++; + +current = &((*current)->next); +]]></end> + +<!-- Structure --> + +<start tag='structure'><![CDATA[ +*current = new_element(); + +if ({name}) { + (*current)->name = (char *) malloc(strlen({name})+1); + strcpy ((*current)->name, {name}); +} + +(*current)->def_value = value_structure; + +lastlist = new_list(lastlist); +lastlist->root = current; +current = &((*current)->child); +]]></start> + +<end tag='structure'><![CDATA[ +/* no check possible (sic) */ + +current = lastlist->root; +lastlist = pop_list(lastlist); + +(*(lastlist->root))->nb_elements++; + +current = &((*current)->next); +]]></end> + +<!-- List --> + +<start tag='list'><![CDATA[ +*current = new_element(); + +if ({name}) { + (*current)->name = (char *) malloc(strlen({name})+1); + strcpy ((*current)->name, {name}); +} + +if ({length}) + (*current)->length = strtol ({length}, NULL, 10); + +(*current)->def_value = value_list; + +lastlist = new_list(lastlist); +lastlist->root = current; +current = &((*current)->child); +]]></start> + +<end tag='list'><![CDATA[ +/* check length parameter */ +if ((*(lastlist->root))->length != (*(lastlist->root))->nb_elements) { + warning("incorrect length parameter for list\n"); + (*(lastlist->root))->length = (*(lastlist->root))->nb_elements; +} + +current = lastlist->root; +lastlist = pop_list(lastlist); + +(*(lastlist->root))->nb_elements++; + +current = &((*current)->next); +]]></end> + +<!-- Cell --> + +<start tag='cell'><![CDATA[ +*current = new_element(); + +if ({name}) { + (*current)->name = (char *) malloc(strlen({name})+1); + strcpy ((*current)->name, {name}); +} + +if ({rows}) + (*current)->rows = strtol ({rows}, NULL, 10); + +if ({columns}) + (*current)->columns = strtol ({columns}, NULL, 10); + +(*current)->def_value = value_cell; + +lastlist = new_list(lastlist); +lastlist->root = current; +current = &((*current)->child); +]]></start> + +<end tag='cell'><![CDATA[ +/* check (rows, columns) parameters */ +if ((*(lastlist->root))->rows * (*(lastlist->root))->columns != + (*(lastlist->root))->nb_elements) { + warning("incorrect (rows, columns) parameters for cell: reshaping cell into list\n"); + (*(lastlist->root))->def_value = value_list; + (*(lastlist->root))->length = (*(lastlist->root))->nb_elements; +} + +current = lastlist->root; +lastlist = pop_list(lastlist); + +(*(lastlist->root))->nb_elements++; + +current = &((*current)->next); +]]></end> + +<!-- Main --> + +<main> +element *read_xmltree (const char *file) { + + current = NULL; + root = NULL; + lastlist = NULL; + + xml_in = fopen(file, "r"); + if (!xml_in) + perror("can't open file\n"); + + xml_lex(); + fclose(xml_in); + + return root; +} +</main> + +</actions> Copied: trunk/octave-forge/main/io/src/xmltree_read.c (from rev 9841, trunk/octave-forge/main/miscellaneous/src/xmltree_read.c) =================================================================== --- trunk/octave-forge/main/io/src/xmltree_read.c (rev 0) +++ trunk/octave-forge/main/io/src/xmltree_read.c 2012-03-13 02:51:42 UTC (rev 9845) @@ -0,0 +1,4438 @@ +/* A lexical scanner generated by flex */ + +/* Scanner skeleton version: + * $Header$ + */ + +#define FLEX_SCANNER +#define XML__FLEX_MAJOR_VERSION 2 +#define XML__FLEX_MINOR_VERSION 5 + +#include <stdio.h> +#include <errno.h> + +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +#ifdef c_plusplus +#ifndef __cplusplus +#define __cplusplus +#endif +#endif + + +#ifdef __cplusplus + +#include <stdlib.h> +#ifndef _WIN32 +#include <unistd.h> +#endif + +/* Use prototypes in function declarations. */ +#define XML__USE_PROTOS + +/* The "const" storage-class-modifier is valid. */ +#define XML__USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define XML__USE_PROTOS +#define XML__USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use +#include <io.h> +#include <stdlib.h> +#define XML__USE_CONST +#define XML__USE_PROTOS +#endif + +#ifdef XML__USE_CONST +#define xml_const const +#else +#define xml_const +#endif + + +#ifdef XML__USE_PROTOS +#define XML__PROTO(proto) proto +#else +#define XML__PROTO(proto) () +#endif + + +/* Returned upon end-of-file. */ +#define XML__NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define XML__SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN xml__start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The XML_STATE alias is for lex + * compatibility. + */ +#define XML__START ((xml__start - 1) / 2) +#define XML_STATE XML__START + +/* Action number for EOF rule of a given start state. */ +#define XML__STATE_EOF(state) (XML__END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define XML__NEW_FILE xml_restart( xml_in ) + +#define XML__END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#define XML__BUF_SIZE 16384 + +typedef struct xml__buffer_state *XML__BUFFER_STATE; + +extern int xml_leng; +extern FILE *xml_in, *xml_out; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + +/* The funky do-while in the following #define is used to turn the definition + * int a single C statement (which needs a semi-colon terminator). This + * avoids problems with code like: + * + * if ( condition_holds ) + * xml_less( 5 ); + * else + * do_something_else(); + * + * Prior to using the do-while the compiler would get upset at the + * "else" because it interpreted the "if" statement as being all + * done when it reached the ';' after the xml_less() call. + */ + +/* Return all but the first 'n' matched characters back to the input stream. */ + +#define xml_less(n) \ + do \ + { \ + /* Undo effects of setting up xml_text. */ \ + *xml__cp = xml__hold_char; \ + XML__RESTORE_XML__MORE_OFFSET \ + xml__c_buf_p = xml__cp = xml__bp + n - XML__MORE_ADJ; \ + XML__DO_BEFORE_ACTION; /* set up xml_text again */ \ + } \ + while ( 0 ) + +#define unput(c) xml_unput( c, xml_text_ptr ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ +typedef unsigned int xml__size_t; + + +struct xml__buffer_state + { + FILE *xml__input_file; + + char *xml__ch_buf; /* input buffer */ + char *xml__buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + xml__size_t xml__buf_size; + + /* Number of characters read into xml__ch_buf, not including EOB + * characters. + */ + int xml__n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int xml__is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int xml__is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int xml__at_bol; + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int xml__fill_buffer; + + int xml__buffer_status; +#define XML__BUFFER_NEW 0 +#define XML__BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as XML__EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via xml_restart()), so that the user can continue scanning by + * just pointing xml_in at a new input file. + */ +#define XML__BUFFER_EOF_PENDING 2 + }; + +static XML__BUFFER_STATE xml__current_buffer = 0; + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + */ +#define XML__CURRENT_BUFFER xml__current_buffer + + +/* xml__hold_char holds the character lost when xml_text is formed. */ +static char xml__hold_char; + +static int xml__n_chars; /* number of characters read into xml__ch_buf */ + + +int xml_leng; + +/* Points to current character in buffer. */ +static char *xml__c_buf_p = (char *) 0; +static int xml__init = 1; /* whether we need to initialize */ +static int xml__start = 0; /* start state number */ + +/* Flag which is used to allow xml_wrap()'s to do buffer switches + * instead of setting up a fresh xml_in. A bit of a hack ... + */ +static int xml__did_buffer_switch_on_eof; + +void xml_restart XML__PROTO(( FILE *input_file )); + +void xml__switch_to_buffer XML__PROTO(( XML__BUFFER_STATE new_buffer )); +void xml__load_buffer_state XML__PROTO(( void )); +XML__BUFFER_STATE xml__create_buffer XML__PROTO(( FILE *file, int size )); +void xml__delete_buffer XML__PROTO(( XML__BUFFER_STATE b )); +void xml__init_buffer XML__PROTO(( XML__BUFFER_STATE b, FILE *file )); +void xml__flush_buffer XML__PROTO(( XML__BUFFER_STATE b )); +#define XML__FLUSH_BUFFER xml__flush_buffer( xml__current_buffer ) + +XML__BUFFER_STATE xml__scan_buffer XML__PROTO(( char *base, xml__size_t size )); +XML__BUFFER_STATE xml__scan_string XML__PROTO(( xml_const char *xml__str )); +XML__BUFFER_STATE xml__scan_bytes XML__PROTO(( xml_const char *bytes, int len )); + +static void *xml__flex_alloc XML__PROTO(( xml__size_t )); +static void *xml__flex_realloc XML__PROTO(( void *, xml__size_t )); +static void xml__flex_free XML__PROTO(( void * )); + +#define xml__new_buffer xml__create_buffer + +#define xml__set_interactive(is_interactive) \ + { \ + if ( ! xml__current_buffer ) \ + xml__current_buffer = xml__create_buffer( xml_in, XML__BUF_SIZE ); \ + xml__current_buffer->xml__is_interactive = is_interactive; \ + } + +#define xml__set_bol(at_bol) \ + { \ + if ( ! xml__current_buffer ) \ + xml__current_buffer = xml__create_buffer( xml_in, XML__BUF_SIZE ); \ + xml__current_buffer->xml__at_bol = at_bol; \ + } + +#define XML__AT_BOL() (xml__current_buffer->xml__at_bol) + + +#define xml_wrap() 1 +#define XML__SKIP_XML_WRAP +typedef unsigned char XML__CHAR; +FILE *xml_in = (FILE *) 0, *xml_out = (FILE *) 0; +typedef int xml__state_type; +extern char *xml_text; +#define xml_text_ptr xml_text + +static xml__state_type xml__get_previous_state XML__PROTO(( void )); +static xml__state_type xml__try_NUL_trans XML__PROTO(( xml__state_type current_state )); +static int xml__get_next_buffer XML__PROTO(( void )); +static void xml__fatal_error XML__PROTO(( xml_const char msg[] )); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up xml_text. + */ +#define XML__DO_BEFORE_ACTION \ + xml_text_ptr = xml__bp; \ + xml_leng = (int) (xml__cp - xml__bp); \ + xml__hold_char = *xml__cp; \ + *xml__cp = '\0'; \ + xml__c_buf_p = xml__cp; + +#define XML__NUM_RULES 157 +#define XML__END_OF_BUFFER 158 +static xml_const short int xml__accept[1064] = + { 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 158, 156, 23, 10, 10, 23, + + 23, 135, 10, 135, 5, 6, 5, 8, 9, 8, + 151, 143, 144, 152, 149, 152, 150, 155, 143, 144, + 155, 157, 157, 27, 10, 27, 27, 27, 25, 157, + 31, 10, 31, 157, 51, 10, 51, 51, 51, 49, + 51, 51, 152, 151, 157, 60, 10, 60, 60, 60, + 58, 60, 64, 10, 64, 157, 72, 10, 72, 72, + 72, 70, 72, 72, 152, 157, 83, 10, 83, 83, + 83, 81, 83, 83, 87, 10, 87, 87, 157, 97, + 10, 97, 97, 97, 95, 97, 97, 97, 101, 10, + 101, 157, 101, 157, 107, 10, 107, 107, 107, 105, + + 107, 152, 157, 118, 10, 118, 118, 118, 116, 118, + 118, 152, 157, 131, 10, 131, 131, 131, 129, 131, + 131, 131, 152, 10, 0, 2, 2, 0, 4, 7, + 146, 145, 0, 0, 0, 0, 0, 154, 0, 26, + 28, 0, 0, 0, 0, 0, 0, 50, 52, 52, + 52, 0, 0, 0, 0, 59, 61, 61, 0, 0, + 71, 73, 73, 73, 0, 82, 84, 84, 84, 0, + 0, 96, 98, 98, 98, 98, 0, 0, 106, 108, + 108, 0, 117, 119, 119, 119, 0, 0, 130, 132, + 132, 132, 132, 0, 0, 0, 0, 0, 3, 0, + + 0, 0, 0, 0, 0, 0, 153, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 52, 52, 0, 0, + 0, 148, 61, 0, 0, 0, 73, 73, 0, 0, + 84, 84, 0, 0, 0, 98, 98, 98, 0, 0, + 0, 108, 0, 0, 119, 119, 0, 0, 132, 132, + 132, 0, 0, 0, 22, 1, 0, 0, 141, 0, + 0, 0, 138, 137, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 30, 0, 52, 52, 0, 0, + 0, 54, 0, 61, 0, 0, 63, 0, 0, 73, + 73, 0, 0, 75, 0, 84, 84, 0, 0, 86, + + 0, 0, 98, 98, 98, 0, 0, 100, 0, 0, + 108, 0, 0, 110, 0, 119, 119, 0, 0, 121, + 0, 132, 132, 132, 0, 0, 134, 0, 0, 0, + 142, 136, 0, 0, 0, 0, 122, 0, 111, 0, + 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, + 0, 73, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 98, 0, 0, 0, 0, 0, 0, 0, 0, + 119, 0, 0, 0, 132, 0, 0, 0, 0, 0, + 0, 0, 0, 12, 0, 139, 140, 0, 76, 122, + 0, 111, 0, 0, 0, 0, 0, 48, 47, 0, + + 0, 0, 0, 0, 57, 56, 0, 73, 0, 69, + 68, 0, 0, 80, 79, 0, 78, 77, 0, 0, + 98, 0, 94, 93, 0, 90, 89, 0, 0, 104, + 103, 0, 119, 0, 115, 114, 0, 132, 0, 128, + 127, 0, 124, 123, 0, 0, 0, 11, 24, 76, + 0, 32, 65, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 88, 98, 0, 0, 0, + 0, 0, 120, 132, 0, 133, 0, 0, 24, 55, + 32, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 67, 66, + + 0, 0, 85, 88, 0, 0, 0, 0, 0, 113, + 112, 0, 0, 0, 0, 55, 0, 0, 29, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 147, 0, 53, 0, 0, 74, 0, 92, 91, + 0, 99, 0, 0, 126, 125, 0, 0, 102, 0, + 0, 44, 0, 0, 0, 0, 0, 0, 43, 0, + 0, 0, 0, 0, 62, 0, 0, 0, 0, 0, + 0, 0, 0, 102, 0, 40, 46, 0, 0, 0, + 0, 39, 45, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, + + 0, 0, 35, 0, 0, 109, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 38, 0, 0, 37, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 42, 0, 41, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 34, 33, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, + 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 17, 0, 14, 0, + 13, 0, 16, 0, 0, 0, 15, 0, 0, 0, + 0, 19, 0 + } ; + +static xml_const int xml__ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 2, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 5, 6, 7, 1, 1, 8, 9, 1, + 1, 1, 1, 1, 10, 11, 12, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 14, 15, 16, + 17, 18, 19, 1, 20, 21, 22, 23, 24, 21, + 14, 14, 14, 14, 14, 14, 25, 14, 26, 27, + 14, 14, 28, 29, 14, 14, 14, 14, 30, 14, + 31, 1, 32, 1, 14, 1, 33, 21, 34, 35, + + 36, 37, 38, 39, 40, 14, 14, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 14, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static xml_const int xml__meta[55] = + { 0, + 1, 2, 2, 2, 1, 1, 1, 1, 1, 3, + 3, 1, 4, 5, 1, 1, 1, 6, 1, 7, + 7, 7, 7, 7, 5, 5, 5, 5, 5, 5, + 1, 1, 7, 7, 7, 7, 7, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5 + } ; + +static xml_const short int xml__base[1112] = + { 0, + 0, 0, 0, 3, 6, 9, 24, 27, 11, 14, + 15, 17, 29, 38, 45, 52, 59, 61, 67, 70, + 93, 125, 73, 76, 143, 146, 149, 164, 180, 0, + 232, 234, 241, 249, 266, 309, 284, 287, 290, 327, + 330, 333, 351, 354, 370, 0, 422, 424, 431, 439, + 456, 0, 509, 512, 515, 518, 533, 536, 539, 542, + 557, 560, 563, 566, 582, 0, 635, 638, 641, 644, + 659, 662, 665, 668, 683, 686, 702, 745, 727, 762, + 720, 723, 794, 0, 846, 848, 765, 769, 880, 0, + 932, 934, 0, 0, 3088, 3089, 3089, 111, 114, 47, + + 62, 3089, 117, 150, 3089, 3089, 3077, 3089, 3089, 3068, + 3089, 3081, 3081, 932, 3089, 3089, 3089, 3089, 3079, 3079, + 3049, 3089, 236, 3089, 168, 3062, 0, 155, 3089, 938, + 3089, 173, 242, 936, 3089, 256, 3061, 0, 159, 3089, + 3045, 3044, 244, 3044, 940, 3089, 357, 3057, 0, 343, + 3089, 3041, 3089, 361, 432, 939, 3089, 446, 3055, 0, + 426, 3089, 3036, 3038, 434, 942, 3089, 689, 3052, 0, + 528, 3089, 3036, 3024, 3089, 692, 941, 770, 949, 3089, + 738, 3049, 0, 552, 3089, 3022, 3032, 3020, 3089, 788, + 964, 958, 774, 962, 3089, 855, 3045, 0, 654, 3089, + + 3029, 1008, 975, 3089, 863, 3043, 0, 678, 3089, 3024, + 3026, 3046, 977, 3089, 866, 3039, 0, 855, 3089, 3012, + 3022, 3010, 3041, 869, 34, 2999, 3089, 3041, 3032, 3089, + 3089, 3089, 37, 40, 3000, 2999, 2997, 3028, 3011, 3089, + 0, 2997, 260, 3003, 73, 2998, 3007, 3089, 0, 2998, + 2998, 148, 2990, 3019, 2992, 3089, 0, 2993, 3000, 2984, + 3089, 0, 2989, 2989, 2982, 3089, 0, 2987, 2976, 2994, + 2993, 3089, 0, 2984, 2982, 2971, 2980, 2972, 3089, 0, + 2978, 2971, 3089, 0, 2975, 2975, 2975, 2979, 3089, 0, + 2973, 2971, 2960, 2977, 2992, 2999, 281, 2966, 3089, 148, + + 0, 2962, 2962, 2990, 2989, 2959, 3089, 2953, 2954, 2959, + 2957, 2950, 2964, 2949, 997, 1000, 2959, 2944, 2971, 1005, + 1026, 3089, 2956, 1022, 1029, 2944, 2952, 2953, 1033, 1051, + 2952, 2939, 1059, 1062, 2937, 2935, 2948, 2935, 1068, 1072, + 2935, 2945, 1079, 1085, 2942, 2943, 1089, 1092, 2928, 2941, + 2928, 1109, 1112, 2957, 3089, 3089, 17, 2933, 3089, 2958, + 2957, 2923, 3089, 3089, 2921, 2936, 2935, 2926, 2921, 2840, + 2847, 255, 1115, 1118, 3089, 1121, 1138, 2842, 2852, 1141, + 1147, 3089, 1150, 1154, 1158, 1170, 3089, 1175, 2832, 2820, + 1178, 1182, 1187, 3089, 1194, 1199, 1204, 1207, 1211, 3089, + + 1216, 2819, 2821, 1220, 1228, 1224, 1236, 3089, 1244, 2810, + 1247, 1253, 1256, 3089, 1263, 2808, 1266, 1273, 1276, 3089, + 1282, 2812, 1285, 1294, 1301, 1304, 3089, 1310, 321, 1313, + 3089, 3089, 2836, 2829, 2788, 2780, 873, 2788, 1055, 2791, + 2776, 2780, 1321, 1331, 1334, 1342, 2789, 1353, 1358, 1361, + 1370, 2765, 1374, 1377, 1393, 1396, 1399, 1414, 1417, 1425, + 2654, 2650, 1432, 1435, 1443, 1448, 1459, 1462, 1465, 1478, + 2653, 1481, 1484, 1497, 2648, 1500, 1505, 1516, 1520, 1532, + 698, 2672, 1535, 3089, 2670, 3089, 3089, 2651, 1528, 1538, + 2650, 1541, 2638, 2646, 2634, 1545, 1552, 3089, 3089, 1562, + + 1565, 2653, 1573, 1578, 3089, 3089, 1586, 1590, 1596, 3089, + 3089, 1606, 1609, 3089, 3089, 1617, 3089, 3089, 1626, 2624, + 2628, 1629, 3089, 3089, 1637, 3089, 3089, 1648, 1651, 3089, + 3089, 1659, 1665, 1669, 3089, 3089, 1681, 2623, 1688, 3089, + 3089, 1698, 3089, 3089, 1706, 320, 333, 3089, 1709, 1712, + 2617, 1715, 1718, 2617, 1723, 1726, 1694, 1696, 2645, 1745, + 1748, 1751, 1758, 1767, 1754, 1771, 1774, 1777, 1784, 1794, + 1797, 1805, 3089, 1810, 1813, 3089, 284, 41, 1816, 1822, + 1832, 1835, 2596, 1838, 2606, 2594, 51, 2573, 2569, 2539, + 2518, 309, 2482, 2213, 2201, 1841, 1844, 1848, 3089, 3089, + + 1861, 1864, 3089, 1867, 1870, 1874, 1882, 1886, 1889, 3089, + 3089, 1899, 1903, 1911, 505, 1915, 2137, 1919, 3089, 2096, + 2062, 694, 2026, 2010, 1985, 1920, 1874, 130, 1872, 1858, + 1825, 3089, 1922, 3089, 1928, 1931, 3089, 1939, 3089, 3089, + 1948, 3089, 1951, 1954, 3089, 3089, 1997, 283, 1968, 1756, + 1787, 3089, 1736, 1700, 1670, 1659, 1622, 1650, 3089, 1588, + 1519, 1436, 1417, 1971, 3089, 1974, 509, 536, 326, 711, + 228, 1050, 506, 1977, 1373, 3089, 3089, 1344, 1346, 1312, + 1284, 3089, 3089, 1256, 1286, 1157, 1984, 530, 411, 533, + 631, 105, 683, 972, 635, 634, 1141, 1089, 3089, 953, + + 943, 914, 3089, 813, 1991, 3089, 1113, 944, 977, 970, + 996, 1308, 1060, 1088, 2001, 3089, 778, 740, 3089, 689, + 612, 720, 2004, 1061, 2009, 640, 1086, 1309, 1003, 845, + 2030, 2040, 3089, 542, 3089, 400, 2022, 2033, 638, 2050, + 1111, 1049, 1145, 979, 1117, 2053, 2078, 2110, 333, 204, + 2070, 1157, 1151, 1243, 2073, 2102, 2128, 2131, 1149, 2149, + 2181, 17, 6, 1291, 1020, 2141, 1080, 2173, 2200, 2203, + 2206, 1225, 511, 3089, 3089, 1264, 1215, 2212, 1272, 1374, + 1392, 1394, 1412, 1217, 1300, 508, 1495, 837, 1340, 1477, + 1534, 1542, 2223, 1021, 556, 1567, 762, 1364, 1396, 1430, + + 1460, 2233, 931, 2240, 1492, 2244, 1329, 1366, 1452, 1473, + 1604, 2250, 2261, 1533, 2269, 1640, 1656, 1661, 1671, 1619, + 2279, 632, 1388, 1680, 1598, 1811, 2287, 2290, 2296, 2299, + 1498, 1814, 1831, 1218, 1332, 2307, 1351, 1422, 2317, 2325, + 2335, 2343, 1554, 1583, 1630, 1565, 1607, 2353, 1627, 1772, + 1876, 1920, 1921, 1941, 1972, 1973, 1979, 2045, 1764, 1804, + 1878, 1705, 1929, 2048, 2103, 1949, 1950, 1669, 1776, 1910, + 2089, 2090, 2144, 2145, 2177, 2361, 1996, 2032, 1585, 1810, + 2199, 2204, 2049, 2051, 2052, 2120, 2121, 2122, 2174, 2201, + 2211, 2227, 2364, 2085, 2256, 1371, 1437, 2231, 2237, 1476, + + 1747, 2251, 2297, 2300, 2318, 2336, 2342, 2354, 2356, 2130, + 2176, 1863, 2221, 2010, 2248, 2358, 2359, 2295, 2367, 2330, + 2332, 2362, 2366, 2368, 2370, 2372, 2375, 2278, 2298, 2383, + 2384, 1457, 2379, 2378, 2380, 2381, 2385, 2259, 2286, 2306, + 2322, 2382, 2386, 2388, 2389, 2387, 2390, 2392, 2393, 2391, + 2394, 2397, 2412, 2414, 2416, 2424, 2426, 2427, 2435, 2436, + 2438, 2439, 2440, 2434, 2437, 2423, 2441, 2442, 2443, 2451, + 2453, 2448, 2450, 2456, 2457, 2458, 2461, 2462, 2463, 2464, + 2466, 2455, 2468, 2469, 2470, 1978, 2485, 2477, 2482, 2154, + 2493, 2471, 2489, 2490, 2491, 2492, 2495, 2496, 2497, 2498, + + 2500, 2515, 2513, 2524, 2505, 2506, 2545, 2517, 2525, 2532, + 2533, 2535, 2538, 2539, 2540, 2514, 2519, 2562, 2574, 3089, + 2544, 2551, 2579, 3089, 2553, 2575, 2581, 2576, 2582, 2580, + 2584, 2586, 2573, 2578, 2603, 3089, 2597, 2592, 2614, 2620, + 2623, 2626, 2591, 2593, 2631, 2643, 3089, 2648, 3089, 2651, + 3089, 2654, 3089, 2596, 2601, 2660, 3089, 2642, 2650, 2671, + 2677, 3089, 3089, 2695, 2702, 2709, 2716, 2723, 2730, 2737, + 2744, 2751, 2758, 2765, 2772, 2779, 2786, 2793, 2798, 2803, + 2808, 2813, 2818, 2823, 2828, 2833, 2838, 2845, 2848, 2851, + 2854, 2857, 2860, 2863, 2866, 2869, 2872, 2879, 2883, 2889, + + 2895, 2901, 2907, 2913, 2919, 2925, 2931, 2937, 2944, 2951, + 2958 + } ; + +static xml_const short int xml__def[1112] = + { 0, + 1064, 1064, 1065, 1065, 1065, 1065, 1066, 1066, 1067, 1067, + 1068, 1068, 1069, 1069, 1069, 1069, 1070, 1070, 1071, 1071, + 1072, 1072, 1071, 1071, 1073, 1073, 1071, 1071, 1063, 29, + 1069, 1069, 1071, 1071, 1074, 1074, 1071, 1071, 1071, 1071, + 1075, 1075, 1071, 1071, 1063, 45, 1069, 1069, 1071, 1071, + 1063, 51, 1071, 1071, 1071, 1071, 1071, 1071, 1076, 1076, + 1076, 1076, 1071, 1071, 1063, 65, 1077, 1077, 1071, 1071, + 1077, 1077, 1077, 1077, 1071, 1071, 1078, 1078, 1069, 1069, + 1071, 1071, 1063, 83, 1069, 1069, 1071, 1071, 1063, 89, + 1069, 1069, 1064, 1064, 1063, 1063, 1063, 1063, 1063, 1063, + + 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1063, 1063, 1063, 1063, 1079, 1063, 1063, 1063, + 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1080, 1063, 1063, + 1080, 1080, 1063, 1063, 1063, 1063, 1063, 1063, 1081, 1063, + 1063, 1081, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1082, + 1063, 1063, 1082, 1082, 1063, 1063, 1063, 1063, 1063, 1083, + 1063, 1063, 1083, 1083, 1063, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1084, 1063, 1063, 1084, 1084, 1084, 1063, 1063, + 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1085, 1063, 1063, + + 1085, 1063, 1063, 1063, 1063, 1063, 1086, 1063, 1063, 1086, + 1086, 202, 1063, 1063, 1063, 1063, 1087, 1063, 1063, 1087, + 1087, 1087, 202, 1063, 1088, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + 1079, 1063, 1063, 1063, 1063, 1089, 1063, 1063, 1080, 1080, + 1080, 1063, 1090, 1063, 1063, 1063, 1081, 1081, 1091, 1063, + 1063, 1082, 1082, 1082, 1092, 1063, 1083, 1083, 1083, 1093, + 1063, 1063, 1084, 1084, 1084, 1084, 1094, 1063, 1063, 1085, + 1085, 1095, 1063, 1086, 1086, 1086, 1096, 1063, 1063, 1087, + 1087, 1087, 1087, 1097, 1098, 1063, 1098, 1063, 1063, 1063, + + 1099, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1063, 1063, 1100, 1100, 1080, 1080, 1063, 1101, + 1101, 1063, 1081, 1102, 1102, 1063, 1082, 1082, 1103, 1103, + 1083, 1083, 1104, 1104, 1063, 1084, 1084, 1084, 1105, 1105, + 1063, 1085, 1106, 1106, 1086, 1086, 1107, 1107, 1087, 1087, + 1087, 1108, 1108, 1098, 1063, 1063, 1098, 1063, 1063, 1099, + 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1063, 1100, 1063, 1100, 1080, 1080, 1063, 1063, + 1101, 1063, 1101, 1081, 1063, 1102, 1063, 1102, 1063, 1082, + 1082, 1063, 1103, 1063, 1103, 1083, 1083, 1063, 1104, 1063, + + 1104, 1063, 1084, 1084, 1084, 1063, 1105, 1063, 1105, 1063, + 1085, 1063, 1106, 1063, 1106, 1086, 1086, 1063, 1107, 1063, + 1107, 1087, 1087, 1087, 1063, 1108, 1063, 1108, 1098, 1109, + 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1100, 1063, 1063, 1080, 1063, 1101, 1063, 1063, + 1102, 1082, 1063, 1063, 1103, 1063, 1063, 1063, 1063, 1104, + 1063, 1084, 1063, 1063, 1063, 1063, 1105, 1063, 1063, 1106, + 1086, 1063, 1063, 1107, 1087, 1063, 1063, 1063, 1063, 1108, + 1098, 1109, 1109, 1063, 1109, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1063, 1063, 1063, 1100, 1063, 1063, 1063, 1063, + + 1063, 1063, 1101, 1063, 1063, 1063, 1102, 1082, 1063, 1063, + 1063, 1103, 1063, 1063, 1063, 1063, 1063, 1063, 1104, 1063, + 1084, 1063, 1063, 1063, 1063, 1063, 1063, 1105, 1063, 1063, + 1063, 1106, 1086, 1063, 1063, 1063, 1107, 1087, 1063, 1063, + 1063, 1063, 1063, 1063, 1108, 1098, 1109, 1063, 1063, 1063, + 1063, 1063, 1063, 1063, 1100, 1063, 1063, 1063, 1063, 1101, + 1102, 1063, 1063, 1103, 1104, 1063, 1084, 1105, 1106, 1063, + 1063, 1063, 1063, 1087, 1063, 1063, 1098, 1109, 1063, 1063, + 1063, 1063, 1063, 1100, 1063, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1063, 1063, 1063, 1101, 1102, 1063, 1063, 1063, + + 1103, 1063, 1063, 1063, 1063, 1063, 1105, 1106, 1063, 1063, + 1063, 1063, 1063, 1098, 1109, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1063, 1063, 1102, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1106, 1063, 1063, 1063, 1098, 1109, 1063, 1063, + 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1063, 1063, 1063, 1106, 1098, 1098, 1098, 1098, + 1098, 1098, 1109, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1063, 1063, 1063, 1063, 1106, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1109, 1063, 1063, 1063, 1063, + + 1063, 1063, 1063, 1063, 1063, 1063, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1109, 1063, 1063, 1063, 1063, 1063, + 1063, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1109, 1109, 1063, 1063, 1063, 1063, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1109, 1110, 1111, 1063, 1063, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1110, + 1111, 1063, 1063, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1109, 1063, 1063, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1063, + 1098, 1098, 1098, 1063, 1098, 1098, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1063, 1098, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1063, 1098, 1063, 1098, + 1063, 1098, 1063, 1098, 1098, 1098, 1063, 1098, 1098, 1098, + 1098, 1063, 0, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + + 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + 1063 + } ; + +static xml_const short int xml__nxt[3144] = + { 0, + 1063, 98, 99, 98, 98, 99, 98, 98, 99, 98, + 98, 99, 98, 106, 775, 100, 106, 109, 100, 109, + 107, 101, 774, 107, 101, 103, 99, 103, 103, 99, + 103, 112, 113, 110, 355, 110, 114, 115, 429, 104, + 112, 113, 104, 296, 116, 114, 115, 112, 113, 300, + 117, 225, 114, 116, 112, 113, 297, 117, 484, 114, + 116, 119, 120, 119, 120, 226, 225, 116, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 227, 302, 123, 622, 303, 123, 623, 615, 130, 301, + 121, 130, 121, 124, 125, 99, 125, 124, 124, 124, + + 124, 124, 124, 124, 126, 124, 313, 124, 128, 124, + 129, 124, 224, 224, 224, 224, 224, 224, 224, 224, + 224, 314, 355, 124, 124, 124, 125, 99, 125, 124, + 124, 124, 124, 124, 124, 124, 126, 124, 659, 124, + 128, 124, 129, 124, 132, 99, 132, 132, 99, 132, + 99, 99, 99, 711, 228, 124, 124, 296, 133, 228, + 300, 133, 359, 228, 134, 99, 99, 99, 227, 224, + 224, 224, 660, 227, 224, 224, 224, 227, 319, 134, + 135, 136, 99, 136, 135, 135, 135, 135, 135, 135, + 135, 137, 135, 138, 135, 139, 135, 140, 135, 138, + + 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, + 135, 135, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 141, 138, 138, 138, 138, 138, 138, 138, + 142, 138, 138, 138, 112, 113, 112, 113, 763, 114, + 228, 114, 99, 99, 99, 355, 228, 143, 252, 143, + 99, 99, 99, 246, 227, 253, 145, 224, 224, 224, + 227, 693, 227, 144, 145, 144, 146, 147, 99, 147, + 146, 146, 146, 146, 146, 146, 146, 148, 146, 239, + 146, 150, 146, 151, 146, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 441, 310, 146, 146, 355, 134, + + 484, 355, 134, 311, 442, 134, 357, 614, 152, 146, + 147, 99, 147, 146, 146, 146, 146, 146, 146, 146, + 148, 146, 673, 146, 150, 146, 151, 146, 99, 99, + 99, 154, 99, 154, 154, 99, 154, 355, 355, 146, + 146, 628, 134, 355, 629, 155, 577, 228, 155, 481, + 484, 152, 99, 99, 99, 99, 99, 99, 224, 224, + 224, 227, 224, 224, 224, 691, 156, 762, 578, 156, + 157, 158, 99, 158, 157, 157, 157, 157, 157, 157, + 157, 159, 157, 160, 157, 161, 157, 162, 157, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + + 157, 157, 160, 160, 160, 160, 160, 160, 160, 160, + 163, 160, 164, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 112, 113, 112, 113, 355, 114, + 228, 114, 99, 99, 99, 750, 228, 165, 252, 165, + 99, 99, 99, 259, 227, 265, 166, 224, 224, 224, + 227, 708, 227, 144, 166, 144, 167, 168, 99, 168, + 167, 167, 167, 167, 167, 167, 167, 169, 167, 170, + 167, 171, 167, 172, 167, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 167, 167, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, 173, 170, + + 170, 170, 174, 170, 170, 170, 170, 170, 170, 170, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 484, 484, 156, 355, 355, 156, 484, 485, + 156, 795, 228, 156, 99, 99, 99, 99, 99, 99, + 176, 99, 176, 176, 99, 176, 227, 355, 156, 696, + 355, 156, 648, 355, 177, 688, 228, 177, 176, 99, + 176, 176, 99, 176, 99, 99, 99, 99, 99, 99, + 227, 689, 178, 355, 709, 178, 707, 749, 179, 690, + 804, 179, 180, 181, 99, 181, 180, 180, 180, 180, + 180, 180, 180, 182, 180, 183, 180, 184, 180, 185, + + 180, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 180, 180, 183, 186, 183, 183, 183, 183, + 183, 183, 183, 183, 187, 183, 183, 183, 188, 183, + 183, 183, 183, 183, 183,... [truncated message content] |