In this given grammar:
/* * Parser Rules */text : term+ EOF;term : a1 a2 a3;a1: ..........
When error occurs, How to synchronize input to the next valid term? and How to get the ignored text?