Source code of Windows XP (NT5)
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.

79 lines
2.3 KiB

  1. /* re.h - common include files for regular expression compilers
  2. */
  3. RE_OPCODE *REip; /* instruction pointer to compiled */
  4. struct patType *REPat; /* pointer to pattern being compiled */
  5. int REArg; /* count of tagged args parsed */
  6. /* defined actions for parsing */
  7. #define ACTIONMIN 0
  8. #define PROLOG 0
  9. #define LEFTARG 1
  10. #define RIGHTARG 2
  11. #define SMSTAR 3
  12. #define SMSTAR1 4
  13. #define STAR 5
  14. #define STAR1 6
  15. #define ANY 7
  16. #define BOL 8
  17. #define EOL 9
  18. #define NOTSIGN 10
  19. #define NOTSIGN1 11
  20. #define LETTER 12
  21. #define LEFTOR 13
  22. #define ORSIGN 14
  23. #define RIGHTOR 15
  24. #define CCLBEG 16
  25. #define CCLNOT 17
  26. #define RANGE 18
  27. #define EPILOG 19
  28. #define PREV 20
  29. #define ACTIONMAX 20
  30. /* function forward declarations */
  31. char fREMatch (struct patType *,char *,char *,char );
  32. struct patType * RECompile (char *, flagType, flagType);
  33. char REGetArg (struct patType *,int ,char *);
  34. char RETranslate (struct patType *,char *,char *);
  35. int RETranslateLength (struct patType *,char *);
  36. int RELength (struct patType *,int );
  37. char * REStart (struct patType *);
  38. typedef UINT_PTR ACT (unsigned int, UINT_PTR, unsigned char, unsigned char);
  39. typedef ACT *PACT;
  40. UINT_PTR CompileAction(unsigned int, UINT_PTR, unsigned char, unsigned char);
  41. UINT_PTR EstimateAction(unsigned int, UINT_PTR, unsigned char, unsigned char);
  42. UINT_PTR NullAction(unsigned int, UINT_PTR, unsigned char, unsigned char);
  43. int RECharType (char *);
  44. int RECharLen (char *);
  45. int REClosureLen (char *);
  46. char * REParseRE (PACT, char *,int *);
  47. char * REParseE (PACT,char *);
  48. char * REParseSE (PACT,char *);
  49. char * REParseClass (PACT,char *);
  50. char * REParseAny (PACT,char *);
  51. char * REParseBOL (PACT,char *);
  52. char * REParsePrev (PACT, char *);
  53. char * REParseEOL (PACT,char *);
  54. char * REParseAlt (PACT,char *);
  55. char * REParseNot (PACT,char *);
  56. char * REParseAbbrev (PACT,char *);
  57. char * REParseChar (PACT,char *);
  58. char * REParseClosure (PACT,char *);
  59. char * REParseGreedy (PACT,char *);
  60. char * REParsePower (PACT,char *);
  61. char REClosureChar (char *);
  62. char Escaped (char );
  63. void REStackOverflow (void);
  64. void REEstimate (char *);
  65. #ifdef DEBUG
  66. void REDump (struct patType *p);
  67. #endif