750a6bc684
+ Addition of function prototypes and include files. + Change function definitions to ANSI C style. + Initial support for CMake + Scripts to generate compiler header is now sed based.
61 lines
1.6 KiB
Plaintext
61 lines
1.6 KiB
Plaintext
/*
|
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
*/
|
|
#ifndef STACK_H_
|
|
#define STACK_H_
|
|
|
|
/* $Id$ */
|
|
/* IDENTIFIER STACK DEFINITIONS */
|
|
|
|
struct idf;
|
|
|
|
/* The identifier stack is implemented as a stack of sets.
|
|
The stack is implemented by a doubly linked list,
|
|
the sets by singly linked lists.
|
|
*/
|
|
|
|
struct stack_level {
|
|
/* struct stack_level *next; */
|
|
struct stack_level *sl_next; /* upward link */
|
|
struct stack_level *sl_previous; /* downward link */
|
|
struct stack_entry *sl_entry; /* sideward link */
|
|
arith sl_local_offset; /* @ for first coming object */
|
|
arith sl_max_block; /* maximum size of sub-block */
|
|
int sl_level;
|
|
};
|
|
|
|
/* ALLOCDEF "stack_level" 5 */
|
|
|
|
struct stack_entry {
|
|
struct stack_entry *next;
|
|
struct idf *se_idf;
|
|
};
|
|
|
|
/* ALLOCDEF "stack_entry" 50 */
|
|
|
|
extern struct stack_level *local_level;
|
|
extern int level;
|
|
|
|
/* A new level is added on top of the identifier stack. */
|
|
void stack_level(void);
|
|
/* The identifier idf is inserted in the stack on level stl,
|
|
but only if it is not already present at this level.
|
|
*/
|
|
void stack_idf(struct idf *idf, register struct stack_level *stl);
|
|
/*The stack_level corresponding to level lvl is returned.
|
|
The stack should probably be an array, to be extended with
|
|
realloc where needed.
|
|
*/
|
|
struct stack_level *stack_level_of(int lvl);
|
|
/* The top level of the identifier stack is removed. */
|
|
void unstack_level(void);
|
|
void unstack_world(void);
|
|
|
|
#ifdef GEN_NM_LIST
|
|
void open_name_list(void);
|
|
void namelist(char *nm);
|
|
#endif /* GEN_NM_LIST */
|
|
|
|
#endif
|