2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 14:05:33 +00:00

[#745] extract_bnf now always use English

This commit is contained in:
Tomek Mrugalski
2021-06-23 12:40:48 +02:00
parent c7a4c0f3dd
commit d810d7344d

View File

@@ -17,7 +17,7 @@
# ./extract_bnf.sh <bison-file-base-name> --markdown
# Check if there are one or two arguments
if [ $# -le 1 ]; then
if [ $# -lt 1 ]; then
echo "extract_bnf.sh <bison-file-base-name> [--markdown <name>]"
exit 1
fi
@@ -35,10 +35,12 @@ now=$(date +"%Y-%m-%-d %H:%m")
header="Grammar generated on $now. See Chapter $md_name for an explanation."
if [ -f "${base}.output" ]; then
output="${base}.output"
elif [ -f "${base}.yy" ]; then
/usr/bin/bison -v "${base}.yy" -o output
if [ -f "${base}.yy" ]; then
# We want to explicitly set the language to English. Otherwise
# bison may produce language specific wording (like "symbole terminalne"
# if you system is set to Polish, rather than "Terminals") and this will
# confuse our script.
LANG=en_US LANGUAGE=en_US @YACC@ -v "${base}.yy" -o output
rm -f output output.h *.hh
mv output.output /tmp/output
output=/tmp/output