mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
hs_expression_info: check unsupported constructs
This commit is contained in:
parent
aad55e1b72
commit
9589ee9f90
@ -44,6 +44,7 @@
|
|||||||
#include "parser/parse_error.h"
|
#include "parser/parse_error.h"
|
||||||
#include "parser/Parser.h"
|
#include "parser/Parser.h"
|
||||||
#include "parser/prefilter.h"
|
#include "parser/prefilter.h"
|
||||||
|
#include "parser/unsupported.h"
|
||||||
#include "util/compile_error.h"
|
#include "util/compile_error.h"
|
||||||
#include "util/cpuid_flags.h"
|
#include "util/cpuid_flags.h"
|
||||||
#include "util/depth.h"
|
#include "util/depth.h"
|
||||||
@ -376,6 +377,14 @@ hs_error_t hs_expression_info_int(const char *expression, unsigned int flags,
|
|||||||
prefilterTree(pe.component, ParseMode(flags));
|
prefilterTree(pe.component, ParseMode(flags));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Expressions containing zero-width assertions and other extended pcre
|
||||||
|
// types aren't supported yet. This call will throw a ParseError
|
||||||
|
// exception if the component tree contains such a construct.
|
||||||
|
checkUnsupported(*pe.component);
|
||||||
|
|
||||||
|
pe.component->checkEmbeddedStartAnchor(true);
|
||||||
|
pe.component->checkEmbeddedEndAnchor(true);
|
||||||
|
|
||||||
auto built_expr = buildGraph(rm, cc, pe);
|
auto built_expr = buildGraph(rm, cc, pe);
|
||||||
unique_ptr<NGHolder> &g = built_expr.g;
|
unique_ptr<NGHolder> &g = built_expr.g;
|
||||||
ExpressionInfo &expr = built_expr.expr;
|
ExpressionInfo &expr = built_expr.expr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user