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

PQ+ parsing queries with " inside a regex #110

Open
ElenaIrimia opened this issue May 19, 2022 · 1 comment
Open

PQ+ parsing queries with " inside a regex #110

ElenaIrimia opened this issue May 19, 2022 · 1 comment

Comments

@ElenaIrimia
Copy link
Contributor

ElenaIrimia commented May 19, 2022

The Regex is matched until it finds ", than a new segment is matched for the rest of the string.
E.G:
query: ""-key" is parsed like:

(request (query (sequence (segment (token (key (regex "")))) (segment (token (key -key))))) <EOF>);

We would want such a query to not be parsed at all. The behaviour for the verbatim similar query ''-key' that I didn't manage to reproduce for regex is that it returns:

(request (query ' ' -key ') <EOF>)

We would want the same for ".
The same for CQP, I couldn't find a solution to rewrite the grammar properly. There both ""-key" and ''-key' are wrongly parsed.

@Akron
Copy link
Member

Akron commented May 19, 2022

I would expect this to fail.

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