I would like to print the exact source line when I have a parsing or semantic error. What would be the most elegant way to do this?
I also would like to write listing files of the generated code, annotated with the original source lines (so it includes comments and such). So preferably it should be efficient too. I know I can retrieve token position with CppCC, but using that to get the corresponding source code seems harder.
Thanks a lot!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi again,
I would like to print the exact source line when I have a parsing or semantic error. What would be the most elegant way to do this?
I also would like to write listing files of the generated code, annotated with the original source lines (so it includes comments and such). So preferably it should be efficient too. I know I can retrieve token position with CppCC, but using that to get the corresponding source code seems harder.
Thanks a lot!