Skip to contentSkip to conversation

Linux IA-64 yacc error

Linux-ia64 Greg Harris 2 participants 2 messages May 26, 2000

lore
Share & tools
lore
#0 lore raw

Is this the correct forum for this question?

Quoted 11 lines

Here is my problem. I am currently trying to build tools/src/nmake on trillian machine(received from Intel) with linux as OS. Here is the error
I get

yacc makey.y

yacc:f - out of space.

The machine has ample disk space.

We are able to compile simple y file with existing yacc.

Quoted 7 lines

yacc is unable to handle complex
file such as makey.y.

Greg Harris
Senior Software Engineer (I18N)
Unify Corporation <<makey.y>>

%term number stop DEFINED
%term EQ NE LE GE LS RS
%term ANDAND OROR
%left ','
%right '='
%right '?' ':'
%left OROR
%left ANDAND
%left '|' '^'
%left '&'
%binary EQ NE
%binary '<' '>' LE GE
%left LS RS
%left '+' '-'
%left '*' '/' '%'
%right '!' '~' UMINUS
%left '(' '.'
%%
S: e stop ={return($1);}

e: e '*' e

		={$$ = $1 * $3;}
	| e '/' e
		={$$ = ($3 != 0) ? $1 / $3 : 0;}
	| e '%' e
		={$$ = ($3 != 0) ? $1 % $3 : 0;}
	| e '+' e
		={$$ = $1 + $3;}
	| e '-' e
		={$$ = $1 - $3;}
	| e LS e
		={$$ = $1 << $3;}
	| e RS e
		={$$ = $1 >> $3;}
	| e '<' e
		={$$ = $1 < $3;}
	| e '>' e
		={$$ = $1 > $3;}
	| e LE e
		={$$ = $1 <= $3;}
	| e GE e
		={$$ = $1 >= $3;}
	| e EQ e
		={$$ = $1 == $3;}
	| e NE e
		={$$ = $1 != $3;}
	| e '&' e
		={$$ = $1 & $3;}
	| e '^' e
		={$$ = $1 ^ $3;}
	| e '|' e
		={$$ = $1 | $3;}
	| e ANDAND e
		={$$ = $1 && $3;}
	| e OROR e
		={$$ = $1 || $3;}
	| e '?' e ':' e
		={$$ = $1 ? $3 : $5;}
	| e ',' e
		={$$ = $3;}
	| term
		={$$ = $1;}
term:
	  '-' term %prec UMINUS
		={$$ = -$2;}
	| '!' term
		={$$ = !$2;}
	| '~' term
		={$$ = ~$2;}
	| '(' e ')'
		={$$ = $2;}
	| DEFINED '(' number ')'
		={$$= $3;}
	| DEFINED number
		={$$ = $2;}
	| number
		={$$= $1;}

%%

#1 lore raw
Quoted 3 lines · Greg Harris
Quoted 3 lines

yacc makey.y

yacc:f - out of space.

yacc is broken. Try the attached patch.

Bill

defs.h renamed from defs.h.busted +2 -8
@@ -1,7 +1,8 @@
 #include <assert.h>
 #include <ctype.h>
 #include <stdio.h>
-
+#include <string.h>
+#include <stdlib.h>
 
 /*  machine-dependent definitions			*/
 /*  the following definitions are for the Tahoe		*/
@@ -280,10 +281,3 @@
 extern int errno;
 
 
-/* system functions */
-
-extern void free();
-extern char *calloc();
-extern char *malloc();
-extern char *realloc();
-extern char *strcpy();