Almost complete regex implementation now...

[SVN r22718]
This commit is contained in:
John Maddock
2004-05-01 11:23:02 +00:00
parent 641d60b059
commit d2c3ec6d57
26 changed files with 582 additions and 205 deletions
+2
View File
@@ -53,6 +53,8 @@ public:
ogrep_predicate(unsigned int& i, const char* p, iterator start, iterator end) : lines(i), filename(p), last_line(-1), end_of_storage(end), last_line_start(start) {}
ogrep_predicate(const ogrep_predicate& o) : lines(o.lines), filename(o.filename), last_line(o.last_line), end_of_storage(o.end_of_storage), last_line_start(o.last_line_start) {}
bool operator () (const boost::match_results<iterator, Allocator>& i);
private:
void operator=(const ogrep_predicate&);
};
// ideally we'd ignor the allocator type and use a template member function
+1 -9
View File
@@ -19,15 +19,7 @@
#include <boost/regex.hpp>
// case sensitive reg_expression determines our allocator type:
typedef boost::reg_expression<char> re_type;
typedef re_type::allocator_type allocator_type;
// now declare static (global) data, including an allocator
// instance which we'll pass to all instances that require an allocator.
extern allocator_type a;
typedef boost::basic_regex<char> re_type;
extern re_type e;
// flags for output:
+1 -4
View File
@@ -46,10 +46,7 @@ using std::endl;
#include <algorithm>
#endif
allocator_type a;
re_type e(a);
//rei_type ei(a);
re_type e;
// flags for output:
+1 -1
View File
@@ -145,7 +145,7 @@ int main(int argc, char**argv)
double tim;
bool result;
int iters = 100;
double wait_time = std::min(t.elapsed_min() * 1000, 1.0);
double wait_time = (std::min)(t.elapsed_min() * 1000, 1.0);
while(true)
{