GNU bug report logs -
#60555
29.0.50; Some clarification is needed about "smaller" and "larger" Tree-sitter nodes
Previous Next
Reported by: Daniel Martín <mardani29 <at> yahoo.es>
Date: Wed, 4 Jan 2023 14:30:02 UTC
Severity: normal
Found in version 29.0.50
Done: Daniel Martín <mardani29 <at> yahoo.es>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#60555: 29.0.50; Some clarification is needed about "smaller" and "larger" Tree-sitter nodes
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 60555 <at> debbugs.gnu.org.
--
60555: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60555
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>> My main confusion happened after reading this sentence:
>>
>> We talk about a node being “smaller” or “larger”, and “lower” or
>> “higher”.
>>
>> That made me think there are two different dimensions we classify nodes:
>> "Size", that is, if the node is small or large, and "height", that is,
>> if it is low or high. I was hoping to learn the differences between
>> "size" and "height" in the rest of the text, but the text didn't make it
>> clear to me because it only talks about "smaller and lower" and "larger
>> and higher". What about "smaller and higher", or "larger and lower"?
>> Are they possible at all? After reading everything, I got the idea that
>> the terms may actually be synonyms, but I was not 100% sure. I feel we
>> could make this more clear from the start.
>>
>> All of this is my perspective as a non-native English speaker. Hope
>> this helps.
>
> Thanks, I've now reworded that text, please take a look.
Thanks, the text is now clearer to me. I'm closing the bug.
[Message part 3 (message/rfc822, inline)]
In the Elisp manual, under "37.3 Retrieving Nodes" there is this text:
We talk about a node being “smaller” or “larger”, and “lower” or
“higher”. A smaller and lower node is lower in the syntax tree and
therefore spans a smaller portion of buffer text; a larger and higher
node is higher up in the syntax tree, it contains many smaller nodes as
its children, and therefore spans a larger portion of text.
I think the concepts of nodes being "lower" and "higher" are more or
less clear, and the notation is similar to the one used in classic texts
about rooted trees. However, the concepts of "smaller" and "larger" are
not very clear to me. From the text, it seems that "lower" also means
"smaller", and "higher" always means "larger". Is that correct, or
"smaller" and "larger" are really orthogonal to "lower" and "higher"?
If that's the case, I think the text needs some clarification, ideally
with a brief example.
Thanks.
This bug report was last modified 2 years and 196 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.