Erlang pattern translator