Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] Lisp/Scheme parser

51 views
Skip to first unread message

Jacques Carette

unread,
May 27, 2007, 11:44:51 AM5/27/07
to OCaml
I tried to find a full Lisp (or Scheme) parser in Ocaml, and did not
immediately find one. Is my Google-fu not up to the task?

Yes, I am aware that parsing s-expressions is trivial, but the full Lisp
(or Scheme) grammar is somewhat more complicated, and I do not feel like
reinventing the wheel.

Any technology that integrates well with Ocaml is fine, since in the end
in-memory ASTs is going to be what we're really interested in.

Jacques

PS: Other than CIL for C, are there other programming languages for
which I can just get an off-the-shelf (non-commercial) parser?

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Pierre-Evariste Dagand

unread,
May 27, 2007, 12:09:24 PM5/27/07
to caml...@yquem.inria.fr
2007/5/27, Jacques Carette <car...@mcmaster.ca>:

> I tried to find a full Lisp (or Scheme) parser in Ocaml, and did not
> immediately find one. Is my Google-fu not up to the task?

There is an implementation of a minimal lisp called Minilisp here :

http://www.bretagne.ens-cachan.fr/DIT/People/Luc.Bouge/Teaching/MIT1/Lisp/MLlisp/Dynamic/

It may fulfill your needs.

--
Pierre-Evariste DAGAND
http://perso.eleves.bretagne.ens-cachan.fr/~dagand/

Empreinte GPG [pgp.mit.edu] :
F8CC 61DD 40B7 933F 17CA 061F 5591 AAE6 D3EC 7357

skaller

unread,
May 27, 2007, 12:09:53 PM5/27/07
to Jacques Carette, OCaml
On Sun, 2007-05-27 at 11:43 -0400, Jacques Carette wrote:
> I tried to find a full Lisp (or Scheme) parser in Ocaml, and did not
> immediately find one. Is my Google-fu not up to the task?

OCS Scheme.

http://will.iki.fi/software/ocs/


--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

Joel Reymont

unread,
May 27, 2007, 1:05:16 PM5/27/07
to skaller, Jacques Carette, OCaml
This is the first result of the Google search for "scheme ocaml":

http://home.arcor.de/chr_bauer/schoca.html

Thanks, Joel

--
http://topdog.cc/ - EL to C# compiler
http://wagerlabs.com/ - blog

Jacques Carette

unread,
May 27, 2007, 1:29:51 PM5/27/07
to OCaml
Joel Reymont wrote:
> This is the first result of the Google search for "scheme ocaml":
Silly me, I kept putting "grammar" or "parsing" in my searches, with
sub-optimal results.

Thanks to all who have responded to this,
Jacques

Eric Cooper

unread,
May 27, 2007, 2:15:12 PM5/27/07
to OCaml
On Sun, May 27, 2007 at 11:43:22AM -0400, Jacques Carette wrote:
> PS: Other than CIL for C, are there other programming languages for
> which I can just get an off-the-shelf (non-commercial) parser?

I wrote an OCaml parser for Java a while ago:
http://www.cs.cmu.edu/~ecc/joust.tar.gz
It handled the full language at the time I wrote it, but it probably
needs to be updated now (for generics at least).

--
Eric Cooper e c c @ c m u . e d u

0 new messages