Commit graph

65 commits

Author SHA1 Message Date
Sebastian Wilzbach
5a8988c149 style fix: add space after for operator 2016-04-27 02:04:02 +03:00
Sebastian Wilzbach
3d67cd228c style fix: space between operators 2016-04-26 22:26:20 +03:00
Ilya Yaroshenko
46ca5dad0d Merge pull request #4142 from DmitryOlshansky/regex-ref-counting
[std.regex] Use ref-counting for Captures struct
2016-04-26 14:31:35 +03:00
Dmitry Olshansky
8a487e2145 [std.regex] Split generation and parsing, almost completely.
This should aid readability and reduce the obscurity of the parser.
Also potentially non-generating parser is possible.
2016-04-25 14:12:08 +03:00
Dmitry Olshansky
872673d557 Use ref-counting for Captures struct 2016-04-16 11:26:31 +03:00
Ilya Yaroshenko
cf48dc32e2 Merge pull request #4180 from DmitryOlshansky/fix-issue15864
Fix issue 15864 - chmgen triggers exception in std.regex
2016-04-16 06:41:27 +02:00
Dmitry Olshansky
e6c3320b1f Fix issue 12227 - Allow matching multiple patterns in one go with std.regex 2016-04-15 16:17:36 +03:00
Ilya Yaroshenko
4e393eb70a Merge pull request #4156 from DmitryOlshansky/issue-2104
Fix issue 2104 - escape function for regular expressions
2016-04-14 17:53:00 +02:00
Dmitry Olshansky
cf6152c13f Fix issue 2104 - escape function for regular expressions 2016-04-14 16:54:36 +03:00
Yazan Dabain
9887af3fe6 Fix some imports 2016-04-12 22:15:09 +03:00
Dmitry Olshansky
6c0dbab725 Merge pull request #4174 from JackStouffer/issue15797
[Issue 15797] Add std.regex.splitterWithMatches
2016-04-12 12:17:32 +04:00
Ilya Yaroshenko
11ef8c4a11 Merge pull request #4157 from DmitryOlshansky/issue14504
Fix issue 14504 Regex Optimizer doesn't merge equivalent threads
2016-04-11 23:06:43 +02:00
Jack Stouffer
02e11abd54 Fix Issue 15797: Add keepSeperator option to std.regex.splitter 2016-04-11 15:55:14 -04:00
Dmitry Olshansky
25d81e662d Fix issue 15864 - chmgen triggers exception in std.regex 2016-04-11 21:43:19 +03:00
Dmitry Olshansky
9f256889ed Add documnetation and changelog for issue 12367 2016-04-11 15:05:21 +03:00
Dmitry Olshansky
12c7d68044 Fix issue 12367 - std.regex: Recognize (?# ... ) comment syntax 2016-04-10 22:47:40 +03:00
Dmitry Olshansky
0e7fc33aba Fix issue 14504 Regex Optimizer doesn't merge equivalent threads
We can be unprecise a bit by using a hash of table to represent a state of
optimizer thread, after all any collision will result in just a shorter prefix search.
2016-04-10 22:43:24 +03:00
Dmitry Olshansky
5e4853f723 Fix issue 15773 - D's treatment of whitespace in character classes in free-form regexes is not the same as Perl's 2016-04-09 11:14:45 +03:00
Steven Schveighoffer
635c9aa0d5 Merge pull request #4147 from DmitryOlshansky/faster-ct-bt
[std.regex] Even faster C-T regex
2016-04-08 14:13:33 -04:00
Ilya Yaroshenko
efd74a5fea Merge pull request #4160 from DmitryOlshansky/issue-14615
Fix issue 14615 - std.regex.replaceFirstInto throws exception when no match is found
2016-04-07 17:40:49 +02:00
Dmitry Olshansky
7f8b6158e7 Help DMD's inliner a bit for 2 functions 2016-04-07 15:08:30 +03:00
Dmitry Olshansky
0816375a34 Generating unrolled code for small codepoint sets
Need to figure out the case of empty charsets.
2016-04-07 15:08:30 +03:00
Ilya Yaroshenko
af373d96fc Merge pull request #4140 from DmitryOlshansky/rolling-trace-filter
[std.regex] Add rolling trace filter to backtracking engine
2016-04-07 14:01:14 +02:00
Dmitry Olshansky
add07e7ea6 Fix issue 14615 - std.regex.replaceFirstInto throws exception when no match is found 2016-04-07 10:49:30 +03:00
Dmitry Olshansky
afd16eac09 Fix issue 7551 - Regex parsing bug for right bracket in character class 2016-04-06 22:52:54 +03:00
Dmitry Olshansky
4b7b8d7f6c Add rolling trace filter to backtracking engine
This cuts down on redundant backtracking on most real-world inputs.
2016-04-02 12:09:20 +03:00
Dmitry Olshansky
19778b1c7a address review comments 2016-03-28 12:54:59 +03:00
Dmitry Olshansky
df07aa7dea Special case ASCII to use bit tables insted of 2-level tries 2016-03-27 20:26:49 +03:00
Dmitry Olshansky
0e55583fed Start small - direct dispatch tables 2016-03-27 16:49:44 +03:00
Dmitry Olshansky
ec7b647d27 Segregate opcodes to functions; preparation to JIT
Then generate sequence of function calls to them..
2016-03-27 16:24:03 +03:00
Daniel Murphy
77b06e8c93 Merge pull request #4103 from DmitryOlshansky/bloom-filter
[std.regex] Introduce filtered loops with bloom filters
2016-03-27 05:30:53 +11:00
Dmitry Olshansky
56b90e7f5a Drop "quick" test that never was quick anyway 2016-03-24 18:21:28 +03:00
Dmitry Olshansky
0736e907a4 Allow nextChar to be inlined by DMD
Healthy 2-3% of speedup.
2016-03-23 21:42:08 +03:00
Dmitry Olshansky
9d445d182d Introduce filtered loops with bloom filters
Make use of bloom filter on dchar to predict if we should take the
out of loop branch.
2016-03-21 22:06:56 +03:00
Dmitry Olshansky
88c3a3d52f 2 minor tweaks to std.regex default engine
Roughly 10-15% faster on a few common patterns.
2016-03-07 15:46:30 +03:00
Sebastian Wilzbach
6c386d6f31 convert docstring examples to unittests 2016-03-03 19:39:12 +02:00
Steven Schveighoffer
b0acb7a394 Fix remaining import deprecation messages 2016-02-22 16:03:12 -05:00
Martin Nowak
ce2ac192c9 fix incorrect imports/fqn usages
- mostly of the form `import a.b : sym; a.b.sym();`, which is wrong b/c
  selective imports do not add the module to the current scope
2016-02-20 14:41:44 +01:00
Walter Bright
a33a6d8660 conform to new import lookup rules 2016-02-13 04:12:35 -08:00
Shriramana Sharma
5978ca7831 migrate other Phobos modules to use std.exception.basicExceptionCtors 2016-01-17 10:39:37 +05:30
Benjamin L. Merritt
5f08c058ab Changed "Examples:" in Ddoc to "Example:" 2015-12-17 18:32:41 -08:00
Walter Bright
cf22992cbb Merge pull request #3768 from CyberShadow/pull-20151024-051829
HTML fixes
2015-10-24 15:05:00 -07:00
Vladimir Panteleev
86cf380007 HTML fixes 2015-10-24 06:19:23 +00:00
Shriramana Sharma
1e7a6f76da give a better example for std.regex.replaceAllInto 2015-10-22 16:24:35 +05:30
Brian Schott
67c95e6de2 Merge pull request #3715 from dcarp/AliasSeq
Rename obsolete TypeTuple to AliasSeq
2015-10-16 20:59:56 -07:00
Vladimir Panteleev
82590904f7 fix Issue 15208 - Eradicate all uses of "Enforcement failed" in Phobos 2015-10-15 23:44:44 +00:00
Dragos Carp
d698887729 Remove obsolete TypeTuple references
Replace following names:
std.typetuple      -> std.meta
TypeTuple          -> AliasSeq
ParameterTypeTuple -> Parameters
FieldTypeTuple     -> Fields

std.traits requires more work than search/replace and is left unchanged.
2015-10-13 20:37:44 +02:00
David Soria Parra
0b55d6319a std.regex: simplify case statement
The old issue 12603 is fixed according to the issue tracker. Therefore we try to
simplify the case statement as proposed initially.
2015-07-08 14:05:40 +02:00
David Soria Parra
a1de9eea10 std.regex: additional unittests testing ||, --, && and ~~ 2015-07-08 14:05:40 +02:00
David Soria Parra
46831a485e std.regex: correctly add last character of a set to regex (bugzilla 14529)
When encounting the end of a character set ']' we have to correctly add the last
encountered valid character to the regex and resepect flags. This bug caused the
last character to not be correctly case folded if case folding was requested.

This fixes https://issues.dlang.org/show_bug.cgi?id=14529.
2015-07-07 01:32:11 +02:00