improve sqlwall and parser

This commit is contained in:
Yako
2014-10-24 13:25:54 +08:00
parent 9da2cbc8d3
commit 2c9add76e6
17 changed files with 96 additions and 35 deletions
@@ -110,6 +110,8 @@ public class MySqlLexer extends Lexer {
if (commentHandler != null && commentHandler.handle(lastToken, stringVal)) {
return;
}
endOfComment = isEOF();
if (!isAllowComment() && (isEOF() || !isSafeComment(stringVal))) {
throw new NotAllowCommentException();
@@ -448,6 +450,8 @@ public class MySqlLexer extends Lexer {
return;
}
endOfComment = isEOF();
if (!isHint && !isAllowComment() && (isEOF() || !isSafeComment(stringVal))) {
throw new NotAllowCommentException();
}
@@ -489,6 +493,8 @@ public class MySqlLexer extends Lexer {
return;
}
endOfComment = isEOF();
if (!isAllowComment() && (isEOF() || !isSafeComment(stringVal))) {
throw new NotAllowCommentException();
}
@@ -136,6 +136,7 @@ public class OdpsLexer extends Lexer {
stringVal = subString(mark + 1, bufPos);
token = Token.LINE_COMMENT;
hasComment = true;
endOfComment = isEOF();
return;
}
}
@@ -274,6 +274,7 @@ public class OracleLexer extends Lexer {
stringVal = subString(mark + 1, bufPos);
token = Token.LINE_COMMENT;
hasComment = true;
endOfComment = isEOF();
return;
}
}
@@ -149,6 +149,7 @@ public class SQLServerLexer extends Lexer {
stringVal = subString(mark + 1, bufPos);
token = Token.LINE_COMMENT;
hasComment = true;
endOfComment = isEOF();
return;
}
}