The file spec released by Adobe (http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/) is actually outdated, wrong in some places, and can be incredibly vague at times.
Older illustrator files are in fact, EPS files. This is somewhat tricky since, an EPS is not actually so much a data format as it is a turing complete programming language. Sooo... yeah, who knows what black magic they did to pull off reliably reading and writing it.
You can write an EPS file by emitting your list of shapes without using the turing-complete features of the language.
Not that hard, at least conceptually.