public abstract class LabelSubstitution
extends java.lang.Object
subst(LabelSubstitution)
.
In addition, the LabelSubstitution keeps a stack of labels, to record which labels it is in the middle of processing. Labels that recurse on nested labels must push themselves onto the stack before the recursive call, and pop themselves off the stack after the recursive call. Prior to pushing themselves on the stack, labels should examine the stack to see if they already exist in the stack; if so, then the label should not make a recursive call, in order to avoid an infinite loop.
Label.subst(LabelSubstitution)
Constructor and Description |
---|
LabelSubstitution() |
Modifier and Type | Method and Description |
---|---|
void |
popLabel(Label l) |
void |
pushLabel(Label l) |
boolean |
recurseIntoChildren(Label L) |
boolean |
stackContains(Label l) |
AccessPath |
substAccessPath(AccessPath ap) |
Label |
substLabel(Label L) |
Policy |
substPolicy(Policy p) |
Principal |
substPrincipal(Principal p) |
public Label substLabel(Label L) throws polyglot.types.SemanticException
polyglot.types.SemanticException
public Policy substPolicy(Policy p) throws polyglot.types.SemanticException
polyglot.types.SemanticException
public Principal substPrincipal(Principal p) throws polyglot.types.SemanticException
polyglot.types.SemanticException
public AccessPath substAccessPath(AccessPath ap) throws polyglot.types.SemanticException
polyglot.types.SemanticException
public boolean recurseIntoChildren(Label L)
public void pushLabel(Label l)
public void popLabel(Label l)
public boolean stackContains(Label l)