Example #1
0
PT_Symbol makeSymbolAllChars()
{
  PT_CharRanges ranges = PT_makeCharRangesList(
                           PT_makeCharRangeRange(0,255),
                           PT_makeCharRangesEmpty());
  return PT_makeSymbolIterStar(
           PT_makeSymbolCharClass(ranges));
}  
Example #2
0
PT_Symbol makeSymbolAllChars()
{
  PT_CharRanges ranges
    = PT_makeCharRangesSingle(PT_makeCharRangeRange(0, 255));

  return PT_makeSymbolIterStar(
           PT_makeSymbolCharClass(ranges));
}  
Example #3
0
static PT_CharRange SDFCharRangeToPtCharRange(SDF_CharRange sdfCharRange)
{
  PT_CharRange result;

  if (SDF_isCharRangeDefault(sdfCharRange)) {
    SDF_Character sdfChar = SDF_getCharRangeCharacter(sdfCharRange);
    int ptChar = SDFCharacterToInt(sdfChar);
    result = PT_makeCharRangeCharacter(ptChar);
  }
  else if (SDF_isCharRangeRange(sdfCharRange)) {
    SDF_Character sdfStart = SDF_getCharRangeStart(sdfCharRange);
    SDF_Character sdfEnd = SDF_getCharRangeEnd(sdfCharRange);
    int ptStart = SDFCharacterToInt(sdfStart);
    int ptEnd = SDFCharacterToInt(sdfEnd);
    result = PT_makeCharRangeRange(ptStart,ptEnd);
  }
  else {
    ATerror("SDFCharRangeToPtCharRange: unable to convert %s\n",
	    PT_yieldTreeToString((PT_Tree) sdfCharRange, ATfalse));
    result = NULL;
  } 
 
  return result;
}