diff --git a/bison_xml_file_ingest.py b/bison_xml_file_ingest.py index ecbffa08932cfbcb99bee83fc8db4177190a0e73..1daec23fad7e92bb17fab0bbd5fd04bb3635c902 100644 --- a/bison_xml_file_ingest.py +++ b/bison_xml_file_ingest.py @@ -101,6 +101,8 @@ for child in root.findall("./automaton/*"): for x in child.findall("actions/reductions/reduction"): symbol = x.attrib["symbol"] + if (symbol != "$default"): + symbol = symbol_to_integer(symbol) rule = x.attrib["rule"] if (rule == "accept"): rule = acceptrule_number diff --git a/fun_with_bison/egg.y b/fun_with_bison/egg.y index 380b21b6237dd8e5fea45db75dd2397fda80dfe6..590edbb193995543a4fbdfd0f39cba6749223717 100644 --- a/fun_with_bison/egg.y +++ b/fun_with_bison/egg.y @@ -4,6 +4,7 @@ %} %define lr.type ielr +%define lr.default-reduction accepting /* BISON Declarations */ %token INTEGER