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

Piece of intermediate representation resource. More...

#include <fragment.hh>

Inheritance diagram for tree::Fragment:

Public Member Functions

virtual std::ostream & dump (std::ostream &o) const =0
virtual ~Fragment ()
Visitors entry point.
virtual void accept (Visitor &v)=0
 Accept a Visitor v.
virtual void accept (ConstVisitor &v) const =0

Detailed Description

Piece of intermediate representation resource.

A Tiger program may include strings. These strings are not left as is in the body of the IR, rather we associate a label to them, and use that label instead.

We store the string elsewhere, to be output in a format which is assembly language dependent. DataFrag are used for this. It is under the responsibility of translate:: to keep all the fragments.

The same thing happens with function declarations: they will be output elsewhere. This is what ProcFrag is used for.

Constructor & Destructor Documentation

tree::Fragment::~Fragment ( )
virtual

Member Function Documentation

virtual void tree::Fragment::accept ( Visitor v)
pure virtual

Accept a Visitor v.

Implemented in tree::ProcFrag, and tree::DataFrag.

virtual void tree::Fragment::accept ( ConstVisitor v) const
pure virtual

Implemented in tree::ProcFrag, and tree::DataFrag.

virtual std::ostream& tree::Fragment::dump ( std::ostream &  o) const
pure virtual

Implemented in tree::ProcFrag, and tree::DataFrag.

Referenced by tree::operator<<().


The documentation for this class was generated from the following files: