Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] ocamllex/yacc and camlp4
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-06-16 (06:56)
From: Luc Maranget <Luc.Maranget@i...>
Subject: Re: [Caml-list] ocamllex/yacc and camlp4
> Hi,
> Quick question: why are ocamllex and ocamlyacc not implemented with
> camlp4?  They seem to be doing exactly what camlp4 is there for, and I
> think would serve as great camlp4 examples (plus being able to extend
> *their* syntax could be very powerful indeed.)
> Thanks,
> John
> -------------------
> To unsubscribe, mail Archives:
> Bug reports: FAQ:
> Beginner's list:


First there is history, ocamllex and ocamlyacc predate camlp4, thus
they were not written with camlp4 initially.

Second there is bootstrap. Since the lexer and parser of ocamlc itself
are written with ocamllex/ocamlyacc, Making these tools to depend on
camlp4 would include camlp4 in the bootstrap cycle of ocamlc.
The resulting situation would complicate bootstraping ocamlc.

Of course there could be camlp4 versions of ocamllex/ocamlyacc in
addition to ocamllex/ocamlyacc versions of ocamllex/ocamlyacc. Well,
nobody ever thought about doing that, I guess.

-- Luc Maranget

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: