1 ! ==============================================================================
2 ! GRAMMAR: Grammar table entries for the standard verbs library.
4 ! Supplied for use with Inform 6 -- Release 6.12.3 -- Serial number 190320
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'
104 ! ------------------------------------------------------------------------------
106 ! ------------------------------------------------------------------------------
112 * 'off' -> ActionsOff;
117 * 'off' -> ChangesOff;
120 * anynumber -> GoNear
130 Verb meta 'routines' 'messages'
133 * 'verbose' -> RoutinesVerbose
134 * 'off' -> RoutinesOff;
141 Verb meta 'showdict' 'dict'
147 * anynumber -> Showobj
151 * special -> Showverb;
153 Verb meta 'timers' 'daemons'
156 * 'off' -> TimersOff;
160 * number -> TraceLevel
165 * anynumber 'to' anynumber -> XAbstract
166 * noun 'to' noun -> XAbstract;
169 * anynumber -> XPurloin
184 ! ------------------------------------------------------------------------------
185 ! And now the game verbs.
186 ! ------------------------------------------------------------------------------
188 [ ADirection; if (noun in compass) rtrue; rfalse; ];
190 Verb 'answer' 'say' 'shout' 'speak'
191 * topic 'to' creature -> Answer;
194 * creature 'about' topic -> Ask
195 * creature 'for' noun -> AskFor
196 * creature 'to' topic -> AskTo
197 * 'that' creature topic -> AskTo;
199 Verb 'attack' 'break' 'crack' 'destroy'
200 'fight' 'hit' 'kill' 'murder' 'punch'
201 'smash' 'thump' 'torture' 'wreck'
207 Verb 'bother' 'curses' 'darn' 'drat'
213 * noun 'with' held -> Burn;
215 Verb 'buy' 'purchase'
220 * 'up'/'over' noun -> Climb;
222 Verb 'close' 'cover' 'shut'
225 * 'off' noun -> SwitchOff;
228 * noun 'about' topic -> Consult
229 * noun 'on' topic -> Consult;
231 Verb 'cut' 'chop' 'prune' 'slice'
236 * noun 'with' held -> Dig
238 * 'in' noun 'with' held -> Dig;
241 Verb 'disrobe' 'doff' 'shed'
244 Verb 'drink' 'sip' 'swallow'
247 Verb 'drop' 'discard'
249 * multiexcept 'in'/'into'/'down' noun -> Insert
250 * multiexcept 'on'/'onto' noun -> PutOn;
254 * held 'at'/'against'/'on'/'onto' noun -> ThrowAt;
261 * 'out' noun -> Empty
262 * noun 'out' -> Empty
263 * noun 'to'/'into'/'on'/'onto' noun -> EmptyT;
269 Verb 'examine' 'x//' 'check' 'describe' 'watch'
272 Verb 'exit' 'out' 'outside'
278 * noun 'from' noun -> Fill;
281 * 'out'/'off'/'up' 'of'/'from' noun -> Exit
283 * 'in'/'into'/'on'/'onto' noun -> Enter
284 * 'off' noun -> GetOff
285 * multiinside 'from'/'off' noun -> Remove;
287 Verb 'give' 'feed' 'offer' 'pay'
288 * creature held -> Give reverse
289 * held 'to' creature -> Give
290 * 'over' held 'to' creature -> Give;
292 Verb 'go' 'run' 'walk'
294 * noun=ADirection -> Go
296 * 'out'/'outside' -> Exit
297 * 'in'/'inside' -> GoIn
298 * 'into'/'in'/'inside'/'through' noun -> Enter;
304 * multiexcept 'in'/'into' noun -> Insert;
306 Verb 'inventory' 'inv' 'i//'
311 Verb 'jump' 'hop' 'skip'
313 * 'in' noun -> JumpIn
314 * 'into' noun -> JumpIn
315 * 'on' noun -> JumpOn
316 * 'upon' noun -> JumpOn
317 * 'over' noun -> JumpOver;
319 Verb 'kiss' 'embrace' 'hug'
324 * noun=ADirection -> Go
326 * 'into'/'in'/'inside'/'through' noun -> Enter;
331 * 'to' noun -> Listen;
334 * noun 'with' held -> Lock;
338 * 'at' noun -> Examine
339 * 'inside'/'in'/'into'/'through'/'on' noun -> Search
340 * 'under' noun -> LookUnder
341 * 'up' topic 'in' noun -> Consult
342 * noun=ADirection -> Examine
343 * 'to' noun=ADirection -> Examine;
348 Verb 'open' 'uncover' 'undo' 'unwrap'
350 * noun 'with' held -> Unlock;
354 * 'off' noun -> Take;
358 * multi 'up' -> Take;
363 Verb 'pry' 'prise' 'prize' 'lever' 'jemmy' 'force'
364 * noun 'with' held -> Unlock
365 * 'apart'/'open' noun 'with' held -> Unlock
366 * noun 'apart'/'open' 'with' held -> Unlock;
371 Verb 'push' 'clear' 'move' 'press' 'shift'
373 * noun noun -> PushDir
374 * noun 'to' noun -> Transfer;
377 * multiexcept 'in'/'inside'/'into' noun -> Insert
378 * multiexcept 'on'/'onto' noun -> PutOn
380 * 'down' multiheld -> Drop
381 * multiheld 'down' -> Drop;
385 * 'about' topic 'in' noun -> Consult
386 * topic 'in' noun -> Consult;
391 * multiinside 'from' noun -> Remove;
393 Verb 'rub' 'clean' 'dust' 'polish' 'scrub'
394 'shine' 'sweep' 'wipe'
402 * noun 'to' special -> SetTo;
404 Verb 'show' 'display' 'present'
405 * creature held -> Show reverse
406 * held 'to' creature -> Show;
408 Verb 'shit' 'damn' 'fuck' 'sod'
416 * 'on' 'top' 'of' noun -> Enter
417 * 'on'/'in'/'inside' noun -> Enter;
429 Verb 'squeeze' 'squash'
435 * 'on' noun -> Enter;
442 * 'on' noun -> Swing;
446 * noun 'on' -> Switchon
447 * noun 'off' -> Switchoff
448 * 'on' noun -> Switchon
449 * 'off' noun -> Switchoff;
451 Verb 'take' 'carry' 'hold'
453 * 'off' held -> Disrobe
454 * multiinside 'from'/'off' noun -> Remove
455 * 'inventory' -> Inv;
461 * creature 'about' topic -> Tell
462 * creature 'to' topic -> AskTo;
467 Verb 'tie' 'attach' 'connect' 'fasten' 'fix'
469 * noun 'to' noun -> Tie;
471 Verb 'touch' 'feel' 'fondle' 'grope'
475 * noun 'to' noun -> Transfer;
477 Verb 'turn' 'rotate' 'screw' 'twist' 'unscrew'
479 * noun 'on' -> Switchon
480 * noun 'off' -> Switchoff
481 * 'on' noun -> Switchon
482 * 'off' noun -> Switchoff;
485 * noun 'with' held -> Unlock;
490 Verb 'wake' 'awake' 'awaken'
493 * creature -> WakeOther
494 * creature 'up' -> WakeOther
495 * 'up' creature -> WakeOther;
500 * noun 'at' noun -> Wave
501 * 'at' noun -> WaveHands;
509 ! ------------------------------------------------------------------------------
510 ! This routine is no longer used here, but provided to help existing games
511 ! which use it as a general parsing routine:
515 do w = NextWordStopped();
516 until (w == -1 || (w == 'to' && action_to_be == ##Answer));
518 consult_words = wn - consult_from;
519 if (consult_words == 0) return -1;
520 if (action_to_be == ##Answer or ##Ask or ##Tell) {
521 w = wn; wn = consult_from; parsed_number = NextWord();
522 if (parsed_number == 'the' && consult_words > 1) parsed_number = NextWord();
529 ! ------------------------------------------------------------------------------
530 ! Final task: provide trivial routines if the user hasn't already:
531 ! ------------------------------------------------------------------------------
541 Stub BeforeParsing 0;
542 Stub ChooseObjects 2;
546 Stub GamePostRoutine 0;
547 Stub GamePreRoutine 0;
551 Stub ObjectDoesNotFit 2;
554 Stub PrintTaskName 1;
560 Stub HandleGlkEvent 2;
561 Stub IdentifyGlkObject 4;
562 Stub InitGlkWindow 1;
563 #Endif; ! TARGET_GLULX
570 [ ParseNoun obj; obj = obj; return -1; ];
577 ! ==============================================================================
579 Undef LIBRARY_STAGE; Constant LIBRARY_STAGE = AFTER_GRAMMAR;
581 #Ifnot; ! LIBRARY_STAGE < AFTER_GRAMMAR but ~= AFTER_VERBLIB
582 Message "Error: 'verblib' needs to be correctly included before including 'grammar'. This will cause a big number of errors!";
585 #Ifnot; ! LIBRARY_STAGE >= AFTER_GRAMMAR : already included
586 Message "Warning: 'grammar' included twice; ignoring second inclusion. (Ignore this if this is on purpose.)";
589 #Ifnot; ! LIBRARY_STAGE is not defined
590 Message "Error: 'parser', then 'verblib' need to be correctly included before including 'grammar'. This will cause a big number of errors!";
593 ! ==============================================================================