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

TimeUnit "ms" impossible #20

Open
wherget opened this issue Apr 14, 2016 · 2 comments
Open

TimeUnit "ms" impossible #20

wherget opened this issue Apr 14, 2016 · 2 comments

Comments

@wherget
Copy link

wherget commented Apr 14, 2016

Since I'm currently knee-deep in the parser grammar, I stumbled across this bit here:

    t = <SINGLELETTERTEXT> {
        timeunit = timeunit + t.image ;
        if(!timeunit.equals("ms") && !timeunit.equals("s") && !timeunit.equals("m") && !timeunit.equals("h") && !timeunit.equals("d"))
        throw new ParseException();
    }

where

<SINGLELETTERTEXT: ["a"-"z","A"-"Z"] >

As it turns out, specifying STEP 2ms doesn't work. (ParseException: Encountered " <SINGLELETTERTEXT> "s "").

@pedromj
Copy link

pedromj commented Aug 2, 2016

I am experimenting with C-SPARQL and found the same issue. I have tried to check the code to try to fix it by myself but I am not familiar at all with parsers like this one. If anybody can give a hint on how to do it, please let us know. Thank you.

@wherget
Copy link
Author

wherget commented Aug 2, 2016

I did fix (at least the parser part of) this particular issue on my rework-parser branch. I haven't tried if cherry-picking the one relevant commit (07839b0) works, but it looks to me like it should.
I haven't yet submitted a PR since I felt like I could improve the parser quite a bit still from what the current state on that branch is. However, we're not currently working on the CSPARQL based project that originated that branch anymore, so time for improving the parser is pretty much nonexistent.

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

No branches or pull requests

2 participants