-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Purpose of modes stack size checking in lexer #37
Comments
Yes, absolutely right. It's related to antlr/antlr4#2006. Without this check, we encountered an Unfortunately, with this check, the grammar is language-dependent, so we hope that ANTLR will not fall hard in the future in this case, and that we can remove the empty stack check. |
I ran into this exact problem. Because it's language specific now, I can't use the lexer without modifying it, so it matches the generated C# code. I've worked around it, but I do hope they fix the problem in the future. |
Does anyone have an example of what changes they made to this line for their specific programming language? I'm using |
All targets have similar fields |
@KvanTTT thank you!! |
Could you explain the purpose of modes stack size checking before
popMode()
?kotlin-spec/grammar/src/main/antlr/KotlinLexer.g4
Line 44 in 091d421
Is this a workaround for more reliable error handling if the first open
LCURL
is missed?Is this related to antlr/antlr4#2006
The text was updated successfully, but these errors were encountered: