LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
type Namespace Reference

Type-checking an ast::Ast. More...

Namespaces

namespace  tasks

Classes

class  Array
 Array types. More...
class  Attribute
 The base object for Class attributes. More...
class  Nil
 The builtin type of `nil' only (singleton class). More...
class  Class
 Class types. More...
class  Field
 The base type for Record fields. More...
class  Function
 Function types. More...
class  Method
 Method types. More...
class  Named
 Named types. More...
class  Record
 Record types. More...
class  TypeChecker
class  Type
 Abstract a type. More...

Functions

std::ostream & operator<< (std::ostream &ostr, const Attribute &a)
 Overload redirection operator for Attribute.
std::ostream & operator<< (std::ostream &ostr, const Field &obj)
 Overload redirection operator for Field.
misc::error types_check (ast::Ast &tree)
misc::error types_check (::ast::Ast &tree)
 Check types in a (bound) AST.
template<>
void TypeChecker::visit_dec_header< ast::FunctionDec > (ast::FunctionDec &e)
 Visit the lhs of an ast::FunctionDec.
template<>
void TypeChecker::visit_dec_body< ast::FunctionDec > (ast::FunctionDec &e)
 Visit the rhs of an ast::FunctionDec.
template<>
void TypeChecker::visit_dec_header< ast::TypeDec > (ast::TypeDec &e)
 Visit the lhs of an ast::TypeDec.
template<>
void TypeChecker::visit_dec_body< ast::TypeDec > (ast::TypeDec &e)
 Visit the rhs of an ast::TypeDec.
std::ostream & operator<< (std::ostream &ostr, const Type &t)
 Overload redirection operator for Type.
bool operator== (const Type &lhs, const Type &rhs)
 Compare two Type s.
bool operator!= (const Type &lhs, const Type &rhs)
 !(a == b).

Variables

const misc::xalloc< bool > hide_actual_types
 Hide actual types? (i.e., print only the surface type?)

Detailed Description

Type-checking an ast::Ast.

Function Documentation

bool type::operator!= ( const Type &  lhs,
const Type &  rhs 
)

!(a == b).

std::ostream & type::operator<< ( std::ostream &  ostr,
const Attribute &  a 
)
inline

Overload redirection operator for Attribute.

References type::Attribute::dump().

std::ostream& type::operator<< ( std::ostream &  ostr,
const Type &  t 
)

Overload redirection operator for Type.

std::ostream & type::operator<< ( std::ostream &  ostr,
const Field &  obj 
)
inline

Overload redirection operator for Field.

References type::Field::dump().

bool type::operator== ( const Type &  lhs,
const Type &  rhs 
)

Compare two Type s.

Return true iff a and b are equivalent Tiger Types. E.g., if a and b are different but point to the same type, then return true.

Referenced by misc::unique< T, C >::operator!=().

Visit the rhs of an ast::FunctionDec.

Visit the rhs of an ast::TypeDec.

Visit the lhs of an ast::TypeDec.

misc::error type::types_check ( ast::Ast tree)
misc::error type::types_check ( ::ast::Ast tree)

Check types in a (bound) AST.

Parameters
treeabstract syntax tree's root.
Returns
synthesis of the errors possibly found.

Variable Documentation

const misc::xalloc< bool > type::hide_actual_types

Hide actual types? (i.e., print only the surface type?)

Referenced by type::Function::dump().