Sorry, Im not familiar with C++. Does the example print line numbers of the source or of the destination file?
I have created a grammar for a subset of Java and I don’t have a compiler for it, because I transform code to CSharp and let it compile then. If there are errors in the source, I’d like to know the line number of the source (Java), which may differ from the destination line numbers (CSharp). That is because empty lines and comments are removed (which is ok). I would be pleased if my “language transformer” could add the source line number as a SLC at the end of every line.