Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-patch] Fix for PR 38065 (C/C++ Parser)

> 
>         Here is another small patch. The problem is caused by the scanner:
> it mistreated '\' characters. getChar() handles "'\' as the last character
> on the line" scenario, where '\' and the end-of-line are correctly skipped
> (imitating preprocessor activity). But it didn't backtrack properly in other
> cases, effectively skipping '\' characters anywhere else in the code
> (outside strings). You could write 
>   cl\ass C\Foo\Bar {
> and it was automagically transformed to
>   class CFooBar {
> for the parser.
>   Now getChar() does additional ungetChar() in case '\' is not the last
> character on the line (and it throws ScannerException, from ungetChar()).
>  
>                                 /Vic 

I will let john comment on this, he owns this PR.

Note: The patches in your email are mangle by your mailer;
spaces and endlines at the wrong place etc ...

You may want to send them as attachment ...
On the good note, they are OK when you attach them to the PR
in bugzilla.

Many thanks. 



Back to the top