Add value name table

This PR adds a value-type-name table and a function to get a value
type identifier from a string.

It also adds a arithmetical macro as helper.