Remove implications on predicate logic

Hi guys! this is a simple but honest question. I’m trying to remove all implications on a predicate logic expression, as it goes:


this one is pretty simple, and i used regex to solve it. However, my problem is to do something more generic, that could convert something like this:


any ideas? :slight_smile:

You have some tools to do this…

The first is like lex/yacc while both last are PEG Parser I think.

Here is a blog post about leex/yecc usage

And what is really nice… all of them have been done by members of this forum :slight_smile:

great! I’ll take a look at them, thank you.