m_Sql=sql;
parse(sql, 0);
}
private List<SqlToken> parse(String s, int level) throws Exception {
List<SqlToken> tokens=new ArrayList<SqlToken>();
KongaStringTokenizer tk=new KongaStringTokenizer(s," \"][()`',.\t\r\n;", true);
int pos0=0, pos1=0;
char c;
while(tk.hasMoreTokens()){
String token=tk.nextToken();
pos0=pos1;
pos1+=token.length();
switch(c=token.charAt(0)){
case ' ':
case '\r':
case '\n':
case '\t':
while(tk.hasMoreTokens() && (c=tk.peek().charAt(0))==' '||c=='\r'||c=='\n'||c=='\t'){
pos1+=tk.nextToken().length();
}
tokens.add(new SqlToken(pos0, pos1, t_ws));
break;
case '[':
c=']';