C:/Users/Dennis/src/lang/russell.orig/src/stree/stformats.h

Go to the documentation of this file.
00001 /*
00002  * Print format table generation macros
00003  *
00004  * The codes are:
00005  *         code   print as
00006  *              a               address
00007  *              c               character string
00008  *              i               integer
00009  *              l               virtual line number
00010  *              p               pointer (follow it down)
00011  *              s               string table offset
00012  *              u               unsigned integer
00013  *              v               bit vector
00014  *              x               don't print
00015  */
00016 /*
00017  * Syntax Tree Structure Definitions
00018  *
00019  * This file is a collection of macro invocations
00020  *
00021  * The calling environment must contain definitions for
00022  *
00023  * TOP          called at the beginning
00024  * START        called to start each structure declaration
00025  * INT, UNSIGNED, REFCNT, NODEKIND, NODESTAR, VLINENO, STTINDX,
00026  *      LISTPTR, BACKREF,CNSTAR(= pointer to Cons Node),STRPTR,
00027  *      BITVECTOR, NBPTR, HNODESTAR (identical to NODESTAR except hidden,
00028  *      i.e. not passed to mknode ), SIG, and HSIG.
00029  *      (The latter two are used for pointers from expression
00030  *      nodes to signature nodes.)
00031  *              called to define individual fields
00032  * FINISH       called to finish each structure
00033  * BOTTOM       called to finish everything
00034  */
00035 /*
00036  *      Note that certain fields are not really part of the syntax tree,
00037  * but rather comprise the symbol table.  In particular each identifier
00038  * structure contains a field which eventually points to the last
00039  * declaration in the innermost enclosing scope of that identifier.
00040  * All constructs which can define a new identifier contain fields
00041  * used for chaining all definitions of a given identifier together.
00042  * If several of these constructs can occur in a given scope, i.e.
00043  * in the case of declarations and parameters, another field is
00044  * included to point back to some structure which uniquely identifies
00045  * that scope, so that illegal multiple declarations can subsequently
00046  * be detected.
00047  *  Identifier nodes contain an additional field identifying the
00048  * surrounding use list.  Use lists themselves are chained together
00049  * like identifier declarations.  Thus the list of types from which
00050  * selections can be inferred is easily identifiable.
00051  *  Also the first field of any structure which can possibly represent
00052  * a denotation is one for the signature of that denotation.  In general
00053  * this field is hidden and not used until the signature deduction phase.
00054  *  Any node which can declare an identifier (outside a signature)
00055  * contains displacement and level fields in the third and fourth positions
00056  * following the prefix.  The level number refers to function nesting
00057  * depth before the storage allocation pass of the code generator, and
00058  * is then changed to be activation record nesting depth.  (The two may
00059  * differ, since blocks occasionally require activation records.)
00060  *  Any signature field must be followed by a corresponding sig_done field.
00061  */
00062 /* used to be 5, before we dropped refcount */
00063 /*
00064  * Notes:
00065  *
00066  */
00067      char *typedescr[] = {
00068       "ListHeader","xliixx",
00069       "Declaration","xliippiixiiaaaiiiii",
00070       "Parameter","xliippiiaaa",
00071   /* also used for unions */    "RElement","xliippiii",
00072       "VarSignature","xliixip",
00073       "ValSignature","xliixip",
00074       "FSignature","xliixiaiicpp",
00075       "TSignature","xliixiippacccic",
00076       "TSComponent","xliipp",
00077   /* Gives list of quoted characters with */    "DefCharSigs","xliivvvvp",
00078   /* The signature of a signature */    "SignatureSig","xliixi",
00079       "BlDenotation","xliixiiaippii",
00080       "UseList","xliixippai",
00081       "Application","xliixippa",
00082       "Enumeration","xliixip",
00083       "Extension","xliixipii",
00084       "Product","xliixippa",
00085       "Record","xliixipa",
00086       "Union","xliixippa",
00087       "WithList","xliippa",
00088       "MPrimary","xliixiiippciii",
00089       "Elist","xliippa",
00090       "Hlist","xliippa",
00091       "EElement","xliippp",
00092       "ConstsKeyWord","xlii",
00093       "ElseKeyWord","xliixi",
00094       "CandKeyWord","xlii",
00095       "CorKeyWord","xlii",
00096       "GList","xliixip",
00097       "LDenotation","xliixip",
00098       "GElement","xliipp",
00099       "OpId","xliixixsaaiiai",
00100       "LetterId","xliixixsaaiixi",
00101   /* quoted string */    "QStr","xliixixcax",
00102   /* unquoted string */    "UQStr","xliixixcax",
00103       "FConstruction","xliipiiaipicxi",
00104   /* A list of these is pointed to      */    "FreeVarNode","xliiaiii",
00105   /* used as body of externally defined  */    "ExternDef","xliic",
00106   /* used as body of separately compiled  */    "RExternDef","xliixic",
00107   /* Single character type component with */    "DCSException","xliiicia",
00108 };

Generated on Fri Jan 25 10:39:48 2008 for russell by  doxygen 1.5.4