discover: Reimplement native-parser as a Bison parser