9 Commits

Author SHA1 Message Date
Andrew Gallant dfe6df9fa1 gitignore: add tmp dir 2018-03-12 22:32:53 -04:00
Andrew Gallant 31af886b98 Ignore debug example. 2016-12-28 19:38:33 -05:00
Andrew Gallant 0471c74929 Fixes a bug introduced by the fix in 630049.
This is another variant of incorrectly producing an unambiguous set of
literals.

Fixes #291.
2016-10-27 17:36:12 -04:00
Andrew Gallant 4104b338ad Add wiki directory to .gitignore. 2016-05-01 17:43:39 -04:00
Andrew Gallant 6d5e909e5e Fixes from code review.
The big change here is the addition of a non-public variant in the
error enums. This will hint to users that one shouldn't exhaustively
match the enums in case new variants are added.
2015-05-27 18:43:28 -04:00
Andrew Gallant a66df890f2 Rewrite parser as part of new regex-syntax crate.
This commit introduces a new `regex-syntax` crate that provides a
regular expression parser and an abstract syntax for regular
expressions. As part of this effort, the parser has been rewritten and
has grown a substantial number of tests.

The `regex` crate itself hasn't changed too much. I opted for the
smallest possible delta to get it working with the new regex AST.
In most cases, this simplified code because it no longer has to deal
with unwieldy flags. (Instead, flag information is baked into the AST.)

Here is a list of public facing non-breaking changes:

* A new `regex-syntax` crate with a parser, regex AST and lots of tests.
  This closes #29 and fixes #84.
* A new flag, `x`, has been added. This allows one to write regexes with
  insignificant whitespace and comments.
* Repetition operators can now be directly applied to zero-width
  matches. e.g., `\b+` was previously not allowed but now works.
  Note that one could always write `(\b)+` previously. This change
  is mostly about lifting an arbitrary restriction.

And a list of breaking changes:

* A new `Regex::with_size_limit` constructor function, that allows one
  to tweak the limit on the size of a compiled regex. This fixes #67.
  The new method isn't a breaking change, but regexes that exceed the
  size limit (set to 10MB by default) will no longer compile. To fix,
  simply call `Regex::with_size_limit` with a bigger limit.
* Capture group names cannot start with a number. This is a breaking
  change because regexes that previously compiled (e.g., `(?P<1a>.)`)
  will now return an error. This fixes #69.
* The `regex::Error` type has been changed to reflect the better error
  reporting in the `regex-syntax` crate, and a new error for limiting
  regexes to a certain size. This is a breaking change. Most folks just
  call `unwrap()` on `Regex::new`, so I expect this to have minimal
  impact.

Closes #29, #67, #69, #79, #84.

[breaking-change]
2015-05-25 12:49:58 -04:00
Andrew Gallant 6b04f37042 Fixes #18.
Previously, iterating over zero-length matches did not advance
correctly at UTF-8 character boundaries.
2015-01-12 20:21:46 -05:00
Huon Wilson 774aba2471 Gitignore target, Cargo.lock in regex_macros. 2015-01-05 22:47:20 +11:00
Alex Crichton 63c6c541fc Initial commit 2014-12-11 12:46:18 -08:00