X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/2b84abb596f52ab2068d52108adc96838ad4340a..31cef89cb428866f787983e68246030321893df4:/usr/src/cmd/pi/yyid.c diff --git a/usr/src/cmd/pi/yyid.c b/usr/src/cmd/pi/yyid.c index e13047c185..9dc1b188bc 100644 --- a/usr/src/cmd/pi/yyid.c +++ b/usr/src/cmd/pi/yyid.c @@ -1,19 +1,8 @@ /* Copyright (c) 1979 Regents of the University of California */ -# -/* - * pi - Pascal interpreter code translator - * - * Charles Haley, Bill Joy UCB - * Version 1.1 February 1978 - * - * - * pxp - Pascal execution profiler - * - * Bill Joy UCB - * Version 1.1 February 1978 - */ -#include "whoami" +static char sccsid[] = "@(#)yyid.c 1.2 10/2/80"; + +#include "whoami.h" #include "0.h" #include "yy.h" @@ -117,7 +106,9 @@ yybadref(p, line) p->chain = udp; } -#define varkinds ((1<class == FVAR) - return(1); + return ( p -> class == FUNC + || p -> class == FVAR + || p -> class == FFUNC ); + case PROC: + return ( p -> class == PROC || p -> class == FPROC ); case CONST: case TYPE: - case PROC: case FIELD: return (p->class == kind); case VAR: @@ -182,7 +175,11 @@ yyisvar(p, class) * parameterless functions only. */ case FUNC: + case FFUNC: return (class == NIL || (p->type != NIL && p->type->class == class)); + case PROC: + case FPROC: + return ( class == NIL ); } return (0); }