constUCD::UnicodeSet&&UnicodeSetTable::get_uset(stringradical,boolindexMode,boolmixedMode)//Map the input radical to the corresponding UnicodeSet predefined in kRSKangXi.h
{
if(indexMode)
{//search using the index (e.g. 85_)
/*try
{
int num = std::stoi(radical); //checks if the input is anything other than a number
if (num < 1 || num > 214)
{ //if input is a number not in range [1,214]; terminate program
llvm::report_fatal_error("A radical set for this input does not exist.\n Enter a integer in [1,214], followed by _.");
}
}
catch (std::invalid_argument)
{ //if input not an integer, terminate program
llvm::report_fatal_error("A radical set for this input does not exist.\n Enter a integer in [1,214], followed by _.");
llvm::report_fatal_error("A radical set for this input does not exist.");
//return std::move(UCD::UnicodeSet());
}
staticUnicodeSetTableucd_radical;
constUCD::UnicodeSet&&UnicodeSetTable::get_uset(stringradical,boolindexMode,boolmixedMode)//Map the input radical to the corresponding UnicodeSet predefined in kRSKangXi.h
staticcl::opt<bool,true>LineNumberOption("n",cl::location(LineNumberFlag),cl::desc("Show the line number with each matching line."),cl::cat(radicalgrepFlags));
boolWithFilenameFlag;
staticcl::opt<bool,true>WithFilenameOption("h",cl::location(WithFilenameFlag),cl::desc("Show the file name with each matching line."),cl::cat(radicalgrepFlags));
boolCLKCountingFlag;
staticcl::opt<bool,true>CLKCountingOption("clk",cl::location(CLKCountingFlag),cl::desc("Show the runtime of the function."),cl::cat(radicalgrepFlags));
...
...
@@ -88,6 +83,7 @@ int main(int argc, char* argv[])