Include file:

#include "mcrl2/atermpp/aterm_io_text.h
class atermpp::text_aterm_istream

Reads terms in textual format from an input stream.

Private attributes

int atermpp::text_aterm_istream::character

The last character that was read.

std::size_t atermpp::text_aterm_istream::m_column

The column of the current character.

std::deque<char> atermpp::text_aterm_istream::m_history

Stores the characters that have been read so-far.

std::size_t atermpp::text_aterm_istream::m_history_limit

Determines the maximum number of characters that are stored.

std::size_t atermpp::text_aterm_istream::m_line

The line number of the current character.

std::istream &atermpp::text_aterm_istream::m_stream

Public member functions

void get(aterm &t) override

Reads an aterm from this stream.

text_aterm_istream(std::istream &os)

Private member functions

int next_char(bool skip_whitespace = true, bool required = false)

Returns: The first character that is not whitespace or end-of-file (EOF).


  • skip_whitespacereturns the next non space character.
  • required Throw error when the next character is EOL.
aterm parse_aterm(int &character)

Parse a term from the input stream and return it.

aterm_appl parse_aterm_appl(const std::string &function_name, int &character)

Parses an “f”(t0, …, tn) application as an aterm_appl.

aterm_int parse_aterm_int(int &character)

Parses an std::size_t as an aterm_int.

aterm_list parse_aterm_list(int &character, char begin, char end)

Parses a list of arguments […] as terms.

std::string parse_quoted_string(int &character)

Reads a quoted string from the stream.

Returns: The parsed string and the first character after this string that is not whitespace.

std::string parse_unquoted_string(int &character)

Reads an unquoted string from the stream.

std::string print_parse_error_position()

Returns: A string indicating the parse error position.