Writing a database in Go: Part 3

This is a continuation of the second part of this series where we discussed lexing the query language for this new database. In this third part we will write our parser. Parsing We start by defining the Parser. A parser takes the tokens produced by the lexer and creates AST nodes which can then be used by a query executor. For PrefixDB, our parser is a simple struct with a TokenBuffer.