add regression test for unhandled charset left-hand-side case in LALR compile
This commit is contained in:
parent
e01d10f0ab
commit
31c460780f
1 changed files with 14 additions and 0 deletions
|
|
@ -118,9 +118,23 @@ static void test_llk_zero_end(void) {
|
|||
g_check_parse_failed(aze, be, "a", 1);
|
||||
}
|
||||
|
||||
static void test_lalr_charset_lhs(void) {
|
||||
HParserBackend be = PB_LALR;
|
||||
|
||||
HParser *p = h_choice(h_ch('A'), h_uint8(), NULL);
|
||||
|
||||
// the above would fail to compile because of an unhandled case in trying
|
||||
// to resolve a conflict where an item's left-hand-side was an HCF_CHARSET.
|
||||
|
||||
g_check_parse_match(p, be, "A",1, "u0x41");
|
||||
g_check_parse_match(p, be, "B",1, "u0x42");
|
||||
}
|
||||
|
||||
void register_regression_tests(void) {
|
||||
g_test_add_func("/core/regression/bug118", test_bug118);
|
||||
g_test_add_func("/core/regression/seq_index_path", test_seq_index_path);
|
||||
g_test_add_func("/core/regression/read_bits_48", test_read_bits_48);
|
||||
g_test_add_func("/core/regression/llk_zero_end", test_llk_zero_end);
|
||||
g_test_add_func("/core/regression/lalr_charset_lhs", test_lalr_charset_lhs);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue