|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57212 - trunk/libs/spirit/doc/qi
From: joel_at_[hidden]
Date: 2009-10-28 20:21:38
Author: djowel
Date: 2009-10-28 20:21:37 EDT (Wed, 28 Oct 2009)
New Revision: 57212
URL: http://svn.boost.org/trac/boost/changeset/57212
Log:
parse API
Added:
trunk/libs/spirit/doc/qi/parse_api.qbk (contents, props changed)
Added: trunk/libs/spirit/doc/qi/parse_api.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/qi/parse_api.qbk 2009-10-28 20:21:37 EDT (Wed, 28 Oct 2009)
@@ -0,0 +1,87 @@
+[/==============================================================================
+ Copyright (C) 2001-2009 Joel de Guzman
+ Copyright (C) 2001-2009 Hartmut Kaiser
+
+ 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)
+===============================================================================/]
+[section:parse_api Parse API]
+
+[heading Description]
+
+The library provides a couple of free functions to make parsing a snap.
+These parser functions have two forms. The first form `parse` works on
+the character level. The second `phrase_parse` works on the phrase level
+and requires skip parser. Both versions can take in attributes by
+reference that will hold the parsed attribute on a successful parse.
+
+[heading Header]
+
+ // forwards to <boost/spirit/qi/parse.hpp>
+ #include <boost/spirit/inlcude/qi_parse.hpp>
+
+For variadic attributes:
+
+ // forwards to <boost/spirit/qi/parse_attr.hpp>
+ #include <boost/spirit/inlcude/qi_parse_attr.hpp>
+
+(The variadic attributes version of the API allows one or more
+attributes to be passed into the parse functions. This forms
+are usable when the parser expression is a __qi_sequence__)
+
+Also, see __include_structure__.
+
+[heading Namespace]
+
+[table
+ [[Name]]
+ [[`boost::spirit::qi::parse` ]]
+ [[`boost::spirit::qi::phrase_parse` ]]
+ [[`boost::spirit::qi::skip_flag::postskip` ]]
+ [[`boost::spirit::qi::skip_flag::dont_postskip` ]]
+]
+
+[heading Synopsis]
+
+ template <typename Iterator, typename Expr>
+ inline bool
+ parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr);
+
+ template <typename Iterator, typename Expr, typename Attr>
+ inline bool
+ parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Attr1& attr1, Attr2& attr2... AttrN& attrN);
+
+ template <typename Iterator, typename Expr, typename Skipper>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , BOOST_SCOPED_ENUM(skip_flag) post_skip = skip_flag::postskip);
+
+ template <typename Iterator, typename Expr, typename Skipper, typename Attr>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , Attr1& attr1, Attr2& attr2... AttrN& attrN);
+
+[table
+ [[Parameter] [Description]]
+ [[`Iterator`] [__fwditer__ pointing to the source to parse.]]
+ [[`Expr`] [An expression that can be converted to a Qi parser.]]
+ [[`Skipper`] [Parser used to skip white spaces.]]
+ [[`Attr1`, `Attr2`, ... `AttrN`][One or more attributes.]]
+]
+
+[endsect]
\ No newline at end of file
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