Tanl Linguistic Pipeline |
00001 /* 00002 ** Tanl C++ Library 00003 ** text/xml.h 00004 ** ---------------------------------------------------------------------- 00005 ** Copyright (c) 2008 Giuseppe Attardi (attardi@di.unipi.it). 00006 ** ---------------------------------------------------------------------- 00007 ** 00008 ** This file is part of Tanl. 00009 ** 00010 ** Tanl is free software; you can redistribute it and/or modify it 00011 ** under the terms of the GNU General Public License, version 3, 00012 ** as published by the Free Software Foundation. 00013 ** 00014 ** Tanl is distributed in the hope that it will be useful, 00015 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 ** GNU General Public License for more details. 00018 ** 00019 ** You should have received a copy of the GNU General Public License 00020 ** along with this program. If not, see <http://www.gnu.org/licenses/>. 00021 ** ---------------------------------------------------------------------- 00022 */ 00023 00024 #ifndef Tanl_Text_xml_H 00025 #define Tanl_Text_xml_H 00026 00027 namespace Tanl { 00028 namespace XML { 00029 00030 enum XmlTokenType { 00031 XML_DECL, 00032 PROC_INST, 00033 DOCTYPE, 00034 COMMENT, 00035 NOTATION, 00036 TAG_OPEN, 00037 TAG_CLOSE, 00038 TAG_EMPTY, 00039 TAG_END, 00040 ID, 00041 EQ, 00042 VAL, 00043 CHARACTERS, 00044 RAW_CHARS, 00045 WHITESPACE, 00046 EoF 00047 }; 00048 00049 class XmlScanner : public xmlFlexLexer 00050 { 00051 public: 00052 XmlScanner(std::istream* arg_yyin = 0, std::ostream* arg_yyout = 0) : 00053 xmlFlexLexer(arg_yyin, arg_yyout) 00054 { } 00055 00059 int scan(); // i.e. YY_DECL 00060 00061 }; 00062 00063 #undef YY_DECL 00064 #define YY_DECL int Tanl::XML::XmlScanner::scan() 00065 00066 } // namespace XML 00067 } // namespace Tanl 00068 00069 #endif // Tanl_Text_xml_H