#include <basic.h>
Public Types | |
enum | TypeSystem { UP2BOX, UP2DEF, UP2BT, UP2PT } |
Public Member Functions | |
virtual bool | operator!= (const Type &other) const |
Inequality operator. | |
virtual Type & | operator= (TypeValues other) |
Assignment operator from type values. | |
virtual bool | operator== (const Type &other) const |
Equality operator. | |
virtual bool | operator== (TypeValues other) const |
Equality operator for type values. | |
virtual bool | operator>= (const Type &other) const |
Greater-than operator. | |
string | to_string () const |
Return the string representation of a type. | |
Type (const string &s) | |
Parse a char to get the type. | |
Type () | |
Empty constructor, * type. | |
Type (double range) | |
Constructor for type |n. | |
Type (TypeValues tval) | |
Constructor from type values. | |
TypeSystem | typeSystem () const |
Return which type system is used. | |
virtual | ~Type () |
Destructor. | |
Static Public Member Functions | |
static Type | glb (const Type &v1, const Type &v2) |
Greatest lower bound of two types. | |
Public Attributes | |
bool | is_p |
For tp==DEF only, true for parametric types. | |
string | parametric |
For |e types only, it is the e. | |
double | range |
For |n types only, it is the n. | |
TypeValues | tp |
Type value. |
syn::Type::Type | ( | TypeValues | tval | ) | [inline] |
Constructor from type values.
syn::Type::Type | ( | double | range | ) | [inline] |
Constructor for type |n.
syn::Type::Type | ( | ) | [inline] |
Empty constructor, * type.
virtual syn::Type::~Type | ( | ) | [inline, virtual] |
Destructor.
syn::Type::Type | ( | const string & | s | ) | [inline] |
Parse a char to get the type.
Greatest lower bound of two types.
virtual bool syn::Type::operator!= | ( | const Type & | other | ) | const [inline, virtual] |
Inequality operator.
virtual Type& syn::Type::operator= | ( | TypeValues | other | ) | [inline, virtual] |
Assignment operator from type values.
virtual bool syn::Type::operator== | ( | const Type & | other | ) | const [inline, virtual] |
Equality operator.
For parametric types, just check both are parametric.
virtual bool syn::Type::operator== | ( | TypeValues | other | ) | const [inline, virtual] |
Equality operator for type values.
virtual bool syn::Type::operator>= | ( | const Type & | other | ) | const [inline, virtual] |
Greater-than operator.
string syn::Type::to_string | ( | ) | const [inline] |
Return the string representation of a type.
TypeSystem syn::Type::typeSystem | ( | ) | const [inline] |
Return which type system is used.
UP2BOX if variables are typed in {*,_,^,|} UP2DEF if variables are typed in {*,_,^,|,!} UP2BT if variables are typed in {*,_,^,|,!,|r} for some r > 0 UP2PT if parametric types
bool syn::Type::is_p |
For tp==DEF only, true for parametric types.
string syn::Type::parametric |
For |e types only, it is the e.
double syn::Type::range |
For |n types only, it is the n.
Type value.