src/Preprocessor/Processor.cpp
/*
	Finds the regular expressions in the string and inserts the proper tags
	around the specified substring. 
*/
Finds the regular expressions in the string and inserts the proper tags
around the specified substring.
Finds the regular expressions in the string and inserts the proper tags around the specified substring .
void Processor::processLocatedString(LocatedString *string) {
	int num_rules = _rules.getNumRules();
	RegexFind finder(_rules);
	for (int i = 0; i < num_rules; i++) {
		(*SessionLogger::logger)<<"Rule "<<i<<":\n";
		if (finder.findExpression(string->toString(), i)) {
			(*SessionLogger::logger)<<"\t Matches: "<<finder.getNumMatches(i)<<"\n";
			makeInsertions(string, finder.getMatches(i), i);
		}
		else
			(*SessionLogger::logger)<<"\t Matches: 0\n";		
	}
}
void Processor :: processLocatedString ( LocatedString * string ) { int num_rules = _rules . getNumRules ( ) ; RegexFind finder ( _rules ) ; for ( int i = 0 ; i < num_rules ; i ++ ) { ( * SessionLogger :: logger ) << " " << i << " \n " ; if ( finder . findExpression ( string -> toString ( ) , i ) ) { ( * SessionLogger :: logger ) << " \t " << finder . getNumMatches ( i ) << " \n " ; makeInsertions ( string , finder . getMatches ( i ) , i ) ; } else ( * SessionLogger :: logger ) << " \t \n " ; } }
Finds the regular expressions in the string and inserts the proper tags
around the specified substring.
Finds the regular expressions in the string and inserts the proper tags around the specified substring .