ohm-editor
ohm-editor copied to clipboard
Conflicting state of the UI in the editor
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.

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.
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.
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?