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

Factoring Camlp4Parsers #5635

Closed
vicuna opened this issue Jun 5, 2012 · 2 comments
Closed

Factoring Camlp4Parsers #5635

vicuna opened this issue Jun 5, 2012 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Jun 5, 2012

Original bug ID: 5635
Reporter: @bobzhang
Assigned to: @bobzhang
Status: closed (set by @diml on 2016-12-07T17:25:08Z)
Resolution: suspended
Priority: normal
Severity: feature
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Monitored by: @hcarty

Bug description

There are lots of Parsers in directory camlp4/Camlp4Parsers.
It would be nice to factor out one line
"let module M = Register.OCamlSyntaxExtension Id Make in ();"
to make it more reusable.

The Grammar is already parameterized over Camlp4Ast;
but the last line makes linking with Camlp4OCamlRevisedParser.cmo will mutate Syntax. It would be nice to move the last line to another file.
Then users can get the parsers for free without polluting its syntax.

@vicuna
Copy link
Author

vicuna commented Jul 10, 2012

Comment author: @bobzhang

Other factoring which makes camlp4 more usable is to parameterize Register module which depends on PreCast.
Since Camlp4 3.10+ was developed based on the idea that Lexer's parameterized, but the fact that Register.ml depends on PreCast.ml which hardcode the default Lexer.ml makes users to supply their own Lexer too much work.

I guess refactoring these modules will not take too much time, but people may need to take care of the building scripts.

@vicuna
Copy link
Author

vicuna commented Jul 7, 2013

Comment author: @bobzhang

It requires to coordinate with ocamlfind (camlp4.META), otherwise it would break most existing libraries, so I put the status as suspend.

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