Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2002-10-19 14:06:22


>
> I've never heard before, that this problem exists. Could you please
> provide a more concrete example of the appearence of this bug, may be
> some sample code, how to reproduce it?
yes, of course.

>
> Which compiler do you use?
gcc version 2.95.3-10 (cygwin special)

I made a small example that behaves crazy when I uncomment this line in
stl_user_config in STLPort

#define _STLP_DEBUG 1

to get debug iterators. Without I can sompile this code fine:
----------------
#include <boost/spirit/spirit_rule.hpp>
#include <boost/spirit/spirit_tree.hpp>

#include <boost/spirit/spirit_rule.hpp>
#include <boost/spirit/utility/symbols.hpp>
#include <boost/spirit/utility/utilities.hpp>
#include <boost/spirit/utility/chset.hpp>

#include <iostream>
#include <fstream>
#include <map>
#include <sstream>
#include <vector>

namespace test
{
    using namespace spirit;
    typedef const char* iterator_t ;
    typedef parse_tree_match<const char*> parse_tree_match_t ;

    typedef parse_tree_match_t::tree_iterator Tree_iterator ;
    typedef tree_parse_info<> Parse_info ;

    typedef ast_match_policy<iterator_t> match_policy_t;
    typedef scanner<iterator_t> scanner_t;
    typedef rule<scanner_t, match_policy_t> rule_t;
    typedef std::map<int, std::string> Rule_map;
    typedef std::map<rule_id, std::string> Ruleid_map;

    static rule_t definition_ = ch_p('o') ;
    static rule_t protocol_ = +( definition_ );

}

int main()
{
    using namespace test;
    using namespace std;

    istream& in = cin;

    Parse_info result;

    const vector<char> vec = vector<char>( istream_iterator< char >( in ),
        istream_iterator< char >() );
    //
    // try uncommenting this with debug ietrators defined!
    //
    //result = ast_parse( vec.begin(), vec.end(),
    // protocol_, space_p );
}
------------

regards Thorsten, AAU


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk