Closed
Description
Describe the bug
Can't properly parse the statement when
- Backslash is the last character of a literal;
- The literal is not the last value of a sequence.
To Reproduce
Steps to reproduce the behavior:
- Example:
CCJSqlParserUtil.parseStatements("""INSERT INTO "a"."b"("c", "d", "e") VALUES ('c c\', 'dd', 'ee\')""")
(Kotlin) - Exception:
net.sf.jsqlparser.JSQLParserException: Encountered unexpected token: "dd" <S_IDENTIFIER>
at line 1, column 53.
Was expecting one of:
"&"
")"
","
"::"
"<<"
">>"
"COLLATE"
"["
"^"
"|"
- Note that
CCJSqlParserUtil.parseStatements("""INSERT INTO "a"."b"("c", "d", "e") VALUES ('c c', 'dd', 'ee\')""")
won't trigger the exception.
Expected behavior
The literals 'c c\'
and 'dd'
should be properly parsed.
System
- Database: Oracle
- Kotlin Version: 1.4.21-release-IJ2020.2-1
- Java Version: 1.8
- JSqlParser version: 4.0
Metadata
Metadata
Assignees
Labels
No labels