Non-breaking space leads to parser error

SyntaxEditor .NET Languages Add-on for Windows Forms Forum

The latest build of this product (v2020.1 build 0400) was released 28 days ago, which was before this thread was created.
Posted 22 days ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Version: 14.1.0320
Platform: .NET 4.7
Environment: Windows 7 (64-bit)
Avatar

Hi,

I am not sure, whether this is alread fixed in a newer version, but since I just spend hours trying to figure it out, I wanted to let you know.

With version 2014.1.320 the non-breaking space character (nbsp, ASCII 0xA0 or 160) is parsed as a whitespace when the editor is opened. But when the editor is closed, this is parsed as an invalid token, corrupting the parsed compilation unit. The reason seems to be, that if the file is opened in the editor, the parser gets a normalized string, where non-breaking spaces are replaced with regular spaces. If its not, it gets the text as it is found in the text file.

Since the compiler doesn't show any errors, non-breaking spaces seem to be valid characters.

If the problem is still in the latest release, please also make sure this works in the WPF version too.


Best regards, Tobias Lingemann.

Comments (1)

Posted 21 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tobias,

The CSharpLexer used in the 2020.1 WinForms version watches for any whitespace character, as does the WPF version.  So non-breaking spaces are permitted in both without compile errors.


Actipro Software Support

Add Comment

Please log in to a validated account to post comments.