From 0871d6afb086777f1c0f7908152bac74bf763fe1 Mon Sep 17 00:00:00 2001 From: Kia <kia@special-circumstanc.es> Date: Sat, 12 Dec 2020 22:02:51 -0700 Subject: [PATCH] reverse_precedence_fig_5.y --- fun_with_bison/reverse_precedence_fig_5.y | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 fun_with_bison/reverse_precedence_fig_5.y diff --git a/fun_with_bison/reverse_precedence_fig_5.y b/fun_with_bison/reverse_precedence_fig_5.y new file mode 100644 index 0000000..3108778 --- /dev/null +++ b/fun_with_bison/reverse_precedence_fig_5.y @@ -0,0 +1,34 @@ +%define lr.type ielr +%define lr.default-reduction accepting + +/* BISON Declarations */ +%token small_c +%token small_b +%token foo +%token bar + +%precedence BAKA +%precedence small_a + + +/* Grammar follows */ +%% + + +big_s: small_a big_a big_b small_a + | small_b big_a big_b small_b + +big_a: small_a big_c big_d big_e + +big_b: small_c + | foo + +big_c: big_d + +big_d: small_a + +big_e: small_a +big_e: bar %prec BAKA + + +%% \ No newline at end of file -- GitLab