Hi. >I'll push these commits to master once the CI validates them >( https://travis-ci.com/akimd/bison/builds/95974577 ). Thanks a lot for this fix. Unfortunately, it seems it is buggy.
I tested it on that code from paste.gg (I attached the code here in case that
paste.gg paste disappears). Command line is same:
flex -o lex.yy.cpp scanner.lpp && bison -do parser.tab.cpp parser.ypp &&
g++ lex.yy.cpp parser.tab.cpp && echo 2 + 2 | ./a.out # Should print 4
And your patches work. But when I type this:
echo 2 + % | ./a.out
I see this:
Invalid character: %
syntax error: unexpected $undefined, expecting NUMBER or '('
But if I replace %skeleton "glr.cc" with %skeleton "lalr1.cc", I see this:
Invalid character: %
So, it seems that now syntax_error support in glr.cc is inconsistent with
lalr1.cc .
==
Askar Safin
http://vk.com/safinaskar
parser.ypp
Description: Binary data
scanner.lpp
Description: Binary data
