scribble/private/manual-form: Implement racketgrammar in terms of racketgrammar*

This is just a refactoring for readability.

original commit: 1dce7e587f2b41f5e10633acbc7c0190f15bd586
This commit is contained in:
Samuel Bronson 2012-10-01 23:00:56 -04:00 committed by Matthew Flatt
parent abeb37b101
commit 9eae72a93a

View File

@ -245,14 +245,7 @@
(define-syntax racketgrammar
(syntax-rules ()
[(_ #:literals (lit ...) id clause ...)
(with-racket-variables
(lit ...)
([non-term (id clause ...)])
(*racketgrammar '(lit ...)
'(id clause ...)
(lambda ()
(list (list (racket id)
(racketblock0/form clause) ...)))))]
(racketgrammar* #:literals (lit ...) [id clause ...])]
[(_ id clause ...) (racketgrammar #:literals () id clause ...)]))
(define-syntax racketgrammar*
@ -264,7 +257,8 @@
(*racketgrammar '(lit ...)
'(id ... clause ... ...)
(lambda ()
(list (list (racket id) (racketblock0/form clause) ...)
(list (list (racket id)
(racketblock0/form clause) ...)
...))))]
[(_ [id clause ...] ...)
(racketgrammar* #:literals () [id clause ...] ...)]))