/* Copyright (C) 1993 by Thomas Glen Smith. All Rights Reserved. */
/* execspey APL2 V1.0.0 ************************************************
* Called by execspel when the current form is (...Fr)#n, to decide if *
* it is selective specification. The argument tok represents the *
* function F, and avltokhd points to whatever is just left of F. *
***********************************************************************/
#define INCLUDES APLCHDEF+APLTOKEN+APLCB+FUNSTRUC+TREE
#include "includes.h"
int execspey(tok)
Apltoken tok; /* token for next function */
{
extern Treelist treehdr;
extern int aplerr;
int hit=0,i;
Apltoken wrk;
i = ((Codes *)(tok->token_ptr.token_function))->funky_code;
switch(i) {
case EPSILON : /* enlist */
case COMMA : /* ravel */
case UP_ARROW : /* first and take */
case CIRCLE_STILE : /* reverse and rotate */
case CIRCLE_SLOPE : /* transpose */
case DOWN_ARROW : /* drop */
case SQUAD : /* index */
hit = i;
break;
case RIGHT_SHOE : /* pick */
case RHO : /* reshape */
if (!(NULL != (wrk = treehdr->avltokhd) &&
wrk->token_code == LEFT_PAREN))
hit = i;
break;
}
return(hit);
}