From 25944fc3a8b4e362d690eae4fe086e8834f9e0c2 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 16 Jun 2016 13:40:04 +0800 Subject: update scripts --- scripts2/Makefile.data | 1 + scripts2/templates/pinyin_parser_table.h.in | 8 -------- scripts2/templates/special_table.h.in | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 scripts2/templates/special_table.h.in diff --git a/scripts2/Makefile.data b/scripts2/Makefile.data index edae4d1..c60f429 100644 --- a/scripts2/Makefile.data +++ b/scripts2/Makefile.data @@ -7,6 +7,7 @@ pinyins.txt: update-header: pinyins.txt python3 generateheader.py templates/pinyin_parser_table.h.in > ../src/storage/pinyin_parser_table.h + python3 generateheader.py templates/special_table.h.in > ../src/storage/special_table.h python3 generateheader.py templates/double_pinyin_table.h.in > ../src/storage/double_pinyin_table.h python3 generateheader.py templates/zhuyin_table.h.in > ../src/storage/zhuyin_table.h python3 generateheader.py templates/chewing_enum.h.in > ../src/storage/chewing_enum.h diff --git a/scripts2/templates/pinyin_parser_table.h.in b/scripts2/templates/pinyin_parser_table.h.in index 9c48395..a244a55 100644 --- a/scripts2/templates/pinyin_parser_table.h.in +++ b/scripts2/templates/pinyin_parser_table.h.in @@ -31,14 +31,6 @@ const content_table_item_t content_table[] = { @CONTENT_TABLE@ }; -const divided_table_item_t divided_table[] = { -@DIVIDED_TABLE@ -}; - -const resplit_table_item_t resplit_table[] = { -@RESPLIT_TABLE@ -}; - const gint chewing_key_table[CHEWING_NUMBER_OF_INITIALS * CHEWING_NUMBER_OF_MIDDLES * CHEWING_NUMBER_OF_FINALS] = { diff --git a/scripts2/templates/special_table.h.in b/scripts2/templates/special_table.h.in new file mode 100644 index 0000000..a273b62 --- /dev/null +++ b/scripts2/templates/special_table.h.in @@ -0,0 +1,16 @@ +#ifndef SPECIAL_TABLE_H +#define SPECIAL_TABLE_H + +namespace pinyin{ + +const divided_table_item_t divided_table[] = { +@DIVIDED_TABLE@ +}; + +const resplit_table_item_t resplit_table[] = { +@RESPLIT_TABLE@ +}; + +}; + +#endif -- cgit