Lines Matching refs:pos
54 bool SqlAnalyzer::CharCheck(char &ch, std::string sql, std::size_t &pos) in CharCheck() argument
57 pos++; in CharCheck()
58 std::size_t found = sql.find(']', pos); in CharCheck()
62 pos++; in CharCheck()
64 if (ch == '-' && PickChar(sql, pos + 1) == '-') { in CharCheck()
65 pos += POS_ADD_TWO; in CharCheck()
66 std::size_t found = sql.find('\n', pos); in CharCheck()
70 pos++; in CharCheck()
72 if (ch == '/' && PickChar(sql, pos + 1) == '*') { in CharCheck()
73 pos += POS_ADD_TWO; in CharCheck()
74 std::size_t found = sql.find("*/", pos); in CharCheck()
78 pos += POS_ADD_TWO; in CharCheck()
83 pos++; in CharCheck()
87 bool SqlAnalyzer::StrCheck(char &ch, std::size_t strlen, std::string sql, std::size_t &pos) in StrCheck() argument
90 pos++; in StrCheck()
91 while (pos < strlen) { in StrCheck()
92 std::size_t found = sql.find(ch, pos); in StrCheck()
96 if (PickChar(sql, pos + 1) != ch) { in StrCheck()
99 pos += POS_ADD_TWO; in StrCheck()
110 std::size_t pos = 0; in FindIllegalWords() local
112 while (pos < strlen) { in FindIllegalWords()
113 char ch = PickChar(sql, pos); in FindIllegalWords()
115 std::size_t start = pos; in FindIllegalWords()
116 pos++; in FindIllegalWords()
117 while (IsLetterNumber(PickChar(sql, pos))) { in FindIllegalWords()
118 pos++; in FindIllegalWords()
120 std::size_t count = pos - start + 1; in FindIllegalWords()
124 if (StrCheck(ch, strlen, sql, pos)) { in FindIllegalWords()
130 if (CharCheck(ch, sql, pos)) { in FindIllegalWords()