Now this D entry works again: http://rosettacode.org/wiki/S-Expressions#D
Probably it can be written without explicit indexes, only using txt.front, txt.popFrontN, txt.find, etc. Do you want to produce such modified version?
This simple task shows well why a parser combinators like Parsec is better:
http://rosettacode.org/wiki/S-Expressions#Haskell Bye, bearophile