Git Product home page Git Product logo

cql-java's People

Contributors

adamdickmeiss avatar dependabot[bot] avatar funkymalc avatar jakub-id avatar julianladisch avatar miketaylor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cql-java's Issues

Inconsistent ParseException: foo bar.baz

All these four cql expressions result in the same parse tree when sent to new CQLParser().parse(cql).toXCQL():

foo bar
"foo bar"
cql.serverChoice=foo bar
cql.serverChoice="foo bar"

When sending these other four cql expressions only the two quoted work, the two unquoted result in CQLParseException: expected index or term, got EOF:

foo bar.baz
"foo bar.baz"
cql.serverChoice=foo bar.baz
cql.serverChoice="foo bar.baz"

This is inconsistent. Either accept all unquoted or no unquoted expressions.

Unpredictable escape sequences

The line here in the CQLLexer allows certain characters from being escaped:

The CQL spec says:

Double quotes enclosing a sequence of any characters except double quote (unless preceded by backslash ()). Backslash escapes the character following it. The resultant value includes all backslash characters except those releasing a double quote (this allows other systems to interpret the backslash character). The surrounding double quotes are not included.

I'm curious why those specific characters are included and how those characters mean that they release a double quote.

It is actually making it impossible for me to represent a Windows-style file path, for example:

file = some\\path\\in\\windows\.exe

This gets turned into:

file = some\\path\\in\\windows.exe

because the . character is not on that list.

I happen to have a regular expression interpreter following the CQL parse that needs the value to be file = some\\path\\in\\windows\.exe. If I know that the CQL parser is consistently escaping the following character, I could just pass in: file=some\\\\path\\\\in\\\\windows\\.exe or if it consistently ignores it: file=some\\path\\in\\windows\.exe.

Got CQLParseException when pass cql schema

Hello ,
what I need is a parser that starting from DDL (create, alter tables and other instructions) will get info about the schema into a java object.

Trying to use this library I'm getting CQLParseException:

Error parsing cql schema org.z3950.zing.cql.CQLParseException: expected boolean, got '('

Error parsing cql schema org.z3950.zing.cql.CQLParseException: expected index or term, got EOF

This library is suitable for this type of thing?
Thanks in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.