Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
OpenCMIS 0.8.0
-
None
-
None
Description
The OpenCMIS sql parser is enforsing at least one whitespace character between the "TIMESTAMP" token and the timestamp string. The input
TIMESTAMP '2013-....'
is accepted while the input
TIMESTAMP'2013-...'
is rejected.
This is not correct. This whitespace char is not required in CMIS 1.0 spec. See line 2419 in chapter 2.1.10.2.1 of the cmis 1.0 spec.
This problem is caused by this definition in CmisBaseLexer.g:
WS : ( ' ' | '\t' | '\r'? '\n' )+ { $channel=HIDDEN; }; TIME_LIT : TIMESTAMP WS STRING_LIT;
The "+" is "one or more" elements. We should use "*" as "zero or more".
This should work:
TIME_LIT_WS : ( ' ' | '\t' | '\r'? '\n' )* { $channel=HIDDEN; }; TIME_LIT : TIMESTAMP TIME_LIT_WS STRING_LIT;
But I think we should also be able to just write:
TIME_LIT : TIMESTAMP STRING_LIT;