Some lay-out changes and always use value of LLuserhook

This commit is contained in:
ceriel 1990-09-24 13:35:28 +00:00
parent 096e8368c5
commit f8de19a427

View file

@ -28,10 +28,13 @@ extern LLoldlevel();
#ifdef LL_USERHOOK #ifdef LL_USERHOOK
static LLdoskip(); static LLdoskip();
static int LLuserhook():
#endif #endif
#ifndef LL_FASTER #ifndef LL_FASTER
LLscan(t) { LLscan(t)
int t;
{
/* /*
* Check if the next symbol is equal to the parameter * Check if the next symbol is equal to the parameter
*/ */
@ -53,7 +56,9 @@ LLread() {
/* NOTREACHED */ /* NOTREACHED */
} }
LLerror(t) { LLerror(t)
int t;
{
register int i; register int i;
if (t == EOFILE && LLsymb <= 0) return; if (t == EOFILE && LLsymb <= 0) return;
@ -61,7 +66,7 @@ LLerror(t) {
if (t == EOFILE) { if (t == EOFILE) {
#ifdef LL_USERHOOK #ifdef LL_USERHOOK
static int lst[] = { EOFILE, 0 }; static int lst[] = { EOFILE, 0 };
LLuserhook(EOFILE, lst); if (LLuserhook(EOFILE, lst)) /* nothing */;
#endif LL_USERHOOK #endif LL_USERHOOK
if (LLsymb != EOFILE && LLsymb > 0) { if (LLsymb != EOFILE && LLsymb > 0) {
LLmessage(-1); LLmessage(-1);
@ -95,7 +100,9 @@ LLfirst(x, d) {
} }
# endif # endif
LLnext(n) { LLnext(n)
int n;
{
/* returns: 0 if the current symbol is'nt skipped, and it /* returns: 0 if the current symbol is'nt skipped, and it
is'nt a member of "n", is'nt a member of "n",
1 if we have a new symbol, but it is'nt a member, 1 if we have a new symbol, but it is'nt a member,
@ -125,6 +132,7 @@ LLskip() {
static int static int
LLuserhook(exp, list) LLuserhook(exp, list)
int exp;
int *list; int *list;
{ {
int old = LLsymb; int old = LLsymb;
@ -160,7 +168,9 @@ LLmklist(list)
} }
static static
LLdoskip(exp) { LLdoskip(exp)
int exp;
{
int LLx; int LLx;
int list[LL_NTERMINALS+1]; int list[LL_NTERMINALS+1];
#endif LL_USERHOOK #endif LL_USERHOOK
@ -224,7 +234,9 @@ LLnewlevel(LLsinfo) unsigned int *LLsinfo; {
LLtincr(0); LLtincr(0);
} }
LLoldlevel(LLsinfo) unsigned int *LLsinfo; { LLoldlevel(LLsinfo)
unsigned int *LLsinfo;
{
register int i; register int i;
LLtdecr(0); LLtdecr(0);