* switching to camlp4 3.10
@ 2007-03-19 2:27 Martin Jambon
2007-03-19 7:06 ` [Caml-list] " Gabriel Kerneis
2007-03-19 9:58 ` Nicolas Pouillard
0 siblings, 2 replies; 5+ messages in thread
From: Martin Jambon @ 2007-03-19 2:27 UTC (permalink / raw)
To: caml-list
Hello,
I started trying to convert my programs so that they support camlp4 3.10.
1) Is there a better source of documentation than
http://gallium.inria.fr/~pouillar/camlp4-changes.html?
2) What is the command for preprocessing a simple syntax extension?
This used to work:
camlp4o pa_extend.cmo q_MLast.cmo pr_o.cmo -loc _loc pa_foo.ml
What is now the equivalent command, and how are people supposed to find
this out?
I understand it should be something like:
camlp4o ... -printer OCaml pa_foo.ml
or
camlp4 -parser OCaml ... -printer OCaml pa_foo.ml
Why didn't you change the name of the programs that are not compatible
with their previous versions (camlp4, camlp4o, ...)?
It would avoid a number confusions and allow the new camlp4 to coexist
with the old one.
Thanks
Martin
--
Martin Jambon
http://martin.jambon.free.fr
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] switching to camlp4 3.10
2007-03-19 2:27 switching to camlp4 3.10 Martin Jambon
@ 2007-03-19 7:06 ` Gabriel Kerneis
2007-03-19 7:07 ` Gabriel Kerneis
2007-03-19 9:58 ` Nicolas Pouillard
1 sibling, 1 reply; 5+ messages in thread
From: Gabriel Kerneis @ 2007-03-19 7:06 UTC (permalink / raw)
To: caml-list
[-- Attachment #1: Type: text/plain, Size: 834 bytes --]
Le Sun, 18 Mar 2007 19:27:16 -0700 (PDT), Martin Jambon
<martin.jambon@ens-lyon.org> a écrit :
> 1) Is there a better source of documentation than
> http://gallium.inria.fr/~pouillar/camlp4-changes.html?
Some examples in the CVS (not much better).
> 2) What is the command for preprocessing a simple syntax extension?
> This used to work:
> camlp4o pa_extend.cmo q_MLast.cmo pr_o.cmo -loc _loc pa_foo.ml
I think :
camlp4of -loc _loc pa_foo.ml
should do the job, or :
camlp4orf -loc _loc pa_foo.ml
if you prefer the revised syntax.
> Why didn't you change the name of the programs that are not
> compatible with their previous versions (camlp4, camlp4o, ...)?
> It would avoid a number confusions and allow the new camlp4 to
> coexist with the old one.
I agree. Ask Martin.
Regards,
--
Gabriel
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] switching to camlp4 3.10
2007-03-19 2:27 switching to camlp4 3.10 Martin Jambon
2007-03-19 7:06 ` [Caml-list] " Gabriel Kerneis
@ 2007-03-19 9:58 ` Nicolas Pouillard
2007-03-21 0:29 ` Martin Jambon
1 sibling, 1 reply; 5+ messages in thread
From: Nicolas Pouillard @ 2007-03-19 9:58 UTC (permalink / raw)
To: Martin Jambon; +Cc: caml-list
On 3/19/07, Martin Jambon <martin.jambon@ens-lyon.org> wrote:
> Hello,
>
> I started trying to convert my programs so that they support camlp4 3.10.
>
> 1) Is there a better source of documentation than
> http://gallium.inria.fr/~pouillar/camlp4-changes.html?
>
> 2) What is the command for preprocessing a simple syntax extension?
>
> This used to work:
>
> camlp4o pa_extend.cmo q_MLast.cmo pr_o.cmo -loc _loc pa_foo.ml
This command is supposed to works in the new version. In fact module
names have changed but ald ones are emulated. However I recently
noticed a bug for q_MLast.cmo, it's now fixed in the CVS.
However this incantation should be replaced by:
camlp4of -printer OCaml pa_foo.ml
Note: -loc _loc is useless since _loc is the default value.
Note2: -printer o is a shortcut for -printer OCaml
--
Nicolas Pouillard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] switching to camlp4 3.10
2007-03-19 9:58 ` Nicolas Pouillard
@ 2007-03-21 0:29 ` Martin Jambon
0 siblings, 0 replies; 5+ messages in thread
From: Martin Jambon @ 2007-03-21 0:29 UTC (permalink / raw)
To: Nicolas Pouillard; +Cc: caml-list
On Mon, 19 Mar 2007, Nicolas Pouillard wrote:
> On 3/19/07, Martin Jambon <martin.jambon@ens-lyon.org> wrote:
>> Hello,
>>
>> I started trying to convert my programs so that they support camlp4 3.10.
>>
>> 1) Is there a better source of documentation than
>> http://gallium.inria.fr/~pouillar/camlp4-changes.html?
>>
>> 2) What is the command for preprocessing a simple syntax extension?
>>
>> This used to work:
>>
>> camlp4o pa_extend.cmo q_MLast.cmo pr_o.cmo -loc _loc pa_foo.ml
>
> This command is supposed to works in the new version. In fact module
> names have changed but ald ones are emulated. However I recently
> noticed a bug for q_MLast.cmo, it's now fixed in the CVS.
ok, thanks.
> However this incantation should be replaced by:
>
> camlp4of -printer OCaml pa_foo.ml
>
> Note: -loc _loc is useless since _loc is the default value.
Right, until the default changes :-)
It used to be "loc" and one day it suddenly became "_loc".
> Note2: -printer o is a shortcut for -printer OCaml
Cool.
--
Martin Jambon
http://martin.jambon.free.fr
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-03-21 0:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-19 2:27 switching to camlp4 3.10 Martin Jambon
2007-03-19 7:06 ` [Caml-list] " Gabriel Kerneis
2007-03-19 7:07 ` Gabriel Kerneis
2007-03-19 9:58 ` Nicolas Pouillard
2007-03-21 0:29 ` Martin Jambon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox