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

fix when expected input contains line break #16

Merged
merged 3 commits into from
Dec 30, 2018
Merged

Conversation

mario-s
Copy link
Contributor

@mario-s mario-s commented Dec 29, 2018

This PR will fix the phenomenom when there is a line break in the error file.

Assume you have an error file with this content:
line 1:29 mismatched input '\n' expecting 'namespace'

The class AssertErrorsErrorListener was replacing that line but not the actual error message. Therefore you get a mismatch like this:

com.khubla.antlr.antlr4test.AssertErrorsException: namespace.cto.errors : expected (line 1:29 mismatched input '
' expecting 'namespace'), but was (line 1:29 mismatched input '\n' expecting 'namespace')

The change will replace the place holders of the expecting message too.

@teverett
Copy link
Member

@mario-s thanks

@teverett teverett merged commit 366029b into antlr:master Dec 30, 2018
@mario-s mario-s deleted the bugfix branch December 30, 2018 11:00
teverett added a commit that referenced this pull request May 16, 2021
….6.1

Bump maven.version from 3.6.0 to 3.6.1
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.

2 participants