This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fdump-ast-original and strg:


Hello,

I'm student and I'm trying to build a tool which use the ASG given by g++
using the option -fdump-ast-original. Actually I build a basic parser
which reads the file file.c.original and stores the ASG in memory in a
hash table where the key is the number of a node. I also build a visitor
which visits the ASG in memory and extracts a CFG for some analysis.

The problem is the following. If you have something like:

-- part of a C code --

fprintf(stderr, "error strg: toto");

--

The asg given by gcc gives the following line:

@247    string_cst       type: @268    strg: error strg: toto  lngt: 5

So, I add a very basic modification inside GCC (in c-dump.c) and now, it
produces this line:

@247    string_cst       type: @268    strg: "error strg: toto"  lngt: 5

It is easier to parse. So, I'd like to know if it can be added to official
gcc futur release. It's only one line and for me it will be easier because
people won't need to recompile the gcc compiler if they want to use my
tool (ok for now I'm the only one who use it but it can change...).

Thank you
Sorry for my english

---
Guillaume Thouvenin
GASTA: Gcc Abstract Syntax Tree
http://gasta.sf.net






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]