Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57355 - in trunk/libs/spirit/doc: . abstracts qi
From: joel_at_[hidden]
Date: 2009-11-04 08:33:21


Author: djowel
Date: 2009-11-04 08:33:19 EST (Wed, 04 Nov 2009)
New Revision: 57355
URL: http://svn.boost.org/trac/boost/changeset/57355

Log:
Patches from Chris Hoeppler
Text files modified:
   trunk/libs/spirit/doc/abstracts/attributes.qbk | 7 ++++---
   trunk/libs/spirit/doc/acknowledgments.qbk | 2 +-
   trunk/libs/spirit/doc/qi/concepts.qbk | 40 +++++++++++-----------------------------
   trunk/libs/spirit/doc/qi/error_handling.qbk | 5 +++--
   trunk/libs/spirit/doc/qi/mini_xml.qbk | 4 ++--
   trunk/libs/spirit/doc/qi/quick_reference.qbk | 11 ++++++++---
   trunk/libs/spirit/doc/qi/roman.qbk | 1 +
   7 files changed, 30 insertions(+), 40 deletions(-)

Modified: trunk/libs/spirit/doc/abstracts/attributes.qbk
==============================================================================
--- trunk/libs/spirit/doc/abstracts/attributes.qbk (original)
+++ trunk/libs/spirit/doc/abstracts/attributes.qbk 2009-11-04 08:33:19 EST (Wed, 04 Nov 2009)
@@ -16,7 +16,7 @@
 attribute/ as it is returned from a successful match representing the matched
 input sequence. For instance, numeric parsers, such as `int_` or `double_`,
 return the `int` or `double` value converted from the matched input sequence.
-Other primitive parser components have other intuitive attribute types, e.g.
+Other primitive parser components have other intuitive attribute types, such as for instance `int_` which has `int`, or `ascii::char_` which has `char`. Forprimitive parsers apply the normal C++ convertibility rules: you can use any Other primitive parser components have other intuitive attribute types, e.g.
 the parser `ascii::char_` has `char` as attribute type. For
 primitive parsers the normal C++ convertibility rules apply: you can use any
 C++ type to receive the parsed value as long as the attribute type of the
@@ -126,7 +126,7 @@
         karma::space, // delimiter grammar
         p); // data to use as the attribute
 
-(where the `karma::space` generator is used as the delimiter, allowing to
+(where the `ascii::space` generator is used as the delimiter, allowing to
 automatically skip/insert delimiting spaces in between all primitives).
 
 [tip *For sequences only:* __qi__ and __karma__ expose a set of API functions
@@ -186,7 +186,7 @@
 sequence. As said, they just don't expose any attribute and don't produce
 (consume) any data. The following example shows this:
 
- // the following parses "(1.0 2.0)" into a pair of double
+ // the following parses "(1.0, 2.0)" into a pair of double
     std::string input("(1.0, 2.0)");
     std::pair<double, double> p;
     qi::parse(input.begin(), input.end(),
@@ -291,6 +291,7 @@
 
     karma::rule<OutputIterator, double()> r;
 
+
 The inherited attributes of nonterminal parsers and generators are normally
 passed to the component during its invocation. These are the /parameters/ the
 parser or generator may accept and they can be used to parameterize the

Modified: trunk/libs/spirit/doc/acknowledgments.qbk
==============================================================================
--- trunk/libs/spirit/doc/acknowledgments.qbk (original)
+++ trunk/libs/spirit/doc/acknowledgments.qbk 2009-11-04 08:33:19 EST (Wed, 04 Nov 2009)
@@ -63,7 +63,7 @@
 such as helping with support, bug tracking, benchmarking and testing,
 etc. The list include: [*Michael Caisse], [*Larry Evans], [*Richard
 Webb], [*Martin Wille], [*Dan Marsden], [*Cedric Venet], [*Allan
-Odgaard], [*Matthias Vallentin], [*Justinas V.D.].
+Odgaard], [*Matthias Vallentin], [*Justinas V.D.], [*Darid Tromer].
 
 [*Joao Abecasis] for his early support and involvement in Spirit2
 development and for disturbing my peace every once in a while for a

Modified: trunk/libs/spirit/doc/qi/concepts.qbk
==============================================================================
--- trunk/libs/spirit/doc/qi/concepts.qbk (original)
+++ trunk/libs/spirit/doc/qi/concepts.qbk 2009-11-04 08:33:19 EST (Wed, 04 Nov 2009)
@@ -22,7 +22,7 @@
 [heading Description]
 
 The /Parser/ is the most fundamental concept. A Parser has a member
-function `parse`, that accepts a first-last __fwditer__ pair and
+function, `parse`, that accepts a first-last __fwditer__ pair andreturns bool as its result. The iterators delimit the data being parsed.function `parse`, that accepts a first-last __fwditer__ pair and
 returns `bool` as its result. The iterators delimit the data being parsed.
 The Parser's `parse` member function returns `true` if the parse
 succeeds, in which case the first iterator is advanced accordingly. Each
@@ -122,11 +122,7 @@
 
 [heading Models]
 
-* __qi_attr__
-* __qi_eoi__
-* __qi_eol__
-* __qi_eps__
-* __qi_symbols__
+__fixme__ Add links to /PrimitiveParser/ models here.
 
 [endsect] [/ PrimitiveParser Concept]
 
@@ -176,16 +172,7 @@
 
 [heading Models]
 
-* __qi_and_predicate__
-* __qi_kleene__
-* __qi_lexeme__
-* __qi_not_predicate__
-* __qi_omit__
-* __qi_plus__
-* __qi_raw__
-* [qi_repeat `repeat`]
-* __qi_skip__
-
+__fixme__ Add links to models of UnaryParser concept
 
 [endsect] [/ UnaryParser Concept]
 
@@ -239,9 +226,7 @@
 
 [heading Models]
 
-* __qi_difference__
-* __qi_list__
-
+__fixme__ Add links to models of BinaryParser concept
 
 [endsect] [/ BinaryParser Concept]
 
@@ -292,12 +277,7 @@
 
 [heading Models]
 
-* __qi_alternative__
-* __qi_expect__
-* __qi_permutation__
-* __qi_sequence__
-* __qi_sequential_or__
-
+__fixme__ Add links to models of NaryParser concept
 
 [endsect] [/ NaryParser Concept]
 
@@ -378,21 +358,21 @@
 [variablelist Notation
     [[`x`] [A Nonterminal]]
     [[`X`] [A Nonterminal type]]
- [[`arg1`, `arg2`, ..., `argN`] [__qi_lazy_arguments__ that evaluate to each of
+ [[`arg1`, `arg2`, ..., `argN`] [__qi_lazy_arguments__ that evaluate to each of
                                     the Nonterminal's inherited attributes.]]
 ]
 
 [heading Valid Expressions]
 
 In addition to the requirements defined in __parser_concept__, for any
-NaryParser the following must be met:
+Nonterminal the following must be met:
 
 [table
     [[Expression] [Semantics] [Return type]]
     [[`x`] [In a parser expression, invoke Nonterminal `x`] [`X`]]
     [[`x(arg1, arg2, ..., argN)`][In a parser expression, invoke Nonterminal `r`
                                 passing in inherited attributes
- `arg1` ... `argN`] [`X`]]
+ `arg1` ... `argN`] [`X`]]
     [[`x.name(name)`] [Naming a Nonterminal.] [`void`]]
     [[`x.name()`] [Getting the name of a Nonterminal.] [`std::string`]]
     [[debug(x)] [Debug Nonterminal `x`.] [`void`]]
@@ -413,6 +393,8 @@
 * __qi_rule__
 * __qi_grammar__
 
-[endsect] [/ Concept]
+[endsect] [/ XXX Concept]
+
+
 
 [endsect]

Modified: trunk/libs/spirit/doc/qi/error_handling.qbk
==============================================================================
--- trunk/libs/spirit/doc/qi/error_handling.qbk (original)
+++ trunk/libs/spirit/doc/qi/error_handling.qbk 2009-11-04 08:33:19 EST (Wed, 04 Nov 2009)
@@ -13,9 +13,10 @@
 the Qi tutorial with another version of the mini xml parser, this time, with
 error handling.
 
-[@../../example/qi/mini_xml1.cpp] and here: [@../../example/qi/mini_xml3.cpp]
+The full cpp file for this example can be found here:
+[@../../example/qi/mini_xml3.cpp]
 
-[import ../example/qi/mini_xml3.cpp]
+[import ../../example/qi/mini_xml3.cpp]
 
 Here's the grammar:
 

Modified: trunk/libs/spirit/doc/qi/mini_xml.qbk
==============================================================================
--- trunk/libs/spirit/doc/qi/mini_xml.qbk (original)
+++ trunk/libs/spirit/doc/qi/mini_xml.qbk 2009-11-04 08:33:19 EST (Wed, 04 Nov 2009)
@@ -108,8 +108,8 @@
>> '>'
     ;
 
-`_r1` is yet another __phoenix__ placeholder for the first inherited attribute (we
-have only one, use `_r2`, `_r3`, etc. if you have more).
+`_r1` is yet another __phoenix__ placeholder for the first inherited attribute
+(we have only one, use `_r2`, `_r3`, etc. if you have more).
 
 [heading A Lazy Lit]
 

Modified: trunk/libs/spirit/doc/qi/quick_reference.qbk
==============================================================================
--- trunk/libs/spirit/doc/qi/quick_reference.qbk (original)
+++ trunk/libs/spirit/doc/qi/quick_reference.qbk 2009-11-04 08:33:19 EST (Wed, 04 Nov 2009)
@@ -140,6 +140,11 @@
 
 [table
     [[Expression] [Attribute] [Description]]
+ [[`eol`] [`Unused`] [Matches the end of line (`\r` or `\n` or `\r\n`)]]
+ [[`eoi`] [`Unused`] [Matches the end of input (first == last)]]
+ [[`eps`] [`Unused`] [Match an empty string]]
+ [[`eps(b)`] [`Unused`] [If `b` is true, match an empty string]]
+ [[`lazy(fp)`] [Attribute of `P` where `P`
     [[__qi_eol__] [`Unused`] [Matches the end of line (`\r` or `\n` or `\r\n`)]]
     [[__qi_eoi__] [`Unused`] [Matches the end of input (first == last)]]
     [[__qi_eps__] [`Unused`] [Match an empty string]]
@@ -180,9 +185,9 @@
     [[__qi_raw__`[a]`] [__boost_iterator_range__`<I>`] [Presents the transduction of `a` as an iterator range]]
 
     [[[qi_repeat `repeat[a]`]] [`vector<A>`] [Repeat `a` zero or more times]]
- [[[qi_repeat `repeat(N)[a]`]] [`vector<A>`] [Repeat `a` `N` times]]
- [[[qi_repeat `repeat(N, M)[a]`]] [`vector<A>`] [Repeat `a` `N` to `M` times]]
- [[[qi_repeat `repeat(N, inf)[a]`]] [`vector<A>`] [Repeat `a` `N` or more times]]
+ [[[qi_repeat `repeat(N)[a]`]] [`vector<A>`] [Repeat `a` `N` times]]
+ [[[qi_repeat `repeat(N, M)[a]`]] [`vector<A>`] [Repeat `a` `N` to `M` times]]
+ [[[qi_repeat `repeat(N, inf)[a]`]] [`vector<A>`] [Repeat `a` `N` or more times]]
 
     [[__qi_skip__`[a]`] [`A`] [Re-establish the skipper that got inhibited by lexeme]]
     [[__qi_skip__`(p)[a]`] [`A`] [Use `p` as a skipper for parsing `a`]]

Modified: trunk/libs/spirit/doc/qi/roman.qbk
==============================================================================
--- trunk/libs/spirit/doc/qi/roman.qbk (original)
+++ trunk/libs/spirit/doc/qi/roman.qbk 2009-11-04 08:33:19 EST (Wed, 04 Nov 2009)
@@ -25,6 +25,7 @@
 Traditionally, symbol table management is maintained seperately outside the BNF
 grammar through semantic actions. Contrary to standard practice, the Spirit
 symbol table class symbols is-a parser. An object of which may be used
+symbol table class `symbols` is a parser, an object of which may be used
 anywhere in the EBNF grammar specification. It is an example of a dynamic
 parser. A dynamic parser is characterized by its ability to modify its behavior
 at run time. Initially, an empty symbols object matches nothing. At any time,


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