public void DisplayErrorAndRecover(ErrorCode code) { string errMsg = ErrorMsg.GetInstance().GetMsg(code); Console.WriteLine(String.Format("Line({0, 4}): {1}", sourceChar, source[sourceLine])); Console.WriteLine(new string(' ', sourceChar + 12) + '^'); Console.WriteLine(errMsg); Token token = GetToken(); while (!IsEof() && !token.IsEos()) { token = GetToken(); } }