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

regex_t & TransferWord::getRegex ( const char *  part  )  [static, private]

Get a regex_t from a regular expression

Parameters:
part the regular expression
Returns:
the regex_t of the compiled regular expression;

Definition at line 68 of file TransferWord.C.

References compiled_regexes, and regexError().

Referenced by access(), and assign().

{
  map<char const *, regex_t>::iterator it;
  it = TransferWord::compiled_regexes.find(part);

  if(it != compiled_regexes.end())
  {
    return it->second;
  }
  else
  {
    int errorcode = regcomp(&(TransferWord::compiled_regexes[part]),
                      part, REG_EXTENDED|REG_ICASE);
    regexError(part, errorcode);
    return compiled_regexes[part];
  }
}


Generated by  Doxygen 1.6.0   Back to index