From 959d0e9740717d7a83ae992b6781dd89b3529464 Mon Sep 17 00:00:00 2001 From: Kia <kia@special-circumstanc.es> Date: Wed, 4 Nov 2020 21:50:35 -0700 Subject: [PATCH] make it work with %define lr.default-reduction accepting --- bison_xml_file_ingest.py | 2 ++ fun_with_bison/egg.y | 1 + 2 files changed, 3 insertions(+) diff --git a/bison_xml_file_ingest.py b/bison_xml_file_ingest.py index ecbffa0..1daec23 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 380b21b..590edbb 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 -- GitLab