I implemented a parser for .opb and .wbo files used in Pseudo Boolean Competition. I used "Input/Output Format and Solver Requirements for the Competitions of Pseudo-Boolean Solvers" http://www.cril.univ-artois.fr/PB11/format.pdf as a reference. But its BNF has some mistakes, and I needed to allow extra spaces and EOL in some places to parse examples in it.