You shouldn't hard code your type names unless they are actually keywords in your language. Then you create a parser rule to match any type:
varType : ID;
assignment : varType ID '=' expr;
Integer
and String
would then be treated as regular ID
tokens.
Use a listener after the parse is complete to validate that the ID
appearing in each varType
actually refers to a type.