Skip to content

Hidden channel tokens at the start of the parsed string are not ignored #66

Open
@dmitrii-ubskii

Description

@dmitrii-ubskii

Consider the following grammar:

grammar hidden_test;

list: VAR_ ( ',' VAR_ )* ;
VAR_: '$' [a-zA-Z0-9][a-zA-Z0-9_-]* ;

WS : [ \t\r\n]+ -> channel(HIDDEN) ;

Parsing " $abc, $def" in Java or on http://lab.antlr.org/ produces the expected parse tree. But trying to parse this string in Rust via parser.list() produces the following error instead:

line 1:0 extraneous input ' ' expecting VAR_

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions