Writing a parser in Go, the C way
summary
Shows a concrete proof‑of‑concept parser for a tiny language implemented with YACC + Go, and the migration steps used to replace Prometheus’s query parser (PromQL query parser). Demonstrates the actual grammar fragments, lexer/parser split, and integration points with Go code, reports that the rewrite uncovers multiple bugs across components and produces better error messages and clearer semantics, and outlines practical steps to harden the parser for real‑world use.
AI-written summary · about
