hi Felix, > Le 6 avr. 2020 à 14:52, Felix Nieuwenhuizen <fe...@tdlrali.com> a écrit : > > Hi all, > > I have some testcases that test basic lexing.
Yes, this is a pattern I not anticipated (the API was not public), and that I broke. Sorry about that. It has been reported several times, with workarounds, here: https://lists.gnu.org/r/bug-bison/2020-01/msg00001.html I am well aware of the problem and I'm working right now on something that should address you concern: I'm providing a public interface to check the symbol kind, i.e., the internal numbers. So your test cases will be able to check that the tokens are correct, but without having to pay for the conversion and for the table that is associated. That's something I announced in the aforementioned thread here: https://lists.gnu.org/r/bug-bison/2020-03/msg00020.html but there was no answer. This will be part of Bison 3.6, and it's well advanced. But I'm eager to get feedback about it. It will look like this: for (auto id : ids) { auto symbol = lexer->yylex(*driver); ASSERT_EQ(symbol.kind_get(), YYSYMBOL_BASIC_IDENTIFIER); ASSERT_EQ(symbol.value.as<std::string>(), id); } WDYT?