Christoph Reichenbach wrote:

> Hi,
>
> On Mon, 13 Dec 1999, Lars Skovlund wrote:
> > > [Said()]
> > > There is no mention of the '&' and '#' tokens (0xf1/0xf7). OTOH, I don't
> > > recall # being used in any of the Said specs I saw...
> > > How are they treated by SCI?
> > Not at all (?!). It sounds strange, I know, but I have also found (in the
> > undocumented second part of the code)
> > testing for some storage codes which can never appear in said trees, at least in
> > release versions. Perhaps they are the activation switch for an in-house said
> > debugger or something.
>
> Do you happen to know if SCI01 uses them?
>
> > > > Each "lexeme" (well, most of them) is added to the tree for later use by the
> > > > second phase of Said(). This is done by a process called "augmenting" the
> > > > tree. The augmentation process joins a sub-expression with the main tree,
> > > > adding two descriptive storage codes. The result of an augmentation is
> > > > sketched below:
> > > >
> > > >                 (parent node in main tree)
> > > >                          /      \
> > > >                        /         \
> > > >              (not assigned)   tree node
> > > >                                  /   *1
> > > >                                /
> > > >                           tree node
> > > >                         /       \
> > > >                       /          \
> > > >                   nodeval1    (beginning of subtree)
> > > >                                  /    *2
> > > >                                 /
> > > >                            nodeval2
> > >
> > > So it could also be interpreted as a singly linked list with one optional
> > > value per node?
>
> Hmm, let me re-iterate on that one (I suppose this was wrong there,
> anyway).
> Let's assume that the parser matches the expression
>         Mainexp ',' Expression
> which is a valid Expression. It then proceeds to recurse on both
> the matched Mainexp and the Expression (Let's call them M and E),
> attaching the results to the augmentation branch of the original
> Expression. Now the question is: Where are they attached?
> The augmentation branch described above has two unused branches on its
> tree nodes (marked with *1 and *2), however, only *2 is known to be
> related to subtrees. So, would, in my example, M be linked to *1 and
> E to *2, or the other way around- or would *2 point to an additional tree
> node linking to M and E?

E is put at #1, and M is put at #2. M is a single node if it is a word group.

> > > Where's ** and where do they store word groups? :-)
> >
> > Right :-). The word node part of a tree will look like this:
> >
> >                      -----
> >                     /     \
> >                 0x141     / \
> >                          /   \
> >                         /     \
> >                        /       \
> >                       0x153   0x7D1
>
> Where 0x7d1 is the word group?

Yes.

>
>
> llap,
>  Christoph

Lars


Reply via email to