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
Camlp4 accepts multiple private keywords #5861
Comments
Comment author: @bobzhang This is due to strict_parsing in the file Camlp4/Struct/Grammar/Parser.ml is set to false, then the backtracking for lower precedence is automatically turned on. |
Comment author: @bobzhang I have set strict_parsing to true, and bootstrapped successfully, but it needs to add some parens in some places, I don't know it's worth the change. |
Comment author: @lpw25 I don't know that much about camlp4, but I was thinking of something more along the lines of: --- a/camlp4/Camlp4/Struct/Camlp4Ast2OCamlAst.ml
|
Comment author: @lpw25 Yes. Plenty of syntax errors seem to be dumping errors already, since this is quite an unlikely error I don't see the need to change the parser. |
Comment author: @bobzhang It's fair, I will fix it later, thanks |
Comment author: @bobzhang fixed in revision 13157 |
Original bug ID: 5861
Reporter: @lpw25
Assigned to: @bobzhang
Status: closed (set by @xavierleroy on 2015-12-11T18:19:52Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 4.01.0+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Bug description
Both camlp4o and camlp4r accept the following:
type foo
type bar = private private foo
The text was updated successfully, but these errors were encountered: