#include <include/hllcode.h>
Inheritance diagram for SyntaxNode:
Definition at line 129 of file hllcode.h.
Public Member Functions | |
virtual void | addSuccessors (SyntaxNode *root, std::vector< SyntaxNode * > &successors) |
void | addToScore (int n) |
virtual SyntaxNode * | clone ()=0 |
virtual bool | endsWithGoto ()=0 |
virtual int | evaluate (SyntaxNode *root)=0 |
virtual SyntaxNode * | findNodeFor (PBB bb)=0 |
PBB | getBB () |
SyntaxNode * | getCorrespond () |
int | getDepth () |
virtual SyntaxNode * | getEnclosingLoop (SyntaxNode *pFor, SyntaxNode *cur=NULL)=0 |
virtual int | getNumber () |
virtual int | getNumOutEdges ()=0 |
virtual SyntaxNode * | getOutEdge (SyntaxNode *root, int n)=0 |
int | getScore () |
virtual void | ignoreGoto () |
virtual bool | isBlock () |
virtual bool | isBranch () |
virtual bool | isGoto () |
virtual void | printAST (SyntaxNode *root, std::ostream &os)=0 |
virtual SyntaxNode * | replace (SyntaxNode *from, SyntaxNode *to)=0 |
void | setBB (PBB bb) |
void | setDepth (int n) |
virtual bool | startsWith (SyntaxNode *node) |
SyntaxNode () | |
virtual | ~SyntaxNode () |
Protected Attributes | |
SyntaxNode * | correspond |
int | depth |
int | nodenum |
bool | notGoto |
PBB | pbb |
int | score |
|
Definition at line 25 of file syntax.cpp. |
|
Definition at line 31 of file syntax.cpp. |
|
Reimplemented in BlockSyntaxNode, IfThenSyntaxNode, IfThenElseSyntaxNode, PretestedLoopSyntaxNode, PostTestedLoopSyntaxNode, and InfiniteLoopSyntaxNode. Definition at line 173 of file hllcode.h. Referenced by IfThenSyntaxNode::addSuccessors(). |
|
Definition at line 162 of file hllcode.h. References getScore(), and score. |
|
|
|
|
|
Definition at line 150 of file hllcode.h. References pbb. |
|
Definition at line 168 of file hllcode.h. References correspond. Referenced by InfiniteLoopSyntaxNode::replace(), PostTestedLoopSyntaxNode::replace(), PretestedLoopSyntaxNode::replace(), IfThenElseSyntaxNode::replace(), IfThenSyntaxNode::replace(), and BlockSyntaxNode::replace(). |
|
Definition at line 164 of file hllcode.h. References depth. Referenced by PretestedLoopSyntaxNode::addSuccessors(), IfThenElseSyntaxNode::addSuccessors(), and BlockSyntaxNode::addSuccessors(). |
|
|
Definition at line 148 of file hllcode.h. References nodenum. Referenced by InfiniteLoopSyntaxNode::printAST(), PostTestedLoopSyntaxNode::printAST(), PretestedLoopSyntaxNode::printAST(), IfThenElseSyntaxNode::printAST(), and IfThenSyntaxNode::printAST(). |
|
|
|
Definition at line 35 of file syntax.cpp. References evaluate(), and score. Referenced by addToScore(). |
|
Reimplemented in BlockSyntaxNode. Definition at line 146 of file hllcode.h. Referenced by InfiniteLoopSyntaxNode::addSuccessors(), PostTestedLoopSyntaxNode::addSuccessors(), PretestedLoopSyntaxNode::addSuccessors(), and IfThenElseSyntaxNode::addSuccessors(). |
|
Reimplemented in BlockSyntaxNode. |
|
Reimplemented in IfThenSyntaxNode, IfThenElseSyntaxNode, PretestedLoopSyntaxNode, PostTestedLoopSyntaxNode, and InfiniteLoopSyntaxNode. Definition at line 47 of file syntax.cpp. References BasicBlock::getType(), pbb, and TWOWAY. |
|
Reimplemented in IfThenSyntaxNode, IfThenElseSyntaxNode, PretestedLoopSyntaxNode, PostTestedLoopSyntaxNode, and InfiniteLoopSyntaxNode. Definition at line 42 of file syntax.cpp. References BasicBlock::getType(), notGoto, ONEWAY, and pbb. Referenced by BlockSyntaxNode::endsWithGoto(). |
|
|
Implemented in BlockSyntaxNode, IfThenSyntaxNode, IfThenElseSyntaxNode, PretestedLoopSyntaxNode, PostTestedLoopSyntaxNode, and InfiniteLoopSyntaxNode. Referenced by IfThenElseSyntaxNode::addSuccessors(), and BlockSyntaxNode::addSuccessors(). |
|
Definition at line 151 of file hllcode.h. References pbb. |
|
Definition at line 163 of file hllcode.h. References depth. Referenced by InfiniteLoopSyntaxNode::addSuccessors(), PostTestedLoopSyntaxNode::addSuccessors(), PretestedLoopSyntaxNode::addSuccessors(), IfThenElseSyntaxNode::addSuccessors(), and BlockSyntaxNode::addSuccessors(). |
|
Reimplemented in BlockSyntaxNode. Definition at line 156 of file hllcode.h. Referenced by PretestedLoopSyntaxNode::addSuccessors(). |
|
|
Definition at line 136 of file hllcode.h. Referenced by getDepth(), and setDepth(). |
|
Definition at line 132 of file hllcode.h. Referenced by getNumber(), BlockSyntaxNode::printAST(), and SyntaxNode(). |
|
Definition at line 135 of file hllcode.h. Referenced by BlockSyntaxNode::ignoreGoto(), isGoto(), and BlockSyntaxNode::printAST(). |
|
|
Definition at line 133 of file hllcode.h. Referenced by addToScore(), and getScore(). |