Jump to content

Text parser

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by SmackBot (talk | contribs) at 12:44, 17 August 2007 (Date/fix the maintenance tags or gen fixes). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In an Adventure game, 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 author to react on input. The game author does not have to check whether the command is "get the gem", "take the gem", "get gem", "take gem", "take the precious gem", and so on, because the Parser has already stripped that down to something like "take gem".

For the player, the game is more flexible. The player does not have to hunt for the right words, because the game understands more words.

Parsers were used in early Interactive Fiction like the Zork series and games by Sierra On-Line.

See also Parser in general computer science.