Finite Automata, Their Algebras and Grammars: Towards a Theory of Formal Expressions