brownplt / pyret-docs

The documentation for Pyret.
9 stars 18 forks source link

let binding spec is incorrect #14

Closed awstlaur closed 7 years ago

awstlaur commented 7 years ago

https://www.pyret.org/docs/latest/Declarations.html#%28elem._%28bnf-prod._%28.Pyret._let-decl%29%29%29

It currently is:

‹let-decl›: ‹binding› = ‹binop-expr›

I believe it should be:

‹let-decl›: ‹binding› = ‹expr›
blerner commented 7 years ago

It's correct, check the grammar file. Binop-expr is the more general expression form, actually.

awstlaur commented 7 years ago

Ah I missed that before!

‹binop-expr›: ‹expr› (BINOP ‹expr›)*

The start (*) = zero or more instances, so every ‹expr› is indeed also a ‹binop-expr›.

I was probably confused because I'm used to thinking of "expr" as referring to the most generic thing in a language.

Closing issue. Thanks!