|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r60395 - trunk/libs/spirit/example/scheme
From: joel_at_[hidden]
Date: 2010-03-09 20:36:43
Author: djowel
Date: 2010-03-09 20:36:42 EST (Tue, 09 Mar 2010)
New Revision: 60395
URL: http://svn.boost.org/trac/boost/changeset/60395
Log:
implementing /uHHHH and U/HHHHHHH properly
Text files modified:
trunk/libs/spirit/example/scheme/sexpr.hpp | 6 ++++--
trunk/libs/spirit/example/scheme/utree.hpp | 12 ++++++++----
2 files changed, 12 insertions(+), 6 deletions(-)
Modified: trunk/libs/spirit/example/scheme/sexpr.hpp
==============================================================================
--- trunk/libs/spirit/example/scheme/sexpr.hpp (original)
+++ trunk/libs/spirit/example/scheme/sexpr.hpp 2010-03-09 20:36:42 EST (Tue, 09 Mar 2010)
@@ -119,13 +119,15 @@
{
string() : string::base_type(start)
{
- uint_parser<uchar, 16> hex;
+ uint_parser<uchar, 16, 4, 4> hex4;
+ uint_parser<uchar, 16, 8, 8> hex8;
function<detail::push_utf8> push_utf8;
function<detail::push_esc> push_esc;
str_esc
= '\\'
- >> ( ('u' >> hex) [push_utf8(_r1, _1)]
+ >> ( ('u' >> hex4) [push_utf8(_r1, _1)]
+ | ('U' >> hex8) [push_utf8(_r1, _1)]
| char_("btnfr\\\"'") [push_esc(_r1, _1)]
)
;
Modified: trunk/libs/spirit/example/scheme/utree.hpp
==============================================================================
--- trunk/libs/spirit/example/scheme/utree.hpp (original)
+++ trunk/libs/spirit/example/scheme/utree.hpp 2010-03-09 20:36:42 EST (Tue, 09 Mar 2010)
@@ -613,7 +613,9 @@
bool operator()(const A& a, const B& b) const
{
return dispatch(a, b,
- boost::mpl::and_<boost::is_arithmetic<A>, boost::is_arithmetic<B> >());
+ boost::mpl::and_<
+ boost::is_arithmetic<A>,
+ boost::is_arithmetic<B> >());
}
template <typename T>
@@ -649,7 +651,9 @@
bool operator()(const A& a, const B& b) const
{
return dispatch(a, b,
- boost::mpl::and_<boost::is_arithmetic<A>, boost::is_arithmetic<B> >());
+ boost::mpl::and_<
+ boost::is_arithmetic<A>,
+ boost::is_arithmetic<B> >());
}
template <typename T>
@@ -753,14 +757,14 @@
struct index_impl
{
- static utree& apply(detail::list::node* node, std::size_t i)
+ static utree& apply(list::node* node, std::size_t i)
{
for (; i > 0; --i)
node = node->next;
return node->val;
}
- static utree const& apply(detail::list::node const* node, std::size_t i)
+ static utree const& apply(list::node const* node, std::size_t i)
{
for (; i > 0; --i)
node = node->next;
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