Overview
| Artifact ID: | cae79199d95051c86a9019145b5bc8ecff515be7 |
|---|---|
| Ticket: | 1178541fffffffffffffffffffffffffffffffff
REG_BOSONLY incorrect with | |
| User & Date: | tgl on 2015-11-06 22:14:19 |
Changes
- assignee changed to: "aku"
- closer changed to: "nobody"
- comment changed to:
Hi, I've incorporated the Tcl regex code in my project (www.swi-prolog.org) and found a bug in the regex code. I guess that will also affect Tcl. I didn't find a patch yet, I have some trouble sorting out the internals. In my app it shows as ?-send(regex('foo|bar'), match, 'xxx bar'). which succeeds! Match (instead of search) sets REG_BOSONLY, but this causes the regex to be read as \Afoo|bar rather than \A(foo|bar). Using foo|\Abar, all works fine as well. Cheers --- Jan - icomment:
The complained-of behavior certainly seems to be a bug, but I do not like Jan's proposed fix much --- it's taking an implementation that was a kluge to start with and making it even more messy. I suggest the attached instead, which works by not generating arcs corresponding to the forbidden cases to begin with. Another idea worth considering is to remove REG_BOSONLY altogether ... does anyone know if Expect still uses it?
- login: "tgl"
- mimetype: "text/plain"
- severity changed to: "Minor"