1
! Info.h - A Library Extention For Consultation And Conversation
5
! The idea for this library extention has been brewing around my mind
6
! for quite some time. The idea is to allow Consult, Ask, Tell, and
7
! Answer to access a database of topic objects rathen than having to
8
! parse the information themselves. As a mock up version of this
9
! library file I had taken Gareth Rees' Frobozzica.inf example, edited
10
! it to handle Tell and Answer as well as Ask, and then transformed it
11
! into an include file. As inform has developed I began to suspect
12
! that there was a much simpler way of doing things. This library file
13
! is the fruit of my labor.
16
! 1) Create a Topics object to be the parent object of all topics.
17
! 2) Create a series of topic objects. The only requirements being that
18
! they are a child of the Topics object, inherit from the
19
! Topic class, provide the name and/or parse_name property for
20
! identification in the usual way.
21
! 3) In the usual manner trap the Consult, Ask, Tell, and/or Answer
22
! action in the before or life routine of the target object. The topic
23
! being refered to will be held in the second variable.
29
! Topic -> Virginia_Woolf
30
! with name "virgina" "woolf",
33
! with name "orlando" "novel" "book",
35
! Object Encyclopedia "Encyclopedia Of English Literature",
36
! with name "encyclopedia" "of" "english" "literature" "book",
43
! "~Woolf, Virginia (1182-1941), English novelist and
44
! essayist. The daughter of Sir Leslie Stephen, she
45
! married the critic Leonard Sidney Woolf (1880-1969) and
46
! they established the Hogarth Press (1917). Novels using
47
! stream of consciousness, such as Mrs. Dalloway (1925), To
48
! the Lighthouse (1927) and The Waves (1931), concern her
49
! characters' thoughs and feelings about common
50
! experiences. Some of her brilliant criticism was
51
! published in The Common Reader (1925). Subject to fits
52
! of mental instability, she finally drowned herself.~";
54
! "~A novel written in 1928 by Virgina Woolf outlining the
55
! unual life of Orlando, an individual who lives for 400
56
! years and is at one time male and another time female.
57
! She also: Woolf, Virgina.~";
61
! Note: Topics created need not initially be a child of the Topics
62
! object. This allows for topics to begin out of scope and then as
63
! the player gains more information topics can be moved in and out of
64
! the Topics object at will.
70
2: ScopeWithin(Topics);
72
3: "Error: Parsing should have matched previous grammar line.";
77
with short_name "that",
82
* 'up' scope = TopicScope 'in' noun -> Consult reverse;
84
Extend 'consult' first
85
* noun 'about' scope = TopicScope -> Consult;
88
* creature 'about' scope = TopicScope -> Ask;
91
* creature 'about' scope = TopicScope -> Tell;
94
* scope = TopicScope 'to' creature -> Answer;