2 #ifndef HOBBES_PARSE_DATAUTIL_HPP_INCLUDED 3 #define HOBBES_PARSE_DATAUTIL_HPP_INCLUDED 20 typedef unsigned int nat;
21 typedef std::vector<nat>
nats;
24 std::string
show(
const T* t) {
25 std::ostringstream ss;
31 std::string
show(
const std::vector<T*>& ts) {
32 std::ostringstream ss;
36 for (
unsigned int i = 1; i < ts.size(); ++i) {
49 typedef std::shared_ptr<linedb>
ptr;
60 LineCol
pos(nat i)
const;
74 template <
typename K,
typename V>
76 typedef typename std::map<K, V>::const_iterator CI;
79 throw std::runtime_error(
"Unexpected map index undefined");
nat stype
Definition: data.H:62
std::pair< nat, nat > LineCol
Definition: data.H:50
const std::string & sourceDesc() const
Definition: data.C:18
void step(char x)
Definition: data.C:22
unsigned int nat
Definition: data.H:20
void reset()
Definition: data.C:29
LineCol pos(nat i) const
Definition: data.C:34
nat sourceType() const
Definition: data.C:14
V mapLookup(const std::map< K, V > &m, const K &k)
Definition: data.H:75
std::shared_ptr< linedb > ptr
Definition: data.H:49
nats lp
Definition: data.H:65
std::string show(const Expr &e)
Definition: expr.C:19
std::pair< nats, strings > ldblines
Definition: data.H:70
ldblines load(const linedb::ptr &ldb, const linedb::LineCol &i, const linedb::LineCol &f)
Definition: data.C:48
std::string sdesc
Definition: data.H:63
nat c
Definition: data.H:64
std::vector< nat > nats
Definition: data.H:21
std::vector< std::string > strings
Definition: data.H:69
LexicalAnnotation m(const YYLTYPE &p)
Definition: hexpr.parse.C:127
linedb(nat stype, const std::string &sdesc)
Definition: data.C:11