|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectstep9.i
step9.bi
public class bi
rewrites Node trees as typed trees.
Infrastructure and support for bi.BooleanT
and i.IntegerT.
Naming convention: the suffix T indicates a type.
| Nested Class Summary | |
|---|---|
static class |
bi.BAnd
and of two bi.BooleanT trees. |
static class |
bi.BAndIf
and-if of two bi.BooleanT trees. |
static class |
bi.BEq
equal of two bi.BooleanT trees. |
static class |
bi.BNe
not-equal of two bi.BooleanT trees. |
static class |
bi.BNot
negate a bi.BooleanT tree. |
static class |
bi.BooleanT
base class for boolean operations, itself used to type an Boolean leaf. |
static class |
bi.BOr
or of two bi.BooleanT trees. |
static class |
bi.BOrIf
or-if of two bi.BooleanT trees. |
static class |
bi.BPrint
print a bi.BooleanT object. |
static class |
bi.BXor
xor of two bi.BooleanT trees. |
static class |
bi.IEq
equal of two i.IntegerT trees. |
static class |
bi.IGe
greater-equal of two i.IntegerT trees. |
static class |
bi.IGt
greater-then of two i.IntegerT trees. |
static class |
bi.ILe
less-equal of two i.IntegerT trees. |
static class |
bi.ILt
less-then of two i.IntegerT trees. |
static class |
bi.INe
not-equal of two i.IntegerT trees. |
| Nested classes/interfaces inherited from class step9.i |
|---|
i.IAdd, i.IAnd, i.IDiv, i.ILsh, i.IMinus, i.IMod, i.IMul, i.INeg, i.IntegerT, i.IOr, i.IPrint, i.IRsh, i.ISub, i.IXor, i.T |
| Field Summary | |
|---|---|
protected HashMap |
_rules
maps class to array of Rule. |
protected PrintStream |
out
print action stream. |
| Constructor Summary | |
|---|---|
bi()
|
|
| Method Summary | |
|---|---|
Object |
BAnd(ArrayList sub)
factory method: and of two bi.BooleanT trees. |
Object |
BAndIf(ArrayList sub)
factory method: and-if of two bi.BooleanT trees. |
Object |
BEq(ArrayList sub)
factory method: equal of two bi.BooleanT trees. |
Object |
BNe(ArrayList sub)
factory method: not-equal of two bi.BooleanT trees. |
Object |
BNot(ArrayList sub)
factory method: negate a bi.BooleanT tree. |
bi.BooleanT |
BooleanT(Boolean b)
factory method: type a Boolean leaf. |
Object |
BOr(ArrayList sub)
factory method: or of two bi.BooleanT trees. |
Object |
BOrIf(ArrayList sub)
factory method: or-if of two bi.BooleanT trees. |
Object |
BPrint(bi.BooleanT sub)
factory method: print a bi.BooleanT object. |
Object |
BXor(ArrayList sub)
factory method: xor of two bi.BooleanT trees. |
Object |
IEq(ArrayList sub)
factory method: equal of two i.IntegerT trees. |
Object |
IGe(ArrayList sub)
factory method: greater-equal of two i.IntegerT trees. |
Object |
IGt(ArrayList sub)
factory method: greater-then of two i.IntegerT trees. |
Object |
ILe(ArrayList sub)
factory method: less-equal of two i.IntegerT trees. |
Object |
ILt(ArrayList sub)
factory method: less-then of two i.IntegerT trees. |
Object |
INe(ArrayList sub)
factory method: not-equal of two i.IntegerT trees. |
static void |
main(String[] args)
type lines with integer and boolean expressions. |
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 step9.i |
|---|
classname, IAdd, IAnd, IDiv, ILsh, IMinus, IMod, IMul, INeg, IntegerT, IOr, IPrint, IRsh, ISub, IXor, prefix |
| 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 bi()
| Method Detail |
|---|
protected PrintStream out()
out in class i
public Object visit(Object object)
throws Exception
visit in interface Visitorvisit in class iobject - 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 Visitorvisit0 in class iobject - 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 Visitorvisit in class i_action - index._object - to be visited, not null.
NoRuleException - if no rule can be found.
Exceptionpublic bi.BooleanT BooleanT(Boolean b)
Boolean leaf.
public static void main(String[] args)
throws Exception
Exceptionpublic Object BPrint(bi.BooleanT sub)
bi.BooleanT object.
public Object BOrIf(ArrayList sub)
bi.BooleanT trees.
public Object BAndIf(ArrayList sub)
bi.BooleanT trees.
public Object BOr(ArrayList sub)
bi.BooleanT trees.
public Object BXor(ArrayList sub)
bi.BooleanT trees.
public Object BAnd(ArrayList sub)
bi.BooleanT trees.
public Object BEq(ArrayList sub)
bi.BooleanT trees.
public Object BNe(ArrayList sub)
bi.BooleanT trees.
public Object BNot(ArrayList sub)
bi.BooleanT tree.
public Object ILt(ArrayList sub)
i.IntegerT trees.
public Object ILe(ArrayList sub)
i.IntegerT trees.
public Object IGt(ArrayList sub)
i.IntegerT trees.
public Object IGe(ArrayList sub)
i.IntegerT trees.
public Object IEq(ArrayList sub)
i.IntegerT trees.
public Object INe(ArrayList sub)
i.IntegerT trees.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||