22 May 2013, 21:31
Generic-user-small

Robert Newshutz (1 post)

I am creating a program that I expect to be have many users that are not English speakers. I am looking to use ANTLR for some formatted input.

I would like error messages from parsing errors to be translatable to other languages. I understand how to intercept error messages with an ErrorListener, but I would like my messages to be more informative than “unexpected input ‘foo’ on line __ at character position __.” with a message in English from ANTLR appended.

Any suggestions?

03 Jul 2013, 21:10
Australia-3_pragsmall

Terence Parr (36 posts)

Hi. I suggest that you ask the antlr-discussion list but I believe you would do as you say and add a listener. It’s up to you to generate text in whatever language you want and ANTLR provides the information about what was expected and so on.

  You must be logged in to comment