I\'m playing with writing a MUD/text adventure (please don\'t laugh) in Ruby. Can anyone give me any pointers towards an elegant, oop-based solution to parsing input text? <
Split the input string into tokens (words). Then feed the tokens, one at a time, to a state machine. I find that the push-down automata is rather intuitive and powerful way to write such an stm.