treelang patch part 3 of 6

Tim Josling tej@melbpc.org.au
Sat May 4 21:37:00 GMT 2002


+   for (exp_proto = PARAMETERS (proto), exp = PARAMETERS (prod);
+        exp_proto;
+        exp = exp->next, exp_proto = exp_proto->next)
+   {
+     if (!exp)
+       abort ();
+     if (!exp_proto)
+       abort ();
+     if (!exp->code)
+       abort ();
+     var = VARIABLE (exp_proto);
+     if (!var)
+       abort ();
+     if (!var->code)
+       abort ();
+     parms = tree_code_add_parameter (parms, var->code, exp->code);
+   }
+   type = get_type_for_numeric_type (NUMERIC_TYPE (prod));
+   prod->code = tree_code_get_expression
+     (EXP_FUNCTION_INVOCATION, type, proto->code, parms, NULL);
+   $$ = prod;
+ }
+ ;
+
+ expressions_with_commas:
+ expression {
+   struct production *exp;
+   exp = $1;
+   ensure_not_void (NUMERIC_TYPE (exp), exp->main_token);
+   $$ = $1;
+ }
+ |expressions_with_commas COMMA expression {
+   struct production *exp;
+   exp = $3;
+   ensure_not_void (NUMERIC_TYPE (exp), exp->main_token);
+   exp->next = $1; /* Reverse order.  */
+   $$ = exp;
+ }
+ ;
+
+ variable_ref:
+ NAME {
+   struct production search_prod;
+   struct production *prod;
+   struct production *symbol_table_entry;
+   struct token* tok;
+   tree type;
+
+   tok = $1;
+   SYMBOL_TABLE_NAME ((&search_prod)) = tok;
+   symbol_table_entry = lookup_tree_name (&search_prod);
+   if (!symbol_table_entry)
+     {
+       fprintf (stderr, "%s:%i:%i: Variable referred to but not
defined\n", in_fname,
+               tok->lineno, tok->charno);
+       print_token (stderr, 0, tok);
+       errorcount++;
+       YYERROR;
+     }
+
+   prod = make_production (PROD_VARIABLE_REFERENCE_EXPRESSION, tok);
+   NUMERIC_TYPE (prod) = NUMERIC_TYPE (symbol_table_entry);
+   type = get_type_for_numeric_type (NUMERIC_TYPE (prod));
+   if (!NUMERIC_TYPE (prod))
+     YYERROR;
+   OP1 (prod) = $1;
+
+   prod->code = tree_code_get_expression (EXP_REFERENCE, type,
+                                       symbol_table_entry->code, NULL,
NULL);
+   $$ = prod;
+ }
+ ;
+
+ init_opt:
+ /* Nil.   */ {
+   $$ = 0;
+ }
+ |init {
+   /* Nothing to do.  */
+ }
+
+ init:
+ ASSIGN init_element {
+ }
+ ;
+
+ init_element:
+ INTEGER {
+   $$ = make_integer_constant ($1);
+ }
+ ;
+
+ %%
+
+ /* Print a token VALUE to file FILE.  Ignore TYPE which is the token
+    type. */
+
+ void
+ print_token (FILE * file, unsigned int type ATTRIBUTE_UNUSED, YYSTYPE
value)
+ {
+   struct token *tok;
+   unsigned int  ix;
+
+   tok  =  value;
+   fprintf (file, "%d \"", tok->lineno);
+   for (ix  =  0; ix < tok->length; ix++)
+     fprintf (file, "%c", tok->chars[ix]);
+   fprintf (file, "\"");
+ }
+
+ /* Output a message ERROR_MESSAGE from the parser.  */
+ void
+ yyerror (const char *error_message)
+ {
+   struct token *tok;
+
+   tok = yylval;
+   if (tok)
+     {
+       fprintf (stderr, "%s:%i:%i: %s\n", in_fname, tok->lineno,
tok->charno, error_message);
+       print_token (stderr, 0, tok);
+     }
+   else
+     fprintf (stderr, "%s\n", error_message);
+
+   errorcount++;
+
+ }
+
+ /* Reverse the order of a token list, linked by parse_next, old first
+    token is OLD_FIRST.  */
+
+ static struct production*
+ reverse_prod_list (struct production *old_first)
+ {
+   struct production *current;
+   struct production *next;
+   struct production *prev = NULL;
+
+   current = old_first;
+   prev = NULL;
+
+   while (current)
+     {
+       if (current->category != production_category)
+         abort ();
+       next = current->next;
+       current->next = prev;
+       prev = current;
+       current = next;
+     }
+   return prev;
+ }
+
+ /* Ensure TYPE is not VOID. Use NAME as the token for the error
location.  */
+
+ static void
+ ensure_not_void (unsigned int type, struct token* name)
+ {
+   if (type == VOID)
+     {
+       fprintf (stderr, "%s:%i:%i: Type must not be void in this
context\n", in_fname,
+               name->lineno, name->charno);
+       print_token (stderr, 0, name);
+       errorcount++;
+     }
+ }
+
+ /* Check TYPE1 and TYPE2 which are integral types.  Return the lowest
+    common type (min is signed int).  */
+
+ static int
+ get_common_type (struct production *type1, struct production *type2)
+ {
+   if (NUMERIC_TYPE (type1) == UNSIGNED_INT)
+     return UNSIGNED_INT;
+   if (NUMERIC_TYPE (type2) == UNSIGNED_INT)
+     return UNSIGNED_INT;
+
+   return SIGNED_INT;
+ }
+
+ /* Check type (TYPE_NUM) and expression (EXP) match.  Return the 1 if
+    OK else 0.  Must be exact match - same name unless it is an
+    integral type.  */
+
+ static int
+ check_type_match (int type_num, struct production *exp)
+ {
+   switch (type_num)
+     {
+     case SIGNED_INT:
+     case UNSIGNED_INT:
+     case SIGNED_CHAR:
+     case UNSIGNED_CHAR:
+       switch (NUMERIC_TYPE (exp))
+         {
+         case SIGNED_INT:
+         case UNSIGNED_INT:
+         case SIGNED_CHAR:
+         case UNSIGNED_CHAR:
+           return 1;
+
+         case VOID:
+           abort ();
+
+         default:
+           abort ();
+         }
+       break;
+
+     case VOID:
+       abort ();
+
+     default:
+       abort ();
+
+     }
+ }
+
+ /* Make a production for an integer constant VALUE.  */
+
+ static struct production *
+ make_integer_constant (struct token* value)
+ {
+   struct token* tok;
+   struct production *prod;
+   tok = value;
+   prod = make_production (PROD_INTEGER_CONSTANT, tok);
+   if ((tok->chars[0] == (unsigned char)'-')|| (tok->chars[0] ==
(unsigned char)'+'))
+     NUMERIC_TYPE (prod) = SIGNED_INT;
+   else
+     NUMERIC_TYPE (prod) = UNSIGNED_INT;
+   prod->code = tree_code_get_integer_value (tok->chars, tok->length);
+   return prod;
+ }
+
+ /* Set STORAGE_CLASS in PROD according to CLASS_TOKEN.  */
+
+ static void
+ set_storage (struct production *prod)
+ {
+   struct token* stg_class;
+   stg_class = STORAGE_CLASS_TOKEN (prod);
+   switch (stg_class->type)
+     {
+     case STATIC:
+       STORAGE_CLASS (prod) = STATIC_STORAGE;
+       break;
+
+     case AUTOMATIC:
+       STORAGE_CLASS (prod) = AUTOMATIC_STORAGE;
+       break;
+
+     case EXTERNAL_DEFINITION:
+       STORAGE_CLASS (prod) = EXTERNAL_DEFINITION_STORAGE;
+       break;
+
+     case EXTERNAL_REFERENCE:
+       STORAGE_CLASS (prod) = EXTERNAL_REFERENCE_STORAGE;
+       break;
+
+     default:
+       abort ();
+     }
+ }
+
+ /* Set parse trace.  */
+
+ void
+ treelang_debug (void)
+ {
+   if (option_parser_trace)
+     yydebug = 1;
+ }
diff -c -r -p -N -X treelang.diff.excl cvs/gcc/gcc/treelang/tree1.c
cvscopy/gcc/gcc/treelang/tree1.c
*** cvs/gcc/gcc/treelang/tree1.c        Thu Jan  1 10:00:00 1970
--- cvscopy/gcc/gcc/treelang/tree1.c    Sat May  4 22:14:40 2002
***************
*** 0 ****
--- 1,382 ----
+   /*
+
+     TREELANG Compiler almost main (tree1)
+     Called by GCC's toplev.c
+
+     Copyright (C) 1986, 87, 89, 92-96, 1997, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
+
+     This program is free software; you can redistribute it and/or
modify it
+     under the terms of the GNU General Public License as published by
the
+     Free Software Foundation; either version 2, or (at your option)
any
+     later version.
+
+     This program is distributed in the hope that it will be useful,
+     but WITHOUT ANY WARRANTY; without even the implied warranty of
+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+     GNU General Public License for more details.
+
+     You should have received a copy of the GNU General Public License
+     along with this program; if not, write to the Free Software
+     Foundation, 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+
+     In other words, you are welcome to use, share and improve this
program.
+     You are forbidden to forbid anyone else to use, share and improve
+     what you give them.   Help stamp out software-hoarding!
+
+
---------------------------------------------------------------------------

+
+     Written by Tim Josling 1999, 2000, 2001, based in part on other
+     parts of the GCC compiler.
+
+ */
+
+ #include "config.h"
+ #include "system.h"
+ #include "ansidecl.h"
+ #include "flags.h"
+ #include "output.h"
+ #include "toplev.h"
+
+ #include "ggc.h"
+ #include "tree.h"
+ #include "diagnostic.h"
+
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <ctype.h>
+ #include <stdarg.h>
+ #include <string.h>
+ #include <stdio.h>
+
+ #include "treelang.h"
+ #include "treetree.h"
+
+ extern int yyparse (void);
+ /* Linked list of symbols - all must be unique in treelang.  */
+
+ struct production *symbol_table = NULL;
+
+ /* Language for usage for messages.  */
+
+ const char *const language_string = "TREELANG - sample front end for
GCC ";
+
+ /* Local prototypes.  */
+
+ void version (void);
+
+ /* GC routine for symbol table.  */
+ static void symbol_table_ggc (void *m);
+
+ /* Global variables.  */
+
+ extern struct cbl_tree_struct_parse_tree_top* parse_tree_top;
+
+ /*
+    Options.
+ */
+
+ /* Trace the parser.  */
+ unsigned int option_parser_trace = 0;
+
+ /* Trace the lexical analysis.  */
+
+ unsigned int option_lexer_trace = 0;
+
+ /* Warning levels.  */
+
+ /* Local variables.  */
+
+ unsigned char *in_fname = NULL;       /* Input file name.  */
+
+ /* This is 1 if we have output the version string.  */
+
+ static int version_done = 0;
+
+ /* Variable nesting level.  */
+
+ static unsigned int work_nesting_level = 0;
+
+ /* Process one switch - called by toplev.c.  */
+
+ int
+ treelang_decode_option (num_options_left, first_option_left)
+      int num_options_left ATTRIBUTE_UNUSED;
+      char** first_option_left;
+ {
+
+   /*
+     Process options - bear in mind I may get options that are really
+     meant for someone else (eg the main compiler) so I have to be very

+     permissive.
+
+   */
+
+   if (first_option_left[0][0] != '-')
+     return 0;
+
+   switch (first_option_left[0][1])
+     {
+     case '-':
+       if (!strcmp (first_option_left[0],"--help"))
+         {
+           if (!version_done)
+             {
+               fputs (language_string, stdout);
+               fputs (version_string, stdout);
+               fputs ("\n", stdout);
+               version_done = 1;
+             }
+           fprintf (stdout, "Usage: tree1 [switches] -o output
input\n");
+           return 1;
+         }
+     case 'v':
+       if (!strcmp (first_option_left[0],"-v"))
+         {
+           if (!version_done)
+             {
+               fputs (language_string, stdout);
+               fputs (version_string, stdout);
+               fputs ("\n", stdout);
+               version_done = 1;
+             }
+           return 1;
+         }
+     case 'y':
+       if (!strcmp (first_option_left[0],"-y"))
+         {
+           option_lexer_trace = 1;
+           option_parser_trace = 1;
+           return 1;
+         }
+     case 'f':
+       if (!strcmp (first_option_left[0],"-fparser-trace"))
+         {
+           option_parser_trace = 1;
+           return 1;
+         }
+       if (!strcmp (first_option_left[0],"-flexer-trace"))
+         {
+           option_lexer_trace = 1;
+           return 1;
+         }
+       return 0;
+
+     case 'w':
+       if (!strcmp (first_option_left[0],"-w"))
+         {
+           /* Tolerate this option but ignore it - we always put out
+              all warnings.  */
+           return 1;
+         }
+       return 0;
+
+     case 'W':
+       if (!strcmp (first_option_left[0],"-Wall"))
+         {
+           return 1;
+         }
+       return 0;
+
+     default:
+       return 0;
+     }
+
+   return 0;
+
+ }
+
+ /* Language dependent parser setup.  */
+
+ const char*
+ treelang_init (const char* filename)
+ {
+
+   /* Define my garbage collection routines.  */
+   ggc_add_root (&symbol_table, 1,
+                 /* Unused size.  */ sizeof (void*), symbol_table_ggc);

+   /* Note: only storage that has to be kept across functions needs to
+      be protected from GC.  */
+   /* Define my garbage collection routines.  */
+   ggc_add_root (&symbol_table, 1,
+                 /* Unused size.  */ sizeof (void*), symbol_table_ggc);

+   /* Note: only storage that has to be kept across functions needs to
+      be protected from GC.  */
+
+   /* Set up the declarations needed for this front end.  */
+
+   input_filename = "";
+   lineno = 0;
+
+   treelang_init_decl_processing ();
+
+   /* This error will not happen from GCC as it will always create a
+      fake input file.  */
+   if (!filename || (filename[0] == ' ') || (!filename[0]))
+     {
+       if (!version_done)
+         {
+           fprintf (stderr, "No input file specified, try --help for
help\n");
+           exit (1);
+         }
+
+       in_fname = NULL;
+       return NULL;
+     }
+   yyin = fopen (filename, "r");
+   if (!yyin)
+     {
+       fprintf (stderr, "Unable to open input file %s\n", filename);
+       exit (1);
+     }
+   input_filename = filename;
+   return (char*) (in_fname = (unsigned char*)filename);
+ }
+
+ /* Language dependent wrapup.  */
+
+ void
+ treelang_finish (void)
+ {
+   fclose (yyin);
+ }
+
+ /* Parse a file.  Debug flag doesn't seem to work. */
+
+ void
+ treelang_parse_file (int debug_flag ATTRIBUTE_UNUSED)
+ {
+   treelang_debug ();
+   yyparse ();
+ }
+
+
+ /* Scan the symbol table* M, marking storage used.  */
+
+ static void
+ symbol_table_ggc (void *m)
+ {
+   struct production *pp;
+   pp = * (struct production**)m;
+   /* Actually it is a pointer to a pointer, to allow reallocation and
+      relinking.  */
+   mark_production_used (pp);
+ }
+
+ /* Mark a production PP as used so it wont be garbage collected.  */
+
+ void
+ mark_production_used (struct production *pp)
+ {
+   int sub_ix;
+  loop:
+   if (!pp)
+     return;
+   ggc_mark (pp);
+
+   if (pp->category == token_category)
+     {
+       mark_token_used ((struct token*)pp);
+       return;
+     }
+   if (pp->category != production_category)
+     abort ();
+   mark_token_used (pp->main_token);
+   for (sub_ix = 0; sub_ix < SUB_COUNT; sub_ix++)
+     mark_production_used (pp->sub[sub_ix]);
+   /* The macro tests for NULL so I don't need to.  */
+   ggc_mark_tree (pp->code);
+   pp = pp->next;
+   goto loop;
+ }
+
+ /* Mark a token TT as used so it wont be garbage collected.  */
+
+ void
+ mark_token_used (struct token* tt)
+ {
+   if (!tt)
+     return;
+   ggc_mark (tt);
+   if (tt->chars)
+     ggc_mark (tt->chars);
+ }
+
+ /* Allocate SIZE bytes and clear them.  */
+
+ void *
+ my_malloc (size_t size)
+ {
+   void *mem;
+   mem = ggc_alloc (size);
+   if (!mem)
+     {
+       fprintf (stderr, "\nOut of memory\n");
+       abort ();
+     }
+   memset (mem, 0, size);
+   return mem;
+ }
+
+ /* Look up a name in PROD->SYMBOL_TABLE_NAME in the symbol table;
+    return the symbol table entry from the symbol table if found there,

+    else 0.  */
+
+ struct production*
+ lookup_tree_name (struct production *prod)
+ {
+   struct production *this;
+   struct token* this_tok;
+   struct token* tok;
+   tok = SYMBOL_TABLE_NAME (prod);
+   for (this = symbol_table; this; this = this->next)
+     {
+       this_tok = this->main_token;
+       if (tok->length != this_tok->length)
+         continue;
+       if (memcmp (tok->chars, this_tok->chars, this_tok->length))
+         continue;
+       if (option_parser_trace)
+         fprintf (stderr, "Found symbol %s (%i:%i) as %i \n",
tok->chars,
+                 tok->lineno, tok->charno, NUMERIC_TYPE (this));
+       return this;
+     }
+   if (option_parser_trace)
+     fprintf (stderr, "Not found symbol %s (%i:%i) as %i \n",
tok->chars,
+             tok->lineno, tok->charno, tok->type);
+   return NULL;
+ }
+
+ /* Insert name PROD into the symbol table.  Return 1 if duplicate, 0
if OK.  */
+
+ int
+ insert_tree_name (struct production *prod)
+ {
+   struct token* tok;
+   tok = SYMBOL_TABLE_NAME (prod);
+   if (lookup_tree_name (prod))
+     {
+       fprintf (stderr, "%s:%i:%i duplicate name %s\n", in_fname,
tok->lineno, tok->charno, tok->chars);
+       errorcount++;
+       return 1;
+     }
+   prod->next = symbol_table;
+   NESTING_LEVEL (prod) = work_nesting_level;
+   symbol_table = prod;
+   return 0;
+ }
+
+ /* Create a struct productions of type TYPE, main token MAIN_TOK.  */
+
+ struct production *
+ make_production (int type, struct token* main_tok)
+ {
+   struct production *prod;
+   prod = my_malloc (sizeof (struct production));
+   prod->category = production_category;
+   prod->type = type;
+   prod->main_token = main_tok;
+   return prod;
+ }
+
+
diff -c -r -p -N -X treelang.diff.excl cvs/gcc/gcc/treelang/treelang.h
cvscopy/gcc/gcc/treelang/treelang.h
*** cvs/gcc/gcc/treelang/treelang.h     Thu Jan  1 10:00:00 1970
--- cvscopy/gcc/gcc/treelang/treelang.h Sat May  4 21:10:25 2002
***************
*** 0 ****
--- 1,116 ----
+ /*
+
+     TREELANG Compiler common definitions (treelang.h)
+
+     Copyright (C) 1986, 87, 89, 92-96, 1997, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
+
+     This program is free software; you can redistribute it and/or
modify it
+     under the terms of the GNU General Public License as published by
the
+     Free Software Foundation; either version 2, or (at your option)
any
+     later version.
+
+     This program is distributed in the hope that it will be useful,
+     but WITHOUT ANY WARRANTY; without even the implied warranty of
+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+     GNU General Public License for more details.
+
+     You should have received a copy of the GNU General Public License
+     along with this program; if not, write to the Free Software
+     Foundation, 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+
+     In other words, you are welcome to use, share and improve this
program.
+     You are forbidden to forbid anyone else to use, share and improve
+     what you give them.   Help stamp out software-hoarding!
+
+
---------------------------------------------------------------------------

+
+     Written by Tim Josling 1999, 2000, 2001, based in part on other
+     parts of the GCC compiler.
+
+ */
+
+ /* Parse structure type.  */
+ enum category_enum
+ { /* These values less likely to be there by chance unlike 0/1,
+       make checks more meaningful */
+   token_category = 111,
+   production_category = 222
+ };
+
+ /* Input file name and FILE.  */
+ extern unsigned char* in_fname;
+ extern FILE* yyin;
+
+ #if 0
+ extern int errorcount; /* In toplev.c.  */
+ #endif
+
+ struct token
+ {
+   enum category_enum category; /* Token or production. */
+   unsigned int type; /* Token type.  */
+   /* Prior to this point, production must match token.  */
+   unsigned int lineno;
+   unsigned int charno;
+   unsigned int length; /* The value.  */
+   unsigned char* chars;
+ };
+
+ struct production
+ {
+   enum category_enum category; /* Token or Production. */
+   unsigned int type; /* Production type - a fake token name.  */
+   /* Prior to this point, production must match token.  */
+   struct token* main_token; /* Main token for error msgs; variable
name token.  */
+
+   unsigned int info[2]; /* Extra information.  */
+ #define NESTING_LEVEL(a) a->info[0]  /* Level used for variable
definitions.  */
+ #define NUMERIC_TYPE(a)  a->info[1]  /* Numeric type used in type
definitions and expressions.  */
+
+
+ #define SUB_COUNT 5
+   void *sub[SUB_COUNT]; /* Sub productions or tokens.  */
+
+ #define SYMBOL_TABLE_NAME(a) (a->sub[0]) /* Name token.  */
+
+ #define EXPRESSION_TYPE(a) (a->sub[1]) /* Type identifier.  */
+
+ #define OP1(a) (a->sub[2]) /* Exp operand1.  */
+ #define PARAMETERS(a) (a->sub[2]) /* Function parameters.  */
+ #define VARIABLE(a) (a->sub[2]) /* Parameter variable ptr.  */
+ #define VAR_INIT(a) (a->sub[2]) /* Variable init.  */
+
+ #define OP2(a) (a->sub[3]) /* Exp operand2.  */
+ #define FIRST_PARMS(a) (a->sub[3]) /* Function parameters linked via
struct tree_parameter_list.  */
+
+ #define OP3(a) (a->sub[4]) /* Exp operand3.  */
+ #define STORAGE_CLASS_TOKEN(a) (a->sub[4]) /* Storage class token.  */

+
+   void *code; /* Back end hook for this item.  */
+   struct production *next; /* Next in chains of various types.  */
+
+   unsigned int flag1:2;
+ #define STORAGE_CLASS(a) a->flag1 /* Values in treetree.h.  */
+
+   unsigned int flag2:1;
+   unsigned int flag3:1;
+   unsigned int flag4:1;
+   unsigned int flag5:1;
+   unsigned int flag6:1;
+   unsigned int flag7:1;
+
+ };
+
+ /* For parser. Alternatively you can define it using %union (bison) or

+    union. */
+ #define YYSTYPE void *
+
+ void *my_malloc (size_t size);
+ int insert_tree_name (struct production *prod);
+ struct production *lookup_tree_name (struct production *prod);
+ struct production *make_production (int type, struct token* main_tok);

+ void mark_production_used (struct production * pp);
+ void mark_token_used (struct token* tt);
+ void treelang_debug (void);
+
diff -c -r -p -N -X treelang.diff.excl
cvs/gcc/gcc/treelang/treelang.texi
cvscopy/gcc/gcc/treelang/treelang.texi
*** cvs/gcc/gcc/treelang/treelang.texi  Thu Jan  1 10:00:00 1970
--- cvscopy/gcc/gcc/treelang/treelang.texi      Mon Apr 29 20:30:08 2002

***************
*** 0 ****
--- 1,1311 ----
+ \input texinfo  @c -*-texinfo-*-
+ @c %**start of header
+ @setfilename treelang.info
+
+ @set last-update 2001-07-30
+ @set copyrights-treelang 1995,1996,1997,1998,1999,2000,2001,2002
+ @c DEVELOPMENT is set to indicate an in-development version,
+ @c as compared to a release version.  When making a release
+ @c (e.g. a release branch in the CVS repository for GCC),
+ @c clear this and set the version information correctly.
+ @clear DEVELOPMENT
+ @set version-treelang 1.0
+ @set version-GCC 3.0
+
+ @set email-general gcc@@gcc.gnu.org
+ @set email-bugs gcc-bugs@@gcc.gnu.org or bug-gcc@@gnu.org
+ @set email-patches gcc-patches@@gcc.gnu.org
+ @set path-treelang gcc/gcc/treelang
+
+ @set which-treelang GCC-@value{version-GCC}
+ @set which-GCC GCC
+
+ @set email-josling tej@@melbpc.org.au
+ @set www-josling http://www.geocities.com/timjosling
+
+ @c This tells @include'd files that they're part of the overall
TREELANG doc
+ @c set.  (They might be part of a higher-level doc set too.)
+ @set DOC-TREELANG
+
+ @c @setfilename usetreelang.info
+ @c @setfilename maintaintreelang.info
+ @c To produce the full manual, use the "treelang.info" setfilename,
and
+ @c make sure the following do NOT begin with '@c' (and the @clear
lines DO)
+ @set INTERNALS
+ @set USING
+ @c To produce a user-only manual, use the "usetreelang.info"
setfilename, and
+ @c make sure the following does NOT begin with '@c':
+ @c @clear INTERNALS
+ @c To produce a maintainer-only manual, use the
"maintaintreelang.info" setfilename,
+ @c and make sure the following does NOT begin with '@c':
+ @c @clear USING
+
+ @c 6/27/96 FSF DO wants smallbook fmt for 1st bound edition. (from
gcc.texi)
+ @c @smallbook
+
+ @c i also commented out the finalout command, so if there *are* any
+ @c overfulls, you'll (hopefully) see the rectangle in the right hand
+ @c margin. -- burley 1999-03-13 (from mew's comment in GCC.texi).
+ @c @finalout
+
+ @ifset INTERNALS
+ @ifset USING
+ @settitle Using and Maintaining GNU Treelang
+ @end ifset
+ @end ifset
+ @c seems reasonable to assume at least one of INTERNALS or USING is
set...
+ @ifclear INTERNALS
+ @settitle Using GNU Treelang
+ @end ifclear
+ @ifclear USING
+ @settitle Maintaining GNU Treelang
+ @end ifclear
+ @c then again, have some fun
+ @ifclear INTERNALS
+ @ifclear USING
+ @settitle Doing Very Little at all with GNU Treelang
+ @end ifclear
+ @end ifclear
+
+ @syncodeindex fn cp
+ @syncodeindex vr cp
+ @c %**end of header
+
+ @c Cause even numbered pages to be printed on the left hand side of
+ @c the page and odd numbered pages to be printed on the right hand
+ @c side of the page.  Using this, you can print on both sides of a
+ @c sheet of paper and have the text on the same part of the sheet.
+
+ @c The text on right hand pages is pushed towards the right hand
+ @c margin and the text on left hand pages is pushed toward the left
+ @c hand margin.
+ @c (To provide the reverse effect, set bindingoffset to -0.75in.)
+
+ @c @tex
+ @c \global\bindingoffset=0.75in
+ @c \global\normaloffset =0.75in
+ @c @end tex
+
+ @ifinfo
+ @dircategory Programming
+ @direntry
+ * treelang: (treelang).                  The GNU Treelang compiler.
+ @end direntry
+ @ifset INTERNALS
+ @ifset USING
+ This file documents the use and the internals of the GNU Treelang
+ (@code{treelang}) compiler. At the moment this manual is not
+ incorporated into the main GCC manual as it is too incomplete. It
+ corresponds to the @value{which-treelang} version of @code{treelang}.
+ @end ifset
+ @end ifset
+ @ifclear USING
+ This file documents the internals of the GNU Treelang
(@code{treelang}) compiler.
+ It corresponds to the @value{which-treelang} version of
@code{treelang}.
+ @end ifclear
+ @ifclear INTERNALS
+ This file documents the use of the GNU Treelang (@code{treelang})
compiler.
+ It corresponds to the @value{which-treelang} version of
@code{treelang}.
+ @end ifclear
+
+ Published by the Free Software Foundation
+ 59 Temple Place - Suite 330
+ Boston, MA 02111-1307 USA
+
+ Copyright (C) @value{copyrights-treelang} Free Software Foundation,
Inc.
+
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1 or
+ any later version published by the Free Software Foundation; with the
+ Invariant Sections being ``GNU General Public License'', the
Front-Cover
+ texts being (a) (see below), and with the Back-Cover Texts being (b)
+ (see below).  A copy of the license is included in the section
entitled
+ ``GNU Free Documentation License''.
+
+ (a) The FSF's Front-Cover Text is:
+
+      A GNU Manual
+
+ (b) The FSF's Back-Cover Text is:
+
+      You have freedom to copy and modify this GNU Manual, like GNU
+      software.  Copies published by the Free Software Foundation raise

+      funds for GNU development.
+ @end ifinfo
+
+ treelang was Contributed by Tim Josling
(@email{@value{email-josling}}).
+ Inspired by and based on the 'toy' language, written by Richard
Kenner.
+
+ This document was written by Tim Josling, based on the GNU C++
+ documentation.
+
+ @setchapternewpage odd
+ @c @finalout
+ @titlepage
+ @ifset INTERNALS
+ @ifset USING
+ @center @titlefont{Using and Maintaining GNU Treelang}
+
+ @end ifset
+ @end ifset
+ @ifclear INTERNALS
+ @title Using GNU Treelang
+ @end ifclear
+ @ifclear USING
+ @title Maintaining GNU Treelang
+ @end ifclear
+ @sp 2
+ @center Tim Josling
+ @sp 3
+ @center Last updated @value{last-update}
+ @sp 1
+ @center for version @value{version-treelang}
+ @page
+ @vskip 0pt plus 1filll
+ Copyright @copyright{} @value{copyrights-treelang} Free Software
Foundation, Inc.
+ @sp 2
+ For the @value{which-treelang} Version*
+ @sp 1
+ Published by the Free Software Foundation @*
+ 59 Temple Place - Suite 330@*
+ Boston, MA 02111-1307, USA@*
+ @c Last printed ??ber, 19??.@*
+ @c Printed copies are available for $? each.@*
+ @c ISBN ???
+ @sp 1
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1 or
+ any later version published by the Free Software Foundation; with the
+ Invariant Sections being ``GNU General Public License'', the
Front-Cover
+ texts being (a) (see below), and with the Back-Cover Texts being (b)
+ (see below).  A copy of the license is included in the section
entitled
+ ``GNU Free Documentation License''.
+
+ (a) The FSF's Front-Cover Text is:
+
+      A GNU Manual
+
+ (b) The FSF's Back-Cover Text is:
+
+      You have freedom to copy and modify this GNU Manual, like GNU
+      software.  Copies published by the Free Software Foundation raise

+      funds for GNU development.
+ @end titlepage
+ @page
+
+ @ifinfo
+
+ @node Top, Copying,, (dir)
+ @top Introduction
+ @cindex Introduction
+
+ @ifset INTERNALS
+ @ifset USING
+ This manual documents how to run, install and maintain
@code{treelang},
+ as well as its new features and incompatibilities,
+ and how to report bugs.
+ It corresponds to the @value{which-treelang} version of
@code{treelang}.
+ @end ifset
+ @end ifset





More information about the Gcc-patches mailing list