Ignore:
Timestamp:
Jun 9, 2016, 3:34:07 PM (3 years ago)
Author:
xuedongx
Message:

Support over UTF-16 representation of Unicode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/icgrep.cpp

    r5037 r5045  
    2323static cl::OptionCategory LegacyGrepOptions("A. Standard Grep Options",
    2424                                       "These are standard grep options intended for compatibility with typical grep usage.");
     25static cl::opt<bool> UTF_16("UTF-16", cl::desc("Regular expressions over the UTF-16 representation of Unicode."), cl::cat(LegacyGrepOptions));
    2526static cl::OptionCategory EnhancedGrepOptions("B. Enhanced Grep Options",
    2627                                       "These are additional options for icgrep functionality and performance.");
     
    110111
    111112    while (fileIdx < inputFiles.size()){
    112         grepEngine->doGrep(inputFiles[fileIdx], fileIdx, CountOnly, total_CountOnly);
     113        grepEngine->doGrep(inputFiles[fileIdx], fileIdx, CountOnly, total_CountOnly, UTF_16);
    113114       
    114115        count_mutex.lock();
     
    212213   
    213214    GrepEngine grepEngine;
    214     grepEngine.grepCodeGen(module_name, re_ast, CountOnly);
     215    grepEngine.grepCodeGen(module_name, re_ast, CountOnly, UTF_16);
    215216   
    216217    initResult(inputFiles);
     
    221222    if (Threads <= 1) {
    222223        for (unsigned i = 0; i != inputFiles.size(); ++i) {
    223             grepEngine.doGrep(inputFiles[i], i, CountOnly, total_CountOnly);
     224            grepEngine.doGrep(inputFiles[i], i, CountOnly, total_CountOnly, UTF_16);
    224225        }       
    225226    } else if (Threads > 1) {
Note: See TracChangeset for help on using the changeset viewer.