... it turns to a nightmare -- which cause infinitive loop, eat up my memory.
Hard to comment on that without being able to reproduce it.
However, the parser rule:
message : '"' .* '"';
matches the token '"'
followed by zero or more other tokens ending with the token '"'
.
Unless you have a very good reason to keep it as a parser rule (which I'd like to hear then), change it to a lexer rule:
Message : '"' .* '"';
which matches the character '"'
followed by zero or more other characters ending with the character '"'
.
Also see: Practical difference between parser rules and lexer rules in ANTLR?