Skip to content

Do not use string concatenation on _serializedATN in generated lexer file #379

@PatrickHofman

Description

@PatrickHofman

In a very large token file, the generated lexer file contains a lot of string concatenations in the _serializedATN string. This causes Visual Studio and MS Build to crash with a StackOverflowException (as reported and to be fixed here: dotnet/runtime#76953).

Is it possible to use one long string instead of a long list of string concatenations? Any other options or ideas?

Repro Visual Studio solution containing the generated token file can be found here: dotnet/runtime#76953 (comment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions