Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60216 - in trunk/boost/spirit/home: qi/char support
From: joel_at_[hidden]
Date: 2010-03-05 18:16:13


Author: djowel
Date: 2010-03-05 18:16:13 EST (Fri, 05 Mar 2010)
New Revision: 60216
URL: http://svn.boost.org/trac/boost/changeset/60216

Log:
encoding directive
Text files modified:
   trunk/boost/spirit/home/qi/char/char_class.hpp | 3 +++
   trunk/boost/spirit/home/support/common_terminals.hpp | 7 ++++++-
   2 files changed, 9 insertions(+), 1 deletions(-)

Modified: trunk/boost/spirit/home/qi/char/char_class.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/char/char_class.hpp (original)
+++ trunk/boost/spirit/home/qi/char/char_class.hpp 2010-03-05 18:16:13 EST (Fri, 05 Mar 2010)
@@ -50,6 +50,9 @@
     // prefixed with a character set namespace.
     using namespace boost::spirit::default_encoding;
 
+ // Import encoding
+ using spirit::encoding;
+
     ///////////////////////////////////////////////////////////////////////////
     // Generic char classification parser (for alnum, alpha, graph, etc.)
     ///////////////////////////////////////////////////////////////////////////

Modified: trunk/boost/spirit/home/support/common_terminals.hpp
==============================================================================
--- trunk/boost/spirit/home/support/common_terminals.hpp (original)
+++ trunk/boost/spirit/home/support/common_terminals.hpp 2010-03-05 18:16:13 EST (Fri, 05 Mar 2010)
@@ -59,6 +59,12 @@
     struct is_char_encoding<spirit::char_encoding::unicode> : mpl::true_ {};
 #endif
 
+ template <typename Encoding>
+ struct encoding
+ : proto::terminal<tag::char_code<tag::encoding, Encoding> >::type
+ {
+ };
+
     // Our basic terminals
     BOOST_SPIRIT_DEFINE_TERMINALS(
         ( verbatim )
@@ -190,7 +196,6 @@
         BOOST_SPIRIT_CHAR_CODE(upper, spirit::char_encoding::charset) \
         BOOST_SPIRIT_CHAR_CODE(lowernum, spirit::char_encoding::charset) \
         BOOST_SPIRIT_CHAR_CODE(uppernum, spirit::char_encoding::charset) \
- BOOST_SPIRIT_CHAR_CODE(encoding, spirit::char_encoding::charset) \
     }}} \
     /***/
 


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