Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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 caml-list-request@inria.fr Archives: http://caml.inria.fr
> Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

Hello,

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 caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners