public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* accessing GCC's ast information
@ 2001-10-07 15:51 Dan Gohman
  0 siblings, 0 replies; only message in thread
From: Dan Gohman @ 2001-10-07 15:51 UTC (permalink / raw)
  To: gcc

I'm working on a program to do source analysis and would like to be able to
use GCC to parse the source code.

The output from -fdump-translation-unit provides most of the information I
want, however the formating isn't quite suitable for parsing. Things like
string literals (string_cst) are printed without escaping, so there's no
way to know where the string ends.

I'm thinking about making a modified version that does simple escaping of
strings, however I'm not sure this is the best way to proceded.

Is parsing the .tu file (and/or the .class file from -fdump-class-hierarchy)
a good idea, or should I be looking at some other way of accessing this
information?

Dan

-- 
Dan Gohman
gohmandj@mrs.umn.edu

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-10-07 15:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-07 15:51 accessing GCC's ast information Dan Gohman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).