From valery.sigalov@audiocodes.com Mon May 6 11:27:30 2002 From: valery.sigalov@audiocodes.com (Valery Sigalov) Date: Mon, 6 May 2002 12:27:30 +0200 Subject: [GCC-XML]converting gccxml output into internal database for better access Message-ID: <9F4AA302E98BC14B924C6036FBAF7A64135484@lodmsg01.corp.audiocodes.com> This is a multi-part message in MIME format. ------_=_NextPart_001_01C1F4E8.A0663DC6 Content-Type: text/plain; charset="windows-1255" Content-Transfer-Encoding: quoted-printable Hello, I need to parse the gccxml output file many times to receive the data. It s= eems=20 very ineffective to parse the file every time from the beginning, to find t= he next=20 id link, so I am looking for library for converting the gccxml output into = internal=20 database. I am very hope, somebody knows about the library of this kind. Regards, Valery. ***************************************************************************= ********************************* This email and any files transmitted with it are confidential material. They are intended solely for the use of the individual or entity to whom th= ey are addressed. If you have received this email in error please notify postmaster@audiocode= s.com and permanently delete the e-mail and files. ***************************************************************************= ******************************** ------_=_NextPart_001_01C1F4E8.A0663DC6 Content-Type: text/html; charset="windows-1255" Content-Transfer-Encoding: quoted-printable converting gccxml output into internal database for better access</T= ITLE> </HEAD> <BODY> <!-- Converted from text/rtf format --> <P><FONT SIZE=3D2 FACE=3D"Arial">Hello,</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">I need to parse the gccxml output file ma= ny times to receive the data. It seems </FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">very ineffective to parse the file every = time from the beginning, to find the next </FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">id link, so I am looking for library for = converting the gccxml output into internal </FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">database.</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">I am very hope, somebody knows about the = library of this kind.</FONT> <BR>            &nbs= p;              = ;     <FONT SIZE=3D2 FACE=3D"Arial">Regards, Valery.</F= ONT> </P> <CODE><FONT SIZE=3D3><BR> <BR> ***************************************************************************= *********************************<BR> This email and any files transmitted with it are confidential material.<BR> They are intended solely for the use of the individual or entity to whom th= ey are addressed.<BR> If you have received this email in error please notify postmaster@audiocode= s.com<BR> and permanently delete the e-mail and files.<BR> ***************************************************************************= ********************************<BR> </FONT></CODE> </BODY> </HTML> ------_=_NextPart_001_01C1F4E8.A0663DC6-- From michael.dupont@mciworldcom.de Mon May 6 10:26:59 2002 From: michael.dupont@mciworldcom.de (Dupont, Michael) Date: Mon, 6 May 2002 10:26:59 +0100 Subject: [GCC-XML]converting gccxml output into internal database for better access Message-ID: <1970C6F6DCEDD411830864F71200584202AB2331@defra1ex1> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C1F4E0.2C0A51D0 Content-Type: text/plain; charset="windows-1255" Valery, Why do you need to reparse the data every time? If you produce and XML file using gccxml, you can parse that, and the keep all the data in memory as needed. A SQL database is possible, but you really need to think about your processing steps. mike -----Original Mess[Dupont, Michael] age----- From: Valery Sigalov [mailto:valery.sigalov@audiocodes.com] Sent: Montag, 6. Mai 2002 12:28 To: gccxml@www.gccxml.org Subject: [GCC-XML]converting gccxml output into internal database for better access Hello, I need to parse the gccxml output file many times to receive the data. It seems very ineffective to parse the file every time from the beginning, to find the next id link, so I am looking for library for converting the gccxml output into internal database. I am very hope, somebody knows about the library of this kind. Regards, Valery. ------_=_NextPart_001_01C1F4E0.2C0A51D0 Content-Type: text/html; charset="windows-1255" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1255"> <TITLE>converting gccxml output into internal database for better access
Valery,
 
Why do you need to reparse the data every time?
If you produce and XML file using gccxml,
 you can parse that, and the keep all the data in memory as needed.
 
A SQL database is possible, but you really need to think about your processing steps.
 
mike
-----Original Mess[Dupont, Michael]  age-----
From: Valery Sigalov [mailto:valery.sigalov@audiocodes.com]
Sent: Montag, 6. Mai 2002 12:28
To: gccxml@www.gccxml.org
Subject: [GCC-XML]converting gccxml output into internal database for better access

Hello,
I need to parse the gccxml output file many times to receive the data. It seems
very ineffective to parse the file every time from the beginning, to find the next
id link, so I am looking for library for converting the gccxml output into internal
database.
I am very hope, somebody knows about the library of this kind.
                                Regards, Valery.


------_=_NextPart_001_01C1F4E0.2C0A51D0-- From valery.sigalov@audiocodes.com Mon May 6 13:42:08 2002 From: valery.sigalov@audiocodes.com (Valery Sigalov) Date: Mon, 6 May 2002 14:42:08 +0200 Subject: [GCC-XML]converting gccxml output into internal database for better access Message-ID: <9F4AA302E98BC14B924C6036FBAF7A64135485@lodmsg01.corp.audiocodes.com> This is a multi-part message in MIME format. ------_=_NextPart_001_01C1F4FB.6F1CE5D4 Content-Type: text/plain; charset="windows-1255" Content-Transfer-Encoding: quoted-printable Michael, Thank you for reply. I think, I did not explain myself clearly. Actually, I am looking for libra= ry with effective parsing algoritm. For example, I reached the xml representation of the function and I need to= take all the information about it's parameters, but the parameter's types are id links. So, I need t= o reparse the file to have the=20 information stored after these links, and, if these pararameters are also c= omplex types, I will need to reparse the file many times to have entire data structure. SQL is fine, but I want to work with my data structure, as with xml file, u= sing the same parsing API, but, I think, inside has to be something like in-between hashtable represen= tation of this file for quick search by index. I can implement all this myself, but I am sure, somebody a= lready did it, and that is I am looking for. Reg= ards, Valery. =20 -----Original Message----- From: Dupont, Michael [mailto:michael.dupont@mciworldcom.de] Sent: 06 May 2002 11:27 To: Valery Sigalov; gccxml@www.gccxml.org Subject: RE: [GCC-XML]converting gccxml output into internal database for b= etter access Valery, =20 Why do you need to reparse the data every time? If you produce and XML file using gccxml, you can parse that, and the keep all the data in memory as needed. =20 A SQL database is possible, but you really need to think about your process= ing steps. =20 mike -----Original Mess[Dupont, Michael] age----- From: Valery Sigalov [mailto:valery.sigalov@audiocodes.com] Sent: Montag, 6. Mai 2002 12:28 To: gccxml@www.gccxml.org Subject: [GCC-XML]converting gccxml output into internal database for bette= r access Hello,=20 I need to parse the gccxml output file many times to receive the data. It s= eems=20 very ineffective to parse the file every time from the beginning, to find t= he next=20 id link, so I am looking for library for converting the gccxml output into = internal=20 database.=20 I am very hope, somebody knows about the library of this kind.=20 Regards, Valery.=20 ***************************************************************************= ********************************* This email and any files transmitted with it are confidential material. They are intended solely for the use of the individual or entity to whom th= ey are addressed. If you have received this email in error please notify postmaster@audiocode= s.com and permanently delete the e-mail and files. ***************************************************************************= ******************************** ------_=_NextPart_001_01C1F4FB.6F1CE5D4 Content-Type: text/html; charset="windows-1255" Content-Transfer-Encoding: quoted-printable converting gccxml output into internal database for better access</T= ITLE> <META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR></HEAD> <BODY> <DIV><SPAN class=3D641470612-06052002><FONT face=3DArial color=3D#0000ff=20 size=3D2>Michael,</FONT></SPAN></DIV> <DIV><SPAN class=3D641470612-06052002><FONT face=3DArial color=3D#0000ff si= ze=3D2>Thank=20 you for reply.</FONT></SPAN></DIV> <DIV><SPAN class=3D641470612-06052002><FONT face=3DArial color=3D#0000ff si= ze=3D2>I=20 think, I did not explain myself clearly. Actually, I am looking for li= brary=20 with effective parsing algoritm.</FONT></SPAN></DIV> <DIV><SPAN class=3D641470612-06052002><FONT face=3DArial color=3D#0000ff si= ze=3D2>For=20 example, I reached the xml representation of the function and I need t= o=20 take all the information</FONT></SPAN></DIV> <DIV><SPAN class=3D641470612-06052002><FONT face=3DArial color=3D#0000ff si= ze=3D2>about=20 it's parameters, but the parameter's types are id links. So, I need to repa= rse=20 the file to have the </FONT></SPAN></DIV> <DIV><SPAN class=3D641470612-06052002><FONT face=3DArial color=3D#0000ff=20 size=3D2>information stored after these links, and, if these pararameters a= re also=20 complex types, I will need to</FONT></SPAN></DIV> <DIV><SPAN class=3D641470612-06052002><FONT face=3DArial color=3D#0000ff=20 size=3D2>reparse the file many times to have entire data=20 structure.</FONT></SPAN></DIV> <DIV><SPAN class=3D641470612-06052002><FONT face=3DArial color=3D#0000ff si= ze=3D2>SQL is=20 fine, but I want to work with my data structure, as with xml file, using th= e=20 same parsing API,</FONT></SPAN></DIV> <DIV><SPAN class=3D641470612-06052002><FONT face=3DArial color=3D#0000ff si= ze=3D2>but, I=20 think, inside has to be something like in-between hashtable representation = of=20 this file for quick</FONT></SPAN></DIV> <DIV><SPAN class=3D641470612-06052002><FONT face=3DArial color=3D#0000ff si= ze=3D2>search=20 by index. I can implement all this myself, but I am sure, somebody already = did=20 it, and that is</FONT></SPAN></DIV> <DIV><SPAN class=3D641470612-06052002><FONT face=3DArial color=3D#0000ff si= ze=3D2>I am=20 looking for.</FONT></SPAN></DIV> <DIV><SPAN=20 class=3D641470612-06052002>        =             &nb= sp;            =             &nb= sp;            =             &nb= sp;=20 <FONT face=3DArial color=3D#0000ff size=3D2>Regards, Valery.</FONT></SPAN><= /DIV> <DIV><SPAN class=3D641470612-06052002><FONT face=3DArial color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px"> <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT face=3DTah= oma=20 size=3D2>-----Original Message-----<BR><B>From:</B> Dupont, Michael=20 [mailto:michael.dupont@mciworldcom.de]<BR><B>Sent:</B> 06 May 2002=20 11:27<BR><B>To:</B> Valery Sigalov; gccxml@www.gccxml.org<BR><B>Subject:<= /B>=20 RE: [GCC-XML]converting gccxml output into internal database for better= access<BR><BR></FONT></DIV> <DIV><SPAN class=3D846302909-06052002><FONT color=3D#0000ff=20 size=3D2>Valery,</FONT></SPAN></DIV> <DIV><SPAN class=3D846302909-06052002><FONT color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D846302909-06052002><FONT color=3D#0000ff size=3D2>Why = do you need=20 to reparse the data every time?</FONT></SPAN></DIV> <DIV><SPAN class=3D846302909-06052002><FONT color=3D#0000ff size=3D2>If y= ou produce=20 and XML file using gccxml,</FONT></SPAN></DIV> <DIV><SPAN class=3D846302909-06052002><FONT color=3D#0000ff size=3D2>&nbs= p;you can=20 parse that, and the keep all the data in memory as needed.</FONT></SPAN><= /DIV> <DIV><SPAN class=3D846302909-06052002><FONT color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D846302909-06052002><FONT color=3D#0000ff size=3D2>A SQ= L database=20 is possible, but you really need to think about your processing=20 steps.</FONT></SPAN></DIV> <DIV><SPAN class=3D846302909-06052002><FONT color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D846302909-06052002><FONT color=3D#0000ff=20 size=3D2>mike</FONT></SPAN></DIV> <BLOCKQUOTE> <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT face=3DT= ahoma=20 size=3D2>-----Original Mess<SPAN class=3D846302909-06052002><FONT face= =3DArial=20 color=3D#0000ff>[Dupont,=20 Michael]  </FONT></SPAN>age-----<BR><B>From:</B> Valery Sigal= ov=20 [mailto:valery.sigalov@audiocodes.com]<BR><B>Sent:</B> Montag, 6. Mai 2= 002=20 12:28<BR><B>To:</B> gccxml@www.gccxml.org<BR><B>Subject:</B>=20 [GCC-XML]converting gccxml output into internal database for better=20 access<BR><BR></FONT></DIV><!-- Converted from text/rtf format --> <P><FONT face=3DArial size=3D2>Hello,</FONT> <BR><FONT face=3DArial siz= e=3D2>I need=20 to parse the gccxml output file many times to receive the data. It seem= s=20 </FONT><BR><FONT face=3DArial size=3D2>very ineffective to parse the fi= le every=20 time from the beginning, to find the next </FONT><BR><FONT face=3DArial= size=3D2>id link, so I am looking for library for converting the gccxm= l output=20 into internal </FONT><BR><FONT face=3DArial size=3D2>database.</FONT> <= BR><FONT=20 face=3DArial size=3D2>I am very hope, somebody knows about the library = of this=20 kind.</FONT> <BR>       =20        =20        =20         <FONT face=3DArial size=3D2>= Regards,=20 Valery.</FONT> </P><CODE><FONT=20 size=3D3><BR></BLOCKQUOTE></BLOCKQUOTE></FONT></CODE><CODE><FONT SIZE=3D3><= BR> <BR> ***************************************************************************= *********************************<BR> This email and any files transmitted with it are confidential material.<BR> They are intended solely for the use of the individual or entity to whom th= ey are addressed.<BR> If you have received this email in error please notify postmaster@audiocode= s.com<BR> and permanently delete the e-mail and files.<BR> ***************************************************************************= ********************************<BR> </FONT></CODE> </BODY></HTML> ------_=_NextPart_001_01C1F4FB.6F1CE5D4-- From michael.dupont@mciworldcom.de Mon May 6 12:56:12 2002 From: michael.dupont@mciworldcom.de (Dupont, Michael) Date: Mon, 6 May 2002 12:56:12 +0100 Subject: [GCC-XML]converting gccxml output into internal database for better access Message-ID: <1970C6F6DCEDD411830864F71200584202AB2337@defra1ex1> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C1F4F5.0490AE00 Content-Type: text/plain; charset="windows-1255" Valery, >>I will need to reparse the file many times to have entire data structure. That is a bad design. You only need to pass over the file once. If you use a SAX XML parser you should create an object in memory for each node in your programming language. Copy all the attributes into some object, an hash table, and yes, build a hash tables of ids. Afterwards you can contruct your objects as needed. I dont remember if the GCCXML is using the "ID" attribute. If so, any good DOM XML parser will do this all for you. What programming language are you using?, I have some examples in perl. mike ------_=_NextPart_001_01C1F4F5.0490AE00 Content-Type: text/html; charset="windows-1255" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1255"> <TITLE>converting gccxml output into internal database for better access
Valery,
 
>>I will need to reparse the file many times to have entire data structure.
That is a bad design. You only need to pass over the file once.
 
If you use a SAX XML parser you should create an object in memory for each node in your programming language.
Copy all the attributes into some object, an hash table, and yes, build a hash tables of ids.
 
Afterwards you can contruct your objects as needed.
I dont remember if the GCCXML is using the "ID"  attribute. If so, any good DOM XML parser will do this all for you.
 
What programming language are you using?,
I have some examples in perl.
 
mike
 
------_=_NextPart_001_01C1F4F5.0490AE00-- From Sebastien.deMentendeHorne@electrabel.com Mon May 6 17:15:41 2002 From: Sebastien.deMentendeHorne@electrabel.com (Sebastien.deMentendeHorne@electrabel.com) Date: Mon, 6 May 2002 18:15:41 +0200 Subject: [GCC-XML]gcc2xml and macros Message-ID: <8D1414482878D4119AEE00508B6C90740896634A@seacex02.eib.electrabel.be> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C1F519.4498B2D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all, =20 I found the project after looking for exactly what it is : an easy way = to dig in the code in a programmatic way. =20 I have some questions at first sight (it is still compiling) :=20 - What is the link with http://introspector.sourceforge.net/, if any ? - is there a xml -> gcc frontend already built ? - is it possible to introduce some "new macros" contructions in C/C++ = that gccxml will leave untouched and that could be interpreted on an XML processor ? =20 In fact, I would like to replace those difficult templates with a nicer notation that will be processed in an XML processor. The general flow of the compilation process for the C/C++ newly = macroified would be: C/C++ source with new macros=20 \--(gccxml)--> XML code with macros \--(xml processor)--> XML code with macros processed=20 \--(? xml2gcc ?)--> real code =20 As XML is real close to Lisp/Scheme way of thinking (list processing) = and that Lisp/Scheme macros are much more powerwul (expresive), I think = this approach can be interesting. =20 Any feedback is welcome ! =20 S=E9bastien de Menten | ELECTRABEL=20 Tel: ++32 10 48 51 76 | Quantitative Analysis,=20 Fax: ++32 10 48 51 09 | Place de l'universit=E9, 16, = 4=E8me =E9tage Gsm: ++32 478 789 444 | B-1348 Louvain-la-Neuve, BELGIUM = ------_=_NextPart_001_01C1F519.4498B2D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi=20 all,
 
I = found the project=20 after looking for exactly what it is : an easy way to dig in the code = in a=20 programmatic way.
 
I = have some=20 questions at first sight (it is still compiling) :
 - What is the=20 link with http://introspector.sourceforge.net/, if any=20 ?
 - is=20 there a xml -> gcc frontend already built = ?
 - is it=20 possible to introduce some "new macros" contructions in C/C++ that = gccxml will=20 leave untouched and that could be interpreted on an XML processor=20 ?
 
In fact, I=20 would like to replace those difficult templates with a nicer notation = that will=20 be processed in an XML processor.
The general=20 flow of the compilation process for the C/C++ newly macroified would=20 be:
    C/C++ source with new = macros=20
       =20 \--(gccxml)--> XML code with macros
       &nb= sp;    \--(xml=20 processor)--> XML code with macros processed =
       &nb= sp;       =20 \--(? xml2gcc ?)--> real code
 
As = XML is real close=20 to Lisp/Scheme way of thinking (list processing) and that Lisp/Scheme = macros are=20 much more powerwul (expresive), I think this approach can be=20 interesting.
 
Any = feedback is=20 welcome !
 

S=E9bastien de=20 Menten           =    =20 |    ELECTRABEL
Tel:  ++32 10 48 51=20 76           =20 |    Quantitative Analysis,
Fax:  ++32 10 48 51=20 09           =20 |    Place de l'universit=E9, 16, 4=E8me =E9tage =
Gsm:  ++32 478 789=20 444           =20 |    B-1348 Louvain-la-Neuve, BELGIUM =

------_=_NextPart_001_01C1F519.4498B2D0-- From brad.king@kitware.com Mon May 6 18:35:30 2002 From: brad.king@kitware.com (Brad King) Date: Mon, 6 May 2002 13:35:30 -0400 (EDT) Subject: [GCC-XML]gcc2xml and macros Message-ID: Sebastien, > - What is the link with > http://introspector.sourceforge.net/, if any ? The developers of GCC-node-introspector and GCC-XML have known about each other for some time. However, the projects are somewhat different. GCC-XML is used to dump a representation of the C++ input to GCC. Node Introspector is used to dump a representation of GCC's internal data structures. > - is there a xml -> gcc frontend already built ? No. The GCC-XML output is not intended to be something that can be compiled again. Function bodies are not included, and there is no ordering of the translation unit. > - is it possible to introduce some "new macros" contructions in C/C++ that > gccxml will leave untouched and that could be interpreted on an XML > processor ? GCC-XML is just a patched version of GCC's C++ front-end. The full C preprocessor is run before the XML dump code is even reached. > In fact, I would like to replace those difficult templates with a > nicer notation that will be processed in an XML processor. I'd be interested in a motivating example for this project. I've found the C++ template syntax to be quite simple once it is learned. -Brad From mdupont777@yahoo.com Mon May 6 18:25:53 2002 From: mdupont777@yahoo.com (James Michael DuPont) Date: Mon, 6 May 2002 10:25:53 -0700 (PDT) Subject: [GCC-XML]gcc2xml and macros Message-ID: <20020506172553.76356.qmail@web13308.mail.yahoo.com> Sebastien, Brad and other list members, Let me answer some of your questions about the introspector, a related project to the gcc_xml that I have been working on for the past some time on my free time. Note that what follows is a long post about the history and development of the introspector, so please ignore it if you are not interested, but I also attempt to answer sebastiens questions as well. >> - What is the link with http://introspector.sourceforge.net/, if any ? The introspector and gcc-xml projects are similar, but not exactly the same. Originally I was working for a company Innovative software GmbH that was creating a C++ reverse engineering program, it could display class tree, relationships, modify and generate code. Like rational rose to together++. I had always thought about why they did not use the gcc for parsing, it was much better. The company had stopped working on and selling the product, and there were no free software tools to do the exact same. (Maybe argo-uml for java, but not for c and c++) At the time I did not understand the tree structures well enough to be able to create such an interface. Four years into my new job, I started on a different track with the beginnings of the introspector project, in 1999 to create a OO C++ interface into the compiler tree structures. Brad had been posting some ideas about using XML for dumping in the summer of 2000 about using XML for output. His main intention (Correct me if I am wrong brad ) was to get at the function and type declarations for creating better wrapper libraries for gcc. My intention is to create a better user API into the gcc compiler. The toolkits of kitware benifit greatly from having properly typed language wrappers, better than swig. A long time had passed, and I was busy working on my c++ interface and building in some form of debugging output to understand the tree structures. At the OOP 2000 Conference in Munich, I was inspired by to use XML and liked the idea of the intentional programming that was being research by microsoft at the time. Afterwards I decided to put my efforts into a XML exchange format. No easy task. After fighting with my non understanding of the compilers tree structures and preparation for my talk about the introspector at the YAPC::Europe, I stumbled over the cppxml from the university of waterloo, they modified the tree-dumper function of the gcc compiler and used some transformations on the trees. I took the tree dumper and modified it to output xml. that was the basis for my xml interface into the gcc. First I wanted to use DSSL to process the XML, and started to learn scheme. The problem was that I could not interact with the dssl enough to learn it, I like some form of interactive tool to learn a language. XSLT was better documented than DSSSL, and I got some reports running in it. XSLT is not a good language for processing ASTs because they are highly networked, you need to be able to go in any direction, and XSLT is not efficient at that. Prolog was my next choice, but the memory limitations of the gnu-prolog stopped me from doing more that 30000 nodes at onces. After using xslt to translate the structures into prolog in order to query them, I discovered the main structure of the tree structures. This understanding led me to translate the xml into perl programs, that when run would construct the tree structures in memory without using an XML Parser. I had abandoned my c++ interface for a perl interface and started to write reports and code generators in perl. Afterwards I removed the XSLT and replaced it with a XML parser. Later I put the perl program in a pipe from the compiler, so that you can pipe the results from the compiler directly into perl. I have built an Postgres and Mysql repository of the tree structures and have written hundreds of queries that have shown me how the tree nodes work properly. Now in the past 3 months, I have been in contact with the FSF about getting support for my project. Currently we are in discussions to prevent the abuse of the XML and external data by third partys. The issue is to prevent the usage of the gcc by non-free software in such a way that they can piggyback on top of it. The introspector gives such a security hole in its current incarnation and has to be changed. My intent is to remove *ALL* forms of XML, SQL and external data until an updated version GPL of the GPL will come out to prevent the usage of that data in non-free software. I would be very careful if you intend on using the GCC internal data in any form of non-free, non-gpl software. You might be opening yourself up too a violation of the GPL. Especially if you have to redistribute the gcc and its only purpose of that redistribution and modification is to extract that data into a non-free software. Currently I am working on linking GCC directly to perl. Then all the needed data can be extracted directly from the compiler. My intent is also to link in a GUI directly into the whole thing, and remove any data files that need to be exchanged. Sebastien, As to transformations on code that you are interested in doing, I think that the best and safest bet would be to create a compiler extension to do that, you can then have your own code that will do tree transformations to do that inside of the compiler. See the Ast-optimizer branch for that. In the future, the introspector might make it easier to do such a thing, but you will need to be willing make your modifications GPLed for me to help you out. >>- is there a xml -> gcc front-end already built ? No, and I think that it is not wished for, that would make it too easy for abuse. >> - is it possible to introduce some "new macros" >>constructions in C/C++ that gccxml will leave >>untouched and that could be interpreted on an XML >>processor ? I think that you would be best off by declaring a special type, let's say FunkyPointer that you can used to declare extra information in your program. Or if you want to add attributes, a template would be good. HelpName can be extracted easily from inside the compiler. So if you have float, HelpName that would add extra attribute to your program, the xml of gcc_xml could be used to then scanned for such instances and they could be extracted and processed. >>As XML is real close to Lisp/Scheme way of thinking >>(list processing) and that Lisp/Scheme macros are >>much more powerful (expressive), I think this >>approach can be interesting. That is similar to the XSLT work i was doing. Anyway, I hope that this all presents some insight into the purpose of the introspector and its relationship to the gcc_xml. And again, I can only hope that you can for yourselves resolve the licensing issues with the FSF. I know that brad had written to them, but I would consider also warning your users that the licensing is an issue, and tell them to consider GPLing all code that uses the AST information even indirectly from the GCC. Just for the record, I see the gcc_xml project and cabel as being valuable tools. I don't think that they are abusing the GPL directly, but my opinion does not matter much. You have to make sure that your users understand the possibilities of a GPL violation. Mike ===== James Michael DuPont __________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com From P.FREMY@OBERTHURCS.com Wed May 15 08:54:43 2002 From: P.FREMY@OBERTHURCS.com (Philippe FREMY) Date: Wed, 15 May 2002 09:54:43 +0200 Subject: [GCC-XML]C++ refactorer Message-ID: <191CBBF91062D411855D00D0B76F1C30CAB17F@PROXIMA> Hi, I want to write a C++ code refactorer. I am a bit lazy so I don't want to write the full-blown C++ parser. So I am looking for reusable C++ parser. Sofar, I haven't found anything satisfying. gccxml sounded great, until I discovered that it only produce declaration code. Is it planned to have the content of the functions being outputted in xml too ? regards, Philippe ########################################### This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange. For more information, connect to http://www.F-Secure.com/ From mdupont777@yahoo.com Wed May 15 09:22:38 2002 From: mdupont777@yahoo.com (James Michael DuPont) Date: Wed, 15 May 2002 01:22:38 -0700 (PDT) Subject: [GCC-XML]C++ refactorer In-Reply-To: <191CBBF91062D411855D00D0B76F1C30CAB17F@PROXIMA> Message-ID: <20020515082238.5279.qmail@web13307.mail.yahoo.com> Philippe, if you need to refactor only c++, and not c, and you need method bodies, then http://sourceforge.net/projects/opencxx/ might be your best bet. mike --- Philippe FREMY wrote: > > > Hi, > > I want to write a C++ code refactorer. I am a bit > lazy so I don't want to > write the full-blown C++ parser. So I am looking for > reusable C++ parser. > Sofar, I haven't found anything satisfying. > > gccxml sounded great, until I discovered that it > only produce declaration > code. Is it planned to have the content of the > functions being outputted in > xml too ? > > regards, > > Philippe > ########################################### > > This message has been scanned by F-Secure Anti-Virus > for Microsoft Exchange. > For more information, connect to > http://www.F-Secure.com/ > > _______________________________________________ > gccxml mailing list > gccxml@www.gccxml.org > http://www.gccxml.org/mailman/listinfo/gccxml ===== James Michael DuPont __________________________________________________ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com From Valery01@speedy.co.il Wed May 22 21:52:04 2002 From: Valery01@speedy.co.il (Sigalov Valery) Date: Wed, 22 May 2002 22:52:04 +0200 Subject: [GCC-XML]function argument's name of fundamental type in gccxml output file Message-ID: <000801c201d2$8bd7a280$911773c0@solomoncat> This is a multi-part message in MIME format. ------=_NextPart_000_0005_01C201E3.4B1ED130 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Hello, We use the gccxml output file to generate the wrapper for our API = functions. We can not find the option of receiving the names of functions' = arguments, if there are fundamental types. In case of fundamental type only the type = is present. We can use some another tool, cint for example, to receive these names = before we run gccxml, but it seems, that there is an option in gccxml, that allows = to achieve=20 this without additional efforts. Is somebody can help us with our = problem? =20 = Regards, Valery. =20 ------=_NextPart_000_0005_01C201E3.4B1ED130 Content-Type: text/html; charset="koi8-r" Content-Transfer-Encoding: quoted-printable

Hello,

We use the = gccxml output=20 file to generate the wrapper for our API = functions.

We can not find = the option=20 of receiving the names of functions’ arguments, = if

there are = fundamental=20 types. In case of fundamental type only the type is=20 present.

We can use some = another=20 tool, cint for example, to receive these names before=20 we

run gccxml, but = it seems,=20 that there is an option in gccxml, that allows to achieve=20

this without = additional=20 efforts. Is somebody can help us with our = problem?

 

           &nbs= p;           =20            &nbs= p;           =20            =20            =20 Regards, Valery. =20

------=_NextPart_000_0005_01C201E3.4B1ED130-- From szegedy@or.uni-bonn.de Mon May 27 13:29:18 2002 From: szegedy@or.uni-bonn.de (Christian Szegedy) Date: Mon, 27 May 2002 14:29:18 +0200 Subject: [GCC-XML]gccxml build problem Message-ID: <3CF2269E.6090304@or.uni-bonn.de> I am trying to build gccxml on a Linux machine (SuSe 8.0 Kernel 2.4.18). I have diffculties building the patched gcc. I downloaded the prepatched gcc source file gccxml-0.2-src-cc1plus.tar.gz. configured with: configure --prefix=~/extern/gcc304 (i have created the directory "~/extern/gcc304" prior to the configuration) While building, I have the following error: gmake[3]: Entering directory `/home/szegedy/extern/gccxml-0.2-src-cc1plus/i686-pc-linux-gnu/libstdc++-v3/libmath' /bin/sh ../libtool --mode=compile /home/szegedy/extern/gccxml-0.2-src-cc1plus/gcc/xgcc -B/home/szegedy/extern/gccxml-0.2-src-cc1plus/gcc/ -B~/extern/gcc304/i686-pc-linux-gnu/bin/ -B~/extern/gcc304/i686-pc-linux-gnu/lib/ -isystem ~/extern/gcc304/i686-pc-linux-gnu/include -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -c signbit.c libtool: compile: unable to infer tagged configuration libtool: compile: specify a tag with `--tag' Does someone have a clue what does it mean and how could I avoid it? Thanks in advance, Christian From brad.king@kitware.com Mon May 27 14:19:50 2002 From: brad.king@kitware.com (Brad King) Date: Mon, 27 May 2002 09:19:50 -0400 (EDT) Subject: [GCC-XML]Re: function argument's name of fundamental type in gccxml output file In-Reply-To: <000801c201d3$22ee3940$911773c0@solomoncat> Message-ID: Valery, > We can not find the option of receiving the names of functions' > arguments, if there are fundamental types. In case of fundamental type > only the type is present. I'm unable to duplicate your specific problem with GCC-XML 0.2. However, you may have reached this situation: struct A {}; void f(A a, int i) {} // Argument names given by GCC-XML. void g(A a, int i); // Argument names not given by GCC-XML. GCC-XML only dumps the argument names given in a funciton's definition. If only the declaration is present, the names are ignored. This is because GCC's parser throws away the name of an argument in a forward declaration. The reason is that this is legal: void f(int i); void f(int j); void f(int k); Which name should be used? The same function is forward declared several times. Only when the function definition occurs can the name be determined. In this example, there is no name: void f(int) {} Basically, if the function body definition is not present, the argument names will not be dumped. -Brad From brad.king@kitware.com Mon May 27 14:23:30 2002 From: brad.king@kitware.com (Brad King) Date: Mon, 27 May 2002 09:23:30 -0400 (EDT) Subject: [GCC-XML]gccxml build problem In-Reply-To: <3CF2269E.6090304@or.uni-bonn.de> Message-ID: Christian, > configure --prefix=~/extern/gcc304 [snip] > Does someone have a clue what does it mean and how could I avoid it? I don't think this problem is related to GCC-XML's changes. Can you build the original GCC 3.0.4 using that configure line? It looks like part of the build is not expanding the "~" in the name. You can try this configure line instead: configure --prefix=/home/szegedy/extern/gcc304 Also, what system compiler are you using (including version)? -Brad From szegedy@or.uni-bonn.de Wed May 29 15:07:41 2002 From: szegedy@or.uni-bonn.de (Christian Szegedy) Date: Wed, 29 May 2002 16:07:41 +0200 Subject: [GCC-XML]Nested classes Message-ID: <3CF4E0AD.40909@or.uni-bonn.de> After succeding in building the gccxml - thanks Brad! - I have the first real problem. I wanted to extract a class diagramm out of some include files. The problem I encountered is that gccxml does not seem to extract tags for not referenced nested classes. E.g. the XML file for class A { class B { void f(); } ; enum E { x }; }; contains only tags the root namespace, class A and its constructor. Do I miss something? Thanks in advancee, Christian From brad.king@kitware.com Wed May 29 20:07:15 2002 From: brad.king@kitware.com (Brad King) Date: Wed, 29 May 2002 15:07:15 -0400 (EDT) Subject: [GCC-XML]Nested classes In-Reply-To: <3CF4E0AD.40909@or.uni-bonn.de> Message-ID: Christian, > The problem I encountered is that gccxml does not seem to extract tags > for not referenced nested classes. E.g. the XML file for This is a real bug. Thanks for your report. It was introduced a few months ago when I added a line to disable dumping of compiler-generated class members (that don't appear in source code). GCC's internal representation makes nested classes look like artifical constructs (because the only reference to it in the list of fields in the outer class is a compiler-generated typedef). It has been fixed in the CVS version of GCC-XML. To build the fixed version, you will have to build your own patched GCC 3.0.4 source using the instructions on the web page. -Brad