SYSC 2004 Lecture Notes - Lecture 4: Interactive Fiction, Terminal Emulator, Lexical Analysis

35 views1 pages

Document Summary

* this class is part of the "world of zuul" application. * "world of zuul" is a very simple, text based adventure game. * this parser reads user input and tries to interpret it as an "adventure" Every time it is called it reads a line from the terminal and. * tries to interpret the line as a two word command. * the parser has a set of known command words. * the known commands, and if the input is not one of the known commands, it. * returns a command object that is marked as an unknown command. * @author michael kolling and david j. barnes. * @version october 21, 2012 public class parser private commandwords commands; // holds all valid command words private scanner reader; // source of command input. * create a parser to read from the terminal window. public parser() commands = new commandwords(); reader = new scanner(system. in);

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions