aboutsummaryrefslogtreecommitdiff
path: root/src/regex/test_regex_proofs.c
diff options
context:
space:
mode:
authorMaximilian Szengel <gnunet@maxsz.de>2012-10-26 14:33:59 +0000
committerMaximilian Szengel <gnunet@maxsz.de>2012-10-26 14:33:59 +0000
commit7a741b2fa8c96076f8b05a2d08e4b6b3ba78360b (patch)
treebd6c9d2d20fe9fb8f405075e929b3056cdd67736 /src/regex/test_regex_proofs.c
parent993a74c191842519ad6c82216fb7a0ee2bb09456 (diff)
downloadgnunet-7a741b2fa8c96076f8b05a2d08e4b6b3ba78360b.tar.gz
gnunet-7a741b2fa8c96076f8b05a2d08e4b6b3ba78360b.zip
- Added path compression parameter to DFA construction API
- Moved NFA construction to internal header - Added regex simulation profiler (for profiling the NFA, that results by merging several DFAs in the DHT, in a database)
Diffstat (limited to 'src/regex/test_regex_proofs.c')
-rw-r--r--src/regex/test_regex_proofs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/regex/test_regex_proofs.c b/src/regex/test_regex_proofs.c
index 8ccbe00ad..a5e049fba 100644
--- a/src/regex/test_regex_proofs.c
+++ b/src/regex/test_regex_proofs.c
@@ -46,10 +46,10 @@ test_proof (const char *regex)
46 char *c_rx1; 46 char *c_rx1;
47 const char *c_rx2; 47 const char *c_rx2;
48 48
49 dfa = GNUNET_REGEX_construct_dfa (regex, strlen (regex)); 49 dfa = GNUNET_REGEX_construct_dfa (regex, strlen (regex), 1);
50 c_rx1 = GNUNET_strdup (GNUNET_REGEX_get_canonical_regex (dfa)); 50 c_rx1 = GNUNET_strdup (GNUNET_REGEX_get_canonical_regex (dfa));
51 GNUNET_REGEX_automaton_destroy (dfa); 51 GNUNET_REGEX_automaton_destroy (dfa);
52 dfa = GNUNET_REGEX_construct_dfa (c_rx1, strlen (c_rx1)); 52 dfa = GNUNET_REGEX_construct_dfa (c_rx1, strlen (c_rx1), 1);
53 c_rx2 = GNUNET_REGEX_get_canonical_regex (dfa); 53 c_rx2 = GNUNET_REGEX_get_canonical_regex (dfa);
54 54
55 error = (0 == strcmp (c_rx1, c_rx2)) ? 0 : 1; 55 error = (0 == strcmp (c_rx1, c_rx2)) ? 0 : 1;
@@ -126,8 +126,8 @@ test_proofs_static (void)
126 126
127 for (i = 0; i < 8; i += 2) 127 for (i = 0; i < 8; i += 2)
128 { 128 {
129 dfa1 = GNUNET_REGEX_construct_dfa (regex[i], strlen (regex[i])); 129 dfa1 = GNUNET_REGEX_construct_dfa (regex[i], strlen (regex[i]), 1);
130 dfa2 = GNUNET_REGEX_construct_dfa (regex[i + 1], strlen (regex[i + 1])); 130 dfa2 = GNUNET_REGEX_construct_dfa (regex[i + 1], strlen (regex[i + 1]), 1);
131 131
132 canon_rx1 = GNUNET_REGEX_get_canonical_regex (dfa1); 132 canon_rx1 = GNUNET_REGEX_get_canonical_regex (dfa1);
133 canon_rx2 = GNUNET_REGEX_get_canonical_regex (dfa2); 133 canon_rx2 = GNUNET_REGEX_get_canonical_regex (dfa2);