Some years ago time I tried to program a simple text parser that would allow me to create an intfiction game. I was clueless at the time (I still am) and didn't know much about programming so the project didn't go too far. I managed to get the thing to read map info (like rooms and objects) from an external document and to parse some commands given by the player, but it couldn't do much besides basic navigation and interaction.
Op if you would like to create an int fiction game, your best option is to learn Inform7. The syntax is easy to master and it's really the best tool out there for intfiction with a little more depth.>>47516
If you want to try Interactive Fiction then definitely give Anchorhead a go. It's a moody lovecraftian adventure game with great prose and immersive atmosphere. You can dowload the game for free but there's also a new and supposedly improved rendition out which also has some ilustrations. http://pr-if.org/play/anchorhead/