#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <algorithm>
#include <limits>
#include <string>
#include <vector>
#include "affixmgr.hxx"
#include "affentry.hxx"
#include "langnum.hxx"
#include "csutil.hxx"
#ifdef HUNSPELL_CHROME_CLIENT
AffixMgr::AffixMgr(hunspell::BDictReader* reader,
const std::vector<HashMgr*>& ptr)
: … { … }
AffixMgr::~AffixMgr() { … }
void AffixMgr::finishFileMgr(FileMgr* afflst) { … }
int AffixMgr::parse_file(const char* affpath, const char* key) { … }
int AffixMgr::build_pfxtree(PfxEntry* pfxptr) { … }
int AffixMgr::build_sfxtree(SfxEntry* sfxptr) { … }
int AffixMgr::process_pfx_tree_to_list() { … }
PfxEntry* AffixMgr::process_pfx_in_order(PfxEntry* ptr, PfxEntry* nptr) { … }
int AffixMgr::process_sfx_tree_to_list() { … }
SfxEntry* AffixMgr::process_sfx_in_order(SfxEntry* ptr, SfxEntry* nptr) { … }
int AffixMgr::process_pfx_order() { … }
int AffixMgr::process_sfx_order() { … }
std::string& AffixMgr::debugflag(std::string& result, unsigned short flag) { … }
int AffixMgr::condlen(const char* st) { … }
int AffixMgr::encodeit(AffEntry& entry, const char* cs) { … }
inline int AffixMgr::isSubset(const char* s1, const char* s2) { … }
struct hentry* AffixMgr::prefix_check(const char* word,
int len,
char in_compound,
const FLAG needflag) { … }
struct hentry* AffixMgr::prefix_check_twosfx(const char* word,
int len,
char in_compound,
const FLAG needflag) { … }
std::string AffixMgr::prefix_check_morph(const char* word,
int len,
char in_compound,
const FLAG needflag) { … }
std::string AffixMgr::prefix_check_twosfx_morph(const char* word,
int len,
char in_compound,
const FLAG needflag) { … }
int AffixMgr::cpdrep_check(const char* word, int wl) { … }
int AffixMgr::cpdpat_check(const char* word,
int pos,
hentry* r1,
hentry* r2,
const char ) { … }
int AffixMgr::cpdcase_check(const char* word, int pos) { … }
struct metachar_data { … };
int AffixMgr::defcpd_check(hentry*** words,
short wnum,
hentry* rv,
hentry** def,
char all) { … }
inline int AffixMgr::candidate_check(const char* word, int len) { … }
short AffixMgr::get_syllable(const std::string& word) { … }
void AffixMgr::setcminmax(int* cmin, int* cmax, const char* word, int len) { … }
struct hentry* AffixMgr::compound_check(const std::string& word,
short wordnum,
short numsyllable,
short maxwordnum,
short wnum,
hentry** words = NULL,
hentry** rwords = NULL,
char hu_mov_rule = 0,
char is_sug = 0,
int* info = NULL) { … }
int AffixMgr::compound_check_morph(const char* word,
int len,
short wordnum,
short numsyllable,
short maxwordnum,
short wnum,
hentry** words,
hentry** rwords,
char hu_mov_rule,
std::string& result,
const std::string* partresult) { … }
inline int AffixMgr::isRevSubset(const char* s1,
const char* end_of_s2,
int len) { … }
struct hentry* AffixMgr::suffix_check(const char* word,
int len,
int sfxopts,
PfxEntry* ppfx,
const FLAG cclass,
const FLAG needflag,
char in_compound) { … }
struct hentry* AffixMgr::suffix_check_twosfx(const char* word,
int len,
int sfxopts,
PfxEntry* ppfx,
const FLAG needflag) { … }
std::string AffixMgr::suffix_check_twosfx_morph(const char* word,
int len,
int sfxopts,
PfxEntry* ppfx,
const FLAG needflag) { … }
std::string AffixMgr::suffix_check_morph(const char* word,
int len,
int sfxopts,
PfxEntry* ppfx,
const FLAG cclass,
const FLAG needflag,
char in_compound) { … }
struct hentry* AffixMgr::affix_check(const char* word,
int len,
const FLAG needflag,
char in_compound) { … }
std::string AffixMgr::affix_check_morph(const char* word,
int len,
const FLAG needflag,
char in_compound) { … }
static int morphcmp(const char* s, const char* t) { … }
std::string AffixMgr::morphgen(const char* ts,
int wl,
const unsigned short* ap,
unsigned short al,
const char* morph,
const char* targetmorph,
int level) { … }
int AffixMgr::expand_rootword(struct guessword* wlst,
int maxn,
const char* ts,
int wl,
const unsigned short* ap,
unsigned short al,
const char* bad,
int badl,
const char* phon) { … }
const std::vector<replentry>& AffixMgr::get_reptable() const { … }
RepList* AffixMgr::get_iconvtable() const { … }
RepList* AffixMgr::get_oconvtable() const { … }
struct phonetable* AffixMgr::get_phonetable() const { … }
const std::vector<mapentry>& AffixMgr::get_maptable() const { … }
const std::vector<std::string>& AffixMgr::get_breaktable() const { … }
const std::string& AffixMgr::get_encoding() { … }
int AffixMgr::get_langnum() const { … }
int AffixMgr::get_complexprefixes() const { … }
int AffixMgr::get_fullstrip() const { … }
FLAG AffixMgr::get_keepcase() const { … }
FLAG AffixMgr::get_forceucase() const { … }
FLAG AffixMgr::get_warn() const { … }
int AffixMgr::get_forbidwarn() const { … }
int AffixMgr::get_checksharps() const { … }
char* AffixMgr::encode_flag(unsigned short aflag) const { … }
const char* AffixMgr::get_ignore() const { … }
const std::vector<w_char>& AffixMgr::get_ignore_utf16() const { … }
char* AffixMgr::get_key_string() { … }
char* AffixMgr::get_try_string() const { … }
const std::string& AffixMgr::get_wordchars() const { … }
const std::vector<w_char>& AffixMgr::get_wordchars_utf16() const { … }
int AffixMgr::get_compound() const { … }
FLAG AffixMgr::get_compoundflag() const { … }
FLAG AffixMgr::get_forbiddenword() const { … }
FLAG AffixMgr::get_nosuggest() const { … }
FLAG AffixMgr::get_nongramsuggest() const { … }
FLAG AffixMgr::get_needaffix() const { … }
FLAG AffixMgr::get_onlyincompound() const { … }
const std::string& AffixMgr::get_version() const { … }
struct hentry* AffixMgr::lookup(const char* word) { … }
int AffixMgr::have_contclass() const { … }
int AffixMgr::get_utf8() const { … }
int AffixMgr::get_maxngramsugs(void) const { … }
int AffixMgr::get_maxcpdsugs(void) const { … }
int AffixMgr::get_maxdiff(void) const { … }
int AffixMgr::get_onlymaxdiff(void) const { … }
int AffixMgr::get_nosplitsugs(void) const { … }
int AffixMgr::get_sugswithdots(void) const { … }
bool AffixMgr::parse_flag(const std::string& line, unsigned short* out, FileMgr* af) { … }
bool AffixMgr::parse_num(const std::string& line, int* out, FileMgr* af) { … }
bool AffixMgr::parse_cpdsyllable(const std::string& line, FileMgr* af) { … }
bool AffixMgr::parse_reptable(const std::string& line, FileMgr* af) { … }
bool AffixMgr::parse_convtable(const std::string& line,
FileMgr* af,
RepList** rl,
const std::string& keyword) { … }
bool AffixMgr::parse_phonetable(const std::string& line, FileMgr* af) { … }
bool AffixMgr::parse_checkcpdtable(const std::string& line, FileMgr* af) { … }
bool AffixMgr::parse_defcpdtable(const std::string& line, FileMgr* af) { … }
bool AffixMgr::parse_maptable(const std::string& line, FileMgr* af) { … }
bool AffixMgr::parse_breaktable(const std::string& line, FileMgr* af) { … }
void AffixMgr::reverse_condition(std::string& piece) { … }
class entries_container { … };
bool AffixMgr::parse_affix(const std::string& line,
const char at,
FileMgr* af,
char* dupflags) { … }
int AffixMgr::redundant_condition(char ft,
const char* strip,
int stripl,
const char* cond,
int linenum) { … }
std::vector<std::string> AffixMgr::get_suffix_words(short unsigned* suff,
int len,
const char* root_word) { … }