1 ! ==============================================================================
2 ! GRAMMAR: Grammar table entries for the standard verbs library.
4 ! Supplied for use with Inform 6 -- Release 6.12.5 -- Serial number 220219
6 ! Copyright Graham Nelson 1993-2004 and David Griffith 2012-2022
8 ! This file is free software: you can redistribute it and/or modify
9 ! it under the terms of the GNU Affero General Public License as
10 ! published by the Free Software Foundation, either version 3 of the
11 ! License, or (at your option) any later version.
13 ! This file is distributed in the hope that it will be useful, but
14 ! WITHOUT ANY WARRANTY; without even the implied warranty of
15 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 ! Affero General Public License for more details.
18 ! You should have received a copy of the GNU Affero General Public
19 ! License along with this program. If not, see
20 ! https://gnu.org/licenses/
22 ! In your game file, Include three library files in this order:
26 ! ==============================================================================
31 #Iffalse LIBRARY_STAGE >= AFTER_GRAMMAR; ! if not already included
32 #Iftrue LIBRARY_STAGE == AFTER_VERBLIB; ! if okay to include it
34 ! ------------------------------------------------------------------------------
35 ! The "meta-verbs", commands to the game rather than in the game, come first:
36 ! ------------------------------------------------------------------------------
41 Verb meta 'verbose' 'long'
44 Verb meta 'superbrief' 'short'
55 Verb meta 'pronouns' 'nouns'
58 Verb meta 'quit' 'q//' 'die'
64 * 'off' -> CommandsOff;
81 Verb meta 'fullscore' 'full'
83 * 'score' -> FullScore;
85 Verb meta 'script' 'transcript'
90 Verb meta 'noscript' 'unscript'
102 * 'tall' -> ObjectsTall
103 * 'wide' -> ObjectsWide;
106 * 'tall' -> PlacesTall
107 * 'wide' -> PlacesWide;
110 ! ------------------------------------------------------------------------------
112 ! ------------------------------------------------------------------------------
118 * 'off' -> ActionsOff;
123 * 'off' -> ChangesOff;
126 * anynumber -> GoNear
136 Verb meta 'routines' 'messages'
139 * 'verbose' -> RoutinesVerbose
140 * 'off' -> RoutinesOff;
147 Verb meta 'showdict' 'dict'
153 * anynumber -> ShowObj
157 * special -> ShowVerb;
159 Verb meta 'timers' 'daemons'
162 * 'off' -> TimersOff;
166 * number -> TraceLevel
171 * anynumber 'to' anynumber -> XAbstract
172 * noun 'to' noun -> XAbstract;
175 * anynumber -> XPurloin
190 ! ------------------------------------------------------------------------------
191 ! And now the game verbs.
192 ! ------------------------------------------------------------------------------
194 [ ADirection; if (noun in Compass) rtrue; rfalse; ];
196 Verb 'answer' 'say' 'shout' 'speak'
197 * topic 'to' creature -> Answer;
200 * creature 'about' topic -> Ask
201 * creature 'for' noun -> AskFor
202 * creature 'to' topic -> AskTo
203 * 'that' creature topic -> AskTo;
205 Verb 'attack' 'break' 'crack' 'destroy'
206 'fight' 'hit' 'kill' 'murder' 'punch'
207 'smash' 'thump' 'torture' 'wreck'
213 Verb 'bother' 'curses' 'darn' 'drat'
219 * noun 'with' held -> Burn;
221 Verb 'buy' 'purchase'
226 * 'up'/'over' noun -> Climb;
230 * multiinside 'from'/'off' noun -> Remove
231 * 'inventory' -> Inv;
233 Verb 'close' 'cover' 'shut'
236 * 'off' noun -> SwitchOff;
239 * noun 'about' topic -> Consult
240 * noun 'on' topic -> Consult;
242 Verb 'cut' 'chop' 'prune' 'slice'
247 * noun 'with' held -> Dig
249 * 'in' noun 'with' held -> Dig;
252 Verb 'disrobe' 'doff' 'shed'
255 Verb 'drink' 'sip' 'swallow'
258 Verb 'drop' 'discard'
260 * multiexcept 'in'/'into'/'down' noun -> Insert
261 * multiexcept 'on'/'onto' noun -> PutOn;
265 * held 'at'/'against'/'on'/'onto' noun -> ThrowAt;
272 * 'out' noun -> Empty
273 * noun 'out' -> Empty
274 * noun 'to'/'into'/'on'/'onto' noun -> EmptyT;
280 Verb 'examine' 'x//' 'check' 'describe' 'watch'
283 Verb 'exit' 'out' 'outside'
289 * noun 'from' noun -> Fill;
292 * 'out'/'off'/'up' 'of'/'from' noun -> Exit
294 * 'in'/'into'/'on'/'onto' noun -> Enter
295 * 'off' noun -> GetOff
296 * multiinside 'from'/'off' noun -> Remove;
298 Verb 'give' 'feed' 'offer' 'pay'
299 * creature held -> Give reverse
300 * held 'to' creature -> Give
301 * 'over' held 'to' creature -> Give;
303 Verb 'go' 'run' 'walk'
305 * noun=ADirection -> Go
307 * 'out'/'outside' -> Exit
308 * 'in'/'inside' -> GoIn
309 * 'into'/'in'/'inside'/'through' noun -> Enter;
313 * multiinside 'from'/'off' noun -> Remove
314 * 'inventory' -> Inv;
320 * multiexcept 'in'/'into' noun -> Insert;
322 Verb 'inventory' 'inv' 'i//'
327 Verb 'jump' 'hop' 'skip'
329 * 'in' noun -> JumpIn
330 * 'into' noun -> JumpIn
331 * 'on' noun -> JumpOn
332 * 'upon' noun -> JumpOn
333 * 'over' noun -> JumpOver;
335 Verb 'kiss' 'embrace' 'hug'
340 * noun=ADirection -> Go
342 * 'into'/'in'/'inside'/'through' noun -> Enter;
347 * 'to' noun -> Listen;
350 * noun 'with' held -> Lock;
354 * 'at' noun -> Examine
355 * 'inside'/'in'/'into'/'through'/'on' noun -> Search
356 * 'under' noun -> LookUnder
357 * 'up' topic 'in' noun -> Consult
358 * noun=ADirection -> Examine
359 * 'to' noun=ADirection -> Examine;
364 Verb 'open' 'uncover' 'undo' 'unwrap'
366 * noun 'with' held -> Unlock;
370 * 'off' noun -> Take;
374 * multi 'up' -> Take;
379 Verb 'pry' 'prise' 'prize' 'lever' 'jemmy' 'force'
380 * noun 'with' held -> Unlock
381 * 'apart'/'open' noun 'with' held -> Unlock
382 * noun 'apart'/'open' 'with' held -> Unlock;
387 Verb 'push' 'clear' 'move' 'press' 'shift'
389 * noun noun -> PushDir
390 * noun 'to' noun -> Transfer;
393 * multiexcept 'in'/'inside'/'into' noun -> Insert
394 * multiexcept 'on'/'onto' noun -> PutOn
395 * 'on' multiheld -> Wear
396 * 'down' multiheld -> Drop
397 * multiheld 'down' -> Drop;
401 * 'about' topic 'in' noun -> Consult
402 * topic 'in' noun -> Consult;
407 * multiinside 'from' noun -> Remove;
409 Verb 'rub' 'clean' 'dust' 'polish' 'scrub'
410 'shine' 'sweep' 'wipe'
418 * noun 'to' special -> SetTo;
420 Verb 'show' 'display' 'present'
421 * creature held -> Show reverse
422 * held 'to' creature -> Show;
424 Verb 'shit' 'damn' 'fuck' 'sod'
432 * 'on' 'top' 'of' noun -> Enter
433 * 'on'/'in'/'inside' noun -> Enter;
445 Verb 'squeeze' 'squash'
451 * 'on' noun -> Enter;
458 * 'on' noun -> Swing;
462 * noun 'on' -> SwitchOn
463 * noun 'off' -> SwitchOff
464 * 'on' noun -> SwitchOn
465 * 'off' noun -> SwitchOff;
469 * 'off' multiheld -> Disrobe
470 * multiinside 'from'/'off' noun -> Remove
471 * 'inventory' -> Inv;
477 * creature 'about' topic -> Tell
478 * creature 'to' topic -> AskTo;
483 Verb 'tie' 'attach' 'connect' 'fasten' 'fix'
485 * noun 'to' noun -> Tie;
487 Verb 'touch' 'feel' 'fondle' 'grope'
491 * noun 'to' noun -> Transfer;
493 Verb 'turn' 'rotate' 'screw' 'twist' 'unscrew'
495 * noun 'on' -> SwitchOn
496 * noun 'off' -> SwitchOff
497 * 'on' noun -> SwitchOn
498 * 'off' noun -> SwitchOff;
501 * noun 'with' held -> Unlock;
506 Verb 'wake' 'awake' 'awaken'
509 * creature -> WakeOther
510 * creature 'up' -> WakeOther
511 * 'up' creature -> WakeOther;
516 * noun 'at' noun -> Wave
517 * 'at' noun -> WaveHands;
525 ! ------------------------------------------------------------------------------
526 ! This routine is no longer used here, but provided to help existing games
527 ! which use it as a general parsing routine:
531 do w = NextWordStopped();
532 until (w == -1 || (w == 'to' && action_to_be == ##Answer));
534 consult_words = wn - consult_from;
535 if (consult_words == 0) return -1;
536 if (action_to_be == ##Answer or ##Ask or ##Tell) {
537 w = wn; wn = consult_from; parsed_number = NextWord();
538 if (parsed_number == 'the' && consult_words > 1) parsed_number = NextWord();
545 ! ------------------------------------------------------------------------------
546 ! Final task: provide trivial routines if the user hasn't already:
547 ! ------------------------------------------------------------------------------
557 Stub BeforeParsing 0;
558 Stub ChooseObjects 2;
562 Stub GamePostRoutine 0;
563 Stub GamePreRoutine 0;
567 Stub ObjectDoesNotFit 2;
570 Stub PrintTaskName 1;
578 Stub HandleGlkEvent 2;
579 Stub IdentifyGlkObject 4;
580 Stub InitGlkWindow 1;
581 #Endif; ! TARGET_GLULX
588 [ ParseNoun obj; obj = obj; return -1; ];
595 ! ==============================================================================
597 Undef LIBRARY_STAGE; Constant LIBRARY_STAGE = AFTER_GRAMMAR;
599 #Ifnot; ! LIBRARY_STAGE < AFTER_GRAMMAR but ~= AFTER_VERBLIB
600 Message "Error: 'verblib' needs to be correctly included before including 'grammar'. This will cause a big number of errors!";
603 #Ifnot; ! LIBRARY_STAGE >= AFTER_GRAMMAR : already included
604 Message "Warning: 'grammar' included twice; ignoring second inclusion. (Ignore this if this is on purpose.)";
607 #Ifnot; ! LIBRARY_STAGE is not defined
608 Message "Error: 'parser', then 'verblib' need to be correctly included before including 'grammar'. This will cause a big number of errors!";
611 ! ==============================================================================