From 0744da497b95ae8cc4eabc9be528e2b1c5fc4d1e Mon Sep 17 00:00:00 2001 From: Zach Laine Date: Sat, 2 Dec 2023 15:01:54 -0600 Subject: [PATCH] innermost -> bottommost --- doc/tutorial.qbk | 4 ++-- include/boost/parser/parser.hpp | 2 +- include/boost/parser/parser_fwd.hpp | 24 ++++++++++++------------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/doc/tutorial.qbk b/doc/tutorial.qbk index 10e2de80..1edffd7a 100644 --- a/doc/tutorial.qbk +++ b/doc/tutorial.qbk @@ -28,12 +28,12 @@ A /subparser/ is a parser that is the child of another parser. The /top-level parser/ is the root of the tree of parsers. -The /current parser/ or /innermost parser/ is the parser with no children that +The /current parser/ or /bottommost parser/ is the parser with no children that is currently being used to parse the input. A /rule/ is a kind of parser that makes building large, complex parsers easier. A /subrule/ is a rule that is the child of some other rule. The -/current rule/ or /innermost rule/ is the one rule currently being used to +/current rule/ or /bottommost rule/ is the one rule currently being used to parse the input that has no subrules. Note that while there is always exactly one current parser, there may or may not be a current rule _emdash_ rules are one kind of parser, and you may or may not be using one at a given point in diff --git a/include/boost/parser/parser.hpp b/include/boost/parser/parser.hpp index 200b1c30..326ed29f 100644 --- a/include/boost/parser/parser.hpp +++ b/include/boost/parser/parser.hpp @@ -2411,7 +2411,7 @@ namespace boost { namespace parser { diagnostic_kind::warning, message, context); } - /** An invocable that returns the `I`th parameter to the innermost rule. + /** An invocable that returns the `I`th parameter to the bottommost rule. This is useful for forwarding parameters to sub-rules. */ template inline constexpr detail::param_t _p = {}; diff --git a/include/boost/parser/parser_fwd.hpp b/include/boost/parser/parser_fwd.hpp index 317de081..8acf529f 100644 --- a/include/boost/parser/parser_fwd.hpp +++ b/include/boost/parser/parser_fwd.hpp @@ -366,21 +366,21 @@ namespace boost { namespace parser { struct callback_rule; /** Returns a reference to the attribute(s) (i.e. return value) of the - innermost parser; multiple attributes will be stored within a + bottommost parser; multiple attributes will be stored within a `parser::tuple`. You may write to this value in a semantic action to control what attribute value(s) the associated parser produces. - Returns `none` if the innermost parser does produce an attribute. */ + Returns `none` if the bottommost parser does produce an attribute. */ template decltype(auto) _val(Context const & context); /** Returns a reference to the attribute or attributes already produced by - the innermost parser; multiple attributes will be stored within a - `parser::tuple`. Returns `none` if the innermost parser does produce + the bottommost parser; multiple attributes will be stored within a + `parser::tuple`. Returns `none` if the bottommost parser does produce an attribute. */ template decltype(auto) _attr(Context const & context); - /** Returns a `view` that describes the matched range of the innermost + /** Returns a `view` that describes the matched range of the bottommost parser. */ template decltype(auto) _where(Context const & context); @@ -396,34 +396,34 @@ namespace boost { namespace parser { decltype(auto) _end(Context const & context); /** Returns a reference to a `bool` that represents the success or failure - of the innermost parser. You can assign `false` to this within a + of the bottommost parser. You can assign `false` to this within a semantic action to force a parser to fail its parse. */ template decltype(auto) _pass(Context const & context); - /** Returns a reference to one or more local values that the innermost + /** Returns a reference to one or more local values that the bottommost rule is declared to have; multiple values will be stored within a - `parser::tuple`. Returns `none` if there is no innermost rule, or if + `parser::tuple`. Returns `none` if there is no bottommost rule, or if that rule has no locals. */ template decltype(auto) _locals(Context const & context); - /** Returns a reference to one or more parameters passed to the innermost + /** Returns a reference to one or more parameters passed to the bottommost rule `r`, by using `r` as `r.with(param0, param1, ... paramN)`; multiple values will be stored within a `parser::tuple`. Returns - `none` if there is no innermost rule, or if that rule was not given + `none` if there is no bottommost rule, or if that rule was not given any parameters. */ template decltype(auto) _params(Context const & context); /** Returns a reference to the globals object associated with the - innermost parser. Returns `none` if there is no associated globals + bottommost parser. Returns `none` if there is no associated globals object. */ template decltype(auto) _globals(Context const & context); /** Returns a reference to the error handler object associated with the - innermost parser. Returns `none` if there is no associated error + bottommost parser. Returns `none` if there is no associated error handler. */ template decltype(auto) _error_handler(Context const & context);