1 #ifndef XMLPARSER_HPP
  
   2 #define XMLPARSER_HPP
  
   3 #include <sngxml/xml/XmlProcessor.hpp>
  
   4 #include <soulng/lexer/Token.hpp>
  
   5 #include <soulng/parser/Match.hpp>
  
   6 #include <soulng/parser/Value.hpp>
  
   7 
  
   8 
  
   9 
  
  10 class TrivialLexer;
  
  11 
  
  12 struct XmlParser 
  
  13 {
  
  14     static void Parse(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  15     static soulng::parser::Match Document(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  16     static soulng::parser::Match Char(TrivialLexer& lexer);
  
  17     static soulng::parser::Match S(TrivialLexer& lexer);
  
  18     static soulng::parser::Match NameStartChar(TrivialLexer& lexer);
  
  19     static soulng::parser::Match NameChar(TrivialLexer& lexer);
  
  20     static soulng::parser::Match Name(TrivialLexer& lexer);
  
  21     static soulng::parser::Match Names(TrivialLexer& lexer);
  
  22     static soulng::parser::Match Nmtoken(TrivialLexer& lexer);
  
  23     static soulng::parser::Match Nmtokens(TrivialLexer& lexer);
  
  24     static soulng::parser::Match Prolog(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  25     static soulng::parser::Match XMLDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  26     static soulng::parser::Match VersionInfo(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  27     static soulng::parser::Match VersionNum(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  28     static soulng::parser::Match VersionNumDQ(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  29     static soulng::parser::Match VersionNumSQ(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  30     static soulng::parser::Match VersionNumber(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  31     static soulng::parser::Match EncodingDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  32     static soulng::parser::Match EncodingName(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  33     static soulng::parser::Match EncNameDQ(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  34     static soulng::parser::Match EncNameSQ(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  35     static soulng::parser::Match EncName(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  36     static soulng::parser::Match SDDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  37     static soulng::parser::Match DocTypeDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  38     static soulng::parser::Match ExternalID(TrivialLexer& lexer);
  
  39     static soulng::parser::Match SystemLiteral(TrivialLexer& lexer);
  
  40     static soulng::parser::Match PubidLiteral(TrivialLexer& lexer);
  
  41     static soulng::parser::Match PubidChar(TrivialLexer& lexer);
  
  42     static soulng::parser::Match IntSubset(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  43     static soulng::parser::Match MarkupDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  44     static soulng::parser::Match DeclSep(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  45     static soulng::parser::Match ElementDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  46     static soulng::parser::Match ContentSpec(TrivialLexer& lexer);
  
  47     static soulng::parser::Match Children(TrivialLexer& lexer);
  
  48     static soulng::parser::Match CP(TrivialLexer& lexer);
  
  49     static soulng::parser::Match Choice(TrivialLexer& lexer);
  
  50     static soulng::parser::Match Seq(TrivialLexer& lexer);
  
  51     static soulng::parser::Match Mixed(TrivialLexer& lexer);
  
  52     static soulng::parser::Match AttlistDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  53     static soulng::parser::Match AttDef(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  54     static soulng::parser::Match AttType(TrivialLexer& lexer);
  
  55     static soulng::parser::Match StringType(TrivialLexer& lexer);
  
  56     static soulng::parser::Match TokenizedType(TrivialLexer& lexer);
  
  57     static soulng::parser::Match EnumeratedType(TrivialLexer& lexer);
  
  58     static soulng::parser::Match NotationType(TrivialLexer& lexer);
  
  59     static soulng::parser::Match Enumeration(TrivialLexer& lexer);
  
  60     static soulng::parser::Match DefaultDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  61     static soulng::parser::Match EntityDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  62     static soulng::parser::Match GEDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  63     static soulng::parser::Match PEDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  64     static soulng::parser::Match EntityDef(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  65     static soulng::parser::Match PEDef(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  66     static soulng::parser::Match EntityValue(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  67     static soulng::parser::Match NDataDecl(TrivialLexer& lexer);
  
  68     static soulng::parser::Match PEReference(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  69     static soulng::parser::Match NotationDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  70     static soulng::parser::Match PublicID(TrivialLexer& lexer);
  
  71     static soulng::parser::Match Element(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  72     static soulng::parser::Match ETag(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  73     static soulng::parser::Match Content(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  74     static soulng::parser::Match CharDataChar(TrivialLexer& lexer);
  
  75     static soulng::parser::Match CharData(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  76     static soulng::parser::Match CDSect(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  77     static soulng::parser::Match Attribute(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  78     static soulng::parser::Match AttValueDQ(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  79     static soulng::parser::Match AttValueSQ(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  80     static soulng::parser::Match AttValue(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  81     static soulng::parser::Match EntityRef(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  82     static soulng::parser::Match DecCodePoint(TrivialLexer& lexer);
  
  83     static soulng::parser::Match HexCodePoint(TrivialLexer& lexer);
  
  84     static soulng::parser::Match CharRef(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  85     static soulng::parser::Match Reference(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  86     static soulng::parser::Match Misc(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  87     static soulng::parser::Match Comment(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  88     static soulng::parser::Match PI(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor);
  
  89     static soulng::parser::Match PITarget(TrivialLexer& lexer);
  
  90     static soulng::parser::Match Xml(TrivialLexer& lexer);
  
  91     static soulng::parser::Match Eq(TrivialLexer& lexer);
  
  92     static soulng::parser::Match YesNo(TrivialLexer& lexer);
  
  93 };
  
  94 
  
  95 #endif // XMLPARSER_HPP