mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
Logical Combination: bypass combination flag in hs_expression_info.
Fixes github issue #291
This commit is contained in:
parent
decabdfede
commit
c1659b8544
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2020, Intel Corporation
|
||||
* Copyright (c) 2015-2021, Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@ -517,6 +517,12 @@ hs_error_t hs_expression_info_int(const char *expression, unsigned int flags,
|
||||
return HS_COMPILER_ERROR;
|
||||
}
|
||||
|
||||
if (flags & HS_FLAG_COMBINATION) {
|
||||
*error = generateCompileError("Invalid parameter: unsupported "
|
||||
"logical combination expression", -1);
|
||||
return HS_COMPILER_ERROR;
|
||||
}
|
||||
|
||||
*info = nullptr;
|
||||
*error = nullptr;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2020, Intel Corporation
|
||||
* Copyright (c) 2015-2021, Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@ -748,10 +748,7 @@ hs_error_t HS_CDECL hs_free_compile_error(hs_compile_error_t *error);
|
||||
* - HS_FLAG_PREFILTER - Compile pattern in prefiltering mode.
|
||||
* - HS_FLAG_SOM_LEFTMOST - Report the leftmost start of match offset
|
||||
* when a match is found.
|
||||
* - HS_FLAG_COMBINATION - Parse the expression in logical combination
|
||||
* syntax.
|
||||
* - HS_FLAG_QUIET - Ignore match reporting for this expression. Used for
|
||||
* the sub-expressions in logical combinations.
|
||||
* - HS_FLAG_QUIET - This flag will be ignored.
|
||||
*
|
||||
* @param info
|
||||
* On success, a pointer to the pattern information will be returned in
|
||||
@ -814,10 +811,7 @@ hs_error_t HS_CDECL hs_expression_info(const char *expression,
|
||||
* - HS_FLAG_PREFILTER - Compile pattern in prefiltering mode.
|
||||
* - HS_FLAG_SOM_LEFTMOST - Report the leftmost start of match offset
|
||||
* when a match is found.
|
||||
* - HS_FLAG_COMBINATION - Parse the expression in logical combination
|
||||
* syntax.
|
||||
* - HS_FLAG_QUIET - Ignore match reporting for this expression. Used for
|
||||
* the sub-expressions in logical combinations.
|
||||
* - HS_FLAG_QUIET - This flag will be ignored.
|
||||
*
|
||||
* @param ext
|
||||
* A pointer to a filled @ref hs_expr_ext_t structure that defines
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019, Intel Corporation
|
||||
* Copyright (c) 2019-2021, Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@ -80,7 +80,9 @@ extern "C"
|
||||
| HS_FLAG_PREFILTER \
|
||||
| HS_FLAG_SINGLEMATCH \
|
||||
| HS_FLAG_ALLOWEMPTY \
|
||||
| HS_FLAG_SOM_LEFTMOST)
|
||||
| HS_FLAG_SOM_LEFTMOST \
|
||||
| HS_FLAG_COMBINATION \
|
||||
| HS_FLAG_QUIET)
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
Loading…
x
Reference in New Issue
Block a user