From 8105e66aece2f6c466523542c0c04b0553d79b67 Mon Sep 17 00:00:00 2001 From: Chris Double Date: Sat, 29 Mar 2008 17:45:21 +1300 Subject: [PATCH] Add box parser to docs --- extra/peg/peg-docs.factor | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/extra/peg/peg-docs.factor b/extra/peg/peg-docs.factor index d2ca353ba1..7b13e06d5a 100644 --- a/extra/peg/peg-docs.factor +++ b/extra/peg/peg-docs.factor @@ -159,4 +159,17 @@ HELP: delay { $description "Delays the construction of a parser until it is actually required to parse. This " "allows for calling a parser that results in a recursive call to itself. The quotation " - "should return the constructed parser." } ; + "should return the constructed parser and is called the first time the parser is run." + "The compiled result is memoized for future runs. See " { $link box } " for a word " + "that calls the quotation at compile time." } ; + +HELP: box +{ $values + { "quot" "a quotation" } + { "parser" "a parser" } +} +{ $description + "Delays the construction of a parser until the parser is compiled. The quotation " + "should return the constructed parser and is called when the parser is compiled." + "The compiled result is memoized for future runs. See " { $link delay } " for a word " + "that calls the quotation at runtime." } ;