you should make a helper method that takes a Terminal and builds an NFA component from it, so that this code isn't duplicated everywhere.