From 2988080c3277bddfa2a2c4ec7768e748e2d8c20b Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 14 May 2022 15:18:54 -0400 Subject: Added :tag --- bp.1 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'bp.1') diff --git a/bp.1 b/bp.1 index 2c53ca6..635f7fd 100644 --- a/bp.1 +++ b/bp.1 @@ -355,10 +355,13 @@ not contain the word \f[B]\[lq]IGNORE\[rq]\f[R]) \f[I]name\f[R]\f[B]:\f[R] \f[I]pat\f[R] Define \f[I]name\f[R] to mean \f[I]pat\f[R] (pattern definition) .TP +\f[B]:\f[R]\f[I]name\f[R] \f[I]pat\f[R] +Match \f[I]pat\f[R] and tag it with the given name as metadata. +.TP \f[I]name\f[R]\f[B]::\f[R] \f[I]pat\f[R] -Define \f[I]name\f[R] to be a special tagged pattern \f[I]pat\f[R]. -This is the same as a regular definition, except that a piece of -metadata is attached to it associating it with the specified name. +Syntactic sugar for \f[I]name\f[R]\f[B]::\f[R] \f[B]:\f[R]\f[I]name\f[R] +\f[I]pat\f[R] (define a pattern that also attaches a metadata tag of the +same name) .TP \f[B]#\f[R] \f[I]comment\f[R] A line comment -- cgit v1.2.3