20 years of code generation led here. The YAML 1.2 spec has 211 grammar productions. I converted them from the Haskell reference implementation to s-expressions, wrote a projector in Common Lisp, and generated spec-compliant parsers in 18 languages. All pass 308/308 YAML Test Suite tests. Adding a new language is a 300-line target spec. The projector does the rest in seconds.
1 comment
Show HN: One grammar, 18 YAML parsers – a Futamura projector in Common Lisp | Heykuki News