I don't know anything about compilers, but was just wondering what resource information you used to prepare your book (which I have not seen). So far as surveying and track geometry is concerned, there is a book published by Drs. Pickels & Wiley (1913) of the University of Illinois called "Railroad Surveying." Essentially, it is a compilation into book form of the class notes they used to teach their railroad surveying classes. That is the book Dr. W.W. Hay told me I should get and I was very fortunate to find one. Yes, the book is 100 years old, but the geometric relationships are still the same now as they were then. It's just that today we have CoGo and CADD systems to solve the problems in a few minutes that took hours with a slide rule back then.
I scanned it in to pdf form a few years ago so I could put the original away. It is very fragile. Unfortunatly, the scan is a 54MB file - even without all the log, trig, and curve tables which are about half the original book - so I can't email the file. If you are interested in having a copy, let me know and we can make arrangements to get it to you.
Tom Scott Jr.