qntm / greenery

Regular expression manipulation library
http://qntm.org/greenery
MIT License
311 stars 40 forks source link

It is impossible to define a true Mealy machine #62

Closed natelastname closed 2 years ago

natelastname commented 2 years ago

From my understanding, the current behavior of this library is that all transitions are assigned the same output symbol as their input symbol. The mathematical definition of a Mealy machine requires transitions to have separate inputs and outputs (See: wikipedia.) For example, a transition from state A to state B whose input is the symbol X must be able to output a different symbol Y when that transition occurs.

Would it be possible to add this capability to this library?

natelastname commented 2 years ago

Nevermind