engine.ih 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /* ========= begin header generated by ./mkh ========= */
  2. #ifdef __cplusplus
  3. extern "C" {
  4. #endif
  5. /* === engine.c === */
  6. static int matcher(register struct re_guts *g, unsigned char *string, size_t nmatch, regmatch_t pmatch[], int eflags);
  7. static unsigned char *dissect(register struct match *m, unsigned char *start, unsigned char *stop, sopno startst, sopno stopst);
  8. static unsigned char *backref(register struct match *m, unsigned char *start, unsigned char *stop, sopno startst, sopno stopst, sopno lev);
  9. static unsigned char *fast(register struct match *m, unsigned char *start, unsigned char *stop, sopno startst, sopno stopst);
  10. static unsigned char *slow(register struct match *m, unsigned char *start, unsigned char *stop, sopno startst, sopno stopst);
  11. static states step(register struct re_guts *g, sopno start, sopno stop, register states bef, int ch, register states aft);
  12. #define BOL (OUT+1)
  13. #define EOL (BOL+1)
  14. #define BOLEOL (BOL+2)
  15. #define NOTHING (BOL+3)
  16. #define BOW (BOL+4)
  17. #define EOW (BOL+5)
  18. #define CODEMAX (BOL+5) /* highest code used */
  19. #define NONCHAR(c) ((c) > UCHAR_MAX)
  20. #define NNONCHAR (CODEMAX-UCHAR_MAX)
  21. #ifdef REDEBUG
  22. static void print(struct match *m, unsigned char *caption, states st, int ch, FILE *d);
  23. #endif
  24. #ifdef REDEBUG
  25. static void at(struct match *m, unsigned char *title, unsigned char *start, unsigned char *stop, sopno startst, sopno stopst);
  26. #endif
  27. #ifdef REDEBUG
  28. static unsigned char *pchar(int ch);
  29. #endif
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33. /* ========= end header generated by ./mkh ========= */