From 8fd0aa4092d25deca435aa711cbb0054149f1d4d Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Thu, 12 Jul 2018 12:14:23 -0600 Subject: [PATCH] doc edit about top-level rule --- brag/brag.scrbl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/brag/brag.scrbl b/brag/brag.scrbl index 9499743..ae0c5db 100755 --- a/brag/brag.scrbl +++ b/brag/brag.scrbl @@ -858,6 +858,8 @@ This time, all the appearances of @racket[term] nodes in the parse tree will hav As a convenience, when a grammar element is spliced, or a rule name is cut, @racket[brag] preserves the rule name by adding it as a syntax property to the residual elements, using the rule name as a key, and the original syntax object representing the rule name as the value. +Caveat for the top-level rule: though the rule name can have a cut, it cannot have a splice — once you're at the top level, there's nothing above to splice into. + @subsection{Syntax errors}