jif.extension
Class JifStmtExt_c
java.lang.Object
polyglot.ast.Ext_c
jif.ast.Jif_c
jif.extension.JifStmtExt_c
- All Implemented Interfaces:
- java.lang.Cloneable, Jif, JifStmtExt, polyglot.ast.Ext, polyglot.util.Copy
- Direct Known Subclasses:
- JifBlockExt, JifBranchExt, JifCaseExt, JifConstructorCallExt, JifDoExt, JifDowngradeStmtExt, JifEmptyExt, JifEvalExt, JifForExt, JifIfExt, JifLabeledExt, JifLocalDeclExt, JifReturnExt, JifSwitchExt, JifSynchronizedExt, JifThrowExt, JifTryExt, JifWhileExt
public abstract class JifStmtExt_c
- extends Jif_c
- implements JifStmtExt
The root of all kinds of Jif extensions for statements.
It provides a generic labelCheck method, which
will invoke the labelCheckStmt methods provided
by the subclasses of this class.
Fields inherited from class polyglot.ast.Ext_c |
ext, node |
Methods inherited from class polyglot.ast.Ext_c |
dump, ext, ext, node, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface polyglot.ast.Ext |
dump, ext, ext, node |
stmtDel
protected JifStmtExt stmtDel
JifStmtExt_c
public JifStmtExt_c(JifStmtExt stmtDel,
ToJavaExt toJava)
JifStmtExt_c
public JifStmtExt_c(ToJavaExt toJava)
stmtDel
public JifStmtExt stmtDel()
- Specified by:
stmtDel
in interface JifStmtExt
init
public void init(polyglot.ast.Node node)
- Specified by:
init
in interface polyglot.ast.Ext
- Overrides:
init
in class Jif_c
copy
public java.lang.Object copy()
- Specified by:
copy
in interface polyglot.util.Copy
- Overrides:
copy
in class Jif_c
stmtDel
public JifStmtExt stmtDel(JifStmtExt stmtDel)
- Specified by:
stmtDel
in interface JifStmtExt
labelCheckStmt
public abstract polyglot.ast.Node labelCheckStmt(LabelChecker lc)
throws polyglot.types.SemanticException
- Specified by:
labelCheckStmt
in interface JifStmtExt
- Throws:
polyglot.types.SemanticException
labelCheck
public polyglot.ast.Node labelCheck(LabelChecker lc)
throws polyglot.types.SemanticException
- Label check a statement.
After invoking the overrided
labelCheckStmt
statement,
this method will apply the "single path rule" (Figure 4.15):
If the path map contains only one path and it is "N" or "R",
then the PC label at the end is the same as at the beginning,
so just set the path map to use the PC label.
- Specified by:
labelCheck
in interface Jif
- Overrides:
labelCheck
in class Jif_c
- Throws:
polyglot.types.SemanticException