From D Wiki
Here are a few lexers and parsers for the D programming languages, all written in D:
- Brian Schott Dscanner does D source code analysis and contains a lexer+parser.
- Hisayuki Mima's CTPG is a compile-time parser generator.
- Nick Sabalausky's Goldie.
- Pegged, a parsing expression grammar (PEG) generator by Philippe Sigaud. Parses at runtime and compile-time.
- Dunnart, a parser generator with built in lexical analysis.