- WiP
[oweals/gnunet.git] / src / regex / regex_internal.h
index c132f2e238d74cbb7333eb1dd24334df8f2bba92..3e4d0ca0ed0be9e19052d12b5fa52fa2359dddb3 100644 (file)
@@ -120,7 +120,7 @@ struct GNUNET_REGEX_State
 
   /**
    * Marking the state as contained. This is used for checking, if the state is
-   * contained in a set in constant time
+   * contained in a set in constant time.
    */
   int contained;
 
@@ -180,6 +180,11 @@ struct GNUNET_REGEX_State
    */
   struct GNUNET_REGEX_Transition *transitions_tail;
 
+  /**
+   * Number of incoming transitions. Used for compressing DFA paths.
+   */
+  unsigned int incoming_transition_count;
+
   /**
    * Set of states on which this state is based on. Used when creating a DFA out
    * of several NFA states.
@@ -253,6 +258,11 @@ struct GNUNET_REGEX_Automaton
    * Canonical regex (result of RX->NFA->DFA->RX)
    */
   char *canonical_regex;
+
+  /**
+   * GNUNET_YES, if multi strides have been added to the Automaton.
+   */
+  int is_multistrided;
 };
 
 
@@ -368,9 +378,9 @@ struct GNUNET_REGEX_Context
  * @param stride_len length of the strides.
  */
 void
-GNUNET_REGEX_add_multi_strides_to_dfa (struct GNUNET_REGEX_Context *regex_ctx,
-                                       struct GNUNET_REGEX_Automaton *dfa,
-                                       const unsigned int stride_len);
+GNUNET_REGEX_dfa_add_multi_strides (struct GNUNET_REGEX_Context *regex_ctx,
+                                    struct GNUNET_REGEX_Automaton *dfa,
+                                    const unsigned int stride_len);
 
 
 /**