]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/treelang/treelang.h
patch_tester.sh (usage): Watermark is not lexicographic.
[thirdparty/gcc.git] / gcc / treelang / treelang.h
index 5fded628736523377eb299b8ea7a8890bc8623a1..aea030a425636bc8e4ca14acd5f788ba37d40336 100644 (file)
@@ -1,34 +1,32 @@
-/* 
-
-    TREELANG Compiler common definitions (treelang.h)
-
-    Copyright (C) 1986, 87, 89, 92-96, 1997, 1999, 2000, 2001, 2002, 2003 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.
-
-*/
+/* TREELANG Compiler common definitions (treelang.h)
+   
+   Copyright (C) 1986, 87, 89, 92-96, 1997, 1999, 2000, 2001, 2002, 2003, 2004,
+   2007 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 3, 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; see the file COPYING3.  If not see
+   <http://www.gnu.org/licenses/>.
+   
+   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 "input.h"
 
 /* Parse structure type.  */
 enum category_enum 
@@ -39,29 +37,29 @@ enum category_enum
   parameter_category = 333
 };
 
-/* Input file name and FILE.  */
-extern const char* in_fname;
+/* Input file FILE.  */
 extern FILE* yyin;
 
 /* Forward references to satisfy mutually recursive definitions.  */
 struct token_part;
 struct production_part;
 struct prod_token_parm_item;
-typedef struct GTY(()) prod_token_parm_item item;
+typedef struct prod_token_parm_item item;
 
 /* A token from the input file.  */
 
 struct token_part GTY(())
 {
-  unsigned int lineno;
+  location_t location;
   unsigned int charno;
   unsigned int length; /* The value.  */
-  unsigned char* chars;
+  const unsigned char *chars;
 };
 
 /* Definitions for fields in production.  */
 #define NESTING_LEVEL(a) a->tp.pro.info[0]  /* Level used for variable definitions.  */
-#define NUMERIC_TYPE(a)  a->tp.pro.info[1]  /* Numeric type used in type definitions and expressions.  */
+/* Numeric type used in type definitions and expressions.  */
+#define NUMERIC_TYPE(a)  a->tp.pro.info[1]  
 #define SUB_COUNT 5
 #define SYMBOL_TABLE_NAME(a) (a->tp.pro.sub[0]) /* Name token.  */
 #define EXPRESSION_TYPE(a) (a->tp.pro.sub[1]) /* Type identifier.  */
@@ -70,7 +68,8 @@ struct token_part GTY(())
 #define VARIABLE(a) (a->tp.pro.sub[2]) /* Parameter variable ptr.  */
 #define VAR_INIT(a) (a->tp.pro.sub[2]) /* Variable init.  */
 #define OP2(a) (a->tp.pro.sub[3]) /* Exp operand2.  */
-#define FIRST_PARMS(a) (a->tp.pro.sub[3]) /* Function parameters linked via struct tree_parameter_list.  */
+/* Function parameters linked via struct tree_parameter_list.  */
+#define FIRST_PARMS(a) (a->tp.pro.sub[3])
 #define OP3(a) (a->tp.pro.sub[4]) /* Exp operand3.  */
 #define STORAGE_CLASS_TOKEN(a) (a->tp.pro.sub[4]) /* Storage class token.  */
 #define STORAGE_CLASS(a) a->tp.pro.flag1 /* Values in treetree.h.  */
@@ -120,8 +119,8 @@ struct production_part GTY(())
 struct parameter_part GTY(())
 {
   struct prod_token_parm_item *next; /* Next entry.  */
-  unsigned char* variable_name; /* Name. */
-  tree * GTY ((length ("1"))) where_to_put_var_tree; /* Where to save decl.  */
+  const unsigned char *variable_name; /* Name. */
+  tree * GTY ((skip)) where_to_put_var_tree; /* Where to save decl.  */
 };
 
 /* A production or a token.  */