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

[playground] Parser definition error seem to break the playground #130

Open
montymxb opened this issue Feb 8, 2023 · 7 comments
Open

[playground] Parser definition error seem to break the playground #130

montymxb opened this issue Feb 8, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@montymxb
Copy link
Contributor

montymxb commented Feb 8, 2023

Using this Grammar produce a chevrotain parser definition error.

Now if one tries to edit the grammar to correct the syntax, model editor shows 'Loading...' but nothing happens.

Browser also reports an error in the console:
Unhandled Promise Rejection: monaco-languageclient start was unsuccessful: Request initialize failed with message: Parser Definition Errors detected:

@montymxb montymxb added the bug Something isn't working label Feb 8, 2023
@JohannesMeierSE
Copy link
Contributor

@montymxb Your example works for me with the current playground.

@JohannesMeierSE
Copy link
Contributor

But I detected the same behaviour with another grammar which fails due to left-recursion.

The grammar editor shows no error message, the content editor is "Loading ..." or shows some content without language support.

@msujew
Copy link
Member

msujew commented Mar 24, 2023

@JohannesMeierSE I believe that it used to fail due to a statically identified lookahead ambiguity. Since switching to an LL(*) lookahead, that's not an issue anymore. But other grammar errors still result in breakage.

@JohannesMeierSE
Copy link
Contributor

Yes, failing of the grammar is expected and OK, but the user experience in the playground is bad, since as user I expect an error marker in the grammar editor and not a "no-response" with the error message hidden in the browser console ...

@spoenemann
Copy link
Contributor

Here's an example of a user writing a grammar in the Playground and not seeing the "Ambiguous Alternatives Detected" parser error, which is only printed in the console:
eclipse-langium/langium#1259

We should make such parser validation errors visible in the Playground UI.

@spoenemann
Copy link
Contributor

Clearing the assignee so anyone can take this. @Lotes feel free to take it back if you'd like to work on this.

@msujew
Copy link
Member

msujew commented Nov 6, 2023

By the way, I believe the original issue here as been resolved in #171.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants