Hi! Unfortunately, I didn't save the exact output to help you reproduce the bug, but briefly: in the grammar with predicates checking char position in line (currentTokenColumn property of Lexer) calculated wrong.
In grammar like this:
and input like '\n\n ' the BLANK and INDENTATION rules never trigger because currentTokenColumn is calculated as if all those tokens are on the same line. I expected that each EOL would increase line number and reset currentTokenColumn to zero. In Java ANTLR4 implementation it works this way.
Hi! Unfortunately, I didn't save the exact output to help you reproduce the bug, but briefly: in the grammar with predicates checking char position in line (
currentTokenColumn
property of Lexer) calculated wrong. In grammar like this:and input like
'\n\n '
the BLANK and INDENTATION rules never trigger becausecurrentTokenColumn
is calculated as if all those tokens are on the same line. I expected that each EOL would increase line number and resetcurrentTokenColumn
to zero. In Java ANTLR4 implementation it works this way.antlr4ng version 3.0.4 antlr4ng-cli version 2.0.0