Theory of Machines and Languages