From Jason Turner

[re.const]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpipxunr02/{from.md → to.md} +39 -40
tmp/tmpipxunr02/{from.md → to.md} RENAMED
@@ -23,31 +23,31 @@ namespace std::regex_constants {
23
  inline constexpr syntax_option_type multiline = unspecified;
24
  }
25
  ```
26
 
27
  The type `syntax_option_type` is an *implementation-defined* bitmask
28
- type ([[bitmask.types]]). Setting its elements has the effects listed
29
- in Table  [[tab:re:syntaxoption]]. A valid value of type
30
- `syntax_option_type` shall have at most one of the grammar elements
31
- `ECMAScript`, `basic`, `extended`, `awk`, `grep`, `egrep`, set. If no
32
- grammar element is set, the default grammar is `ECMAScript`.
33
 
34
- **Table: `syntax_option_type` effects** <a id="tab:re:syntaxoption">[tab:re:syntaxoption]</a>
35
 
36
  | Element | Effect(s) if set |
37
- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
38
- | % `icase` | Specifies that matching of regular expressions against a character container sequence shall be performed without regard to case. \indexlibrary{\idxcode{syntax_option_type}!\idxcode{icase}}% |
39
- | % `nosubs` | Specifies that no sub-expressions shall be considered to be marked, so that when a regular expression is matched against a character container sequence, no sub-expression matches shall be stored in the supplied `match_results` structure. \indexlibrary{\idxcode{syntax_option_type}!\idxcode{nosubs}}% |
40
- | % `optimize` | Specifies that the regular expression engine should pay more attention to the speed with which regular expressions are matched, and less to the speed with which regular expression objects are constructed. Otherwise it has no detectable effect on the program output. \indexlibrary{\idxcode{syntax_option_type}!\idxcode{optimize}}% |
41
- | % `collate` | Specifies that character ranges of the form `"[a-b]"` shall be locale sensitive. \indexlibrary{\idxcode{syntax_option_type}!\idxcode{collate}}% \indextext{locale}% |
42
- | % `ECMAScript` | Specifies that the grammar recognized by the regular expression engine shall be that used by ECMAScript in ECMA-262, as modified in~ [[re.grammar]]. \indextext{ECMAScript}% \indexlibrary{\idxcode{syntax_option_type}!\idxcode{ECMAScript}}% |
43
- | % `basic` | Specifies that the grammar recognized by the regular expression engine shall be that used by basic regular expressions in POSIX, Base Definitions and Headers, Section 9, Regular Expressions. \indextext{POSIX!regular expressions}% \indexlibrary{\idxcode{syntax_option_type}!\idxcode{basic}}% |
44
- | % `extended` | Specifies that the grammar recognized by the regular expression engine shall be that used by extended regular expressions in POSIX, Base Definitions and Headers, Section 9, Regular Expressions. \indextext{POSIX!extended regular expressions}% \indexlibrary{\idxcode{syntax_option_type}!\idxcode{extended}}% |
45
- | % `awk` | Specifies that the grammar recognized by the regular expression engine shall be that used by the utility awk in POSIX. \indextext{\idxcode{awk}}% \indexlibrary{\idxcode{syntax_option_type}!\idxcode{awk}}% |
46
- | % `grep` | Specifies that the grammar recognized by the regular expression engine shall be that used by the utility grep in POSIX. \indextext{\idxcode{grep}}% \indexlibrary{\idxcode{syntax_option_type}!\idxcode{grep}}% |
47
- | % `egrep` | Specifies that the grammar recognized by the regular expression engine shall be that used by the utility grep when given the -E option in POSIX. \indextext{\idxcode{egrep}}% \indexlibrary{\idxcode{syntax_option_type}!\idxcode{egrep}}% |
48
- | % `multiline` | Specifies that `\^` shall match the beginning of a line and `$` shall match the end of a line, if the `ECMAScript` engine is selected. \indextext{\idxcode{multiline}}% \indexlibrary{\idxcode{syntax_option_type}!\idxcode{multiline}}% |
49
 
50
 
51
  ### Bitmask type `match_flag_type` <a id="re.matchflag">[[re.matchflag]]</a>
52
 
53
  ``` cpp
@@ -67,37 +67,36 @@ namespace std::regex_constants {
67
  inline constexpr match_flag_type format_no_copy = unspecified;
68
  inline constexpr match_flag_type format_first_only = unspecified;
69
  }
70
  ```
71
 
72
- The type `match_flag_type` is an *implementation-defined* bitmask type (
73
- [[bitmask.types]]). The constants of that type, except for
74
  `match_default` and `format_default`, are bitmask elements. The
75
  `match_default` and `format_default` constants are empty bitmasks.
76
  Matching a regular expression against a sequence of characters
77
  \[`first`, `last`) proceeds according to the rules of the grammar
78
  specified for the regular expression object, modified according to the
79
- effects listed in Table  [[tab:re:matchflag]] for any bitmask elements
80
- set.
81
 
82
  **Table: `regex_constants::match_flag_type` effects when obtaining a match against a
83
- character container sequence {[}`first`, `last`{)}.** <a id="tab:re:matchflag">[tab:re:matchflag]</a>
84
 
85
  | Element | Effect(s) if set |
86
- | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
87
- | % \indexlibrary{\idxcode{match_not_bol}}% `match_not_bol` | The first character in the sequence {[}`first`, `last`{)} shall be treated as though it is not at the beginning of a line, so the character \verb|^| in the regular expression shall not match {[}`first`, `first`{)}. |
88
- | % \indexlibrary{\idxcode{match_not_eol}}% `match_not_eol` | The last character in the sequence {[}`first`, `last`{)} shall be treated as though it is not at the end of a line, so the character \verb|"$"| in the regular expression shall not match {[}`last`, `last`{)}. |
89
- | % \indexlibrary{\idxcode{match_not_bow}}% `match_not_bow` | The expression \verb|"b"| shall not match the sub-sequence {[}`first`, `first`{)}. |
90
- | % \indexlibrary{\idxcode{match_not_eow}}% `match_not_eow` | The expression \verb|"b"| shall not match the sub-sequence {[}`last`, `last`{)}. |
91
- | % \indexlibrary{\idxcode{match_any}}% `match_any` | If more than one match is possible then any match is an acceptable result. |
92
- | % \indexlibrary{\idxcode{match_not_null}}% `match_not_null` | The expression shall not match an empty sequence. |
93
- | % \indexlibrary{\idxcode{match_continuous}}% `match_continuous` | The expression shall only match a sub-sequence that begins at `first`. |
94
- | % \indexlibrary{\idxcode{match_prev_avail}}% `match_prev_avail` | \verb!--first! is a valid iterator position. When this flag is set the flags `match_not_bol` and `match_not_bow` shall be ignored by the regular expression algorithms~([[re.alg]]) and iterators~([[re.iter]]). |
95
- | % \indexlibrary{\idxcode{format_default}}% `format_default` | When a regular expression match is to be replaced by a new string, the new string shall be constructed using the rules used by the ECMAScript replace function in ECMA-262, part 15.5.4.11 String.prototype.replace. In addition, during search and replace operations all non-overlapping occurrences of the regular expression shall be located and replaced, and sections of the input that did not match the expression shall be copied unchanged to the output string. |
96
- | % \indexlibrary{\idxcode{format_sed}}% `format_sed` | When a regular expression match is to be replaced by a new string, the new string shall be constructed using the rules used by the sed utility in POSIX. |
97
- | % \indexlibrary{\idxcode{format_no_copy}}% `format_no_copy` | During a search and replace operation, sections of the character container sequence being searched that do not match the regular expression shall not be copied to the output string. |
98
- | % \indexlibrary{\idxcode{format_first_only}}% `format_first_only` | When specified during a search and replace operation, only the first occurrence of the regular expression shall be replaced. |
99
 
100
 
101
  ### Implementation-defined `error_type` <a id="re.err">[[re.err]]</a>
102
 
103
  ``` cpp
@@ -117,15 +116,15 @@ namespace std::regex_constants {
117
  inline constexpr error_type error_complexity = unspecified;
118
  inline constexpr error_type error_stack = unspecified;
119
  }
120
  ```
121
 
122
- The type `error_type` is an *implementation-defined* enumerated type (
123
- [[enumerated.types]]). Values of type `error_type` represent the error
124
- conditions described in Table  [[tab:re:errortype]]:
125
 
126
- **Table: `error_type` values in the C locale** <a id="tab:re:errortype">[tab:re:errortype]</a>
127
 
128
  | Value | Error condition |
129
  | -------------------- | ----------------------------------------------------------------------------------------------------------------------- |
130
  | `error_collate` | The expression contained an invalid collating element name. |
131
  | % `error_ctype` | The expression contained an invalid character class name. |
 
23
  inline constexpr syntax_option_type multiline = unspecified;
24
  }
25
  ```
26
 
27
  The type `syntax_option_type` is an *implementation-defined* bitmask
28
+ type [[bitmask.types]]. Setting its elements has the effects listed in
29
+ [[re.synopt]]. A valid value of type `syntax_option_type` shall have at
30
+ most one of the grammar elements `ECMAScript`, `basic`, `extended`,
31
+ `awk`, `grep`, `egrep`, set. If no grammar element is set, the default
32
+ grammar is `ECMAScript`.
33
 
34
+ **Table: `syntax_option_type` effects** <a id="re.synopt">[re.synopt]</a>
35
 
36
  | Element | Effect(s) if set |
37
+ | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
38
+ | % `icase` | Specifies that matching of regular expressions against a character container sequence shall be performed without regard to case. \indexlibrarymember{syntax_option_type}{icase}% |
39
+ | % `nosubs` | Specifies that no sub-expressions shall be considered to be marked, so that when a regular expression is matched against a character container sequence, no sub-expression matches shall be stored in the supplied `match_results` object. \indexlibrarymember{syntax_option_type}{nosubs}% |
40
+ | % `optimize` | Specifies that the regular expression engine should pay more attention to the speed with which regular expressions are matched, and less to the speed with which regular expression objects are constructed. Otherwise it has no detectable effect on the program output. \indexlibrarymember{syntax_option_type}{optimize}% |
41
+ | % `collate` | Specifies that character ranges of the form `"[a-b]"` shall be locale sensitive. \indexlibrarymember{syntax_option_type}{collate}% \indextext{locale}% |
42
+ | % `ECMAScript` | Specifies that the grammar recognized by the regular expression engine shall be that used by ECMAScript in ECMA-262, as modified in~ [[re.grammar]]. \xref ECMA-262 15.10 \indextext{ECMAScript}% \indexlibrarymember{syntax_option_type}{ECMAScript}% |
43
+ | % `basic` | Specifies that the grammar recognized by the regular expression engine shall be that used by basic regular expressions in POSIX. \xref POSIX, Base Definitions and Headers, Section 9.3 \indextext{POSIX!regular expressions}% \indexlibrarymember{syntax_option_type}{basic}% |
44
+ | % `extended` | Specifies that the grammar recognized by the regular expression engine shall be that used by extended regular expressions in POSIX. \xref POSIX, Base Definitions and Headers, Section 9.4 \indextext{POSIX!extended regular expressions}% \indexlibrarymember{syntax_option_type}{extended}% |
45
+ | % `awk` | Specifies that the grammar recognized by the regular expression engine shall be that used by the utility awk in POSIX. \indextext{\idxcode{awk}}% \indexlibrarymember{syntax_option_type}{awk}% |
46
+ | % `grep` | Specifies that the grammar recognized by the regular expression engine shall be that used by the utility grep in POSIX. \indextext{\idxcode{grep}}% \indexlibrarymember{syntax_option_type}{grep}% |
47
+ | % `egrep` | Specifies that the grammar recognized by the regular expression engine shall be that used by the utility grep when given the -E option in POSIX. \indextext{\idxcode{egrep}}% \indexlibrarymember{syntax_option_type}{egrep}% |
48
+ | % `multiline` | Specifies that `^` shall match the beginning of a line and `$` shall match the end of a line, if the `ECMAScript` engine is selected. \indextext{\idxcode{multiline}}% \indexlibrarymember{syntax_option_type}{multiline}% |
49
 
50
 
51
  ### Bitmask type `match_flag_type` <a id="re.matchflag">[[re.matchflag]]</a>
52
 
53
  ``` cpp
 
67
  inline constexpr match_flag_type format_no_copy = unspecified;
68
  inline constexpr match_flag_type format_first_only = unspecified;
69
  }
70
  ```
71
 
72
+ The type `match_flag_type` is an *implementation-defined* bitmask type
73
+ [[bitmask.types]]. The constants of that type, except for
74
  `match_default` and `format_default`, are bitmask elements. The
75
  `match_default` and `format_default` constants are empty bitmasks.
76
  Matching a regular expression against a sequence of characters
77
  \[`first`, `last`) proceeds according to the rules of the grammar
78
  specified for the regular expression object, modified according to the
79
+ effects listed in [[re.matchflag]] for any bitmask elements set.
 
80
 
81
  **Table: `regex_constants::match_flag_type` effects when obtaining a match against a
82
+ character container sequence {[}`first`, `last`{)}.** <a id="re.matchflag">[re.matchflag]</a>
83
 
84
  | Element | Effect(s) if set |
85
+ | ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
86
+ | % \indexlibraryglobal{match_not_bol}% `match_not_bol` | The first character in the sequence {[}`first`, `last`{)} shall be treated as though it is not at the beginning of a line, so the character \verb|^| in the regular expression shall not match {[}`first`, `first`{)}. |
87
+ | % \indexlibraryglobal{match_not_eol}% `match_not_eol` | The last character in the sequence {[}`first`, `last`{)} shall be treated as though it is not at the end of a line, so the character \verb|"$"| in the regular expression shall not match {[}`last`, `last`{)}. |
88
+ | % \indexlibraryglobal{match_not_bow}% `match_not_bow` | The expression \verb|"b"| shall not match the sub-sequence {[}`first`, `first`{)}. |
89
+ | % \indexlibraryglobal{match_not_eow}% `match_not_eow` | The expression \verb|"b"| shall not match the sub-sequence {[}`last`, `last`{)}. |
90
+ | % \indexlibraryglobal{match_any}% `match_any` | If more than one match is possible then any match is an acceptable result. |
91
+ | % \indexlibraryglobal{match_not_null}% `match_not_null` | The expression shall not match an empty sequence. |
92
+ | % \indexlibraryglobal{match_continuous}% `match_continuous` | The expression shall only match a sub-sequence that begins at `first`. |
93
+ | % \indexlibraryglobal{match_prev_avail}% `match_prev_avail` | \verb!--first! is a valid iterator position. When this flag is set the flags `match_not_bol` and `match_not_bow` shall be ignored by the regular expression algorithms [[re.alg]] and iterators [[re.iter]]. |
94
+ | % \indexlibraryglobal{format_default}% `format_default` | When a regular expression match is to be replaced by a new string, the new string shall be constructed using the rules used by the ECMAScript replace function in ECMA-262, part 15.5.4.11 String.prototype.replace. In addition, during search and replace operations all non-overlapping occurrences of the regular expression shall be located and replaced, and sections of the input that did not match the expression shall be copied unchanged to the output string. |
95
+ | % \indexlibraryglobal{format_sed}% `format_sed` | When a regular expression match is to be replaced by a new string, the new string shall be constructed using the rules used by the sed utility in POSIX. |
96
+ | % \indexlibraryglobal{format_no_copy}% `format_no_copy` | During a search and replace operation, sections of the character container sequence being searched that do not match the regular expression shall not be copied to the output string. |
97
+ | % \indexlibraryglobal{format_first_only}% `format_first_only` | When specified during a search and replace operation, only the first occurrence of the regular expression shall be replaced. |
98
 
99
 
100
  ### Implementation-defined `error_type` <a id="re.err">[[re.err]]</a>
101
 
102
  ``` cpp
 
116
  inline constexpr error_type error_complexity = unspecified;
117
  inline constexpr error_type error_stack = unspecified;
118
  }
119
  ```
120
 
121
+ The type `error_type` is an *implementation-defined* enumerated type
122
+ [[enumerated.types]]. Values of type `error_type` represent the error
123
+ conditions described in [[re.err]]:
124
 
125
+ **Table: `error_type` values in the C locale** <a id="re.err">[re.err]</a>
126
 
127
  | Value | Error condition |
128
  | -------------------- | ----------------------------------------------------------------------------------------------------------------------- |
129
  | `error_collate` | The expression contained an invalid collating element name. |
130
  | % `error_ctype` | The expression contained an invalid character class name. |