Date: 2007-11-05 15:28:51
Date: 2007-11-05 15:28:51 EST (Mon, 05 Nov 2007)
New Revision: 40807
Text files modified:
trunk/libs/xpressive/doc/dynamic_regexes.qbk | 22 ++++------------------
trunk/libs/xpressive/doc/grammars.qbk | 6 ++++--
trunk/libs/xpressive/doc/nyi.qbk | 15 ++++++++++++---
3 files changed, 20 insertions(+), 23 deletions(-)
--- trunk/libs/xpressive/doc/dynamic_regexes.qbk (original)
+++ trunk/libs/xpressive/doc/dynamic_regexes.qbk 2007-11-05 15:28:51 EST (Mon, 05 Nov 2007)
@@ -19,10 +19,10 @@
There are two ways to create a dynamic regex: with the _regex_compile_
function or with the _regex_compiler_ class template. Use _regex_compile_
-if you want the default locale, syntax and semantics. Use _regex_compiler_ if you need to
-specify a different locale, or if you need more control over the regex syntax and semantics than the
-_syntax_option_type_ enumeration gives you. ['(Editor's note: in xpressive v1.0, _regex_compiler_ does not support
-customization of the dynamic regex syntax and semantics. It will in v2.0.)]
+if you want the default locale. Use _regex_compiler_ if you need to
+specify a different locale. In the section on
+[link boost_xpressive.user_s_guide.grammars_and_nested_matches regex grammars],
+we'll see another use for _regex_compiler_.
Here is an example of using `basic_regex<>::compile()`:
@@ -47,20 +47,6 @@
Since the syntax is documented exhaustively elsewhere, I will simply refer you to the existing standards, rather
than duplicate the specification here.
-[h2 Customizing Dynamic xpressive Syntax]
-xpressive v1.0 has limited support for the customization of dynamic regex syntax. The only customization allowed
-is what can be specified via the _syntax_option_type_ enumeration.
-I have planned some future work in this area for v2.0, however. xpressive's design allows for powerful mechanisms
-to customize the dynamic regex syntax. First, since the concept of "regex" is separated from the concept of
-"regex compiler", it will be possible to offer multiple regex compilers, each of which accepts a different syntax.
-Second, since xpressive allows you to build grammars using static regexes, it should be possible to build a
-dynamic regex parser out of static regexes! Then, new dynamic regex grammars can be created by cloning an existing
-regex grammar and modifying or disabling individual grammar rules to suit your needs.
As with static regexes, dynamic regexes support internationalization by allowing you to specify a different
--- trunk/libs/xpressive/doc/grammars.qbk (original)
+++ trunk/libs/xpressive/doc/grammars.qbk 2007-11-05 15:28:51 EST (Mon, 05 Nov 2007)
@@ -149,8 +149,10 @@
compiler.compile("(? $group = ) \\( (? $expr ) \\) ", x);
compiler.compile("(? $factor = ) \\d+ | (? $group ) ", x);
- compiler.compile("(? $term = ) (? $factor ) ( \\* (? $factor ) | / (? $factor ) )* ", x);
- expr = compiler.compile("(? $expr = ) (? $term ) ( \\+ (? $term ) | - (? $term ) )* ", x);
+ compiler.compile("(? $term = ) (? $factor )"
+ " ( \\* (? $factor ) | / (? $factor ) )* ", x);
+ expr = compiler.compile("(? $expr = ) (? $term )"
+ " ( \\+ (? $term ) | - (? $term ) )* ", x);
std::string str("foo 9*(10+3) bar");
--- trunk/libs/xpressive/doc/nyi.qbk (original)
+++ trunk/libs/xpressive/doc/nyi.qbk 2007-11-05 15:28:51 EST (Mon, 05 Nov 2007)
@@ -7,13 +7,22 @@
[section Appendix 2: Not Yet Implemented]
-The following features are planned for xpressive 2.X:\n
+The following features are planned for xpressive 2.X:
* Collation sequences such as [^'''[.a.]''']
* Equivalence classes like [^'''[=a=]''']
+* Control of nested results generation with `syntax_option_type::nosubs`,
+ and a `nosubs()` modifier for static xpressive.
+Here are some wish-list features. You or your company should
+consider hiring me to implement them!
+* Optimized DFA back-end for simple, fast regexing.
+* Different regex compiler front ends for basic, extended, awk, grep
+ and egrep regex syntax.
* Fine-grained control over the dynamic regex syntax
-* Improved localization support, possibly as a custom facet for `std::locale`
+* Optional integration with ICU for full Unicode support.
+* Improved localization support, possibly as a custom facet for `std::locale`.
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