B -- C
getFirstChild of A is B, of B is null, of C is null.
getNextSibling of A is null, of B is C, of C is null.
On Saturday, May 3, 2003, at 08:38 AM, jw9315 wrote:
> so what type of tree structures have a nextSibling()of null, because
> I can always get the firstChild, but calls to getNextSibling always
> return null?
> of null
> --- In firstname.lastname@example.org, ow <oneway_111@y...> wrote:
>> --- jw9315 <jw9315@b...> wrote:
>>> I writing a very simple interpreter using an AST tree. I know
> this is
>>> probably a trivial question, but what is the difference between
>>> calls astTree.getFirstChild() vs astTree.getNextSibling()? Could
>>> anyone give me a short example, it would be much appreciated!
>> The way I see it:
>> AST parent
>> |--- firstChild = parent.getFirstChild()
>> |--- nextSibling = firstChild.getNextSibling()
>> Do you Yahoo!?
>> The New Yahoo! Search - Faster. Easier. Bingo.
> Your use of Yahoo! Groups is subject to
Creator, ANTLR Parser Generator: http://www.antlr.org
Co-founder, http://www.peerscope.com link sharing, pure-n-simple
Lecturer in Comp. Sci., University of San Francisco