You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coming back to the off-topic point in #1798: Some of the syntax diagrams can be simplified quite a bit by removing superfluous elements. There are basically two ways to solve this:
Implement an optimizer that takes the grammar's AST and performs the simplification automatically. Such as here.
Manually take care not to introduce superfluous elements in the grammar rules themselves. There is a conflict of goals here, as the rules become more compact/nested. That is, the visual representation becomes easier to follow at the cost of the textual representation becoming harder to understand.
See #1798 on what this does to the syntax. Do you fancy a PR for the either of those options? The second one is obviously much more simple to do.
The text was updated successfully, but these errors were encountered:
@lukaslueg I don't think we should do this in an automated fashion, because we then get committed to making sure we're happy with the automated refactors, which might not always produce optimal diagrams.
I think, to the extent we use automation at all, it should be to flag diagrams that aren't maximally simple, or perhaps to suggest possible refactors.
All of the proposed diagram simplifications look great to me. If the resulting text is less readable, I think we have some options to try to improve the readability.
Coming back to the off-topic point in #1798: Some of the syntax diagrams can be simplified quite a bit by removing superfluous elements. There are basically two ways to solve this:
See #1798 on what this does to the syntax. Do you fancy a PR for the either of those options? The second one is obviously much more simple to do.
The text was updated successfully, but these errors were encountered: