Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the BNF for expression seems to be incorrect #5978

Closed
vicuna opened this issue Apr 9, 2013 · 2 comments
Closed

the BNF for expression seems to be incorrect #5978

vicuna opened this issue Apr 9, 2013 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Apr 9, 2013

Original bug ID: 5978
Reporter: @bobzhang
Status: closed (set by @damiendoligez on 2013-04-10T11:52:04Z)
Resolution: not a bug
Priority: normal
Severity: minor
Category: documentation

Bug description

expr :=
| value-path (* 1 )
| ....
| inst-var-name (
2 *)
production 2 overlaps with production 1, and I did not see the production 2 in the yacc file either.

@vicuna
Copy link
Author

vicuna commented Apr 9, 2013

Comment author: @garrigue

This overlap does not make the BNF in the manual incorrect.
Actually, the BNFs in the manual intentionally choose a more semantical approach, and allow many overlaps. In this case the ambiguity is resolved during type-checking.

@vicuna
Copy link
Author

vicuna commented Apr 10, 2013

Comment author: @damiendoligez

As jacques says, the BNF in the manual is ambiguous in many places, and that is by design. It's a documentation, not an implementation.

As a side remark, if you want to do anything serious with the BNF, you should make sure that you are using the one from the SVN version of the manual (v4.01), not the latest released one (v4.00). I have made many fixes between the two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant