Another adaption to allow for user intervention BEFORE error recovery

This commit is contained in:
ceriel 1987-02-16 21:36:05 +00:00
parent e796cb0f27
commit 255884b3fb
2 changed files with 15 additions and 2 deletions

View file

@ -9,7 +9,7 @@ extern int LLsymb;
extern char LLsets[]; extern char LLsets[];
#define LL_SAFE(x) /* Nothing */ #define LL_SAFE(x) /* Nothing */
#define LL_SSCANDONE(x) if (LLsymb != x) LLmessage(x); else #define LL_SSCANDONE(x) if (LLsymb != x) LLerror(x); else
#define LL_SCANDONE(x) if (LLsymb != x) LLerror(x); else #define LL_SCANDONE(x) if (LLsymb != x) LLerror(x); else
#define LL_T_NOSCANDONE(x) LLscan(x) #define LL_T_NOSCANDONE(x) LLscan(x)

View file

@ -62,13 +62,17 @@ LLerror(t) {
return; return;
} }
#endif #endif
#ifdef LL_USERHOOK
LL_USERHOOK(t);
LLread();
#endif LL_USERHOOK
if ((LLcsymb = LLindex[LLsymb]) < 0) { if ((LLcsymb = LLindex[LLsymb]) < 0) {
LLmessage(0); LLmessage(0);
LLread(); LLread();
} }
i = LLindex[t]; i = LLindex[t];
LLtcnt[i]++; LLtcnt[i]++;
if (LLskip()) /* nothing */; if (LLdoskip()) /* nothing */;
LLtcnt[i]--; LLtcnt[i]--;
if (LLsymb != t) LLmessage(t); if (LLsymb != t) LLmessage(t);
} }
@ -90,6 +94,15 @@ LLnext(n) {
} }
LLskip() { LLskip() {
#ifdef LL_USERHOOK
LL_USERHOOK(0);
LLread();
#endif LL_USERHOOK
return LLdoskip();
}
LLdoskip()
{
register int i; register int i;
int retval; int retval;
int LLi, LLb; int LLi, LLb;