Skip to content
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

LexerNoViableAltException but script still runs #5832

Open
awgymer opened this issue Mar 1, 2025 · 0 comments
Open

LexerNoViableAltException but script still runs #5832

awgymer opened this issue Mar 1, 2025 · 0 comments

Comments

@awgymer
Copy link

awgymer commented Mar 1, 2025

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

x = [z: 4]

println "$x\ some more"

Note the space after the \.

Using a \ produces a script compilation error with cause: Unexpected character: '"' in the following other cases:

"a\ b"
"\ a"
"a \ "
" \ a"

Program output

N E X T F L O W   ~  version 24.10.3

Launching `./test.nf` [backstabbing_maxwell] DSL2 - revision: 008f33b6cc

unknown recognition error type: groovyjarjarantlr4.v4.runtime.LexerNoViableAltException
[z:4] some more

Environment

  • Nextflow version: 24.10.3
  • Java version: openjdk version "17.0.10" 2024-01-16
  • Operating system: macOS
  • Bash version: GNU bash, version 3.2.57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant