-
Notifications
You must be signed in to change notification settings - Fork 679
LexerNoViableAltException but script still runs #5832
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
Comments
This error is very deep, it's coming from ANTLR: https://github.com/tunnelvisionlabs/antlr4/blob/master/runtime/Java/src/org/antlr/v4/runtime/DefaultErrorStrategy.java#L148 I have never figured out why it happens or if/when it's a problem. I just added a warning for it here in the docs. Interesting to see that it can happen with other kinds of escapes. |
Yeah it's kind of bizarre, it gets thrown by |
I think ANTLR encounters a parsing error, then encounters an error while trying to report the parsing error, and so no error gets reported 😅 But you said it later reports an |
That report (for unexpected The slash-space case is weird because it prints that error but ultimately compiles and runs |
Bug report
I am playing around with the syntax trying to understand the language server better and I managed to generate a possible lexical error in nextflow which shows an error but still runs as the user might expect. Unclear whether this is actually a bug, edge-case, or something else
Expected behavior and actual behavior
Either the script doesn't compile, or the error is not raised.
Steps to reproduce the problem
Note the space after the
\
.Using a
\
produces a script compilation error withcause: Unexpected character: '"'
in the following other cases:Program output
Environment
The text was updated successfully, but these errors were encountered: