Add semantic check for main() as last function in tiger.g