Skip to content

Cpp ANTLRInputStream cannot handle input with \x00 in the middle #4773

Closed
@YT-SUN97

Description

@YT-SUN97

As described, the C++ code generated from ANTLR 4.13 uses a string structure when loading input. However, there is \x00 in the middle of the input in my use case, which will be regarded as a string termination and cause the parsing error. My questions are as follows

  1. Is there a proper way to solve this?
  2. if the only way is to override the input stream interface (e.g., use vector/bytes to replace string), is there any example I can follow?

Many thanks if you can provide any help.

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