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

Still seeing errors in STDErr after removing ErrorListeners #105

Closed
syepes opened this issue Dec 18, 2012 · 1 comment
Closed

Still seeing errors in STDErr after removing ErrorListeners #105

syepes opened this issue Dec 18, 2012 · 1 comment

Comments

@syepes
Copy link

syepes commented Dec 18, 2012

Hello,

I am building a configuration file parser and I need to remove all the error output messages, so I have tried removing the error listeners:

parser.setErrorHandler(new BailErrorStrategy())
parser.removeErrorListeners()

But when I run the parser I am still getting errors in the standard error output:

line 1:0 token recognition error at: ' '
line 1:1 token recognition error at: '■'
line 1:0 token recognition error at: ' '
line 1:1 token recognition error at: '■'
line 1:0 token recognition error at: ';'
line 1:0 token recognition error at: ';'
line 1:0 token recognition error at: ' '
line 1:1 token recognition error at: '■'
line 1:0 token recognition error at: ' '
line 1:1 token recognition error at: '■'

Is this normal?
whats the best method for removing these errors?

Best regards,
Sebastian

@sharwell
Copy link
Member

I believe you also need to remove the error listeners from the lexer separately from the parser.

@ghost ghost assigned sharwell Dec 18, 2012
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

2 participants