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

Conflicting state of the UI in the editor #54

Open
mlajtos opened this issue Apr 26, 2018 · 3 comments
Open

Conflicting state of the UI in the editor #54

mlajtos opened this issue Apr 26, 2018 · 3 comments

Comments

@mlajtos
Copy link

mlajtos commented Apr 26, 2018

It seems that the visualizer and the test case list do not agree on whether parsing succeded or not. The parse tree is valid but the test case is color-coded with red.

screenshot 2018-04-26 20 05 27

@pdubroy
Copy link
Contributor

pdubroy commented Apr 28, 2018

Thanks for reporting. Can you boil this down to a simple case that I can reproduce? Or at least give me the full grammar and example that you are using?

Also, please open the dev tools and see if there are any errors in the JavaScript console.

@mlajtos
Copy link
Author

mlajtos commented Apr 28, 2018

Ok I shaved it down to this:

Mu {
    Expression
        = Addition
    Addition
        = (Addition "+" PrimitiveExpression) -- binary
        | PrimitiveExpression -- fallthrough
    
    PrimitiveExpression
        = FunctionApplication -- function_application
        | number -- literal
        
    FunctionApplication
        =  Expression "->" Expression

    number
        = digit+
}

Test case I am using: 1 + 1

When I remove FunctionApplication from PrimitiveExpression the test case goes green.

There are no errors in the console.

@mlajtos
Copy link
Author

mlajtos commented May 7, 2018

It seems, that the parser really did not succeeded to match the input.

However the visualizer is showing a parse tree that I would consider a match. Weird is that the test runner does not show the error message from the parser, which can be seen here...

Is there something wrong with the language definition? Or Ohm? Or the editor?

@pdubroy pdubroy transferred this issue from ohmjs/ohm Oct 26, 2021
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

2 participants