Skip to content

Commit 77ba6a1

Browse files
committed
[expr, re] Replace maths pipes with code pipes
1 parent 1cd876e commit 77ba6a1

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

source/expressions.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4453,15 +4453,15 @@
44534453
\begin{bnf}
44544454
\nontermdef{logical-or-expression}\br
44554455
logical-and-expression\br
4456-
logical-or-expression \terminal{$||$} logical-and-expression
4456+
logical-or-expression \terminal{||} logical-and-expression
44574457
\end{bnf}
44584458

44594459
\pnum
4460-
The \tcode{$||$} operator groups left-to-right. The operands are both
4460+
The \tcode{||} operator groups left-to-right. The operands are both
44614461
contextually converted to \tcode{bool}
44624462
(Clause~\ref{conv}). It returns
44634463
\tcode{true} if either of its operands is \tcode{true}, and
4464-
\tcode{false} otherwise. Unlike \tcode{$|$}, \tcode{$||$} guarantees
4464+
\tcode{false} otherwise. Unlike \tcode{|}, \tcode{||} guarantees
44654465
left-to-right evaluation; moreover, the second operand is not evaluated
44664466
if the first operand evaluates to \tcode{true}.
44674467

source/regex.tex

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3719,16 +3719,19 @@
37193719
\pnum
37203720
\indexlibrary{\idxcode{match_not_null}}%
37213721
\indexlibrary{\idxcode{match_continuous}}%
3722-
Otherwise, if the iterator holds a zero-length match the operator calls
3723-
\tcode{regex_search(start, end, match, *pregex, flags $|$ regex_constants::match_not_null
3724-
$|$ regex_constants::match_}\\\tcode{continuous)}. If the call returns \tcode{true} the operator
3722+
Otherwise, if the iterator holds a zero-length match, the operator calls:
3723+
\begin{codeblock}
3724+
regex_search(start, end, match, *pregex,
3725+
flags | regex_constants::match_not_null | regex_constants::match_continuous)
3726+
\end{codeblock}
3727+
If the call returns \tcode{true} the operator
37253728
returns \tcode{*this}. Otherwise the operator increments \tcode{start} and continues as if
37263729
the most recent match was not a zero-length match.
37273730

37283731
\pnum
37293732
\indexlibrary{\idxcode{match_prev_avail}}%
37303733
If the most recent match was not a zero-length match, the operator sets
3731-
\tcode{flags} to \tcode{flags $|$ regex_constants \colcol match_prev_avail} and
3734+
\tcode{flags} to \tcode{flags | regex_constants \colcol match_prev_avail} and
37323735
calls \tcode{regex_search(start, end, match, *pregex, flags)}. If the call returns
37333736
\tcode{false} the iterator sets \tcode{*this} to the end-of-sequence iterator. The
37343737
iterator then returns \tcode{*this}.

0 commit comments

Comments
 (0)