Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CTM lexer doesn't accept date-times with fractional seconds #360

GoogleCodeExporter opened this issue Mar 16, 2015 · 1 comment


Copy link

GoogleCodeExporter commented Mar 16, 2015

What steps will reproduce the problem?

1. Try to load the attached CTM topic map into Omnigator. It contains the 

  datetime - "datetime" .

  some-topic - "some topic" ;
    datetime: 2011-01-01T00:00:00.001Z

2. You will receive an error message like: 

Could not load topic map: ctm-datetime-bug.ctm Lexical error at 
tm-datetime-bug.ctm:4:31: expecting EOF, found '001'The store registry has been 

What is the expected output? What do you see instead?

I expected the date-time occurrence to be accepted but it wasn't. 
The CTM draft spec says date-times match: 

[36] date-time  → date 'T' [0-9] [0-9] ':' [0-9] [0-9] ':' [0-9] [0-9]  
('.'[0-9]+ )?   ( 'Z' | ('+' | '-') [0-9] [0-9] ':' [0-9] [0-9] )? 

but ctm.flex has this:

Date = 
DateTime = {Date} "T" {Digit}{Digit}":"{Digit}{Digit}":"{Digit}{Digit}

ctm.flex doesn't even allow the specification of a timezone.

Please use labels and text to provide additional information.

Original issue reported on by on 21 Feb 2011 at 2:20


Copy link

GoogleCodeExporter commented Mar 16, 2015

Well spotted. Thank you for the excellent bug report. Made it easy to fix.

Now fixed in revision 1660. The test cases have been added to the cxtm-tests 
project in revision 175.

Original comment by on 21 Feb 2011 at 9:56

  • Changed state: Verified
  • Added labels: Component-Engine, Syntax-CTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant