Implementation of my own language to describe a finite-state machine