Revert "C++ tests set up. They probably don't compile; need to write iostream ops for prettyprinting and set up C++ build in scons." Should have branched it.

This reverts commit 6a29277db4.
This commit is contained in:
Meredith L. Patterson 2013-09-03 05:33:30 +02:00
parent 6a29277db4
commit 0db4925469
6 changed files with 185 additions and 851 deletions

View file

@ -72,8 +72,6 @@ namespace hammer {
class Many1;
template<class T> class Optional;
class RepeatN;
class Ignore;
class Indirect;
template<class T> class IntRange;
template<typename T>
@ -85,12 +83,8 @@ namespace hammer {
Many<T> many();
RepeatN many(size_t n);
Optional<T> optional();
Ignore ignore();
RepeatN operator[](size_t n);
HParser* parser() { return _parser; }
int compile(HParserBackend backend, const void* params) {
return h_compile(_parser, backend, params);
}
protected:
HParser* _parser;
Parser() { }
@ -484,17 +478,10 @@ namespace hammer {
class Indirect : public Parser<T> {
public:
typedef typename T::result_type result_type;
/*
Indirect(Parser<T> &p) : _p(p) {
this->_parser = h_indirect();
h_bind_indirect(this->_parser, p.parser());
}
*/
Indirect() : _p(0) {}
bind(Parser<T> &p) {
this->_parser = h_indirect();
h_bind_indirect(this->_parser, p.parser());
}
private:
Parser<T> _p;
};