Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63730 - in trunk/libs/spirit/example/scheme: example/scheme example/sexpr output qi
From: joel_at_[hidden]
Date: 2010-07-08 00:38:47


Author: djowel
Date: 2010-07-08 00:38:43 EDT (Thu, 08 Jul 2010)
New Revision: 63730
URL: http://svn.boost.org/trac/boost/changeset/63730

Log:
Scheme compiler fixes for g++ 4.2
Text files modified:
   trunk/libs/spirit/example/scheme/example/scheme/factorial1.cpp | 8 +++++---
   trunk/libs/spirit/example/scheme/example/sexpr/sexpr_error_test.cpp | 2 +-
   trunk/libs/spirit/example/scheme/output/sexpr.hpp | 2 +-
   trunk/libs/spirit/example/scheme/qi/qiexpr_generator.hpp | 2 +-
   4 files changed, 8 insertions(+), 6 deletions(-)

Modified: trunk/libs/spirit/example/scheme/example/scheme/factorial1.cpp
==============================================================================
--- trunk/libs/spirit/example/scheme/example/scheme/factorial1.cpp (original)
+++ trunk/libs/spirit/example/scheme/example/scheme/factorial1.cpp 2010-07-08 00:38:43 EDT (Thu, 08 Jul 2010)
@@ -11,7 +11,7 @@
 #include <iostream>
 #include <fstream>
 
-void ignore_bom(std::ifstream& in)
+bool ignore_bom(std::ifstream& in, char const* filename)
 {
     // Ignore the BOM marking the beginning of a UTF-8 file in Windows
     char c = in.peek();
@@ -24,9 +24,10 @@
         {
             std::cerr << "Error: Unexpected characters from input file: "
                 << filename << std::endl;
- return 1;
+ return false;
         }
     }
+ return true;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -43,7 +44,8 @@
             << filename << std::endl;
         return -1;
     }
- ignore_bom(in);
+ if (!ignore_bom(in, filename))
+ return -1;
 
     using scheme::interpreter;
     using scheme::function;

Modified: trunk/libs/spirit/example/scheme/example/sexpr/sexpr_error_test.cpp
==============================================================================
--- trunk/libs/spirit/example/scheme/example/sexpr/sexpr_error_test.cpp (original)
+++ trunk/libs/spirit/example/scheme/example/sexpr/sexpr_error_test.cpp 2010-07-08 00:38:43 EDT (Thu, 08 Jul 2010)
@@ -45,7 +45,7 @@
     test("(abc \n(\"a string 456) \ndef)", "missing double quote.sexpr");
     test("(abc \n(\"a string\" 0xggg) \ndef)", "erronoeus hex.sexpr");
     test("(abc \n(\"a \\zstring\" 999) \ndef)", "erronoeus escape.sexpr");
- test("(abc \n(\"a \uzstring\" 999) \ndef)", "erronoeus escape.sexpr");
+ test("(abc \n(\"a \\uzstring\" 999) \ndef)", "erronoeus escape.sexpr");
     return 0;
 }
 

Modified: trunk/libs/spirit/example/scheme/output/sexpr.hpp
==============================================================================
--- trunk/libs/spirit/example/scheme/output/sexpr.hpp (original)
+++ trunk/libs/spirit/example/scheme/output/sexpr.hpp 2010-07-08 00:38:43 EDT (Thu, 08 Jul 2010)
@@ -72,7 +72,7 @@
         rule<OutputIterator, utf8_symbol_range()> symbol;
         rule<OutputIterator, utf8_string_range()> string_;
         rule<OutputIterator, binary_range()> byte_str;
- rule<OutputIterator, nil()> nil;
+ rule<OutputIterator, scheme::nil()> nil;
         rule<OutputIterator, space_type, utree()> ref_;
     };
 }}

Modified: trunk/libs/spirit/example/scheme/qi/qiexpr_generator.hpp
==============================================================================
--- trunk/libs/spirit/example/scheme/qi/qiexpr_generator.hpp (original)
+++ trunk/libs/spirit/example/scheme/qi/qiexpr_generator.hpp 2010-07-08 00:38:43 EDT (Thu, 08 Jul 2010)
@@ -159,7 +159,7 @@
         delimiting_rule_type start, alternative, permutation, sequence, term;
         delimiting_rule_type grammar_, rule_;
         delimiting_rule_type rule_name, primitive0_rule, alternative_rule;
- rule<OutputIterator, nil()> nil;
+ rule<OutputIterator, scheme::nil()> nil;
         rule<OutputIterator, scheme::utf8_string()> literal;
         rule<OutputIterator, scheme::utf8_symbol(std::string)> symbol;
         rule<OutputIterator, scheme::utf8_symbol()> any_symbol;


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