Re: Filename in ErrorMessage after precompiling
Posted By:
Terence_Parr
Posted On:
Thursday, December 20, 2001 11:37 AM
there should be a set filename method somewhere if I remember properly. I wouldn't rely on InputState remaining the same in future versions.
Re: Filename in ErrorMessage after precompiling
Posted By:
Tob_Lin
Posted On:
Wednesday, December 5, 2001 06:49 AM
I'm again. I saw in source code of RecognitionException, that the default errormassage (toString()) was build with a filename, if there one. but this filename is not pass by the Lexer to the Parser and the Parser can only have one filename per Lexer, isn't it? The problem seams to be, that the Lexer save only the linenummber in a Token, but not the filename.
Is there a way, to tell ANTLR to store the filename also in Tokens and use this in the Exceptions or have I to write my own LexerClass, own TokenClass and my own ParserClasses?