summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-08-13 14:23:18 +0800
committerPeng Wu <alexepico@gmail.com>2013-08-13 14:23:18 +0800
commita695b1bec2b1acba57c4b5851afe36538f093ae7 (patch)
tree276f2184901295ed2a11cae30d7b85709f4d4cb4 /scripts
parentcc03404121c974fff7c718041afc25713687d70c (diff)
downloadlibzhuyin-a695b1bec2b1acba57c4b5851afe36538f093ae7.tar.gz
libzhuyin-a695b1bec2b1acba57c4b5851afe36538f093ae7.tar.xz
libzhuyin-a695b1bec2b1acba57c4b5851afe36538f093ae7.zip
update genpinyinheader.py
Diffstat (limited to 'scripts')
-rw-r--r--scripts/genpinyinheader.py9
-rw-r--r--scripts/pinyin_parser_table.h.in14
2 files changed, 18 insertions, 5 deletions
diff --git a/scripts/genpinyinheader.py b/scripts/genpinyinheader.py
index 8d6ec64..9582a1c 100644
--- a/scripts/genpinyinheader.py
+++ b/scripts/genpinyinheader.py
@@ -22,16 +22,21 @@
from utils import expand_file
from genpinyintable import gen_content_table, \
- gen_hanyu_pinyin_index, gen_bopomofo_index, \
+ gen_hanyu_pinyin_index, gen_luoma_pinyin_index, \
+ gen_bopomofo_index, gen_second_bopomofo_index, \
gen_chewing_key_table
def get_table_content(tablename):
if tablename == 'CONTENT_TABLE':
return gen_content_table()
- if tablename == 'PINYIN_INDEX':
+ if tablename == 'HANYU_PINYIN_INDEX':
return gen_hanyu_pinyin_index()
+ if tablename == 'LUOMA_PINYIN_INDEX':
+ return gen_luoma_pinyin_index()
if tablename == 'BOPOMOFO_INDEX':
return gen_bopomofo_index()
+ if tablename == 'SECOND_BOPOMOFO_INDEX':
+ return gen_second_bopomofo_index()
if tablename == 'DIVIDED_TABLE':
return ''
if tablename == 'RESPLIT_TABLE':
diff --git a/scripts/pinyin_parser_table.h.in b/scripts/pinyin_parser_table.h.in
index 6b977b8..2954b0b 100644
--- a/scripts/pinyin_parser_table.h.in
+++ b/scripts/pinyin_parser_table.h.in
@@ -3,14 +3,22 @@
namespace pinyin{
-const pinyin_index_item_t pinyin_index[] = {
-@PINYIN_INDEX@
+const pinyin_index_item_t hanyu_pinyin_index[] = {
+@HANYU_PINYIN_INDEX@
};
-const chewing_index_item_t chewing_index[] = {
+const pinyin_index_item_t luoma_pinyin_index[] = {
+@LUOMA_PINYIN_INDEX@
+};
+
+const chewing_index_item_t bopomofo_index[] = {
@BOPOMOFO_INDEX@
};
+const pinyin_index_item_t second_bopomofo_index[] = {
+@SECOND_BOPOMOFO_INDEX@
+};
+
const content_table_item_t content_table[] = {
@CONTENT_TABLE@
};