in reply to Traveller Parsing

Well, it looks like a flexible way for dealing with this data is to first rip out the 'mandatory' or 'anchored' elements, and then tokenize the rest of the line and examine it word-by-word. Thus I'm not tied to whitespace conventions at all, which is nice.

NOW I have to decide how to package the 'parser'. There are a number of things to think about, including what data should be classed and what data should just exist.

I figure there will have to be a class to represent "The Universe": a top-level container to hold discrete chunks of space, which represent a parsec of data each.

Next, the 'chunk of space' itself must be a class, as it contains zero or more bodies in space. In Traveller parlance this is called a 'hex', though it could more generally be called a 'parsec'.

Next, the bodies themselves must be classes: asteroids, moons, planets, gas giants, and stars. Some of these objects can 'contain' objects in an orbit, and some can contain objects on their surface.

At this point, it might be nice to see if CPAN has some astronometric packages available that I can use instead of writing a half-baked variety of my own.

...well, there are astro modules there, but they only look sort of generically useful -- functions and interfaces for real-life data, etc. Anyone have any suggestions?