Is there a way to define a dsl, that would allow the following form?
variable identifier identifier variable
For example:
1 equals to 2
I know how to create a simpler form: 1 equals to (2), but I want to avoid parentheses. Is there a way to do it?
You can ask the parser:
However, there is a problem: This only works as long as
variable2is an identifier (so that it can be used as a method name). Withalready the parser fails:
Parentheses are really your only way around(*):
(*) unless you make
2an identifier by using it with backticks… nah, maybe not.