* [Caml-list] CKit for O'Caml?
@ 2003-06-06 21:28 Mary F. Fernandez
2003-06-06 21:39 ` Manos Renieris
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Mary F. Fernandez @ 2003-06-06 21:28 UTC (permalink / raw)
To: caml-list
Does anyone know if there are any O'Caml tools similar to the SML CKit
(http://www.smlnj.org/doc/ckit/). I've searched comp.lang.ml, this
mailing list's archives and looked at "The Hump", but no luck.
In particular, I'm most interested in the C AST and pretty printer.
I hope it's OK to ask this question here!
Thanks,
Mary
--
Mary Fernandez, Principal Technical Staff Member
AT&T Labs - Research, 180 Park Ave., Room E243, Florham Park, NJ 07932-0971
phone: 973-360-8679, fax: 973-360-8187
mff@research.att.com, http://www.research.att.com/~mff
-------------------
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] CKit for O'Caml?
2003-06-06 21:28 [Caml-list] CKit for O'Caml? Mary F. Fernandez
@ 2003-06-06 21:39 ` Manos Renieris
2003-06-07 13:41 ` Jeff Henrikson
2003-06-07 15:09 ` Guillaume Marceau
2 siblings, 0 replies; 4+ messages in thread
From: Manos Renieris @ 2003-06-06 21:39 UTC (permalink / raw)
To: Mary F. Fernandez; +Cc: caml-list
CIL: http://manju.cs.berkeley.edu/cil/
On the humps, it's under "Interfaces with Other Languages";
and under "Lexing/Parsing".
On Fri, Jun 06, 2003 at 05:28:26PM -0400, Mary F. Fernandez wrote:
> Does anyone know if there are any O'Caml tools similar to the SML CKit
> (http://www.smlnj.org/doc/ckit/). I've searched comp.lang.ml, this
> mailing list's archives and looked at "The Hump", but no luck.
> In particular, I'm most interested in the C AST and pretty printer.
>
-- Manos
-------------------
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] CKit for O'Caml?
2003-06-06 21:28 [Caml-list] CKit for O'Caml? Mary F. Fernandez
2003-06-06 21:39 ` Manos Renieris
@ 2003-06-07 13:41 ` Jeff Henrikson
2003-06-07 15:09 ` Guillaume Marceau
2 siblings, 0 replies; 4+ messages in thread
From: Jeff Henrikson @ 2003-06-07 13:41 UTC (permalink / raw)
To: Mary F. Fernandez; +Cc: caml-list
I use the frontc package, by Hugues Casse, which you can find in the
Caml Development Kit. (cdk) There is an AST, parser, and pretty
printer. My only two difficulties with it have been:
- it can't parse the ":" operator for denoting bit fields in structs.
- it took me a while to figure out how to access what I want out of the
AST. The three constructors TYPEDEF, ONLYTYPEDEF and DECDEF have a lot
of crossover, and I never figured out exactly why, but that if I
projected these out with a filter function
let simplify_def def =
match def with
(Cabs.TYPEDEF(bt0,_,vars)) -> Some (bt0,vars)
| (Cabs.ONLYTYPEDEF(bt0,_,vars)) -> Some (bt0,vars)
| (Cabs.DECDEF(bt0,_,vars)) -> Some (bt0,vars)
| _ -> None;;
that I got access to the structs, unions and enums more easily. The
messiest part of my code ended up being the "view" I wrapped around the
AST.
Jeff Henrikson
On Friday, June 6, 2003, at 05:28 PM, Mary F. Fernandez wrote:
> Does anyone know if there are any O'Caml tools similar to the SML CKit
> (http://www.smlnj.org/doc/ckit/). I've searched comp.lang.ml, this
> mailing list's archives and looked at "The Hump", but no luck.
> In particular, I'm most interested in the C AST and pretty printer.
>
> I hope it's OK to ask this question here!
> Thanks,
> Mary
> --
> Mary Fernandez, Principal Technical Staff Member
> AT&T Labs - Research, 180 Park Ave., Room E243, Florham Park, NJ
> 07932-0971
> phone: 973-360-8679, fax: 973-360-8187
> mff@research.att.com, http://www.research.att.com/~mff
>
>
> -------------------
> 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
>
-------------------
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] CKit for O'Caml?
2003-06-06 21:28 [Caml-list] CKit for O'Caml? Mary F. Fernandez
2003-06-06 21:39 ` Manos Renieris
2003-06-07 13:41 ` Jeff Henrikson
@ 2003-06-07 15:09 ` Guillaume Marceau
2 siblings, 0 replies; 4+ messages in thread
From: Guillaume Marceau @ 2003-06-07 15:09 UTC (permalink / raw)
To: caml-list; +Cc: Mary F. Fernandez
George Necula's Cil framework is solid enough to turn the Linux kernel
into a cleaned-up ast. I am not sure how easy it would be to modify the C
syntax of its parser though.
http://manju.cs.berkeley.edu/cil/
On Fri, 6 Jun 2003, Mary F. Fernandez wrote:
> Does anyone know if there are any O'Caml tools similar to the SML CKit
> (http://www.smlnj.org/doc/ckit/). I've searched comp.lang.ml, this
> mailing list's archives and looked at "The Hump", but no luck.
> In particular, I'm most interested in the C AST and pretty printer.
>
> I hope it's OK to ask this question here!
> Thanks,
> Mary
>
--
The only reason we don't have 1984 is 1984
- Guillaume
-------------------
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-06-07 15:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-06 21:28 [Caml-list] CKit for O'Caml? Mary F. Fernandez
2003-06-06 21:39 ` Manos Renieris
2003-06-07 13:41 ` Jeff Henrikson
2003-06-07 15:09 ` Guillaume Marceau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox