mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
Fix core dump reported by Pablo De Napoli in
<http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>. * tests/regression.at (Invalid inputs with {}): New test. * src/parse-gram.y (token_name): Translate type before using it as an index.
This commit is contained in:
@@ -303,6 +303,27 @@ input.y:7.1-8.0: missing `%}' at end of file
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
AT_SETUP([Invalid inputs with {}])
|
||||
|
||||
AT_DATA([input.y],
|
||||
[[
|
||||
%destructor
|
||||
%initial-action
|
||||
%lex-param
|
||||
%parse-param
|
||||
%printer
|
||||
%union
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y], [1], [],
|
||||
[[input.y:3.1: missing `{' in "%destructor {...}"
|
||||
input.y:4.1: missing `{' in "%initial-action {...}"
|
||||
input.y:4.1: syntax error, unexpected %initial-action {...}, expecting string or identifier
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
|
||||
## ------------------- ##
|
||||
## Token definitions. ##
|
||||
|
||||
Reference in New Issue
Block a user