Highlight things
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
599B

  1. #ifndef REGEX_H
  2. #include <stdbool.h>
  3. #include "vector.h"
  4. extern bool is_case_on;
  5. typedef struct {
  6. int accepting_state;
  7. char * str;
  8. vector_t delta_table; // <delta_t>
  9. vector_t catch_table; // <offshoot_t>
  10. } regex_t;
  11. extern regex_t * regex_compile(const char * const pattern);
  12. extern int regex_free(regex_t * const regex);
  13. extern bool regex_search(regex_t * regex, const char * const string);
  14. extern int regex_match(regex_t * regex, const char * const string, const bool start_of_string, const int string_offset);
  15. extern bool is_magic(const char c);
  16. #define REGEX_H
  17. #endif