home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / jikepg12.zip / jikespg / src / lpgprs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-11-04  |  1.2 KB  |  38 lines

  1. /* $Id: lpgprs.h,v 1.2 1999/11/04 14:02:22 shields Exp $ */
  2. /*
  3.  This software is subject to the terms of the IBM Jikes Compiler
  4.  License Agreement available at the following URL:
  5.  http://www.ibm.com/research/jikes.
  6.  Copyright (C) 1983, 1999, International Business Machines Corporation
  7.  and others.  All Rights Reserved.
  8.  You must accept the terms of that agreement to use this software.
  9. */
  10. #ifndef lpgprs_INCLUDED
  11. #define lpgprs_INCLUDED
  12.  
  13.  
  14. #undef  SCOPE_REPAIR
  15. #undef  DEFERRED_RECOVERY
  16. #undef  FULL_DIAGNOSIS
  17. #define SPACE_TABLES
  18.  
  19. #define original_state(state) (-base_check[state])
  20. #define asi(state)            asb[original_state(state)]
  21. #define nasi(state)           nasb[original_state(state)]
  22. #define in_symbol(state)      in_symb[original_state(state)]
  23.  
  24. extern const unsigned char  rhs[];
  25. extern const unsigned short lhs[];
  26. extern const unsigned short *base_action;
  27. extern const unsigned char  term_check[];
  28. extern const unsigned short term_action[];
  29.  
  30. #define nt_action(state, sym) base_action[state + sym]
  31.  
  32. #define t_action(state, sym, next_tok) \
  33.   term_action[term_check[base_action[state]+sym] == sym ? \
  34.           base_action[state] + sym : base_action[state]]
  35.  
  36.  
  37. #endif /* lpgprs_INCLUDED */
  38.