1994-06-24 11:31:16 +00:00
|
|
|
/* $Id$ */
|
1985-11-25 15:50:51 +00:00
|
|
|
#ifdef LL_DEBUG
|
1990-01-29 13:51:32 +00:00
|
|
|
#include <assert.h>
|
|
|
|
#include <stdio.h>
|
2019-02-18 16:37:52 +00:00
|
|
|
#include <stdlib.h>
|
1990-01-29 13:51:32 +00:00
|
|
|
#define LL_assert(x) assert(x)
|
1985-11-25 15:50:51 +00:00
|
|
|
#else
|
|
|
|
#define LL_assert(x) /* nothing */
|
|
|
|
#endif
|
1984-10-08 14:14:53 +00:00
|
|
|
|
|
|
|
extern int LLsymb;
|
1985-11-25 15:50:51 +00:00
|
|
|
|
|
|
|
#define LL_SAFE(x) /* Nothing */
|
1994-10-20 12:43:35 +00:00
|
|
|
#define LL_SSCANDONE(x) if (LLsymb != x) LLsafeerror(x)
|
|
|
|
#define LL_SCANDONE(x) if (LLsymb != x) LLerror(x)
|
1988-06-24 14:55:27 +00:00
|
|
|
#define LL_NOSCANDONE(x) LLscan(x)
|
|
|
|
#ifdef LL_FASTER
|
1994-10-20 12:43:35 +00:00
|
|
|
#define LLscan(x) if ((LLsymb = LL_LEXI()) != x) LLerror(x)
|
1988-06-24 14:55:27 +00:00
|
|
|
#endif
|
1984-10-08 14:14:53 +00:00
|
|
|
|
1985-11-25 15:50:51 +00:00
|
|
|
extern unsigned int LLscnt[];
|
|
|
|
extern unsigned int LLtcnt[];
|
|
|
|
extern int LLcsymb;
|
|
|
|
|
1997-02-21 11:27:57 +00:00
|
|
|
#if LL_NON_CORR
|
|
|
|
extern int LLstartsymb;
|
|
|
|
#endif
|
|
|
|
|
1985-11-25 15:50:51 +00:00
|
|
|
#define LLsdecr(d) {LL_assert(LLscnt[d] > 0); LLscnt[d]--;}
|
|
|
|
#define LLtdecr(d) {LL_assert(LLtcnt[d] > 0); LLtcnt[d]--;}
|
|
|
|
#define LLsincr(d) LLscnt[d]++
|
|
|
|
#define LLtincr(d) LLtcnt[d]++
|
1991-11-26 15:38:41 +00:00
|
|
|
|
|
|
|
extern int LL_LEXI(void);
|
|
|
|
extern void LLread(void);
|
|
|
|
extern int LLskip(void);
|
|
|
|
extern int LLnext(int);
|
|
|
|
extern void LLerror(int);
|
1994-04-19 09:38:00 +00:00
|
|
|
extern void LLsafeerror(int);
|
1991-11-26 15:38:41 +00:00
|
|
|
extern void LLnewlevel(unsigned int *);
|
|
|
|
extern void LLoldlevel(unsigned int *);
|
|
|
|
#ifndef LL_FASTER
|
|
|
|
extern void LLscan(int);
|
|
|
|
#endif
|
|
|
|
#ifndef LLNOFIRSTS
|
|
|
|
extern int LLfirst(int, int);
|
|
|
|
#endif
|
1997-02-21 15:44:10 +00:00
|
|
|
#if LL_NON_CORR
|
|
|
|
extern void LLnc_recover(void);
|
|
|
|
#endif
|