MXS-1296: Always use a case-insensitive parser

The two cases where the case-sensitive parser functions were used don't
appear to hold any special meaning. The case-insensitive function should
be used as it implements a superset of functionality compared to the
case-sensitive version.
This commit is contained in:
Markus Mäkelä
2017-06-23 14:15:23 +03:00
parent 9737ffe092
commit cd09e65714

View File

@ -557,11 +557,6 @@ private:
((*(m_pI + offset) == uc) || (*(m_pI + offset) == lc)); ((*(m_pI + offset) == uc) || (*(m_pI + offset) == lc));
} }
bool is_next_char(char c, int offset = 1) const
{
return ((m_pI + offset) < m_pEnd) && (*(m_pI + offset) == c);
}
bool peek_next_char(char* pC) const bool peek_next_char(char* pC) const
{ {
bool rc = (m_pI + 1 < m_pEnd); bool rc = (m_pI + 1 < m_pEnd);
@ -730,7 +725,7 @@ private:
} }
else if (is_next_alpha('N')) else if (is_next_alpha('N'))
{ {
if (is_next_char('L', 2)) if (is_next_alpha('L', 2))
{ {
token = expect_token(TBP_EXPECT_TOKEN("ONLY"), TK_ONLY); token = expect_token(TBP_EXPECT_TOKEN("ONLY"), TK_ONLY);
} }
@ -770,7 +765,7 @@ private:
{ {
token = expect_token(TBP_EXPECT_TOKEN("SNAPSHOT"), TK_SNAPSHOT); token = expect_token(TBP_EXPECT_TOKEN("SNAPSHOT"), TK_SNAPSHOT);
} }
else if (is_next_char('T')) else if (is_next_alpha('T'))
{ {
token = expect_token(TBP_EXPECT_TOKEN("START"), TK_START); token = expect_token(TBP_EXPECT_TOKEN("START"), TK_START);
} }