|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.erights.e.elang.evm.ParseNode
Safe: A ParseNode of a program written in "kernel E". A program written in E is immediately expanded to kernel E, hopefully passing source position through successfully.
XXX to be made DeepPassByCopy
Field Summary | |
private SourceSpan |
myOptSpan
XXX to be made final |
static int |
NUM_PR
Enabled: |
static int |
PR_ASSIGN
Enabled: |
static int |
PR_CALL
Enabled: |
static int |
PR_COMP
Enabled: |
static int |
PR_EEXPR
Enabled: lowest priority expression |
static int |
PR_LISTPATT
Enabled: |
static int |
PR_ORDER
Enabled: |
static int |
PR_PATTERN
Enabled: lowest priority pattern |
static int |
PR_PRIM
Enabled: highest priority expression |
static int |
PR_START
Enabled: lowest priority |
Constructor Summary | |
(package private) |
ParseNode(SourceSpan optSpan)
A bit of a kludge, but we initialize the source after construction to avoid propogating source-tracking logic through all subclasses. |
Method Summary | |
void |
__printOn(TextWriter out)
Enabled: Overridden in EExpr & Pattern |
String |
asText()
Enabled: Without the surrounding "e`" and "`". |
(package private) void |
cleanCopy()
Deprecated. Should instead have logic for making a copy that starts out clean. |
SourceSpan |
getOptSpan()
Enabled: Where is the source code this syntactic construct was parsed from? |
void |
lnPrintOn(TextWriter out)
Enabled: priority defaults to PR_START |
void |
lnPrintOn(TextWriter out,
int priority)
Enabled: Onto out, first print a newline, then spaces to the designated indent level, then pretty print this parse node. |
ConstList |
matchBind(ConstList args,
Object specimen)
Enabled: |
abstract boolean |
matchBind(ConstList args,
Object specimen,
FlexList bindings)
Enabled: |
(package private) static boolean |
matchBind(ParseNode[] templates,
ConstList args,
ParseNode[] specimens,
FlexList bindings)
Convenience method for matching corresponding arrays. |
(package private) static boolean |
matchBind(ParseNode optTemplate,
ConstList args,
ParseNode optSpecimen,
FlexList bindings)
Convenience method for handling nulls. |
static void |
printListOn(String left,
ParseNode[] nodes,
String sep,
String right,
TextWriter out,
int priority)
Enabled: Print the left bracket, then the nodes separated by sep, and then the right bracket |
abstract void |
subPrintOn(TextWriter out,
int priority)
Enabled: Pretty print this syntactic construct assuming the specified ambient indent level. |
String |
toString()
Suppressed: For use in IDEs that invoke toString() from inside the debugger (at least VisualAge and IntelliJ IDEA). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int PR_START
public static final int PR_EEXPR
public static final int PR_ASSIGN
public static final int PR_COMP
public static final int PR_ORDER
public static final int PR_CALL
public static final int PR_PRIM
public static final int PR_PATTERN
public static final int PR_LISTPATT
public static final int NUM_PR
private SourceSpan myOptSpan
Constructor Detail |
ParseNode(SourceSpan optSpan)
Method Detail |
void cleanCopy()
public void lnPrintOn(TextWriter out) throws IOException
IOException
public void lnPrintOn(TextWriter out, int priority) throws IOException
IOException
public abstract boolean matchBind(ConstList args, Object specimen, FlexList bindings)
matchBind
in interface MatchMaker
public ConstList matchBind(ConstList args, Object specimen)
matchBind
in interface MatchMaker
static boolean matchBind(ParseNode[] templates, ConstList args, ParseNode[] specimens, FlexList bindings)
static boolean matchBind(ParseNode optTemplate, ConstList args, ParseNode optSpecimen, FlexList bindings)
public SourceSpan getOptSpan()
public static void printListOn(String left, ParseNode[] nodes, String sep, String right, TextWriter out, int priority) throws IOException
IOException
public abstract void subPrintOn(TextWriter out, int priority) throws IOException
IOException
public void __printOn(TextWriter out) throws IOException
__printOn
in interface EPrintable
IOException
subPrintOn(org.erights.e.elib.oldeio.TextWriter, int)
public String toString()
toString
in class Object
public String asText()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |