summaryrefslogtreecommitdiff
path: root/web/yacco2/qa/lr1_pa1.cpp
blob: 5e2463fa33226d2fda51a92584314fb2a3f77676 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*
 File: lr1_pa1.cpp
 Date and Time: Mon Oct 13 18:18:14 2014 
*/
#include "lr1_pa1.h"
using namespace NS_yacco2_T_enum;// enumerate
using namespace NS_yacco2_err_symbols;// error symbols
using namespace NS_yacco2_k_symbols;// lrk 
using namespace NS_yacco2_terminals;// terminals
using namespace NS_yacco2_characters;// rc 
using namespace yacco2;// yacco2 library
using namespace NS_lr1_pa1;// grammar's ns
// first set terminals
fsm_rules_reuse_table_type::fsm_rules_reuse_table_type(){
 no_rules_entries_ = 7;
 per_rule_s_table_[0] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[1] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[2] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[3] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[4] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[5] =  new Per_rule_s_reuse_table();
 per_rule_s_table_[6] =  new Per_rule_s_reuse_table();
}
  Clr1_pa1_rul_fsm::
  Clr1_pa1_rul_fsm()
    :yacco2::CAbs_fsm
      ("lr1_pa1.lex"
      ,"1.0"
      ,"8-oct-96"
      ,true
      ,"test out lr1"
      ,"Mon Oct 13 18:18:14 2014 "
      ,S1_Clr1_pa1_rul_fsm){
    
  }
 
Clr1_pa1_rul_fsm::~Clr1_pa1_rul_fsm(){

  for(int x = 0;x < 7;++x){
   ///delete fsm_rules_reuse_table.per_rule_s_table_[x];
  }
} 

  bool Clr1_pa1_rul_fsm::failed(){
      return false;
  }
  void Clr1_pa1_rul_fsm::op(){
}
int Clr1_pa1_rul_fsm::rhs_to_rules_mapping_[14] = {
 -1
 ,0 // subrule 1 for rule 1
 ,1 // subrule 2 for rule 2
 ,1 // subrule 3 for rule 2
 ,1 // subrule 4 for rule 2
 ,1 // subrule 5 for rule 2
 ,1 // subrule 6 for rule 2
 ,1 // subrule 7 for rule 2
 ,2 // subrule 8 for rule 3
 ,2 // subrule 9 for rule 3
 ,3 // subrule 10 for rule 4
 ,4 // subrule 11 for rule 5
 ,5 // subrule 12 for rule 6
 ,6 // subrule 13 for rule 7
}; 
Rlr1_pa1::Rlr1_pa1(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rlr1_pa1",0,Clr1_pa1_rul_fsm::R_Rlr1_pa1_,P,false,false){
}

RX::RX(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RX",0,Clr1_pa1_rul_fsm::R_RX_,P,false,false){
}

RY::RY(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RY",0,Clr1_pa1_rul_fsm::R_RY_,P,false,false){
}

RZ::RZ(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RZ",0,Clr1_pa1_rul_fsm::R_RZ_,P,false,false){
}

RT::RT(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RT",0,Clr1_pa1_rul_fsm::R_RT_,P,false,false){
}

RW::RW(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RW",0,Clr1_pa1_rul_fsm::R_RW_,P,false,false){
}

RV::RV(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RV",0,Clr1_pa1_rul_fsm::R_RV_,P,false,false){
}