[wg-camlp4] My uses of syntax extension
Leo White
lpw25 at cam.ac.uk
Mon Jan 28 16:26:45 GMT 2013
>In my ocaml-templates approach, the "html" parser would just receive a
>string "<body attr=$x$> Hello, World <\body>", and call its parser,
>that would have to understand anti-quotations, by returning a node
>Pquotation("ocaml", "x") telling the typer that it should call the
>ocaml parser on the string "x"...
The problem with this method is that it does not support nested
anti-quotations, or any other occurrence of the closing delimiter (the
second "$") within the expression. You don't know whether "x" is the
expression that needs to be parsed without asking the OCaml parser.
More information about the wg-camlp4
mailing list