|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61262 - trunk/libs/spirit/example/scheme
From: hartmut.kaiser_at_[hidden]
Date: 2010-04-13 19:09:16
Author: hkaiser
Date: 2010-04-13 19:09:16 EDT (Tue, 13 Apr 2010)
New Revision: 61262
URL: http://svn.boost.org/trac/boost/changeset/61262
Log:
Spirit: fixing a typo in a file name
Added:
trunk/libs/spirit/example/scheme/scheme_intrinsics.hpp
- copied, changed from r61261, /trunk/libs/spirit/example/scheme/scheme_intinsics.hpp
Removed:
trunk/libs/spirit/example/scheme/scheme_intinsics.hpp
Text files modified:
trunk/libs/spirit/example/scheme/scheme_compiler.hpp | 2 +-
trunk/libs/spirit/example/scheme/scheme_intrinsics.hpp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
Modified: trunk/libs/spirit/example/scheme/scheme_compiler.hpp
==============================================================================
--- trunk/libs/spirit/example/scheme/scheme_compiler.hpp (original)
+++ trunk/libs/spirit/example/scheme/scheme_compiler.hpp 2010-04-13 19:09:16 EDT (Tue, 13 Apr 2010)
@@ -11,7 +11,7 @@
#include <map>
#include <boost/bind.hpp>
-#include "scheme_intinsics.hpp"
+#include "scheme_intrinsics.hpp"
#include "scheme_interpreter.hpp"
namespace scheme
Deleted: trunk/libs/spirit/example/scheme/scheme_intinsics.hpp
==============================================================================
--- trunk/libs/spirit/example/scheme/scheme_intinsics.hpp 2010-04-13 19:09:16 EDT (Tue, 13 Apr 2010)
+++ (empty file)
@@ -1,154 +0,0 @@
-/*=============================================================================
- 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_SCHEME_INTINSICS)
-#define BOOST_SPIRIT_SCHEME_INTINSICS
-
-#include "scheme_interpreter.hpp"
-
-namespace scheme
-{
- ///////////////////////////////////////////////////////////////////////////
- // if
- ///////////////////////////////////////////////////////////////////////////
- struct if_function
- {
- actor cond;
- actor then;
- actor else_;
- if_function(
- actor const& cond, actor const& then, actor const& else_)
- : cond(cond), then(then), else_(else_)
- {
- BOOST_ASSERT(!cond.empty());
- BOOST_ASSERT(!then.empty());
- BOOST_ASSERT(!else_.empty());
- }
-
- typedef utree result_type;
- utree operator()(args_type args) const
- {
- return cond(args).as<bool>() ? then(args) : else_(args);
- }
- };
-
- struct if_composite : composite<if_composite>
- {
- using base_type::operator();
- actor operator()(actor_list const& elements) const
- {
- actor_list::const_iterator i = elements.begin();
- actor if_ = *i++;
- actor then = *i++;
- actor else_ = *i;
- return actor(if_function(if_, then, else_));
- }
- };
-
- if_composite const if_ = if_composite();
-
- ///////////////////////////////////////////////////////////////////////////
- // less_than
- ///////////////////////////////////////////////////////////////////////////
- struct less_than_function
- : binary_function<less_than_function>
- {
- less_than_function(actor const& a, actor const& b)
- : base_type(a, b) {}
-
- typedef utree result_type;
- utree eval(utree const& a, utree const& b) const
- {
- return a < b;
- }
- };
-
- struct less_than_composite
- : binary_composite<less_than_function> {};
-
- less_than_composite const less_than
- = less_than_composite();
- less_than_composite const lt = less_than; // synonym
-
- ///////////////////////////////////////////////////////////////////////////
- // less_than_equal
- ///////////////////////////////////////////////////////////////////////////
- struct less_than_equal_function
- : binary_function<less_than_equal_function>
- {
- less_than_equal_function(actor const& a, actor const& b)
- : base_type(a, b) {}
-
- typedef utree result_type;
- utree eval(utree const& a, utree const& b) const
- {
- return a <= b;
- }
- };
-
- struct less_than_equal_composite
- : binary_composite<less_than_equal_function> {};
-
- less_than_equal_composite const less_than_equal
- = less_than_equal_composite();
- less_than_equal_composite const lte = less_than_equal; // synonym
-
- ///////////////////////////////////////////////////////////////////////////
- // plus
- ///////////////////////////////////////////////////////////////////////////
- struct plus_function : nary_function<plus_function>
- {
- plus_function(actor_list const& elements)
- : base_type(elements) {}
-
- bool eval(utree& result, utree const& element) const
- {
- result = result + element;
- return true;
- }
- };
-
- struct plus_composite : nary_composite<plus_function> {};
- plus_composite const plus = plus_composite();
-
- ///////////////////////////////////////////////////////////////////////////
- // minus
- ///////////////////////////////////////////////////////////////////////////
- struct minus_function : nary_function<minus_function>
- {
- minus_function(actor_list const& elements)
- : base_type(elements) {}
-
- bool eval(utree& result, utree const& element) const
- {
- result = result - element;
- return true;
- }
- };
-
- struct minus_composite : nary_composite<minus_function> {};
- minus_composite const minus = minus_composite();
-
- ///////////////////////////////////////////////////////////////////////////
- // times
- ///////////////////////////////////////////////////////////////////////////
- struct times_function : nary_function<times_function>
- {
- times_function(actor_list const& elements)
- : base_type(elements) {}
-
- bool eval(utree& result, utree const& element) const
- {
- result = result * element;
- return true;
- }
- };
-
- struct times_composite : nary_composite<times_function> {};
- times_composite const times = times_composite();
-}
-
-#endif
Copied: trunk/libs/spirit/example/scheme/scheme_intrinsics.hpp (from r61261, /trunk/libs/spirit/example/scheme/scheme_intinsics.hpp)
==============================================================================
--- /trunk/libs/spirit/example/scheme/scheme_intinsics.hpp (original)
+++ trunk/libs/spirit/example/scheme/scheme_intrinsics.hpp 2010-04-13 19:09:16 EDT (Tue, 13 Apr 2010)
@@ -4,8 +4,8 @@
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_SCHEME_INTINSICS)
-#define BOOST_SPIRIT_SCHEME_INTINSICS
+#if !defined(BOOST_SPIRIT_SCHEME_INTRINSICS)
+#define BOOST_SPIRIT_SCHEME_INTRINSICS
#include "scheme_interpreter.hpp"
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