A few years ago I wrote a SQL parser in C++, before there was any AI to help. Recently I wrote it again, in Rust — sqlparser-ranger . I chose Rust because it has a benchmark that compares a parser against all the others, and I wanted a number to measure mine by. The number came out well. But that is not what this post is about. Before writing either of them, I read all of Alibaba's Druid parser to understand how it works. I had no other way in. I jumped from function to function, from the bo...