gfc-internals.texi: Fix output filename.
authorTobias Schlüter <tobi@gcc.gnu.org>
Wed, 28 Mar 2007 18:57:14 +0000 (20:57 +0200)
committerTobias Schlüter <tobi@gcc.gnu.org>
Wed, 28 Mar 2007 18:57:14 +0000 (20:57 +0200)
2007-03-28  Tobias Schlter  <tobi@gcc.gnu.org>

* gfc-internals.texi: Fix output filename.  Merge type index into
concept index.  Start documentation of gfc_code structure.

From-SVN: r123309

gcc/fortran/ChangeLog
gcc/fortran/gfc-internals.texi

index eb8729e1d3e01a22cc87fe080832ddf5a955d843..eecbcadd449d918e2729af6e864825a14fd22202 100644 (file)
@@ -1,3 +1,8 @@
+2007-03-28  Tobias Schlüter  <tobi@gcc.gnu.org>
+
+       * gfc-internals.texi: Fix output filename.  Merge type index into
+       concept index.  Start documentation of gfc_code structure.
+
 2007-03-26  Brooks Moses  <brooks.moses@codesourcery.com>
 
        * gfc-internals.texi: New file,
index 219873186bb662eeb99f78bb281a6c4f3de697fd..f593d7277574f3cf6cbdf584ab69d1e3cc507702 100644 (file)
@@ -1,10 +1,12 @@
 \input texinfo  @c -*-texinfo-*-
 @c %**start of header
-@setfilename gfortran.info
+@setfilename gfc-internals.info
 @set copyrights-gfortran 2007
 
 @include gcc-common.texi
 
+@synindex tp cp
+
 @settitle GNU Fortran Compiler Internals
 
 @c %**end of header
@@ -115,6 +117,8 @@ not accurately reflect the status of the most recent GNU Fortran compiler.
 @menu
 * Introduction::           About this manual.
 * User Interface::         Code that Interacts with the User.
+* Frontend Data Structures::
+                           Data structures used by the frontend
 * LibGFortran::            The LibGFortran Runtime Library.
 * GNU Free Documentation License::
                           How you can copy and share this manual.
@@ -265,6 +269,53 @@ syntax, with @samp{%}-escapes to insert variable values.  The details,
 and the allowable codes, are documented in the @code{error_print}
 function in @file{error.c}.
 
+@c ---------------------------------------------------------------------
+@c Frontend Data Structures
+@c ---------------------------------------------------------------------
+
+@node Frontend Data Structures
+@chapter Frontend Data Structures
+@cindex data structures
+
+This chapter should describe the details necessary to understand how
+the various @code{gfc_*} data are used and interact.  In general it is
+advisable to read the code in @file{dump-parse-tree.c} as its routines
+should exhaust all possible valid combinations of content for these
+structures.
+
+@menu
+* gfc_code:: Representation of Executable Statements
+@end menu
+
+@node gfc_code
+@section @code{gfc_code}
+@cindex statement chaining
+@tindex @code{gfc_code}
+@tindex @code{struct gfc_code}
+
+The executable statements in a program unit are represented by a
+nested chain of @code{gfc_code} structures.  The type of statement is
+identified by the @code{op} member of the structure, the different
+possible values are enumerated in @code{gfc_exec_op}.  A special
+member of this @code{enum} is @code{EXEC_NOP} which is used to
+reperesent the various @code{END} statements if they carry a label.
+Depending on the type of statement some of the other fields will be
+filled in.  Fields that are generally applicable are the @code{next}
+and @code{here} fields.  The former points to the next statement in
+the current block or is @code{NULL} if the current statement is the
+last in a block, @code{here} points to the statement label of the
+current statement.
+
+If the current statement is one of @code{IF}, @code{DO}, @code{SELECT}
+it starts a block, i.e. a nested level in the program.  In order to
+represent this, the @code{block} member is set to point to a
+@code{gfc_code} structure whose @code{block} member points to the
+block in question.  The @code{SELECT} and @code{IF} statements may
+contain various blocks (the chain of @code{ELSE IF} and @code{ELSE}
+blocks or the various @code{CASE}s, respectively).
+
+@c What would be nice here would be an example program togehter with
+@c an image that says more than the mythical thousand words.
 
 
 @c ---------------------------------------------------------------------