From f65a7bc344e1ae4ff1d903e1327f4abfb610375d Mon Sep 17 00:00:00 2001 From: Myun2 Date: Mon, 11 Oct 2010 16:54:04 +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=E9=96=8B=E5=A7=8B=E3=81=AE=E3=83=95=E3=82=A9?= =?utf8?q?=E3=83=BC=E3=83=9E=E3=83=83=E3=83=88=E3=82=A8=E3=83=A9=E3=83=BC?= =?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/string_rule.hpp | 6 +++--- roast/include/roast/xml/roast_xml/rule_xml.hpp | 15 +++++++++---- roast/test/lexical_test/temp.xml | 30 ++++++++++++++------------ 3 files changed, 30 insertions(+), 21 deletions(-) diff --git a/roast/include/roast/lexical/string_rule.hpp b/roast/include/roast/lexical/string_rule.hpp index ddd73ded..82ea904c 100644 --- a/roast/include/roast/lexical/string_rule.hpp +++ b/roast/include/roast/lexical/string_rule.hpp @@ -27,14 +27,14 @@ namespace roast bool analyze(_It& it, _Param& param) { _asm nop; - _It it_backup=it; + char c=*it; T t; bool b = t.analyze(it, param); if ( b ){ - if ( *it_backup == '\r' ) + if ( c == '\r' ) param << _cr_t; - else if ( *it_backup == '\n' ) + else if ( c == '\n' ) param << _lf_t; } return b; diff --git a/roast/include/roast/xml/roast_xml/rule_xml.hpp b/roast/include/roast/xml/roast_xml/rule_xml.hpp index a7d755a9..2588d1a9 100644 --- a/roast/include/roast/xml/roast_xml/rule_xml.hpp +++ b/roast/include/roast/xml/roast_xml/rule_xml.hpp @@ -39,8 +39,11 @@ namespace roast struct angle_bracket_invalid : public xml_parse_exception{ angle_bracket_invalid() : xml_parse_exception("Angle bracket Invalid.") {} }; - struct comment_invalid_hyphyp : public xml_parse_exception{ - comment_invalid_hyphyp() : xml_parse_exception("The thing including \"--\" cannot be done in the Comment except the terminal.") {} }; + struct comment_invalid_start : public xml_parse_exception{ + comment_invalid_start() : xml_parse_exception("Comment Format Invalid. (Need Start \" - - -aaaa - -bbbb - - - \ No newline at end of file + + + + + + + + \ No newline at end of file -- 2.11.0