Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Ast Class Reference

#include <ast.h>

Inheritance diagram for Ast:

Inheritance graph
[legend]
Collaboration diagram for Ast:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Ast (SrcPosition *position)
 Ast (const Ast &ast)
virtual ~Ast ()
SrcPositiongetPosition ()
void setPosition (SrcPosition *position)
virtual Ast & operator= (const Ast &ast)
virtual bool operator== (const Ast &ast) const
virtual VisitorReturnvisit (Visitor &visitor)=0
virtual Ast & clone () const=0

Protected Attributes

SrcPositionposition

Constructor & Destructor Documentation

Ast::Ast SrcPosition position  ) 
 

Definition at line 4 of file ast.cpp.

00004                               {
00005         this->position = position;
00006 }

Ast::Ast const Ast &  ast  ) 
 

Definition at line 8 of file ast.cpp.

00008                       {
00009         (*this) = const_cast<Ast&>(ast);
00010 }

Ast::~Ast  )  [virtual]
 

Definition at line 12 of file ast.cpp.

References position.

00012          {
00013         delete this->position;
00014 }


Member Function Documentation

virtual Ast& Ast::clone  )  const [pure virtual]
 

Implemented in ActStatement, ArrayType, AssignStatement, BehaviorStatement, BinaryExpression, DoStatement, FieldReference, FieldType, GuardExpression, GuardReceive, GuardTimeout, Identifier, IfStatement, IntegerLiteral, MultipleArrayReference, Program, RangeType, ReceiveStatement, SendStatement, SequentialAction, SequentialBehavior, SequentialDeclaration, SequentialExpressionList, SequentialFieldDeclaration, SequentialGuardedStatement, SequentialIdentifierList, SequentialImport, SequentialLeftSideList, SequentialMessage, SequentialProcess, SequentialStatement, SimpleAction, SimpleArrayReference, SimpleBehavior, SimpleDeclaration, SimpleExpressionList, SimpleFieldDeclaration, SimpleGuardedStatement, SimpleIdentifierList, SimpleImport, SimpleLeftSideList, SimpleMessage, SimpleProcess, SkipStatement, StartStatement, StopStatement, StringLiteral, Type, and UnaryExpression.

Referenced by SimpleProcess::clone(), SimpleMessage::clone(), SimpleGuardedStatement::clone(), SimpleFieldDeclaration::clone(), SimpleDeclaration::clone(), SimpleArrayReference::clone(), SimpleAction::clone(), SequentialStatement::clone(), Program::clone(), MultipleArrayReference::clone(), BinaryExpression::clone(), BehaviorStatement::clone(), AssignStatement::clone(), ActStatement::clone(), UnaryExpression::operator=(), SimpleProcess::operator=(), SimpleMessage::operator=(), SimpleLeftSideList::operator=(), SimpleGuardedStatement::operator=(), SimpleFieldDeclaration::operator=(), SimpleExpressionList::operator=(), SimpleDeclaration::operator=(), SimpleBehavior::operator=(), SimpleArrayReference::operator=(), SimpleAction::operator=(), SequentialStatement::operator=(), SequentialProcess::operator=(), SequentialMessage::operator=(), SequentialLeftSideList::operator=(), SequentialImport::operator=(), SequentialIdentifierList::operator=(), SequentialGuardedStatement::operator=(), SequentialFieldDeclaration::operator=(), SequentialExpressionList::operator=(), SequentialDeclaration::operator=(), SequentialBehavior::operator=(), SequentialAction::operator=(), Program::operator=(), MultipleArrayReference::operator=(), IfStatement::operator=(), GuardExpression::operator=(), FieldType::operator=(), DoStatement::operator=(), BinaryExpression::operator=(), BehaviorStatement::operator=(), AssignStatement::operator=(), and ActStatement::operator=().

SrcPosition * Ast::getPosition  ) 
 

Definition at line 16 of file ast.cpp.

References position.

Referenced by TypeCheckerVisitor::visitActStatement(), TypeCheckerVisitor::visitBinaryExpression(), TypeCheckerVisitor::visitFieldType(), TypeCheckerVisitor::visitIdentifier(), TypeCheckerVisitor::visitIntegerLiteral(), TypeCheckerVisitor::visitMultipleArrayReference(), TypeCheckerVisitor::visitSimpleArrayReference(), TypeCheckerVisitor::visitSimpleBehavior(), TypeCheckerVisitor::visitSimpleMessage(), TypeCheckerVisitor::visitSimpleProcess(), TypeCheckerVisitor::visitStartStatement(), and TypeCheckerVisitor::visitStringLiteral().

00016                               {
00017         return this->position;
00018 }

Ast & Ast::operator= const Ast &  ast  )  [virtual]
 

Reimplemented in Action, ActStatement, ArrayReference, ArrayType, AssignStatement, Behavior, BehaviorStatement, BinaryExpression, Declaration, DoStatement, Expression, ExpressionList, FieldDeclaration, FieldReference, FieldType, Guard, GuardedStatement, GuardExpression, GuardReceive, GuardTimeout, Identifier, IdentifierList, IfStatement, Import, IntegerLiteral, LeftSide, LeftSideList, Message, MultipleArrayReference, Process, Program, RangeType, ReceiveStatement, SendStatement, SequentialAction, SequentialBehavior, SequentialDeclaration, SequentialExpressionList, SequentialFieldDeclaration, SequentialGuardedStatement, SequentialIdentifierList, SequentialImport, SequentialLeftSideList, SequentialMessage, SequentialProcess, SequentialStatement, SimpleAction, SimpleArrayReference, SimpleBehavior, SimpleDeclaration, SimpleExpressionList, SimpleFieldDeclaration, SimpleGuardedStatement, SimpleIdentifierList, SimpleImport, SimpleLeftSideList, SimpleMessage, SimpleProcess, SimpleStatement, SkipStatement, StartStatement, Statement, StopStatement, StringLiteral, Type, and UnaryExpression.

Definition at line 24 of file ast.cpp.

References position.

Referenced by UnaryExpression::operator=(), Type::operator=(), StopStatement::operator=(), Statement::operator=(), StartStatement::operator=(), SkipStatement::operator=(), SimpleStatement::operator=(), Program::operator=(), Process::operator=(), Message::operator=(), LeftSideList::operator=(), LeftSide::operator=(), Import::operator=(), IfStatement::operator=(), IdentifierList::operator=(), Identifier::operator=(), GuardedStatement::operator=(), Guard::operator=(), FieldType::operator=(), FieldDeclaration::operator=(), ExpressionList::operator=(), Expression::operator=(), DoStatement::operator=(), Declaration::operator=(), BehaviorStatement::operator=(), Behavior::operator=(), AssignStatement::operator=(), ArrayReference::operator=(), ActStatement::operator=(), and Action::operator=().

00024                                    {
00025         this->position = new SrcPosition(*ast.position);
00026         return *this;
00027 }

bool Ast::operator== const Ast &  ast  )  const [virtual]
 

Reimplemented in Action, ActStatement, ArrayReference, ArrayType, AssignStatement, Behavior, BehaviorStatement, BinaryExpression, Declaration, DoStatement, Expression, ExpressionList, FieldDeclaration, FieldReference, FieldType, Guard, GuardedStatement, GuardExpression, GuardReceive, GuardTimeout, Identifier, IdentifierList, IfStatement, Import, IntegerLiteral, LeftSide, LeftSideList, Message, MultipleArrayReference, Process, Program, RangeType, ReceiveStatement, SendStatement, SequentialAction, SequentialBehavior, SequentialDeclaration, SequentialExpressionList, SequentialFieldDeclaration, SequentialGuardedStatement, SequentialIdentifierList, SequentialImport, SequentialLeftSideList, SequentialMessage, SequentialProcess, SequentialStatement, SimpleAction, SimpleArrayReference, SimpleBehavior, SimpleDeclaration, SimpleExpressionList, SimpleFieldDeclaration, SimpleGuardedStatement, SimpleIdentifierList, SimpleImport, SimpleLeftSideList, SimpleMessage, SimpleProcess, SimpleStatement, SkipStatement, StartStatement, Statement, StopStatement, StringLiteral, Type, and UnaryExpression.

Definition at line 29 of file ast.cpp.

References position.

Referenced by UnaryExpression::operator==(), Type::operator==(), StopStatement::operator==(), Statement::operator==(), SkipStatement::operator==(), SimpleStatement::operator==(), Process::operator==(), Message::operator==(), LeftSideList::operator==(), LeftSide::operator==(), Import::operator==(), IdentifierList::operator==(), Identifier::operator==(), GuardedStatement::operator==(), Guard::operator==(), FieldType::operator==(), FieldDeclaration::operator==(), ExpressionList::operator==(), Expression::operator==(), Declaration::operator==(), Behavior::operator==(), ArrayReference::operator==(), and Action::operator==().

00029                                           {
00030         return (!this->position)? false : (*(this->position)) == *(ast.position);
00031 }

void Ast::setPosition SrcPosition position  ) 
 

Definition at line 20 of file ast.cpp.

00020                                           {
00021         this->position = position;
00022 }

virtual VisitorReturn* Ast::visit Visitor visitor  )  [pure virtual]
 

Implemented in ActStatement, ArrayType, AssignStatement, BehaviorStatement, BinaryExpression, DoStatement, FieldReference, FieldType, GuardExpression, GuardReceive, GuardTimeout, Identifier, IfStatement, IntegerLiteral, MultipleArrayReference, Program, RangeType, ReceiveStatement, SendStatement, SequentialAction, SequentialBehavior, SequentialDeclaration, SequentialExpressionList, SequentialFieldDeclaration, SequentialGuardedStatement, SequentialIdentifierList, SequentialImport, SequentialLeftSideList, SequentialMessage, SequentialProcess, SequentialStatement, SimpleAction, SimpleArrayReference, SimpleBehavior, SimpleDeclaration, SimpleExpressionList, SimpleFieldDeclaration, SimpleGuardedStatement, SimpleIdentifierList, SimpleImport, SimpleLeftSideList, SimpleMessage, SimpleProcess, SkipStatement, StartStatement, StopStatement, StringLiteral, Type, and UnaryExpression.

Referenced by TypeCheckerVisitor::visitActStatement(), TypeCheckerVisitor::visitAssignStatement(), TypeCheckerVisitor::visitBehaviorStatement(), TypeCheckerVisitor::visitBinaryExpression(), TypeCheckerVisitor::visitDoStatement(), TypeCheckerVisitor::visitGuardExpression(), TypeCheckerVisitor::visitIfStatement(), TypeCheckerVisitor::visitMultipleArrayReference(), TypeCheckerVisitor::visitProgram(), JavaCodeGeneratorVisitor::visitProgram(), CCodeGeneratorVisitor::visitProgram(), TypeCheckerVisitor::visitSequentialAction(), TypeCheckerVisitor::visitSequentialBehavior(), TypeCheckerVisitor::visitSequentialDeclaration(), TypeCheckerVisitor::visitSequentialExpressionList(), TypeCheckerVisitor::visitSequentialFieldDeclaration(), JavaCodeGeneratorVisitor::visitSequentialFieldDeclaration(), TypeCheckerVisitor::visitSequentialGuardedStatement(), TypeCheckerVisitor::visitSequentialIdentifierList(), TypeCheckerVisitor::visitSequentialImport(), TypeCheckerVisitor::visitSequentialLeftSideList(), TypeCheckerVisitor::visitSequentialMessage(), JavaCodeGeneratorVisitor::visitSequentialMessage(), TypeCheckerVisitor::visitSequentialProcess(), TypeCheckerVisitor::visitSequentialStatement(), TypeCheckerVisitor::visitSimpleAction(), TypeCheckerVisitor::visitSimpleArrayReference(), TypeCheckerVisitor::visitSimpleBehavior(), TypeCheckerVisitor::visitSimpleDeclaration(), TypeCheckerVisitor::visitSimpleExpressionList(), TypeCheckerVisitor::visitSimpleFieldDeclaration(), TypeCheckerVisitor::visitSimpleGuardedStatement(), TypeCheckerVisitor::visitSimpleLeftSideList(), TypeCheckerVisitor::visitSimpleMessage(), JavaCodeGeneratorVisitor::visitSimpleMessage(), TypeCheckerVisitor::visitSimpleProcess(), and TypeCheckerVisitor::visitUnaryExpression().


Member Data Documentation

SrcPosition* Ast::position [protected]
 

Definition at line 9 of file ast.h.

Referenced by Action::Action(), ActStatement::ActStatement(), ArrayReference::ArrayReference(), ArrayType::ArrayType(), AssignStatement::AssignStatement(), Behavior::Behavior(), BehaviorStatement::BehaviorStatement(), BinaryExpression::BinaryExpression(), StopStatement::clone(), Declaration::Declaration(), DoStatement::DoStatement(), Expression::Expression(), ExpressionList::ExpressionList(), FieldDeclaration::FieldDeclaration(), FieldReference::FieldReference(), FieldType::FieldType(), getPosition(), Guard::Guard(), GuardedStatement::GuardedStatement(), GuardExpression::GuardExpression(), GuardReceive::GuardReceive(), GuardTimeout::GuardTimeout(), Identifier::Identifier(), IdentifierList::IdentifierList(), IfStatement::IfStatement(), Import::Import(), IntegerLiteral::IntegerLiteral(), LeftSide::LeftSide(), LeftSideList::LeftSideList(), Message::Message(), MultipleArrayReference::MultipleArrayReference(), operator=(), operator==(), Process::Process(), Program::Program(), RangeType::RangeType(), ReceiveStatement::ReceiveStatement(), SendStatement::SendStatement(), SequentialAction::SequentialAction(), SequentialBehavior::SequentialBehavior(), SequentialDeclaration::SequentialDeclaration(), SequentialExpressionList::SequentialExpressionList(), SequentialFieldDeclaration::SequentialFieldDeclaration(), SequentialGuardedStatement::SequentialGuardedStatement(), SequentialIdentifierList::SequentialIdentifierList(), SequentialImport::SequentialImport(), SequentialLeftSideList::SequentialLeftSideList(), SequentialMessage::SequentialMessage(), SequentialProcess::SequentialProcess(), SequentialStatement::SequentialStatement(), SimpleAction::SimpleAction(), SimpleArrayReference::SimpleArrayReference(), SimpleBehavior::SimpleBehavior(), SimpleDeclaration::SimpleDeclaration(), SimpleExpressionList::SimpleExpressionList(), SimpleFieldDeclaration::SimpleFieldDeclaration(), SimpleGuardedStatement::SimpleGuardedStatement(), SimpleIdentifierList::SimpleIdentifierList(), SimpleImport::SimpleImport(), SimpleLeftSideList::SimpleLeftSideList(), SimpleMessage::SimpleMessage(), SimpleProcess::SimpleProcess(), SimpleStatement::SimpleStatement(), SkipStatement::SkipStatement(), StartStatement::StartStatement(), Statement::Statement(), StopStatement::StopStatement(), StringLiteral::StringLiteral(), UnaryExpression::UnaryExpression(), and ~Ast().


The documentation for this class was generated from the following files:
Generated on Mon Dec 1 17:38:52 2003 for Protomake by doxygen1.3