Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61285 - in trunk/libs/spirit/example/scheme: . qi
From: hartmut.kaiser_at_[hidden]
Date: 2010-04-14 22:58:58


Author: hkaiser
Date: 2010-04-14 22:58:58 EDT (Wed, 14 Apr 2010)
New Revision: 61285
URL: http://svn.boost.org/trac/boost/changeset/61285

Log:
Spirit: Qi parser now almost complete
Text files modified:
   trunk/libs/spirit/example/scheme/qi/parse_qiexpr_impl.hpp | 4 ++--
   trunk/libs/spirit/example/scheme/qi/qiexpr_parser.hpp | 12 +++++++-----
   trunk/libs/spirit/example/scheme/todo.txt | 3 ++-
   3 files changed, 11 insertions(+), 8 deletions(-)

Modified: trunk/libs/spirit/example/scheme/qi/parse_qiexpr_impl.hpp
==============================================================================
--- trunk/libs/spirit/example/scheme/qi/parse_qiexpr_impl.hpp (original)
+++ trunk/libs/spirit/example/scheme/qi/parse_qiexpr_impl.hpp 2010-04-14 22:58:58 EDT (Wed, 14 Apr 2010)
@@ -21,8 +21,8 @@
     {
         typedef typename String::const_iterator iterator_type;
 
- scheme::input::qiexpr<iterator_type> p;
- scheme::input::qiexpr_white_space<iterator_type> ws;
+ scheme::qi::qiexpr_parser<iterator_type> p;
+ scheme::qi::qiexpr_white_space<iterator_type> ws;
 
         iterator_type begin = str.begin();
         iterator_type end = str.end();

Modified: trunk/libs/spirit/example/scheme/qi/qiexpr_parser.hpp
==============================================================================
--- trunk/libs/spirit/example/scheme/qi/qiexpr_parser.hpp (original)
+++ trunk/libs/spirit/example/scheme/qi/qiexpr_parser.hpp 2010-04-14 22:58:58 EDT (Wed, 14 Apr 2010)
@@ -3,8 +3,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_QIEXPR)
-#define BOOST_SPIRIT_QIEXPR
+#if !defined(BOOST_SPIRIT_QIEXPR_PARSER)
+#define BOOST_SPIRIT_QIEXPR_PARSER
 
 #include <string>
 
@@ -27,9 +27,10 @@
 }}}
 
 ///////////////////////////////////////////////////////////////////////////////
-namespace scheme { namespace input
+namespace scheme { namespace qi
 {
     using boost::spirit::ascii::space;
+ using boost::spirit::ascii::char_;
     using boost::spirit::qi::grammar;
     using boost::spirit::qi::rule;
     using boost::spirit::qi::symbols;
@@ -195,12 +196,13 @@
 
     ///////////////////////////////////////////////////////////////////////////
     template <typename Iterator>
- struct qiexpr : grammar<Iterator, qiexpr_white_space<Iterator>, utree()>
+ struct qiexpr_parser
+ : grammar<Iterator, qiexpr_white_space<Iterator>, utree()>
     {
         typedef typename boost::detail::iterator_traits<Iterator>::value_type
             char_type;
 
- qiexpr() : qiexpr::base_type(start)
+ qiexpr_parser() : qiexpr_parser::base_type(start)
         {
             typedef function<detail::make_list_node> make_list_type;
 

Modified: trunk/libs/spirit/example/scheme/todo.txt
==============================================================================
--- trunk/libs/spirit/example/scheme/todo.txt (original)
+++ trunk/libs/spirit/example/scheme/todo.txt 2010-04-14 22:58:58 EDT (Wed, 14 Apr 2010)
@@ -1,2 +1,3 @@
 Sexpr:
-- allow sheme-ish #t and #f
\ No newline at end of file
+- allow scheme-ish #t and #f
+- write parser and generator for binary on disk representation of sexpr


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