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
Strange camlp4 behavior in the toplevel. #5090
Comments
Comment author: Yoric Can't remember the detail but there's a workaround in Batteries for this kind of thing. Essentially, when Camlp4 is involved, loading is order dependent. |
Comment author: @hcarty This error still exists in 3.12.0+rc1 It doesn't seem to be related to any work-around in Batteries, as it occurs in a bare toplevel + camlp4 as well as with toplevel + camlp4 + Batteries + extensions. |
Comment author: @damiendoligez Nicolas and I are working on this. It will be fixed before we release 3.12.0. |
Comment author: @damiendoligez To everyone monitoring this issue: I've made a temporary fix for this problem, but my fix is likely to impact locations (and error reporting) in all camlp4 parsers. I would appreciate if some of you could check out "version/3.12" in revision 10639 and test it, particularly with respect to error reports inside and outside quotations, with the default parsers or your own parsers. I've done some light testing, but I'm not a heavy camlp4 user, so I may have missed some major problem. If you could do this within a few days, that would be good. Please report here or directly to damien.doligez@inria.fr. |
Comment author: @diml I tried with my projects using camlp4 and it seems to be OK. |
Comment author: @bobzhang This fix is buggy, the token stream will be duplicated when do the backtracking, that's to say it will not work well with TRY |
Comment author: @bobzhang here we only need to make sure 'get_prev_loc' won't peek, I changed stream to store the last junked item, this fix will work well |
Comment author: @bobzhang will anyone take a look at my patch on stream?
|
Comment author: @diml Camlp4 is now a separate project. Please re-open a ticket on github [1] if you are still interested in seeing the original issue fixed. |
Original bug ID: 5090
Reporter: @diml
Assigned to: @bobzhang
Status: closed (set by @diml on 2016-12-07T17:27:31Z)
Resolution: reopened
Priority: normal
Severity: minor
Version: 3.12.0+beta1 or 3.12.0+rc1
Target version: later
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Tags: patch
Related to: #5142
Monitored by: profjim dario @ygrek @glondu matt @hcarty
Bug description
Camlp4 seems to not recognize correctly phrase in the toplevel with ocaml 3.12. For example:
#load "dynlink.cma";;
#load "camlp4o.cma";;
1;;
(* Nothing happens here *)
2;;
File attachments
The text was updated successfully, but these errors were encountered: