Discussion:
Linked list of binary trees plus what ?
(too old to reply)
p***@gmail
2007-12-08 16:13:49 UTC
Permalink
ETH oberon has a nice utility called EditKeys which effectively
allows defining 'hot-keys'. Macro definitions of user chosen
strings are activated by the <insert> key.

In order to understand certain parts of the manual/Tool Eg.:
"Text stretches are pushed on a parameter stack when processed.
Built-in functions may pop parameter(s) from that stack.

^0 pops a parameter and causes textual insertion.
^1 pops a parameter and inserts the corresponding ascii character.
...etc.", I looked at the source code.

But the data-structures confuse me. Here are some:--

SequenceDesc = RECORD
next: Sequence; <-- linked list
sym: INTEGER;
cmd: CHAR;
def: Definition;
stretch: Texts.Buffer
END;

DefinitionDesc = RECORD
left, right: Definition; <-- binary tree
in: BOOLEAN;
trig: Ident; <-- ARRAY IdentLen OF CHAR
seq: Sequence
END;

It seems to me that 'Sequence' is a linked list of Definitions
with nodes: sym, cmd, stretch.
And that Definition is a binary tree.
But the confusing/un-natural thing is that Definition's nodes
have also further Sequence-linkedLists !

Q - is this correct ?

I'm guessing that the data structures employed are those
which naturally occur for macro/compilers/??

Can anybody give me a clue of how to better understand
this application ? It originates from 1992 and the full use of
it's features may be very usefull.

== Chris Glur.
Andreas F. Borchert
2007-12-08 17:00:03 UTC
Permalink
Post by p***@gmail
But the data-structures confuse me. Here are some:--
SequenceDesc = RECORD
next: Sequence; <-- linked list
sym: INTEGER;
cmd: CHAR;
def: Definition;
stretch: Texts.Buffer
END;
DefinitionDesc = RECORD
left, right: Definition; <-- binary tree
in: BOOLEAN;
trig: Ident; <-- ARRAY IdentLen OF CHAR
seq: Sequence
END;
This, I am just guessing here, could be a binary tree of sequences
where each element of a sequence has a pointer pointing back to
the definition it belongs to. In other words, this is most likely
a data structure with cycles.

Andreas.

Loading...