samth/test-bugs — Issue #137: Grammar for syntax-parse is incorrect
Author: racket-bug-submit
Created: 2012-03-09 02:59:43+00:00
State: open
Labels: anon-submit, documentation, gnats-migrated

###### Originally submitted by Eric Dobson on: Tue Oct 04 03:48:02 -0400 2011

The documentation says that in clause after the pattern and pattern directives there are one or more expressions. The implementation allows internal-definitions here so the grammar should say body instead.

##### Steps to Reproduce:

```racket
#lang racket

(require (for-syntax syntax/parse))

(define-syntax (foo stx)
(syntax-parse stx
(_
(define x #'3)
x)))

(foo)
```

##### Release:

```
5.1.3.11--2011-09-30(e650764/g)
```

##### Environment:

```
macosx "Darwin eric-dobsons-macbook.local 11.1.0 Darwin Kernel Version 11.1.0: Tue Jul 26
16:09:02 PDT 2011; root:xnu-1699.22.81~1/RELEASE_I386 i386" (x86_64-macosx/3m)
(get-display-depth) = 32
Human Language: english
(current-memory-use) 224618112
Links: (links) = ("rudybot" "raco-git"); (links #:user? #f) = (); (links #:root? #t) = ();
(links #:user? #f #:root? #t) = ()

Collections:
("/Users/eric/Library/Racket/5.1.3.11/collects"
("info-domain"))
("/Users/eric/proj/racket/plt/collects"
(".gitignore" "2htdp" "algol60" "at-exp" "browser" "combinator-parser" "compiler"
"config" "data" "datalog" "db" "defaults" "deinprogramm" "drracket" "drscheme" "dynext"
"embedded-gui" "eopl" "errortrace" "ffi" "file" "framework" "frtime" "games" "graphics"
"gui-debugger" "guibuilder" "handin-client" "handin-server" "help" "hierlist" "honu"
"htdp" "html" "icons" "info-domain" "lang" "launcher" "lazy" "macro-debugger" "make"
"meta" "mred" "mrlib" "mysterx" "mzcom" "mzlib" "mzscheme" "net" "openssl" "parser-tools"
"picturing-programs" "plai" "planet" "plot" "preprocessor" "profile" "r5rs" "r6rs"
"racket" "racklog" "rackunit" "raco" "reader" "readline" "redex" "repo-time-stamp" "rnrs"
"s-exp" "scheme" "schemeunit" "scribble" "scribblings" "scriblib" "setup" "sgl" "sirmail"
"slatex" "slideshow" "srfi" "srpersist" "stepper" "string-constants" "swindle" "syntax"
"syntax-color" "teachpack" "test-box-recovery" "test-engine" "tests" "tex2page" "texpict"
"trace" "typed" "typed-racket!
" "typed-scheme" "unstable" "version" "waterworld" "web-server" "wxme" "xml" "xrepl"))

Computer Language: (("Determine language from source") (#(#t print mixed-fraction-e #f #t
none) (default) #() "#lang racket\n" #f #f))
```

###### This bug was converted from Gnats bug [12255](http://bugs.racket-lang.org/old/12255).

[anon-submit eric.n.dobson AT gmail.com]