Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

If you are using the CommonTokenStream or any other stream that buffers tokens, simply use the token at which the error occurs and look for the line information from that token. Then, just print out that line from the input buffer. I guess you could go from the token buffer walking backwards and forwards looking for tokens on that same line or, if you have the character buffer, you can print all characters on that line.

  • No labels