Ticket #9283: regex_typo.patch

File regex_typo.patch, 21.9 KB (added by oss.2012.team+2013B@…, 9 years ago)

Patch for Boost.Regex docs.

  • libs/regex/doc/configuration.qbk

     
    6868[table
    6969[[macro][description]]
    7070[[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 tweek 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.]]
    7272[[BOOST_REGEX_MAX_CACHE_BLOCKS][Tells Boost.Regex how many memory blocks to store in
    7373         it's internal cache - memory blocks are taken from this cache rather than by calling
    74          ::operator new.  Generally speeking this can be an order of magnitude faster than
     74         ::operator new.  Generally speaking this can be an order of magnitude faster than
    7575         calling ::opertator new each time a memory block is required, but has the
    7676         downside that Boost.Regex can end up caching a large chunk of memory (by default
    7777         up to 16 blocks each of BOOST_REGEX_BLOCKSIZE size).  If memory is tight then try
  • libs/regex/doc/old_regex.qbk

     
    1818The class RegEx provides a high level simplified interface to the regular
    1919expression library, this class only handles narrow character strings, and
    2020regular expressions always follow the "normal" syntax - that is the
    21 same as the perl / ECMAScript synatx.
     21same as the perl / ECMAScript syntax.
    2222
    2323   typedef bool (*GrepCallback)(const RegEx& expression);
    2424   typedef bool (*GrepFileCallback)(const char* file, const RegEx& expression);
     
    229229         to determine what gets matched, and how the format string should be
    230230         treated. If /copy/ is true then all unmatched sections of input are
    231231         copied unchanged to output, if the flag /format_first_only/ is set then
    232          only the first occurance of the pattern found is replaced.
     232         only the first occurrence of the pattern found is replaced.
    233233         Returns the new string. See also
    234234         [link boost_regex.format format string syntax], and [match_flag_type].]]
    235235[[`std::string Merge(const char* in, const char* fmt, bool copy = true, boost::match_flag_type flags = match_default);`]
     
    239239         what gets matched, and how the format string should be treated.
    240240         If /copy/ is true then all unmatched sections of input are copied
    241241         unchanged to output, if the flag /format_first_only/ is set then only
    242          the first occurance of the pattern found is replaced. Returns
     242         the first occurrence of the pattern found is replaced. Returns
    243243         the new string. See also [link boost_regex.format format string syntax], and [match_flag_type].]]
    244244[[`unsigned Split(std::vector<std::string>& v, std::string& s, boost::match_flag_type flags = match_default, unsigned max_count = ~0);`]
    245245         [Splits the input string and pushes each one onto the vector.
  • libs/regex/doc/syntax_perl.qbk

     
    146146[h4 Possessive repeats]
    147147
    148148By 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 undesireable so there are
     149a match is found.  However, this behaviour can sometime be undesirable so there are
    150150also "possessive" repeats: these match as much as possible and do not then allow
    151151backtracking if the rest of the expression fails to match.
    152152
     
    436436
    437437        (?<NAME>expression)
    438438       
    439 Which can be then be refered to by the name /NAME/.  Alternatively you can delimit the name
     439Which can be then be referred to by the name /NAME/.  Alternatively you can delimit the name
    440440using 'NAME' as in:
    441441
    442442        (?'NAME'expression)
    443443       
    444 These named subexpressions can be refered to in a backreference using either [^\g{NAME}] or [^\k<NAME>]
    445 and can also be refered to by name in a [perl_format] format string for search and replace operations, or in the
     444These named subexpressions can be referred to in a backreference using either [^\g{NAME}] or [^\k<NAME>]
     445and can also be referred to by name in a [perl_format] format string for search and replace operations, or in the
    446446[match_results] member functions.
    447447       
    448448[h5 Comments]
     
    557557* [^(?(R&['name])yes-pattern|no-pattern)]  Executes /yes-pattern/ if we are executing inside a recursion to named sub-expression /name/, otherwise
    558558executes /no-pattern/.
    559559* [^(?(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 refered to from elsewhere in the pattern.
     560this is usually used to define one or more named sub-expressions which are referred to from elsewhere in the pattern.
    561561
    562562[h4 Operator precedence]
    563563
  • libs/regex/doc/basic_regex.qbk

     
    487487
    488488   size_type mark_count() const;
    489489
    490 [*Effects]: Returns the number of marked sub-expressions within the regular expresion.
     490[*Effects]: Returns the number of marked sub-expressions within the regular expression.
    491491
    492492[#boost_regex.basic_regex.assign1]
    493493
  • libs/regex/doc/concepts.qbk

     
    3838[section:traits_concept Traits Class Requirements]
    3939
    4040There are two sets of requirements for the `traits` template argument to
    41 [basic_regex]: a mininal interface (which is part of the regex standardization proposal),
     41[basic_regex]: a minimal interface (which is part of the regex standardization proposal),
    4242and an optional Boost-specific enhanced interface.
    4343
    4444[h4 Minimal requirements.]
     
    7777The following additional requirements are strictly optional,
    7878however in order for [basic_regex] to take advantage of these additional
    7979interfaces, all of the following requirements must be met; [basic_regex]
    80 will detect the presence or absense of the member `boost_extensions_tag` and
     80will detect the presence or absence of the member `boost_extensions_tag` and
    8181configure itself appropriately.
    8282
    8383
     
    8989[[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)`.]]
    9090[[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.]]
    9191[[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 formating operations.]]
    93 [[v.toupper(c)][X::char_type][Converts c to upper case, used for Perl-style \u and \U formating 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.]]
    9494]
    9595
    9696[endsect]
  • libs/regex/doc/introduction.qbk

     
    135135takes the result of a match and a format string, and produces a new string
    136136by merging the two.
    137137
    138 For iterating through all occurences of an expression within a text,
     138For iterating through all occurrences of an expression within a text,
    139139there are two iterator types: [regex_iterator] will enumerate over the
    140140[match_results] objects found, while [regex_token_iterator] will enumerate
    141141a series of strings (similar to perl style split operations).
  • libs/regex/doc/unicode_iterators.qbk

     
    6363
    6464The three-arg constructor of this class takes the start and end of the underlying sequence
    6565as well as the position to start iteration from.  This constructor validates that the
    66 underlying sequence has validly encoded endpoints: this prevents accidently incrementing/decrementing
     66underlying sequence has validly encoded endpoints: this prevents accidentally incrementing/decrementing
    6767past the end of the underlying sequence as a result of invalid UTF16 code sequences at the endpoints
    6868of the underlying range.
    6969
     
    9494
    9595The three-arg constructor of this class takes the start and end of the underlying sequence
    9696as well as the position to start iteration from.  This constructor validates that the
    97 underlying sequence has validly encoded endpoints: this prevents accidently incrementing/decrementing
     97underlying sequence has validly encoded endpoints: this prevents accidentally incrementing/decrementing
    9898past the end of the underlying sequence as a result of invalid UTF8 code sequences at the endpoints
    9999of the underlying range.
    100100
  • libs/regex/doc/regex_token_iterator.qbk

     
    378378      char c;
    379379      while(is.get(c))
    380380      {
    381          // use logarithmic growth stategy, in case
     381         // use logarithmic growth strategy, in case
    382382         // in_avail (above) returned zero:
    383383         if(s.capacity() == s.size())
    384384            s.reserve(s.capacity() * 3);
  • libs/regex/doc/regex_split.qbk

     
    8787      char c;
    8888      while(is.get(c))
    8989      {
    90          // use logarithmic growth stategy, in case
     90         // use logarithmic growth strategy, in case
    9191         // in_avail (above) returned zero:
    9292         if(s.capacity() == s.size())
    9393            s.reserve(s.capacity() * 3);
  • libs/regex/doc/syntax_basic.qbk

     
    173173
    174174[h5 Equivalence classes:]
    175175
    176 An expression of theform `[[=col=]]`, matches any character or collating
     176An expression of the form `[[=col=]]`, matches any character or collating
    177177element whose primary sort key is the same as that for collating element
    178178/col/, as with collating elements the name /col/ may be a
    179179[link boost_regex.syntax.collating_names collating symbolic name]. 
  • libs/regex/doc/icu_strings.qbk

     
    6565                              = boost::regex_constants::perl);
    6666
    6767[*Effects]: Creates a regular expression object from the Null-terminated
    68 UTF-8 characater sequence /p/.
     68UTF-8 character sequence /p/.
    6969
    7070   u32regex make_u32regex(const unsigned char* p,
    7171                          boost::regex_constants::syntax_option_type opt
    7272                              = boost::regex_constants::perl);
    7373
    74 [*Effects]: Creates a regular expression object from the Null-terminated UTF-8 characater sequence p.
     74[*Effects]: Creates a regular expression object from the Null-terminated UTF-8 character sequence p.
    7575
    7676   u32regex make_u32regex(const wchar_t* p,
    7777                          boost::regex_constants::syntax_option_type opt
    7878                              = boost::regex_constants::perl);
    7979
    80 [*Effects]: Creates a regular expression object from the Null-terminated characater 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.
    8181
    8282   u32regex make_u32regex(const UChar* p,
    8383                          boost::regex_constants::syntax_option_type opt
    8484                              = boost::regex_constants::perl);
    8585
    86 [*Effects]: Creates a regular expression object from the Null-terminated UTF-16 characater sequence p.
     86[*Effects]: Creates a regular expression object from the Null-terminated UTF-16 character sequence p.
    8787
    8888   template<class C, class T, class A>
    8989   u32regex make_u32regex(const std::basic_string<C, T, A>& s,
  • libs/regex/doc/history.qbk

     
    119119* Fixed configuration setup to allow building with VC7.1 - STLport-4.6.2 when using /Zc:wchar_t.
    120120* Moved declarations class-inline in static_mutex.hpp so that SGI Irix compiler can cope.
    121121* 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 curcumstances 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.
    123123* Fixed the value returned by basic_regex<>::empty() from a default constructed object.
    124 * Changed the deffinition 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.
    125125* Disabled external templates for Intel C++ 8.0 and earlier - otherwise unresolved references can occur.
    126126* 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.
    127127* Initialise all the data members of the unicode_iterators: this keeps gcc from issuing needless warnings.
  • libs/regex/doc/character_class_names.qbk

     
    88
    99[section:character_classes Character Class Names]
    1010
    11 [section:std_char_clases Character Classes that are Always Supported]
     11[section:std_char_classes Character Classes that are Always Supported]
    1212
    1313The following character class names are always supported by Boost.Regex:
    1414
  • libs/regex/doc/regex_replace.qbk

     
    4343                                Formatter fmt,
    4444                                match_flag_type flags = match_default);
    4545
    46 Enumerates all the occurences of expression /e/ in the sequence \[first, last),
    47 replacing each occurence with the string that results by merging the
     46Enumerates all the occurrences of expression /e/ in the sequence \[first, last),
     47replacing each occurrence with the string that results by merging the
    4848match found with the format string /fmt/, and copies the resulting string to /out/.
    4949In the case that /fmt/ is a unary, binary or ternary function object, then the
    5050character sequence generated by that object is copied unchanged to the output when performing
     
    5454text are not copied to output.
    5555
    5656If the flag `format_first_only` is set in flags then only the first
    57 occurence of /e/ is replaced.
     57occurrence of /e/ is replaced.
    5858
    59 The manner in which the format string /fmt/ is interpretted, along with the
     59The manner in which the format string /fmt/ is interpreted, along with the
    6060rules used for finding matches, are determined by the flags set in /flags/:
    6161see [match_flag_type].
    6262
     
    251251
    252252   const char* header_text =
    253253      "<HTML>\n<HEAD>\n"
    254       "<TITLE>Auto-generated html formated source</TITLE>\n"
     254      "<TITLE>Auto-generated html formatted source</TITLE>\n"
    255255      "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=windows-1252\">\n"
    256256      "</HEAD>\n"
    257257      "<BODY LINK=\"#0000ff\" VLINK=\"#800080\" BGCOLOR=\"#ffffff\">\n"
  • libs/regex/doc/syntax_extended.qbk

     
    209209
    210210An expression of the form `[[=col=]]`, matches any character or collating element
    211211whose primary sort key is the same as that for collating element /col/,
    212 as with colating elements the name /col/ may be a
     212as with collating elements the name /col/ may be a
    213213[link boost_regex.syntax.collating_names symbolic name].  A primary
    214214sort key is one that ignores case, accentation, or locale-specific tailorings;
    215215so for example `[[=a=]]` matches any of the characters:
     
    257257[[\\xdd][A hexadecimal escape sequence - matches the single character whose code point is 0xdd.]]
    258258[[\\x{dddd}][A hexadecimal escape sequence - matches the single character whose code point is 0xdddd.]]
    259259[[\\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.]]
    261261]
    262262
    263263[h5 "Single character" character classes:]
  • libs/regex/doc/regex_iterator.qbk

     
    203203                        const basic_regex<charT, traits>& e,
    204204                        regex_constants::match_flag_type m = regex_constants::match_default);
    205205
    206 [*Effects]: returns an iterator that enumerates all occurences of expression /e/
     206[*Effects]: returns an iterator that enumerates all occurrences of expression /e/
    207207in text /p/ using [match_flag_type] /m/.
    208208
    209209[h4 Examples]
  • libs/regex/doc/format_sed_syntax.qbk

     
    1313[table
    1414[[character][description]]
    1515[[&][The ampersand character is replaced in the output stream by
    16    the the whole of what matched the regular expression.  Use
     16   the whole of what matched the regular expression.  Use
    1717   \\& to output a literal '&' character.]]
    1818[[\\][Specifies an escape sequence.]]
    1919]
  • libs/regex/doc/locale.qbk

     
    165165        [[150][The character which when preceded by an escape character represents any single character.]["C"    ]]
    166166        [[151][The character which when preceded by an escape character represents end of buffer operator.]["Z"          ]]
    167167        [[152][The character which when preceded by an escape character represents the continuation assertion.]["G"      ]]
    168         [[153][The character which when preceeded 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.][!       ]]
    169169]
    170170
    171171Custom error messages are loaded as follows:
  • libs/regex/doc/regex_traits.qbk

     
    2929
    3030[h4 Description]
    3131
    32 The class `regex_traits` is just a thin wrapper around an actual implemention
     32The class `regex_traits` is just a thin wrapper around an actual implementation
    3333class, which may be one of:
    3434
    3535* `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.