This project is read-only.

Skipping backslash newline

Jun 11, 2010 at 8:25 AM

The C spec requires stripping off the backslash newline sequence before attempting to tokenize input. Is there any way to do it with gplex without losing line and column information?

Adding a regex for that sequence obviously won't work for cases like bre\\nak. I thought of modifying/extending Scanner::GetChr to do this, but the class is sealed and the method is not virtual. Any pre-stripping I do before invoking the scanner will mess up the line numbers. Any pointers as to how to go about it?