// CLASS DICTIONARY //========================================================== // solving the capacity checking problem from hw 2 // without modifying the host // visitor has own stack to keep track of initial value // is also an exercise with Java wrapper classes (Integer). package RecursiveContainer; import java.util.*; Container = "(" List(Item) Capacity ")" . Item : Container | Simple. List(S) ~ {S}. Simple = Ident Weight. Capacity = Integer. Weight = Integer. CheckingVisitor = DifferenceVisitor Integer. SummingVisitor = Integer. DifferenceVisitor = // takes care of computing difference int Stack SummingVisitor. Main = .