Ignore:
Timestamp:
Dec 12, 2014, 1:21:03 PM (4 years ago)
Author:
cameron
Message:

Compile only byteclasses with cc_compiler; resolve CC/BC ambiguity

File:
1 edited

Legend:

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

    r4335 r4337  
    1212
    1313#include <compiler.h>
     14#include <re/re_cc.h>
    1415#include <re/re_nullable.h>
    1516#include <re/re_simplifier.h>
     
    7778
    7879    CC_NameMap nameMap;
    79     re_ast = nameMap.process(re_ast);
     80    re_ast = nameMap.process(re_ast, UnicodeClass);
    8081
    8182    #ifdef DEBUG_PRINT_RE_AST
    8283    std::cerr << "Namer:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
     84    std::cerr << "NameMap:\n" << nameMap.printMap() << std::endl;
    8385    #endif
    8486
     
    9193        #endif
    9294    }
    93 
    94     // note: system is clumbersome at the moment; this ought to be done AFTER toUTF8.
    95     //nameMap.addPredefined("LineFeed", makeCC(0x0A));
    9695    #ifdef DEBUG_PRINT_RE_AST
    9796    std::cerr << "NameMap:\n" << nameMap.printMap() << std::endl;
    9897    #endif
    99 
    100    
    10198   
    10299    re_ast = RE_Simplifier::simplify(re_ast);
     
    110107
    111108    CC_Compiler cc_compiler(main, encoding, enable_multiplexing);
    112     auto basisBits = cc_compiler.compile(nameMap);
     109   
     110    cc_compiler.compileByteClasses(re_ast);
     111   
     112    auto basisBits = cc_compiler.getBasisBits(nameMap);
    113113    #ifdef DEBUG_PRINT_PBIX_AST
    114114    //Print to the terminal the AST that was generated by the character class compiler.
     
    116116    #endif
    117117
     118   
     119   
     120   
    118121    RE_Compiler re_compiler(main, nameMap);
    119122    re_compiler.initializeRequiredStreams(cc_compiler);
Note: See TracChangeset for help on using the changeset viewer.