rsql-parser
rsql-parser copied to clipboard
Allowing reserved character in selector ?
Currently reserved character are not allowed in selector. In one of my use case selector contains reserved characters.
- Is there any way to handle this.
- 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
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!