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

EntryToken Compiler::procTransduction (  )  [private]

Parse the <p< element

Returns:
a list of tokens from the dictionary's entry

Definition at line 373 of file Compiler.C.

References latin1(), reader, EntryToken::setSingleTransduction(), and skip().

Referenced by procEntry().

{
  list<string> lhs, rhs;
  string name;
  
  skip(name, COMPILER_LEFT_ELEM);

  if(!xmlTextReaderIsEmptyElement(reader))
  {
    name = "";
    while(true)
    {
      xmlTextReaderRead(reader);
      name = latin1(xmlTextReaderConstName(reader));
      if(name == COMPILER_LEFT_ELEM)
      {
        break;
      }
      readString(lhs, name);
    }
  }
 
  skip(name, COMPILER_RIGHT_ELEM);

  if(!xmlTextReaderIsEmptyElement(reader))
  {
    name = "";
    while(true)
    {
      xmlTextReaderRead(reader);
      name = latin1(xmlTextReaderConstName(reader));
      if(name == COMPILER_RIGHT_ELEM)
      {
        break;
      }
      readString(rhs, name);
    }    
  }

  skip(name, COMPILER_PAIR_ELEM);  
  
  EntryToken e;
  e.setSingleTransduction(lhs, rhs);
  return e;
}


Generated by  Doxygen 1.6.0   Back to index