![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Classes | |
| struct | Tok |
| struct | Val |
| A number as written: its source spelling and its value. More... | |
| struct | Call |
| struct | Work |
| An entry phase or an activity: the s, c, f, Z, M values and the calls. More... | |
| struct | Proc |
| struct | Group |
| struct | Task |
| struct | Entry |
| struct | Conn |
| struct | Acts |
| struct | Model |
| class | Parser |
Enumerations | |
| enum class | TK { STR , NUM , ID , VAR , OBS , P } |
Functions | |
| bool | is_space (char c) |
| Python's str.isspace over ASCII, which also counts the four separators 0x1c-0x1f. | |
| bool | is_digit (char c) |
| bool | is_alnum (char c) |
| bool | is_ident (char c) |
| [A-Za-z0-9_.
| |
| std::string | strip (const std::string &s) |
| std::string | py_repr (const std::string &s) |
| Python's repr of an ASCII string, so messages read as the reference's do. | |
| InputError | err (const std::string &msg, int line=-1) |
| std::string | esc (const std::string &s) |
| bool | nz (const Val &v) |
| std::string | lstrip_plus (const std::string &s) |
| double | to_double (const std::string &s) |
| std::size_t | match_number (const std::string &src, std::size_t i) |
| End of [-+]?(?
| |
| bool | pragma_body (const std::string &line, std::string &body) |
| #\s*pragma\s+(.
| |
| void | tokenize (const std::string &src, std::vector< Tok > &toks, std::vector< std::pair< std::string, std::string > > &pragmas) |
| const char * | proc_sched (const std::string &k) |
| const char * | task_sched (const std::string &k) |
| const char * | rwlock_kind (const std::string &k) |
| std::string | attr (const char *name, const Val &v) |
| std::string | activity_attrs (const Work &a, std::vector< const Call * > &calls) |
| void | emit_activity (std::vector< std::string > &out, const std::string &ind, const std::string &head, const Work &a) |
| void | emit_task (std::vector< std::string > &out, const std::string &ind, const Task &t, const Model &m) |
| std::string | stem (const std::string &path) |
| Python's os.path.splitext(os.path.basename(path))[0]. | |
| std::string | read_text (const std::string &path) |
| The file as Python's text mode reads it: universal newlines, so \r\n and \r become \n. | |
|
strong |
| Enumerator | |
|---|---|
| STR | |
| NUM | |
| ID | |
| VAR | |
| OBS | |
| P | |
Definition at line 115 of file srvn_reader.h.
|
inline |
Definition at line 1046 of file srvn_reader.h.
References activity_attrs(), attr(), line::lqn::srvn_detail::Work::c, line::lqn::srvn_detail::Work::calls, line::lqn::srvn_detail::Work::f, line::lqn::srvn_detail::Val::has, line::lqn::srvn_detail::Work::M, nz(), line::lqn::srvn_detail::Work::s, line::lqn::srvn_detail::Call::v, line::lqn::srvn_detail::Val::value, and line::lqn::srvn_detail::Work::Z.
Referenced by activity_attrs(), and emit_activity().
|
inline |
Definition at line 1042 of file srvn_reader.h.
References attr(), esc(), and line::lqn::srvn_detail::Val::text.
Referenced by activity_attrs(), attr(), and emit_task().
|
inline |
Definition at line 1058 of file srvn_reader.h.
References activity_attrs(), emit_activity(), and esc().
Referenced by emit_activity(), and emit_task().
|
inline |
Definition at line 1072 of file srvn_reader.h.
References line::lqn::srvn_detail::Model::acts, line::lqn::srvn_detail::Entry::arrival, attr(), line::lqn::srvn_detail::Work::calls, line::lqn::srvn_detail::Acts::conns, line::lqn::srvn_detail::Acts::defs, emit_activity(), emit_task(), line::lqn::srvn_detail::Conn::end, line::lqn::srvn_detail::Model::entries, line::lqn::srvn_detail::Task::entries, err(), esc(), line::lqn::srvn_detail::Task::fanin, line::lqn::srvn_detail::Task::fanout, line::lqn::srvn_detail::Entry::fwd, line::lqn::srvn_detail::Val::has, line::lqn::srvn_detail::Conn::has_end, line::lqn::srvn_detail::Conn::has_post, line::lqn::srvn_detail::Entry::has_start, line::lqn::srvn_detail::Conn::items, line::lqn::srvn_detail::Task::mult, line::lqn::srvn_detail::Task::name, line::lqn::srvn_detail::Work::name, nz(), line::lqn::srvn_detail::Entry::phases, line::lqn::srvn_detail::Conn::post_kind, line::lqn::srvn_detail::Conn::pre, line::lqn::srvn_detail::Conn::pre_kind, line::lqn::srvn_detail::Entry::prio, line::lqn::srvn_detail::Task::prio, line::lqn::srvn_detail::Task::qlen, line::lqn::srvn_detail::Conn::quorum, line::lqn::srvn_detail::Task::repl, line::lqn::srvn_detail::Acts::replies, line::lqn::srvn_detail::Entry::rw, line::lqn::srvn_detail::Work::s, line::lqn::srvn_detail::Task::sched, line::lqn::srvn_detail::Entry::sem, line::lqn::srvn_detail::Entry::start, line::lqn::srvn_detail::Entry::task, line::lqn::srvn_detail::Task::think, line::lqn::srvn_detail::Call::v, line::lqn::srvn_detail::Val::value, and line::lqn::srvn_detail::Work::Z.
Referenced by emit_task().
|
inline |
Definition at line 97 of file srvn_reader.h.
References err(), and line::InputError::InputError().
Referenced by emit_task(), err(), line::lqn::srvn_detail::Parser::parse(), and tokenize().
|
inline |
Definition at line 102 of file srvn_reader.h.
References esc().
Referenced by attr(), emit_activity(), emit_task(), and esc().
|
inline |
Definition at line 63 of file srvn_reader.h.
References is_alnum(), and is_digit().
Referenced by is_alnum(), is_ident(), and tokenize().
|
inline |
Definition at line 61 of file srvn_reader.h.
References is_digit().
Referenced by is_alnum(), is_digit(), match_number(), line::lqn::srvn_out::normalize_attr(), line::lqn::srvn_out::py_float(), line::lqn::srvn_out::srvn_name_ok(), and tokenize().
|
inline |
[A-Za-z0-9_.
$@], the characters of a name.
Definition at line 68 of file srvn_reader.h.
References is_alnum(), and is_ident().
Referenced by is_ident(), and tokenize().
|
inline |
Python's str.isspace over ASCII, which also counts the four separators 0x1c-0x1f.
Definition at line 57 of file srvn_reader.h.
References is_space().
Referenced by is_space(), line::lqn::is_srvn_file(), line::lqn::lqnx2srvn(), pragma_body(), line::lqn::srvn_out::py_float(), strip(), and tokenize().
|
inline |
Definition at line 134 of file srvn_reader.h.
References lstrip_plus().
Referenced by lstrip_plus().
|
inline |
End of [-+]?(?
:[0-9]+\.?[0-9]*|\.[0-9]+)(?:[eE][-+]?[0-9]+)? matched at i, or npos.
Definition at line 143 of file srvn_reader.h.
References is_digit(), and match_number().
Referenced by match_number(), and tokenize().
|
inline |
Definition at line 132 of file srvn_reader.h.
References line::lqn::srvn_detail::Val::has, nz(), and line::lqn::srvn_detail::Val::value.
Referenced by activity_attrs(), emit_task(), and nz().
|
inline |
#\s*pragma\s+(.
*)$ on a stripped comment line: the body, or false.
Definition at line 169 of file srvn_reader.h.
References is_space(), pragma_body(), and strip().
Referenced by pragma_body(), and tokenize().
|
inline |
|
inline |
Python's repr of an ASCII string, so messages read as the reference's do.
Definition at line 78 of file srvn_reader.h.
References py_repr().
Referenced by line::lqn::srvn_detail::Parser::parse(), py_repr(), and tokenize().
|
inline |
The file as Python's text mode reads it: universal newlines, so \r\n and \r become \n.
Definition at line 1209 of file srvn_reader.h.
References line::InputError::InputError(), and read_text().
Referenced by read_text(), and line::lqn::srvn_file_to_lqnx().
|
inline |
Definition at line 357 of file srvn_reader.h.
References rwlock_kind().
Referenced by rwlock_kind().
|
inline |
Python's os.path.splitext(os.path.basename(path))[0].
Definition at line 1199 of file srvn_reader.h.
References stem().
Referenced by line::lqn::srvn_file_to_lqnx(), and stem().
|
inline |
Definition at line 70 of file srvn_reader.h.
References is_space(), and strip().
Referenced by pragma_body(), strip(), and tokenize().
|
inline |
|
inline |
|
inline |
Definition at line 181 of file srvn_reader.h.
References err(), ID, is_alnum(), is_digit(), is_ident(), is_space(), match_number(), NUM, OBS, P, pragma_body(), py_repr(), STR, strip(), tokenize(), and VAR.
Referenced by line::lqn::srvn_detail::Parser::Parser(), and tokenize().