1fb9a9224SMatthew Dillon /* 2*0c65ac1dSAntonio Huete Jimenez __ __ _ 3*0c65ac1dSAntonio Huete Jimenez ___\ \/ /_ __ __ _| |_ 4*0c65ac1dSAntonio Huete Jimenez / _ \\ /| '_ \ / _` | __| 5*0c65ac1dSAntonio Huete Jimenez | __// \| |_) | (_| | |_ 6*0c65ac1dSAntonio Huete Jimenez \___/_/\_\ .__/ \__,_|\__| 7*0c65ac1dSAntonio Huete Jimenez |_| XML parser 8*0c65ac1dSAntonio Huete Jimenez 9*0c65ac1dSAntonio Huete Jimenez Copyright (c) 1997-2000 Thai Open Source Software Center Ltd 10*0c65ac1dSAntonio Huete Jimenez Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net> 11*0c65ac1dSAntonio Huete Jimenez Copyright (c) 2017-2019 Sebastian Pipping <sebastian@pipping.org> 12*0c65ac1dSAntonio Huete Jimenez Licensed under the MIT license: 13*0c65ac1dSAntonio Huete Jimenez 14*0c65ac1dSAntonio Huete Jimenez Permission is hereby granted, free of charge, to any person obtaining 15*0c65ac1dSAntonio Huete Jimenez a copy of this software and associated documentation files (the 16*0c65ac1dSAntonio Huete Jimenez "Software"), to deal in the Software without restriction, including 17*0c65ac1dSAntonio Huete Jimenez without limitation the rights to use, copy, modify, merge, publish, 18*0c65ac1dSAntonio Huete Jimenez distribute, sublicense, and/or sell copies of the Software, and to permit 19*0c65ac1dSAntonio Huete Jimenez persons to whom the Software is furnished to do so, subject to the 20*0c65ac1dSAntonio Huete Jimenez following conditions: 21*0c65ac1dSAntonio Huete Jimenez 22*0c65ac1dSAntonio Huete Jimenez The above copyright notice and this permission notice shall be included 23*0c65ac1dSAntonio Huete Jimenez in all copies or substantial portions of the Software. 24*0c65ac1dSAntonio Huete Jimenez 25*0c65ac1dSAntonio Huete Jimenez THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 26*0c65ac1dSAntonio Huete Jimenez EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27*0c65ac1dSAntonio Huete Jimenez MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 28*0c65ac1dSAntonio Huete Jimenez NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 29*0c65ac1dSAntonio Huete Jimenez DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 30*0c65ac1dSAntonio Huete Jimenez OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 31*0c65ac1dSAntonio Huete Jimenez USE OR OTHER DEALINGS IN THE SOFTWARE. 32fb9a9224SMatthew Dillon */ 33fb9a9224SMatthew Dillon 34fb9a9224SMatthew Dillon enum { 35*0c65ac1dSAntonio Huete Jimenez BT_NONXML, /* e.g. noncharacter-FFFF */ 36*0c65ac1dSAntonio Huete Jimenez BT_MALFORM, /* illegal, with regard to encoding */ 37*0c65ac1dSAntonio Huete Jimenez BT_LT, /* less than = "<" */ 38*0c65ac1dSAntonio Huete Jimenez BT_AMP, /* ampersand = "&" */ 39*0c65ac1dSAntonio Huete Jimenez BT_RSQB, /* right square bracket = "[" */ 40*0c65ac1dSAntonio Huete Jimenez BT_LEAD2, /* lead byte of a 2-byte UTF-8 character */ 41*0c65ac1dSAntonio Huete Jimenez BT_LEAD3, /* lead byte of a 3-byte UTF-8 character */ 42*0c65ac1dSAntonio Huete Jimenez BT_LEAD4, /* lead byte of a 4-byte UTF-8 character */ 43*0c65ac1dSAntonio Huete Jimenez BT_TRAIL, /* trailing unit, e.g. second 16-bit unit of a 4-byte char. */ 44*0c65ac1dSAntonio Huete Jimenez BT_CR, /* carriage return = "\r" */ 45*0c65ac1dSAntonio Huete Jimenez BT_LF, /* line feed = "\n" */ 46*0c65ac1dSAntonio Huete Jimenez BT_GT, /* greater than = ">" */ 47*0c65ac1dSAntonio Huete Jimenez BT_QUOT, /* quotation character = "\"" */ 48*0c65ac1dSAntonio Huete Jimenez BT_APOS, /* apostrophe = "'" */ 49*0c65ac1dSAntonio Huete Jimenez BT_EQUALS, /* equal sign = "=" */ 50*0c65ac1dSAntonio Huete Jimenez BT_QUEST, /* question mark = "?" */ 51*0c65ac1dSAntonio Huete Jimenez BT_EXCL, /* exclamation mark = "!" */ 52*0c65ac1dSAntonio Huete Jimenez BT_SOL, /* solidus, slash = "/" */ 53*0c65ac1dSAntonio Huete Jimenez BT_SEMI, /* semicolon = ";" */ 54*0c65ac1dSAntonio Huete Jimenez BT_NUM, /* number sign = "#" */ 55*0c65ac1dSAntonio Huete Jimenez BT_LSQB, /* left square bracket = "[" */ 56*0c65ac1dSAntonio Huete Jimenez BT_S, /* white space, e.g. "\t", " "[, "\r"] */ 57*0c65ac1dSAntonio Huete Jimenez BT_NMSTRT, /* non-hex name start letter = "G".."Z" + "g".."z" + "_" */ 58*0c65ac1dSAntonio Huete Jimenez BT_COLON, /* colon = ":" */ 59*0c65ac1dSAntonio Huete Jimenez BT_HEX, /* hex letter = "A".."F" + "a".."f" */ 60*0c65ac1dSAntonio Huete Jimenez BT_DIGIT, /* digit = "0".."9" */ 61*0c65ac1dSAntonio Huete Jimenez BT_NAME, /* dot and middle dot = "." + chr(0xb7) */ 62*0c65ac1dSAntonio Huete Jimenez BT_MINUS, /* minus = "-" */ 63fb9a9224SMatthew Dillon BT_OTHER, /* known not to be a name or name start character */ 64fb9a9224SMatthew Dillon BT_NONASCII, /* might be a name or name start character */ 65*0c65ac1dSAntonio Huete Jimenez BT_PERCNT, /* percent sign = "%" */ 66*0c65ac1dSAntonio Huete Jimenez BT_LPAR, /* left parenthesis = "(" */ 67*0c65ac1dSAntonio Huete Jimenez BT_RPAR, /* right parenthesis = "(" */ 68*0c65ac1dSAntonio Huete Jimenez BT_AST, /* asterisk = "*" */ 69*0c65ac1dSAntonio Huete Jimenez BT_PLUS, /* plus sign = "+" */ 70*0c65ac1dSAntonio Huete Jimenez BT_COMMA, /* comma = "," */ 71*0c65ac1dSAntonio Huete Jimenez BT_VERBAR /* vertical bar = "|" */ 72fb9a9224SMatthew Dillon }; 73fb9a9224SMatthew Dillon 74fb9a9224SMatthew Dillon #include <stddef.h> 75