/* Copyright (C) 1992 by Thomas Glen Smith. All Rights Reserved. */ /* funcexed APL2 V1.0.0 ************************************************ * Called by funcexee to handle the execution of a statement. * ***********************************************************************/ #define INCLUDES STDIO+APLCB+APLTOKEN+TREE+APLCHDEF+APLDEBUG #include "includes.h" Aplcb funcexed(curtok,tokcnt) Apltoken curtok; /* leftmost token to pass to execexec */ int tokcnt; /* number of tokens to pass to execexec */ { Execexec; Execgetp; extern Treelist treehdr; Apltoken prevtok; Aplcb out; #if APL_DEBUG void mem_check(void); mem_check(); #endif prevtok = NULL; while (tokcnt--) { /* form a token stack */ if (curtok->token_code == CAP_NULL) break; /* omit comment */ curtok->token_queue.token_next_ptr = prevtok; prevtok = curtok--; } curtok++; treehdr->avltokhd = curtok; out = execgetp(execexec()); #if APL_DEBUG mem_check(); #endif return(out); }