22 #ifndef UTAP_SYMBOLS_HH
23 #define UTAP_SYMBOLS_HH
56 range_t(
const std::pair<int,int> &);
85 uint32_t
size()
const;
int lower
Definition: symbols.h:44
void setName(std::string)
Alters the name of this symbol.
Definition: symbols.cpp:233
bool operator!=(const range_t &) const
Inequallity operator.
Definition: symbols.cpp:74
symbol_t operator[](int32_t)
Returns the Nth symbol in this frame.
Definition: symbols.cpp:340
range_t join(const range_t &) const
Constructs the union of two ranges.
Definition: symbols.cpp:84
void * getData()
Returns the user data of this symbol.
Definition: symbols.cpp:216
A reference to a symbol.
Definition: symbols.h:107
symbol_t addSymbol(std::string name, type_t, void *user=NULL)
Adds a symbol of the given name and type to the frame.
Definition: symbols.cpp:352
void add(symbol_t)
Add all symbols from the given frame.
Definition: symbols.cpp:367
bool resolve(std::string name, symbol_t &symbol)
Resolves a name in this frame or a parent frame.
Definition: symbols.cpp:446
range_t operator|(const range_t &) const
Constructs the union of two ranges.
Definition: symbols.cpp:89
symbol_t getSymbol(int32_t)
Returns the Nth symbol in this frame.
Definition: symbols.cpp:334
void setData(void *)
Sets the user data of this symbol.
Definition: symbols.cpp:239
const frame_t & operator=(const frame_t &)
Assignment operator.
Definition: symbols.cpp:297
An integer range.
Definition: symbols.h:41
bool operator<(const symbol_t &) const
Less-than operator.
Definition: symbols.cpp:193
int upper
Definition: symbols.h:44
static string symbol(const char *str)
Extracts the alpha-numerical symbol used for variable/type identifiers.
Definition: xmlreader.cpp:107
bool operator==(const frame_t &) const
Equality operator.
Definition: symbols.cpp:316
A reference to a frame.
Definition: symbols.h:183
bool hasParent() const
Returns true if this frame has a parent.
Definition: symbols.cpp:468
bool isEmpty() const
Returns true if and only if the range is empty.
Definition: symbols.cpp:109
bool operator!=(const symbol_t &) const
Inequality operator.
Definition: symbols.cpp:188
frame_t getFrame()
Get frame this symbol belongs to.
Definition: symbols.cpp:199
bool operator==(const range_t &) const
Equallity operator.
Definition: symbols.cpp:69
uint32_t getSize() const
Returns the number of symbols in this frame.
Definition: symbols.cpp:328
range_t intersect(const range_t &) const
Constructs the intersection of two ranges.
Definition: symbols.cpp:79
const symbol_t & operator=(const symbol_t &)
Assignment operator.
Definition: symbols.cpp:164
bool operator!=(const frame_t &) const
Inequality operator.
Definition: symbols.cpp:322
~frame_t()
Destructor.
Definition: symbols.cpp:285
std::string getName() const
Returns the name (identifier) of this symbol.
Definition: symbols.cpp:228
int32_t getIndexOf(std::string name) const
Returns the index of the symbol with the given name.
void setType(type_t)
Alters the type of this symbol.
Definition: symbols.cpp:210
range_t operator&(const range_t &) const
Constructs the intersection of two ranges.
Definition: symbols.cpp:94
A reference to a type.
Definition: type.h:92
symbol_t()
Default constructor.
Definition: symbols.h:117
bool operator==(const symbol_t &) const
Equality operator.
Definition: symbols.cpp:182
uint32_t size() const
Definition: symbols.cpp:114
frame_t()
Default constructor.
Definition: symbols.cpp:260
void moveTo(frame_t)
Move all symbols from this to a given one (leaving this empty).
Definition: symbols.cpp:392
frame_t getParent()
Returns the parent frame.
Definition: symbols.cpp:458
~symbol_t()
Destructor.
Definition: symbols.cpp:151
static frame_t createFrame()
Creates and returns a new root-frame.
Definition: symbols.cpp:474
range_t()
Constructs the empty range.
Definition: symbols.cpp:47
type_t getType() const
Returns the type of this symbol.
Definition: symbols.cpp:205
bool contains(const range_t &) const
Returns true if the argument is contained in the range.
Definition: symbols.cpp:99