diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2011-02-07 22:36:38 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2011-02-07 22:36:38 +0200 |
commit | 00d797090ffd9dcc7b1a8fa729c542846ab0242b (patch) | |
tree | 2960fd09ce1460da938737de06e83289b5e47a15 /re.c | |
parent | d26dc534cf748c810d19b9daf4185b8dfaff1a9c (diff) | |
download | egawk-00d797090ffd9dcc7b1a8fa729c542846ab0242b.tar.gz egawk-00d797090ffd9dcc7b1a8fa729c542846ab0242b.tar.bz2 egawk-00d797090ffd9dcc7b1a8fa729c542846ab0242b.zip |
Regex bug fix and token bug fix. See ChangeLog.
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -525,7 +525,7 @@ void dfawarn(const char *dfa_warning) { /* - * This routine does nothing, since gawk does it's own + * This routine does nothing, since gawk does its own * (better) check for bad [[:foo:]] syntax. */ } @@ -680,7 +680,14 @@ again: goto done; copy(); /* copy in the [ */ - if (*sp == '-') /* it's literal, just copy it and skip over */ + if (*sp == '^') /* allow for negation of range */ + copy(); + + /* + * Minus as first character after [ or ^ is literal, + * just copy it and skip over. + */ + if (*sp == '-') copy(); while (count > 0 && len > 0) { |