Add support for approximate matching in other tools

This commit is contained in:
Anatoly Burakov
2017-02-10 15:45:09 +00:00
committed by Matthew Barr
parent 9f72dede5c
commit ebe849603b
3 changed files with 22 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Intel Corporation
* Copyright (c) 2016-2017, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -289,6 +289,10 @@ buildEngineHyperscan(const ExpressionMap &expressions, ScanMode scan_mode,
m.first);
return nullptr;
}
if (forceEditDistance) {
extparam.flags |= HS_EXT_FLAG_EDIT_DISTANCE;
extparam.edit_distance = editDistance;
}
exprs.push_back(expr);
ids.push_back(m.first);