From 6b865a2637828cb6c73b738400b75411f17b30c9 Mon Sep 17 00:00:00 2001 From: "Sven M. Hallberg" <pesco@khjk.org> Date: Thu, 13 Feb 2020 10:11:07 +0100 Subject: [PATCH] match coding style --- src/t_regression.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/t_regression.c b/src/t_regression.c index e60ef02..7791998 100644 --- a/src/t_regression.c +++ b/src/t_regression.c @@ -385,24 +385,24 @@ static void test_issue91() { } static void test_issue92() { - H_RULE(a, h_ch('a')); - H_RULE(b, h_ch('b')); - - H_RULE(str_a, h_indirect()); - H_RULE(str_b, h_choice(h_sequence(b, str_a, NULL), str_a, NULL)); - // h_sequence(h_optional(b), str_a, NULL) works - H_RULE(str_a_, h_optional(h_sequence(a, str_b, NULL))); - h_bind_indirect(str_a, str_a_); - - /* - * the following call would cause an assertion failure. - * - * assertion "!h_stringmap_empty(fs)" failed: file - * "src/backends/lalr.c", line 341, function "h_lalr_compile" - */ - - int r = h_compile(str_a, PB_LALR, NULL); - g_check_cmp_int(r, ==, 0); + HParser *a = h_ch('a'); + HParser *b = h_ch('b'); + + HParser *str_a = h_indirect(); + HParser *str_b = h_choice(h_sequence(b, str_a, NULL), str_a, NULL); + // h_sequence(h_optional(b), str_a, NULL); // this works + HParser *str_a_ = h_optional(h_sequence(a, str_b, NULL)); + HParser *str = str_a;//h_sequence(str_a, NULL); + h_bind_indirect(str_a, str_a_); + + /* + * the following call would cause an assertion failure. + * + * assertion "!h_stringmap_empty(fs)" failed: file + * "src/backends/lalr.c", line 341, function "h_lalr_compile" + */ + int r = h_compile(str, PB_LALR, NULL); + g_check_cmp_int(r, ==, 0); } void register_regression_tests(void) { -- GitLab