From abb8f630368aa340bc01c816e85722ab4f2dfb5e Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Thu, 5 May 2011 02:12:06 -0600 Subject: [PATCH] syntax/parse: made link to pattern-directive docs more prominent, indexed Closes PR 11882 --- collects/syntax/scribblings/parse/parsing.scrbl | 10 +++++----- collects/syntax/scribblings/parse/stxclasses.scrbl | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/collects/syntax/scribblings/parse/parsing.scrbl b/collects/syntax/scribblings/parse/parsing.scrbl index 339724b530..61bd754478 100644 --- a/collects/syntax/scribblings/parse/parsing.scrbl +++ b/collects/syntax/scribblings/parse/parsing.scrbl @@ -44,6 +44,10 @@ pattern matches, its attributes are bound to the corresponding subterms of the syntax object and that clause's side conditions and @scheme[expr] is evaluated. The result is the result of @scheme[expr]. +Each clause consists of a @tech{syntax pattern}, an optional sequence +of @tech{pattern directives}, and a non-empty sequence of body +expressions. + If the syntax object fails to match any of the patterns (or all matches fail the corresponding clauses' side conditions), a syntax error is raised. @@ -120,11 +124,6 @@ conventions can be in the scope of syntax-class parameter bindings. See the section on @tech{conventions} for examples. } -Each clause consists of a @tech{syntax pattern}, an optional sequence -of @tech{pattern directives}, and a non-empty sequence of body -expressions. -} - @specsubform[(code:line #:disable-colon-notation)]{ Suppresses the ``colon notation'' for annotated pattern variables. @@ -136,6 +135,7 @@ Suppresses the ``colon notation'' for annotated pattern variables. [(x:y ...) 'ok]) ] } +} @defform[(syntax-parser parse-option ... clause ...+)]{ diff --git a/collects/syntax/scribblings/parse/stxclasses.scrbl b/collects/syntax/scribblings/parse/stxclasses.scrbl index 0a448b62aa..15915928ec 100644 --- a/collects/syntax/scribblings/parse/stxclasses.scrbl +++ b/collects/syntax/scribblings/parse/stxclasses.scrbl @@ -163,6 +163,8 @@ the pattern variables. @section{Pattern directives} +@section-index{pattern-directive} + Both the parsing forms and syntax class definition forms support @deftech{pattern directives} for annotating syntax patterns and specifying side conditions. The grammar for pattern directives