1 ! ==============================================================================
2 ! GRAMMAR: Grammar table entries for the standard verbs library.
4 ! Supplied for use with Inform 6 -- Release 6.12.2 -- Serial number 180520
6 ! Copyright Graham Nelson 1993-2004 and David Griffith 2012-2018
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'
106 ! ------------------------------------------------------------------------------
108 ! ------------------------------------------------------------------------------
114 * 'off' -> ActionsOff;
119 * 'off' -> ChangesOff;
122 * anynumber -> GoNear
132 Verb meta 'routines' 'messages'
135 * 'verbose' -> RoutinesVerbose
136 * 'off' -> RoutinesOff;
143 Verb meta 'showdict' 'dict'
149 * anynumber -> Showobj
153 * special -> Showverb;
155 Verb meta 'timers' 'daemons'
158 * 'off' -> TimersOff;
162 * number -> TraceLevel
167 * anynumber 'to' anynumber -> XAbstract
168 * noun 'to' noun -> XAbstract;
171 * anynumber -> XPurloin
186 ! ------------------------------------------------------------------------------
187 ! And now the game verbs.
188 ! ------------------------------------------------------------------------------
190 [ ADirection; if (noun in compass) rtrue; rfalse; ];
192 Verb 'answer' 'say' 'shout' 'speak'
193 * topic 'to' creature -> Answer;
196 * creature 'about' topic -> Ask
197 * creature 'for' noun -> AskFor
198 * creature 'to' topic -> AskTo
199 * 'that' creature topic -> AskTo;
201 Verb 'attack' 'break' 'crack' 'destroy'
202 'fight' 'hit' 'kill' 'murder' 'punch'
203 'smash' 'thump' 'torture' 'wreck'
209 Verb 'bother' 'curses' 'darn' 'drat'
215 * noun 'with' held -> Burn;
217 Verb 'buy' 'purchase'
222 * 'up'/'over' noun -> Climb;
224 Verb 'close' 'cover' 'shut'
227 * 'off' noun -> SwitchOff;
230 * noun 'about' topic -> Consult
231 * noun 'on' topic -> Consult;
233 Verb 'cut' 'chop' 'prune' 'slice'
238 * noun 'with' held -> Dig
240 * 'in' noun 'with' held -> Dig;
243 Verb 'disrobe' 'doff' 'shed'
246 Verb 'drink' 'sip' 'swallow'
249 Verb 'drop' 'discard'
251 * multiexcept 'in'/'into'/'down' noun -> Insert
252 * multiexcept 'on'/'onto' noun -> PutOn;
255 * held 'at'/'against'/'on'/'onto' noun -> ThrowAt;
262 * 'out' noun -> Empty
263 * noun 'out' -> Empty
264 * noun 'to'/'into'/'on'/'onto' noun -> EmptyT;
270 Verb 'examine' 'x//' 'check' 'describe' 'watch'
273 Verb 'exit' 'out' 'outside'
279 * noun 'from' noun -> Fill;
282 * 'out'/'off'/'up' 'of'/'from' noun -> Exit
284 * 'in'/'into'/'on'/'onto' noun -> Enter
285 * 'off' noun -> GetOff
286 * multiinside 'from'/'off' noun -> Remove;
288 Verb 'give' 'feed' 'offer' 'pay'
289 * creature held -> Give reverse
290 * held 'to' creature -> Give
291 * 'over' held 'to' creature -> Give;
293 Verb 'go' 'run' 'walk'
295 * noun=ADirection -> Go
297 * 'out'/'outside' -> Exit
298 * 'in'/'inside' -> GoIn
299 * 'into'/'in'/'inside'/'through' noun -> Enter;
305 * multiexcept 'in'/'into' noun -> Insert;
307 Verb 'inventory' 'inv' 'i//'
312 Verb 'jump' 'hop' 'skip'
314 * 'in' noun -> JumpIn
315 * 'into' noun -> JumpIn
316 * 'on' noun -> JumpOn
317 * 'upon' noun -> JumpOn
318 * 'over' noun -> JumpOver;
320 Verb 'kiss' 'embrace' 'hug'
325 * noun=ADirection -> Go
327 * 'into'/'in'/'inside'/'through' noun -> Enter;
332 * 'to' noun -> Listen;
335 * noun 'with' held -> Lock;
339 * 'at' noun -> Examine
340 * 'inside'/'in'/'into'/'through'/'on' noun -> Search
341 * 'under' noun -> LookUnder
342 * 'up' topic 'in' noun -> Consult
343 * noun=ADirection -> Examine
344 * 'to' noun=ADirection -> Examine;
349 Verb 'open' 'uncover' 'undo' 'unwrap'
351 * noun 'with' held -> Unlock;
355 * 'off' noun -> Take;
359 * multi 'up' -> Take;
364 Verb 'pry' 'prise' 'prize' 'lever' 'jemmy' 'force'
365 * noun 'with' held -> Unlock
366 * 'apart'/'open' noun 'with' held -> Unlock
367 * noun 'apart'/'open' 'with' held -> Unlock;
372 Verb 'push' 'clear' 'move' 'press' 'shift'
374 * noun noun -> PushDir
375 * noun 'to' noun -> Transfer;
378 * multiexcept 'in'/'inside'/'into' noun -> Insert
379 * multiexcept 'on'/'onto' noun -> PutOn
381 * 'down' multiheld -> Drop
382 * multiheld 'down' -> Drop;
386 * 'about' topic 'in' noun -> Consult
387 * topic 'in' noun -> Consult;
392 * multiinside 'from' noun -> Remove;
394 Verb 'rub' 'clean' 'dust' 'polish' 'scrub'
395 'shine' 'sweep' 'wipe'
403 * noun 'to' special -> SetTo;
405 Verb 'show' 'display' 'present'
406 * creature held -> Show reverse
407 * held 'to' creature -> Show;
409 Verb 'shit' 'damn' 'fuck' 'sod'
417 * 'on' 'top' 'of' noun -> Enter
418 * 'on'/'in'/'inside' noun -> Enter;
430 Verb 'squeeze' 'squash'
436 * 'on' noun -> Enter;
443 * 'on' noun -> Swing;
447 * noun 'on' -> Switchon
448 * noun 'off' -> Switchoff
449 * 'on' noun -> Switchon
450 * 'off' noun -> Switchoff;
452 Verb 'take' 'carry' 'hold'
454 * 'off' held -> Disrobe
455 * multiinside 'from'/'off' noun -> Remove
456 * 'inventory' -> Inv;
462 * creature 'about' topic -> Tell
463 * creature 'to' topic -> AskTo;
468 Verb 'tie' 'attach' 'connect' 'fasten' 'fix'
470 * noun 'to' noun -> Tie;
472 Verb 'touch' 'feel' 'fondle' 'grope'
476 * noun 'to' noun -> Transfer;
478 Verb 'turn' 'rotate' 'screw' 'twist' 'unscrew'
480 * noun 'on' -> Switchon
481 * noun 'off' -> Switchoff
482 * 'on' noun -> Switchon
483 * 'off' noun -> Switchoff;
486 * noun 'with' held -> Unlock;
491 Verb 'wake' 'awake' 'awaken'
494 * creature -> WakeOther
495 * creature 'up' -> WakeOther
496 * 'up' creature -> WakeOther;
501 * noun 'at' noun -> Wave
502 * 'at' noun -> WaveHands;
510 ! ------------------------------------------------------------------------------
511 ! This routine is no longer used here, but provided to help existing games
512 ! which use it as a general parsing routine:
516 do w = NextWordStopped();
517 until (w == -1 || (w == 'to' && action_to_be == ##Answer));
519 consult_words = wn - consult_from;
520 if (consult_words == 0) return -1;
521 if (action_to_be == ##Answer or ##Ask or ##Tell) {
522 w = wn; wn = consult_from; parsed_number = NextWord();
523 if (parsed_number == 'the' && consult_words > 1) parsed_number = NextWord();
530 ! ------------------------------------------------------------------------------
531 ! Final task: provide trivial routines if the user hasn't already:
532 ! ------------------------------------------------------------------------------
542 Stub BeforeParsing 0;
543 Stub ChooseObjects 2;
547 Stub GamePostRoutine 0;
548 Stub GamePreRoutine 0;
552 Stub ObjectDoesNotFit 2;
555 Stub PrintTaskName 1;
561 Stub HandleGlkEvent 2;
562 Stub IdentifyGlkObject 4;
563 Stub InitGlkWindow 1;
564 #Endif; ! TARGET_GLULX
571 [ ParseNoun obj; obj = obj; return -1; ];
578 ! ==============================================================================
580 Undef LIBRARY_STAGE; Constant LIBRARY_STAGE = AFTER_GRAMMAR;
582 #Ifnot; ! LIBRARY_STAGE < AFTER_GRAMMAR but ~= AFTER_VERBLIB
583 Message "Error: 'verblib' needs to be correctly included before including 'grammar'. This will cause a big number of errors!";
586 #Ifnot; ! LIBRARY_STAGE >= AFTER_GRAMMAR : already included
587 Message "Warning: 'grammar' included twice; ignoring second inclusion. (Ignore this if this is on purpose.)";
590 #Ifnot; ! LIBRARY_STAGE is not defined
591 Message "Error: 'parser', then 'verblib' need to be correctly included before including 'grammar'. This will cause a big number of errors!";
594 ! ==============================================================================