|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T V
Length: 2239 (0x8bf)
Types: TextFile
Names: »V«
└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
└─⟦5cb1d1d7f⟧ »DATA«
└─⟦3b1ee7bd8⟧
└─⟦this⟧
with Diana;
generic
-- Walk over a diana tree.
-- Preprocess is called on every node before the children are visited.
-- Postprocess is called on every node after all the children are visited.
-- State can be used to keep and pass between the pre/post processing and
-- the child processing
type State is private;
with procedure Preprocess (Node : Diana.Tree;
State_From_Parent : in out State;
State_For_Children : in out State);
-- Called on every node before the children are visited.
-- State_From_Parent and State_For_Children are both initialized
-- with the state passed in from the parent
with procedure Postprocess (Node : Diana.Tree;
State_From_Children : in out State;
State_For_Parent : in out State);
-- Called on every node after the children are visited. State_For_Parent
-- is the same as was passed into preprocess as State_From_Parent. It
-- is passed back to the parent node and becomes the State_For_Children
-- there. Thus passing the accumulation of state from child processing
-- back to a parent requires 'State_For_Parent := State_From_Children'.
-- Otherwise the state that came in from the parent, as modified by
-- preprocess, will be returned to the parent
-- These state variables would be used to implement context sensitive
-- searches. For example, assume we are looking for task declarations
-- inside subprogram bodies. When a subprogram declaration is discovered
-- by preprocess, it would set a flag in State_For_Children indicating
-- that task declarations are to be noticed. If one is found, a flag
-- would be set in state_for_children indicating this. Postprocess
-- would check for the task found flag in State_From_Children, and
-- set the flag in State_For_Parent. Thus, when the tree for the
-- procedure body is finished, the State_For_Parent would have the flag
-- indicating a task was found in a procedure, but would have the
-- 'notice_tasks' flag reset.
procedure Diana_Tree_Walk_Generic (Node : Diana.Tree; S : in out State);