In regards to the "grammar" approach, perhaps it's just the Perl background many of us have (regexes do rule!), but that wouldn't address tracks of different radii, which at least exist in the Lionel world. I don't think regexen apply. Maybe they do, but they seem to be one-dimensional.
I am thinking (really roughly) that interesting tracks might be built via finite automata... i.e. Conway's game of life on steroids.