Move TableGen's parser and entry point into a library