diff options
| author | dgp@users.sourceforge.net <dgp> | 2013-03-05 14:04:17 (GMT) |
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2013-03-05 14:04:17 (GMT) |
| commit | 121af6ba46161e56a01d779526d843848b5b77cf (patch) | |
| tree | 4245df95b6512abc0fbd9bf25b52e1665d3106e3 /generic/regcomp.c | |
| parent | a0ffc5e15b6da228351f5836041eb8b1af7d9f3f (diff) | |
| download | tcl-121af6ba46161e56a01d779526d843848b5b77cf.zip tcl-121af6ba46161e56a01d779526d843848b5b77cf.tar.gz tcl-121af6ba46161e56a01d779526d843848b5b77cf.tar.bz2 | |
Contributed regexp engine patch from Tom Lane. Backports clean from trunk.
Diffstat (limited to 'generic/regcomp.c')
| -rw-r--r-- | generic/regcomp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/regcomp.c b/generic/regcomp.c index ca4fc01..7116d82 100644 --- a/generic/regcomp.c +++ b/generic/regcomp.c @@ -121,12 +121,16 @@ static void destroystate(struct nfa *, struct state *); static void newarc(struct nfa *, int, pcolor, struct state *, struct state *); static struct arc *allocarc(struct nfa *, struct state *); static void freearc(struct nfa *, struct arc *); +static int nonemptyouts(struct state *); +static int nonemptyins(struct state *); static struct arc *findarc(struct state *, int, pcolor); static void cparc(struct nfa *, struct arc *, struct state *, struct state *); static void moveins(struct nfa *, struct state *, struct state *); static void copyins(struct nfa *, struct state *, struct state *); +static void copynonemptyins(struct nfa *, struct state *, struct state *); static void moveouts(struct nfa *, struct state *, struct state *); static void copyouts(struct nfa *, struct state *, struct state *); +static void copynonemptyouts(struct nfa *, struct state *, struct state *); static void cloneouts(struct nfa *, struct state *, struct state *, struct state *, int); static void delsub(struct nfa *, struct state *, struct state *); static void deltraverse(struct nfa *, struct state *, struct state *); @@ -144,7 +148,8 @@ static int push(struct nfa *, struct arc *); #define COMPATIBLE 3 /* compatible but not satisfied yet */ static int combine(struct arc *, struct arc *); static void fixempties(struct nfa *, FILE *); -static int unempty(struct nfa *, struct arc *); +static struct state *emptyreachable(struct state *, struct state *); +static void replaceempty(struct nfa *, struct state *, struct state *); static void cleanup(struct nfa *); static void markreachable(struct nfa *, struct state *, struct state *, struct state *); static void markcanreach(struct nfa *, struct state *, struct state *, struct state *); |
