;;; -*- mode:lisp;package:user;base:10.;fonts: cptfont -*- ;;; $Header: /ct/interp/intrpdcl.l,v 1.74 84/12/05 17:51:07 penny Exp $ ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; INTRPDCL ;;; ;;; Paul Robertson January 30, 1983 ;;; ;;; See last page for edit history. ;;; ;;; ;;; ;;; Declarations common to the interpreter modules. ;;; ;;; ;;; ;;; This file is part of a proprietary software project. Source ;;; ;;; code and documentation describing implementation details are ;;; ;;; available on a confidential, non-disclosure basis only. These ;;; ;;; materials, including this file in particular, are trade secrets ;;; ;;; of Computer * Thought Corporation. ;;; ;;; ;;; ;;; (c) Copyright 1982 and 1983, Computer * Thought Corporation. ;;; ;;; All Rights Reserved. ;;; ;;; ;;; ;;; Reference materials: ;;; ;;; Miller, 1982. The C*T Ada Tutor: Guide to the Implementation. ;;; ;;; Charniak et al., 1980. Artificial Intelligence Programming. ;;; ;;; ;;; ;;; The following code assumes familiarity with the above. ;;; ;;; ;;; ;;; DOES NOT ASSUME CT_LOAD OR ANY OTHER FILES ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; General Purpose Stuff #+franz (macros t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Frontend *FEXPR Declarations (*fexpr is_standard_procedure is_standard_function) (*fexpr is_builtin_operator old_is_builtin_operator) (*fexpr pr_restrict) #+franz (*lexpr ada_declared) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Frontend SPECIAL declarations. ;;; Interface streams (special *srcin* *listout* *errin* *errout* *userin* *userout* *path* *syntree* ;used to get at components of parse. *not_inside_debug_ta* *range_checking* *name_communication* *original_context* *numinitexp* *numdiscs* *seen_assistance_1* *seen_assistance_2* *seen_assistance_3* *library_unit* la_this_symbols_pos *semantic_error_stack* ; to be killed thiserror ; to be killed interp-window ; A pop-up window for hints etc. *eof_count* ; trap for end-of-file. *in_record* *disc_not_allowed* *disc_list* *disc_used* *awaiting_parameter_normalization* *awaiting_aggregate_normalization* *awaiting_aggregate_disambiguation* *awaiting_incomplete_type* *awaiting_deferred_value* *awaiting_disambiguation* *awaiting_label_fixup* *class_restriction* *no_function* *contextstack* ; A stack for tracking nested blocks. *identstack* ; A stack for matching *returntypestack* ; for the return types of funcs. *current_generic_nestitude* *generic_nestitude_stack* *return_stmt_stack* ;check each function has a return *exception_handler_stack* *named_stm_stack* *bnl* *pnl* ; block and procedure nesting level. *ct_ada_true* ; the ada truth value. *ct_ada_false* ; the ada false value. **ct_ada_chars** ; the ada character enumeration type **array_of_chars**; the array of char enumeration types ch *time_stamp* ; time when dn was created. *error_status* *listing_switch* *la_buffered_line* *charstack* ; Character stack *la_current_line* ; Atom for curr line la_plinpos ; previous linpos *size_of_invisible* ; Size of invisible line la_psrcpos *pcharcount* *ppcharcount* *buffered_gripes_pending* ; Because of line ; buffers > 2 lines la_pplinpos la_ppsrcpos *la_newpages* be_result *debugdriver* ; for debugging only..to be removed *kneecapped* *ct_load_subdir* *function_name_only* *debugscheduler* *debugparser* *gripes_pending* ; a list of outstanding gripes.. *parse_errors* ; count of parse/lexical time errors. *goto_count* *symbolstack* ; a stack for putback symbols la_this_symbol ; place where characters are assembled into ; a symbol. res ; to be killed (was for tv:cvv) parsed *current_non_terminal* *semantic_errors* **current_block** ; current context. **standard_env** ; the standard ada environment. *abstract_syntax* ; part of a hack that will be removed soon. *print_diana_tree*; whether or not to print the resulting tree. *diana_internp* ; do we internp the gensyms. *produce_listing* ; whether or not to print a listing of the ; source. *tracedepth* ; the depth of the simple tracer (for indentation) *tracedfunctions* ; *not_wffp_diana* ; tag used by adaf_int_int *continue_inc_diana*; used to see if runable committed *preparsecc* ; charcount before parse. *postparsecc* ; charcount after parse. *srcposbeg* *linposbeg* la_entry ada_source ; input stream for ada_source. la_current_symbol ; The present symbol. la_current_ch ; one character lookahead. la_srcpos ; current position in source. la_linpos ; current position in the current line. la_psrcpos ; previous position in source. la_plinpos ; previous position in the current line. la_ppsrcpos ; previous previous position in source. la_pplinpos ; previous previous position in the current line. *charcount* ; character offset into source. *pcharcount* ; previous character offset into source. *ppcharcount* ; previous previous character offset into source. la_comments ; Accumulated comments. *la_collect_comments* ; Collect comments into la_comments? ch *inbuilt_diana_trees* ; list of built in diana trees *infrontend* *index_diana_nodes* *header* *branches* ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Backend SPECIAL declarations. (special base ibase *nopoint prinlevel prinlength ;Std. LISP vars. *ada_examples_pathname* ; Default path for AdaF. *be_timing* ; Computed by effect. *bit_bucket* *release* ; String for printing. *listing* ; Interpreter out *errin* ; Error query in *errout* ; Error msg out *userin* ; Ada Prog in *userout* ; Ada Prog out stage replay *exchandler* *debug_dvm* ; See Driver ++tst *debugscheduler* ; See Driver ++tst *last_diana* pc ;Avail. for toplev. debug. ;;; The next specials are bound by the back end driver, adabe, ;;; and accessed (NOT MODIFIED) by the dynamic semantic funs. *package_standard* *diana* ;The top level Diana S-Expression. *diana_node_counter* ;Number of nodes in the Diana tree. *diana_universal_attributes* ;; List of all universal Diana attributes *diana_universals_count* ;; Length of above. *diana_attributes* ;List of all legal Diana attributes. *diana_nodetypes* ;List of all legal Diana nodetypes. *dvm_cycle_counter* ;Counts cycles thru Diana Virt. Mach. *in_attribute_value* ;;; The next few specials can be ACCESSED+MODIFIED by the dynamic ;;; semantic functions. (Whereas the program counter [pc in adabe] ;;; and processing stage [stage in adabe] are passed as formals.) *resume* ;resumption point for 'unnatural flow' *exception* ;Description of unhandled exception. *exception_name* *exception_reason* *activation* ;Current activation record. *nuactivation* ;Process to activate. *continuation* ;Next node to JMP to. *diana_subtree_call* ;A call to a diana subtree has been made. *dynamic_locals_alist* ;Current node's dyn. sem. local vars. *dynamic_mother_locals_alist* ;; Parent node's dynsem locals. *ds_cache* ; Cache for ds variables. *ds_cache_size* ; Size of the cache table. *cache_on* ; needed for testing the cache works ;;;Tasking / task queue specials: *root_task_queue* ;Main task queue structure *current_task* ;The currently-executing task *default_task_priority* *total_number_of_runnable_tasks* *nodestages* ;the nodestages of *activation* *scheduler_algorithm* *task_cyclecounter* *task_cyclefrequency* **text_file_list** ;list of text file object by create/open call --am **text_file_num** ;next file position **standard_input** ;standard input file **default_input** ;default input file **standard_output** ;standard output **default_output** ;default output **sequen_file_list** ;list of sequen file object by create/open call --am **sequen_file_num** ;next file position **direct_file_list** ;list of direct file object by create/open call --am **direct_file_num** ;next file position *textio_temp_file_list* *seqio_temp_file_list* *dirio_temp_file_list* *io_get_integer* ;flag indicating the value come from get *io_get_float* *io_get_fixed* *io_get_enum* *character_type* *address_type* *float_type* *integer_type* *universal_types* *universal_real* *universal_integer* *universal_fixed* *universal_float* ) (fixnum *dvm_cycle_counter* *default_task_priority*) ;;; Backend *FEXPR declarations. (*fexpr ds_if ds_label) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; External *EXPR declarations. (So we don't have to load tutor files.) ;;; The following functions are defined in the tutor module, to ;;; facilitate pseudo-process-switching for Franz. (Not to be ;;; be confused with Ada processes.) They allow wrenching out ;;; of the backend in response to an "abort" mouse click or such. ;;; These are not used when (status feature tutor) is nil. (*expr adabe ada_wrenched_p_fcn ada_set_wrenched_p_fcn ada_saved_state_fcn central-dispatch-peek-fcn central-dispatch-tyi-little-peek ada_set_saved_state_fcn) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Edit History: ;;; ;;; o 17-May-83, Mark and Jim -- Merged from FE_DECL and BE_DECL. ;;; o 26-May-83, Mark -- Added stuff from front of interp, driver. ;;; ;;; eof ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;