HOME

TheInfoList



OR:

{{Refimprove, date=August 2007 In
adventure game An adventure game is a video game genre in which the player assumes the role of a protagonist in an interactive story, driven by exploration and/or puzzle-solving. The genre's focus on story allows it to draw heavily from other narrative-based m ...
s, a text parser takes typed input (a command) from the player and simplifies it to something the game can understand. Usually, words with the same meaning are turned into the same word (e.g. "take" and "get") and certain filler words are dropped (e.g. articles, or the "at" in "look at rock"). The parser makes it easier for the game's author to react on input. The author does not have to write special code to process the commands "get ye flask", "take ye flask", "get flask", "take flask", "take ye precious flask", etc. separately, as the parser will have stripped the input down to something like "take flask". For the player, the game is more flexible, as the game has a larger vocabulary, and there are fewer guess-the-verb and guess-the-noun problems. Parsers are used in early
interactive fiction Interactive fiction (IF) is software simulating environments in which players use text Command (computing), commands to control Player character, characters and influence the environment. Works in this form can be understood as literary narrati ...
games like the ''
Zork ''Zork'' is a text adventure game first released in 1977 by developers Tim Anderson (programmer), Tim Anderson, Marc Blank, Bruce Daniels, and Dave Lebling for the PDP-10 mainframe computer. The original developers and others, as the company ...
'' series, and more recently in games created by systems like
Inform Inform is a programming language and design system for interactive fiction originally created in 1993 by Graham Nelson. Inform can generate programs designed for the Z-machine, Z-code or Glulx virtual machines. Versions 1 through 5 were released ...
and TADS.


See also

* Natural language parsing


External links


Inform Designers Manual
(in particular, see chapter 4, "Describing and Parsing", and chapter 5, "Natural Language")
How To Program A Simple Text Parser
Basic Tutorials .

Demos. Parsing Text parser