Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61669 - trunk/libs/spirit/example/scheme/example/generate_qiexpr
From: hartmut.kaiser_at_[hidden]
Date: 2010-04-28 21:12:59


Author: hkaiser
Date: 2010-04-28 21:12:58 EDT (Wed, 28 Apr 2010)
New Revision: 61669
URL: http://svn.boost.org/trac/boost/changeset/61669

Log:
Spirit: Added missing file
Added:
   trunk/libs/spirit/example/scheme/example/generate_qiexpr/generate_sexpr_to_ostream.cpp (contents, props changed)

Added: trunk/libs/spirit/example/scheme/example/generate_qiexpr/generate_sexpr_to_ostream.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/example/scheme/example/generate_qiexpr/generate_sexpr_to_ostream.cpp 2010-04-28 21:12:58 EDT (Wed, 28 Apr 2010)
@@ -0,0 +1,38 @@
+// Copyright (c) 2001-2010 Hartmut Kaiser
+//
+// 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)
+
+#include <output/generate_sexpr.hpp>
+#include <output/generate_sexpr_impl.hpp>
+
+#include <fstream>
+
+///////////////////////////////////////////////////////////////////////////////
+// explicit template instantiation for the function parse_sexpr
+namespace scheme { namespace output
+{
+ template bool generate_sexpr(BOOST_TYPEOF(std::cout)&, utree const& result);
+ template bool generate_sexpr(std::string& str, utree const& result);
+}}
+
+#if defined(SCHEME_USE_SPIRIT_IO)
+namespace scheme
+{
+ std::ostream& operator<<(std::ostream& out, utree const& x)
+ {
+ output::generate_sexpr(out, x);
+ return out;
+ }
+}
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+// this is needed if grammar debugging is on
+namespace boost { namespace spirit { namespace traits
+{
+ void print_attribute(std::ostream& out, scheme::utree const& val)
+ {
+ scheme::output::generate_sexpr(out, val);
+ }
+}}}


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