source: trunk/third/rx/rx/rxspencer.h @ 10430

Revision 10430, 2.6 KB checked in by ghudson, 27 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r10429, which included commits to RCS files with non-trunk default branches.
Line 
1/* classes: h_files */
2
3#ifndef RXSPENCERH
4#define RXSPENCERH
5/*      Copyright (C) 1995, 1996 Tom Lord
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Library General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public License
18 * along with this software; see the file COPYING.  If not, write to
19 * the Free Software Foundation, 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
21 */
22
23
24
25#include "rxproto.h"
26#include "rxnode.h"
27#include "rxunfa.h"
28#include "rxanal.h"
29#include "inst-rxposix.h"
30
31
32
33#define RX_MANY_CASES 30
34
35
36typedef enum rx_answers (*rx_vmfn)
37     P((void * closure,
38        unsigned const char ** burst, int * len, int * offset,
39        int start, int end, int need));
40
41typedef enum rx_answers (*rx_contextfn)
42     P((void * closure,
43        struct rexp_node * node,
44        int start, int end,
45        struct rx_registers * regs));
46
47
48struct rx_solutions
49{
50  int step;
51
52  int cset_size;
53  struct rexp_node * exp;
54  struct rexp_node ** subexps;
55  struct rx_registers * regs;
56
57  int start;
58  int end;
59
60  rx_vmfn vmfn;
61  rx_contextfn contextfn;
62  void * closure;
63
64  struct rx_unfaniverse * verse;
65  struct rx_unfa * dfa;
66  struct rx_classical_system match_engine;
67  struct rx_unfa * left_dfa;
68  struct rx_classical_system left_match_engine;
69
70  int split_guess;
71  struct rx_solutions * left;
72  struct rx_solutions * right;
73
74  int interval_x;
75
76  int saved_rm_so;
77  int saved_rm_eo;
78
79  int final_tag;
80};
81
82extern struct rx_solutions rx_no_solutions;
83
84
85#ifdef __STDC__
86extern struct rx_solutions * rx_make_solutions (struct rx_registers * regs, struct rx_unfaniverse * verse, struct rexp_node * expression, struct rexp_node ** subexps, int cset_size, int start, int end, rx_vmfn vmfn, rx_contextfn contextfn, void * closure);
87extern void rx_free_solutions (struct rx_solutions * solns);
88extern int rx_best_end_guess (struct rx_solutions * solns, struct rexp_node *  exp, int bound);
89extern enum rx_answers rx_next_solution (struct rx_solutions * solns);
90
91#else /* STDC */
92extern struct rx_solutions * rx_make_solutions ();
93extern void rx_free_solutions ();
94extern int rx_best_end_guess ();
95extern enum rx_answers rx_next_solution ();
96
97#endif /* STDC */
98
99#endif  /* RXSPENCERH */
Note: See TracBrowser for help on using the repository browser.