Added classes for termianl and non-terminal symbols.