I wrote one popular expression evaluation library: https://github.com/antonmedv/expr
Here is the first implementation of the parser: https://github.com/antonmedv/expr/blob/v1.1.4/parser.go
After I was thinking about using ANTLR: https://github.com/antonmedv/expr/blob/v1.4.5/parser/parser.go
But, bugs in ANTLR go bindings, lack of control of error massages, made we return back to the handwritten parser: https://github.com/antonmedv/expr/blob/master/parser/parser.go
Also, notice what removing all
if err != nil in the latest parser evolution makes code readable.