1

Closed

ignore lexer errors in parts of file omitted via preprocessor

description

I had a problem with the lexer blowing up when it parsed the following:
 

if unused

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.00.9466 for 80x86
Copyright (C) Microsoft Corporation 1984-2001. All rights reserved.
 
......
 
The lexer blows up on the copyright line (not sure why)
 
I added the following override to PreProcessor.cs:
 
 
    public override void ReportError(RecognitionException e) {
        // Ignore lexer errors in parts of the file that the preprocessor is omitting
        // So, only report error if we are processing at the moment 
        if (Processing.Peek())
            base.ReportError(e);
    }
Closed Nov 5, 2010 at 3:20 PM by anbrad
I added that function

comments