[wg-camlp4] My uses of syntax extension
Leo White
lpw25 at cam.ac.uk
Tue Jan 29 10:46:55 GMT 2013
>> I second Leo's idea to leave it to the preprocessor.
>
>I would strongly argue for a convention that has to be obeyed by all
>preprocessors. If you leave it to the preprocessor, you will have to
>call the preprocessor during the parsing, not during the typing, i.e.
>you won't have access to the typing environment while expanding macros.
>Consequently, your objectives were to be strictly more powerful, but
>your system would actually be strictly less powerful.
There is no reson that you cannot expand the preprocessor during typing. As
I said in a previous post, all we need to provide is a function that will
parse an expression upto the next unnested occurence of "$" or whatever the
preprocessor is using to mark the end of its antiquotations. Preprocessors
can then simply use this facility to handle their antiquotations
themselves.
More information about the wg-camlp4
mailing list