Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76802 - branches/quickbook-dev/tools/quickbook/src
From: dnljms_at_[hidden]
Date: 2012-01-30 18:52:44


Author: danieljames
Date: 2012-01-30 18:52:43 EST (Mon, 30 Jan 2012)
New Revision: 76802
URL: http://svn.boost.org/trac/boost/changeset/76802

Log:
Quickbook: Be pedantic about utf-8 code points vs. chars.
Text files modified:
   branches/quickbook-dev/tools/quickbook/src/parsers.hpp | 6 +++---
   branches/quickbook-dev/tools/quickbook/src/syntax_highlight.cpp | 10 +++++-----
   2 files changed, 8 insertions(+), 8 deletions(-)

Modified: branches/quickbook-dev/tools/quickbook/src/parsers.hpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/parsers.hpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/parsers.hpp 2012-01-30 18:52:43 EST (Mon, 30 Jan 2012)
@@ -265,9 +265,9 @@
     //
     ///////////////////////////////////////////////////////////////////////////
 
- struct utf8_char_parser : public cl::parser<utf8_char_parser>
+ struct u8_codepoint_parser : public cl::parser<u8_codepoint_parser>
     {
- typedef utf8_char_parser self_t;
+ typedef u8_codepoint_parser self_t;
 
         template <typename Scanner>
         struct result
@@ -294,7 +294,7 @@
         }
     };
   
- utf8_char_parser const utf8_char_p = utf8_char_parser();
+ u8_codepoint_parser const u8_codepoint_p = u8_codepoint_parser();
 }
 
 #endif // BOOST_QUICKBOOK_SCOPED_BLOCK_HPP

Modified: branches/quickbook-dev/tools/quickbook/src/syntax_highlight.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/syntax_highlight.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/syntax_highlight.cpp 2012-01-30 18:52:43 EST (Mon, 30 Jan 2012)
@@ -287,7 +287,7 @@
                     | string_ [span("string")]
                     | char_ [span("char")]
                     | number [span("number")]
- | utf8_char_p [unexpected_char]
+ | u8_codepoint_p [unexpected_char]
                     )
                     ;
 
@@ -362,7 +362,7 @@
                     = +cl::chset_p("~!%^&*()+={[}]:;,<.>?/|\\-")
                     ;
 
- string_char = ('\\' >> utf8_char_p) | (cl::anychar_p - '\\');
+ string_char = ('\\' >> u8_codepoint_p) | (cl::anychar_p - '\\');
 
                 string_
                     = !cl::as_lower_d['l'] >> cl::confix_p('"', *string_char, '"')
@@ -442,7 +442,7 @@
                     | special [span("special")]
                     | string_ [span("string")]
                     | number [span("number")]
- | utf8_char_p [unexpected_char]
+ | u8_codepoint_p [unexpected_char]
                     )
                     ;
 
@@ -498,7 +498,7 @@
                     = ! string_prefix >> (long_string | short_string)
                     ;
 
- string_char = ('\\' >> utf8_char_p) | (cl::anychar_p - '\\');
+ string_char = ('\\' >> u8_codepoint_p) | (cl::anychar_p - '\\');
             
                 short_string
                     = cl::confix_p('\'', * string_char, '\'') |
@@ -564,7 +564,7 @@
                     =
                     *( macro
                     | escape
- | utf8_char_p [plain_char]
+ | u8_codepoint_p [plain_char]
                     )
                     ;
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk