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

Camlp4 Printer for escaped string #5646

Closed
vicuna opened this issue Jun 12, 2012 · 6 comments
Closed

Camlp4 Printer for escaped string #5646

vicuna opened this issue Jun 12, 2012 · 6 comments

Comments

@vicuna
Copy link

vicuna commented Jun 12, 2012

Original bug ID: 5646
Reporter: @bobzhang
Assigned to: @diml
Status: closed (set by @xavierleroy on 2015-12-11T18:04:55Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 4.00.0+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Related to: #5442

Bug description

A minimal example:

module RPrinters = Camlp4.Printers.OCamlr.Make Camlp4.PreCast.Syntax;
value opr= (new RPrinters.printer ());
(<:expr< "@["%s"@]" >> |> opr#expr fmt);
"@["%s"@]"- : unit = ()

The output is no longer a valid format string. IMO, compose <:expr< >> and opr#expr will get
an identity function.

This also makes my code broken when you compile the preprocessed textual output instead of
marshalized Ast.
Many thanks

@vicuna
Copy link
Author

vicuna commented Jun 12, 2012

Comment author: @diml

This bug was fixed but it seems the fix has been reverted when the bin-annot branch was merged.

@vicuna
Copy link
Author

vicuna commented Jun 12, 2012

Comment author: @bobzhang

my oaml version:
Camlp4 Parsing version 4.01.0+dev3_2012-05-30.

@vicuna
Copy link
Author

vicuna commented Jun 12, 2012

Comment author: @diml

Seems to match. I will try to find exactly what was reverted and apply the patch again.

@vicuna
Copy link
Author

vicuna commented Jun 12, 2012

Comment author: @diml

Done.

Commits 12595 and 12596.

Can you check that it works for you ?

@vicuna
Copy link
Author

vicuna commented Jun 12, 2012

Comment author: @bobzhang

I will have a try soon

@vicuna
Copy link
Author

vicuna commented Jun 12, 2012

Comment author: @bobzhang

Yest. it was fixed. Thanks for so quick response :-)

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