mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
xml: beware of user strings used to give a %prec to rules.
* tests/conflicts.at (%prec with user strings): New. * src/gram.c (grammar_rules_print_xml): Escape the precedence for XML output.
This commit is contained in:
@@ -600,9 +600,26 @@ input.y: expected 0 reduce/reduce conflicts
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
## ------------------------------- ##
|
||||
## %no-default-prec without %prec ##
|
||||
## ------------------------------- ##
|
||||
## ------------------------- ##
|
||||
## %prec with user strings. ##
|
||||
## ------------------------- ##
|
||||
|
||||
AT_SETUP([%prec with user string])
|
||||
|
||||
AT_DATA([[input.y]],
|
||||
[[%%
|
||||
exp:
|
||||
"foo" %prec "foo"
|
||||
;
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([-o input.c input.y])
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
## -------------------------------- ##
|
||||
## %no-default-prec without %prec. ##
|
||||
## -------------------------------- ##
|
||||
|
||||
AT_SETUP([%no-default-prec without %prec])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user