2
0
mirror of https://github.com/boostorg/parser.git synced 2026-01-19 04:22:13 +00:00

Get specific about what RESOLVE() means, and link usage of it to the place

where it is defined.

Fixes #144.
This commit is contained in:
Zach Laine
2024-03-03 01:07:48 -06:00
parent 4a9a45f856
commit 374cad3c35
2 changed files with 8 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ itself be used as a parser; it must be called. In the table below:
"`char`");
* _RES_ is a notional macro that expands to the resolution of parse argument
or evaluation of a parse predicate;
or evaluation of a parse predicate (see _parsers_uses_);
* "`_RES_np_(pred) == true`" is a shorthand notation for "`_RES_np_(pred)` is
contextually convertible to `bool` and `true`"; likewise for `false`;
@@ -406,7 +406,7 @@ This table summarizes the attributes generated for all _Parser_ parsers. In
the table below:
* _RES_ is a notional macro that expands to the resolution of parse argument
or evaluation of a parse predicate, and
or evaluation of a parse predicate (see _parsers_uses_); and
* `x` and `y` represent arbitrary objects.

View File

@@ -1080,7 +1080,9 @@ This can also be a lambda. For example:
The operation that produces a value from a parse argument, which may be a
value or a callable taking a parse context argument, is referred to as
/resolving/ the parse argument.
/resolving/ the parse argument. If a parse argument `arg` can be called with
the current context, then the resolved value of `arg` is `arg(ctx)`;
otherwise, the resolved value is just `arg`.
Some callable parsers take a /parse predicate/. A parse predicate is not
quite the same as a parse argument, because it must be a callable object, and
@@ -1100,6 +1102,9 @@ This may of course be a lambda:
[](auto & ctx) { return _attr(ctx) == 3; }
The notional macro _RES_ expands to the result of resolving a parse argument
or parse predicate. You'll see it used in the rest of the documentation.
An example of how parse arguments are used:
namespace bp = boost::parser;