Skip to content

Commit 51ac24f

Browse files
committed
docs: minor tweak
1 parent 08e1ad5 commit 51ac24f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/blog/sql-auto-complete.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ The entire autocomplete architecture is actually very simple and consists of two
137137

138138
## Autocomplete Core on ANTLR4
139139

140-
Thanks to ANTLR4! The ANTLR4 runtime provides interfaces for using and manipulating the Augmented Transition Network (ATN), which makes it easy for us to do what we need with the ATN.
140+
Thanks to ANTLR4! The ANTLR4 runtime provides interfaces for using and manipulating the ATN, which makes it easy for us to do what we need with the ATN.
141141

142-
The general idea here is to first traverse the ATN to the cursor position, then find the possible subsequent states from the current state. These "possible subsequent states" are referred to as the `Follow Set`. We then check the `Follow Set` to see if it contains any syntax rules or terminals that we are interested in. After that, we collect these candidates and pass them to the next stage.
142+
The general idea here is to first traverse the ATN to the cursor position, then find the possible subsequent states from the current state. These possible subsequent states are referred to as the `Follow Set`. We then check the `Follow Set` to see if it contains any syntax rules or terminals that we are interested in. After that, we collect these candidates and pass them to the next stage.
143143

144144
Here’s a small optimization: it's clear that the `Follow Set` only depends on the ATN, so we can pre-compute and cache all the `Follow Sets` for each specific grammar. This way, we don't need to recalculate them every time we perform autocomplete.
145145

0 commit comments

Comments
 (0)