1 // $Id: javaprs.h,v 1.30 2004/03/05 13:12:25 ericb Exp $
2 // DO NOT MODIFY THIS FILE - it is generated using jikespg on java.g.
3 //
4 // This software is subject to the terms of the IBM Jikes Compiler Open
5 // Source License Agreement available at the following URL:
6 // http://ibm.com/developerworks/opensource/jikes.
7 // Copyright (C) 1996, 2003 IBM Corporation and others.  All Rights Reserved.
8 // You must accept the terms of that agreement to use this software.
9 //
10 
11 #ifndef javaprs_INCLUDED
12 #define javaprs_INCLUDED
13 
14 #ifdef HAVE_JIKES_NAMESPACE
15 namespace Jikes { // Open namespace Jikes block
16 #endif
17 
18 #define SCOPE_REPAIR
19 #define DEFERRED_RECOVERY
20 #define FULL_DIAGNOSIS
21 #define SPACE_TABLES
22 
23 class LexStream;
24 
25 class javaprs_table
26 {
27     int dummy; /* Prevents empty class from causing compile error. */
28 public:
original_state(int state)29     static int original_state(int state) { return -base_check[state]; }
asi(int state)30     static int asi(int state) { return asb[original_state(state)]; }
nasi(int state)31     static int nasi(int state) { return nasb[original_state(state)]; }
in_symbol(int state)32     static int in_symbol(int state) { return in_symb[original_state(state)]; }
33 
34     static const unsigned char  rhs[];
35     static const   signed short check_table[];
36     static const   signed short *base_check;
37     static const unsigned short lhs[];
38     static const unsigned short *base_action;
39     static const unsigned char  term_check[];
40     static const unsigned short term_action[];
41 
42     static const unsigned short asb[];
43     static const unsigned char  asr[];
44     static const unsigned short nasb[];
45     static const unsigned short nasr[];
46     static const unsigned short name_start[];
47     static const unsigned char  name_length[];
48     static const          char  string_buffer[];
49     static const unsigned short terminal_index[];
50     static const unsigned short non_terminal_index[];
51     static const unsigned short scope_prefix[];
52     static const unsigned short scope_suffix[];
53     static const unsigned short scope_lhs[];
54     static const unsigned char  scope_la[];
55     static const unsigned short scope_state_set[];
56     static const unsigned short scope_rhs[];
57     static const unsigned short scope_state[];
58     static const unsigned short in_symb[];
59 
nt_action(int state,int sym)60     static int nt_action(int state, int sym)
61     {
62         return base_action[state + sym];
63     }
64 
t_action(int state,int sym,LexStream *)65     static int t_action(int state, int sym, LexStream *)
66     {
67         return term_action[term_check[base_action[state]+sym] == sym
68                                ? base_action[state] + sym
69                                : base_action[state]];
70     }
71 };
72 
73 #ifdef HAVE_JIKES_NAMESPACE
74 } // Close namespace Jikes block
75 #endif
76 
77 #endif /* javaprs_INCLUDED */
78