Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Struct template rule_parser

boost::parser::rule_parser

Synopsis

// In header: <boost/parser/parser_fwd.hpp>

template<bool CanUseCallbacks, typename TagType, typename Attribute, 
         typename LocalState, typename ParamsTuple> 
struct rule_parser {
};

Description

Applies another parser p, associated with this parser via TagType. The attribute produced is Attribute. Both a default-constructed object of type LocalState, and a default-constructed object of type ParamsTuple, are added to the parse context before the associated parser is applied. The parse succeeds iff p succeeds. If CanUseCallbacks is true, and if this parser is used within a call to callback_parse(), the attribute is produced via callback; otherwise, the attribute is produced as normal (as a return value, or as an out-param). The rule may be constructed with user-friendly diagnostic text that will appear if the top-level parse is executed with trace_mode == boost::parser::trace::on.


PrevUpHomeNext