How to add double dot ".."
token?
#2157
-
Hi, I am currently implementing the net.sf.jsqlparser.JSQLParserException: Encountered unexpected token: ".." ".."
at line 1, column 36.
Was expecting one of:
<EOF>
<ST_SEMICOLON>
at net.sf.jsqlparser/net.sf.jsqlparser.parser.CCJSqlParserManager.parse(CCJSqlParserManager.java:25)
at net.sf.jsqlparser/net.sf.jsqlparser.statement.select.SelectTest.testMultiPartTableNameWithDatabaseName(SelectTest.java:158)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: ".." ".."
at line 1, column 36.
Was expecting one of:
<EOF>
<ST_SEMICOLON>
at net.sf.jsqlparser/net.sf.jsqlparser.parser.CCJSqlParser.generateParseException(CCJSqlParser.java:54047)
at net.sf.jsqlparser/net.sf.jsqlparser.parser.CCJSqlParser.jj_consume_token(CCJSqlParser.java:53862)
at net.sf.jsqlparser/net.sf.jsqlparser.parser.CCJSqlParser.Statement(CCJSqlParser.java:341)
at net.sf.jsqlparser/net.sf.jsqlparser.parser.CCJSqlParserManager.parse(CCJSqlParserManager.java:23)
... 4 more You can see the current progress of my implementation here: https://github.com/ssteinhauser/JSqlParser/tree/feature/exasol-import-statement Do you have any advice or idea how to overcome this issue? Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 3 replies
-
Greetings @ssteinhauser I will look into this tomorrow morning and find a solution (its evening here already). |
Beta Was this translation helpful? Give feedback.
-
I believe, you need to define you own |
Beta Was this translation helpful? Give feedback.
-
Basically, we can define another
|
Beta Was this translation helpful? Give feedback.
-
Thank you for your quick reply @manticore-projects , can you please provide deeper insights of your thoughts? Maybe I miss something, but up to my knowledge, introducing a feature flag or implementing my own If we would implement a feature flag, we would have to implement it that way, that the support of double dot multipart identifier is mutually exclusive with the |
Beta Was this translation helpful? Give feedback.
-
Good Morning @ssteinhauser. Please see 9f51831 (sorry for committing directly, it was an accident). |
Beta Was this translation helpful? Give feedback.
-
Good Morning @ssteinhauser . I fully understand your concern, but We could rework those Right now, I would like to suggest to ignore that there can be whitespace in between. JSQLParser is meant to be a parser and not a validation tool. Suggestion:
|
Beta Was this translation helpful? Give feedback.
-
I tried to work with Tokens in those two productions instead of chaining the |
Beta Was this translation helpful? Give feedback.
-
Good Morning @ssteinhauser . I believe I have been able to fix/improve the dot-handling. The following 2 productions work:
This should allow you to work with tokens like |
Beta Was this translation helpful? Give feedback.
Good Morning @ssteinhauser .
I believe I have been able to fix/improve the dot-handling. The following 2 productions work: