diagnoseEntry1 method

void diagnoseEntry1(
  1. int marker_kind
)

Implementation

void diagnoseEntry1(int marker_kind) {
  reallocateStacks();
  tempStackTop = 0;
  tempStack[tempStackTop] = START_STATE;
  tokStream.reset();
  int current_token, current_kind;
  if (marker_kind == 0) {
    current_token = tokStream.getToken();
    current_kind = tokStream.getKind(current_token);
  } else {
    current_token = tokStream.peek();
    current_kind = marker_kind;
  }

  var error_token = parseForError(current_kind);

  //
  // If an error was found, start the diagnosis and recovery.
  //
  if (error_token != 0) diagnoseEntry(marker_kind, error_token);

  return;
}