add wall test

This commit is contained in:
温少
2012-03-15 23:55:29 +08:00
6 changed files with 106 additions and 3 deletions
@@ -5,6 +5,7 @@ import java.util.Map;
import com.alibaba.druid.sql.parser.Keywords;
import com.alibaba.druid.sql.parser.Lexer;
import com.alibaba.druid.sql.parser.NotAllowCommentException;
import com.alibaba.druid.sql.parser.Token;
public class HiveLexer extends Lexer {
@@ -147,9 +148,17 @@ public class HiveLexer extends Lexer {
stringVal = new String(buf, np, sp);
token = Token.MULTI_LINE_COMMENT;
}
if (token != Token.HINT && !isAllowComment()) {
throw new NotAllowCommentException();
}
return;
}
if (!isAllowComment()) {
throw new NotAllowCommentException();
}
if (ch == '/') {
scanChar();
@@ -7,6 +7,7 @@ import java.util.Map;
import com.alibaba.druid.sql.parser.Keywords;
import com.alibaba.druid.sql.parser.Lexer;
import com.alibaba.druid.sql.parser.NotAllowCommentException;
import com.alibaba.druid.sql.parser.SQLParseException;
import com.alibaba.druid.sql.parser.Token;
@@ -257,9 +258,17 @@ public class OracleLexer extends Lexer {
stringVal = new String(buf, np, sp);
token = Token.MULTI_LINE_COMMENT;
}
if (token != Token.HINT && !isAllowComment()) {
throw new NotAllowCommentException();
}
return;
}
if (!isAllowComment()) {
throw new NotAllowCommentException();
}
if (ch == '/' || ch == '-') {
scanChar();