mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-03 07:25:18 +00:00
[#745] extract_bnf now always use English
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
# ./extract_bnf.sh <bison-file-base-name> --markdown
|
# ./extract_bnf.sh <bison-file-base-name> --markdown
|
||||||
|
|
||||||
# Check if there are one or two arguments
|
# 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>]"
|
echo "extract_bnf.sh <bison-file-base-name> [--markdown <name>]"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -35,10 +35,12 @@ now=$(date +"%Y-%m-%-d %H:%m")
|
|||||||
|
|
||||||
header="Grammar generated on $now. See Chapter $md_name for an explanation."
|
header="Grammar generated on $now. See Chapter $md_name for an explanation."
|
||||||
|
|
||||||
if [ -f "${base}.output" ]; then
|
if [ -f "${base}.yy" ]; then
|
||||||
output="${base}.output"
|
# We want to explicitly set the language to English. Otherwise
|
||||||
elif [ -f "${base}.yy" ]; then
|
# bison may produce language specific wording (like "symbole terminalne"
|
||||||
/usr/bin/bison -v "${base}.yy" -o output
|
# 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
|
rm -f output output.h *.hh
|
||||||
mv output.output /tmp/output
|
mv output.output /tmp/output
|
||||||
output=/tmp/output
|
output=/tmp/output
|
||||||
|
Reference in New Issue
Block a user