Skip to content

Commit

Permalink
fixes #1065
Browse files Browse the repository at this point in the history
  • Loading branch information
wumpz committed Nov 22, 2020
1 parent 8c7ee28 commit e0b3a18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt
Original file line number Diff line number Diff line change
Expand Up @@ -2735,9 +2735,9 @@ Expression InExpression() #InExpression :
(
// syntactic lookahead for a multi expression list, ie: ((a,b),(c,d))
LOOKAHEAD(3) multiExpressionList = MultiInExpressions()
| LOOKAHEAD(Function()) rightExpression = Function()
| token=<S_CHAR_LITERAL> { rightExpression = new StringValue(token.image); }
| "(" (LOOKAHEAD(3) rightItemsList=SubSelect() | rightItemsList=SimpleExpressionList() )")"
| LOOKAHEAD(3) rightExpression = Function()
| LOOKAHEAD(2) token=<S_CHAR_LITERAL> { rightExpression = new StringValue(token.image); }
| LOOKAHEAD(3) "(" (LOOKAHEAD(3) rightItemsList=SubSelect() | rightItemsList=SimpleExpressionList() )")"
| rightExpression = SimpleExpression()
)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4330,6 +4330,7 @@ public void testIssue1068() throws JSQLParserException {
@Test
public void selectWithSingleIn() throws JSQLParserException {
assertSqlCanBeParsedAndDeparsed("SELECT 1 FROM dual WHERE a IN 1");
}

@Test
public void testKeywordSequenceIssue1075() throws JSQLParserException {
Expand All @@ -4338,5 +4339,6 @@ public void testKeywordSequenceIssue1075() throws JSQLParserException {

@Test
public void testKeywordSequenceIssue1074() throws JSQLParserException {
assertSqlCanBeParsedAndDeparsed("SELECT * FROM t_user WITH (NOLOCK)");
}
}

0 comments on commit e0b3a18

Please sign in to comment.