|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectstep7.postfix
public class postfix
output expr tree in postfix notation.
| Field Summary | |
|---|---|
protected HashMap |
_rules
maps class to array of Rule. |
protected PrintStream |
out
print action stream. |
| Constructor Summary | |
|---|---|
postfix()
|
|
| Method Summary | |
|---|---|
protected static String |
classname(Object obj)
return last component of (inner) classname. |
static void |
main(String[] args)
read an expression from standard input and output it in postorder. |
protected PrintStream |
out()
returns print action stream. |
Object |
visit(int _action,
Object _object)
visits an object. |
Object |
visit(Object object)
visits an object. |
Object |
visit0(Object object)
visits an object, ignoring possible descendants. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected transient PrintStream out
protected final HashMap _rules
Rule.
| Constructor Detail |
|---|
public postfix()
| Method Detail |
|---|
protected PrintStream out()
public Object visit(Object object)
throws Exception
visit in interface Visitorobject - to be visited, not null.
NoRuleException - if no rule can be found.
ExceptionRule.visit(jag.Visitor, java.util.HashMap, java.lang.Object, int, java.util.List)
public Object visit0(Object object)
throws Exception
visit0 in interface Visitorobject - to be visited, not null.
NoRuleException - if no rule can be found.
ExceptionRule.visit(jag.Visitor, java.util.HashMap, java.lang.Object, int, java.util.List)
public Object visit(int _action,
Object _object)
throws Exception
visit in interface Visitor_action - index._object - to be visited, not null.
NoRuleException - if no rule can be found.
Exceptionprotected static String classname(Object obj)
public static void main(String[] args)
throws Exception
Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||