Skip to content

Commit ce7f5e7

Browse files
kaby76parrt
authored andcommitted
Wordsmithing.
Signed-off-by: Ken Domino <[email protected]>
1 parent 58d5d55 commit ce7f5e7

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

doc/python-target.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,12 @@ Antlr generates two types of tree traversals: visitors and listeners.
8181
Understanding when to choose a visitor versus a listener is a good idea.
8282
For further information, see https://tomassetti.me/listeners-and-visitors/.
8383
84-
You can use this tree walker
85-
to implement both [inherited](https://en.wikipedia.org/wiki/Attribute_grammar#Inherited_attributes)
86-
and [synthesized attribute](https://en.wikipedia.org/wiki/Attribute_grammar#Synthesized_attributes)
87-
analysis.
88-
89-
A visitor is the best choice when computing only a single synthesized attribute.
84+
A visitor is the best choice when computing only a single [synthesized attribute](https://en.wikipedia.org/wiki/Attribute_grammar#Synthesized_attributes)
85+
or when you want to control the order of parse tree nodes visited.
9086
Alternatively, a listener is the best choice when computing both synthesized
91-
and inherited attributes.
92-
But, in many situations, they are interchangeable.
87+
and [inherited attributes](https://en.wikipedia.org/wiki/Attribute_grammar#Inherited_attributes).
88+
89+
In many situations, they are interchangeable.
9390
9491
### Visitors
9592

0 commit comments

Comments
 (0)