Ignore:
Timestamp:
Aug 29, 2016, 3:37:03 PM (3 years ago)
Author:
cameron
Message:

Some clean ups of encoding info for ccc restructuring.

Location:
icGREP/icgrep-devel/icgrep/re
Files:
4 edited

Legend:

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

    r5134 r5137  
    4343namespace re {
    4444
    45 void RE_Compiler::initializeRequiredStreams(Encoding encoding) {
    46     if (encoding.getType() == Encoding::Type::UTF_8) {
     45void RE_Compiler::initializeRequiredStreams(const unsigned encodingBits) {
     46    if (encodingBits == 8) {
    4747      RE_Compiler::initializeRequiredStreams_utf8();
    4848    }
    49     else if (encoding.getType() == Encoding::Type::UTF_16) {
     49    else if (encodingBits == 16) {
    5050      RE_Compiler::initializeRequiredStreams_utf16();
    5151    }
  • icGREP/icgrep-devel/icgrep/re/re_compiler.h

    r5134 r5137  
    5353
    5454    RE_Compiler(pablo::PabloFunction & function, cc::CC_Compiler & ccCompiler, bool CountOnly = false);
    55     void initializeRequiredStreams(Encoding encoding);
     55    void initializeRequiredStreams(const unsigned encodingBits);
    5656    void compileUnicodeNames(RE *& re);
    5757    void finalizeMatchResult(MarkerType match_result, bool InvertMatches = false);
  • icGREP/icgrep-devel/icgrep/re/re_toolchain.cpp

    r5134 r5137  
    6363
    6464
    65 RE * regular_expression_passes(const Encoding encoding, RE * re_ast)  {
     65RE * regular_expression_passes(RE * re_ast)  {
    6666    if (PrintOptions.isSet(PrintAllREs) || PrintOptions.isSet(PrintParsedREs)) {
    6767        std::cerr << "Parser:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
     
    8686}
    8787   
    88 PabloFunction * re2pablo_compiler(const Encoding encoding, RE * re_ast, bool CountOnly) {
    89     PabloFunction * function = PabloFunction::Create("process_block", encoding.getBits(), CountOnly ? 0 : 2);
    90     cc::CC_Compiler cc_compiler(*function, encoding);
     88PabloFunction * re2pablo_compiler(const unsigned encodingBits, RE * re_ast, bool CountOnly) {
     89    PabloFunction * function = PabloFunction::Create("process_block", encodingBits, CountOnly ? 0 : 2);
     90    cc::CC_Compiler cc_compiler(*function, encodingBits);
    9191    re::RE_Compiler re_compiler(*function, cc_compiler, CountOnly);
    92     re_compiler.initializeRequiredStreams(encoding);
     92    re_compiler.initializeRequiredStreams(encodingBits);
    9393    re_compiler.compileUnicodeNames(re_ast);
    9494    re_compiler.finalizeMatchResult(re_compiler.compile(re_ast), AlgorithmOptions.isSet(InvertMatches));
  • icGREP/icgrep-devel/icgrep/re/re_toolchain.h

    r5134 r5137  
    77#ifndef RE_TOOLCHAIN_H
    88#define RE_TOOLCHAIN_H
    9 
    10 #include "utf_encoding.h"
    119
    1210#include <re/re_re.h>
     
    3129const cl::OptionCategory * re_toolchain_flags();
    3230
    33 RE * regular_expression_passes(const Encoding encoding, RE * re_ast);
     31RE * regular_expression_passes(RE * re_ast);
    3432
    35 pablo::PabloFunction * re2pablo_compiler(const Encoding encoding, RE * re_ast, bool CountOnly = false);
     33pablo::PabloFunction * re2pablo_compiler(const unsigned encodingBits, RE * re_ast, bool CountOnly = false);
    3634   
    3735}
Note: See TracChangeset for help on using the changeset viewer.