|
Boost-Commit : |
From: joel_at_[hidden]
Date: 2008-07-18 10:24:11
Author: djowel
Date: 2008-07-18 10:24:09 EDT (Fri, 18 Jul 2008)
New Revision: 47560
URL: http://svn.boost.org/trac/boost/changeset/47560
Log:
ensuring examples build ok
Added:
trunk/libs/spirit/classic/example/intermediate/simple_xml/tag.hpp (contents, props changed)
Text files modified:
trunk/libs/spirit/classic/example/Jamfile | 9 +++++++++
trunk/libs/spirit/classic/example/fundamental/distinct/distinct_parser.cpp | 2 +-
trunk/libs/spirit/classic/example/fundamental/distinct/distinct_parser_dynamic.cpp | 2 +-
trunk/libs/spirit/classic/example/fundamental/more_calculators/primitive_calc.cpp | 4 ++--
trunk/libs/spirit/classic/example/fundamental/more_calculators/rpn_calc.cpp | 2 +-
trunk/libs/spirit/classic/example/fundamental/no_actions.cpp | 4 ++--
trunk/libs/spirit/classic/example/fundamental/parser_context.cpp | 8 ++++----
trunk/libs/spirit/classic/example/fundamental/stuff_vector.cpp | 4 ++--
trunk/libs/spirit/classic/example/fundamental/stuff_vector2.cpp | 6 +++---
trunk/libs/spirit/classic/example/fundamental/sum.cpp | 4 ++--
trunk/libs/spirit/classic/example/intermediate/ipv4_opt.cpp | 2 +-
trunk/libs/spirit/classic/example/intermediate/lazy_parser.cpp | 6 +++---
trunk/libs/spirit/classic/example/intermediate/parameters.cpp | 8 ++++----
trunk/libs/spirit/classic/example/techniques/epsilon.cpp | 4 ++--
trunk/libs/spirit/classic/example/techniques/no_rules/no_rule3.cpp | 2 +-
15 files changed, 38 insertions(+), 29 deletions(-)
Modified: trunk/libs/spirit/classic/example/Jamfile
==============================================================================
--- trunk/libs/spirit/classic/example/Jamfile (original)
+++ trunk/libs/spirit/classic/example/Jamfile 2008-07-18 10:24:09 EDT (Fri, 18 Jul 2008)
@@ -122,6 +122,7 @@
exe regular_expression
: fundamental/regular_expression.cpp
+ /boost//regex
:
;
@@ -219,6 +220,14 @@
exe regex_convert
: intermediate/regex_convert.cpp
+ /boost//regex
+ :
+ ;
+
+exe simple_xml
+ : intermediate/simple_xml/driver.cpp
+ intermediate/simple_xml/tag.cpp
+ intermediate/simple_xml/tag.cpp
:
;
Modified: trunk/libs/spirit/classic/example/fundamental/distinct/distinct_parser.cpp
==============================================================================
--- trunk/libs/spirit/classic/example/fundamental/distinct/distinct_parser.cpp (original)
+++ trunk/libs/spirit/classic/example/fundamental/distinct/distinct_parser.cpp 2008-07-18 10:24:09 EDT (Fri, 18 Jul 2008)
@@ -14,7 +14,7 @@
using namespace std;
using namespace boost;
-using namespace spirit;
+using namespace BOOST_SPIRIT_CLASSIC_NS;
// keyword_p for C++
// (for basic usage instead of std_p)
Modified: trunk/libs/spirit/classic/example/fundamental/distinct/distinct_parser_dynamic.cpp
==============================================================================
--- trunk/libs/spirit/classic/example/fundamental/distinct/distinct_parser_dynamic.cpp (original)
+++ trunk/libs/spirit/classic/example/fundamental/distinct/distinct_parser_dynamic.cpp 2008-07-18 10:24:09 EDT (Fri, 18 Jul 2008)
@@ -14,7 +14,7 @@
using namespace std;
using namespace boost;
-using namespace spirit;
+using namespace BOOST_SPIRIT_CLASSIC_NS;
struct my_grammar: public grammar<my_grammar>
{
Modified: trunk/libs/spirit/classic/example/fundamental/more_calculators/primitive_calc.cpp
==============================================================================
--- trunk/libs/spirit/classic/example/fundamental/more_calculators/primitive_calc.cpp (original)
+++ trunk/libs/spirit/classic/example/fundamental/more_calculators/primitive_calc.cpp 2008-07-18 10:24:09 EDT (Fri, 18 Jul 2008)
@@ -15,8 +15,8 @@
//
///////////////////////////////////////////////////////////////////////////////
#include <boost/spirit/include/classic_core.hpp>
-#include <boost/spirit/include/classic_primitives.hpp>
-#include <boost/spirit/include/classic_operators.hpp>
+#include <boost/spirit/include/phoenix1_primitives.hpp>
+#include <boost/spirit/include/phoenix1_operators.hpp>
#include <iostream>
#include <string>
Modified: trunk/libs/spirit/classic/example/fundamental/more_calculators/rpn_calc.cpp
==============================================================================
--- trunk/libs/spirit/classic/example/fundamental/more_calculators/rpn_calc.cpp (original)
+++ trunk/libs/spirit/classic/example/fundamental/more_calculators/rpn_calc.cpp 2008-07-18 10:24:09 EDT (Fri, 18 Jul 2008)
@@ -18,7 +18,7 @@
///////////////////////////////////////////////////////////////////////////////
#include <boost/spirit/include/classic_core.hpp>
#include <boost/spirit/include/classic_attribute.hpp>
-#include <boost/spirit/include/classic_functions.hpp>
+#include <boost/spirit/include/phoenix1_functions.hpp>
#include <iostream>
#include <string>
Modified: trunk/libs/spirit/classic/example/fundamental/no_actions.cpp
==============================================================================
--- trunk/libs/spirit/classic/example/fundamental/no_actions.cpp (original)
+++ trunk/libs/spirit/classic/example/fundamental/no_actions.cpp 2008-07-18 10:24:09 EDT (Fri, 18 Jul 2008)
@@ -22,7 +22,7 @@
using namespace std;
using namespace boost;
-using namespace spirit;
+using namespace BOOST_SPIRIT_CLASSIC_NS;
//-----------------------------------------------------------------------------
@@ -39,7 +39,7 @@
parse_info<> info = parse(
"1",
-
+
no_actions_d
[
r
Modified: trunk/libs/spirit/classic/example/fundamental/parser_context.cpp
==============================================================================
--- trunk/libs/spirit/classic/example/fundamental/parser_context.cpp (original)
+++ trunk/libs/spirit/classic/example/fundamental/parser_context.cpp 2008-07-18 10:24:09 EDT (Fri, 18 Jul 2008)
@@ -19,8 +19,8 @@
// In this example int_rule is declared as rule with int match attribute's
// type, so in int_rule variable we can hold any parser, which returns int
// value. For example int_p or bin_p. And the most important is that we can
-// use returned value in the semantic action binded to the int_rule.
-//
+// use returned value in the semantic action binded to the int_rule.
+//
//-----------------------------------------------------------------------------
#include <iostream>
#include <boost/cstdlib.hpp>
@@ -30,7 +30,7 @@
using namespace std;
using namespace boost;
using namespace phoenix;
-using namespace spirit;
+using namespace BOOST_SPIRIT_CLASSIC_NS;
//-----------------------------------------------------------------------------
@@ -41,7 +41,7 @@
parse(
"123",
// Using a returned value in the semantic action
- int_rule[cout << arg1 << endl]
+ int_rule[cout << arg1 << endl]
);
return exit_success;
Modified: trunk/libs/spirit/classic/example/fundamental/stuff_vector.cpp
==============================================================================
--- trunk/libs/spirit/classic/example/fundamental/stuff_vector.cpp (original)
+++ trunk/libs/spirit/classic/example/fundamental/stuff_vector.cpp 2008-07-18 10:24:09 EDT (Fri, 18 Jul 2008)
@@ -16,9 +16,9 @@
//
///////////////////////////////////////////////////////////////////////////////
#include <boost/spirit/include/classic_core.hpp>
-#include <boost/spirit/include/classic_primitives.hpp>
#include <boost/spirit/include/classic_operators.hpp>
-#include <boost/spirit/include/classic_functions.hpp>
+#include <boost/spirit/include/phoenix1_functions.hpp>
+#include <boost/spirit/include/phoenix1_primitives.hpp>
#include <iostream>
#include <string>
Modified: trunk/libs/spirit/classic/example/fundamental/stuff_vector2.cpp
==============================================================================
--- trunk/libs/spirit/classic/example/fundamental/stuff_vector2.cpp (original)
+++ trunk/libs/spirit/classic/example/fundamental/stuff_vector2.cpp 2008-07-18 10:24:09 EDT (Fri, 18 Jul 2008)
@@ -16,10 +16,10 @@
//
///////////////////////////////////////////////////////////////////////////////
#include <boost/spirit/include/classic_core.hpp>
-#include <boost/spirit/include/classic_primitives.hpp>
#include <boost/spirit/include/classic_operators.hpp>
-#include <boost/spirit/include/classic_functions.hpp>
-#include <boost/spirit/include/classic_casts.hpp>
+#include <boost/spirit/include/phoenix1_functions.hpp>
+#include <boost/spirit/include/phoenix1_primitives.hpp>
+#include <boost/spirit/include/phoenix1_casts.hpp>
#include <iostream>
#include <string>
Modified: trunk/libs/spirit/classic/example/fundamental/sum.cpp
==============================================================================
--- trunk/libs/spirit/classic/example/fundamental/sum.cpp (original)
+++ trunk/libs/spirit/classic/example/fundamental/sum.cpp 2008-07-18 10:24:09 EDT (Fri, 18 Jul 2008)
@@ -15,8 +15,8 @@
//
///////////////////////////////////////////////////////////////////////////////
#include <boost/spirit/include/classic_core.hpp>
-#include <boost/spirit/include/classic_primitives.hpp>
-#include <boost/spirit/include/classic_operators.hpp>
+#include <boost/spirit/include/phoenix1_primitives.hpp>
+#include <boost/spirit/include/phoenix1_operators.hpp>
#include <iostream>
#include <string>
Modified: trunk/libs/spirit/classic/example/intermediate/ipv4_opt.cpp
==============================================================================
--- trunk/libs/spirit/classic/example/intermediate/ipv4_opt.cpp (original)
+++ trunk/libs/spirit/classic/example/intermediate/ipv4_opt.cpp 2008-07-18 10:24:09 EDT (Fri, 18 Jul 2008)
@@ -10,7 +10,7 @@
#include <boost/spirit/include/classic_push_back_actor.hpp>
#include <boost/spirit/include/classic_if.hpp>
#include <boost/spirit/include/classic_for.hpp>
-#include <boost/spirit/include/classic_phoenix.hpp>
+#include <boost/spirit/include/phoenix1.hpp>
#include <iostream>
#include <string>
#include <vector>
Modified: trunk/libs/spirit/classic/example/intermediate/lazy_parser.cpp
==============================================================================
--- trunk/libs/spirit/classic/example/intermediate/lazy_parser.cpp (original)
+++ trunk/libs/spirit/classic/example/intermediate/lazy_parser.cpp 2008-07-18 10:24:09 EDT (Fri, 18 Jul 2008)
@@ -39,7 +39,7 @@
#include <boost/spirit/include/classic_dynamic.hpp>
using namespace boost;
-using namespace spirit;
+using namespace BOOST_SPIRIT_CLASSIC_NS;
using namespace phoenix;
//-----------------------------------------------------------------------------
@@ -56,14 +56,14 @@
typedef stored_rule<ScannerT, parser_context<int> > number_rule_t;
struct block_closure;
- typedef spirit::closure<
+ typedef boost::spirit::classic::closure<
block_closure,
int,
typename number_rule_t::alias_t>
closure_base_t;
struct block_closure : closure_base_t
- {
+ {
typename closure_base_t::member1 sum;
typename closure_base_t::member2 int_rule;
};
Modified: trunk/libs/spirit/classic/example/intermediate/parameters.cpp
==============================================================================
--- trunk/libs/spirit/classic/example/intermediate/parameters.cpp (original)
+++ trunk/libs/spirit/classic/example/intermediate/parameters.cpp 2008-07-18 10:24:09 EDT (Fri, 18 Jul 2008)
@@ -25,12 +25,12 @@
#include <boost/spirit/include/classic_core.hpp>
#include <boost/spirit/include/classic_symbols.hpp>
-
-#include <boost/spirit/include/classic_phx1_tuples.hpp>
-#include <boost/spirit/include/classic_phx1_tuple_helpers.hpp>
-#include <boost/spirit/include/classic_primitives.hpp>
#include <boost/spirit/include/classic_closure.hpp>
+#include <boost/spirit/include/phoenix1_tuples.hpp>
+#include <boost/spirit/include/phoenix1_tuple_helpers.hpp>
+#include <boost/spirit/include/phoenix1_primitives.hpp>
+
///////////////////////////////////////////////////////////////////////////////
// used namespaces
using namespace BOOST_SPIRIT_CLASSIC_NS;
Added: trunk/libs/spirit/classic/example/intermediate/simple_xml/tag.hpp
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/classic/example/intermediate/simple_xml/tag.hpp 2008-07-18 10:24:09 EDT (Fri, 18 Jul 2008)
@@ -0,0 +1,33 @@
+// Copyright (c) 2005 Carl Barron. 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)
+
+#ifndef SIMPLE_XML_TAG_H
+#define SIMPLE_XML_TAG_H
+
+#include <boost/variant.hpp>
+#include <list>
+#include <map>
+#include <string>
+
+struct tag
+{
+ std::string id;
+ std::map<std::string,std::string> attributes;
+ typedef boost::variant<
+ std::string,
+ boost::recursive_wrapper<tag>
+ >
+ variant_type;
+ std::list<variant_type> children;
+};
+
+
+struct walk_data
+{
+ typedef void result_type;
+ void operator () (const std::string &x);
+ void operator () (const tag &t);
+};
+
+#endif
Modified: trunk/libs/spirit/classic/example/techniques/epsilon.cpp
==============================================================================
--- trunk/libs/spirit/classic/example/techniques/epsilon.cpp (original)
+++ trunk/libs/spirit/classic/example/techniques/epsilon.cpp 2008-07-18 10:24:09 EDT (Fri, 18 Jul 2008)
@@ -32,7 +32,7 @@
using namespace std;
using namespace boost;
-using namespace spirit;
+using namespace BOOST_SPIRIT_CLASSIC_NS;
using namespace phoenix;
//-----------------------------------------------------------------------------
@@ -51,7 +51,7 @@
parse_info<> info = parse(
"1",
-
+
// r rule is used twice but the semantic action is invoked only once
epsilon_p(r) >> r,
Modified: trunk/libs/spirit/classic/example/techniques/no_rules/no_rule3.cpp
==============================================================================
--- trunk/libs/spirit/classic/example/techniques/no_rules/no_rule3.cpp (original)
+++ trunk/libs/spirit/classic/example/techniques/no_rules/no_rule3.cpp 2008-07-18 10:24:09 EDT (Fri, 18 Jul 2008)
@@ -49,7 +49,7 @@
// Client code
//
///////////////////////////////////////////////////////////////////////////////
-struct skip_grammar : sub_grammar<skip_grammar>
+struct skip_grammar : boost::spirit::sub_grammar<skip_grammar>
{
typedef
alternative<alternative<space_parser, sequence<sequence<
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