#ifndef LIBWCCL_VALUES_TOKENMATCH_H
#define LIBWCCL_VALUES_TOKENMATCH_H

#include <libwccl/values/match.h>

namespace Wccl {

class TokenMatch : public Match
{
public:
	WCCL_VALUE_PREAMBLE

	explicit TokenMatch(Position position)
		: position_(position)
	{
		BOOST_ASSERT(position_.get_value() != Position::Nowhere);
	}

	explicit TokenMatch(int pos)
		: position_(pos)
	{
		BOOST_ASSERT(position_.get_value() != Position::Nowhere);
	}

	/// Match override.
	bool empty() const {
		return false;
	}

	/// Match override.
	Position first_token(const boost::shared_ptr<Corpus2::AnnotatedSentence>&) const {
		return position_;
	}

	/// Match override.
	Position last_token(const boost::shared_ptr<Corpus2::AnnotatedSentence>&) const {
		return position_;
	}

	/// Value override
	std::string to_raw_string() const;

private:
	Position position_;
};

} /* end ns Wccl */

#endif // LIBWCCL_VALUES_TOKENMATCH_H