This commit is contained in:
rsc 2003-12-04 17:45:49 +00:00
parent c72688efcf
commit c5b9ff9fa8
8 changed files with 1364 additions and 4 deletions

View file

@ -13,8 +13,8 @@
#define SETBIT(a,i) ((a)[(i)>>5] |= (1<<((i)&037)))
#define NWORDS(n) (((n)+32)/32)
#define PARSER "/sys/lib/yaccpar"
#define PARSERS "/sys/lib/yaccpars"
#define PARSER "lib/yaccpar"
#define PARSERS "lib/yaccpars"
#define TEMPNAME "y.tmp.XXXXXX"
#define ACTNAME "y.acts.XXXXXX"
#define OFILE "tab.c"
@ -398,10 +398,19 @@ void
others(void)
{
int c, i, j;
char *s, *root;
finput = Bopen(parser, OREAD);
root = getenv("PLAN9");
if(root == nil)
root = "/usr/local/plan9";
s = malloc(strlen(root)+1+strlen(parser)+1);
strcpy(s, root);
strcat(s, "/");
strcat(s, parser);
finput = Bopen(s, OREAD);
if(finput == 0)
error("cannot find parser %s", parser);
error("cannot find parser %s", s);
free(s);
warray("yyr1", levprd, nprod);
aryfil(temp1, nprod, 0);
PLOOP(1, i)