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