mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
bistromathic: don't display undefined locations
Currently, completion when there is a syntax error shows broken locations. * examples/c/bistromathic/parse.y (expected_tokens): Initialize the location. * examples/c/bistromathic/bistromathic.test: Check that.
This commit is contained in:
@@ -447,7 +447,7 @@ expected_tokens (const char *input,
|
||||
yypstate *ps = yypstate_new ();
|
||||
int status = 0;
|
||||
do {
|
||||
YYLTYPE lloc;
|
||||
YYLTYPE lloc = { 1, 1, 1, 1 };
|
||||
YYSTYPE lval;
|
||||
int token = yylex (&input, &lval, &lloc);
|
||||
// Don't let the parse know when we reach the end of input.
|
||||
|
||||
Reference in New Issue
Block a user