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

Allowing reserved character in selector ? #32

Open
ajitnain opened this issue Feb 24, 2018 · 1 comment
Open

Allowing reserved character in selector ? #32

ajitnain opened this issue Feb 24, 2018 · 1 comment

Comments

@ajitnain
Copy link

ajitnain commented Feb 24, 2018

Currently reserved character are not allowed in selector. In one of my use case selector contains reserved characters.

  1. Is there any way to handle this.
  2. What was the reason for not allowing reserved character in selector. I think it could have been handled like arguments i.e. if reserved characters in selector then it can be quoted.

Thanks

@ajitnain ajitnain changed the title Allowing reserved character in selector. Allowing reserved character in selector ? Feb 24, 2018
@mkargar
Copy link

mkargar commented Jun 22, 2018

Seems that changing Selector() in RSQLParser.jj from

String Selector(): {}
{
    token = <UNRESERVED_STR>
    {
        return token.image;
    }
}

to

String Selector(): {}
{
    token = <UNRESERVED_STR> { return token.image; }
    |
    ( token = <DOUBLE_QUOTED_STR> | token = <SINGLE_QUOTED_STR> )
    {
        return unescape(token.image.substring(1, token.image.length() -1));
    }
}

Addresses the issue.

Still not sure why they are excluded in the first place!

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