* Using Frontc
@ 2005-11-18 9:22 Zhu Ping
2005-11-18 9:52 ` [Caml-list] " Anil Madhavapeddy
0 siblings, 1 reply; 2+ messages in thread
From: Zhu Ping @ 2005-11-18 9:22 UTC (permalink / raw)
To: caml-list
[-- Attachment #1: Type: text/plain, Size: 1400 bytes --]
Dear OCaml users:
I'm using Frontc, which is one of the libraries released in CDK, to parse C source code.
I downloded the complete binaries for Linux i386 libc6 from http://pauillac.inria.fr/cdk/binaries/binaries-3.03/gz/cdk-3.03.tar.gz and installed it on a Linux server by following the installation instructions.
The following code (mail.ml) is the main ocaml program that use Frontc to parse a sample code written in C language.
open Frontc
(* -------------------------------------- Test case for sample1.c --------------------------------------*)
let parse_result = Frontc.parse_file "/home/sand/zhuping/sample1.c" error_channel;
I compiled the maim.ml using this command: ocamlopt -I /usr/local/lib/cdk-3.03/lib/ocaml-3.03/ main.ml
But some error returns: /usr/local/lib/cdk-3.03/lib/ocaml-3.03/pervasives.cmi is not a compiled interface
All the Frontc codes located under the directory /usr/local/lib/cdk-3.03/lib/ocaml-3.03/ are compiled codes:
frontc.a
frontc.cma
frontc.cmi
frontc.cmx
frontc.cmxa
clexer.cmi
clexer.cmx
cparser.cmi
cparser.cmx
cabs.cmi
cabs.cmx
cprint.cmi
cprint.cmx
There are no source implementation/interface files with respect to the corresponding files listed above.
Can anybody help to to solve this problem? Thank you very much for your help:)
[-- Attachment #2: Type: text/html, Size: 3392 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] Using Frontc
2005-11-18 9:22 Using Frontc Zhu Ping
@ 2005-11-18 9:52 ` Anil Madhavapeddy
0 siblings, 0 replies; 2+ messages in thread
From: Anil Madhavapeddy @ 2005-11-18 9:52 UTC (permalink / raw)
To: Zhu Ping; +Cc: caml-list
On Fri, Nov 18, 2005 at 05:22:37PM +0800, Zhu Ping wrote:
>
> I'm using Frontc, which is one of the libraries released in
> CDK, to parse C source code.
(snip)
>
> There are no source implementation/interface files with respect to
> the corresponding files listed above.
>
> Can anybody help to to solve this problem? Thank you very much for
> your help:)
You haven't said if you must get FrontC to work, or can use any C
parser. If you dont mind using another package, CIL from Berkeley
is written in OCaml and is actively developed (and very very good).
You can find more details at http://manju.cs.berkeley.edu/cil/
--
Anil Madhavapeddy http://anil.recoil.org
University of Cambridge http://www.cl.cam.ac.uk
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-11-18 9:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-18 9:22 Using Frontc Zhu Ping
2005-11-18 9:52 ` [Caml-list] " Anil Madhavapeddy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox