bison: tighten up output file names

Problem reported by Michał Majchrowicz.
* src/parse-gram.y: Do not allow '/' in %header and %output directives.
This commit is contained in:
Paul Eggert
2026-04-23 12:41:25 -07:00
parent 3169c1e7a2
commit 8d101c19d4
5 changed files with 74 additions and 30 deletions
+2
View File
@@ -6026,6 +6026,7 @@ Introduced in Bison 3.8.
@deffn {Directive} %header @var{header-file}
Same as above, but save in the file @file{@var{header-file}}.
The @var{header-file} name should not contain slashes.
@end deffn
@deffn {Directive} %language "@var{language}"
@@ -6079,6 +6080,7 @@ file, treating it as an independent source file in its own right.
@deffn {Directive} %output "@var{file}"
Generate the parser implementation in @file{@var{file}}.
The @var{file} name should not contain slashes.
@end deffn
@deffn {Directive} %pure-parser