1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-16 22:14:23 +03:00
inform7/docs/standard_rules/S-cg.html
2020-03-28 19:42:53 +00:00

290 lines
16 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>S/act2</title>
<meta name="viewport" content="width=device-width initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="en-gb">
<link href="../inweb.css" rel="stylesheet" rev="stylesheet" type="text/css">
</head>
<body>
<nav role="navigation">
<h1><a href="../webs.html">Sources</a></h1>
<ul>
<li><a href="../compiler.html">compiler tools</a></li>
<li><a href="../other.html">other tools</a></li>
<li><a href="../extensions.html"><b>extensions and kits</b></a></li>
<li><a href="../units.html">unit test tools</a></li>
/ul>
<h2>Extensions</h2>
<ul>
<li><a href="../basic_inform/index.html">Basic Inform</a></li>
<li><a href="../standard_rules/index.html">Standard Rules</a></li>
</ul>
<h2>Kits</h2>
<ul>
<li><a href="../BasicInformKit/index.html">BasicInformKit</a></li>
<li><a href="../BasicInformExtrasKit/index.html">BasicInformExtrasKit</a></li>
<li><a href="../CommandParserKit/index.html">CommandParserKit</a></li>
<li><a href="../EnglishLanguageKit/index.html">EnglishLanguageKit</a></li>
<li><a href="../WorldModelKit/index.html">WorldModelKit</a></li>
</ul>
</nav>
<main role="main">
<!--Weave of 'S/cg' generated by 7-->
<ul class="crumbs"><li><a href="../webs.html">Source</a></li><li><a href="../extensions.html">Extensions</a></li><li><a href="index.html">srules</a></li><li><b>Command Grammar</b></li></ul><p class="purpose">The default grammar for parsing typed commands in play.</p>
<p class="inwebparagraph"><a id="SP1"></a><b>&#167;1. </b>Inform comes with no command grammar built in, and Basic Inform defines
none either.
</p>
<pre class="display">
<span class="plain">Part Six - Grammar</span>
<span class="plain">Understand "take [things]" as taking.</span>
<span class="plain">Understand "take off [something]" as taking off.</span>
<span class="plain">Understand "take [something] off" as taking off.</span>
<span class="plain">Understand "take [things inside] from [something]" as removing it from.</span>
<span class="plain">Understand "take [things inside] off [something]" as removing it from.</span>
<span class="plain">Understand "take inventory" as taking inventory.</span>
<span class="plain">Understand the commands "carry" and "hold" as "take".</span>
<span class="plain">Understand "get in/on" as entering.</span>
<span class="plain">Understand "get out/off/down/up" as exiting.</span>
<span class="plain">Understand "get [things]" as taking.</span>
<span class="plain">Understand "get in/into/on/onto [something]" as entering.</span>
<span class="plain">Understand "get off/down [something]" as getting off.</span>
<span class="plain">Understand "get [things inside] from [something]" as removing it from.</span>
<span class="plain">Understand "pick up [things]" or "pick [things] up" as taking.</span>
<span class="plain">Understand "stand" or "stand up" as exiting.</span>
<span class="plain">Understand "stand on [something]" as entering.</span>
<span class="plain">Understand "remove [something preferably held]" as taking off.</span>
<span class="plain">Understand "remove [things inside] from [something]" as removing it from.</span>
<span class="plain">Understand "shed [something preferably held]" as taking off.</span>
<span class="plain">Understand the commands "doff" and "disrobe" as "shed".</span>
<span class="plain">Understand "wear [something preferably held]" as wearing.</span>
<span class="plain">Understand the command "don" as "wear".</span>
<span class="plain">Understand "put [other things] in/inside/into [something]" as inserting it into.</span>
<span class="plain">Understand "put [other things] on/onto [something]" as putting it on.</span>
<span class="plain">Understand "put on [something preferably held]" as wearing.</span>
<span class="plain">Understand "put [something preferably held] on" as wearing.</span>
<span class="plain">Understand "put down [things preferably held]" or "put [things preferably held] down" as dropping.</span>
<span class="plain">Understand "insert [other things] in/into [something]" as inserting it into.</span>
<span class="plain">Understand "drop [things preferably held]" as dropping.</span>
<span class="plain">Understand "drop [other things] in/into/down [something]" as inserting it into.</span>
<span class="plain">Understand "drop [other things] on/onto [something]" as putting it on.</span>
<span class="plain">Understand "drop [something preferably held] at/against [something]" as throwing it at.</span>
<span class="plain">Understand the commands "throw" and "discard" as "drop".</span>
<span class="plain">Understand "give [something preferably held] to [someone]" as giving it to.</span>
<span class="plain">Understand "give [someone] [something preferably held]" as giving it to (with nouns reversed).</span>
<span class="plain">Understand the commands "pay" and "offer" and "feed" as "give".</span>
<span class="plain">Understand "show [someone] [something preferably held]" as showing it to (with nouns reversed).</span>
<span class="plain">Understand "show [something preferably held] to [someone]" as showing it to.</span>
<span class="plain">Understand the commands "present" and "display" as "show".</span>
<span class="plain">Understand "go" as going.</span>
<span class="plain">Understand "go [direction]" as going.</span>
<span class="plain">Understand "go [something]" as entering.</span>
<span class="plain">Understand "go into/in/inside/through [something]" as entering.</span>
<span class="plain">Understand the commands "walk" and "run" as "go".</span>
<span class="plain">Understand "inventory" as taking inventory.</span>
<span class="plain">Understand the commands "i" and "inv" as "inventory".</span>
<span class="plain">Understand "look" as looking.</span>
<span class="plain">Understand "look at [something]" as examining.</span>
<span class="plain">Understand "look [something]" as examining.</span>
<span class="plain">Understand "look inside/in/into/through [something]" as searching.</span>
<span class="plain">Understand "look under [something]" as looking under.</span>
<span class="plain">Understand "look up [text] in [something]" as consulting it about (with nouns reversed).</span>
<span class="plain">Understand the command "l" as "look".</span>
<span class="plain">Understand "consult [something] on/about [text]" as consulting it about.</span>
<span class="plain">Understand "open [something]" as opening.</span>
<span class="plain">Understand "open [something] with [something preferably held]" as unlocking it with.</span>
<span class="plain">Understand the commands "unwrap", "uncover" as "open".</span>
<span class="plain">Understand "close [something]" as closing.</span>
<span class="plain">Understand "close up [something]" as closing.</span>
<span class="plain">Understand "close off [something]" as switching off.</span>
<span class="plain">Understand the commands "shut" and "cover" as "close".</span>
<span class="plain">Understand "enter" as entering.</span>
<span class="plain">Understand "enter [something]" as entering.</span>
<span class="plain">Understand the command "cross" as "enter".</span>
<span class="plain">Understand "sit on top of [something]" as entering.</span>
<span class="plain">Understand "sit on/in/inside [something]" as entering.</span>
<span class="plain">Understand "exit" as exiting.</span>
<span class="plain">Understand the commands "leave" and "out" as "exit".</span>
<span class="plain">Understand "examine [something]" as examining.</span>
<span class="plain">Understand the commands "x", "watch", "describe" and "check" as "examine".</span>
<span class="plain">Understand "read [something]" as examining.</span>
<span class="plain">Understand "read about [text] in [something]" as consulting it about (with nouns reversed).</span>
<span class="plain">Understand "read [text] in [something]" as consulting it about (with nouns reversed).</span>
<span class="plain">Understand "yes" as saying yes.</span>
<span class="plain">Understand the command "y" as "yes".</span>
<span class="plain">Understand "no" as saying no.</span>
<span class="plain">Understand "sorry" as saying sorry.</span>
<span class="plain">Understand "search [something]" as searching.</span>
<span class="plain">Understand "wave" as waving hands.</span>
<span class="plain">Understand "wave [something]" as waving.</span>
<span class="plain">Understand "set [something] to [text]" as setting it to.</span>
<span class="plain">Understand the command "adjust" as "set".</span>
<span class="plain">Understand "pull [something]" as pulling.</span>
<span class="plain">Understand the command "drag" as "pull".</span>
<span class="plain">Understand "push [something]" as pushing.</span>
<span class="plain">Understand "push [something] [direction]" or "push [something] to [direction]" as pushing it to.</span>
<span class="plain">Understand the commands "move", "shift", "clear" and "press" as "push".</span>
<span class="plain">Understand "turn [something]" as turning.</span>
<span class="plain">Understand "turn [something] on" or "turn on [something]" as switching on.</span>
<span class="plain">Understand "turn [something] off" or "turn off [something]" as switching off.</span>
<span class="plain">Understand the commands "rotate", "twist", "unscrew" and "screw" as "turn".</span>
<span class="plain">Understand "switch [something switched on]" as switching off.</span>
<span class="plain">Understand "switch [something]" or "switch on [something]" or "switch [something] on" as</span>
<span class="plain">switching on.</span>
<span class="plain">Understand "switch [something] off" or "switch off [something]" as switching off.</span>
<span class="plain">Understand "lock [something] with [something preferably held]" as locking it with.</span>
<span class="plain">Understand "unlock [something] with [something preferably held]" as unlocking it with.</span>
<span class="plain">Understand "attack [something]" as attacking.</span>
<span class="plain">Understand the commands "break", "smash", "hit", "fight", "torture", "wreck", "crack", "destroy",</span>
<span class="plain">"murder", "kill", "punch" and "thump" as "attack".</span>
<span class="plain">Understand "wait" as waiting.</span>
<span class="plain">Understand the command "z" as "wait".</span>
<span class="plain">Understand "answer [text] to [someone]" as answering it that (with nouns reversed).</span>
<span class="plain">Understand the commands "say", "shout" and "speak" as "answer".</span>
<span class="plain">Understand "tell [someone] about [text]" as telling it about.</span>
<span class="plain">Understand "ask [someone] about [text]" as asking it about.</span>
<span class="plain">Understand "ask [someone] for [something]" as asking it for.</span>
<span class="plain">Understand "eat [something preferably held]" as eating.</span>
<span class="plain">Understand "sleep" as sleeping.</span>
<span class="plain">Understand the command "nap" as "sleep".</span>
<span class="plain">Understand "climb [something]" or "climb up/over [something]" as climbing.</span>
<span class="plain">Understand the command "scale" as "climb".</span>
<span class="plain">Understand "buy [something]" as buying.</span>
<span class="plain">Understand the command "purchase" as "buy".</span>
<span class="plain">Understand "squeeze [something]" as squeezing.</span>
<span class="plain">Understand the command "squash" as "squeeze".</span>
<span class="plain">Understand "swing [something]" or "swing on [something]" as swinging.</span>
<span class="plain">Understand "wake" or "wake up" as waking up.</span>
<span class="plain">Understand "wake [someone]" or "wake [someone] up" or "wake up [someone]" as waking.</span>
<span class="plain">Understand the commands "awake" and "awaken" as "wake".</span>
<span class="plain">Understand "kiss [someone]" as kissing.</span>
<span class="plain">Understand the commands "embrace" and "hug" as "kiss".</span>
<span class="plain">Understand "think" as thinking.</span>
<span class="plain">Understand "smell" as smelling.</span>
<span class="plain">Understand "smell [something]" as smelling.</span>
<span class="plain">Understand the command "sniff" as "smell".</span>
<span class="plain">Understand "listen" as listening to.</span>
<span class="plain">Understand "hear [something]" as listening to.</span>
<span class="plain">Understand "listen to [something]" as listening to.</span>
<span class="plain">Understand "taste [something]" as tasting.</span>
<span class="plain">Understand "touch [something]" as touching.</span>
<span class="plain">Understand the command "feel" as "touch".</span>
<span class="plain">Understand "rub [something]" as rubbing.</span>
<span class="plain">Understand the commands "shine", "polish", "sweep", "clean", "dust", "wipe" and "scrub" as "rub".</span>
<span class="plain">Understand "tie [something] to [something]" as tying it to.</span>
<span class="plain">Understand the commands "attach" and "fasten" as "tie".</span>
<span class="plain">Understand "burn [something]" as burning.</span>
<span class="plain">Understand the command "light" as "burn".</span>
<span class="plain">Understand "drink [something]" as drinking.</span>
<span class="plain">Understand the commands "swallow" and "sip" as "drink".</span>
<span class="plain">Understand "cut [something]" as cutting.</span>
<span class="plain">Understand the commands "slice", "prune" and "chop" as "cut".</span>
<span class="plain">Understand "jump" as jumping.</span>
<span class="plain">Understand the commands "skip" and "hop" as "jump".</span>
<span class="plain">Understand "score" as requesting the score.</span>
<span class="plain">Understand "quit" or "q" as quitting the game.</span>
<span class="plain">Understand "save" as saving the game.</span>
<span class="plain">Understand "restart" as restarting the game.</span>
<span class="plain">Understand "restore" as restoring the game.</span>
<span class="plain">Understand "verify" as verifying the story file.</span>
<span class="plain">Understand "version" as requesting the story file version.</span>
<span class="plain">Understand "script" or "script on" or "transcript" or "transcript on" as switching the story</span>
<span class="plain">transcript on.</span>
<span class="plain">Understand "script off" or "transcript off" as switching the story transcript off.</span>
<span class="plain">Understand "superbrief" or "short" as preferring abbreviated room descriptions.</span>
<span class="plain">Understand "verbose" or "long" as preferring unabbreviated room descriptions.</span>
<span class="plain">Understand "brief" or "normal" as preferring sometimes abbreviated room descriptions.</span>
<span class="plain">Understand "nouns" or "pronouns" as requesting the pronoun meanings.</span>
<span class="plain">Understand "notify" or "notify on" as switching score notification on.</span>
<span class="plain">Understand "notify off" as switching score notification off.</span>
</pre>
<p class="inwebparagraph"></p>
<p class="inwebparagraph"><a id="SP2"></a><b>&#167;2. </b>The following provides for the token "[a time period]", which is not in
fact used in the default grammar above, but is available for authors.
</p>
<pre class="display">
<span class="plain">The understand token a time period translates into I6 as "RELATIVE_TIME_TOKEN".</span>
</pre>
<p class="inwebparagraph"></p>
<hr class="tocbar">
<ul class="toc"><li><a href="S-act2.html">Back to 'Actions'</a></li><li><a href="S-pd.html">Continue with 'Phrase Definitions'</a></li></ul><hr class="tocbar">
<!--End of weave-->
</main>
</body>
</html>