nfa: switch to using bytecode_ptr<NFA>

This commit is contained in:
Justin Viiret
2017-04-03 17:21:37 +10:00
committed by Matthew Barr
parent 905ac78061
commit a197074c5d
27 changed files with 251 additions and 241 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2016, Intel Corporation
* Copyright (c) 2015-2017, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -26,7 +26,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/** \file
/**
* \file
* \brief Large Bounded Repeat (LBR) engine build code.
*/
@@ -34,7 +35,7 @@
#define NG_LBR_H
#include "ue2common.h"
#include "util/alloc.h"
#include "util/bytecode_ptr.h"
#include <memory>
#include <vector>
@@ -51,14 +52,16 @@ struct CompileContext;
struct Grey;
/** \brief Construct an LBR engine from the given graph \p g. */
aligned_unique_ptr<NFA>
bytecode_ptr<NFA>
constructLBR(const NGHolder &g,
const std::vector<std::vector<CharReach>> &triggers,
const CompileContext &cc, const ReportManager &rm);
/** \brief Construct an LBR engine from the given CastleProto, which should
* contain only one repeat. */
aligned_unique_ptr<NFA>
/**
* \brief Construct an LBR engine from the given CastleProto, which should
* contain only one repeat.
*/
bytecode_ptr<NFA>
constructLBR(const CastleProto &proto,
const std::vector<std::vector<CharReach>> &triggers,
const CompileContext &cc, const ReportManager &rm);