Logo Search packages:      
Sourcecode: lttoolbox version File versions

string FSTProcessor::readFullBlock ( FILE *  input,
char const   delim1,
char const   delim2 
) [private]

Reads a block from the stream input, enclosed by delim1 and delim2

Parameters:
input the stream being read
delim1 the delimiter of the beginning of the sequence
delim1 the delimiter of the end of the sequence

Definition at line 71 of file FSTProcessor.C.

References readEscaped(), and streamError().

Referenced by readAnalysis(), readGeneration(), readPostgeneration(), and readSAO().

{
  string result = "";
  result += delim1;
  char c = delim1;

  while(!feof(input) && c != delim2)
  {
    c = static_cast<char>(fgetc_unlocked(input));
    result += c;
    if(c != '\\')
    {
      continue;
    }
    else
    {
      result += static_cast<char>(readEscaped(input));
    }
  }   

  if(c != delim2)
  {
    streamError();
  }

  return result;
}


Generated by  Doxygen 1.6.0   Back to index