
18 Sep
2011
18 Sep
'11
12:56 p.m.
Hi Radoslav Comment removal is usually done as part of lexing, so during lexing you will have access to the true source position - if you care about line numbering (and have a split between lexing and parsing) usually you would annotate lexemes with their source position. If you are doing macro-expansion before parsing and lexing, it is common to tell the macro expander an artificial but hopefully correct-to-the-user line number with a pragma like #line.