Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005634OCaml~DO NOT USE (was: OCaml general)public2012-06-05 10:052015-12-11 19:04
Assigned Tofrisch 
PrioritynormalSeverityfeatureReproducibilityhave not tried
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0005634: Proposal: parsetree rewriters
DescriptionI believe many Camlp4 syntax-extension could be implemented with a much more basic technology. I've described a proposal for extending the OCaml syntax with a fixed number of extension points (attributes and quotations) and letting the compilers pipe the parsed AST through one or several external rewriters: [^]

Now that "compilerlibs" are officially installed, and as a first step towards this proposal, I'd like to propose for inclusion the tiny attached patch (also in the ast_rewriter branch of the SVN). It only extends the compilers with a new "-ppx" flag, similar to (and compatible with) the existing "-pp". Invoking the compiler with "-ppx cmd" pipes the parsed AST (interface/implementation) through the specified command (actually, it passes two filenames -- input and ouput -- as extra arguments to the command).

An example of how to write an AST rewriter is available in the SVN: [^]

TagsNo tags attached.
Attached Filesdiff file icon patch_ast_rewriter.diff [^] (6,092 bytes) 2012-06-05 10:05 [Show Content]

- Relationships

-  Notes
frisch (developer)
2012-06-13 19:58

The branch has been merged to the trunk.

- Issue History
Date Modified Username Field Change
2012-06-05 10:05 frisch New Issue
2012-06-05 10:05 frisch File Added: patch_ast_rewriter.diff
2012-06-13 09:20 frisch Assigned To => frisch
2012-06-13 09:20 frisch Status new => assigned
2012-06-13 19:58 frisch Note Added: 0007555
2012-06-13 19:58 frisch Status assigned => resolved
2012-06-13 19:58 frisch Resolution open => fixed
2015-12-11 19:04 xleroy Status resolved => closed
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker