You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
antlr4ng version 3.0.4
antlr4ng-cli version 2.0.0
The text was updated successfully, but these errors were encountered:
lonely-lockley
changed the title
New line characters treated wrong
New line characters treated wrong in Lexer
May 12, 2024
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
The text was updated successfully, but these errors were encountered: