Skip to content

Improve lexing parsing error messages#140

Merged
alastairreid merged 4 commits intomasterfrom
areid/fix-lexing-parsing-error-messages
Apr 30, 2026
Merged

Improve lexing parsing error messages#140
alastairreid merged 4 commits intomasterfrom
areid/fix-lexing-parsing-error-messages

Conversation

@alastairreid
Copy link
Copy Markdown

@alastairreid alastairreid commented Apr 27, 2026

Fixes #119.
Fixes #82.

@alastairreid alastairreid changed the title Areid/fix lexing parsing error messages Improve lexing parsing error messages Apr 27, 2026
Comment thread libISA/error.ml Outdated
Also, when there is no filename (e.g., because the input comes
from the terminal), print

    "line 1"

instead of

    "file  line 1"

Fixes #119
This was a really bad issue because it meant that you could be in
the middle of an interactive session, type an incorrect lexeme,
and the session would be aborted.

The fix is easy: report it as a parsing error

Fixes #82
@alastairreid alastairreid force-pushed the areid/fix-lexing-parsing-error-messages branch from 7ba96c5 to b8bdddc Compare April 29, 2026 16:01
@alastairreid alastairreid merged commit 11a2e34 into master Apr 30, 2026
1 check passed
@alastairreid alastairreid deleted the areid/fix-lexing-parsing-error-messages branch April 30, 2026 09:14
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.

Can add more detail print infomation when parse error Interpreting 'x100' results in a type error

2 participants