Open dmitrii-ubskii opened 1 year ago
An issue indeed. I guesss the culprit is here : https://github.com/rrevenantt/antlr4rust/blob/master/src/common_token_stream.rs#L23 The first token is consumed there before next_token_on_channel function can filter it on the channel criteria.
Consider the following grammar:
Parsing
" $abc, $def"
in Java or on http://lab.antlr.org/ produces the expected parse tree. But trying to parse this string in Rust viaparser.list()
produces the following error instead: