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]

Re: [Re: Idea about Documenting and Compiling egcs in C++. ]


Jeffrey A Law <law@upchuck.cygnus.com> wrote:

  In message <19990424172758.17875.qmail@ww182.netaddress.usa.net>you write:
  > Hello All,
  > 
  > I have been looking at the EGCS compiler's source code lately.
  > I am interesting in contributing work to the project,
  > specifically in documenting the structure of the parser and the tree
  > structure used with it.
  > 
  > Can you tell me of any other existing sources of documentation ?
  > I have been looking at the online docs of the egcs project,
  > and the info files of the project.
>There isn't any real information on the tree structures at this time, >except
>the sources.  We would *love* to have someone pick up the torch and start
>the process of documenting the tree structure.
>I would suggest modeling tree.texi much like rtl.texi.
>I would start by creating tree.texi and documenting the basic tree nodes
>(found in tree.def) and the important accessor macros (tree.h).
>jeff

I am not fluent at tex, I was thinking about starting with a text/rtf file. 

The macros and the data structures are one part of it.
The end goal would be a diagrams of the different types of data,
classes, functions etc. and how the different tree nodes are strung together.

My goal of compiling the compiler with itself in c++ mode might be too big for
now.
I was not saying that the complier should be a pure c++ application.
I would like to make a C++ wrapper class that gives you at least a clean 
*interface* to the compiler.

The classes could look like this ->
class TreeRef {
protected :
  tree_node * pNode;
public :
  char * GetName() { ... };
  int    GetTypeCode() { ... };
};

class TreeListRef : public TreeRef
{
public :
   TreeRef * GetFirst();
   TreeRef * GetNext();
   void apply (...);
};
or even a template version of the TreeList.

The interface Library can be an optional part to the C++ compiler,
that can be built after the compiler has been bootstrapped.
That would allow a cleaner access to the compiler for extra tools to be built.
Maybe I can include the tree.h from c++ using a extern "c" statement,
does the G++ compiler support this?

Now, given a well documented c++ wrapper to the tree structure,
the documentation is much easier. C++ documentation tools abound,
the accessor methods can be inlined to document what macros are used.

What do you think about this?


Mike


____________________________________________________________________
Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com.


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