summaryrefslogtreecommitdiffstats
path: root/src/storage/pinyin_parser2.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/storage/pinyin_parser2.h')
-rw-r--r--src/storage/pinyin_parser2.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/storage/pinyin_parser2.h b/src/storage/pinyin_parser2.h
index 472ba5e..1cc6e2c 100644
--- a/src/storage/pinyin_parser2.h
+++ b/src/storage/pinyin_parser2.h
@@ -220,6 +220,23 @@ public:
bool in_chewing_scheme(pinyin_option_t options, const char key, const char ** symbol) const;
};
+
+/* Direct Parser for Chewing table load. */
+class ChewingDirectParser2 : public PhoneticParser2
+{
+ const chewing_index_item_t * m_chewing_index;
+ size_t m_chewing_index_len;
+
+public:
+ ChewingDirectParser2();
+
+ virtual ~ChewingDirectParser2() {}
+
+ virtual bool parse_one_key(pinyin_option_t options, ChewingKey & key, const char *str, int len) const;
+
+ virtual int parse(pinyin_option_t options, ChewingKeyVector & keys, ChewingKeyRestVector & key_rests, const char *str, int len) const;
+};
+
/* compare pinyins with chewing internal representations. */
inline int pinyin_compare_initial2(pinyin_option_t options,
ChewingInitial lhs,