> Figuring out line numbers is painful if all you have is a character > offset into the preprocessed source, or something similar. Why? All you need is a sorted line table and you do binary searches. This is the way things are done in GNAT, and it works just fine.