Adriaan van Os wrote:
Paul Davidson wrote:
Looked at GPC and GCC command line options for ability to give line number (when applicable) of error in source code. Currently am seeing messages like:
lists.pas:1: error: parse error before `:'
Is there way to get the actual line number in code where the offending syntax lives?
This problem occurs on Mac OS X when the source code has Macintosh-style CR (ASCII-13) instead of UNIX-style LF (ASCII-10) for newlines. The compiler sees your source code as one long line. The CodeWarrior editor has the feature to set newline style, other editors may have it also.
Oh, that's the problem? Well, just treating CR and LF equivalently as line-breaks would be wrong on Dos (which uses CR/LF), so it's a little more complicated.
I'll try to fix it in the new lexer (no point doing it now in the old code).
Frank