Awali
Another Weighted Automata library
|
#include <sstream>
#include <stdexcept>
#include <iostream>
#include <memory>
#include <awali/sttc/misc/escape.hh>
#include <awali/sttc/misc/raise.hh>
Go to the source code of this file.
Namespaces | |
awali | |
Main namespace of Awali. | |
awali::sttc | |
Namespace for the static layer of Awali. | |
Functions | |
std::string | awali::sttc::bracketed (std::istream &i, const char lbracket, const char rbracket) |
An narrow-char stream that discards the output. More... | |
template<typename ValueSet , typename... Args> | |
auto | awali::sttc::conv (const ValueSet &vs, const std::string &str, Args &&... args) -> decltype(vs.conv(std::declval< std::istream & >(), std::forward< Args >(args)...)) |
Parse str via vs.conv. More... | |
void | awali::sttc::eat (std::istream &is, char c) |
Check lookahead character and advance. More... | |
void | awali::sttc::eat (std::istream &is, const std::string &expect) |
Check lookahead string and advance. More... | |
ATTRIBUTE_NORETURN void | awali::sttc::fail_reading (std::istream &is, std::string explanation) |
Throw an exception after failing to read from is. More... | |
template<typename ValueSet , typename... Args> | |
auto | awali::sttc::format (const ValueSet &vs, const typename ValueSet::value_t &v, Args &&... args) -> std::string |
Format v via vs.print. More... | |
std::string | awali::sttc::get_file_contents (const std::string &file) |
Return the contents of file. More... | |
std::shared_ptr< std::istream > | awali::sttc::open_input_file (const std::string &file) |
Open file for reading and return its autoclosing stream. More... | |
std::shared_ptr< std::ostream > | awali::sttc::open_output_file (const std::string &file) |
Open file for writing and return its autoclosing stream. More... | |