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

[MySQL] Avoid confusing label and IPv6 address #3606

Merged
merged 2 commits into from
Jul 12, 2023
Merged

Conversation

vjuranek
Copy link
Contributor

Some label combined with some keywords (when written without a space in between, which is valid for MySQL) can look like beginning of an IPv6 address, e.g.

aaa:BEGIN

is currectly prased as IPv6 address aaa:be and leads to a parsing failure.

Make parsing of IPv6 address more robust and require at least two : to make sure there is no confusion with labels.

Some label combined with some keywords (when written without a space
in between, which is valid for MySQL) can look like beginning of an IPv6
address, e.g.

    aaa:BEGIN

is currectly prased as IPv6 address `aaa:be` and leads to a parsing
failure.

Make parsing of IPv6 address more robust and require at least two `:`
to make sure there is no confusion with labels.
@KvanTTT KvanTTT added mysql-PositiveTechnologies MySql grammar by Positive Technologies issues example New example of file(s) parsed by grammar-generated parser labels Jul 12, 2023
Co-authored-by: Ivan Kochurkin <kvanttt@gmail.com>
@KvanTTT KvanTTT merged commit 6ce408a into antlr:master Jul 12, 2023
39 checks passed
rvrooman-codelogic pushed a commit to CodeLogicIncEngineering/grammars-v4-public-fork that referenced this pull request Jul 27, 2023
Some label combined with some keywords (when written without a space
in between, which is valid for MySQL) can look like beginning of an IPv6
address, e.g.

    aaa:BEGIN

is currectly parsed as IPv6 address `aaa:be` and leads to a parsing
failure.

Make parsing of IPv6 address more robust and require at least two `:`
to make sure there is no confusion with labels.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
example New example of file(s) parsed by grammar-generated parser mysql-PositiveTechnologies MySql grammar by Positive Technologies issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants