incl 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* $Id$ */
  2. #ifdef LL_DEBUG
  3. #include <assert.h>
  4. #include <stdio.h>
  5. #define LL_assert(x) assert(x)
  6. #else
  7. #define LL_assert(x) /* nothing */
  8. #endif
  9. extern int LLsymb;
  10. #define LL_SAFE(x) /* Nothing */
  11. #define LL_SSCANDONE(x) if (LLsymb != x) LLsafeerror(x)
  12. #define LL_SCANDONE(x) if (LLsymb != x) LLerror(x)
  13. #define LL_NOSCANDONE(x) LLscan(x)
  14. #ifdef LL_FASTER
  15. #define LLscan(x) if ((LLsymb = LL_LEXI()) != x) LLerror(x)
  16. #endif
  17. extern unsigned int LLscnt[];
  18. extern unsigned int LLtcnt[];
  19. extern int LLcsymb;
  20. #if LL_NON_CORR
  21. extern int LLstartsymb;
  22. #endif
  23. #define LLsdecr(d) {LL_assert(LLscnt[d] > 0); LLscnt[d]--;}
  24. #define LLtdecr(d) {LL_assert(LLtcnt[d] > 0); LLtcnt[d]--;}
  25. #define LLsincr(d) LLscnt[d]++
  26. #define LLtincr(d) LLtcnt[d]++
  27. #if LL_ANSI_C
  28. extern int LL_LEXI(void);
  29. extern void LLread(void);
  30. extern int LLskip(void);
  31. extern int LLnext(int);
  32. extern void LLerror(int);
  33. extern void LLsafeerror(int);
  34. extern void LLnewlevel(unsigned int *);
  35. extern void LLoldlevel(unsigned int *);
  36. #ifndef LL_FASTER
  37. extern void LLscan(int);
  38. #endif
  39. #ifndef LLNOFIRSTS
  40. extern int LLfirst(int, int);
  41. #endif
  42. #if LL_NON_CORR
  43. extern void LLnc_recover(void);
  44. #endif
  45. #else /* not LL_ANSI_C */
  46. extern LLread();
  47. extern int LLskip();
  48. extern int LLnext();
  49. extern LLerror();
  50. extern LLsafeerror();
  51. extern LLnewlevel();
  52. extern LLoldlevel();
  53. #ifndef LL_FASTER
  54. extern LLscan();
  55. #endif
  56. #ifndef LLNOFIRSTS
  57. extern int LLfirst();
  58. #endif
  59. #if LL_NON_CORR
  60. extern LLnc_recover();
  61. #endif
  62. #endif /* not LL_ANSI_C */