Ticket #9283: regex_typo.patch
File regex_typo.patch, 21.9 KB (added by , 9 years ago) |
---|
-
libs/regex/doc/configuration.qbk
68 68 [table 69 69 [[macro][description]] 70 70 [[BOOST_REGEX_BLOCKSIZE][In non-recursive mode, Boost.Regex uses largish blocks of memory to act as a stack for the state machine, the larger the block size then the fewer allocations that will take place. This defaults to 4096 bytes, which is large enough to match the vast majority of regular expressions without further allocations, however, you can choose smaller or larger values depending upon your platforms characteristics.]] 71 [[BOOST_REGEX_MAX_BLOCKS][Tells Boost.Regex how many blocks of size BOOST_REGEX_BLOCKSIZE it is permitted to use. If this value is exceeded then Boost.Regex will stop trying to find a match and throw a std::runtime_error. Defaults to 1024, don't forget to twe ek this value if you alter BOOST_REGEX_BLOCKSIZE by much.]]71 [[BOOST_REGEX_MAX_BLOCKS][Tells Boost.Regex how many blocks of size BOOST_REGEX_BLOCKSIZE it is permitted to use. If this value is exceeded then Boost.Regex will stop trying to find a match and throw a std::runtime_error. Defaults to 1024, don't forget to tweak this value if you alter BOOST_REGEX_BLOCKSIZE by much.]] 72 72 [[BOOST_REGEX_MAX_CACHE_BLOCKS][Tells Boost.Regex how many memory blocks to store in 73 73 it's internal cache - memory blocks are taken from this cache rather than by calling 74 ::operator new. Generally spe eking this can be an order of magnitude faster than74 ::operator new. Generally speaking this can be an order of magnitude faster than 75 75 calling ::opertator new each time a memory block is required, but has the 76 76 downside that Boost.Regex can end up caching a large chunk of memory (by default 77 77 up to 16 blocks each of BOOST_REGEX_BLOCKSIZE size). If memory is tight then try -
libs/regex/doc/old_regex.qbk
18 18 The class RegEx provides a high level simplified interface to the regular 19 19 expression library, this class only handles narrow character strings, and 20 20 regular expressions always follow the "normal" syntax - that is the 21 same as the perl / ECMAScript syn atx.21 same as the perl / ECMAScript syntax. 22 22 23 23 typedef bool (*GrepCallback)(const RegEx& expression); 24 24 typedef bool (*GrepFileCallback)(const char* file, const RegEx& expression); … … 229 229 to determine what gets matched, and how the format string should be 230 230 treated. If /copy/ is true then all unmatched sections of input are 231 231 copied unchanged to output, if the flag /format_first_only/ is set then 232 only the first occur ance of the pattern found is replaced.232 only the first occurrence of the pattern found is replaced. 233 233 Returns the new string. See also 234 234 [link boost_regex.format format string syntax], and [match_flag_type].]] 235 235 [[`std::string Merge(const char* in, const char* fmt, bool copy = true, boost::match_flag_type flags = match_default);`] … … 239 239 what gets matched, and how the format string should be treated. 240 240 If /copy/ is true then all unmatched sections of input are copied 241 241 unchanged to output, if the flag /format_first_only/ is set then only 242 the first occur ance of the pattern found is replaced. Returns242 the first occurrence of the pattern found is replaced. Returns 243 243 the new string. See also [link boost_regex.format format string syntax], and [match_flag_type].]] 244 244 [[`unsigned Split(std::vector<std::string>& v, std::string& s, boost::match_flag_type flags = match_default, unsigned max_count = ~0);`] 245 245 [Splits the input string and pushes each one onto the vector. -
libs/regex/doc/syntax_perl.qbk
146 146 [h4 Possessive repeats] 147 147 148 148 By default when a repeated pattern does not match then the engine will backtrack until 149 a match is found. However, this behaviour can sometime be undesir eable so there are149 a match is found. However, this behaviour can sometime be undesirable so there are 150 150 also "possessive" repeats: these match as much as possible and do not then allow 151 151 backtracking if the rest of the expression fails to match. 152 152 … … 436 436 437 437 (?<NAME>expression) 438 438 439 Which can be then be refer ed to by the name /NAME/. Alternatively you can delimit the name439 Which can be then be referred to by the name /NAME/. Alternatively you can delimit the name 440 440 using 'NAME' as in: 441 441 442 442 (?'NAME'expression) 443 443 444 These named subexpressions can be refer ed to in a backreference using either [^\g{NAME}] or [^\k<NAME>]445 and can also be refer ed to by name in a [perl_format] format string for search and replace operations, or in the444 These named subexpressions can be referred to in a backreference using either [^\g{NAME}] or [^\k<NAME>] 445 and can also be referred to by name in a [perl_format] format string for search and replace operations, or in the 446 446 [match_results] member functions. 447 447 448 448 [h5 Comments] … … 557 557 * [^(?(R&['name])yes-pattern|no-pattern)] Executes /yes-pattern/ if we are executing inside a recursion to named sub-expression /name/, otherwise 558 558 executes /no-pattern/. 559 559 * [^(?(DEFINE)never-exectuted-pattern)] Defines a block of code that is never executed and matches no characters: 560 this is usually used to define one or more named sub-expressions which are refer ed to from elsewhere in the pattern.560 this is usually used to define one or more named sub-expressions which are referred to from elsewhere in the pattern. 561 561 562 562 [h4 Operator precedence] 563 563 -
libs/regex/doc/basic_regex.qbk
487 487 488 488 size_type mark_count() const; 489 489 490 [*Effects]: Returns the number of marked sub-expressions within the regular expres ion.490 [*Effects]: Returns the number of marked sub-expressions within the regular expression. 491 491 492 492 [#boost_regex.basic_regex.assign1] 493 493 -
libs/regex/doc/concepts.qbk
38 38 [section:traits_concept Traits Class Requirements] 39 39 40 40 There are two sets of requirements for the `traits` template argument to 41 [basic_regex]: a mini nal interface (which is part of the regex standardization proposal),41 [basic_regex]: a minimal interface (which is part of the regex standardization proposal), 42 42 and an optional Boost-specific enhanced interface. 43 43 44 44 [h4 Minimal requirements.] … … 77 77 The following additional requirements are strictly optional, 78 78 however in order for [basic_regex] to take advantage of these additional 79 79 interfaces, all of the following requirements must be met; [basic_regex] 80 will detect the presence or absen se of the member `boost_extensions_tag` and80 will detect the presence or absence of the member `boost_extensions_tag` and 81 81 configure itself appropriately. 82 82 83 83 … … 89 89 [[v.translate(c, b)][X::char_type][Returns a character d such that: for any character d that is to be considered equivalent to c then `v.translate(c,false)==v.translate(d,false)`. Likewise for all characters C that are to be considered equivalent to c when comparisons are to be performed without regard to case, then `v.translate(c,true)==v.translate(C,true)`.]] 90 90 [[v.toi(I1, I2, i)][An integer type capable of holding either a charT or an int.][Behaves as follows: if `p == q` or if `*p` is not a digit character then returns -1. Otherwise performs formatted numeric input on the sequence \[p,q) and returns the result as an int. Postcondition: either p == q or *p is a non-digit character.]] 91 91 [[v.error_string(I)][std::string][Returns a human readable error string for the error condition i, where i is one of the values enumerated by type regex_constants::error_type. If the value /I/ is not recognized then returns the string "Unknown error" or a localized equivalent.]] 92 [[v.tolower(c)][X::char_type][Converts c to lower case, used for Perl-style \l and \L format ing operations.]]93 [[v.toupper(c)][X::char_type][Converts c to upper case, used for Perl-style \u and \U format ing operations.]]92 [[v.tolower(c)][X::char_type][Converts c to lower case, used for Perl-style \l and \L formatting operations.]] 93 [[v.toupper(c)][X::char_type][Converts c to upper case, used for Perl-style \u and \U formatting operations.]] 94 94 ] 95 95 96 96 [endsect] -
libs/regex/doc/introduction.qbk
135 135 takes the result of a match and a format string, and produces a new string 136 136 by merging the two. 137 137 138 For iterating through all occur ences of an expression within a text,138 For iterating through all occurrences of an expression within a text, 139 139 there are two iterator types: [regex_iterator] will enumerate over the 140 140 [match_results] objects found, while [regex_token_iterator] will enumerate 141 141 a series of strings (similar to perl style split operations). -
libs/regex/doc/unicode_iterators.qbk
63 63 64 64 The three-arg constructor of this class takes the start and end of the underlying sequence 65 65 as well as the position to start iteration from. This constructor validates that the 66 underlying sequence has validly encoded endpoints: this prevents accident ly incrementing/decrementing66 underlying sequence has validly encoded endpoints: this prevents accidentally incrementing/decrementing 67 67 past the end of the underlying sequence as a result of invalid UTF16 code sequences at the endpoints 68 68 of the underlying range. 69 69 … … 94 94 95 95 The three-arg constructor of this class takes the start and end of the underlying sequence 96 96 as well as the position to start iteration from. This constructor validates that the 97 underlying sequence has validly encoded endpoints: this prevents accident ly incrementing/decrementing97 underlying sequence has validly encoded endpoints: this prevents accidentally incrementing/decrementing 98 98 past the end of the underlying sequence as a result of invalid UTF8 code sequences at the endpoints 99 99 of the underlying range. 100 100 -
libs/regex/doc/regex_token_iterator.qbk
378 378 char c; 379 379 while(is.get(c)) 380 380 { 381 // use logarithmic growth st ategy, in case381 // use logarithmic growth strategy, in case 382 382 // in_avail (above) returned zero: 383 383 if(s.capacity() == s.size()) 384 384 s.reserve(s.capacity() * 3); -
libs/regex/doc/regex_split.qbk
87 87 char c; 88 88 while(is.get(c)) 89 89 { 90 // use logarithmic growth st ategy, in case90 // use logarithmic growth strategy, in case 91 91 // in_avail (above) returned zero: 92 92 if(s.capacity() == s.size()) 93 93 s.reserve(s.capacity() * 3); -
libs/regex/doc/syntax_basic.qbk
173 173 174 174 [h5 Equivalence classes:] 175 175 176 An expression of the form `[[=col=]]`, matches any character or collating176 An expression of the form `[[=col=]]`, matches any character or collating 177 177 element whose primary sort key is the same as that for collating element 178 178 /col/, as with collating elements the name /col/ may be a 179 179 [link boost_regex.syntax.collating_names collating symbolic name]. -
libs/regex/doc/icu_strings.qbk
65 65 = boost::regex_constants::perl); 66 66 67 67 [*Effects]: Creates a regular expression object from the Null-terminated 68 UTF-8 charac ater sequence /p/.68 UTF-8 character sequence /p/. 69 69 70 70 u32regex make_u32regex(const unsigned char* p, 71 71 boost::regex_constants::syntax_option_type opt 72 72 = boost::regex_constants::perl); 73 73 74 [*Effects]: Creates a regular expression object from the Null-terminated UTF-8 charac ater sequence p.74 [*Effects]: Creates a regular expression object from the Null-terminated UTF-8 character sequence p. 75 75 76 76 u32regex make_u32regex(const wchar_t* p, 77 77 boost::regex_constants::syntax_option_type opt 78 78 = boost::regex_constants::perl); 79 79 80 [*Effects]: Creates a regular expression object from the Null-terminated charac ater sequence p. The character encoding of the sequence is determined based upon sizeof(wchar_t): 1 implies UTF-8, 2 implies UTF-16, and 4 implies UTF-32.80 [*Effects]: Creates a regular expression object from the Null-terminated character sequence p. The character encoding of the sequence is determined based upon sizeof(wchar_t): 1 implies UTF-8, 2 implies UTF-16, and 4 implies UTF-32. 81 81 82 82 u32regex make_u32regex(const UChar* p, 83 83 boost::regex_constants::syntax_option_type opt 84 84 = boost::regex_constants::perl); 85 85 86 [*Effects]: Creates a regular expression object from the Null-terminated UTF-16 charac ater sequence p.86 [*Effects]: Creates a regular expression object from the Null-terminated UTF-16 character sequence p. 87 87 88 88 template<class C, class T, class A> 89 89 u32regex make_u32regex(const std::basic_string<C, T, A>& s, -
libs/regex/doc/history.qbk
119 119 * Fixed configuration setup to allow building with VC7.1 - STLport-4.6.2 when using /Zc:wchar_t. 120 120 * Moved declarations class-inline in static_mutex.hpp so that SGI Irix compiler can cope. 121 121 * Added needed standard library #includes to fileiter.hpp, regex_workaround.hpp and cpp_regex_traits.hpp. 122 * Fixed a bug where non-greedy repeats could in certain strange c urcumstances repeat more times than their maximum value.122 * Fixed a bug where non-greedy repeats could in certain strange circumstances repeat more times than their maximum value. 123 123 * Fixed the value returned by basic_regex<>::empty() from a default constructed object. 124 * Changed the def finition of regex_error to make it backwards compatible with Boost-1.32.0.124 * Changed the definition of regex_error to make it backwards compatible with Boost-1.32.0. 125 125 * Disabled external templates for Intel C++ 8.0 and earlier - otherwise unresolved references can occur. 126 126 * Rewritten extern template code for gcc so that only specific member functions are exported: otherwise strange unresolved references can occur when linking and mixing debug and non-debug code. 127 127 * Initialise all the data members of the unicode_iterators: this keeps gcc from issuing needless warnings. -
libs/regex/doc/character_class_names.qbk
8 8 9 9 [section:character_classes Character Class Names] 10 10 11 [section:std_char_clas es Character Classes that are Always Supported]11 [section:std_char_classes Character Classes that are Always Supported] 12 12 13 13 The following character class names are always supported by Boost.Regex: 14 14 -
libs/regex/doc/regex_replace.qbk
43 43 Formatter fmt, 44 44 match_flag_type flags = match_default); 45 45 46 Enumerates all the occur ences of expression /e/ in the sequence \[first, last),47 replacing each occur ence with the string that results by merging the46 Enumerates all the occurrences of expression /e/ in the sequence \[first, last), 47 replacing each occurrence with the string that results by merging the 48 48 match found with the format string /fmt/, and copies the resulting string to /out/. 49 49 In the case that /fmt/ is a unary, binary or ternary function object, then the 50 50 character sequence generated by that object is copied unchanged to the output when performing … … 54 54 text are not copied to output. 55 55 56 56 If the flag `format_first_only` is set in flags then only the first 57 occur ence of /e/ is replaced.57 occurrence of /e/ is replaced. 58 58 59 The manner in which the format string /fmt/ is interpret ted, along with the59 The manner in which the format string /fmt/ is interpreted, along with the 60 60 rules used for finding matches, are determined by the flags set in /flags/: 61 61 see [match_flag_type]. 62 62 … … 251 251 252 252 const char* header_text = 253 253 "<HTML>\n<HEAD>\n" 254 "<TITLE>Auto-generated html format ed source</TITLE>\n"254 "<TITLE>Auto-generated html formatted source</TITLE>\n" 255 255 "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=windows-1252\">\n" 256 256 "</HEAD>\n" 257 257 "<BODY LINK=\"#0000ff\" VLINK=\"#800080\" BGCOLOR=\"#ffffff\">\n" -
libs/regex/doc/syntax_extended.qbk
209 209 210 210 An expression of the form `[[=col=]]`, matches any character or collating element 211 211 whose primary sort key is the same as that for collating element /col/, 212 as with col ating elements the name /col/ may be a212 as with collating elements the name /col/ may be a 213 213 [link boost_regex.syntax.collating_names symbolic name]. A primary 214 214 sort key is one that ignores case, accentation, or locale-specific tailorings; 215 215 so for example `[[=a=]]` matches any of the characters: … … 257 257 [[\\xdd][A hexadecimal escape sequence - matches the single character whose code point is 0xdd.]] 258 258 [[\\x{dddd}][A hexadecimal escape sequence - matches the single character whose code point is 0xdddd.]] 259 259 [[\\0ddd][An octal escape sequence - matches the single character whose code point is 0ddd.]] 260 [[\\N{Name}][Matches the single character which has the symbolic name name. For example `\\N{newline}` matches the single character \\n.]]260 [[\\N{Name}][Matches the single character which has the symbolic name Name. For example `\\N{newline}` matches the single character \\n.]] 261 261 ] 262 262 263 263 [h5 "Single character" character classes:] -
libs/regex/doc/regex_iterator.qbk
203 203 const basic_regex<charT, traits>& e, 204 204 regex_constants::match_flag_type m = regex_constants::match_default); 205 205 206 [*Effects]: returns an iterator that enumerates all occur ences of expression /e/206 [*Effects]: returns an iterator that enumerates all occurrences of expression /e/ 207 207 in text /p/ using [match_flag_type] /m/. 208 208 209 209 [h4 Examples] -
libs/regex/doc/format_sed_syntax.qbk
13 13 [table 14 14 [[character][description]] 15 15 [[&][The ampersand character is replaced in the output stream by 16 the thewhole of what matched the regular expression. Use16 the whole of what matched the regular expression. Use 17 17 \\& to output a literal '&' character.]] 18 18 [[\\][Specifies an escape sequence.]] 19 19 ] -
libs/regex/doc/locale.qbk
165 165 [[150][The character which when preceded by an escape character represents any single character.]["C" ]] 166 166 [[151][The character which when preceded by an escape character represents end of buffer operator.]["Z" ]] 167 167 [[152][The character which when preceded by an escape character represents the continuation assertion.]["G" ]] 168 [[153][The character which when prece eded by (? indicates a zero width negated forward lookahead assert.][! ]]168 [[153][The character which when preceded by (? indicates a zero width negated forward lookahead assert.][! ]] 169 169 ] 170 170 171 171 Custom error messages are loaded as follows: -
libs/regex/doc/regex_traits.qbk
29 29 30 30 [h4 Description] 31 31 32 The class `regex_traits` is just a thin wrapper around an actual implement ion32 The class `regex_traits` is just a thin wrapper around an actual implementation 33 33 class, which may be one of: 34 34 35 35 * `c_regex_traits`: this class is deprecated, it wraps the C locale, and is used as the default implementation when the platform is not Win32, and the C++ locale is not available.