[wg-camlp4] Changes to the parsetree

Leo White lpw25 at cam.ac.uk
Mon Mar 25 14:05:42 GMT 2013


> Now that we have reached a stable state concerning the syntax of attributes and extension nodes, I'd like to get
> feedback on the proposed changes to the definition of the Parsetree:
>
> [...]
>
> It's probably good to validate the general approach first with the core team before we apply any such further cleanups.
> Before submitting the current version for review to the core team, I'd like to get feedback from the participants of
> this working group.

All of those changes seem reasonable. 

Another small clean-up I'd like would be to change "ptype_params" from
"string loc option list" to "core_type list" and the first part of
"pci_params" from "string loc list" to "core_type list".

I think this would be more consistent with what people will expect. It
also improves Typedtree by attaching the Type of the parameters to their
place in the syntax tree. (and it makes things a little simpler for my
"open types" branch.)

Before you submit the changes to the core team, we really need to add
the:

    {x{ ... }x}

syntax for use with quotations. It should be simple enough to add to the
lexer, and then accept as a "constant" in the parser. In the parsetree
it should either be represented by its own node (Const_quote) or just
translated into a Const_string.



    


More information about the wg-camlp4 mailing list