From 005e440d4f34a42ee6511a7c14c3a2a467e4ed93 Mon Sep 17 00:00:00 2001 From: Robert Adam Date: Fri, 22 Sep 2023 13:28:50 +0200 Subject: [PATCH] Update syntax examples to parser operator docs Fixes #769 --- doc/x3/quick_reference.qbk | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/x3/quick_reference.qbk b/doc/x3/quick_reference.qbk index 76c5bcb745..84fd703988 100644 --- a/doc/x3/quick_reference.qbk +++ b/doc/x3/quick_reference.qbk @@ -214,21 +214,21 @@ pages and pages of reference documentation. [section:operator Parser Operators] [table - [[Expression] [Attribute] [Description]] - [[__x3_not_predicate__] [`Unused`] [Not predicate. If the predicate `a` matches, + [[Expression] [Attribute] [Description]] + [[__x3_not_predicate__ `!a`] [`Unused`] [Not predicate. If the predicate `a` matches, fail. Otherwise, return a zero length match.]] - [[__x3_and_predicate__] [`Unused`] [And predicate. If the predicate `a` matches, + [[__x3_and_predicate__ `&a`] [`Unused`] [And predicate. If the predicate `a` matches, return a zero length match. Otherwise, fail.]] - [[__x3_optional__] [`optional`] [Optional. Parse `a` zero or one time]] - [[__x3_kleene__] [`vector`] [Kleene. Parse `a` zero or more times]] - [[__x3_plus__] [`vector`] [Plus. Parse `a` one or more times]] - [[__x3_alternative__] [`variant`] [Alternative. Parse `a` or `b`]] - [[__x3_sequence__] [`tuple`] [Sequence. Parse `a` followed by `b`]] - [[__x3_expect__] [`tuple`] [Expect. Parse `a` followed by `b`. `b` is + [[__x3_optional__ `-a`] [`optional`] [Optional. Parse `a` zero or one time]] + [[__x3_kleene__ `*a`] [`vector`] [Kleene. Parse `a` zero or more times]] + [[__x3_plus__ `+a`] [`vector`] [Plus. Parse `a` one or more times]] + [[__x3_alternative__ `a | b`] [`variant`] [Alternative. Parse `a` or `b`]] + [[__x3_sequence__ `a >> b`] [`tuple`] [Sequence. Parse `a` followed by `b`]] + [[__x3_expect__ `a > b`] [`tuple`] [Expect. Parse `a` followed by `b`. `b` is expected to match when `a` matches, otherwise, an `expectation_failure` is thrown.]] - [[__x3_difference__] [`A`] [Difference. Parse `a` but not `b`]] - [[__x3_list__] [`vector`] [List. Parse `a` delimited `b` one or more times]] + [[__x3_difference__ `a - b`] [`A`] [Difference. Parse `a` but not `b`]] + [[__x3_list__ `a % b`] [`vector`] [List. Parse `a` delimited `b` one or more times]] ] [endsect]