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>
|
|
|
|
#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;
|
|
|
|
|
|
|
|
#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
|
|
|
|
|
|
|
#if LL_ANSI_C
|
|
|
|
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
|
|
|
|
#else /* not LL_ANSI_C */
|
|
|
|
extern LLread();
|
|
|
|
extern int LLskip();
|
|
|
|
extern int LLnext();
|
|
|
|
extern LLerror();
|
1994-04-19 09:38:00 +00:00
|
|
|
extern LLsafeerror();
|
1991-11-26 15:38:41 +00:00
|
|
|
extern LLnewlevel();
|
|
|
|
extern LLoldlevel();
|
|
|
|
#ifndef LL_FASTER
|
|
|
|
extern LLscan();
|
|
|
|
#endif
|
|
|
|
#ifndef LLNOFIRSTS
|
|
|
|
extern int LLfirst();
|
|
|
|
#endif
|
|
|
|
#endif /* not LL_ANSI_C */
|