Boost logo

Boost-Commit :

From: joel_at_[hidden]
Date: 2008-04-27 05:11:49


Author: djowel
Date: 2008-04-27 05:11:49 EDT (Sun, 27 Apr 2008)
New Revision: 44816
URL: http://svn.boost.org/trac/boost/changeset/44816

Log:
tweak grammar_class
Text files modified:
   trunk/boost/spirit/home/qi/nonterminal/grammar.hpp | 16 ++++++++--------
   1 files changed, 8 insertions(+), 8 deletions(-)

Modified: trunk/boost/spirit/home/qi/nonterminal/grammar.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/nonterminal/grammar.hpp (original)
+++ trunk/boost/spirit/home/qi/nonterminal/grammar.hpp 2008-04-27 05:11:49 EDT (Sun, 27 Apr 2008)
@@ -132,9 +132,9 @@
     parse(
         Iterator& first
       , Iterator last
- , grammar_class<Def>)
+ , grammar_class<Def>& gc)
     {
- Def<Iterator, unused_type> def;
+ Def<Iterator, unused_type> def(gc);
         grammar<Def<Iterator, unused_type> > g(def);
         return parse(first, last, g);
     }
@@ -145,10 +145,10 @@
     parse(
         Iterator& first
       , Iterator last
- , grammar_class<Def>
+ , grammar_class<Def>& gc
       , Attr& attr)
     {
- Def<Iterator, unused_type> def;
+ Def<Iterator, unused_type> def(gc);
         grammar<Def<Iterator, unused_type> > g(def);
         return parse(first, last, g, attr);
     }
@@ -159,7 +159,7 @@
     phrase_parse(
         Iterator& first
       , Iterator last
- , grammar_class<Def>
+ , grammar_class<Def>& gc
       , Skipper const& skipper_)
     {
         typedef typename
@@ -168,7 +168,7 @@
 
         skipper_type skipper = spirit::as_component(qi::domain(), skipper_);
 
- Def<Iterator, skipper_type> def;
+ Def<Iterator, skipper_type> def(gc);
         grammar<Def<Iterator, skipper_type> > g(def);
         return phrase_parse(first, last, g, skipper);
     }
@@ -179,7 +179,7 @@
     phrase_parse(
         Iterator& first
       , Iterator last
- , grammar_class<Def>
+ , grammar_class<Def>& gc
       , Attr& attr
       , Skipper const& skipper_)
     {
@@ -189,7 +189,7 @@
 
         skipper_type skipper = spirit::as_component(qi::domain(), skipper_);
 
- Def<Iterator, skipper_type> def;
+ Def<Iterator, skipper_type> def(gc);
         grammar<Def<Iterator, skipper_type> > g(def);
         return phrase_parse(first, last, g, attr, skipper);
     }


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