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

Confusing error message when the user name a variable as an existing alphabetic infix operator #6162

Closed
vicuna opened this issue Sep 5, 2013 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Sep 5, 2013

Original bug ID: 6162
Reporter: @gasche
Status: acknowledged (set by @gasche on 2013-09-05T15:43:06Z)
Resolution: open
Priority: low
Severity: feature
Category: lexing and parsing
Child of: #5068

Bug description

Both error messages highlight the bound identifier and are fairly confusing:

match foo with `Mod mod -> ();;

Error: Syntax error

let lsl = 4;;

Error: Syntax error

Intuitively, we'd like to special-case those errors to explain the conflict with the infix operator, but it's unclear that it is reasonably feasible to do so with the current parsing technology.

@vicuna
Copy link
Author

vicuna commented Jan 21, 2014

Comment author: @damiendoligez

I gave it a try but it's hard to fit as a change in the yacc grammar. Maybe it can be done by recovering the lookahead token after a syntax error.

@github-actions
Copy link

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant