/* %Z%%M% %I% %E% */

/*
 * Copyright (c) 1991, 1992, 1993, 1995 by Wayne C. Gramlich.
 * All rights reserved.
 *
 * Permission to use, copy, modify, distribute, and sell this software
 * for any purpose is hereby granted without fee provided that the above
 * copyright notice and this permission are retained.  The author makes
 * no representations about the suitability of this software for any purpose.
 * It is provided "as is" without express or implied warranty.
 */

/*
 * This file contains a bunch of string definitions for run-time
 * environment: 
 */

#define TAB	"    "		/* Four spaces */

char *run__time__enums = 
	"enum type__tag__enum {\n"
	TAB	"type__tag__enumeration,\n"
	TAB	"type__tag__record,\n"
	TAB	"type__tag__variant\n"
	"};\n"
	"\n"
	"enum variable__flavor__enum {\n"
	TAB	"variable__flavor__unparam,\n"
	TAB	"variable__flavor__static,\n"
	TAB	"variable__flavor__block\n"
	"};\n"
	"\n"
	"enum variable__kind__enum {\n"
	TAB	"variable__kind__argument,\n"
	TAB	"variable__kind__variable,\n"
	TAB	"variable__kind__return\n"
	"};\n"
	"\n";

char *run__time__type_defs =
	"#define break___point(number) \\\n"
	"\tactivation__object.breakpoint = number; \\\n"
	"\tif ((activation__object.breakpoints[number>>3] & "
		"(1 << (number & 7))) != 0) \\\n"
	"\t\trun__time__breakpoint()\n"
	"\n"
	"typedef struct activation__object__struct activation___object;\n"
	"typedef struct enumeration__object__struct enumeration___object;\n"
	"typedef struct instantiation__object__struct instantiation___object;\n"
	"typedef struct module__object__struct module___object;\n"
	"typedef struct object__object__struct object___object;\n"
	"typedef struct object__use__struct object___use;\n"
	"typedef struct need__entry__struct need___entry;\n"
	"typedef void (*print__param__routine)(void *, void *, void *);\n"
	"typedef struct print__proc__var__struct print__proc__var;\n" 
	"typedef void (*print__unparam__routine)(void *, void *);\n"
	"typedef struct proc__var__type__struct proc__var__type;\n"
	"typedef struct record__object__struct record___object;\n"
	"typedef struct routine__object__struct routine___object;\n"
	"typedef struct routine__params__struct routine___params;\n"
	"typedef struct routine__use__struct routine___use;\n"
	"typedef struct run__time__struct *run___time;\n"
	"typedef struct signal__object__struct signal___object;\n"
	"typedef struct type__reference__struct type___reference;\n"
	"typedef enum type__tag__enum type___tag;\n"
	"typedef struct type__object__struct type___object;\n"
	"typedef enum variable__flavor__enum variable___flavor;\n"
	"typedef enum variable__kind__enum variable___kind;\n"
	"typedef struct variant__object__struct variant___object;\n"
	"typedef struct variable__object__struct variable___object;\n"
	"typedef union which__object__union which___object;\n"
	"\n";

char *run__time__struct_defs =
	"struct activation__object__struct {\n"
	TAB	"int breakpoint;\n"
	TAB	"char *breakpoints;\n"
	TAB	"void *frame;\n"
	TAB	"activation___object *previous;\n"
	TAB	"routine___object *routine;\n"
	"};\n"
	"\n"
	"struct enumeration__object__struct {\n"
	TAB	"int item_count;\n"
	TAB	"char **item_names;\n"
	"};\n"
	"\n"
	"struct instantiation__object__struct {\n"
	TAB	"int parameters_count;\n"
	TAB	"type___reference **parameters;\n"
	TAB	"void *object_or_routine;\n"
	TAB	"instantiation___object *next;\n"
	"};\n"
	"\n"
	"struct need__entry__struct {\n"
	TAB	"char *name;\n"
	TAB	"char *type_name;\n"
	TAB	"int parameter_count;\n"
	TAB	"type___reference **parameters;\n"
	TAB	"int is_routine;\n"
	TAB	"int offset;\n"
	"};\n"
	"\n"
	"struct module__object__struct {\n"
	TAB	"char *package_name;\n"
	TAB	"char *module_name;\n"
	TAB	"char *file_name;\n"
	TAB	"char *generate_name;\n"
	TAB	"int generate_boundary;\n"
	TAB	"int object_count;\n"
	TAB	"object___object **objects;\n"
	TAB	"int type_count;\n"
	TAB	"type___object **types;\n"
	TAB	"int routine_count;\n"
	TAB	"routine___object **routines;\n"
	TAB	"int routine_uses_count;\n"
	TAB	"routine___use **routine_uses;\n"
	TAB	"int object_uses_count;\n"
	TAB	"object___use **object_uses;\n"
	TAB	"int initial_object_uses_count;\n"
	TAB	"type___reference **initial_object_uses;\n"
	TAB	"void **initial_object_addresses;\n"
	"};\n"
	"\n"
	"struct object__object__struct {\n"
	TAB	"char *package_name;\n"
	TAB	"char *type_name;\n"
	TAB	"char *object_name;\n"
	TAB	"type___reference *object_type;\n"
	TAB	"int *bytes;\n"
	TAB	"int static_needs_count;\n"
	TAB	"need___entry *static_needs;\n"
	TAB	"int parameter_needs_count;\n"
	TAB	"need___entry *parameter_needs;\n"
	TAB	"void **object_pointer;\n"
	TAB	"instantiation___object *instantiations;\n"
	"};\n"
	"\n"
	"struct object__use__struct {\n"
	TAB	"char *package_name;\n"
	TAB	"char *type_name;\n"
	TAB	"char *routine_name;\n"
	TAB	"type___reference *type;\n"
	"};\n"
	"\n"
	"struct print__proc__var__struct {\n"
	TAB	"print__param__routine routine;\n"
	TAB	"void *block;\n"
	"};\n"
	"\n"
	"struct proc__var__type__struct {\n"
	TAB	"void *(*routine)(void);\n"
	TAB	"void *block;\n"
	"};\n"
	"\n"
	"struct record__object__struct {\n"
	TAB	"int field_count;\n"
	TAB	"char **field_names;\n"
	TAB	"type___reference **field_types;\n"
	"};\n"
	"\n"
	"struct routine__object__struct {\n"
	TAB	"char *info;\n"
	TAB	"int *counts;\n"
	TAB	"routine__info__type routine_info;\n"
	TAB	"module___object *module;\n"
	TAB	"int variables_count;\n"
	TAB	"variable___object *variables;\n"
	TAB	"void *routine_address;\n"
	TAB	"routine___params *routine_params;\n"
	"};\n"
	"\n"
	"struct routine__params__struct {\n"
	TAB	"int static_needs_count;\n"
	TAB	"need___entry *static_needs;\n"
	TAB	"void *static_need_object;\n"
	TAB	"int parameter_needs_count;\n"
	TAB	"need___entry *parameter_needs;\n"
	TAB	"int parameter_need_object_size;\n"
	"};\n"
	"\n"
	"struct routine__use__struct {\n"
	TAB	"char *package_name;\n"
	TAB	"char *type_name;\n"
	TAB	"char *routine_name;\n"
	TAB	"int signature;\n"
	"};\n"
	"\n"
	"struct signal__object__struct {\n"
	TAB	"char *name;\n"
	TAB	"int count;\n"
	TAB	"type___reference **value_types;\n"
	"};\n"
	"\n"
	"struct type__reference__struct {\n"
	TAB	"char *name;\n"
	TAB	"int count;\n"
	TAB	"type___reference **parameters;\n"
	"};\n"
	"\n"
	"struct variable__object__struct {\n"
	TAB	"variable___kind kind;\n"
	TAB	"char *name;\n"
	TAB	"int offset;\n"
	TAB	"variable___flavor flavor;\n"
	TAB	"void *print_routine;\n"
	"};\n"
	"\n"
	"struct variant__object__struct {\n"
	TAB	"char *tag_name;\n"
	TAB	"type___reference *tag_type;\n"
	TAB	"int field_count;\n"
	TAB	"char **field_names;\n"
	TAB	"type___reference **field_types;\n"
	"};\n"
	"\n"
	"union which__object__union {\n"
	TAB	"enumeration___object *enumeration;\n"
	TAB	"record___object *record;\n"
	TAB	"variant___object *variant;\n"
	"};\n"
	"\n"
	"struct type__object__struct {\n"
	TAB	"char *package_name;\n"
	TAB	"char *type_name;\n"
	TAB	"int parameter_count;\n"
	TAB	"char **parameter_names;\n"
	TAB	"type___tag type_tag;\n"
	TAB	"which___object which;\n"
	TAB	"int routine_count;\n"
	TAB	"routine___object *routines;\n"
	TAB	"module___object *module;\n"
	"};\n"
	"\n"
;

	
