Documentation edit.
Made factory functions for terminal, non_terminal, and lalr_state.
Factored out the NonTerminalFactory.