aboutsummaryrefslogtreecommitdiff
path: root/jimregexp.c
AgeCommit message (Collapse)AuthorFilesLines
2011-11-10regex: counts were not all being clearedSteve Bennett1-6/+25
If a cached regex containing counts was reused, the result may have been incorrect. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-11-10regex: support - as the last element of a char setSteve Bennett1-1/+1
e.g. {[a-z-]} For Tcl ARE compatibility Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-11-10regex: add support for non-capturing parenthesesSteve Bennett1-3/+20
Tcl-compatible syntax: (?:...) Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-09-12Remove all trailing whitespace in sourceSteve Bennett1-7/+7
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-09-12Trim the size of the boostrap jimsh sourceSteve Bennett1-3/+2
By removing comments and some large blocks of unnecessary code Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-07-07Minor code cleanupsSteve Bennett1-8/+2
Some unused variables Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-29Change the builtin regexp to avoid compiling twiceSteve Bennett1-281/+238
Simply guess the program size and realloc if needed. This also fixes a compile warning on some platforms. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-28Fix builtin regexp for memory overwriteSteve Bennett1-3/+5
Reported-By: Spencer Oliver <spen@spen-soft.co.uk> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-09Revert regexp nested repeats from b34ab2f895Steve Bennett1-5/+6
Nested repeats can't really be handled properly, so remove support since it breaks some non-nested cases. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-07Simplify/fix repeating matchesSteve Bennett1-297/+228
Simplifies *, + and {n,m}, fixes some broken cases and adds support for {n,m}? Also fixes end-of-word match Under some circumstances, repeats can now be nested. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-05Fix simple * and + case for utf-8Steve Bennett1-5/+7
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-04Fix utf8 char matching in character rangesSteve Bennett1-41/+42
Also searching the initial part of the string Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-03Add non-greedy regexp supportSteve Bennett1-28/+147
Support +?, *? and ?? Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-03Add make-bootstrap-jim scriptSteve Bennett1-11/+11
Allows a single source file version of jimsh to be created for bootstrap purposes. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-08Fix some minor warnings on mingw32Steve Bennett1-3/+3
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-28Bug fix: regexp should not treat \n as |Steve Bennett1-4/+3
Remove a "feature" in the built-in regexp, where a newline in the pattern was treated as alternation, like |. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-18built-in regexp was always being includedSteve Bennett1-0/+1
Even if disabled, the built-in regexp was still being used. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-17Bug fix: [regexp] single braced count was rejectedSteve Bennett1-5/+10
The form {n} should be considered the same as {n,n} Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-17Minor cleanupsSteve Bennett1-1/+0
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-17Fix a regexec() bugSteve Bennett1-2/+2
An anchored search could use the wrong string Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-17Update documentation to cover UTF-8 support for regexpSteve Bennett1-5/+6
Also create README.utf-8 Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-17Add UTF-8 support to regexpSteve Bennett1-251/+621
Plus various ARE enhancements and bug fixes Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-17POSIX-compatible regex interfaceSteve Bennett1-0/+1375
With some ARE extensions Signed-off-by: Steve Bennett <steveb@workware.net.au>