Replies: 3 comments 6 replies
-
This is true for me. For people like me who don't know much about parser, it will take some time to understand the tree-rewriting actions. Bringing new syntax for defining infix operators sounds interesting to me, it can lower the barrier for the users and make the grammar definition more concise. I have a question on this idea, though: there are also prefix and postfix operators, such as the logical negation operator For example, the precedence of infix arithmetic operators is usually higher than logical negation, which has higher precedence than logical AND and logical OR, and how can we define such precedence ( |
Beta Was this translation helpful? Give feedback.
-
The shortest notation I know is for LR parsers like Yacc or Bison:
There is also an algorithm for that, but you can also transform the rules internally to shape how it is normally accomplished. |
Beta Was this translation helpful? Give feedback.
-
@luan-xiaokun, @Lotes, my initial idea of precedence syntax implementation is inspired by the Haskell library
Here a hierarchy top is marked with a keyword
|
Beta Was this translation helpful? Give feedback.
-
Motivation to have assigned actions
Shape the semantic model after:
XAnnotation
here is a prefix forXtendClass
,XtendInterface
...Motivation to remove
Problems related to removal
Proposal
Don't remove assigned actions, but work on user experience improvement.
Add more use cases of assigned actions in documentation
infers
keyword usagesAdd a special syntax for infix operators
Compare it with the current version:
Beta Was this translation helpful? Give feedback.
All reactions