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
546B

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