Test voor shift reduce error
This commit is contained in:
parent
649cb8eeb1
commit
636eb26a38
|
@ -18,7 +18,7 @@ TEST(lr0, test0) {
|
|||
grammar.variables = {"S'","S","A","E"};
|
||||
grammar.terminals = {"$",";", "id", ":=", "+"};
|
||||
|
||||
pds::rule rule;
|
||||
pds::Rule rule;
|
||||
rule.head = "S'";
|
||||
rule.tail = {"S","$"};
|
||||
grammar.rules.push_back(rule);
|
||||
|
@ -110,9 +110,9 @@ TEST(lr0, test0) {
|
|||
|
||||
std::vector<std::map<std::string, std::size_t>> goto_ = {
|
||||
{ {"S",1}, {"A",2}, {"E",3} }, /*state_num:1*/
|
||||
{ {"A",8}, {"E",3} }, /*state_num:5*/
|
||||
{ {"E",10} }, /*state_num:7*/
|
||||
};
|
||||
// { {"A",8}, {"E",3} }, /*state_num:5*/
|
||||
// { {"E",10} }, /*state_num:7*/
|
||||
// };
|
||||
|
||||
// Action: enum {ERROR,SHIFT,REDUCE,ACCEPT}
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue