Logo Search packages:      
Sourcecode: lttoolbox version File versions  Download package

void Compiler::write ( FILE *  fd  ) 

Write the result of compilation

Parameters:
fd the stream where write the result

Definition at line 739 of file Compiler.C.

References alphabet, letters, Compression::multibyte_write(), sections, and Alphabet::write().

{
  // letters
  Compression::multibyte_write(letters.size(), output);
  fwrite(letters.data(), sizeof(char), letters.size(), output);
  
  // symbols
  alphabet.write(output);
   
  // transducers
  Compression::multibyte_write(sections.size(), output);

  int conta=0;
  for(map<string, Transducer, Ltstr>::iterator it = sections.begin(),
                                               limit = sections.end(); 
      it != limit; it++)
  {
    conta++;
    Compression::multibyte_write(it->first.size(), output);
    cout << it->first << " " << it->second.size();
    cout << " " << it->second.numberOfTransitions() << endl;
    fwrite(it->first.data(), sizeof(char), it->first.size(), output);
    it->second.write(output);
  }
}


Generated by  Doxygen 1.6.0   Back to index