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

Show parse error's line number and column number #199

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

hatoo
Copy link
Contributor

@hatoo hatoo commented Aug 21, 2023

This PR makes a parse error message more readable

Before

[ERROR] Unrecognized token `)` found at 169:170
    Expected one of r#"(([[:alpha:]][\\w-]*)|([-+*/?!=<>&|^/%_]))+"# or r#"(-)?[0-9]+"#

After

[ERROR] Unrecognized token `)` found at ../tmp/path.egg:11:5:../tmp/path.egg:11:6
    Expected one of r#"(([[:alpha:]][\\w-]*)|([-+*/?!=<>&|^/%_]))+"# or r#"(-)?[0-9]+"#

This will be very helpful for new users like me.

@yihozhang
Copy link
Collaborator

Thanks for the PR! Yeah this would be very useful. Also related to #64

@mwillsey mwillsey merged commit d0544fe into egraphs-good:main Aug 21, 2023
3 checks passed
@hatoo hatoo deleted the parse-error-pos branch August 22, 2023 07:03
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.

3 participants