GNUnet  0.10.x
regex_test_lib.h
Go to the documentation of this file.
1 /*
2  * This file is part of GNUnet
3  * Copyright (C) 2012 GNUnet e.V.
4  *
5  * GNUnet is free software: you can redistribute it and/or modify it
6  * under the terms of the GNU Affero General Public License as published
7  * by the Free Software Foundation, either version 3 of the License,
8  * or (at your option) any later version.
9  *
10  * GNUnet is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
28 #ifndef REGEX_INTERNAL_TEST_LIB_H
29 #define REGEX_INTERNAL_TEST_LIB_H
30 
31 #include "regex_internal_lib.h"
32 
33 #ifdef __cplusplus
34 extern "C"
35 {
36  #if 0 /* keep Emacsens' auto-indent happy */
37 }
38 #endif
39 #endif
40 
41 
56 char *
57 REGEX_TEST_combine (char * const regexes[], unsigned int alphabet_size);
58 
59 
69 char **
71 
72 
78 void
79 REGEX_TEST_free_from_file (char **regexes);
80 
81 
95 char *
96 REGEX_TEST_generate_random_regex (size_t rx_length, char *matching_str);
97 
98 
108 char *
109 REGEX_TEST_generate_random_string (size_t max_len);
110 
111 
117 {
122 
128 
133 };
134 
135 
144 void
146  const char *filename,
148 
149 
150 
151 #if 0 /* keep Emacsens' auto-indent happy */
152 {
153  #endif
154  #ifdef __cplusplus
155 }
156 #endif
157 
158 /* end of regex_internal_lib.h */
159 #endif
char ** REGEX_TEST_read_from_file(const char *filename)
Read a set of regexes from a file, one per line and return them in an array suitable for REGEX_TEST_c...
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
The generated graph will include extra information such as the NFA states that were used to generate ...
Automaton representation.
REGEX_TEST_GraphSavingOptions
Options for graph creation function REGEX_TEST_automaton_save_graph.
char * REGEX_TEST_generate_random_regex(size_t rx_length, char *matching_str)
Generate a (pseudo) random regular expression of length &#39;rx_length&#39;, as well as a (optional) string t...
library to parse regular expressions into dfa
static char * filename
void REGEX_TEST_free_from_file(char **regexes)
Free all memory reserved for a set of regexes created by read_from_file.
Enable graph coloring.
char * REGEX_TEST_combine(char *const regexes[], unsigned int alphabet_size)
Combine an array of regexes into a single prefix-shared regex.
char * REGEX_TEST_generate_random_string(size_t max_len)
Generate a random string of maximum length &#39;max_len&#39; that only contains literals allowed in a regular...
void REGEX_TEST_automaton_save_graph(struct REGEX_INTERNAL_Automaton *a, const char *filename, enum REGEX_TEST_GraphSavingOptions options)
Save the given automaton as a GraphViz dot file.