Back to index

tetex-bin  3.0
web2c.h
Go to the documentation of this file.
00001 /* web2c.h: general includes for the Web2c program itself.  Public domain.  */
00002 
00003 #include "config.h"
00004 
00005 #define ex_32 2
00006 #define ex_real 3
00007 
00008 #undef max
00009 #define max(a,b) ((a>b)?a:b)
00010 
00011 extern int indent;
00012 extern int line_pos;
00013 extern int last_brace;
00014 extern int block_level;
00015 extern int ii;
00016 extern int last_tok;
00017 
00018 extern char safe_string[80];
00019 extern char var_list[200];
00020 extern char field_list[200];
00021 extern char last_id[80];
00022 extern char z_id[80];
00023 extern char next_temp[];
00024 
00025 extern long last_i_num;
00026 extern int ii, l_s;
00027 extern long lower_bound, upper_bound;
00028 extern FILE *out;
00029 extern int pf_count;
00030 
00031 /* A symbol table entry.  */
00032 struct sym_entry {
00033   char *id;   /* points to the identifier */
00034   int typ;    /* token type */
00035   int next;   /* next symbol entry */
00036   long val;   /* constant : value
00037                  subrange type : lower bound */
00038   long upper;        /* subrange type : upper bound
00039                  variable, function, type or field : type length */
00040   int val_sym, upper_sym;   /* Sym table entries of symbols for lower
00041                                and upper bounds
00042                              */
00043   boolean var_formal;       /* Is this a formal parameter by reference? */
00044   boolean var_not_needed;
00045                     /* True if VAR token should be ignored for this type */
00046 };
00047 
00048 extern char strings[];
00049 extern int hash_list[];
00050 extern short global;
00051 extern struct sym_entry sym_table[];
00052 extern int next_sym_free, next_string_free;
00053 extern int mark_sym_free, mark_string_free;
00054 
00055 extern void find_next_temp P1H(void);
00056 extern void normal P1H(void);
00057 extern void new_line P1H(void);
00058 extern void my_output P1H(string);
00059 extern void semicolon P1H(void);
00060 extern void remove_locals P1H(void);
00061 extern void mark P1H(void);
00062 extern void initialize P1H(void);
00063 extern int add_to_table P1H(string);
00064 extern int search_table P1H(const_string);
00065 extern int yyerror P1H(string);
00066 
00067 extern void get_string_literal P1H(char*);
00068 extern void get_single_char P1H(char*);
00069 extern void get_return_type P1H(char*);
00070 
00071 /* No prototypes for these two. As used, neither takes arguments. */
00072 extern int yylex(), yyparse();