Changeset 6178


Ignore:
Timestamp:
Oct 26, 2018, 2:08:11 PM (4 months ago)
Author:
cameron
Message:

RE Validation

Location:
icGREP/icgrep-devel/icgrep
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/CMakeLists.txt

    r6173 r6178  
    100100# RegExpADT is the core library for representing, parsing and printing regular expressions
    101101add_library(RegExpADT re/re_rep.cpp re/re_diff.cpp re/re_intersect.cpp re/re_range.cpp re/re_assertion.cpp re/printer_re.cpp re/re_utility.cpp)
    102 add_library(RegExpCompiler ${RE_PARSERS_SRC} re/casing.cpp re/to_utf8.cpp re/re_nullable.cpp re/re_simplifier.cpp re/re_star_normal.cpp re/re_minimizer.cpp re/re_local.cpp re/re_compiler.cpp re/re_analysis.cpp re/re_toolchain.cpp re/re_name_resolve.cpp re/re_name_gather.cpp re/collect_ccs.cpp re/re_multiplex.cpp re/re_utility.cpp re/grapheme_clusters.cpp re/exclude_CC.cpp re/replaceCC.cpp)
     102add_library(RegExpCompiler ${RE_PARSERS_SRC} re/casing.cpp re/to_utf8.cpp re/re_nullable.cpp re/re_simplifier.cpp re/re_star_normal.cpp re/re_minimizer.cpp re/re_local.cpp re/re_compiler.cpp re/re_analysis.cpp re/re_toolchain.cpp re/re_name_resolve.cpp re/re_name_gather.cpp re/collect_ccs.cpp re/re_multiplex.cpp re/re_utility.cpp re/grapheme_clusters.cpp re/exclude_CC.cpp re/replaceCC.cpp re/validation.cpp)
    103103add_library(UCDlib UCD/CaseFolding.cpp utf8_encoder.cpp utf16_encoder.cpp UCD/ucd_compiler.cpp UCD/PropertyObjects.cpp UCD/resolve_properties.cpp)
    104104add_library(GrepEngine  ${GREP_CORE_SRC} grep/grep_engine.cpp kernels/cc_kernel.cpp kernels/cc_scan_kernel.cpp kernels/charclasses.cpp kernels/streams_merge.cpp kernels/until_n.cpp kernels/UCD_property_kernel.cpp kernels/grapheme_kernel.cpp)
  • icGREP/icgrep-devel/icgrep/re/Unicode/decomposition.cpp

    r6172 r6178  
    4949        CC * cc = cast<CC>((*s)[pos]);
    5050        if (cc->empty()) return rslt;
     51        if (cc->getAlphabet() != &cc::Unicode) return rslt;
    5152        codepoint_t lo = lo_codepoint(cc->front());
    5253        codepoint_t hi = hi_codepoint(cc->back());
     
    154155
    155156RE * NFD_Transformer::transformCC(CC * cc) {
     157    if (cc->getAlphabet() != &cc::Unicode) return cc;
    156158    UnicodeSet mappingRequired = *cc & (canonicalMapped + HangulPrecomposed);
    157159    if (hasOption(mOptions, UCD::CaseFold)) {
  • icGREP/icgrep-devel/icgrep/re/re_toolchain.cpp

    r6177 r6178  
    3434#include <re/exclude_CC.h>
    3535#include <re/re_name_resolve.h>
     36
    3637#include <re/grapheme_clusters.h>
     38#include <re/validation.h>
    3739#include <llvm/Support/raw_ostream.h>
    3840#include <llvm/Support/ErrorHandling.h>
     
    6365                              CL_ENUM_VAL_SENTINEL), cl::cat(RegexOptions));
    6466
     67bool LLVM_READONLY PrintOptionIsSet(RE_PrintFlags flag) {
     68    return PrintOptions.isSet(flag);
     69}
     70
    6571bool LLVM_READONLY AlgorithmOptionIsSet(RE_AlgorithmFlags flag) {
    6672    return AlgorithmOptions.isSet(flag);
     
    7985    r = resolveGraphemeMode(r, false /* not in grapheme mode at top level*/);
    8086    r = re::resolveUnicodeNames(r);
     87    validateNamesDefined(r);
    8188    r = resolveCaseInsensitiveMode(r, globallyCaseInsensitive);
    8289    return r;
  • icGREP/icgrep-devel/icgrep/re/re_toolchain.h

    r6173 r6178  
    3232};
    3333   
     34bool LLVM_READONLY PrintOptionIsSet(RE_PrintFlags flag);
    3435bool LLVM_READONLY AlgorithmOptionIsSet(RE_AlgorithmFlags flag);
    3536   
Note: See TracChangeset for help on using the changeset viewer.