File parser.hh

namespace mata

Main namespace including structs and algorithms for all automata.

In particular, this includes:

  1. Alphabets,

  2. Formula graphs and nodes,

  3. Mintermization,

  4. Closed sets.

namespace parser

Parser from .mata format to automata (currently Nfa and Afa are supported).

This includes parsing either from files or from other streams (strings, etc.).

Typedefs

using KeyListStore = std::map<std::string, std::vector<std::string>>
using BodyLine = std::vector<std::string>
using Parsed = std::vector<ParsedSection>

Parsed data.

Functions

Parsed parse_mf(const std::string &input, bool keep_quotes = false)

Parses a string into an intermediary structure.

Parsed parse_mf(std::istream &input, bool keep_quotes = false)

Parses a stream into an intermediary structure.

ParsedSection parse_mf_section(std::istream &input, bool keep_quotes = false)

Parses one section from a stream into an intermediary structure.

ParsedSection parse_mf_section(const std::string &input, bool keep_quotes = false)

Parses one section from a string into an intermediary structure.

void init()

registers dispatcher

struct ParsedSection
#include <parser.hh>

Parsed data (single section)

Public Functions

ParsedSection() = default
inline bool empty() const

Is the section empty?

bool operator==(const ParsedSection &rhs) const

Equality operator.

const std::vector<std::string> &operator[](const std::string &key) const

subscript operator for the key-value store

inline bool haskey(const std::string &key) const

check whether the key-value store contains a key

Public Members

std::string type = {}
KeyListStore dict = {}
std::list<BodyLine> body = {}
namespace std

Functions

std::ostream &operator<<(std::ostream &os, const mata::parser::ParsedSection &parsec)

Output stream operator.