$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r60164 - in trunk/boost/spirit/home: qi/char support support/char_encoding
From: joel_at_[hidden]
Date: 2010-03-04 21:59:40
Author: djowel
Date: 2010-03-04 21:59:39 EST (Thu, 04 Mar 2010)
New Revision: 60164
URL: http://svn.boost.org/trac/boost/changeset/60164
Log:
adding default char_encoding
Added:
   trunk/boost/spirit/home/support/char_encoding/default.hpp   (contents, props changed)
Text files modified: 
   trunk/boost/spirit/home/qi/char/char_class.hpp       |    10 +++++-----                              
   trunk/boost/spirit/home/support/common_terminals.hpp |     2 ++                                      
   2 files changed, 7 insertions(+), 5 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-04 21:59:39 EST (Thu, 04 Mar 2010)
@@ -31,17 +31,17 @@
 
 namespace boost { namespace spirit { namespace qi
 {
-    // hoist the char classification namespaces into qi sub-namespaces of the 
+    // hoist the char classification namespaces into qi sub-namespaces of the
     // same name
     namespace ascii { using namespace boost::spirit::ascii; }
     namespace iso8859_1 { using namespace boost::spirit::iso8859_1; }
     namespace standard { using namespace boost::spirit::standard; }
     namespace standard_wide { using namespace boost::spirit::standard_wide; }
 
-    // Import the standard namespace into the qi namespace. This allows 
-    // for default handling of all character/string related operations if not 
+    // Import the default_ namespace into the qi namespace. This allows
+    // for default handling of all character/string related operations if not
     // prefixed with a character set namespace.
-    using namespace boost::spirit::standard;
+    using namespace boost::spirit::default_;
 
     ///////////////////////////////////////////////////////////////////////////
     // Generic char classification parser (for alnum, alpha, graph, etc.)
@@ -57,7 +57,7 @@
         bool test(CharParam ch, Context&) const
         {
             using spirit::char_class::classify;
-            return traits::ischar<CharParam, char_encoding>::call(ch) && 
+            return traits::ischar<CharParam, char_encoding>::call(ch) &&
                    classify<char_encoding>::is(classification(), ch);
         }
 
Added: trunk/boost/spirit/home/support/char_encoding/default.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/spirit/home/support/char_encoding/default.hpp	2010-03-04 21:59:39 EST (Thu, 04 Mar 2010)
@@ -0,0 +1,28 @@
+/*=============================================================================
+    Copyright (c) 2001-2010 Hartmut Kaiser
+    Copyright (c) 2001-2010 Joel de Guzman
+
+    Distributed under the Boost Software License, Version 1.0. (See accompanying
+    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+#if !defined(BOOST_SPIRIT_DEFAULT_MARCH_05_2010_1041AM)
+#define BOOST_SPIRIT_DEFAULT_MARCH_05_2010_1041AM
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/spirit/home/support/char_encoding/standard.hpp>
+
+namespace boost { namespace spirit { namespace char_encoding
+{
+    ///////////////////////////////////////////////////////////////////////////
+    //  default_ uses char_encoding::standard
+    ///////////////////////////////////////////////////////////////////////////
+    struct default_ : char_encoding::standard
+    {
+    };
+}}}
+
+#endif
+
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-04 21:59:39 EST (Thu, 04 Mar 2010)
@@ -13,6 +13,7 @@
 #endif
 
 #include <boost/spirit/home/support/terminal.hpp>
+#include <boost/spirit/home/support/char_encoding/default.hpp>
 #include <boost/spirit/home/support/char_encoding/standard.hpp>
 #include <boost/spirit/home/support/char_encoding/standard_wide.hpp>
 #include <boost/spirit/home/support/char_encoding/ascii.hpp>
@@ -159,6 +160,7 @@
     }}}                                                                         \
     /***/
 
+BOOST_SPIRIT_DEFINE_CHAR_CODES(default_)
 BOOST_SPIRIT_DEFINE_CHAR_CODES(ascii)
 BOOST_SPIRIT_DEFINE_CHAR_CODES(iso8859_1)
 BOOST_SPIRIT_DEFINE_CHAR_CODES(standard)