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

Parser: add support for unicode space characters #5858

Merged
merged 3 commits into from
Jan 9, 2023

Conversation

Mytherin
Copy link
Collaborator

@Mytherin Mytherin commented Jan 8, 2023

This PR adds support for unicode space characters in the parser. These characters otherwise cause confusing errors - as seemingly correct SQL statements will end up resulting in syntax errors, e.g.:

D SELECT42;
Error: Parser Error: syntax error at or near "SELECT 42"
LINE 1: SELECT42;

Unfortunately the current flex lexer does not have good support for unicode - and does not work nicely when we need multiple byte look-ahead (which we need for the various 3-byte unicode space characters). Instead, we add this support by performing a separate pass prior to parsing that converts unicode spaces into regular spaces.

@Mytherin Mytherin merged commit 6fab192 into duckdb:master Jan 9, 2023
@Mytherin Mytherin deleted the invisiblespace branch February 16, 2023 14:42
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

Successfully merging this pull request may close these issues.

None yet

1 participant