Ignore:
Timestamp:
Jan 19, 2017, 2:41:02 PM (3 years ago)
Author:
nmedfort
Message:

Code clean-up. Removed Pablo Call, SetIthBit? and Prototype.

File:
1 edited

Legend:

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

    r5241 r5267  
    1313#include <re/re_name.h>
    1414#include <re/re_alt.h>
     15#include <re/re_any.h>
    1516#include <re/re_end.h>
    1617#include <re/re_rep.h>
     
    2829#include <algorithm>
    2930#include <iostream>
     31#include <llvm/Support/Casting.h>
     32#include <llvm/Support/ErrorHandling.h>
     33
     34using namespace llvm;
    3035
    3136namespace re {
    32    
     37
     38template<typename T, typename... Args>
     39std::unique_ptr<T> make_unique(Args&&... args) {
     40    return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
     41}
    3342
    3443RE * RE_Parser::parse(const std::string & regular_expression, ModeFlagSet initialFlags, RE_Syntax syntax) {
     
    3645    switch (syntax) {
    3746        case RE_Syntax::PCRE:
    38             parser = llvm::make_unique<RE_Parser_PCRE>(regular_expression);
     47            parser = make_unique<RE_Parser_PCRE>(regular_expression);
    3948            break;
    4049        case RE_Syntax::ERE:
    41             parser = llvm::make_unique<RE_Parser_ERE>(regular_expression);
     50            parser = make_unique<RE_Parser_ERE>(regular_expression);
    4251            break;
    4352        case RE_Syntax ::BRE:
    44             parser = llvm::make_unique<RE_Parser_BRE>(regular_expression);
     53            parser = make_unique<RE_Parser_BRE>(regular_expression);
    4554            break;
    4655        case RE_Syntax ::PROSITE:
    47             parser = llvm::make_unique<RE_Parser_PROSITE>(regular_expression);
     56            parser = make_unique<RE_Parser_PROSITE>(regular_expression);
    4857            break;
    4958        default:
     
    11281137}
    11291138
    1130 }
     1139LLVM_ATTRIBUTE_NORETURN void RE_Parser::ParseFailure(std::string errmsg) {
     1140    llvm::report_fatal_error(errmsg);
     1141}
     1142
     1143}
Note: See TracChangeset for help on using the changeset viewer.