Hi,
how to rewrite a rule depends on the rule itself and on the specific
pattern that rule should match on. Thus, I cannot give you a general
algorithmic description on how to rewrite arbitrary rules.
I can give an example:
If you have a rule like:
(SPACE | PERIOD)*{-> MyType};
you can normally refactor the rule to:
ANY*{PARTOF({SPACE,PERIOD})-> MyType};
Ruta supports the creation of alternative matches during a matching
process. This is a powerful feature but it can lead internally to
exponential rule element matches. The rule inference can become very
complex and can lead to unexpected but correct behavior especially on
large complex rules.
Best,
Peter
Am 25.03.2025 um 11:32 schrieb Raghunath Mahakud:
Hi Peter,
If you have anything to follow for rewriting the ruta rules will be a great
help.
In the official documentation I didn't find anything related to that.
Regards,
Raghunath...
On Tue, Mar 25, 2025 at 1:38 PM Raghunath Mahakud <
mahakudraghunath...@gmail.com> wrote:
Hi Team/Peter,
Could you please share guidance or a link on how to rewrite the Ruta rules
while avoiding disjunctive operators and quantifiers? Specifically, we
should not use "|" and should not have "*" or "+" after parentheses.
Is there an official documentation link available?
Thanks for your support and help!
Regards,
Raghunath...