Support the following RFC dictionaries

- RFC4603
- RFC4675
- RFC4818
- RFC4849
- RFC5176
- RFC6911
- RFC7055
- RFC7155
This commit is contained in:
moznion
2020-12-06 16:09:03 +09:00
parent bece870914
commit 2b6b80a83e
19 changed files with 518 additions and 10 deletions

View File

@@ -11,13 +11,19 @@ DICTS=$(ls "$DICTS_DIR")
# shellcheck disable=SC2068
for DICT in ${DICTS[@]}; do
DICT_NAME="${DICT##*.}"
cat /dev/null > "${SRC_DIR}/${DICT_NAME}.rs"
DICT_FILE="${DICTS_DIR}/dictionary.${DICT_NAME}"
if [ -f "$DICT_FILE" ]; then
cat /dev/null > "${SRC_DIR}/${DICT_NAME}.rs"
fi
done
# shellcheck disable=SC2068
for DICT in ${DICTS[@]}; do
DICT_NAME="${DICT##*.}"
cargo run --bin code-generator "${DICTS_DIR}/dictionary.${DICT_NAME}" "${SRC_DIR}/${DICT_NAME}.rs"
DICT_FILE="${DICTS_DIR}/dictionary.${DICT_NAME}"
if [ -f "$DICT_FILE" ]; then
cargo run --bin code-generator "$DICT_FILE" "${SRC_DIR}/${DICT_NAME}.rs"
fi
done
cargo fix --allow-dirty --allow-staged