280 Commits

Author SHA1 Message Date
Matthew Barr
3dc8bab78f Build convenience libraries as static libs 2016-04-20 13:34:55 +10:00
Matthew Barr
e10d2eb269 PrintTo functions for google test and valgrind 2016-04-20 13:34:54 +10:00
Justin Viiret
12921b7c97 Add hs_expression_ext_info() API function
This is a variant of hs_expression_info() that can also accept extended
parameters.
2016-04-20 13:34:54 +10:00
Justin Viiret
cf00094f24 Remove more unused structures from unit tests
The NFA, LBR no longer need scratch or the NFAContext structure stored
outside the NFA stack.
2016-03-01 11:34:38 +11:00
Justin Viiret
c3860a9f29 NFA API: Remove unused scratch ptr from struct mq 2016-03-01 11:34:38 +11:00
Justin Viiret
58f9617f66 NFA API: Remove nfaBlockExecReverse scratch arg
Scratch is no longer used by this function's implementations.
2016-03-01 11:34:38 +11:00
Justin Viiret
3e002f8181 NFA: Move NFAContext to stack (from scratch) 2016-03-01 11:34:38 +11:00
Justin Viiret
98eff64edf ng_prefilter: turn large max bound into inf
During prefilter region replacement, turn regions with very large max
bounds into repeats with inf max bound. This improves compile time and
the likelihood that we will actually be able to build an implementation
for such patterns.
2016-03-01 11:22:45 +11:00
Anatoly Burakov
fb932616ca Multibyte matcher unit-tests 2016-03-01 11:21:39 +11:00
Anatoly Burakov
e6709cee5f Bitmatcher unit-tests 2016-03-01 11:21:39 +11:00
Alex Coyte
a7d8dafb71 detach the sidecar 2016-03-01 11:13:23 +11:00
Alex Coyte
05beadf52f Introduce REPEAT_ALWAYS model for {0,} castle repeats
As Castle guards the repeats, no more state is needed for these repeats
2016-03-01 11:10:20 +11:00
Justin Viiret
15c2980948 Make key 64 bits where large shifts may be used.
This fixes a long-standing issue with large multibit structures.
2015-12-07 09:38:32 +11:00
Justin Viiret
fd19168025 Restore \Q..\E support in character classes 2015-11-18 15:27:05 +11:00
Matthew Barr
f65170da5b cmake: improve build paths for nested builds
If Hyperscan is built as a subproject of another cmake project, it helps to
refer to PROJECT_xx_DIR instead of CMAKE_xx_DIR, etc.
2015-11-10 14:36:39 +11:00
Matthew Barr
b9d3b73ab8 Fix includes to meet our usual guidelines 2015-11-10 14:36:39 +11:00
Justin Viiret
9cffa7666f Refine ComponentClass::class_empty
ComponentClass::class_empty should only be used on finalized classes to
determine whether a given class contains any elements; it should not
take the cr_ucp or cps_ucp into account, as they have been folden in by
the finalize call.

Fixes our failure to identify that the pattern /[^\D\d]/8W can never
match.
2015-11-10 14:36:39 +11:00
Justin Viiret
9a7b912a5d Rework parser rejection for POSIX collating elems
Implement rejection of POSIX collating elements ("[.ch.]" and "[=ch=]"
entirely in the Ragel parser, using the same approach both inside and
ouside character classes.

Fix buggy rejection of [^.ch.], which we should accept as a character
class.
2015-11-10 14:36:39 +11:00
Justin Viiret
2603be3924 storeInitialRingTopPatch: fix large delta bug
Check for staleness up front, so that it is safe to use u32 values to
handle adding more tops.

Adds LargeGap unit tests.
2015-11-10 14:36:38 +11:00
Justin Viiret
a083bcfa8d repeat: use u32 arithmetic explicitly
In some ring-based models, we know that if the ring is not stale, then
all our bounds should fit within 32-bits. This change makes these
explicitly u32 rather than implicitly narrowing later on.
2015-11-10 14:36:38 +11:00
Matthew Barr
aa674e4e47 unit: Don't run unit-internal in release build 2015-10-30 11:28:38 +11:00
Justin Viiret
1afc591c30 Check for (and throw on) large min repeat
We were only checking for large maximum bounds, which meant that we
would attempt to compile A{N,} where N is huge.
2015-10-30 11:28:37 +11:00
Justin Viiret
e67b8032f7 Unbreak unit-internal for builds w/o dump support
Use printable, rather than escapeString.
2015-10-30 11:28:37 +11:00
Justin Viiret
9ff1303cd8 Allow no scratch for stream reset API calls
Bring hs_reset_stream(), hs_reset_and_copy_stream()'s functionality into
line with hs_close_stream() by accepting a NULL scratch if and only if
the match callback is also NULL, indicating that no matches should be
delivered.
2015-10-30 11:28:37 +11:00
Justin Viiret
a2f2e11e60 sidecar: use aligned_zmalloc_unique 2015-10-30 11:28:37 +11:00
Justin Viiret
441329f15a FDRp tests: less raw malloc/free 2015-10-30 11:28:37 +11:00
Justin Viiret
4a98c664b4 HyperscanScanGigabytesMatch: use a vector 2015-10-30 11:28:37 +11:00
Justin Viiret
9578ae6ee2 nfagraph_find_matches: simplify/cleanup 2015-10-30 11:28:37 +11:00
Justin Viiret
a5660ee3d4 nfagraph_comp: use common constructGraph 2015-10-30 11:28:37 +11:00
Matthew Barr
904e436f11 Initial commit of Hyperscan 2015-10-20 09:13:35 +11:00