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
I'm writing a interpreter for the FEEL expression language used in DMN (imicros-feel-interpreter).
Everything is fine beside the problem with the foreseen ambiguity in the language.
Unfortunately I have no idea, how to solve this problem with nearley.
FEEL allows names like Profit and loss
Dependent on the scope they can be a name Profit and loss or the logical expression Profit and loss.
(This is only an example - FEEL also allow other operators in the names - like ./+-*).
The grammer is simplified something like this:
Expression -> Logical
| Name
Name -> %word (%whitespace %word):*
Logical -> Expression %and Expression
If I allow keywords in names, I will get two results. With the postprocessing I can check, if the name "Profit and loss" is in the context and accept or reject. But I have no idea how I can eliminate the logical result, when there is a valid name.
Any idea is welcome.
(The full grammar I'm using can be found in the package under lib/feel.grammar.ne)
The text was updated successfully, but these errors were encountered:
I'm writing a interpreter for the FEEL expression language used in DMN (imicros-feel-interpreter).
Everything is fine beside the problem with the foreseen ambiguity in the language.
Unfortunately I have no idea, how to solve this problem with nearley.
FEEL allows names like
Profit and loss
Dependent on the scope they can be a name
Profit and loss
or the logical expressionProfit
andloss
.(This is only an example - FEEL also allow other operators in the names - like
./+-*
).The grammer is simplified something like this:
If I allow keywords in names, I will get two results. With the postprocessing I can check, if the name "Profit and loss" is in the context and accept or reject. But I have no idea how I can eliminate the logical result, when there is a valid name.
Any idea is welcome.
(The full grammar I'm using can be found in the package under lib/feel.grammar.ne)
The text was updated successfully, but these errors were encountered: