home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gnurx.zip / rx / rxanal.h < prev    next >
C/C++ Source or Header  |  1995-12-31  |  3KB  |  106 lines

  1. /* classes: h_files */
  2.  
  3. #ifndef RXANALH
  4. #define RXANALH
  5. /***********************************************************
  6.  
  7. Copyright 1995 by Tom Lord
  8.  
  9.                         All Rights Reserved
  10.  
  11. Permission to use, copy, modify, and distribute this software and its 
  12. documentation for any purpose and without fee is hereby granted, 
  13. provided that the above copyright notice appear in all copies and that
  14. both that copyright notice and this permission notice appear in 
  15. supporting documentation, and that the name of the copyright holder not be
  16. used in advertising or publicity pertaining to distribution of the
  17. software without specific, written prior permission.  
  18.  
  19. Tom Lord DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  20. INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  21. EVENT SHALL TOM LORD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  22. CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  23. USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  24. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  25. PERFORMANCE OF THIS SOFTWARE.
  26.  
  27. ******************************************************************/
  28.  
  29.  
  30.  
  31. #include "rxcset.h"
  32. #include "rxnode.h"
  33. #include "rxsuper.h"
  34.  
  35.  
  36.  
  37.  
  38. enum rx_answers
  39. {
  40.   rx_yes = 0,
  41.   rx_no = 1,
  42.   rx_maybe = 2,
  43.   rx_bogus = -1,
  44.   rx_start_state_with_too_many_futures = rx_bogus - 1,
  45.   /* n < 0 -- error */
  46. };
  47.  
  48. struct rx_classical_system
  49. {
  50.   struct rx * rx;
  51.   struct rx_superstate * state;
  52. };
  53.  
  54.  
  55.  
  56. #ifdef __STDC__
  57. extern int rx_posix_analyze_rexp (struct rexp_node *** subexps,
  58.                   int * n_subexps,
  59.                   struct rexp_node * node,
  60.                   int id);
  61. extern int rx_fill_in_fastmap (int cset_size, unsigned char * map, struct rexp_node * exp);
  62. extern int rx_is_anchored_p (struct rexp_node * exp);
  63. extern enum rx_answers rx_start_superstate (struct rx_classical_system * frame);
  64. extern enum rx_answers rx_match_here_p (struct rx_classical_system * frame,
  65.                     unsigned char * burst,
  66.                     int len);
  67. extern enum rx_answers rx_fit_p (struct rx_classical_system * frame,
  68.                  unsigned char * burst,
  69.                  int len);
  70. extern enum rx_answers rx_longest (int * last_matched,
  71.                    int base_addr,
  72.                    struct rx_classical_system * frame,
  73.                    unsigned char * burst,
  74.                    int len);
  75. extern enum rx_answers rx_advance (struct rx_classical_system * frame,
  76.                    unsigned char * burst, int len);
  77. extern void rx_terminate_system (struct rx_classical_system * frame);
  78. extern void rx_init_system (struct rx_classical_system * frame, struct rx * rx);
  79.  
  80. #else /* STDC */
  81. extern int rx_posix_analyze_rexp ();
  82. extern int rx_fill_in_fastmap ();
  83. extern int rx_is_anchored_p ();
  84. extern enum rx_answers rx_start_superstate ();
  85. extern enum rx_answers rx_match_here_p ();
  86. extern enum rx_answers rx_fit_p ();
  87. extern enum rx_answers rx_longest ();
  88. extern enum rx_answers rx_advance ();
  89. extern void rx_terminate_system ();
  90. extern void rx_init_system ();
  91.  
  92. #endif /* STDC */
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105. #endif  /* RXANALH */
  106.