summaryrefslogtreecommitdiff
path: root/web/yacco2/qa/lr1_sp3.cpp
blob: 2cc16fbce6605b5a3a13f8fa4e52e3df4bd4759b (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
/*
 File: lr1_sp3.cpp
 Date and Time: Mon Oct 13 18:18:13 2014 
*/
#include "lr1_sp3.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_sp3;// grammar's ns
// first set terminals
fsm_rules_reuse_table_type::fsm_rules_reuse_table_type(){
 no_rules_entries_ = 4;
 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();
}
  Clr1_sp3::
  Clr1_sp3()
    :yacco2::CAbs_fsm
      ("lr1_sp3.lex"
      ,"1.0"
      ,"27-jun-99"
      ,true
      ,"test out lr1 --- D Spector Vol 23 No 12 Dec/88"
      ,"Mon Oct 13 18:18:13 2014 "
      ,S1_Clr1_sp3){
    
  }
 
Clr1_sp3::~Clr1_sp3(){

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

  bool Clr1_sp3::failed(){
      return false;
  }
  void Clr1_sp3::op(){
}
int Clr1_sp3::rhs_to_rules_mapping_[8] = {
 -1
 ,0 // subrule 1 for rule 1
 ,1 // subrule 2 for rule 2
 ,1 // subrule 3 for rule 2
 ,2 // subrule 4 for rule 3
 ,2 // subrule 5 for rule 3
 ,3 // subrule 6 for rule 4
 ,3 // subrule 7 for rule 4
}; 
Rlr1_sp3::Rlr1_sp3(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("Rlr1_sp3",0,Clr1_sp3::R_Rlr1_sp3_,P,false,false){
}

RS::RS(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RS",0,Clr1_sp3::R_RS_,P,false,false){
}

RA::RA(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RA",0,Clr1_sp3::R_RA_,P,false,false){
}

RB::RB(yacco2::Parser* P)
 :CAbs_lr1_sym
  ("RB",0,Clr1_sp3::R_RB_,P,false,false){
}