1 ! ==============================================================================
2 ! GRAMMAR: Grammar table entries for the standard verbs library.
4 ! Supplied for use with Inform 6 -- Release 6.12.4 -- Serial number 200718
6 ! This file is free software: you can redistribute it and/or modify
7 ! it under the terms of the GNU Affero General Public License as
8 ! published by the Free Software Foundation, either version 3 of the
9 ! License, or (at your option) any later version.
11 ! This file is distributed in the hope that it will be useful, but
12 ! WITHOUT ANY WARRANTY; without even the implied warranty of
13 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 ! Affero General Public License for more details.
16 ! You should have received a copy of the GNU Affero General Public
17 ! License along with this program. If not, see
18 ! https://gnu.org/licenses/
20 ! In your game file, Include three library files in this order:
24 ! ==============================================================================
29 #Iffalse LIBRARY_STAGE >= AFTER_GRAMMAR; ! if not already included
30 #Iftrue LIBRARY_STAGE == AFTER_VERBLIB; ! if okay to include it
32 ! ------------------------------------------------------------------------------
33 ! The "meta-verbs", commands to the game rather than in the game, come first:
34 ! ------------------------------------------------------------------------------
39 Verb meta 'verbose' 'long'
42 Verb meta 'superbrief' 'short'
53 Verb meta 'pronouns' 'nouns'
56 Verb meta 'quit' 'q//' 'die'
62 * 'off' -> CommandsOff;
79 Verb meta 'fullscore' 'full'
81 * 'score' -> FullScore;
83 Verb meta 'script' 'transcript'
88 Verb meta 'noscript' 'unscript'
100 * 'tall' -> ObjectsTall
101 * 'wide' -> ObjectsWide;
104 * 'tall' -> PlacesTall
105 * 'wide' -> PlacesWide;
108 ! ------------------------------------------------------------------------------
110 ! ------------------------------------------------------------------------------
116 * 'off' -> ActionsOff;
121 * 'off' -> ChangesOff;
124 * anynumber -> GoNear
134 Verb meta 'routines' 'messages'
137 * 'verbose' -> RoutinesVerbose
138 * 'off' -> RoutinesOff;
145 Verb meta 'showdict' 'dict'
151 * anynumber -> ShowObj
155 * special -> ShowVerb;
157 Verb meta 'timers' 'daemons'
160 * 'off' -> TimersOff;
164 * number -> TraceLevel
169 * anynumber 'to' anynumber -> XAbstract
170 * noun 'to' noun -> XAbstract;
173 * anynumber -> XPurloin
188 ! ------------------------------------------------------------------------------
189 ! And now the game verbs.
190 ! ------------------------------------------------------------------------------
192 [ ADirection; if (noun in Compass) rtrue; rfalse; ];
194 Verb 'answer' 'say' 'shout' 'speak'
195 * topic 'to' creature -> Answer;
198 * creature 'about' topic -> Ask
199 * creature 'for' noun -> AskFor
200 * creature 'to' topic -> AskTo
201 * 'that' creature topic -> AskTo;
203 Verb 'attack' 'break' 'crack' 'destroy'
204 'fight' 'hit' 'kill' 'murder' 'punch'
205 'smash' 'thump' 'torture' 'wreck'
211 Verb 'bother' 'curses' 'darn' 'drat'
217 * noun 'with' held -> Burn;
219 Verb 'buy' 'purchase'
224 * 'up'/'over' noun -> Climb;
226 Verb 'close' 'cover' 'shut'
229 * 'off' noun -> SwitchOff;
232 * noun 'about' topic -> Consult
233 * noun 'on' topic -> Consult;
235 Verb 'cut' 'chop' 'prune' 'slice'
240 * noun 'with' held -> Dig
242 * 'in' noun 'with' held -> Dig;
245 Verb 'disrobe' 'doff' 'shed'
248 Verb 'drink' 'sip' 'swallow'
251 Verb 'drop' 'discard'
253 * multiexcept 'in'/'into'/'down' noun -> Insert
254 * multiexcept 'on'/'onto' noun -> PutOn;
258 * held 'at'/'against'/'on'/'onto' noun -> ThrowAt;
265 * 'out' noun -> Empty
266 * noun 'out' -> Empty
267 * noun 'to'/'into'/'on'/'onto' noun -> EmptyT;
273 Verb 'examine' 'x//' 'check' 'describe' 'watch'
276 Verb 'exit' 'out' 'outside'
282 * noun 'from' noun -> Fill;
285 * 'out'/'off'/'up' 'of'/'from' noun -> Exit
287 * 'in'/'into'/'on'/'onto' noun -> Enter
288 * 'off' noun -> GetOff
289 * multiinside 'from'/'off' noun -> Remove;
291 Verb 'give' 'feed' 'offer' 'pay'
292 * creature held -> Give reverse
293 * held 'to' creature -> Give
294 * 'over' held 'to' creature -> Give;
296 Verb 'go' 'run' 'walk'
298 * noun=ADirection -> Go
300 * 'out'/'outside' -> Exit
301 * 'in'/'inside' -> GoIn
302 * 'into'/'in'/'inside'/'through' noun -> Enter;
308 * multiexcept 'in'/'into' noun -> Insert;
310 Verb 'inventory' 'inv' 'i//'
315 Verb 'jump' 'hop' 'skip'
317 * 'in' noun -> JumpIn
318 * 'into' noun -> JumpIn
319 * 'on' noun -> JumpOn
320 * 'upon' noun -> JumpOn
321 * 'over' noun -> JumpOver;
323 Verb 'kiss' 'embrace' 'hug'
328 * noun=ADirection -> Go
330 * 'into'/'in'/'inside'/'through' noun -> Enter;
335 * 'to' noun -> Listen;
338 * noun 'with' held -> Lock;
342 * 'at' noun -> Examine
343 * 'inside'/'in'/'into'/'through'/'on' noun -> Search
344 * 'under' noun -> LookUnder
345 * 'up' topic 'in' noun -> Consult
346 * noun=ADirection -> Examine
347 * 'to' noun=ADirection -> Examine;
352 Verb 'open' 'uncover' 'undo' 'unwrap'
354 * noun 'with' held -> Unlock;
358 * 'off' noun -> Take;
362 * multi 'up' -> Take;
367 Verb 'pry' 'prise' 'prize' 'lever' 'jemmy' 'force'
368 * noun 'with' held -> Unlock
369 * 'apart'/'open' noun 'with' held -> Unlock
370 * noun 'apart'/'open' 'with' held -> Unlock;
375 Verb 'push' 'clear' 'move' 'press' 'shift'
377 * noun noun -> PushDir
378 * noun 'to' noun -> Transfer;
381 * multiexcept 'in'/'inside'/'into' noun -> Insert
382 * multiexcept 'on'/'onto' noun -> PutOn
384 * 'down' multiheld -> Drop
385 * multiheld 'down' -> Drop;
389 * 'about' topic 'in' noun -> Consult
390 * topic 'in' noun -> Consult;
395 * multiinside 'from' noun -> Remove;
397 Verb 'rub' 'clean' 'dust' 'polish' 'scrub'
398 'shine' 'sweep' 'wipe'
406 * noun 'to' special -> SetTo;
408 Verb 'show' 'display' 'present'
409 * creature held -> Show reverse
410 * held 'to' creature -> Show;
412 Verb 'shit' 'damn' 'fuck' 'sod'
420 * 'on' 'top' 'of' noun -> Enter
421 * 'on'/'in'/'inside' noun -> Enter;
433 Verb 'squeeze' 'squash'
439 * 'on' noun -> Enter;
446 * 'on' noun -> Swing;
450 * noun 'on' -> SwitchOn
451 * noun 'off' -> SwitchOff
452 * 'on' noun -> SwitchOn
453 * 'off' noun -> SwitchOff;
455 Verb 'take' 'carry' 'hold'
457 * 'off' held -> Disrobe
458 * multiinside 'from'/'off' noun -> Remove
459 * 'inventory' -> Inv;
465 * creature 'about' topic -> Tell
466 * creature 'to' topic -> AskTo;
471 Verb 'tie' 'attach' 'connect' 'fasten' 'fix'
473 * noun 'to' noun -> Tie;
475 Verb 'touch' 'feel' 'fondle' 'grope'
479 * noun 'to' noun -> Transfer;
481 Verb 'turn' 'rotate' 'screw' 'twist' 'unscrew'
483 * noun 'on' -> SwitchOn
484 * noun 'off' -> SwitchOff
485 * 'on' noun -> SwitchOn
486 * 'off' noun -> SwitchOff;
489 * noun 'with' held -> Unlock;
494 Verb 'wake' 'awake' 'awaken'
497 * creature -> WakeOther
498 * creature 'up' -> WakeOther
499 * 'up' creature -> WakeOther;
504 * noun 'at' noun -> Wave
505 * 'at' noun -> WaveHands;
513 ! ------------------------------------------------------------------------------
514 ! This routine is no longer used here, but provided to help existing games
515 ! which use it as a general parsing routine:
519 do w = NextWordStopped();
520 until (w == -1 || (w == 'to' && action_to_be == ##Answer));
522 consult_words = wn - consult_from;
523 if (consult_words == 0) return -1;
524 if (action_to_be == ##Answer or ##Ask or ##Tell) {
525 w = wn; wn = consult_from; parsed_number = NextWord();
526 if (parsed_number == 'the' && consult_words > 1) parsed_number = NextWord();
533 ! ------------------------------------------------------------------------------
534 ! Final task: provide trivial routines if the user hasn't already:
535 ! ------------------------------------------------------------------------------
545 Stub BeforeParsing 0;
546 Stub ChooseObjects 2;
550 Stub GamePostRoutine 0;
551 Stub GamePreRoutine 0;
555 Stub ObjectDoesNotFit 2;
558 Stub PrintTaskName 1;
566 Stub HandleGlkEvent 2;
567 Stub IdentifyGlkObject 4;
568 Stub InitGlkWindow 1;
569 #Endif; ! TARGET_GLULX
576 [ ParseNoun obj; obj = obj; return -1; ];
583 ! ==============================================================================
585 Undef LIBRARY_STAGE; Constant LIBRARY_STAGE = AFTER_GRAMMAR;
587 #Ifnot; ! LIBRARY_STAGE < AFTER_GRAMMAR but ~= AFTER_VERBLIB
588 Message "Error: 'verblib' needs to be correctly included before including 'grammar'. This will cause a big number of errors!";
591 #Ifnot; ! LIBRARY_STAGE >= AFTER_GRAMMAR : already included
592 Message "Warning: 'grammar' included twice; ignoring second inclusion. (Ignore this if this is on purpose.)";
595 #Ifnot; ! LIBRARY_STAGE is not defined
596 Message "Error: 'parser', then 'verblib' need to be correctly included before including 'grammar'. This will cause a big number of errors!";
599 ! ==============================================================================