char eat(std::istream &is, char c)
Check lookahead character and advance.
std::istream & operator>>(std::istream &is, direction &d)
Parsing.
std::ostream & operator<<(std::ostream &os, direction d)
Pretty-printing.
std::ostringstream os
The output stream: the corresponding C++ snippet to compile.
#define BUILTIN_UNREACHABLE()
ATTRIBUTE_NORETURN void fail_reading(std::istream &is, Args &&...args)
Throw an exception after failing to read from is.
std::string to_string(direction d)
Conversion to string.