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