From: Francois Pessaux <pessaux@mouton.inria.fr>
To: casse@irit.fr, caml-list@inria.fr
Subject: Re: Looking for C parser
Date: Fri, 11 Dec 1998 16:13:15 +0100 [thread overview]
Message-ID: <199812111513.QAA05498@mouton.inria.fr> (raw)
In-Reply-To: Your message of "Thu, 10 Dec 1998 15:25:57 +0100." <366FD9F5.6521@irit.fr>
Hello,
> I need to do some translation on a C program based on program tree
> (either abstract, or concrete). So I'm looking for a C language parser
> and lexer.
Try to have a look at: http://www.lysator.liu.se/c/
More accurately look for the line " The ANSI C grammar (Yacc and Lex) "
This will lead you at: http://www.lysator.liu.se/c/ANSI-C-grammar-y.html
and: http://www.lysator.liu.se/c/ANSI-C-grammar-l.html
But you must know that this grammar still allows to write unconsistent C
sentences. I used it to write a .h analyzer and I needed to performs of
strong pass of consistence-verification of the tree I got this this parser
to ensure that sentences are correct. For example, this parser parses some
stuff like:
struct {
void long short long signed int char unsigned volatile foo ;
}
... Unless it changed since I got it ;-)
Regards,
(* Francois PESSAUX (Francois.Pessaux@inria.fr) *)
(* INRIA Rocquencourt - Projet CRISTAL *)
(* (http://pauillac.inria.fr/~pessaux) *)
;;
prev parent reply other threads:[~1998-12-14 8:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-12-10 14:25 Hugues CASSE
1998-12-11 15:13 ` Francois Pessaux [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199812111513.QAA05498@mouton.inria.fr \
--to=pessaux@mouton.inria.fr \
--cc=caml-list@inria.fr \
--cc=casse@irit.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox