21 return ConsumeConsonantHeadIfValid() && ConsumeConsonantTailIfValid();
24 return ConsumeVowelIfValid();
37 tprintf(
"Invalid start of grapheme sequence:%c=0x%x\n",
64 if (off <= 0x3b || (0x58 <= off && off <= 0x5f))
97 bool ValidateIndic::ConsumeViramaIfValid(IndicPair joiner,
bool post_matra) {
98 int num_codes =
codes_.size();
125 tprintf(
"Virama ZWJ ZWNJ in non-Sinhala: base=0x%x!\n",
151 tprintf(
"Invalid pre-virama joiner with no 2nd consonant!!\n");
169 bool ValidateIndic::ConsumeConsonantHeadIfValid() {
170 const int num_codes =
codes_.size();
175 int index =
output_.size() - 3;
181 bool have_nukta =
false;
188 index =
output_.size() - 2 - have_nukta;
208 output_.push_back(joiner.second);
211 tprintf(
"Skipping unnecessary joiner: 0x%x 0x%x 0x%x\n",
219 if (!ConsumeViramaIfValid(joiner,
false))
return false;
231 bool ValidateIndic::ConsumeConsonantTailIfValid() {
261 bool ValidateIndic::ConsumeVowelIfValid() {
std::vector< IndicPair > codes_
static bool IsVedicAccent(char32 unicode)
static const char32 kZeroWidthNonJoiner
bool IsSubscriptScript() const
void MultiCodePart(int length)
static const int kIndicCodePageSize
bool ConsumeGraphemeIfValid() override
static bool IsVirama(char32 unicode)
DLLSYM void tprintf(const char *format,...)
bool UseMultiCode(int length)
static const char32 kZeroWidthJoiner
Validator::CharClass UnicodeToCharClass(char32 ch) const override
std::vector< char32 > output_
std::pair< CharClass, char32 > IndicPair