Skip to content

Disable Langium Warnings #601

Answered by msujew
snarkipus asked this question in Q&A
Jul 15, 2022 · 1 comments · 6 replies
Discussion options

You must be logged in to vote

Hey, so basically the warning is a nice reminder that keywords (even though the spec might say so) should never be whitespace sentitive in regards to lexing. The reasoning for that might not be completely obvious though:

When creating a keyword such as 'END SCENARIO', every user error such as END___SCENARIO (think each _ as being a whitespace) will be seen as a lexing error. I.e. both END and SCENARIO will likely be parsed as ID terminal tokens instead of keywords. This in turn will lead to a very difficult to understand parser error, as the parser only sees ID ID instead of the expected END SCENARIO.

On the other hand, there's a more user friendly way to deal with this issue. Obviously, …

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@msujew
Comment options

@snarkipus
Comment options

snarkipus Jul 16, 2022
Collaborator Author

@msujew
Comment options

@snarkipus
Comment options

snarkipus Jul 17, 2022
Collaborator Author

@msujew
Comment options

Answer selected by snarkipus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants