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

Closed
GoogleCodeExporter opened this issue Mar 16, 2015 · 1 comment
Closed

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

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

  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
java.io.IOException: Lexical error at 
file:/home/dan/ontopia-5.1.0/apache-tomcat/webapps/omnigator/WEB-INF/topicmaps/c
tm-datetime-bug.ctm:4:31: expecting EOF, found '001'The store registry has been 
updated in APPLICATION_SCOPE.


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 = 
"-"?{NonZero}*{Digit}{Digit}{Digit}{Digit}"-"{Digit}{Digit}"-"{Digit}{Digit}
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 code.google.com by dan.sp...@gmail.com on 21 Feb 2011 at 2:20

Attachments:

@GoogleCodeExporter
Copy link
Author

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 lar...@gmail.com 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
Projects
None yet
Development

No branches or pull requests

1 participant