Logo Search packages:      
Sourcecode: lttoolbox version File versions

pair< string, string > Expander::procTransduction (  )  [private]

Parse the <p< element

Returns:
a pair of string, left part and right part of a transduction

Definition at line 220 of file Expander.C.

References reader, and skip().

Referenced by procEntry().

{
  string lhs = "", rhs = ""; 
  string name = "";
  
  skip(name, Compiler::COMPILER_LEFT_ELEM);

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

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

  skip(name, Compiler::COMPILER_PAIR_ELEM);  
  
  pair<string, string> e(lhs, rhs);
  return e;
}


Generated by  Doxygen 1.6.0   Back to index