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

Antiquotation bug (quotation expr, with antiquotation list) #5685

Closed
vicuna opened this issue Jul 13, 2012 · 3 comments
Closed

Antiquotation bug (quotation expr, with antiquotation list) #5685

vicuna opened this issue Jul 13, 2012 · 3 comments

Comments

@vicuna
Copy link

vicuna commented Jul 13, 2012

Original bug ID: 5685
Reporter: @bobzhang
Status: closed (set by @damiendoligez on 2015-01-09T23:49:51Z)
Resolution: suspended
Priority: normal
Severity: minor
Target version: undecided
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Tags: patch

Bug description

value f x = <:expr< $list:x$ >> ;
will be accepted and the type is weird
list Ast.ident -> Ast.expr (This absolutely not what I want)
The problem comes from that in the parser entry
expr accept TRY val_longident which accept ANTIQUOT, and the context is changed.
I guess there maybe other similar bugs in other places. The patch is attached, plz review the patch. Thanks
Another problem, I added some tracing functionality for the parser in my in-home camlp4 which helps me a lot to pinpoint the problem. How about the idea to add some tracing for the parser?

File attachments

@vicuna
Copy link
Author

vicuna commented Jul 13, 2012

Comment author: @bobzhang

Sorry, this may not be considered a bug, it may intensionally designed this way

@vicuna
Copy link
Author

vicuna commented Jul 13, 2012

Comment author: @bobzhang

I think it's better to document this unexpected behavior. Since the parser expr fails it will try to use the parser ident, ident happens to support list antiquot which people in general may thought it's expr that parse the antiquot, actually not.

@vicuna
Copy link
Author

vicuna commented Jan 9, 2015

Comment author: @damiendoligez

Transferred to camlp4/camlp4#74

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