Accidentally checked this file in...removing it now.
[repair.git] / Repair / RepairCompiler / java_cup / action_production.java
1
2 package java_cup;
3
4 /** A specialized version of a production used when we split an existing
5  *  production in order to remove an embedded action.  Here we keep a bit 
6  *  of extra bookkeeping so that we know where we came from.
7  * @version last updated: 11/25/95
8  * @author  Scott Hudson
9  */
10
11 public class action_production extends production {
12
13   /** Constructor.
14    * @param base       the production we are being factored out of.
15    * @param lhs_sym    the LHS symbol for this production.
16    * @param rhs_parts  array of production parts for the RHS.
17    * @param rhs_len    how much of the rhs_parts array is valid.
18    * @param action_str the trailing reduce action for this production.
19    */ 
20   public action_production(
21     production      base,
22     non_terminal    lhs_sym, 
23     production_part rhs_parts[],
24     int             rhs_len,
25     String          action_str)
26     throws internal_error
27     {
28       super(lhs_sym, rhs_parts, rhs_len, action_str);
29       _base_production = base;
30     }
31
32   /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
33
34   /** The production we were taken out of. */
35   protected production _base_production;
36
37   /** The production we were taken out of. */
38   public production base_production() {return _base_production;}
39 }