| 1 |
Wed Jan 15 12:00:38 1997 Tom Lord <[email protected]> |
| 2 |
|
| 3 |
* rxsuper.c (rx_superset_cons): reference count tweak. |
| 4 |
|
| 5 |
* rxnode.c (rx_rexp_equal): fixed test for equality of |
| 6 |
interval expressions. |
| 7 |
|
| 8 |
* rxgnucomp.h (enum RE_SYNTAX_BITS): turned the syntax |
| 9 |
bits from "#define" into "enum" to ease debugging. |
| 10 |
|
| 11 |
Mon Jan 13 10:07:39 1997 Tom Lord <[email protected]> |
| 12 |
|
| 13 |
* rxsuper.c (rx_superset_cons): |
| 14 |
While hash_store will protect cdr itself it might first allocate hash |
| 15 |
tables and stuff which might cause it to be garbage collected before |
| 16 |
it's protected -- (from Greg Stark) |
| 17 |
|
| 18 |
* rxgnucomp.c (isa_blank): Test for ==, not != '\t'. |
| 19 |
(from Andreas Schwab) |
| 20 |
|
| 21 |
Tue Dec 3 00:33:27 1996 Tom Lord <[email protected]> |
| 22 |
|
| 23 |
* rxposix.c (regnexec): When testing to consider freeing REGS, |
| 24 |
watch out for PMATCH == NULL. |
| 25 |
|
| 26 |
* rxspencer.c (rx_next_solution): In case r_parens: Before trying |
| 27 |
to match a parenthesized subexpression, restore the corresponding |
| 28 |
regs to their value prior to attempting the match. If the match |
| 29 |
finally fails, be sure sure to restore the old values then, too. |
| 30 |
|
| 31 |
Mon Dec 2 00:52:06 1996 Tom Lord <[email protected]> |
| 32 |
|
| 33 |
* rxspencer.c (rx_next_solution): After "star_try_next_left_match:"... |
| 34 |
Only return yes from a star expression whose subexpression fails if |
| 35 |
the target string has 0 length. |
| 36 |
|
| 37 |
* rxposix.c (regnexec, regncomp): reversed the order of |
| 38 |
the string and string-length arguments to be more like |
| 39 |
other functions (e.g. strncmp). (Suggested by Mike Haertel) |
| 40 |
|
| 41 |
* inst-rxposix.h, rxgnucomp.h (REG_E*): moved declarations |
| 42 |
of POSIX error codes into the posix header file. |
| 43 |
|
| 44 |
* rxgnucomp.c (rx_parse): Don't permit a backreference to |
| 45 |
an enclosing subexpression. This change returns some code that |
| 46 |
was bogusly deleted somewhere along the line. This fixes |
| 47 |
a bug that causes a pattern such as: ((.*)\1)x to core dump. |
| 48 |
(Reported by Mike Haertel) |
| 49 |
|
| 50 |
Sun Nov 24 04:24:13 1996 Tom Lord <[email protected]> |
| 51 |
|
| 52 |
* rxposix.c (rx_regexec): Added a new optimization |
| 53 |
that generalizes the fastmap. The new optimization is applied |
| 54 |
if the length of the string exceeds RX_MANY_CASES. |
| 55 |
|
| 56 |
Fri Nov 8 09:07:14 1996 Tom Lord <[email protected]> |
| 57 |
|
| 58 |
* rxsuper.h (RX_DEFAULT_DFA_CACHE_SIZE): |
| 59 |
* rxbasic.h (RX_DEFAULT_NFA_DELAY): |
| 60 |
New macros so these values can be set at compile time. |
| 61 |
|
| 62 |
Tue Nov 5 09:37:03 1996 Tom Lord <[email protected]> |
| 63 |
|
| 64 |
* rxspencer.c (rx_make_solutions): watch out for solns->exp == NULL. |
| 65 |
|
| 66 |
Eric Johnson ([email protected]) detected this bug and |
| 67 |
also performed useful testing of Rx memory management. |
| 68 |
|
| 69 |
Tue Jun 18 11:44:46 1996 Tom Lord <lord@beehive> |
| 70 |
|
| 71 |
* rxanal.c (rx_start_superstate): Don't release an old superstate |
| 72 |
unless it is known that the new superstate has been successfully |
| 73 |
constructed. |
| 74 |
|
| 75 |
Thu Jun 13 11:18:25 1996 Tom Lord <lord@beehive> |
| 76 |
|
| 77 |
* rxspencer.c etc. (rx_next_solution et al.): remove all traces of rx_maybe |
| 78 |
|
| 79 |
Wed May 22 12:28:22 1996 Tom Lord <lord@beehive> |
| 80 |
|
| 81 |
* rxanal.c (rx_start_superstate): Preserve the invariant |
| 82 |
that a locked superstate is never semifree. |
| 83 |
|
| 84 |
Fri May 17 10:21:26 1996 Tom Lord <lord@beehive> |
| 85 |
|
| 86 |
* rgx.c (scm_regexec): added match data support for |
| 87 |
"#\c" -- the final_tag of the match (for the cut operator). |
| 88 |
|
| 89 |
* rxspencer.c (rx_next_solution): propogate is_final data |
| 90 |
up through the tree of solution streams. |
| 91 |
|
| 92 |
* rxnfa.h (struct rx_nfa_state): |
| 93 |
unsigned int is_final:1 => int is_final for the cut |
| 94 |
operator. |
| 95 |
|
| 96 |
* rxanal.c (rx_match_here_p): |
| 97 |
* rxanal.c (rx_fit_p): |
| 98 |
* rxanal.c (rx_longest): When a final state is detected, |
| 99 |
propogate the value of the is_final flag back to the |
| 100 |
caller. It may contain data generated by a "cut" operator. |
| 101 |
|
| 102 |
* rxsuper.c (superset_allocator): when marking a superset |
| 103 |
final, mark it with the maximum of the is_final fields |
| 104 |
of the constituent nfa states (for the "cut" operator which |
| 105 |
allows users to set that value). |
| 106 |
|
| 107 |
* rxgnucomp.c (rx_parse): Replace "[[:set...:]]" with |
| 108 |
"[[:cut n:]]". cut is regular but set is not, so cut |
| 109 |
leads to much faster running patterns. |
| 110 |
|
| 111 |
* rxnfa.c (rx_build_nfa): compile r_cut nodes. r_cut |
| 112 |
nodes match the empty string and nothing more. A parameter |
| 113 |
to the cut node determines whether the empty match leads |
| 114 |
to a final state, or to a failure. |
| 115 |
|
| 116 |
* rx.c (rx_free_rx): |
| 117 |
* rxsuper.c (release_superset_low): |
| 118 |
* rxanal.c (rx_start_superstate): fixed the test for a cached |
| 119 |
starting superset to reflect the simplified memory management |
| 120 |
of `struct rx' (they are now explicitly freed using rx_free_rx) |
| 121 |
and `struct rx_superset' (they are now ultimately freed using |
| 122 |
free and not kept on a free-list). Now the `start_set' field |
| 123 |
of a `struct rx' is only non-0 if it is valid. |
| 124 |
|
| 125 |
Tue May 14 08:56:22 1996 Tom Lord <lord@beehive> |
| 126 |
|
| 127 |
* rxspencer.h (typedef rx_contextfn): take an entire expression |
| 128 |
tree instead of just a context type since for some context types, |
| 129 |
parameters in the tree matter ([[:set...:]]) |
| 130 |
|
| 131 |
* rxstr.c (rx_str_contextfn): handle [[:set...:]] operator. |
| 132 |
|
| 133 |
* rxgnucomp.c (rx_parse): added the [[:set n = x:]] construct |
| 134 |
to make it easier to lex using regexps. |
| 135 |
|
| 136 |
* rxposix.c (regnexec): |
| 137 |
"This pattern (with 10 subexpressions and 9 backreferences) made no entries |
| 138 |
in a match array of size 5." (from [email protected]) |
| 139 |
|
| 140 |
* rxgnucomp.c (rx_parse): new compilation state variable: |
| 141 |
|
| 142 |
last_non_regular_expression When compiling, keep track of two, not |
| 143 |
one point in the tree for concatenating new nodes. The |
| 144 |
*last_non_regular_expression point is always the same as the |
| 145 |
*last_expression or is a parent of that node. Concatenations of |
| 146 |
regular constructs happen at last_expression, others at |
| 147 |
last_non_regular_expression. The resulting trees have |
| 148 |
"observable" constructs clustered near the root of the tree which |
| 149 |
allows those optimizations that apply only to regular subtrees to |
| 150 |
have a greater impact on overall performance. |
| 151 |
|
| 152 |
|
| 153 |
* rxspencer.c (rx_next_solution): interval satisfaction test was wrong. |
| 154 |
|
| 155 |
* rxanal.c (rx_posix_analyze_rexp): An interval is always observed (not truly |
| 156 |
a regular expression). |
| 157 |
|
| 158 |
* rxstr.c (rx_str_contextfn): "when you're doing |
| 159 |
back-reference matching case insensitively (with REG_ICASE set), |
| 160 |
you are supposed to also do the BR matching without paying attention |
| 161 |
to case. |
| 162 |
|
| 163 |
Mon May 13 09:59:48 1996 Tom Lord <lord@beehive> |
| 164 |
|
| 165 |
* rxspencer.c (rx_next_solution): Don't construct |
| 166 |
an NFA when comparing an r_string to some text -- |
| 167 |
just do a strcmp-like operation. |
| 168 |
|
| 169 |
* rxgnucomp.c (rx_parse): new variable: n_members |
| 170 |
An array keeping track of the size of csets generated |
| 171 |
by inverting the translation table. |
| 172 |
|
| 173 |
(rx_parse): validate_inv_tr and n_members were way to big -- |
| 174 |
each only needs CHAR_SET_SIZE elements. |
| 175 |
|
| 176 |
Mon May 13 09:29:42 1996 Zachary Weinberg <[email protected]> |
| 177 |
|
| 178 |
* rxnode.c (rx_init_string): New data structure for strings -- |
| 179 |
part of the overall support for constant string optimization. |
| 180 |
|
| 181 |
* rxnode.c (rx_mk_r_str etc.): a new type of rexp-node -- |
| 182 |
an abbreviation for a concatenation of characters. |
| 183 |
|
| 184 |
* rxdbug.c (print_rexp): Added support for printing r_str nodes. |
| 185 |
|
| 186 |
* rxgnucomp.c (rx_parse): initial support for constant strings. |
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
Wed Jan 31 19:59:46 1996 Preston L. Bannister <[email protected]> |
| 191 |
|
| 192 |
Changes to compile clean under MSVC 4.0 (w/o warnings). |
| 193 |
Added makefile for MSVC 4.0 (librx.mak). |
| 194 |
|
| 195 |
[! Changes marked *** were made differently from the submitted |
| 196 |
patches -- the descriptions may not apply exactly.] |
| 197 |
|
| 198 |
hashrexp.c: Added __STDC__ variant of function definition. |
| 199 |
*** rxall.h: Pull in standard C header files. |
| 200 |
*** Map bzero() to memset(). |
| 201 |
rxanal.c: Remove unused variable. |
| 202 |
rxdbug.c: Added stdio include. |
| 203 |
rxhash.c: Remove unused variable. |
| 204 |
rxnfa.c: Remove {re,m}alloc definition. |
| 205 |
rxposix.c: Remove unused variable. |
| 206 |
*** Cast parameter nmatch declared as size_t to int on use. |
| 207 |
*** Perhaps nmatch should be passed as int? |
| 208 |
[made related variables size_t] |
| 209 |
rxspencer.c: Add rxsimp.h include. |
| 210 |
Remove unused variables and labels. |
| 211 |
rxunfa.c: Remove unused variable. |
| 212 |
|
| 213 |
|
| 214 |
Tue Jan 30 10:29:16 1996 Tom Lord <lord@beehive> |
| 215 |
|
| 216 |
* rxsimp.c (rx_simple_rexp): move assignment out of if. |
| 217 |
("Preston L. Bannister" <[email protected]>) |
| 218 |
|
| 219 |
* Makefile.in (CFLAGS, ALL_CFLAGS): rearranged to allow user |
| 220 |
specified CFLAGS. |
| 221 |
|
| 222 |
* rxposix.h: comment stuff after #endif. |
| 223 |
(reported by Eric Backus <[email protected]>) |
| 224 |
|
| 225 |
Mon Jan 1 13:03:28 1996 Jason Molenda ([email protected]) |
| 226 |
|
| 227 |
* rxbasic.c (rx_basic_make_solutions): argument called 'rexp' is |
| 228 |
now called 'expression'. Argument 'str' should be unsigned char. |
| 229 |
|
| 230 |
* rxbasic.h (rx_basic_make_solutions): argument 'str' should be |
| 231 |
unsigned char. |
| 232 |
|
| 233 |
* rxsuper.h (rx_handle_cache_miss, rx_superstate_eclosure_union): |
| 234 |
syntax error in prototypes. [Actually fixed in rxsuper.c, from which |
| 235 |
that section of rxsuper.h is derived.] |
| 236 |
|
| 237 |
* rxnode.c (rx_mk_r_cset): fix function decl. |
| 238 |
|
| 239 |
Tue Jan 30 09:43:28 1996 Tom Lord <lord@beehive> |
| 240 |
|
| 241 |
* rxposix.c (regnexec): pass rx_regexec "regs", not "pmatch". |
| 242 |
"regs" is valid even if "pmatch" is NULL. |
| 243 |
(Fixes testsuite bug "pragma" reported by [email protected] (John J. Szetela) |
| 244 |
also fixes bug reported by Jongki Suwandi <[email protected]>) |
| 245 |
|
| 246 |
Fri Jan 26 14:23:20 1996 Tom Lord <lord@beehive> |
| 247 |
|
| 248 |
* rxdbug.c (AT): Use the GCC feature only if HAVE_POSITIONAL_ARRAY_INITS |
| 249 |
is defined. |
| 250 |
|
| 251 |
* Makefile.in: Fixed depends target to not include system |
| 252 |
header files. Use @exec_prefix@. (Derek Clegg <[email protected]>) |
| 253 |
|
| 254 |
Thu Jan 4 16:13:07 1996 Tom Lord <lord@beehive> |
| 255 |
|
| 256 |
* rxposix.c (rx_regexec): Don't bother checking to see if an |
| 257 |
anchored pattern matches other than at the beginning of a string. |
| 258 |
|
| 259 |
(rx_regmatch): Don't bother looking for matches that are the |
| 260 |
wrong length if the overall length of the expression is known. |
| 261 |
This duplicates an optimization already in rx_make_solutions and |
| 262 |
rx_basic_make_solutions, but its worth it. The make_solutions |
| 263 |
optimization applies to fixed length subexpressions of a variable |
| 264 |
length expression. The regmatch optimization can avoid (in sed, |
| 265 |
for example) many, many uneeded calls to make_solutions and |
| 266 |
rx_next_solution. |
| 267 |
|
| 268 |
* rxspencer.c (rx_make_solutions, rx_basic_make_solutions): If the |
| 269 |
expression is fixed length and that length doesn't match the |
| 270 |
buffer, don't bother constructing a new solution stream -- just |
| 271 |
return the canonical "no solution" stream. |
| 272 |
|
| 273 |
|
| 274 |
Sat Dec 30 21:19:31 1995 Tom Lord <lord@beehive> |
| 275 |
|
| 276 |
* *.[ch]: posixification and algorithmic improvement (thanks |
| 277 |
henry!). |
| 278 |
|