Again, it is not a trivial problem. There are many problems which may seem trivial to solve by a person, but that are not trivial to solve by a machine. Walk is a really nice example: For you, is the easiest of the things, you walk everyday, but just try to build a machine which can walk by itself the way you do everyday. Almost the same is here, for an elemental expression, may be easy to solve, but since support for complex expressions would also be desired, the problem turns harder to solve. Just reading a bit about language theory, and the way languages are parsed/interpreted would give you a hint on this problem's complexity.
Regards.