/*
file: fsmclass.txt
Why: example of text to parse by fsm's class construct.
*/
fsm-class Crule_lhs_phrase{
  user-prefix-declaration
    using namespace NS_yacco2_terminals;
#include "lint_balls.h"
  ***
  user-declaration
    public:
    void add_sdc_to_directive(yacco2::CAbs_lr1_sym* Dir,T_syntax_code* Sdc);
    T_rule_lhs_phrase* rule_lhs_phrase_;
  ***
  user-implementation
    void Crule_lhs_phrase::
    add_sdc_to_directive(yacco2::CAbs_lr1_sym* Dir,T_syntax_code* Sdc){
      using namespace NS_yacco2_T_enum;
      using namespace NS_yacco2_terminals;
      yacco2::INT eid = Dir->enumerated_id();
      switch (eid){
		case T_Enum::T_T_user_implementation_: {
		  T_user_implementation* k = (T_user_implementation*)Dir;
		  k->syntax_code(Sdc);
		  break;
		}      
		default: {
          CAbs_lr1_sym* sym = new LR1_err_improper_directive;
          sym->set_rc(*Dir,*parser());
          RSVP_FSM(sym);
          parser()->set_stop_parse(true);
   		}      
      }    
    }
  ***
  op
    rule_lhs_phrase_ = new T_rule_lhs_phrase;
    rule_lhs_phrase_->set_rc(*parser()->start_token(),*parser());
    AST* t = new AST(*rule_lhs_phrase_);
    rule_lhs_phrase_->phrase_tree(t);
  ***
  constructor
    rule_lhs_phrase_ = 0;
  ***
}
