********************************************************************
* NOTE: This file is generated automatically from the event * definition file Parse.evt. ********************************************************************<* PRAGMA LL *> MODULEevent handling methods:; <*NOWARN*> IMPORT ParseViewClass, TextPort, Rd, ZeusClass, Filter; <*NOWARN*> IMPORT TextEditVBT, Fmt, Parse, ZFmt, Wr, ZeusPanel; <*NOWARN*> IMPORT FormsVBT, VBT, View; <* FATAL FormsVBT.Error, FormsVBT.Unimplemented *> REVEAL T = Public BRANDED OBJECT fv: FormsVBT.T := NIL; te: TextEditVBT.T := NIL; OVERRIDES init := TViewInit; install := TViewInstall; delete := TViewDelete; snapshot := TViewSnapshot; restore := TViewRestore; config := TViewConfig; reactivity := TViewReactivity; startrun := TViewStartrun; endrun := TViewEndrun; oeSetup := Setup; oePush := Push; oePop := Pop; oeScan := Scan; oeNoteError := NoteError; oeGoto := Goto; oeNewNode := NewNode; oeNewTerm := NewTerm; oeNewEdge := NewEdge; oeDeleteLeaf := DeleteLeaf; oeUpdateDone := UpdateDone; END; PROCEDURE ParseTranscriptView TViewInit (view: T): T = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "init"); RETURN ParseViewClass.T.init (view, NIL); END TViewInit; PROCEDUREClear (<* UNUSED *> fv : FormsVBT.T; <* UNUSED *> name: TEXT; cl : REFANY; <* UNUSED *> time: VBT.TimeStamp) = BEGIN TextPort.SetText(NARROW(cl, T).te.tp, "") END Clear; PROCEDURETViewInstall (view: T) = <* LL = VBT.mu *> BEGIN view.fv := ZeusPanel.NewForm("ParseTranscriptView.fv"); view.te := FormsVBT.GetVBT(view.fv, "transcript"); TViewZTrace (view, "install"); FormsVBT.AttachProc(view.fv, "clear", Clear, view); EVAL Filter.Replace (view, view.fv); ParseViewClass.T.install (view); END TViewInstall; PROCEDURETViewDelete (view: T) = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "delete"); ParseViewClass.T.delete (view); END TViewDelete; PROCEDURETViewSnapshot (view: T; wr: Wr.T) RAISES {ZeusClass.Error} = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "snapshot"); ParseViewClass.T.snapshot (view, wr); END TViewSnapshot; PROCEDURETViewRestore (view: T; rd: Rd.T) RAISES {ZeusClass.Error} = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "restore"); ParseViewClass.T.restore (view, rd); END TViewRestore; PROCEDURETViewConfig ( view: T; state: ZeusClass.StateChange; o: ZeusClass.T) = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "config"); ParseViewClass.T.config (view, state, o); END TViewConfig; PROCEDURETViewReactivity (view: T; <*UNUSED*> on: BOOLEAN) = <* LL = VBT.mu *> BEGIN TViewZTrace(view, "reactivity"); ParseViewClass.T.reactivity (view, TRUE); END TViewReactivity; PROCEDURETViewStartrun (view: T) = <* LL = {} *> BEGIN TViewZTrace (view, "startrun"); ParseViewClass.T.startrun (view); END TViewStartrun; PROCEDURETViewEndrun (view: T) = <* LL = {} *> BEGIN TViewZTrace (view, "endrun"); ParseViewClass.T.endrun (view); END TViewEndrun;PROCEDURESetup (view: T; s: Parse.State) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "Setup ...") ELSE TViewTrace (view, "Setup " & Parse.FmtState(s) ) END END END END Setup; PROCEDUREPush (view: T; id: INTEGER; tag: TEXT) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "Push ...") ELSE TViewTrace (view, "Push " & Fmt.Int(id) & " " & (tag) ) END END END END Push; PROCEDUREPop (view: T; id: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "Pop ...") ELSE TViewTrace (view, "Pop " & Fmt.Int(id) ) END END END END Pop; PROCEDUREScan (view: T; token: TEXT) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "Scan ...") ELSE TViewTrace (view, "Scan " & (token) ) END END END END Scan; PROCEDURENoteError (view: T; ) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "NoteError ...") ELSE TViewTrace (view, "NoteError " ) END END END END NoteError; PROCEDUREGoto (view: T; state: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "Goto ...") ELSE TViewTrace (view, "Goto " & Fmt.Int(state) ) END END END END Goto; PROCEDURENewNode (view: T; id: INTEGER; op: TEXT) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "NewNode ...") ELSE TViewTrace (view, "NewNode " & Fmt.Int(id) & " " & (op) ) END END END END NewNode; PROCEDURENewTerm (view: T; id: INTEGER; op: TEXT) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "NewTerm ...") ELSE TViewTrace (view, "NewTerm " & Fmt.Int(id) & " " & (op) ) END END END END NewTerm; PROCEDURENewEdge (view: T; child, parent: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "NewEdge ...") ELSE TViewTrace (view, "NewEdge " & Fmt.Int(child) & " " & Fmt.Int(parent) ) END END END END NewEdge; PROCEDUREDeleteLeaf (view: T; id: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "DeleteLeaf ...") ELSE TViewTrace (view, "DeleteLeaf " & Fmt.Int(id) ) END END END END DeleteLeaf; PROCEDUREUpdateDone (view: T; ) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "UpdateDone ...") ELSE TViewTrace (view, "UpdateDone " ) END END END END UpdateDone; PROCEDURETViewZTrace (view: T; t: TEXT) = BEGIN IF view.fv # NIL THEN IF FormsVBT.GetBoolean(view.fv, "zeus") THEN TextPort.PutText(view.te.tp, "**zeus: " & t & "\n"); TextPort.Normalize(view.te.tp, LAST(INTEGER)) END END END TViewZTrace; PROCEDURETViewTrace (view: T; t: TEXT) = BEGIN TextPort.PutText(view.te.tp, "--event: " & t & "\n"); TextPort.Normalize(view.te.tp, LAST(INTEGER)) END TViewTrace; PROCEDURETViewNew (): View.T = BEGIN RETURN NEW(T).init() END TViewNew; BEGIN ZeusPanel.RegisterView (TViewNew, "Parse Transcript View", "Parse"); END ParseTranscriptView.