From 1aa9b129d2a089f4b7d3c11f7e0eb0503657dc61 Mon Sep 17 00:00:00 2001 From: Myun2 Date: Mon, 11 Oct 2010 16:13:58 +0900 Subject: [PATCH] =?utf8?q?roast=5Fxml/rule=5Fxml.hpp:=20=E3=82=B3=E3=83=A1?= =?utf8?q?=E3=83=B3=E3=83=88=E3=81=AE=E7=B5=82=E7=AB=AF=E4=BB=A5=E5=A4=96"?= =?utf8?q?--"=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- roast/include/roast/lexical/rule.hpp | 2 +- roast/include/roast/xml/roast_xml/rule_xml.hpp | 24 +++++++++++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/roast/include/roast/lexical/rule.hpp b/roast/include/roast/lexical/rule.hpp index e4920e96..ce521d6d 100644 --- a/roast/include/roast/lexical/rule.hpp +++ b/roast/include/roast/lexical/rule.hpp @@ -303,7 +303,7 @@ namespace roast return true; } }; - template + template class skip : public iteratort_move_front {}; template diff --git a/roast/include/roast/xml/roast_xml/rule_xml.hpp b/roast/include/roast/xml/roast_xml/rule_xml.hpp index 9b45ddf6..2b3d23e3 100644 --- a/roast/include/roast/xml/roast_xml/rule_xml.hpp +++ b/roast/include/roast/xml/roast_xml/rule_xml.hpp @@ -36,6 +36,12 @@ namespace roast struct xml_declaration_invalid : public xml_parse_exception{ xml_declaration_invalid() : xml_parse_exception("Invalid XML Declaration Format.") {} }; + struct angle_bracket_invalid : public xml_parse_exception{ + angle_bracket_invalid() : xml_parse_exception("Angle bracket Invalid.") {} }; + + struct comment_invalid_hh : public xml_parse_exception{ + comment_invalid_hh() : xml_parse_exception("The thing including \"--\" cannot be done in the comment except the terminal.") {} }; + ////////////////////////////////////////////////////////////////////////////////////////////////////////////// namespace pcode @@ -91,9 +97,9 @@ namespace roast > str_xml; template - class lt_gt_ : public seq {}; + class angle_bracket : public seq > {}; template - class angle_bracket : public lt_gt_ {}; + class lt_gt_ : public angle_bracket {}; ///////////////////////////////////////////////////// @@ -101,16 +107,16 @@ namespace roast typedef seq< push_num, - get_string_end_by, + get_string_end_by >, // Not "seq" !! for interoperability. push_num > comment_str; - typedef lt_gt_< // < - seq< - exclamation, hyphen, hyphen, // !-- - comment_str, - hyphen, hyphen // -- - > // > + typedef seq< + lesser, exclamation, hyphen, hyphen, //