add odps sql parser support

This commit is contained in:
wenshao
2013-12-23 23:59:03 +08:00
parent 7b1d6bfbcc
commit 6f5bb55384
26 changed files with 3356 additions and 1677 deletions
@@ -667,7 +667,6 @@ public class Lexer {
bufPos = 1;
char ch;
boolean mybatisFlag = false;
if (charAt(pos + 1) == '@') {
ch = charAt(++pos);
@@ -675,7 +674,29 @@ public class Lexer {
} else if (charAt(pos + 1) == '{') {
pos++;
bufPos++;
mybatisFlag = true;
for (;;) {
ch = charAt(++pos);
if (ch == '}') {
break;
}
bufPos++;
continue;
}
if (ch != '}') {
throw new ParserException("syntax error");
}
++pos;
bufPos++;
this.ch = charAt(pos);
stringVal = addSymbol();
token = Token.VARIANT;
return;
}
for (;;) {
@@ -689,14 +710,6 @@ public class Lexer {
continue;
}
if (mybatisFlag) {
if (ch != '}') {
throw new ParserException("syntax error");
}
++pos;
bufPos++;
}
this.ch = charAt(pos);
stringVal = addSymbol();