[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnubol: Re: ref touch points
>>>>> "Mike" == Michael McKernan <mck@tivoli.mv.com>
>>>>> wrote the following on Sat, 04 Dec 1999 12:22:23 -0500
Mike> No, I have not made myself clear. This is not a parsing
Mike> issue. Let's say we have the following records.
01 A. 01 B.
02 B. 02 B.
03 C. 03 C.
04 D. 04 D.
05 X. 05 Y.
06 Z PIC 9. 06 Z PIC X.
Mike> The programmer may legitimately reference Z of Y and it is a
Mike> unique reference. Since the name at the top of the tree need
Mike> not be among the qualifiers, it becomes very inefficient to
Mike> do the lookup top-down. What we do instead, is form chains
Mike> while we're building the symbol table of all the symbol table
Mike> entries that have the same name, then use those chains to
Mike> accomplish the lookup bottom-up. We are now searching only
Mike> the trees that contain the data-name instead of searching
Mike> every tree in the program.
I should also have noted that when you start at an internal node and
search upward, you are searching only a single unique path to the top
of the tree. In a top-down search, it is necessary to investigate
every branch.
--
This message was sent through the gnu-cobol mailing list. To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body. For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.