Boost logo

Boost-Commit :

From: eric_at_[hidden]
Date: 2008-03-19 12:18:59


Author: eric_niebler
Date: 2008-03-19 12:18:58 EDT (Wed, 19 Mar 2008)
New Revision: 43725
URL: http://svn.boost.org/trac/boost/changeset/43725

Log:
Merged revisions 43177-43178,43180-43187,43194-43198,43201-43203,43208,43211,43214-43219,43222-43225,43227-43238,43242,43244-43245,43249-43250,43257-43259,43261,43263,43265,43267-43268,43270-43271,43273,43275-43279,43284-43289,43291,43295,43297-43298,43304-43305,43307,43313,43315,43324,43326-43327,43331,43333,43339-43343,43345,43348,43350,43352-43353,43355-43356,43358,43360,43366-43367,43369-43370,43372-43376,43378-43389,43394,43396-43398,43400-43401,43403-43404,43406-43408,43413-43415,43420,43425-43427,43429-43432,43436,43439-43440,43442-43457,43459-43460,43462-43463,43465-43466,43474-43475,43477,43479-43483,43486-43495,43497-43500,43504-43507,43510-43522,43529,43532-43533,43536,43543,43545,43547-43554,43556-43564,43567-43568,43571,43574-43585,43587-43589,43591,43594,43596-43599,43602-43604,43609-43618,43620,43623-43624,43626-43631,43634-43639,43648-43659,43664-43665,43667-43670,43672-43675,43677-43678,43681-43684,43688-43689,43697-43700,43703,43707-43708,43710-43713,43716,43718 via svnmerge from
https://svn.boost.org/svn/boost/trunk

........
  r43177 | eric_niebler | 2008-02-08 09:11:57 -0800 (Fri, 08 Feb 2008) | 1 line
  
  reserve some c_type bits for dinkumware on windows, fixes #1625
........
  r43506 | eric_niebler | 2008-03-04 15:01:17 -0800 (Tue, 04 Mar 2008) | 1 line
  
  fix bad interaction between boyer-moore optimization and partial match feature, fixes #1564
........
  r43718 | eric_niebler | 2008-03-18 22:18:50 -0700 (Tue, 18 Mar 2008) | 1 line
  
  correct minor doc inaccuracies
........

Properties modified:
   branches/release/ (props changed)
Text files modified:
   branches/release/boost/xpressive/detail/core/finder.hpp | 5 +++++
   branches/release/boost/xpressive/detail/core/regex_impl.hpp | 1 +
   branches/release/boost/xpressive/regex_algorithms.hpp | 5 +++--
   branches/release/boost/xpressive/traits/cpp_regex_traits.hpp | 2 ++
   branches/release/libs/xpressive/doc/actions.qbk | 5 ++++-
   branches/release/libs/xpressive/doc/history.qbk | 2 +-
   branches/release/libs/xpressive/doc/installation.qbk | 3 +++
   branches/release/libs/xpressive/doc/introduction.qbk | 26 ++++++++++++++------------
   branches/release/libs/xpressive/doc/static_regexes.qbk | 2 +-
   9 files changed, 34 insertions(+), 17 deletions(-)

Modified: branches/release/boost/xpressive/detail/core/finder.hpp
==============================================================================
--- branches/release/boost/xpressive/detail/core/finder.hpp (original)
+++ branches/release/boost/xpressive/detail/core/finder.hpp 2008-03-19 12:18:58 EDT (Wed, 19 Mar 2008)
@@ -36,6 +36,11 @@
     {
     }
 
+ bool ok_for_partial_matches() const
+ {
+ return false;
+ }
+
     bool operator ()(match_state<BidiIter> &state) const
     {
         Traits const &traits = traits_cast<Traits>(state);

Modified: branches/release/boost/xpressive/detail/core/regex_impl.hpp
==============================================================================
--- branches/release/boost/xpressive/detail/core/regex_impl.hpp (original)
+++ branches/release/boost/xpressive/detail/core/regex_impl.hpp 2008-03-19 12:18:58 EDT (Wed, 19 Mar 2008)
@@ -31,6 +31,7 @@
   : counted_base<finder<BidiIter> >
 {
     virtual ~finder() {}
+ virtual bool ok_for_partial_matches() const { return true; }
     virtual bool operator ()(match_state<BidiIter> &state) const = 0;
 };
 

Modified: branches/release/boost/xpressive/regex_algorithms.hpp
==============================================================================
--- branches/release/boost/xpressive/regex_algorithms.hpp (original)
+++ branches/release/boost/xpressive/regex_algorithms.hpp 2008-03-19 12:18:58 EDT (Wed, 19 Mar 2008)
@@ -81,7 +81,8 @@
         // handle partial matches
         else if(state.found_partial_match_ && 0 != (flags & regex_constants::match_partial))
         {
- return state.set_partial_match(), true;
+ state.set_partial_match();
+ return true;
         }
     }
 
@@ -256,7 +257,7 @@
         }
 
         // If we have a finder, use it to find where a potential match can start
- else if(impl.finder_)
+ else if(impl.finder_ && (!partial_ok || impl.finder_->ok_for_partial_matches()))
         {
             finder<BidiIter> const &find = *impl.finder_;
             if(find(state))

Modified: branches/release/boost/xpressive/traits/cpp_regex_traits.hpp
==============================================================================
--- branches/release/boost/xpressive/traits/cpp_regex_traits.hpp (original)
+++ branches/release/boost/xpressive/traits/cpp_regex_traits.hpp 2008-03-19 12:18:58 EDT (Wed, 19 Mar 2008)
@@ -118,6 +118,8 @@
     // Reserve some bits for the implementation
     #if defined(__GLIBCXX__)
     umaskex_t const std_ctype_reserved = 0x8000;
+ #elif defined(_CPPLIB_VER) && defined(BOOST_WINDOWS)
+ umaskex_t const std_ctype_reserved = 0x8200;
     #else
     umaskex_t const std_ctype_reserved = 0;
     #endif

Modified: branches/release/libs/xpressive/doc/actions.qbk
==============================================================================
--- branches/release/libs/xpressive/doc/actions.qbk (original)
+++ branches/release/libs/xpressive/doc/actions.qbk 2008-03-19 12:18:58 EDT (Wed, 19 Mar 2008)
@@ -66,6 +66,9 @@
 one and use it to index into the `results` map, and assign to it the result of
 converting sub-match 2 to an integer.
 
+[note To use semantic actions with your static regexes, you must
+`#include <boost/xpressive/regex_actions.hpp>`]
+
 How does this work? Just as the rest of the static regular expression, the part
 between brackets is an expression template. It encodes the action and executes
 it later. The expression `ref(result)` creates a lazy reference to the `result`
@@ -202,7 +205,7 @@
 
     // OK, use as first(s1) to get the begin iterator
     // of the sub-match referred to by s1.
- function<first_impl> const first = {{}};
+ function<first_impl>::type const first = {{}};
 
 [h3 Referring to Local Variables]
 

Modified: branches/release/libs/xpressive/doc/history.qbk
==============================================================================
--- branches/release/libs/xpressive/doc/history.qbk (original)
+++ branches/release/libs/xpressive/doc/history.qbk 2008-03-19 12:18:58 EDT (Wed, 19 Mar 2008)
@@ -7,7 +7,7 @@
 
 [section Appendix 1: History]
 
-[h2 Version 2.0.0, ????]
+[h2 Version 2.0.0, 10/12/2007]
 
 New Features:
 

Modified: branches/release/libs/xpressive/doc/installation.qbk
==============================================================================
--- branches/release/libs/xpressive/doc/installation.qbk (original)
+++ branches/release/libs/xpressive/doc/installation.qbk 2008-03-19 12:18:58 EDT (Wed, 19 Mar 2008)
@@ -35,6 +35,9 @@
 Likewise, you can include `xpressive_dynamic.hpp` if you only plan on using
 dynamic regexes.
 
+If you would also like to use semantic actions or custom assertions with your
+static regexes, you will need to additionally include `regex_actions.hpp`.
+
 [h2 Requirements]
 
 Xpressive requires Boost version 1.34.1 or higher.

Modified: branches/release/libs/xpressive/doc/introduction.qbk
==============================================================================
--- branches/release/libs/xpressive/doc/introduction.qbk (original)
+++ branches/release/libs/xpressive/doc/introduction.qbk 2008-03-19 12:18:58 EDT (Wed, 19 Mar 2008)
@@ -9,16 +9,18 @@
 
 [h2 What is xpressive?]
 
-xpressive is an object-oriented regular expression library. Regular expressions
+xpressive is a regular expression template library. Regular expressions
 (regexes) can be written as strings that are parsed dynamically at runtime
-(dynamic regexes), or as expression templates that are parsed at compile-time
-(static regexes). Dynamic regexes have the advantage that they can be accepted
-from the user as input at runtime or read from an initialization file. Static
-regexes have several advantages. Since they are C++ expressions instead of
-strings, they can be syntax-checked at compile-time. Also, they can refer to
-other regexes and to themselves, giving static regexes the power
-of context-free grammars. Finally, since they are statically bound,
-the compiler can generate faster code for static regexes.
+(dynamic regexes), or as ['expression templates][footnote See
+[@http://www.osl.iu.edu/~tveldhui/papers/Expression-Templates/exprtmpl.html
+Expression Templates]] that are parsed at compile-time (static regexes).
+Dynamic regexes have the advantage that they can be accepted from the user
+as input at runtime or read from an initialization file. Static regexes
+have several advantages. Since they are C++ expressions instead of
+strings, they can be syntax-checked at compile-time. Also, they can naturally
+refer to code and data elsewhere in your program, giving you the ability to call
+back into your code from within a regex match. Finally, since they are statically
+bound, the compiler can generate faster code for static regexes.
 
 xpressive's dual nature is unique and powerful. Static xpressive is a bit
 like the _spirit_fx_. Like _spirit_, you can build grammars with
@@ -28,9 +30,9 @@
 xpressive's interface should be familiar to anyone who has used _regexpp_.
 xpressive's innovation comes from allowing you to mix and match static and
 dynamic regexes in the same program, and even in the same expression! You
-can embed a dynamic regex in a static regex, and the dynamic regex will
-participate fully in the search, back-tracking as needed to make the match
-succeed.
+can embed a dynamic regex in a static regex, or /vice versa/, and the embedded
+regex will participate fully in the search, back-tracking as needed to make
+the match succeed.
 
 [h2 Hello, world!]
 

Modified: branches/release/libs/xpressive/doc/static_regexes.qbk
==============================================================================
--- branches/release/libs/xpressive/doc/static_regexes.qbk (original)
+++ branches/release/libs/xpressive/doc/static_regexes.qbk 2008-03-19 12:18:58 EDT (Wed, 19 Mar 2008)
@@ -19,7 +19,7 @@
 * are syntax-checked at compile-time; they will never fail at run-time due to
   a syntax error.
 * can naturally refer to other C++ data and code, including other regexes,
- making it possible to build grammars out of regular expressions and bind
+ making it simple to build grammars out of regular expressions and bind
   user-defined actions that execute when parts of your regex match.
 * are statically bound for better inlining and optimization. Static regexes
   require no state tables, virtual functions, byte-code or calls through


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