Skip to content

Please provide an example for parsing a file #329

Description

@octopus-prime

In spirit x3 we could use

#include <boost/spirit/include/support_istream_iterator.hpp>

typedef boost::spirit::istream_iterator iterator_t;

std::ifstream stream(file);
iterator_t iterator(stream);

const bool ok = x3::phrase_parse
(
	iterator, iterator_t(),
	<rule>,
	<skipper>,
	<object_to_parse_into>
);

What is your design to do this job in boost::parser now?
The solution should be part of the documentation.

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions