Syntax
Syntax
The Program
P/syn.§1. “From an engineering perspective, language is kind of a disaster” (Arika Okrent). Welcome to
the scene of a disaster.
The syntax of a language is the collection of rules for how complicated structures – sentences, for example
– are built up from simpler ones. These rules can work in many di↵erent ways: they may require us to
use punctuation, word ordering, word modification, or verbal formulae to hold a sentence together. Every
natural language has its own distinctive syntax.
Syntax is not a precise term, even in computing. English sentences really can’t be formed properly without
some idea of what the words mean, and di↵erent linguists put the boundary of syntax and semantics in
di↵erent places. For Inform purposes, we will use “syntax” to mean the rules of natural language enforced
by its lexical rules (spaces, punctuation, quotation marks and so on) together with its Preform grammar.
Preform is the name given to both a notation for syntax, and a subsystem of Inform which parses text
against definitions written in that notation. The purpose of Preform, introduced in early 2011, is to separate
the compiler as far as possible from the definition of the natural language it reads. Eventually, we would
like Inform to read all major European languages on an equal basis, though this is a very ambitious goal.
P/syn.§2. If you’re reading this as part of the English Syntax of Inform document, you might like to know
how the document is made. Inform is a “web” according to the “literate programming” doctrine of Donald
Knuth: in fact, at about 160,000 lines of code, it’s one of the largest webs ever written. A literate program
is written in a narrative style, laying out code in as legible a style as possible, and with sketch-proofs and
explanations to justify the choices made, or simply to give the reader some idea of what is going on.
To use a literate program, you need two preprocessors – a “weaver” and a “tangler”. The weaver makes
a typeset document intended only for human eyes: an ebook, in e↵ect. If you’re reading this as a PDF
document, you’re looking at the output from Inform’s weaver. The tangler, on the other hand, makes a
traditional computer program which can be fed into a compiler and eventually run, but which is an illegible
mess to the human eye. In Inform’s case, the weaver and tangler are actually both the same program (called
inweb), which weaves to TEX and tangles to ANSI C.
Literate programs are subdivided into paragraphs. Knuth, who called these “sections”, traditionally wrote
them as §1, §2, ..., and so on; up to §1380 for TEX and §1215 for Metafont. That was already quite hard to
navigate, and Inform has about 7000 paragraphs, so I have used a more hierarchical system. The notation
“6/verb.§14” means paragraph 14 in the section “Verb Phrases” of Chapter 6; it’s a sort of postcode to a
single piece of code in the program. The current paragraph belongs to a special chapter identified as P for
“preliminaries”, which contains material like the preliminary pages of a book.
P/syn.§3. The business of weaving and tangling is relevant because of the way the Preform notations are
written. Individual pieces of the syntax are scattered all over the vast Inform web, in order to keep them
close to the code which uses them; for example, the syntax for declaring new actions is in Chapter 24, which
looks after actions and activities. However:
(a) The weaver has a mode in which it weaves together only the paragraphs which define or talk about
Preform grammar, skipping the rest of the program entirely. This is how the English Syntax of Inform
document is made.
(b) The tangler also treats the Preform definitions in a special way. It extracts them into a standalone file
called English.preform, which Inform reads in at run-time; like various other built-in resources, it lives
in the “Reserved” part of the built-in extensions area. Alter this file, and you alter Inform’s syntax,
though there are better ways.
Thus, for example, the familiar Inform wording “in the presence of” doesn’t occur anywhere in the Inform
compiler; it’s part of a Preform definition which is read in by the compiler. When Inform is reading French,
it will use a di↵erent Preform definition (“dans la présence de”, say).
Preliminaries 3
P/syn.§4. Because of all this, the English Syntax of Inform document is not somebody’s approximate
sketch of what Inform is supposed to do. It’s the actual code Inform executes, current to the build code and
date on the cover.
That makes it fairly precise, though it’s not always laid out in the order you might choose if you were (say)
sitting down to write a BNF definition of the Inform language. It also comes out as quite a long description.
Inform uses more than 500 Preform nonterminals, which seems an awful lot. Je↵ Lee’s elegant Yacc grammar
for ANSI C (1985) needed only about 60; C, of course, is a famously small language, and actual compilers
of it generally use a more extensive grammar – gcc 3.3 used 159 nonterminals, back in the days when gcc
still used Yacc instead of a hand-coded parser – but still: this makes Inform look maybe twice the size of a
typical programming language.
I think that’s misleading, though:
(a) Firstly, Inform generally uses di↵erent wording for di↵erent meanings, rather than using the same
punctuation syntax over and over but with complicated semantic rules for what it does. (Consider
brackets in C++.) This means syntax is more expressive.
(b) Secondly, real compilers always contain semi-secret syntaxes of one kind or another – additional data
types for oddball processors, keywords giving optimisation hints, debugging features, and so on – which
always make what a compiler actually parses more extensive than the theoretical definition of the
language it compiles. Inform is no exception. For example, it contains several syntaxes undocumented
in the public manual and provided only for the bootstrapping process which the Standard Rules goes
through; these are not for public use and may change without notice.
(c) Inform uses Preform not only to parse correct syntax, but also to take a guess at what incorrect syntax
was aiming to do, in order to help it to produce better problem messages. Once again, that means that
there is Preform syntax which isn’t part of the public language definition.
(d) Preform notation provides a convenient way to name some of the standard constructions made by the
Standard Rules; this, again, isn’t part of the syntax definition of Inform – it’s a convenience helping the
compiler to implement its semantics.
(e) Preform notation encourages many small definitions rather than a few large ones.
P/syn.§5. Preform looks like BNF (Backus-Naur form), which has been the traditional notation for syntax
in computer science since 1960. It’s actually a very simple form of BNF, lacking extensions for optional or
repeated elements. BNF is where the jargon words “nonterminal” and “production” come from.
Our language is composed of “nonterminals”, each of which is either “internal” or defined with a list of
“productions”. A nonterminal is used to parse a given excerpt of text to see if it matches some pattern, and
well-chosen nonterminals will correspond to traditional linguistic ideas – haccusative-pronouni or hs-noun-phrasei,
for example. An “internal” nonterminal tests for a match using a routine hardwired into the compiler, which
means no user of Inform can easily alter it.
For example, here is an imaginary example: a nonterminal with two productions, which can match text such
as “4th runner” or “runner no 17”. The ::= symbol can be read as “is defined by”, and the vertical stroke
means “or”. Each of the two productions sits on a single line, though that’s good style, rather than being
compulsory.
hcompetitori ::=
a hordinal-numberi runner |
b runner no hcardinal-numberi
Preliminaries 4
P/syn.§6. When Inform successfully matches some text against a production, it usually means that one
or more nonterminals have made matches as part of this e↵ort. For example, a match against “4th runner”
means hordinal-numberi has matched against “4th”. Inform usually needs to know the “results” of each such
intermediate match. Results are numbered along the production, counting upwards from 1. Here’s a more
interesting example:
runner from <town> numbered <cardinal-number>
This has two results, numbered 1 and 2. Suppose we are translating this into French, and French word
ordering means that these need to occur back to front. (It doesn’t, but just suppose.) If we write
coureur no <cardinal-number> de <town>
This won’t work, because Inform will think the town should be result 1 and the number result 2. So to do
this we need a new syntax:
coureur no <cardinal-number>?2 de <town>?1
The ? suffix followed by a number declares the result number explicitly. So the original production could
equivalently have been written
runner from <town>?1 numbered <cardinal-number>?2
If one of the nonterminals is numbered, then they all must be.
P/syn.§7. Translators giving equivalent definitions for languages other than English need to match the
order of the productions exactly. If the English looks like so:
language English
hcompetitori ::=
a hordinal-numberi runner from horigini |
b runner no hcardinal-numberi
language French
hcompetitori ::=
a hordinal-numberi coureur de horigini |
b coureur avec numero hcardinal-numberi
P/syn.§9. This is sometimes problematic: maybe the productions need to be given in a di↵erent order
to parse properly, or maybe two di↵erent versions need to be given. To get around this, a translator can
optionally begin a production with a match number in the form /a/ to /z/. For example, a translator might
supply three French productions to match the two English ones:
/a/ <ordinal-number> coureur de la <origin>
/a/ <ordinal-number> coureur du <origin>
/b/ coureur no <cardinal-number>
If any of the productions are numbered, they all should be. In the English originals, numbering is always
in standard alphabet order; in the Preform grammar document extracted from the Inform source code,
italicised letters are printed next to each production for convenience.
When 26 productions isn’t enough, use /aa/ to /zz/. English never uses more than 52 productions in any
nonterminal, so we never need more than that.
Preliminaries 5
P/syn.§10. It looks as if each production is made up either of nonterminals or fixed words, but in fact
there are other possibilities too.
(a) We can save typing and also speed up the parsing by using a forward slash / to give alternative single
fixed words. Thus wheel/spoke/pedal is a single token matching any one of these three words. / can
only be used with fixed-word tokens.
Next, there are three wildcards:
(b) The token ### matches any single word.
(c) The token *** matches any stretch of one or more words.
(d) The token ... matches any stretch of one or more words. If it is written with six dots instead of three,
......, brackets (round or brace) inside the word range are required to pair correctly, or there’s no
match.
There are also three modifiers, which a↵ect how Inform reads the immediately following token:
(e) An underscore _ coming before a fixed-word token means informally that a match has to be made in
lower case; more precisely, the word cannot unexpectedly be in upper case. Thus _in matches in the
sentences “A ball is in the bag.” and “In the bag is a ball.”, but not “On the shelf is In The Budding
Grove.” _in/on matches either “in” or “on”, but in both cases they would have to be in lower case.
(f) A caret ^ coming before a nonterminal or a fixed-word token negates its meaning. For instance,
^<competitor> matches any text which hcompetitori doesn’t match; there are no meaningful results from
this. ^blancmange matches any single word which is not “blancmange”, so it matches “jelly”, but not
“confectioner’s custard”. ^fish/fowl matches any single word which is neither “fish” nor “fowl”.
(g) A backslash \ tells Inform to read the next word as its literal textual contents, regardless of the above
rules. So \*** means the word consisting of three asterisks, and \<competitor> means the word consisting
of open angle, c, o, m, ..., r, close angle. \ac/dc means the literal text “ac/dc”, and isn’t a choice of
two. And, of course, \\ means an actual backslash.
Material in square brackets, [like this], is comment and is ignored.
P/syn.§11. There is one more syntax, but it takes some explaining. When wildcards match, Inform can
access the words they represent. For instance,
man with ... on his shirt
would match “man with Race Organiser on his shirt” and generate the word range “Race Organiser” in the
process. Wildcards are numbered from 1 in order of their generation. But braces can be used to a↵ect this,
and in e↵ect to spread or consolidate word ranges. Thus:
man with {... sash} on his shirt
would match “man with marshall’s sash on his shirt” while making the word range “marshall’s sash” instead
of just “marshall’s”. This notation is especially helpful when we need both to check that something matches,
and also record its wording for later:
man with {<messy-set-of-official-logos>} on his shirt
Braces can’t be nested; an inner pair of braces would in any case have no e↵ect, because the outer pair would
wipe them out.
P/syn.§12. Ranges raise the same what-if-we-want-them-back-to-front issue as results do, and we solve
the problem the same way. The ranges in:
man with ... on his ...
are numbered 1 and 2 respectively; and the following:
homme dont {...}?2 est {...}?1
tells Preform that when this text is matched, the word ranges are the other way round compared with the
English version.
Preliminaries 6
P/syn.§13. Other punctuation characters have no special meaning – dashes, round brackets, full stops,
commas, semicolons, colons, asterisks, question marks and so on are just characters like any other in Preform.
So
making ( . ) !
is just a sequence of five fixed-word tokens, and is read in the same literal way as:
making the best of it
Round brackets do not automatically break words in Preform, so (c) is not the same as ( c ), even though
it would be in Inform.
P/syn.§14. In fact, though, Preform does know that there is something special about round brackets (
and ). If a production contains a pair of these, and the position of the ( is uncertain, then Preform will only
match them if they are correctly paired in the source text being looked at. Thus,
friday ... ( ... )
would match “Friday afternoon (but not Tuesday)”, generating word ranges “afternoon” and “but not
Tuesday”; applied to “Friday afternoon (not (Saturday)” it would generate “afternoon ( not” and “Saturday”.
This saves a great deal of time chasing useless possible matches.
P/syn.§15. There are a number of restrictions on what can be written in productions. We’ve decided to
live with this, since Preform is hardly intended for general-purpose programming. Among the things which
can’t be done:
(a) There’s no way to make a literal vertical stroke, arrow ==>, or open or close squares [ or ]; though we
can make literal braces using \{ and \}.
(b) There’s no way to make a literal double-quoted piece of text "thus". This actually causes us a small
amount of nuisance and is the reason there’s an internal nonterminal hempty-texti rather than simply
writing "".
(c) There’s no way to make a literal word which contains one of the characters _, ^, {, }, \ but is longer
than just that one character. For instance, you can’t make 3^6 or bat_man, and \{robin} doesn’t work.
The nuisance is worth it to enable us to use Inform’s regular lexer to read Preform text. When it does so,
it uses the following set of characters as word-breaking punctuation marks, and this explains most of the
restrictions above:
P/syn.§16. This seems a good point to go into the names of nonterminals. Each name must be a single
word in angle brackets, and can only include lower case letters “a” to “z”, the digits 0 to 9, and hyphens;
it must be at least three characters long, not counting the brackets; the first of those characters must be a
lower-case letter, and the last must not be a hyphen. In other words, it must match the regular expression
\<[a-z][a-z0-9-]+[a-z0-9]\>
But those are only the rules; they wouldn’t stop us naming the nonterminal for a description hjulie-75i, say.
In an attempt to bring order to what could easily be a confusion of names, the Inform source text follows
these conventions:
(a) There are three subsets of the grammar which handle complicated tasks mostly isolated from the rest:
(i) The K-grammar parses kind names, such as “list of relations of numbers”. All nonterminals in the
K-grammar begin with hk-...i.
(ii) The NP-grammar parses noun phrases in assertion sentences, such as “a container on the table”
as it occurs in the sentence “The tupperware box is a container on the table”. All nonterminals in
the NP-grammar begin with hnp-...i.
Preliminaries 7
(iii) The S-grammar parses sentences as they occur in conditions, such as “an animal has been in the
cage” as if occurs in the phrase “if an animal has been in the cage, ...”. All nonterminals in the
NP-grammar begin with hs-...i.
(b) Nonterminals used only to choose which problem message to issue – used, that is, to parse text which
is already known to be wrong – have names ending h...-diagnosisi.
(c) Nonterminals which define names of constructions Inform needs to recognise in the Standard Rules have
named which begin hnotable-...i. For example, Inform needs to recognise the property “description” when
it’s defined, because the compiler needs to give this property special handling. Because the property is
only ever created once, and only in English (since the Standard Rules are in English), nonterminals of
the hnotable-...i set never need to be translated into other languages.
(d) Similarly for nonterminals ending in h...-namesi, which give names to (for instance) the built-in relations
– those not defined in the Standard Rules.
(e) As we shall see, there are about 20 sentence forms which have a special grammar to them: for exam-
ple, “Understand ... as ...” sentences. The subject and object noun phrases for these sentences are
parsed with nonterminals whose names end in h...-sentence-subjecti and h...-sentence-objecti respectively;
for example, hunderstand-sentence-subjecti.
(f) A nonterminal ending in h...-constructioni is used not to parse text but to create it; these will be explained
as they come up.
(g) A few nonterminals beginning hif-...i exist to test the current situation; they match if what they’re
testing is currently true, and fail otherwise, but they never match any words of the source text.
P/syn.§17. Finally, some notes on how Preform grammar is typeset in the PDF form of this source code:
(a) For visual clarity, nonterminal names such as <ordinal-number> are typeset as hordinal-numberi, as you’ve
probably guessed.
(b) Italic letters a, b, c, ..., down the columns of productions are a form of line-numbering. They are provided
for the benefit of anybody needing to refer to the productions individually (see above); non-translators
can ignore them.
(c) Preform is a little more powerful than the description of it given above. For each production, it also has
instructions on what to do if a successful match is made. These instructions usually just do something
constructive with whatever information was found, but they can be more flexible. Those instructions are
invisible in the English Syntax of Inform document, since they concern semantics rather than syntax,
but in some cases there’s some explanatory commentary in the right-hand margin:
(c1) If a successful match to a production results in a Problem message being issued, then an arrow and
the sigil for the Problem is given in the right margin. Inform has over 750 problems, each of which
is identified with a unique sigil; for example, C20NoSuchPublicRelease, which turns up in Chapter
20 of the source web. (You can see these sigils in the debugging log if you cause a problem.)
(c2) In a few cases – mainly when parsing lists, where the computational complexity of the parser could
make longer lists unacceptable slow – there are bogus productions which appear to match any text
at all. In the margin next to these is the text match only when looking ahead. This is a technicality
to do with how the Preform parser works; productions like this can simply be ignored as far as
syntax is concerned.
(c3) A few productions are marked with a mysterious note such as actions plugin. This means they
are to be used only when that part of the Inform language definition is enabled; see “Plugins” in
Chapter 27 for details.
(c4) Some productions, when matched, do the reverse of what might be expected: instead of passing
their nonterminal immediately, they fail it immediately. This is a convenient device to allow certain
pieces of text to be parsed twice – once to make sure it has a given form (failing the nonterminal
if it doesn’t), once to extract information from it. Productions like this are marked “fail” in the
righthand margin.
Preliminaries 8
(c5) Moreover, some are marked “fail and skip”. These are used when scanning text for certain configu-
rations of words. If there’s a match, not only does the current nonterminal fail, but Preform knows
not to try again from the very next word: instead it advances to the wildcard text at the end of
the production. (This is easier to follow in practical cases than in general explanations.)
Chapter 2: Memory and Files 9
2/isn.§4. This parses the subject of “... translates into I6 as ...” sentences, such as “The yourself object”
in
The yourself object translates into I6 as ”selfobj”.
htranslates-into-i6-sentence-subjecti ::=
a ... property |
b ... object/kind |
c {... rule} |
d ... variable |
e ... action |
f understand token ... |
g ... ! C2TranslatedUnknownCategory
2/isn.§6. The object noun phrase is usually just an I6 identifier in quotation marks, but it’s also possible
to list literal texts (for the benefit of rules). Following the optional “with” is an articled list, each entry of
which will be required to pass <extra-response>.
htranslates-into-i6-sentence-objecti ::=
a hquoted-texti with hnounphrase-articled-listi |
b hquoted-texti
hextra-responsei ::=
a hquoted-texti ( hresponse-letteri )
Chapter 3: Indexing 10
3/hdoc.§3. The extension documentation text can optionally include section and chapter headings, and
also examples. Here we parse the opening of a paragraph to see if it might be a heading. For instance, a
paragraph consisting of
Section: Black Gold
matches successfully and sets the level to 2 and the name to the word range “Black Gold”.
hextension-documentation-headingi ::=
a chapter : ... |
b section : ...
3/hdoc.§5. And here we do the same to identify an example, which has to satisfy a more exacting speci-
fication: a paragraph in the shape
Example: *** Gelignite Anderson - A Tale of the Texas Oilmen
which would result in the name being set to the range “Gelignite Anderson”, an asterisk count of 3, and the
rubric being “A Tale of the Texas Oilmen”.
hextension-example-headeri ::=
a example : hrow-of-asterisksi ... - ... |
b example : ... - ...
hrow-of-asterisksi ::=
a * |
b ** |
c \*** |
d ****
3/hdoc.§13. Positions for paste icons in extension documentation are marked with asterisk and colon:
hextension-documentation-paste-markeri ::=
a * : ...
Chapter 3: Indexing 11
3/index.§8. In the Standard Rules, a number of phrases (and other constructs) are defined along with
markers to sections in the documentation: here we parse these markers, returning either the word number
of the documentation symbol in question, or 1 if there is none. Since this is used only with the Standard
Rules, which are in English, there’s no point in translating it to other natural languages.
hdocumentation-symbol-taili ::=
a ... ( hdocumentation-symboli ) |
b ... -- hdocumentation-symboli --
hdocumentation-symboli ::=
a documented at ###
Chapter 4: Problems 12
4/dl.§7. Here we parse a request to change the current logging state, such as
Include pronouns in the debugging log.
Note an occasionally useful undocumented feature:
Include <relation-term-basic> in the debugging log.
This traces Preform parsing of the given nonterminal. But beware that (a) it might cause cataracts of
output, and (b) there may be timing reasons why you don’t see the output you expect – for instance if the
nonterminal is used before this Include line is parsed.
The names of the debugging aspects, such as “rulebook compilation”, are hardwired and stored in English;
they need to be settable at the command line, early in Inform’s run, and before Preform and the lexer have
got going. This means they can’t be translated or changed.
hinclude-in-debugging-sentence-subjecti ::=
a only hdebugging-log-requesti |
b hdebugging-log-requesti
hdebugging-log-requesti ::=
a everything |
b nothing |
c hpreform-nonterminali |
d ...
Chapter 5: Characters and Words 13
5/natl.§6.
hnatural-languagei internal
Chapter 5: Characters and Words 14
5/lexs.§5. A useful nonterminal which matches no text, but detects the position:
hif-start-of-paragraphi internal
5/lexs.§6. The second sentence in the source text is construed as containing bibliographic data if it begins
with a quoted piece of text, perhaps with substitutions. For instance,
”A Dream of Fair to Middling Women” by Samuel Beckett
This sentence is at the position matched by hif-start-of-source-texti. (Strictly speaking it’s the second sentence
read, not the first, because all source texts implicitly begin with an inclusion of the Standard Rules.)
hif-start-of-source-texti internal
hif-not-deliberately-capitalisedi internal
5/lexs.§15. The following matches any text in which braces and brackets are correctly paired.
hbalanced-texti ::=
a ......
5/lexs.§17. Inform contains relatively few syntaxes where commas are actually required, though they can
optionally be used in many lists, as here:
parma ham, camembert, grapes
But for when we only want to spot comma placements, this can be used. Note that the comma matches
only if not in brackets.
hlist-comma-divisioni ::=
a ...... , ......
Chapter 6: Sentences 15
6/sent.§13. Sentences in the source text are of five categories: dividing sentences, which divide up the
source into segments; structural sentences, which split the source into di↵erent forms (standard text, tables,
equations, I6 matter, and so on); nonstructural sentences, which make grammatical definitions and give
Inform other more or less direct instructions; rule declarations; and regular sentences, those which use the
standard verbs. Examples:
Volume II [dividing]
Include Locksmith by Emily Short [structural]
Release along with a website [nonstructural]
Instead of looking [rule]
The cushion is on the wooden chair [regular]
Dividing sentences are always read, whereas the others may be skipped in sections of source not being
included for one reason or another. Dividing sentences must match the following. Note that the extension
end markers are only read in extensions, so they can never accidentally match in the main source text.
hdividing-sentencei ::=
a hif-start-of-paragraphi hheadingi |
b hextension-end-marker-sentencei
hheadingi ::=
a volume ... |
b book ... |
c part ... |
d chapter ... |
e section ...
hextension-end-marker-sentencei ::=
a ... begin/begins here |
b ... end/ends here
6/sent.§20. Structural sentences are defined as follows. (The asterisk notation isn’t known to most Inform
users: it increases output to the debugging log.)
hstructural-sentencei ::=
a hif-start-of-source-texti hquoted-texti |
b hif-start-of-source-texti hquoted-texti ... |
c hlanguage-modifying-sentencei |
d * |
e * hquoted-text-without-subsi |
f hif-start-of-paragraphi table ... |
g hif-start-of-paragraphi equation ... |
h include hnounphrase-articled-listi by hnounphrasei |
i include (- ...
Chapter 6: Sentences 16
6/sent.§21. Properly speaking, despite the definition above, language modifying sentences are nonstruc-
tural. So what are they doing here? The answer is that we need to read them early on, because they a↵ect
the way that they parse all other sentences. Whereas other nonstructural sentences can wait, these can’t.
hlanguage-modifying-sentencei ::=
a include (- ### in the preform grammar |
b use ... language element/elements
6/sent.§22. When Inform reads the (optional!) Options file, very early in its run, it tries to obey any use
options in the file right away – earlier even than hstructural-sentencei. It spots these, very crudely, as sentences
which match the following (that is, which start with “use”). Note the final full stop – it’s needed before
sentence-breaking has even taken place.
huse-option-sentence-shapei ::=
a use ... .
6/sent.§24. Rules are ordinarily detected by their colon, which divides the header from the rest: colons
are not otherwise legal in Inform. But there’s an exception. If the sentence consists of text matching the
following grammar, followed by comma, followed by more text, then the comma is read as if it’s a colon and
the sentence becomes a rule. For example:
Instead of going north, try entering the cage
hcomma-divisible-sentencei ::=
a instead of ... |
b every turn *** |
c before ... |
d after ... |
e when ...
6/sent.§25. We make an exception to the exception for the serial comma used in a list of alternatives:
thus the comma in “Aeschylus, Sophocles, or Euripides” does not trigger this rule. We need this exception
because such lists of alternatives often occur in rule preambles, where it’s the third comma which divides
rule from preamble:
Instead of pushing, dropping, or taking the talisman, say ”It is cursed.”
The following is used to detect “or” in such lists.
hlist-or-divisioni ::=
a ...... , _or ...... |
b ...... _or ......
Chapter 6: Sentences 17
6/vm.§8. Not much grammar is used to parse virtual machine identifications like:
Z-machine versions 5 and 8
The words “Z-machine” and “Glulx” are hard-wired so that they can’t be altered using Preform. (The
Spanish for “Glulx”, say, is “Glulx”.) Preform grammar is used first to split the list:
hvm-description-listi ::=
a ... | match only when looking ahead
b hvm-description-entryi hvm-description-list-taili |
c hvm-description-entryi
hvm-description-list-taili ::=
a , _and/or hvm-description-listi |
b _,/and/or hvm-description-listi
hvm-description-entryi ::=
a ...
6/vm.§9. Preform doesn’t parse the VM names themselves, but it does pick up the optional part about
version numbering:
hversion-identificationi ::=
a version/versions hcardinal-numberi
6/vm.§15. The following nonterminal matches any valid description of a virtual machine, with result TRUE
if the current target VM matches that description and FALSE if not.
hvirtual-machinei internal
Chapter 6: Sentences 18
6/head.§5. When a heading has been found, we repeatedly try to match it against hheading-qualifieri to see
if it ends with text telling us what to do with the source text it governs. For example,
Section 21 - Frogs (unindexed) (not for Glulx)
would match twice, first registering the VM requirement, then the unindexedness.
It’s an unfortunate historical quirk that two unbracketed qualifiers (productions b and c) are allowed; they
should probably be withdrawn.
hheading-qualifieri ::=
a ... ( hbracketed-heading-qualifieri ) |
b ... not for release |
c ... unindexed
hbracketed-heading-qualifieri ::=
a not for release |
b unindexed |
c hplatform-qualifieri |
d hextension-qualifieri
hplatform-qualifieri ::=
a for hplatform-identifieri only |
b not for hplatform-identifieri
hplatform-identifieri ::=
a hlanguage-elementi language element |
b ... language element | ! C6UnknownLanguageElement
c hvirtual-machinei |
d ... ! C6UnknownVirtualMachine
hextension-qualifieri ::=
a for use with hextension-identifieri |
b for use without hextension-identifieri |
c not for use with hextension-identifieri |
d in place of ... in hextension-identifieri
hextension-identifieri ::=
a ... by ...
Chapter 6: Sentences 19
hnonstructural-sentencei ::=
a hnounphrase-definitei {translates into htranslation-targeti as} hnounphrase-articledi |
b hnounphrase-alternative-listi {specifies} hnounphrasei |
c hnounphrase-as-subjecti {are defined by} hnounphrase-as-objecti |
d the plural of hnounphrasei {is} hnounphrasei |
e hnounphrasei {is an action} hnounphrase-actionablei | actions plugin
f ... is an action | ! C6BadActionDeclaration
g hnounphrasei {begins when} hnounphrasei | scenes plugin
h hnounphrasei {ends when} hnounphrasei | scenes plugin
i hnounphrasei {ends} hnounphrasei when hnounphrasei | scenes plugin
j hnounphrase-figurei {is the file} hnounphrasei | figures plugin
k hnounphrase-soundi {is the file} hnounphrasei | sounds plugin
l {test} hnounphrasei with hnounphrasei | parsing plugin
Chapter 6: Sentences 20
6/verb.§16. In the assertion parser, any text at all can be a noun phrase. However, to disambiguate
sentences we sometimes want to insist that it takes a particular form: for instance hnounphrase-figurei matches
any text ending in the word “figure”.
hnounphrase-actionablei is an awkward necessity, designed to prevent the regular sentence
The impulse is an action name that varies.
from being parsed as an instance of “... is an action ...”, creating a new action.
hnounphrasei ::=
a ...
hnounphrase-definitei ::=
a hdefinite-articlei hnounphrasei |
b hnounphrasei
hnounphrase-figurei ::=
a figure ...
hnounphrase-soundi ::=
a sound ...
hnounphrase-external-filei ::=
a hexternal-file-sentence-subjecti
Chapter 6: Sentences 21
hnounphrase-actionablei ::=
a ^hvariable-creation-taili
hvariable-creation-taili ::=
a ... that/which vary/varies |
b ... variable
htranslation-targeti ::=
a unicode |
b i6 |
c inform 6 |
d hnatural-languagei
6/verb.§18. In some sense, the other cases are all exceptions: now we come to the general case of sentences
using the verbs and prepositions created by the user and the Standard Rules. The syntax here is very like
that of the S-grammar, though it’s restricted to the present tense, and negated verbs are mostly not allowed.
We don’t actually parse these sentences using the S-grammar’s nonterminals, though, because we expect at
least some of the noun phrases in these sentences to be previously undeclared names. To parse
The coral snake is in the green bucket.
at a time when neither snake nor bucket has been mentioned before, we really have little option but to look
for “is” plus preposition, and cannot use the words either side as any support for the hypothesis that this is
indeed the verb.
We start with existential sentences of the form:
There are four coins on the table.
There are four coins.
hexistential-sentencei ::=
a hs-existential-npi is/are hexistential-sentence-inneri |
b hs-existential-npi is/are ... {hcertaintyi hprepositioni hcertaintyi} ... | ! C6TwoLikelihoods
c hs-existential-npi is/are ... {hcertaintyi hprepositioni} ... |
d hs-existential-npi is/are ... {hprepositioni hcertaintyi} ... |
e hs-existential-npi is/are ... {hprepositioni} ... |
f {hs-existential-npi} {is/are hcertaintyi} ... |
g {hs-existential-npi} {hcertaintyi is/are} ... |
h {hs-existential-npi} {is/are} ...
Chapter 6: Sentences 22
6/verb.§19. The most difficult existential sentences are those involving an explicit verb, such as:
There are four coins which are on the table.
Here we parse “four coins which are on the table”. Note that we skip past negated verbs: this avoids
There is a man who does not have a mission.
being parsed as (There is a man who does not) (have) (a mission).
hexistential-sentence-inneri ::=
a ... hexistential-sentence-inner-tail1i |
b ... hexistential-sentence-inner-tail2i |
c ... hexistential-sentence-inner-tail3i |
d ... hregular-sentence-tail1i |
e ... hregular-sentence-tail2i |
f ... hregular-sentence-tail3i
hexistential-sentence-inner-tail1i ::=
a hnegated-noncopular-verb-presenti ... | ! fail and skip
b hrelative-clause-markeri hregular-sentence-tail1-inneri
hexistential-sentence-inner-tail2i ::=
a hnegated-noncopular-verb-presenti ... | ! fail and skip
b hrelative-clause-markeri hregular-sentence-tail2-inneri
hexistential-sentence-inner-tail3i ::=
a hnegated-noncopular-verb-presenti ... | ! fail and skip
b hrelative-clause-markeri hregular-sentence-tail3-inneri
6/verb.§23. Certainty adverbs are seldom actually needed in existential sentences (in English, “there cer-
tainly are men in the room” is used for emphasis rather than to express probability), but they’re syntactically
legal. The productions here correspond to the four certainty levels other than UNKNOWN_CE, which is nameless.
The use of these adverbs is interesting here, because again it deviates from the practice of the main S-
grammar. We allow “usually” and such like words on either side of the VP in a sentence, but only here in
assertions, so one can write
A box is usually closed. [1]
but not
if a box is usually closed, ... [2]
This is because [1] is essentially a statement about the future, not the present or the past, whereas conditions
like [2] must always be determinable at once: Inform cannot know what will generally happen, only what is
now the case and what has been the case in the past.
hcertaintyi ::=
a always/certainly |
b usually/normally |
c rarely/seldom |
d never
Chapter 6: Sentences 23
hregular-sentencei ::=
a ... hregular-sentence-tail1-without-rci |
b ... hregular-sentence-tail2-without-rci |
c ... hregular-sentence-tail3-without-rci |
d ... hregular-sentence-tail4-without-rci |
e ... hregular-sentence-tail1i |
f ... hregular-sentence-tail2i |
g ... hregular-sentence-tail3i |
h ... hregular-sentence-tail4i
hregular-sentence-tail1-without-rci ::=
a hrelative-clause-markeri hcertaintyi hgeneral-verb-present-positivei ... | ! fail and skip
b hrelative-clause-markeri hgeneral-verb-present-positivei ... | ! fail and skip
c hnegated-noncopular-verb-presenti ... | ! fail and skip
d hregular-sentence-tail1-inneri
hregular-sentence-tail2-without-rci ::=
a hrelative-clause-markeri hcertaintyi hgeneral-verb-present-positivei ... | ! fail and skip
b hrelative-clause-markeri hgeneral-verb-present-positivei ... | ! fail and skip
c hnegated-noncopular-verb-presenti ... | ! fail and skip
d hregular-sentence-tail2-inneri
hregular-sentence-tail3-without-rci ::=
a hrelative-clause-markeri hcertaintyi hgeneral-verb-present-positivei ... | ! fail and skip
b hrelative-clause-markeri hgeneral-verb-present-positivei ... | ! fail and skip
c hnegated-noncopular-verb-presenti ... | ! fail and skip
d hregular-sentence-tail3-inneri
hregular-sentence-tail4-without-rci ::=
a hrelative-clause-markeri hcertaintyi hgeneral-verb-present-positivei ... | ! fail and skip
b hrelative-clause-markeri hgeneral-verb-present-positivei ... | ! fail and skip
Chapter 6: Sentences 24
6/verb.§26. That leaves just the lowest level to define: the three inner tails, which parse text such as
has a whistle
is usually female
carries the flag
There are three of these in order to divide the verbs in three levels of priority: “to have” (priority 1), “to
be” (priority 2), and everything else (priority 3). “To have” has top priority because the matter on either
side may contain some surprising words, thanks to the syntax for declaring property values:
Fred has carrying capacity 2.
“To be” is given next precedence on partly philosophical grounds (it is after all the linguistic expression of
the equality relation, which plays a special role in predicate calculus), but also practical. Consider:
The Fisher-Price carry cot is a container.
In this sentence, “carry” is intended as part of the subject noun phrase, but Inform has no way of telling
that: if we didn’t give “to be” priority over “to carry” we would construe this sentence as saying that a group
of people called The Fisher-Price, perhaps a rock group, are carrying an object called “cot is a container”,
perhaps their new EP of remixed techno lullabies. (Far fewer plausible noun phrases contain “is” than
contain other verbs such as “carry”.)
hregular-sentence-tail1-inneri ::=
a {hcertaintyi hpossession-verb-present-positivei hcertaintyi} ... | ! C6TwoLikelihoods
b {hpossession-verb-present-positivei hcertaintyi} ... |
c {hcertaintyi hpossession-verb-present-positivei} ... |
d {hpossession-verb-present-positivei} ...
hregular-sentence-tail2-inneri ::=
a {hcertaintyi hcopular-verb-present-positivei hcertaintyi} ... | ! C6TwoLikelihoods
b {hcopular-verb-present-positivei hcertaintyi} ... |
c {hcertaintyi hcopular-verb-present-positivei} ... |
d {hcopular-verb-present-positivei} ...
hregular-sentence-tail3-inneri ::=
a {hcertaintyi hgeneral-verb-present-positivei hcertaintyi} ... | ! C6TwoLikelihoods
b {hgeneral-verb-present-positivei hcertaintyi} ... |
c {hcertaintyi hgeneral-verb-present-positivei} ... |
d {hgeneral-verb-present-positivei} ...
Chapter 6: Sentences 25
hregular-sentence-tail4-inneri ::=
a {hcertaintyi hgeneral-verb-present-positivei hcertaintyi} ... | ! C6TwoLikelihoods
b {hforeign-verb-present-positivei hcertaintyi} ... |
c {hcertaintyi hforeign-verb-present-positivei} ... |
d {hforeign-verb-present-positivei} ...
6/verb.§31. This final case never matches a legal sentence: it simply hoovers up usages of past tense
assertion verbs in order to give them a better Problem message than the one they will otherwise receive later
on.
hbad-nonstructural-sentence-diagnosisi ::=
a ... hbad-nonstructural-sentence-diagnosis-taili
hbad-nonstructural-sentence-diagnosis-taili ::=
a hrelative-clause-markeri hcertaintyi hgeneral-verb-present-positivei ... | ! fail and skip
b hrelative-clause-markeri hgeneral-verb-present-positivei ... | ! fail and skip
c hpast-tense-verbi ... | ! C6NonPresentTense
d hnegated-verbi ... ! C6NegatedVerb1
Chapter 6: Sentences 26
6/noun.§2. This section defines the Preform grammar for parsing noun phrases (NPs) in assertion sen-
tences. There are more than 20 nonterminals in this grammar. Those which begin hnounphrase-...i are used
by other sections of Inform; the others, which begin hnp-...i, are used only as intermediate steps within the
grammar. The raw hnounphrasei itself, which matches any non-empty text, is defined in “Verb Phrases”.
The lowest order is “articled”. Although, again, any text is acceptable, we now take note of the definite or
indefinite article, and also of whether it’s used in the singular or the plural.
Note that unexpectedly upper-case articles are left well alone: this is why
On the table is a thing called A Town Called Alice.
creates an object called “A Town Called Alice”, not an indefinitely-articled one called “Town Called Alice”.
Articles are not removed if that would leave the text empty.
hnounphrase-articledi ::=
a ... | match only when looking ahead
b hif-not-deliberately-capitalisedi hindefinite-articlei hnounphrasei |
c hif-not-deliberately-capitalisedi hdefinite-articlei hnounphrasei |
d hnounphrasei
6/noun.§5. The balanced versions match any text in which brackets and braces are used in a correctly
paired way; otherwise they are the same.
hnp-balancedi ::=
a ^hbalanced-texti | ! fail
b hnounphrasei
hnp-articled-balancedi ::=
a ^hbalanced-texti | ! fail
b hnounphrase-articledi
6/noun.§7. The third order is the “articled list”, which matches text like
the lion, a witch, and some wardrobes
as a list of three articled noun phrases.
hnounphrase-articled-listi ::=
a ... | match only when looking ahead
b hnp-articled-balancedi hnp-articled-list-taili |
c hnounphrase-articledi
hnp-articled-list-taili ::=
a , {_and} hnounphrase-articled-listi |
b {_,/and} hnounphrase-articled-listi
Chapter 6: Sentences 27
6/noun.§9. A variant of this provides lists of rule names. The verbs “to be listed”, “to substitute for” and
“to do nothing” are a little too common to accept them in all circumstances, so we require their subjects to
be plausible as rule names. All rule names end in “rule”, whereas other names mostly don’t, so the following
won’t pick up many false positives.
hnounphrase-rule-listi ::=
a ... | match only when looking ahead
b hnounphrase-rulei hnp-rule-list-taili |
c hnounphrase-rulei
hnp-rule-list-taili ::=
a , {_and} hnounphrase-rule-listi |
b {_,/and} hnounphrase-rule-listi
hnounphrase-rulei ::=
a ... rule
hnounphrase-alternative-listi ::=
a ... | match only when looking ahead
b hnp-balancedi hnp-alternative-list-taili |
c hnounphrasei
hnp-alternative-list-taili ::=
a , {_or} hnounphrase-alternative-listi |
b {_,/or} hnounphrase-alternative-listi
6/noun.§11. That just leaves the big one. It comes in two versions, for the object and subject NPs of a
regular sentence, but they are almost exactly the same. They di↵er slightly, as we’ll see, in the handling of
relative phrases; when parsing a sentence such as
X is Y
Inform uses hnounphrase-as-subjecti on X and hnounphrase-as-objecti on Y. Both of these make use of the
recursive hnp-inneri grammar, and the di↵erence in e↵ect is that at the topmost level of recursion the as-
subject version allows only limited RPs, not unlimited ones. (In languages other than English, we might
want bigger di↵erences, with X read in the nominative and Y in the accusative.)
hnounphrase-as-objecti ::=
a hnp-inneri |
b hnounphrase-articledi
hnounphrase-as-subjecti ::=
a hif-not-deliberately-capitalisedi hif-copulari hnp-relative-phrase-limitedi |
b hnp-inner-without-rpi |
c hnounphrase-articledi
hnp-inneri ::=
a hif-not-deliberately-capitalisedi hif-copulari hnp-relative-phrase-unlimitedi |
b hnp-inner-without-rpi
Chapter 6: Sentences 28
6/noun.§12. A copular sentence is one using “to be”. Thus “X is Y” is copular, but “X can see Y” is not.
We allow RPs only in copular sentences.
hif-copulari internal
6/noun.§13. So here we go with relative phrases. We’ve already seen that our two general forms of NP
di↵er only in the range of RPs allowed at the top level: here we see, furthermore, that the only limitation is
that in the subject of an assertion sentence, a RP can’t be introduced with what seems to be a participle.
It might seem grammatically odd to be parsing RPs as the subject side of a sentence, when they surely ought
to belong to the VP rather than either of the NPs. But English is, in fact, odd this way: it allows indicative
statements, but no other sentences, to use “subject-verb inversion”. An assertion such as
In the Garden is a tortoise.
is impossible to parse with a naive grammar for relative phrases, because the “in” is miles away from its
governing verb “is”. (This quirk is called an inversion since the sentence is equivalent to the easier to construe
“A tortoise is in the Garden”.) This is why we want to parse subject NPs and object NPs symmetrically,
and allow either one to be an RP instead.
And yet subject-verb inversion can’t be allowed in all cases, though; we might pedantically argue that the
Yoda-like utterance
Holding the light sabre is the young Jedi.
is grammatically correct, but if so then we have to read
Holding Area is a room.
as a statement that a room is holding something called “Area”, which then causes Inform to throw problem
messages about confusion between people and rooms (since only people can hold things). So we forbid
subject-verb inversion in the case of a participle like “holding”. This piece of pragmatism is the only
asymmetry between hnounphrase-as-objecti and hnounphrase-as-subjecti.
hnp-relative-phrase-limitedi ::=
a hnp-relative-phrase-impliciti |
b hprobable-participlei *** | ! fail
c hnp-relative-phrase-exceptioni | ! fail
d hnp-relative-phrase-expliciti
hnp-relative-phrase-unlimitedi ::=
a hnp-relative-phrase-impliciti |
b hnp-relative-phrase-exceptioni | ! fail
c hnp-relative-phrase-expliciti
6/noun.§14. We are allowed to exclude certain cases from being considered as RPs. We use this to guard
against “inside of...” and “inside from...”: this is because we need to handle those as map connections and
not spatial containment in the normal sense. (A long-standing IF convention is that “in” and “out” are
directions on a par with “north” and “south”, and behave like lateral connections between rooms, but this
does cause ambiguities with spatial containment, which is conceptually quite di↵erent.)
hnp-relative-phrase-exceptioni ::=
a inside of/from ...
Chapter 6: Sentences 29
6/noun.§15. Finally, we define what we mean by implicit and explicit relative phrases. As examples, the
right-hand sides of:
The lawnmower is in the Garden.
The gira↵e is here.
are explicit and implicit respectively. Implicit RPs are those where the relationship is with something
unstated. For instance, “here” generally means a containment by the room currently being discussed;
“carried” implies that the player does the carrying.
hnp-relative-phrase-impliciti ::=
a worn | player plugin
b carried | player plugin
c initially carried | player plugin
d here spatial plugin
hnp-relative-phrase-expliciti ::=
a hprepositioni hnp-inner-without-rpi
6/noun.§16. Now the heart of it. There are basically seven constructions which can make complex NPs
from simple ones: we’ve already seen one of these, the relative phrase. The sequence of checking these is very
important, because it decides which clauses are represented higher in the parse tree when multiple structures
are present within the NP. For instance, we want to turn
[A] in a container called the flask and cap with flange
into the subtree:
RELATIONSHIP_NT "in" = containment
CALLED_NT "called"
PROPER_NOUN_NT "container" article:indefinite
PROPER_NOUN_NT "flask and cap with flange" article:definite
but we also want:
[B] in a container with carrying capacity 10 and diameter 12
RELATIONSHIP_NT "in" = containment
WITH_NT "with"
PROPER_NOUN_NT "container" article:indefinite
AND_NT "and"
PROPERTY_LIST_NT "carrying capacity 10"
PROPERTY_LIST_NT "diameter 12"
These two cases together force our conventions: from sentence [A] we see that initial relative clauses (in)
must beat callings (“called”) which must beat property clauses (“with”), while from [B] we see that property
clauses must beat lists (“and”). These all have to beat “of” and “from”, which seem to be about linguistically
equal, because these constructions must be easily reversible, as we shall see, and the best way to ensure that
is to make sure they can only appear right down close to leaves in the tree. This dictates
RELATIONSHIP_NT > CALLED_NT > WITH_NT > AND_NT > X_OF_Y_NT = FROM_NT
in the sense that a subtree construction higher in this chain will take precedence over (and therefore be
higher up in the tree than) one that is lower. That leaves just the seventh construction: “kind of ...”. To
avoid misreading this as an “of”, and to protect “called”, we need
CALLED_NT > KIND_NT > X_OF_Y_NT
but otherwise we are fairly free where to put it (though the resulting trees will take di↵erent shapes in some
cases if we move it around, we could write code which handled any of the outcomes about equally well). In
fact, we choose to make it lowest possible, so the final precedence order is:
Chapter 6: Sentences 30
RELATIONSHIP_NT > CALLED_NT > WITH_NT > AND_NT > KIND_NT > X_OF_Y_NT = FROM_NT
Once all possible constructions have been recursively exhausted, every leaf we end up at is treated as a
balanced articled NP. (Thus hnp-inneri fails on source text where brackets aren’t balanced, such as “smile
X-)”. This is why hnounphrase-as-objecti above resorts to using hnounphrase-articledi if hnp-inneri should fail.
The reason we want hnp-inneri to require balance is that otherwise “called” clauses can be misread: “frog
(called toad)” can be misread as saying that “frog (” is called “toad )”.)
Two technicalities to note about the following nonterminal. Production (a) exists to accept arbitrary text
quickly and without allocating memory to hold parse nodes when the Preform parser is simply performing a
lookahead (to see where it will eventually parse). This is a very important economy: without it, parsing a list
of n items will have running time and space requirements of order 2n . But during regular parsing, production
(a) has no e↵ect, and can be ignored. Secondly, note the ampersand notation: recall that &whatever at the
start of production means “only try this production if the word whatever is somewhere in the text we’re
looking at”. Again, it’s a speed optimisation, and doesn’t a↵ect the language’s definition.
hnp-inner-without-rpi ::=
a ... | match only when looking ahead
b hnp-inneri {called} hnp-articled-balancedi |
c hnp-inneri hnp-with-or-having-taili |
d hnp-inneri hnp-list-taili |
e hnp-kind-phrasei |
f hnp-inneri hnp-from-or-of-taili |
g hnominative-pronouni |
h hnp-articled-balancedi
6/noun.§17. The tail of with-or-having parses for instance “with carrying capacity 5” in the NP
a container with carrying capacity 5
This makes use of a nifty feature of Preform: when Preform scans to see how to divide the text, it tries
hnp-with-or-having-taili in each possible position. The reply can be yes, no, or no and move on a little. So if
we spot “it with action”, the answer is no, and move on three words: that jumps over a “with” which we
don’t want to recognise. (Because if we did, then “the locking it with action” would be parsed as a property
list, “action”, attaching to a bogus object called “locking it”.)
hnp-with-or-having-taili ::=
a it with action *** | ! fail and skip
b {with/having} (/) *** | ! fail and skip
c {with/having} hnp-new-property-listi
hnp-new-property-listi ::=
a ... | match only when looking ahead
b hnp-new-propertyi hnp-new-property-list-taili |
c hnp-new-propertyi
hnp-new-propertyi ::=
a ...
hnp-new-property-list-taili ::=
a , {_and} hnp-new-property-listi |
b {_,/and} hnp-new-property-listi
hnp-list-taili ::=
a , {_and} hnp-inneri |
b {_,/and} hnp-inneri
Chapter 6: Sentences 31
hnp-kind-phrasei ::=
a hindefinite-articlei hnp-kind-phrase-unarticledi |
b hnp-kind-phrase-unarticledi
hnp-kind-phrase-unarticledi ::=
a kind/kinds |
b kind/kinds of hnp-inneri
6/noun.§19. Again, we use jumping forwards to avoid an “of” in “in the presence of”, because we want
that for actions, or in property names like “point of view”:
hnp-from-or-of-taili ::=
a in the presence of ... | ! fail and skip
b hproperty-name-vi *** | ! fail and skip
c _of hnp-inneri |
d _from hnp-inneri
Chapter 6: Sentences 32
6/ofs.§9. A tricky point in detecting property declarations is that they share the syntax used for action,
activity and rulebook variables. For instance:
The taking action has a number called the hazard level.
...creates not a property name but an action variable. Fortunately, the names of such owners have a distinctive
look to them:
hprohibited-property-ownersi ::=
a haction-name-formali |
b hactivity-name-formali |
c hrulebook-name-formali
6/ofs.§10. And this seems a good place to declare the grammar for our “formal names”. For instance,
if we want to talk about the “taking” action in abstract as a noun, we write it in the formal way “taking
action”.
haction-name-formali ::=
a ... action
hactivity-name-formali ::=
a ... activity
hrelation-name-formali ::=
a ... relation
hrule-name-formali ::=
a ... rule
hrulebook-name-formali ::=
a ... rulebook
6/ofs.§11. We need to know the property names early in parsing in order to make sure we aren’t breaking
noun phrases at “of” incorrectly. So the following grammar is applied to sentences in the form:
A vehicle has numbers called seating capacity and fuel efficiency.
...and creates these property names right now. (We also filter out some bad property names before they can
do any damage.)
hhas-properties-called-sentence-objecti ::=
a hhas-property-namei hhas-property-name-taili |
b hhas-property-namei
hhas-property-name-taili ::=
a , {_and} hhas-properties-called-sentence-objecti |
b {_,/and} hhas-properties-called-sentence-objecti
hhas-property-namei ::=
a hbad-property-name-diagnosisi |
b ...
hbad-property-name-diagnosisi ::=
a harticlei | ! C6PropertyCalledArticle
b presence | ! C6PropertyCalledPresence
c *** , *** | ! C6PropertyNameForbidden
d *** hquoted-texti *** ! C6PropertyNameForbidden
Chapter 6: Sentences 33
6/ofs.§15. Because we might only just have discovered the property names, it’s likely that some of our
earlier attempts to break noun phrases were wrong. For example, not knowing that “point of view” was
going to be a property name, we’ll have broken
The point of view of Kathy is ”All grammar is bunk.”
as “((The point) of (view of Kathy)) is...”.
So we look back over assertions which might have broken, and if they contain the text of such a property
name, we throw away the existing subtree for the sentence and build a fresh one. (Very probably smaller
and simpler since it will not now break at what we now suspect to be a bad position.)
In a few cases, where for some other reason the of-break was not taken anyway, nothing will change – for
instance, “On the table is a book called My point of view” does not break at the “of” whether it’s a good
break or a bad one, because the “called” construction takes priority. We could with some more work avoid
this, but it causes no nuisance and wastes only a negligible amount of memory.
hsentence-needing-second-looki ::=
a *** hambiguous-property-namei ***
Chapter 6: Sentences 34
6/rtree.§23. Control structures such as “if” act as a sort of super-punctuation inside rule and phrase
definitions, and in particular they a↵ect the actual punctuation of the sentences there (consider the rules
about colons versus semicolons). So, though it’s still early in Inform’s run, we need to seek them out.
Here we parse the text of a command phrase which, if any, of the control structures it might be. Note that
hs-commandi has a grammar partially overlapping with this, and they need to match.
hcontrol-structure-phrasei ::=
a if ... is begin |
b if ... is |
c if/unless ... |
d repeat ... |
e while ... |
f else/otherwise |
g else/otherwise if/unless ... |
h -- otherwise |
i -- ... |
j let ... be the phrase ... a speculative lambda syntax, not yet used
hend-control-structure-phrasei ::=
a end if/unless |
b end while |
c end repeat
hphrase-beginning-blocki ::=
a ... begin
Chapter 7: Extensions 35
7/iext.§3. Here we parse requests to include one or more extensions. People mostly don’t avail themselves
of the opportunity, but it is legal to include several at once, with a line like:
Include Carrots by Peter Rabbit and Green Lettuce by Flopsy Bunny.
A consequence of this convention is that “and” is not permitted in the name of an extension. We might
change this some day.
Here’s how an individual title is described. The bracketed text is later parsed by hplatform-qualifieri.
hextension-title-and-versioni ::=
a version hextension-versioni of hdefinite-articlei hextension-unversionedi |
b version hextension-versioni of hextension-unversionedi |
c hextension-unversionedi
hextension-unversionedi ::=
a hextension-unversioned-inneri ( ... ) |
b hextension-unversioned-inneri
hextension-unversioned-inneri ::=
a hquoted-texti *** | ! C7IncludeExtQuoted
b ...
hextension-versioni internal
7/iext.§12. If an extension file contains the special text (outside literal mode) of
---- Documentation ----
then this is taken as the end of the Inform source, and the beginning of a snippet of documentation about the
extension; text from that point on is saved until later, but not broken into sentences for the parse tree, and
it is therefore invisible to the rest of Inform. If this division line is not present then the extension contains
only body source and no documentation.
hextension-bodyi ::=
a ... ---- documentation ---- ... |
b ...
hbegins-here-sentence-subjecti ::=
a hextension-title-and-versioni by ... |
b ... ! C7ExtMiswordedBeginsHere
Chapter 8: Assertions 36
8/tass.§12. During early beta-testing, the problem message for “I can’t find a verb” split into cases. Inform
is quite sensitive to punctuation errors as between comma, paragraph break and semicolon, and this is where
that sensitivity begins to bite.
hno-verb-diagnosisi ::=
a before/every/after/when/instead/check/carry/report ... | ! C8RuleWithoutColon
b if ... | ! C8IfOutsidePhrase
c ... , ... | ! C8NoSuchVerbComma
d ... ! C8NoSuchVerb
Chapter 8: Assertions 37
8/refpt.§18. The following hypothetical syntax for a future ability to give names to compound kinds
(somewhat like C’s typedef) is inactive for now.
hkind-alias-syntaxi ::=
a value stored as hk-kindi |
b value stored as ... ! C8UnknownStoredAs
8/refpt.§24. The following is needed to handle something like “colour of the box”, where “colour” is a
newly designed type which has coincided with a property, but which was not known to be a property when
the parse tree was grown.
hnewfound-property-ofi ::=
a {hproperty-name-vi} of ...
8/refpt.§31. When a noun phrase in an assertion represents a value, it’s normally a constant (“13”) or
else something like a description of values (“a number”). It wouldn’t make sense to refer to a temporary
value like a local variable, but a global (“player” or “time of day”) is possible.
The “action of taking something” syntax is provided as a way of escaping the usual handling of action
patterns; it enables “taking something” to be a noun instead of a condition testing the current action.
hassertion-np-as-valuei ::=
a variable | ! C8VagueVariable
b action of hspec-stored-actioni |
c hspec-descriptive-type-expressioni |
d hspec-global-variablei
Chapter 8: Assertions 38
8/creat.§18. Names are not permitted to contain brackets, but we do allow them as an indicator of
grammatical gender for languages other than English.
hgrammatical-gender-markeri ::=
a ... ( hgrammatical-gender-abbreviationi )
hgrammatical-gender-abbreviationi ::=
a n |
b m |
c f
8/creat.§20. There now follows a pretty tedious trawl through reasons to object to names. The crash
hieroglyphs exist only so that the Inform test suite can verify that it handles crashes correctly.
hcreation-problem-diagnosisi ::=
a harticlei | ! C8NameIsArticle
b ... (/) ... | ! C8NameWithBrackets
c ni--crash--1 | ! C8Crash1
d ni--crash--10 | ! C8Crash10
e ni--crash--11 | ! C8Crash11
f , ... | ! C8StartsWithComma
g ... , | ! C8EndsWithComma
h ... when/while ... | ! C8ObjectIncWhen
i *** hquoted-texti *** ! C8NameWithText
8/creat.§51. This is how callings are parsed, both in assertions and conditions: that is, names occurring
in noun phrases with the shape “blah blah (called the rhubarb rhubarb)”. (For tedious reasons it would be
inefficient to parse the second of these using the first.)
htext-ending-with-a-callingi ::=
a ... ( called the ... ) |
b ... ( called ... )
htext-including-a-callingi ::=
a ... ( called ... ) ***
8/creat.§52. Many names are rejected because they clash unfortunately with other things, or for other
high-level reasons, but there are also some basic syntactic blunders. Most of the time those are caught by
the Creator above, but in a few cases (declaring new figures, for instance) it’s possible to get around the
standard checks, and in that case problems are picked up here.
hunfortunate-namei is a stricter test than hunsuitable-namei. For example, property names can’t be unsuitable,
but they can be unfortunate.
hunsuitable-namei ::=
a harticlei |
b *** (/)/{/}/,/. *** |
c *** hquoted-texti ***
hunfortunate-namei ::=
a ... with/having/and/or ... |
b hunsuitable-namei
Chapter 8: Assertions 39
8/mass.§83. Equating values in an assertion is never allowed, but there are a variety of possible problem
messages, because it usually occurs as a symptom of a failed attempt to create something. The following is
used to pick up sentences like
Something called mauve is a colour.
which fail because Inform reads “something” as “some thing”, i.e., as referring to a thing which then can’t
be equated with a colour.
hsomething-loose-diagnosisi ::=
a *** something *** ! C8EquatesSomethingToValue
Chapter 8: Assertions 40
hforbidden-property-ownersi ::=
a harticlei kind | ! C8PropertyOfKind
b kind | ! C8PropertyOfKind
c hpronouni ! C8PropertyOfPronoun
8/pdec.§7. And the following parses the object noun phrase of a “can be” sentence, which might take
forms such as:
either speedy or sluggish
fast or slow
allegro, presto, or adagio (the speed property)
allegro, presto, or adagio (this is its speed property)
hcan-be-sentence-objecti ::=
a either hnounphrase-alternative-listi ( hcondition-namei ) |
b hnounphrase-alternative-listi ( hcondition-namei ) |
c either hnounphrase-alternative-listi |
d hnounphrase-alternative-listi
hcondition-namei ::=
a this is hcondition-name-inneri |
b hcondition-name-inneri
hcondition-name-inneri ::=
a harticlei hcondition-name-innermosti |
b hpossessive-third-personi hcondition-name-innermosti |
c hcondition-name-innermosti
hcondition-name-innermosti ::=
a hnounphrasei property |
b hnounphrasei
Chapter 9: Grammatical Forms 41
9/engin.§1. Inflections are modifications of words – usually word endings or beginnings – for di↵erent
circumstances. English is often called an uninflected language, but this is an exaggeration. For example, we
spell the word “tree” as “trees” if it refers to more than one of them. Inform sometimes needs to take text
in one form and change it to another – for example, to turn a singular noun into a plural one – and ordinary
Preform parsing isn’t good enough to express this.
Inform uses a data structure called a “trie” as an efficient way to match prefix and/or suffix patterns in
words, and then to modify them. These tries are created using the same notation as for Preform grammar,
which is convenient in many ways, but also a little misleading – they are parsed quite di↵erently. The rules
are as follows:
(a) A nonterminal in trie grammar can either be a list of other tries, or it can be a list of inflection rules.
Mixtures of the two are not allowed. For example <singular-noun-to-its-indefinite-article> is a list
of other tries, while <en-trie-indef-a> contains actual rules.
(b) In a list of tries, each production consists only of a single nonterminal identifying the trie to make use
of. One exception: writing ... before the trie’s name makes it work on the end of a word instead of the
beginning. Inform attempts to find a match using each trie in turn, until a match is found.
(c) In a list of inflection rules, each production consists of two words. The first word is what to match; the
second gives instructions on what to turn it into. An asterisk is used to mean “any string of 0 or more
letters”; a digit in the replacement text means “truncate by this many letters and add...”. (As a special
case, the replacement text “0” means: make no change.) Some examples:
lead gold turns “lead” into “gold”
codex codices turns “codex” to “codices”
*mouse 5mice turns “mouse” to “mice”, or “fieldmouse” to “fieldmice”
Designing a trie is not quite as easy as it looks. It looks as if this is a sequence of tests to perform in
succession, but it’s better to think of the rules all being performed at once. In general, if you need one
inflection rule to take precedence over another, put it in an earlier trie, rather than putting it earlier in the
same trie.
9/engin.§2. Tries are highly language specific and should not be translated as such: instead, an appropriate
version needs to be written for every language.
Except at the very top level, translators are free to created new tries and name them as they please. For
example, the Spanish implementation of
<singular-noun-to-its-indefinite-article>
may look entirely unlike its English version, but at the top level it still has to have that name.
Lower-level tries used in the implementation should have names beginning with a language code: hence the
names “en-” used below.
9/engin.§3. The following trie looks at the start of a word, which we assume to be a noun, and decides
whether to use the indefinite article “a” or “an”. This is much more complicated than simply looking for a
vowel as the first letter, as people often think until they try a few cases.
The following was compiled by Toby Nelson with the aid of a pronunciation dictionary and the Official
Scrabble Wordlist.
hsingular-noun-to-its-indefinite-articlei ::=
1 hen-trie-indef-ai |
2 hen-trie-indef-bi |
3 hen-trie-indef-ci
Chapter 9: Grammatical Forms 42
hen-trie-indef-ai ::=
1 oneir* an |
2 onero* an |
3 ukiyo-e an | Japanese style of 17th-19th cent. printmaking
4 urao* an |
5 urial* an |
6 uvarovite* an a rare emerald-green garnet, Ca3 Cr2 (SiO4 )3
hen-trie-indef-bi ::=
1 eu* a | e.g., euphoria, eulogy
2 ewe* a | female sheep
3 ewftes a | Spens. form of an eft lizard
4 ewghen a | made of yew, i.e., yewen
5 ewk a |
6 houri a |
7 once* a | a Once and Future King
8 one* a | but still use an for oneir- andonero-
9 onst a | dialect form of once
10 oui* a | e.g., a Ouija board or a ouistiti (a marmoset)
11 u a | the letter U
12 u-* a | e.g., U-boats
13 u’* a | e.g., u’s
14 uakari a | the South American monkey
15 ub* a | e.g., ubiquitous
16 udal* a |
17 udomet* a |
18 uey a | colloquial for “U-turn”, as in “he pulled a uey”
19 ueys a |
20 ufo* a |
21 uganda* a | the county Uganda
22 ugr* a |
23 uint* a |
24 uk* a |
25 ulex a | the genus of gorse
26 uli* a |
27 ulo* a |
28 ulu* a |
29 una a | from “una corda”, the musical term
30 unabomb* a | the so-called Unabomber
31 unalist a |
32 unanimit* a |
33 unanimous* a |
34 unesco a | the United Nations cultural body
35 unescos a |
36 unia* a |
37 unic* a |
38 unif* a |
39 unig* a |
40 unil* a |
Chapter 9: Grammatical Forms 43
41 unio* a |
42 unip* a |
43 uniq* a |
44 unis* a |
45 unit* a |
46 univ* a |
47 upas* a |
48 ura* a |
49 ure* a |
50 uri* a |
51 uru* a |
52 usa* a |
53 use* a |
54 usi* a |
55 usu* a |
56 utas* a |
57 ute* a |
58 uti* a |
59 uto* a |
60 utr* a |
61 uttoxeter* a | the English town of Uttoxeter
62 uva* a |
63 uvu* a
hen-trie-indef-ci ::=
1 a* an |
2 e* an |
3 i* an |
4 o* an |
5 u* an |
6 f an |
7 f’s an |
8 f-* an |
9 fbi an |
10 fo an |
11 frs an |
12 h an |
13 h’s an |
14 h-* an | e.g., H-bomb
15 haute* an | e.g., haute cuisine, hauteur
16 heir* an |
17 hono* an | e.g., honorific, honorary doctorate
18 hour* an |
19 l an |
20 l’s an |
21 l-* an | e.g., L-plate
22 m an |
23 m’s an |
24 m-* an | e.g., M-ration
25 n an |
26 n’s an |
Chapter 9: Grammatical Forms 44
9/engin.§7. The following takes a single word, assumes it to be a noun which meaningfully has a plural,
and modifies it to the plural form. (“Golf” is a noun which doesn’t sensibly have a plural; the algorithm
here would return “golves”.)
The trie here was derived from a partial implementation of Damian Conway’s algorithm: see his paper An
Algorithmic Approach to English Pluralization, online at his website. The use of tries makes this somewhat
faster than Conway’s reference implementation, which for clarity’s sake consists of a long sequence of regular-
expression matches.
Conway divides plurals into modern and classical forms, and in cases where a noun has both, we take
the modern form. Thus “phalanxes”, not “phalanges”. Because we focus on single words, we also omit
prepositional phrases (“under water”) and position names qualified by following adjectives (“procurator
fiscal”, “postmaster general”). Otherwise we omit only two cases, both involving capitalised proper nouns:
nationality adjectives used as if they were nouns (“I saw two Japanese walking into the airport”) and names
of people used as if they were count nouns for a category of people like the one named (“We need more Wills,
more Henrys.”) – these are not likely to arise much in Inform usage, and they are awkward to implement
with our tries because they depend on prefix as well as suffix and require case-dependency.
In its written form (as of November 2009, anyway), Conway’s paper omits an important step from Algorithm
1, though it’s present in his Perl implementation: the regular case of a sibilant suffix. (Ironically, this means
that as stated Algorithm 1 pluralizes “suffix” incorrectly, as “suffixs”.) I have filled this omission. I have
also amended step 11, which considers the regular plural of a sibilant plus “o” suffix to include an “e”, so
that Conway produces “torsoes”, “bozoes”; we will have “torsos” and “bozos”.
hsingular-noun-to-its-plurali ::=
1 ... hen-trie-plural-uninflectedi |
2 ... hen-trie-plural-pronounsi |
Chapter 9: Grammatical Forms 45
3 ... hen-trie-plural-irregulari |
4 ... hen-trie-plural-irregular-inflectionsi |
5 ... hen-trie-plural-assimilated-classical-inflectionsi |
6 ... hen-trie-plural-irregular-o-suffixesi |
7 ... hen-trie-plural-regular-inflectionsi |
8 ... hen-trie-plural-append-si
9/engin.§8. See Conway’s table A.2. The following nouns, mostly names of kinds of animal, have the
same plural as singular form: for example, chamois, salmon, goldfish.
hen-trie-plural-uninflectedi ::=
1 *fish 0 |
2 *ois 0 |
3 *sheep 0 |
4 *deer 0 |
5 *pox 0 |
6 *itis 0 |
7 bison 0 |
8 flounder 0 |
9 pliers 0 |
10 bream 0 |
11 gallows 0 |
12 proceedings 0 |
13 breeches 0 |
14 graffiti 0 |
15 rabies 0 |
16 britches 0 |
17 headquarters 0 |
18 salmon 0 |
19 carp 0 |
20 herpes 0 |
21 scissors 0 |
22 chassis 0 |
23 high-jinks 0 |
24 sea-bass 0 |
25 clippers 0 |
26 homework 0 |
27 series 0 |
28 cod 0 |
29 innings 0 |
30 shears 0 |
31 contretemps 0 |
32 jackanapes 0 |
33 species 0 |
34 corps 0 |
35 mackerel 0 |
36 swine 0 |
37 debris 0 |
38 measles 0 |
39 trout 0 |
40 diabetes 0 |
41 mews 0 |
42 tuna 0 |
Chapter 9: Grammatical Forms 46
43 djinn 0 |
44 mumps 0 |
45 whiting 0 |
46 eland 0 |
47 news 0 |
48 wildebeest 0 |
49 elk 0 |
50 pincers 0
hen-trie-plural-pronounsi ::=
1 i we |
2 you you |
3 thou you |
4 she they |
5 he they |
6 it they |
7 they they |
8 me us |
9 you you |
10 thee you |
11 her them |
12 him them |
13 it them |
14 them them |
15 myself ourselves |
16 yourself yourself |
17 thyself yourself |
18 herself themselves |
19 himself themselves |
20 itself themselves |
21 themself themselves |
22 oneself oneselves
9/engin.§10. We now reach Conway step 4. These are irregular plurals mostly coming from archaisms.
hen-trie-plural-irregulari ::=
1 beef beefs | we neglect the classical “beeves”
2 brother brothers | and “brethren”
3 child children |
4 cow cows | and “kine”
5 ephemeris ephemerides |
6 genie genies | and “genii”
7 money moneys | and “monies”
8 mongoose mongooses |
9 mythos mythoi |
10 octopus octopuses | and “octopodes”
11 ox oxen |
12 soliloquy soliloquies |
13 trilby trilbys
Chapter 9: Grammatical Forms 47
9/engin.§11. Step 5. Now we reach a batch of irregular but fairly general inflected endings; for example,
protozoon to protozoa, or metamorphosis to metamorphoses.
hen-trie-plural-irregular-inflectionsi ::=
1 *man 3men | Step 5 begins here
2 *louse lmice |
3 *mouse 5mice |
4 *tooth 5teeth |
5 *goose 5geese |
6 *foot 4feet |
7 *zoon 4zoa |
8 *cis 3ces |
9 *sis 3ses |
10 *xis 3xes
9/engin.§12. Step 6. These are inflections from Latin and Greek which have survived into modern English:
hen-trie-plural-assimilated-classical-inflectionsi ::=
1 alumna alumnae | from table A.10
2 alga algae |
3 vertebra vertebrae |
4 codex codices | from table A.14
5 murex murices |
6 silex silices |
7 aphelion aphelia | from table A.19
8 hyperbaton hyperbata |
9 perihelion perihelia |
10 asyndeton asyndeta |
11 noumenon noumena |
12 phenomenon phenomena |
13 criterion criteria |
14 organon organa |
15 prolegomenon prolegomena |
16 agendum agenda | from table A.20
17 datum data |
18 extremum extrema |
19 bacterium bacteria |
20 desideratum desiderata |
21 stratum strata |
22 candelabrum candelabra |
23 erratum errata |
24 ovum ova
Chapter 9: Grammatical Forms 48
9/engin.§13. Step 11a. (We’re not implementing Conway’s steps in sequence: see below.) These -o endings
are mostly loan words from Romance languages whose original inflections are assimilated.
hen-trie-plural-irregular-o-suffixesi ::=
1 albino albinos |
2 alto altos |
3 archipelago archipelagos |
4 armadillo armadillos |
5 basso bassos |
6 canto cantos |
7 commando commandos |
8 contralto contraltos |
9 crescendo crescendos |
10 ditto dittos |
11 dynamo dynamos |
12 embryo embryos |
13 fiasco fiascos |
14 generalissimo generalissimos |
15 ghetto ghettos |
16 guano guanos |
17 inferno infernos |
18 jumbo jumbos |
19 lingo lingos |
20 lumbago lumbagos |
21 magneto magnetos |
22 manifesto manifestos |
23 medico medicos |
24 octavo octavos |
25 photo photos |
26 pro pros |
27 quarto quartos |
28 rhino rhinos |
29 solo solos |
30 soprano sopranos |
31 stylo stylos |
32 tempo tempos
9/engin.§14. Conway steps 8 to 11. These are regular inflections depending only on word endings.
hen-trie-plural-regular-inflectionsi ::=
1 *ch 0es | Step 8: “church” to “churches”
2 *sh 0es | “rush” to “rushes”
3 *ss 0es | “dress” to “dresses”
4 *alf 1ves | Step 9: “calf ” to “calves”
5 *elf 1ves | “self ” to “selves”
6 *olf 1ves | “wolf ” to “wolves”
7 *eaf 1ves | “sheaf ” to “sheaves”
8 *arf 1ves | “wharf ” to “wharves”
9 *nife 2ves | “knife” to “knives”
10 *life 2ves | “life” to “lives”
11 *wife 2ves | “wife” to “wives”
12 *ax 0es | Sibilant additions: “fax” to “faxes”
13 *ex 0es | “sex” to “sexes”
Chapter 9: Grammatical Forms 49
67 *oo 0s |
68 *po 1oes |
69 *qo 1oes |
70 *ro 1oes |
71 *so 0s |
72 *to 1oes |
73 *uo 0s |
74 *vo 1oes |
75 *wo 1oes |
76 *xo 0s |
77 *yo 1oes |
78 *zo 0s
9/engin.§15. Lastly, the fallback if none of the above cases match: append an -s, of course.
hen-trie-plural-append-si ::=
1 * 0s Step 13
9/engin.§16. “Le verbe est l’me d’une langue” (attributed to Georges Duhamel). And the care of the soul
is, of course, complicated. For example, the source text can say something like this:
The verb to flaunt means to wear.
This tells Inform that a new verb’s infinitive is “flaunt”, but not how to construct its other parts. We will
use Preform grammar not only to define how to construct English verbs, but also in a way enabling it to be
used with other languages too.
Inform uses five di↵erent tenses (present, past, present perfect, past perfect, and future), three persons, two
numbers, two senses (true and false), and two moods (active and passive); in addition, it keeps track of the
infinitive, past participle and present participle of a verb. Altogether that makes 123 potentially di↵erent
versions of the original text. But of course there’s a great deal of duplication in this, and almost all of the
versions can be made using a much smaller number of genuinely di↵erent inflected versions of the word.
Our general strategy works like this:
(a) Identify one or more verbs as being too irregular to fit into any pattern, and handle those as special
cases.
(b) For all other verbs, identify a set of inflected forms which covers all of the possibilities we need to make,
and write a trie to handle each one.
(c) Try to use a single conjugation to show how these forms are used, that is, how the di↵erent word forms
map onto the possible tenses, persons, numbers, and so on.
Chapter 9: Grammatical Forms 51
9/engin.§17. This gives us a certain amount of choice. What exactly is “too irregular”? In French, are all
-er, -ir, and -re verbs “regular”? (Consider “aller”, for example.) In English, it’s possible to say that there
are seven or so classes of verbs, all regular by their own standards; but most people say there’s just one class
of verb, and then irregular exceptions.
Our approach will follow Greenbaum, Oxford English Grammar, at 4.14. Like Greenbaum, we will use the
term “form type” for the di↵erent possible inflected versions of a verb word. The verb “to be” has eight
form types (be, am, is, are, was, were, been, being), but it’s unique in that respect – so this is one we will
consider to be “too irregular”, and will handle as a special case.
All other English verbs have five form types, though in many cases two or more of these have the same
spelling. These we will number as follows, for reasons which will become clear below:
(1) Infinitive: flaunt.
(2) Present participle: flaunting.
(3) Past participle: flaunted.
(5) Third person singular present (or just “present”): flaunts.
(6) Third person singular past (or just “past”): flaunted.
In regular verbs the past and past participle are the same, as they are here: he flaunted (past); he had
flaunted (past participle). But English has around 600 commonly occurring irregular verbs in which they are
di↵erent, sometimes unpredictably so: he went (past); he had gone (past participle). Irregularity sometimes
makes these forms coincide rather than making them di↵erent: for example, to set has just three distinct
forms – to set, he sets, he set, he had set, setting.
9/engin.§18. Within Inform, form types are numbered from 0 up to, potentially, a constant called
MAX_FORM_TYPES. (This is so large that there shouldn’t ever be need for more.) Form type 0 is always
the original text, and is used as the basis from which the others are generated. For English verbs Inform
always sets form type 0 to the infinitive, but this needn’t be true if it’s more natural in other languages to
do something else.
We then reserve form types 1 to 3 for infinitive, present participle, and past participle, respectively, and this
is required to be the case in all languages. Form type 4 is reserved for the “adjoint infinitive”: if we are
given the English base text “be able to see”, for example, this will be recognised (see below) as “be able to”
plus “see”, and “see” will be the “adjoint infinitive”. For most verbs, we won’t use it.
That means that form types 5 and upward are free to be used as needed by each language. English needs
two: the present (5) and past (6) forms.
define BASE_FORM_TYPE 0
define INFINITIVE_FORM_TYPE 1
define PRESENT_PARTICIPLE_FORM_TYPE 2
define PAST_PARTICIPLE_FORM_TYPE 3
define ADJOINT_INFINITIVE_FORM_TYPE 4
define MAX_FORM_TYPES 123
Chapter 9: Grammatical Forms 52
9/engin.§19. We’re now ready to write the <verb-conjugation-instructions>. This is a block which looks
at the infinitive of the verb and decides which of several conjugations should be used. Badly irregular verbs
get conjugations of their own, and others are grouped together. In French, for example, we might use this
block of instructions to divide into di↵erent cases for -er, -ir, and -re verbs.
Each row takes the form of a pattern of words to match, followed by a nonterminal giving the conjugation
to use if a match is made. Matches are literal except:
(a) The tail ... means any string of one or more words, but can only be used as the tail. Any text matching
it is written into the adjoint infinitive. So be able to ... matches “be able to touch” and sets the
adjoint infinitive to “touch”.
(b) A pattern written in the form -xyz matches the tail of a verb. This isn’t useful for English, but in French
it neatly spots classes of verbs: for example, -er detects first-conjugation verbs such as “donner”.
Note that we have to make sure every possible infinitive text matches at least one line, and the best way to
ensure that is to finish up with ... as the last pattern – this matches anything.
9/engin.§20. The instructions for English are quite concise, except for the presence of the awkward con-
tracted informal forms of verbs. (These aren’t used in Inform assertion sentences, but are needed for text
substitutions.)
hverb-conjugation-instructionsi ::=
1 be able to ... hto-be-able-to-auxiliaryi |
2 be able to hto-be-able-to-conjugationi |
3 be hto-be-conjugationi |
4 auxiliary-have hto-have-conjugationi |
5 do hto-do-conjugationi |
6 ’re hcontracted-to-be-conjugationi |
7 ’ve hcontracted-to-have-conjugationi |
8 aren’t harent-conjugationi |
9 can’t hinformal-negated-modal-conjugationi |
10 don’t hinformal-negated-modal-conjugationi |
11 haven’t hinformal-negated-modal-conjugationi |
12 mustn’t hinformal-negated-modal-conjugationi |
13 shouldn’t hinformal-negated-modal-conjugationi |
14 won’t hinformal-negated-modal-conjugationi |
15 ... hregular-verb-conjugationi
9/engin.§21. We will start with two auxiliary verbs, that is, verbs used to construct forms of other verbs.
The first is “to have”; as we’ll see, English uses this to construct perfect tenses:
Peter has opened the gate. Jane had closed it.
“To have” doesn’t really mean that anybody possessed anything here, except perhaps a history. It’s simply
used in conjunction with the past participle (“opened” and “closed”) to form a tense. Verbs like this are
called “auxiliary”.
But it’s not actually true, despite what concise grammars say, that English uses “to have” here; it uses a
slight variation which di↵ers in the negated forms. We write
I have not taken the lantern.
rather than
I do not have taken the lantern.
which strictly speaking ought to be correct. Inform handles this by using a modified form of “to have”,
which we’ll call “to auxiliary-have”, which di↵ers only in its negative forms. We’re only going to give this
present and past tenses since it’s never needed except as an auxiliary.
Chapter 9: Grammatical Forms 53
Anyway, this is an example of a “conjugation”. The purpose of this is to set a few special verb forms – such
as the present and past participles – and then give a recipe to make all of the many forms which the verb can
take within sentences. The verb forms are numbered – see above – and the recipe is called a “tabulation”.
We’ll specify the format for this below, when we get to a more complicated example, but briefly: this one sets
the present participle (2) to “having”, the past participle (3) to “had”, and then names <to-have-tabulation>
as the tabulation. The text doesn’t have to be a single word, and some ingenious tricks are possible to form
it from other verb forms; see below.
hto-have-conjugationi ::=
1 2 having |
2 3 had |
3 hto-have-tabulationi
9/engin.§22. Tabulations give instructions for how to construct 120 possible versions of the verb. These
are divided up first into active and passive “moods”:
Peter carries the lantern. [Active.]
The lantern is carried by Peter. [Passive.]
This makes two sets of 60. Each set contains five tenses, which in English are present (1), past (2), perfect
(3), past perfect (4) and future (5).
Peter carries the lantern. [1]
Peter carried the lantern. [2]
Peter has carried the lantern. [3]
Peter had carried the lantern. [4]
Peter will carry the lantern. [5]
This makes five sets of 12. In each set there are six persons: first person singular, second person singular,
third person singular, first person plural, second person plural, third person plural. We always write them
in that order:
I carry the lantern. [1PS]
You carry the lantern. [2PS]
He carries the lantern. [3PS]
We carry the lantern. [1PP]
You [more than one person] carry the lantern. [2PP]
They carry the lantern. [3PP]
And that makes six sets of 2: the positive sense and the negative.
I carry the lantern. [Positive.]
I do not carry the lantern. [Negative]
To sum up, two moods times five tenses times six persons times two senses, which makes 120 versions in all.
A tabulation is best thought of as a short program to make these. Inform starts out with all 120 versions
blank, and each tabulation step sets one or more versions. It’s perfectly legal for later steps to override
earlier ones; and it’s legal to leave some versions unset, marking them not to be used. (We’re going to
ignore all of the passives and three of the active tenses, so we’re only going to set 48 versions, in the case of
auxiliary-to-have.)
Chapter 9: Grammatical Forms 54
Each step consists of a selector, followed by a text. The selector simply chooses which of the 120 forms to
set. The selector always begins with “a” or “p”, meaning active or passive; it can then optionally give a digit
from 1 to 5, narrowing down to a given tense; and it can optionally give a plus or minus sign, narrowing
down to positive or negative senses. In the following, for example, a2+ means active mood (a), past tense
(2), positive (+). This nails down the selection to just 6 versions of the verb.
The text is used literally, except for the following:
(a) The numbers 1, 2, 3, ..., expand into the verb forms with those numbers. For example, 2 expands into
the present participle for the verb. If the number is followed by an open bracket, then an infinitive, then
a close bracket, then it expands to the verb form for that verb. For example, the following expands to
“sought”:
3 ( seek )
(b) Text in the form 1+xyz expands into verb form 1 but with the letters “xyz” added. For example, 1+ed
for the verb “to mark” would expand to “marked”, since 1 is the infinitive form. This feature is much
more useful in heavily inflected languages like French.
(c) If a bracket, an infinitive, then a close bracket, is given, it expands to the corresponding version of
that verb. For example, the step a1+ ( grab ) back sets the positive present-tense versions of a verb
to “I grab back”, “you grab back”, “he grabs back”, and so on. Note that the matching persons are
used, i.e., if we’re expanding this to make the first person singular, we use the first person singular of
the verb we’re borrowing. Finally, we can change the tense by placing a tense marker inside the open
brackets: a3+ ( t1 have ) grabbed sets the perfects to “I have grabbed”, “you have grabbed”, and so
on – without the tense marker it would have been “I have have had grabbed”, because “have” would
expand to its perfect tense and not its present tense. The t1 means present tense; t2 means past tense,
and so on.
(d) If a nonterminal name is given, then it will be set of six texts; these are used for the six persons.
A simple example, then, which uses only feature (d) of these exotica:
hto-have-tabulationi ::=
1 a1+ hto-have-presenti |
2 a1- hto-have-presenti not |
3 a2+ had |
4 a2- had not
9/engin.§23. And this is an example of splitting into cases for the six persons, 1PS, 2PS, 3PS, 1PP,
2PP, 3PP. I have, you have, he has, we have, you have, they have. (This is more excitingly varied in other
languages, of course.)
hto-have-presenti ::=
1 have | have | has | have | have | have
Chapter 9: Grammatical Forms 55
9/engin.§24. Next we have “to do”, which is like “to have” in being fairly regular, as irregular verbs go.
But we treat this as a special case because, again, we’re going to need as an auxiliary verb when forming
negatives (“Peter does not wear the hat” – note the “does not”). But this time we give the full treatment,
creating all 60 active forms.
For the passive, though, we do something new. The selector p* is actually a way to set all 60 passive forms
(which would normally be written p), but it tells Inform to use “to be” as an auxiliary. When we write the
p* step:
p* done by
the e↵ect is the same as writing:
p ( be ) done by
The di↵erence is that Inform more efficiently implements the p* version, by implementing “done by” as if it
were a preposition rather than as part of a verb. This parses more quickly and makes English passive forms
play more nicely with implied uses of “to be”. For example, in
number of things carried by the player [1]
Inform has to infer the meaning
number of things which are carried by the player [2]
and it can only do this if it recognises “carried by” as being prepositional in nature, like “on” or “in”. In
other words, if we wrote the p step above instead of the p* step, [2] would still work but [1] would not. (We
may have to revisit this for languages other than English.)
hto-do-conjugationi ::=
1 2 doing |
2 3 done |
3 hto-do-tabulationi
hto-do-tabulationi ::=
1 a1+ hto-do-presenti |
2 a1- hto-do-presenti not |
3 a2+ did |
4 a2- did not |
5 a3 ( t1 auxiliary-have ) done |
6 a4 ( t2 auxiliary-have ) done |
7 a5+ will do |
8 a5- will not do |
9 p* done by
hto-do-presenti ::=
1 do | do | does | do | do | do
Chapter 9: Grammatical Forms 56
9/engin.§25. Regular English verbs, then, look like so. We will, for the first time, make heavy use of our
numbered verb forms: for example, for the verb “to take”, they would be “take” (1), “taking” (2), “taken”
(3), “takes” (5) and “took” (6). We start with the infinitive (“take”) in verb form 1, but (2), (3), (5) and
(6) are initially blank – we have to make them somehow.
We do this by giving their definitions not as fixed wording, as we did for the verbs above, but as tries
which act on the infinitive to produce a wording. For example, <en-trie-present-participle> is a trie which
performs:
take --> taking
We will have to define these tries below. Note that the infinitive can consist of multiple words; if so, the first
word is run through the tries, and the remaining words are left alone. For example, “grab onto” would be
inflected to “grabs onto”, “grabbing onto” and so on.
hregular-verb-conjugationi ::=
1 2 hen-trie-present-participlei |
2 3 hen-trie-past-participlei |
3 5 hen-trie-present-verb-formi |
4 6 hen-trie-pasti |
5 hregular-verb-tabulationi
9/engin.§26. Here we see our auxiliary verbs in use. For the negated present tense, “Peter does not carry
the ball”; for the negated past tense, “Peter did not carry the ball” – in both cases, this is “to do” plus the
infinitive “take”. For the perfect tenses, “to have” plus the past participle – “Peter has carried the ball”,
“Peter had carried the ball”. For the future tense, “will” plus the infinitive – “Peter will carry the ball”.
(We’re actually not going to implement this as a verb because all its forms are just “will”, and because “to
will” also means “to leave a bequest”.)
hregular-verb-tabulationi ::=
1 a1+ hregular-verb-presenti |
2 a1- ( do ) 1 |
3 a2+ 6 |
4 a2- ( do ) 1 |
5 a3 ( t1 auxiliary-have ) 3 |
6 a4 ( t2 auxiliary-have ) 3 |
7 a5+ will 1 |
8 a5- will not 1 |
9 p* 3 by
9/engin.§27. This looks odd, but what it says is that the present tense of a regular English verb is always
the infinitive (I take, you take, we take, and so on) except for third person singular (he takes), which is
di↵erent. (It’s usually what the plural of the infinitive would be if the infinitive were a noun, as we’ll see.)
hregular-verb-presenti ::=
1 1 | 1 | 5 | 1 | 1 | 1
Chapter 9: Grammatical Forms 57
hto-be-conjugationi ::=
1 2 being |
2 3 been |
3 hto-be-tabulationi
hto-be-tabulationi ::=
1 a1+ hto-be-presenti |
2 a1- hto-be-presenti not |
3 a2+ hto-be-pasti |
4 a2- hto-be-pasti not |
5 a3 ( t1 auxiliary-have ) been |
6 a4 ( t2 auxiliary-have ) been |
7 a5+ will be |
8 a5- will not be
hto-be-presenti ::=
1 am | are | is | are | are | are
hto-be-pasti ::=
1 was | were | was | were | were | were
9/engin.§29. Except for tense formation (Peter “will” take the ball), the only modal verb which can be
used in Inform source text is “can”. For example:
the number of people who can see the King
This is modal because it makes the seeing only a possibility, not an actuality. An awkward thing about modal
verbs in English is that they are deficient, that is, not all their forms even exist. “Can” has no infinitive.
(“To can” means to put food into a sealed metal container, which isn’t the same thing at all.) “Can” also
has no perfect or future tenses. On the other hand, it does have inflected present and past tenses, and we
need to implement that. So we will invent the infinitive form “be able to”, and make the verb from that, but
using “can” and “could” instead of “is able to” and “was able to”. “Can” is rather irregular as a verb: the
third person singular doesn’t inflect (“he can”, not “he cans”), and the negative is written “cannot” instead
of “can not”, presumably because we find the two “n”s awkward to elide, so we always pronounce it that
way and the spelling now follows.
hto-be-able-to-conjugationi ::=
1 2 hen-trie-present-participlei |
2 3 hen-trie-past-participlei |
3 hto-be-able-to-tabulationi
hto-be-able-to-tabulationi ::=
1 a1+ can |
2 a1- cannot |
3 a2+ could |
4 a2- could not |
5 a3 ( t1 auxiliary-have ) been able to |
6 a4 ( t2 auxiliary-have ) been able to |
7 a5+ will be able to |
8 a5- will not be able to
Chapter 9: Grammatical Forms 58
9/engin.§30. Inform has only a simple understanding of what “can” means, so it doesn’t allow the source
text to use “can” in combination with arbitrary verbs. Instead, each legal combination has to be declared
explicitly:
To be able to reach is a verb meaning ...
Inform implements all of this by passing “be able to reach” through the same verb-conjugation mechanisms
as all other verbs (“take”, “see”, and so on). But at least the conjugation used is now simple. Recall that
when the instructions grammar, right back at the start of this discussion of verbs, chooses which conjugation
to use, it converts the text matching the wild-card ... into the “adjoint infinitive” form (4). We get to this
conjugation by matching
be able to ...
so, for example, “be able to reach” results in 4 being set to “reach”.
Note also the construction 3 ( 4 ) in the passive. The 3 means “take the past participle of the verb in
brackets”, and the 4 means that the text of this verb’s infinitive is the contents of verb form 4. So, for
example, for “be able to reach”, 3 ( 4 ) expands to 3 ( reach ) which expands to “reached”, and we get
passive forms like “Peter can be reached by Jane”.
hto-be-able-to-auxiliaryi ::=
1 2 hen-trie-present-participlei |
2 3 hen-trie-past-participlei |
3 hto-be-able-to-auxiliary-tabulationi
hto-be-able-to-auxiliary-tabulationi ::=
1 a ( be able to ) 4 |
2 p ( be able to ) be 3 ( 4 ) by
9/engin.§31. That completes our basic kit of verbs nicely. What’s left is used only for generating text at
run-time – for printing adaptive messages, that is; none of these oddball exceptional cases is otherwise used
as a verb in Inform source text. None of them has any meaning to Inform.
Inform could fairly easily support the contractions “isn’t”, “aren’t”, “wasn’t”, “can’t” and so on, but we’ve
chosen not to do so. They save very little typing, and they greatly change the aesthetic style of Inform
source text without changing its functionality. (If we allowed them, some authors would use them all the
time, and other authors never, but others still would mix them incoherently.)
But we still want people to be able to write adaptive text which uses these contracted forms: otherwise, how
could we write classic messages like
You can’t go that way.
and have them adapt to other tenses and viewpoints?
First we’ll tackle “to ’s”, the contracted form of “to be”: I’m, you’re, and so on. Exactly how these
contractions are used in di↵erent tenses is something that varies with di↵erent dialects of English – for
example, “you’ll not take the ball” is now a little obsolete except in rural dialects – and we aren’t even going
to try to cope with that.
hcontracted-to-be-conjugationi ::=
1 2 being |
2 3 been |
3 hcontracted-to-be-tabulationi
hcontracted-to-be-tabulationi ::=
1 a1+ hcontracted-to-be-presenti |
2 a1- hcontracted-to-be-presenti not |
3 a2+ hcontracted-to-be-pasti |
4 a2- hcontracted-to-be-past-negatedi |
Chapter 9: Grammatical Forms 59
9/engin.§32. And now “to ’ve”, the contracted form of “to have”. A subtle dialect point here concerns
the negated present tense:
Sorry, I don’t have a clue. [US]
Sorry, I haven’t got a clue. [British]
Sorry, I haven’t a clue. [British, but antiquated]
Sorry, I didn’t have a clue. [US or British]
Sorry, I hadn’t got a clue. [British]
But the American forms are becoming more common in British English, so we’ll go with those.
hcontracted-to-have-conjugationi ::=
1 2 having |
2 3 had |
3 hcontracted-to-have-tabulationi
hcontracted-to-have-tabulationi ::=
1 a1+ hcontracted-to-have-presenti |
2 a1- hcontracted-to-have-presenti not |
3 a2+ had |
4 a2- hadn’t |
5 a3+ hcontracted-to-have-presenti had |
6 a3- hcontracted-to-have-presenti not had |
7 a4+ ’d had |
8 a4- ’d not had |
9 a5+ ’ll have |
10 a5- ’ll not have
hcontracted-to-have-presenti ::=
1 ’ve | ’ve | ’s | ’ve | ’ve | ’ve
Chapter 9: Grammatical Forms 60
9/engin.§33. Now we come to “aren’t”, a negated form of “to be”, but where the contraction occurs
between the verb and the “not” rather than between the subject and the verb.
Again, Inform doesn’t know or care what this means. We’re simply going to teach it to conjugate it as if
it were a verb in its own right. So “to aren’t” will be conjugated “I am not”, “you aren’t”, “he isn’t”, and
so on. (We don’t say “I amn’t”, possibly because the “mn” is too awkward, but possibly also because we’d
more likely say “I’m not”. Because this would make the spacing awkwardly difficult – we would need to
backspace – we won’t take that option here.)
harent-conjugationi ::=
1 2 hen-trie-present-participlei |
2 3 hen-trie-past-participlei |
3 harent-tabulationi
harent-tabulationi ::=
1 a1+ harent-presenti |
2 a2+ harent-pasti |
3 a3+ harent-perfecti |
4 a4+ hadn’t been |
5 a5+ won’t be
harent-presenti ::=
1 am not | aren’t | isn’t | aren’t | aren’t | aren’t
harent-pasti ::=
1 wasn’t | weren’t | wasn’t | weren’t | weren’t | weren’t
harent-perfecti ::=
1 haven’t been | haven’t been | hasn’t been | haven’t been | haven’t been | haven’t been
9/engin.§34. And finally: the contracted informal negatives of various modal verbs which it’s useful to be
able to print, like the “can’t” in
You can’t go that way.
English has more modal verbs than one tends to remember – may, might, shall, should, will, would, must –
but we’re only going to define six of them here.
hinformal-negated-modal-conjugationi ::=
1 2 hen-trie-present-participlei |
2 3 hen-trie-past-participlei |
3 5 hen-trie-modal-contracted-pasti |
4 6 hen-trie-modal-contracted-futurei |
5 7 hen-trie-modal-contracted-presenti |
6 hinformal-negated-modal-tabulationi
hinformal-negated-modal-tabulationi ::=
1 a1+ hinformal-negated-modal-presenti |
2 a2+ 5 |
3 a5+ 6
hinformal-negated-modal-presenti ::=
1 1 | 1 | 7 | 1 | 1 | 1
Chapter 9: Grammatical Forms 61
9/engin.§35. We have special tries just to list the forms of the six cases we will deal with. Tries can do
fancy things (see below), but here they act just as a look-up table: for example, “won’t” has present “won’t”,
past “wouldn’t” and future “won’t”.
Note that results of tries normally have to be single words; but that plus signs can be used if we absolutely
have to introduce spaces.
hen-trie-modal-contracted-presenti ::=
1 can’t can’t |
2 don’t doesn’t |
3 haven’t hasn’t |
4 won’t won’t |
5 mustn’t mustn’t |
6 shouldn’t shouldn’t
hen-trie-modal-contracted-pasti ::=
1 can’t couldn’t |
2 don’t didn’t |
3 haven’t hadn’t |
4 won’t wouldn’t |
5 mustn’t mustn’t |
6 shouldn’t shouldn’t
hen-trie-modal-contracted-futurei ::=
1 can’t won’t+be+able+to |
2 don’t won’t |
3 haven’t won’t+have |
4 won’t won’t |
5 mustn’t mustn’t |
6 shouldn’t shouldn’t
9/engin.§36. That’s the end of the conjugations – the easy part, it turns out. We now need to create the
four tries to make verb forms out of the infinitive: the present participle, the past participle, the third-person
singular present tense, and the past tense.
We’ll start with the present participle. This is actually quite hard, because in some cases it depends on
pronunciation rather than spelling. Greenbaum’s Oxford English Grammar summarises the general rules at
4.16, as follows:
(a) If the base ends in -e but not -ee, -oe or -ye, drop the final -e before adding -ing: thus drive to driving,
but see to seeing, dye to dyeing, and so on.
(b) If the base ends in -ie, as well as dropping the -e, also change the -i to -y: thus die to dying, untie to
untying.
(c) If the base ends in a stressed syllable whose spelling ends with a single vowel and then a single consonant,
then double the consonant before adding -ing. Thus tip to tipping (not tiping), but break to breaking
(not breakking).
(d) If the base ends in a vowel and then -c, add -king. This is not quite the same as consonant doubling
and doesn’t depend on the stress; thus mimic to mimicking, picnic to picnicking.
These are fairly clear-cut rules, though English doesn’t enforce them in all cases, so that most dictionaries
let you say either focusing or focussing, for example, and either gluing or glueing (note that rule (a) drops
the -e from -ue endings, but it’s not at all clear why this case should be di↵erent, which may be why people
are doubtful here); and in America participles like traveling or programing or worshiping are allowed by
some people (with -l, -m, -me, -p endings), but they aren’t universal. Inform will stick to traditional English
as described above.
Chapter 9: Grammatical Forms 62
The tricky thing is that (c) is really a phonetic rule, not a spelling rule. For example, we need to count a
final -y and -w as vowels, not consonants, because that’s what they sound like. But at least that can be read
from the spelling, whereas the presence or absence of stress can’t. An English word generally stresses just
one syllable, and always stresses at least one, so a monosyllabic word is always stressed. With a polysyllabic
word, there’s no easy way to tell. Consider deter to deterring (stress on second syllable of deter), but meter
to metering (stress on first syllable of meter).
9/engin.§37. The following algorithm is due to Toby Nelson, who produced it from a dictionary of 14,689
English verbs, some of them quite obscure (to torpefy, anyone? to spuilzie? to cachinnate?). It’s essentially
a more detailed version of Greenbaum’s rules above.
hen-trie-present-participlei ::=
1 ... hen-trie-irregular-present-participlei |
2 ... hen-trie-irregular-compound-present-participlei |
3 ... hen-trie-regular-a-present-participlei |
4 ... hen-trie-regular-b-present-participlei |
5 ... hen-trie-regular-c-present-participlei
9/engin.§38. First of all there are some irregular cases – some for the usual suspects, but others for oddball
verbs where English breaks the normal phonetic rules for the sake of clarity. For example, the participle of
“singe” ought to be “singing”, but in fact we write “singeing”, purely to make it di↵erent from the act of
producing a song.
hen-trie-irregular-present-participlei ::=
1 boob 0ing |
2 had 0ding |
3 quad 0ding |
4 quod 0ding |
5 squid 0ding |
6 whid 0ding |
7 ballad 0ing |
8 salad 0ing |
9 invalid 0ing |
10 ref 0fing |
11 stravaig 0ing |
12 scoog 0ing |
13 scoug 0ing |
14 yak 0king |
15 yok 0king |
16 lek 0king |
17 trek 0king |
18 spaniel 0ling |
19 vermeil 0ling |
20 madam 0ing |
21 buckram 0ing |
22 hem 0ming |
23 emblem 0ing |
24 item 0ing |
25 slalom 0ing |
26 alarum 0ing |
27 possum 0ing |
28 chalan 0ing |
Chapter 9: Grammatical Forms 63
29 challan 0ing |
30 tyran 0ning |
31 den 0ning |
32 hen 0ning |
33 ken 0ning |
34 misken 0ning |
35 pen 0ning |
36 unpen 0ning |
37 sten 0ning |
38 in 0ning |
39 gin 0ning |
40 begin 0ning |
41 bin 0ning |
42 sin 0ning |
43 damaskin 0ing |
44 trampolin 0ing |
45 chagrin 0ing |
46 satin 0ing |
47 on 0ning |
48 con 0ning |
49 don 0ning |
50 kon 0ning |
51 fillip 0ing |
52 turnip 0ing |
53 sip 0ping |
54 cop 0ping |
55 lop 0ping |
56 clop 0ping |
57 flop 0ping |
58 plop 0ping |
59 slop 0ping |
60 galop 0ping |
61 up 0ping |
62 cup 0ping |
63 gar 0ring |
64 mortar 0ing |
65 sker 0ring |
66 deter 0ring |
67 inter 0ring |
68 disinter 0ring |
69 reinter 0ring |
70 aver 0ring |
71 abhor 0ring |
72 vor 0ring |
73 demur 0ring |
74 fur 0ring |
75 smur 0ring |
76 caucus 0ing |
77 sus 0sing |
78 combat 0ing |
79 ballat 0ing |
80 curat 0ing |
81 quadrat 0ing |
Chapter 9: Grammatical Forms 64
82 bet 0ting |
83 abet 0ting |
84 fet 0ting |
85 fidget 0ing |
86 target 0ing |
87 crochet 0ing |
88 epithet 0ing |
89 ratchet 0ing |
90 let 0ting |
91 blet 0ting |
92 leaflet 0ting |
93 relet 0ting |
94 sublet 0ting |
95 underlet 0ting |
96 net 0ting |
97 benet 0ting |
98 overnet 0ting |
99 pet 0ting |
100 spet 0ting |
101 ret 0ting |
102 aret 0ting |
103 fret 0ting |
104 regret 0ting |
105 basset 0ing |
106 closet 0ing |
107 corset 0ing |
108 cosset 0ing |
109 gusset 0ing |
110 posset 0ing |
111 roset 0ing |
112 russet 0ing |
113 briquet 0ting |
114 coquet 0ting |
115 duet 0ting |
116 parquet 0ting |
117 covet 0ing |
118 unrivet 0ing |
119 velvet 0ing |
120 discomfit 0ing |
121 profit 0ing |
122 limit 0ing |
123 delimit 0ing |
124 vomit 0ing |
125 rit 0ting |
126 frit 0ting |
127 grit 0ting |
128 bit 0ting |
129 dit 0ting |
130 kit 0ting |
131 sit 0ting |
132 besit 0ting |
133 outsit 0ting |
134 resit 0ting |
Chapter 9: Grammatical Forms 65
9/engin.§39. Now some exceptional forms where consonant doubling doesn’t occur:
hen-trie-irregular-compound-present-participlei ::=
1 *hgosyziie 0ing | e.g. boogieing
2 *ae 0ing | e.g. spaeing
3 *quit 0ting | acquitting, quitting, requitting
4 *uret 0ting | carburetting, sulphuretting
5 *budget 0ing | budgeting, underbudgeting
6 *efer 0ring | deferring, preferring, referring
7 *nfer 0ring | conferring, inferring
8 *sfer 0ring | retransferring, transferring
9 *bias 0sing | biassing, unbiassing
10 *bishop 0ing | bishoping, unbishoping
11 *woman 0ing | womaning, unwomaning
12 *jambok 0king | jambokking, sjambokking
13 *alog 0ing | dialoging, cataloging
14 *daub 0ing daubing, bedaubing
hen-trie-regular-a-present-participlei
::=
1 *haeiouyib 0bing |
2 *hdglmpwiad 0ding |
3 *hbhlnrtwied 0ding |
4 *hbklriid 0ding |
5 *hcdghlnprstiod 0ding |
6 *hbchmprtwiud 0ding |
7 *uf 0fing |
8 *haeiouyig 0ging |
9 *hbcdhiklmnprstuvial 0ling |
10 *hbcdfghkmnprstuvwziel 0ling |
11 *hcfmnrtviil 0ling |
12 *hbcrtviol 0ling |
13 *hcniul 0ling |
14 *hbcdghjlprwiam 0ming |
15 *hgltiem 0ming |
16 *hdhklnrwiim 0ming |
17 *lom 0ming |
18 *hbcghlmrstvium 0ming |
19 *hbcflmptvwian 0ning |
20 *hryien 0ning |
21 *hdhklprtwiin 0ning |
22 *hfwion 0ning |
23 *hdfghprstiun 0ning |
24 *hcdghjlmnprstwyziap 0ping |
25 *hklprtiep 0ping |
26 *hdhklnprtuyziip 0ping |
27 *hbdhmprstuwiop 0ping |
28 *hdhpstiup 0ping |
29 *yp 0ping |
30 *hbcfhjmnptwiar 0ring |
31 *hfhmstiir 0ring |
32 *dor 0ring |
Chapter 9: Grammatical Forms 67
33 *hbclpiur 0ring |
34 *hbgmpvias 0sing |
35 *hmnrsuies 0sing |
36 *hhmpwiis 0sing |
37 *hbcdsios 0sing |
38 *hbclmius 0sing |
39 *hbcfhlmprtuvwiat 0ting |
40 *hghjstvwiet 0ting |
41 *hfhlmnptwiit 0ting |
42 *hbcdhjlnprstwiot 0ting |
43 *hbcghjlmnprtiut 0ting |
44 *heiiv 0ving |
45 *iz 0zing
9/engin.§41. Finally:
hen-trie-regular-b-present-participlei ::=
1 *haeiouic 0king |
2 *heoyie 0ing |
3 *ie 2ying
hen-trie-regular-c-present-participlei ::=
1 *e 1ing |
2 * 0ing
9/engin.§42. Next the past participle. As noted above, for most verbs this is the same as the past (e.g.,
he agreed and it was agreed); but there’s a list of exceptions for Anglo-Saxon survivals (e.g., he chose and it
was chosen). The exceptional cases were derived from Wikipedia’s catalogue of irregular English verbs as it
stood in May 2011, with a few archaisms and obscenities removed.
hen-trie-past-participlei ::=
1 hen-trie-irregular-past-participlei |
2 hen-trie-pasti
hen-trie-irregular-past-participlei ::=
1 be been |
2 have had |
3 do did |
4 arise arisen |
5 awake awoken |
6 bear borne |
7 beat beaten |
8 become become |
9 befall befallen |
10 beget begotten |
11 begin begun |
12 bespeak bespoken |
13 bite bitten |
14 blow blown |
15 break broken |
16 browbeat browbeaten |
17 choose chosen |
18 cleave cloven |
19 come come |
Chapter 9: Grammatical Forms 68
20 dive dived |
21 draw drawn |
22 drink drunk |
23 drive driven |
24 eat eaten |
25 fall fallen |
26 fly flown |
27 forbear forborne |
28 forbid forbidden |
29 forego foregone |
30 foreknow foreknown |
31 forelie forlain |
32 forerun forerun |
33 foresee foreseen |
34 forget forgotten |
35 forgive forgiven |
36 forgo forgone |
37 forsake forsaken |
38 forswear forsworn |
39 freeze frozen |
40 ghostwrite ghostwritten |
41 give given |
42 go gone |
43 grow grown |
44 hew hewn |
45 hide hidden |
46 interweave interwoven |
47 know known |
48 lade laden |
49 misbecome misbecome |
50 misbeget misbegotten |
51 mischoose mischosen |
52 misdo misdone |
53 misget misgotten |
54 misgive misgiven |
55 misknow misknown |
56 misshape misshapen |
57 misspeak misspoken |
58 mistake mistaken |
59 miswrite miswritten |
60 mow mown |
61 outdo outdone |
62 outgrow outgrown |
63 outgrow outgrown |
64 outrun outrun |
65 outshine outshone |
66 outswear outsworn |
67 outthrow outthrown |
68 overbear overborne |
69 overblow overblown |
70 overclothe overclad |
71 overcome overcome |
72 overdo overdone |
Chapter 9: Grammatical Forms 69
73 overdraw overdrawn |
74 overdrink overdrunk |
75 overdrive overdriven |
76 overeat overeaten |
77 overfly overflown |
78 overgrow overgrown |
79 overlie overlain |
80 override overridden |
81 overrun overrun |
82 oversee overseen |
83 oversew oversewn |
84 overshake overshaken |
85 overstride overstridden |
86 overtake overtaken |
87 overwear overworn |
88 overwrite overwritten |
89 partake partaken |
90 plead pled |
91 redo redone |
92 redraw redrawn |
93 regrow regrown |
94 rerun rerun |
95 resing resung |
96 retake retaken |
97 retread retrodden |
98 rewrite rewritten |
99 ride ridden |
100 ring rung |
101 rise risen |
102 rive riven |
103 run run |
104 saw sawn |
105 see seen |
106 sew sewn |
107 shake shaken |
108 shave shaven |
109 shear shorn |
110 shine shone |
111 shoe shodden |
112 show shown |
113 shrink shrunk |
114 shrive shriven |
115 sing sung |
116 sink sunk |
117 slay slain |
118 smite smitten |
119 sow sown |
120 speak spoken |
121 spin spun |
122 spit spit |
123 spring sprung |
124 steal stolen |
125 stink stunk |
Chapter 9: Grammatical Forms 70
9/engin.§43. That’s the mandatory participles sorted out; so now we move on to the two additional verb
forms used by English. First, the present form: a curiosity of English is that this is almost always formed as
if it were the plural of the infinitive – thus “touch” becomes “touches”. There are just a handful of exceptions
to this.
hen-trie-present-verb-formi ::=
1 hen-trie-irregular-third-person-presenti |
2 ... hsingular-noun-to-its-plurali
hen-trie-irregular-third-person-presenti ::=
1 be is |
2 have has |
3 do does
Chapter 9: Grammatical Forms 71
9/engin.§44. Second, the past. This is harder. Once again we have a catalogue of Anglo-Saxon past
forms (e.g., he chose, not he chooses); and after those are out of the way, the rules are the same as for the
present participle, except for adding -ed instead of -ing. The tricky part, again, is spotting when to double
the consonant, which again depends on stress.
hen-trie-pasti ::=
1 ... hen-trie-irregular-pasti |
2 ... hen-trie-irregular-compound-pasti |
3 ... hen-trie-regular-a-pasti |
4 ... hen-trie-regular-b-pasti |
5 ... hen-trie-regular-c-pasti
hen-trie-irregular-pasti ::=
1 be was |
2 do did |
3 go went |
4 in 0ned |
5 on 0ned |
6 up 0ped |
7 bet bet |
8 abet 0ted |
9 bid bid |
10 bin 0ned |
11 bit 0ted |
12 buy bought |
13 con 0ned |
14 cop 0ped |
15 cup 0ped |
16 cut cut |
17 den 0ned |
18 dig dug |
19 dit 0ted |
20 div 0ed |
21 don 0ned |
22 eat ate |
23 fet 0ted |
24 fit fitted |
25 fly flew |
26 fur 0red |
27 gar 0red |
28 get got |
29 gin 0ned |
30 had 0ded |
31 hem 0med |
32 hen 0ned |
33 hit hit |
34 ken 0ned |
35 kit 0ted |
36 kon 0ned |
37 lay laid |
38 lek 0ked |
39 let let |
40 let 0ted |
41 lop 0ped |
Chapter 9: Grammatical Forms 72
42 net 0ted |
43 ante 0ed |
44 nye 1ed |
45 pay paid |
46 pen penned |
47 pet 0ted |
48 pie 1ed |
49 put put |
50 ref 0fed |
51 ret 0ted |
52 aret 0ted |
53 rid rid |
54 rit 0ted |
55 run ran |
56 say said |
57 see saw |
58 set set |
59 sin 0ned |
60 sip 0ped |
61 sit sat |
62 sus 0sed |
63 aver 0red |
64 vor 0red |
65 wed wedded |
66 wet wetted |
67 win won |
68 yak 0ked |
69 yok 0ked |
70 baye 1ed |
71 bear bore |
72 beat beat |
73 bend bent |
74 abhor 0red |
75 abide abided |
76 bide bided |
77 bind bound |
78 bite bit |
79 blet 0ted |
80 blow blew |
81 boob 0ed |
82 brut 0ed |
83 burn burnt |
84 cast cast |
85 clop 0ped |
86 come came |
87 deal dealt |
88 dele 1ed |
89 dive dove |
90 drag dragged |
91 draw drew |
92 duet 0ted |
93 fall fell |
94 feed fed |
Chapter 9: Grammatical Forms 73
95 feel felt |
96 find found |
97 flee fled |
98 flop 0ped |
99 fret 0ted |
100 frit 0ted |
101 give gave |
102 grit 0ted |
103 grow grew |
104 hang hung |
105 have had |
106 hear heard |
107 hide hid |
108 hold held |
109 hurt hurt |
110 item 0ed |
111 keep kept |
112 knit knit |
113 know knew |
114 lade laded |
115 lead led |
116 lend lent |
117 aleye 1ed |
118 lose lost |
119 make made |
120 mean meant |
121 meet met |
122 plop 0ped |
123 quad 0ded |
124 quit quit |
125 quod 0ded |
126 read read |
127 redo redid |
128 rend rent |
129 ride rode |
130 ring rang |
131 arise arose |
132 rise rose |
133 rive rove |
134 seek sought |
135 sell sold |
136 send sent |
137 shed shed |
138 shoe shoed |
139 shut shut |
140 sing sang |
141 sink sank |
142 sker 0red |
143 slip slipped |
144 slit slit |
145 slop 0ped |
146 smur 0red |
147 spet 0ted |
Chapter 9: Grammatical Forms 74
14 *hbcdghjlprwiam 0med |
15 *hgltiem 0med |
16 *hdhklnrwiim 0med |
17 *lom 0med |
18 *hbcghlmrstvium 0med |
19 *hbcflmptvwian 0ned |
20 *hryien 0ned |
21 *hdhklprtwiin 0ned |
22 *hfwion 0ned |
23 *hdfghprstiun 0ned |
24 *hcdghjlmnprstwyziap 0ped |
25 *hklprtiep 0ped |
26 *hdhklnprtuyziip 0ped |
27 *hbdhmprstuwiop 0ped |
28 *hdhpstiup 0ped |
29 *yp 0ped |
30 *hbcfhjmnptwiar 0red |
31 *hfhmstiir 0red |
32 *dor 0red |
33 *hbclpiur 0red |
34 *hbgmpvias 0sed |
35 *hmnrsuies 0sed |
36 *hhmpwiis 0sed |
37 *hbcdsios 0sed |
38 *hbclmius 0sed |
39 *hbcfhlmprtuvwiat 0ted |
40 *hghjstvwiet 0ted |
41 *hfhlmnptwiit 0ted |
42 *hbcdhjlnprstwiot 0ted |
43 *hbcghjlmnprtiut 0ted |
44 *heiiv 0ved |
45 *iz 0zed
hen-trie-regular-b-pasti ::=
1 *haeiouic 0ked | magicked
2 * heioy ie 1ed | dried
3 *ey 0ed conveyed
hen-trie-regular-c-pasti ::=
1 *e 1ed |
2 *y 1ied |
3 * 0ed
Chapter 9: Grammatical Forms 83
hpasturise-participlei ::=
1 hen-trie-pasturise-exceptionsi |
2 ... hen-trie-pasturise-regular-yi |
3 ... hen-trie-pasturise-regulari
hen-trie-pasturise-exceptionsi ::=
1 abiding abided |
2 alighting alighted |
3 arising arisen |
4 awaking awakened |
5 backbiting backbitten |
6 backsliding backslidden |
7 bearing born |
8 beating beaten |
9 becoming become |
10 befalling befallen |
11 begeting begotten |
12 begining begun |
13 beholding beheld |
14 bending bent |
15 bereaving bereaved |
16 beseeching besought |
17 besetting beset |
18 bestrewing bestrewn |
19 betting bet |
20 betaking betaken |
21 bethinking bethought |
22 binding bound |
23 biting bitten |
24 bleeding bled |
25 blowing blown |
26 breaking broken |
27 breeding bred |
28 bringing brought |
29 broadcasting broadcast |
30 browbeating browbeaten |
31 building built |
32 burning burned |
33 bursting burst |
34 busting busted |
35 buying bought |
Chapter 9: Grammatical Forms 84
36 casting cast |
37 catching caught |
38 chiding chided |
39 choosing chosen |
40 claping clapped |
41 clinging clung |
42 clothing clothed |
43 coming come |
44 costing cost |
45 creeping crept |
46 crossbreeding crossbred |
47 cutting cut |
48 daring dared |
49 daydreaming daydreamed |
50 dealing dealt |
51 diging dug |
52 dighting dighted |
53 disproving disproved |
54 diving dived |
55 doing done |
56 drawing drawn |
57 dreaming dreamed |
58 drinking drunk |
59 driving driven |
60 dwelling dwelt |
61 eating eaten |
62 enwinding enwound |
63 falling fallen |
64 feeding fed |
65 feeling felt |
66 fighting fought |
67 finding found |
68 fitting fitted |
69 fleeing fled |
70 flinging flung |
71 flying flown |
72 forbearing forborne |
73 forbiding forbidden |
74 fordoing fordone |
75 forecasting forecast |
76 foregoing foregone |
77 foreknowing foreknown |
78 foreruning forerun |
79 foreseeing foreseen |
80 foreshowing foreshown |
81 forespeaking forespoken |
82 foretelling foretold |
83 forgetting forgotten |
84 forgiving forgiven |
85 forsaking forsaken |
86 forswearing forsworn |
87 fraughting fraught |
88 freezing frozen |
Chapter 9: Grammatical Forms 85
89 frostbiting frostbitten |
90 gainsaying gainsaid |
91 getting got |
92 gilding gilded |
93 giving given |
94 going gone |
95 grinding ground |
96 growing grown |
97 halterbreaking halterbroken |
98 hamstringing hamstrung |
99 hand-feeding hand-fed |
100 handwriting handwritten |
101 hanging hung |
102 hearing heard |
103 heaving heaved |
104 hewing hewn |
105 hiding hidden |
106 hitting hit |
107 holding held |
108 hurting hurt |
109 inbreeding inbred |
110 inlaying inlaid |
111 inputing input |
112 insetting inset |
113 interbreeding interbred |
114 intercutting intercut |
115 interlaying interlaid |
116 intersetting interset |
117 interweaving interwoven |
118 interwinding interwound |
119 inweaving inwoven |
120 jerry-building jerry-built |
121 keeping kept |
122 kneeling knelt |
123 knitting knitted |
124 knowing known |
125 lading laden |
126 landsliding landslid |
127 laying laid |
128 leading led |
129 leaning leaned |
130 leaping leaped |
131 learning learned |
132 leaving left |
133 lending lent |
134 letting let |
135 lieing lain |
136 lighting lit |
137 lip-reading lip-read |
138 losing lost |
139 making made |
140 meaning meant |
141 meeting met |
Chapter 9: Grammatical Forms 86
9/engin.§46. English doesn’t inflect adjectives at all (let’s not argue about “blond” and “blonde”), so the
following are just stubs.
hadjective-to-plurali ::=
1 * 0
hadjective-to-masculine-singulari ::=
1 * 0
hadjective-to-feminine-singulari ::=
1 * 0
hadjective-to-masculine-plurali ::=
1 * 0
hadjective-to-feminine-plurali ::=
1 * 0
Chapter 9: Grammatical Forms 93
9/pro.§1. We now define some grammatical basics. These are all very simple, and the user can’t create
new instances of them – whereas the source text can make new adjectives, verbs and nouns, it can’t make
new pronouns.
hpronouni ::=
a hnominative-pronouni |
b haccusative-pronouni
hnominative-pronouni ::=
a it/he/she | singular
b they plural
haccusative-pronouni ::=
a it/him/her | singular
b them plural
9/pro.§2. Inform uses these not only for parsing but also to inflect text. For example, if every person
is given a nose, the player will see it as “my nose” not “your nose”. Inform handles such inflections by
converting a pronoun in one grammar into its corresponding pronoun in another (in this case, first person
to second person).
hpossessive-first-personi ::=
a my | singular
b our plural
hpossessive-second-personi ::=
a your | singular
b your plural
hpossessive-third-personi ::=
a its/his/her | singular
b their plural
9/pro.§3. Relative clauses (“a woman who is on the stage”) are detected by the presence of a marker word
before the verb (in this example, “who”). Of course, such a word doesn’t always mean we have a relative
clause, so we will need to be a little careful using this nonterminal.
hrelative-clause-markeri ::=
a which/who/that
9/pro.§4.
harticlei ::=
a hindefinite-articlei |
b hdefinite-articlei
Chapter 9: Grammatical Forms 94
9/pro.§5. The articles need to be single words, and the following two productions have an unusual con-
vention: they are required to have production numbers which encode both the implied grammatical number
and gender.
(a) singular, neuter; (b) masculine; (c) feminine
(d) plural, neuter; (e) masculine; (f) feminine
In English gender doesn’t appear in articles, and “the” is ambiguous as to number in any case, so we end
up with something quite dull:
hdefinite-articlei ::=
a /a/ the
hindefinite-articlei ::=
a /a/ a/an |
b /d/ some
9/pro.§6. These are useful for stripping optional articles from text:
hoptional-definite-articlei ::=
a hdefinite-articlei ... |
b ...
hoptional-articlei ::=
a harticlei ... |
b ...
9/pro.§8. Inform guesses that most English words ending in “-ing” are present participles – like guess-
ing, bluffing, cheating, and so on. But there is a conspicuous exception to this; so any word found in
hnon-participlesi is never treated as a participle.
hnon-participlesi ::=
a thing/something
hprobable-participlei internal
9/pro.§9.
hnegated-clausei ::=
a not ...
Chapter 9: Grammatical Forms 95
9/det.§8. Inform supports a built-in set of sixteen generalised quantifiers, in logical terms, and English
maps onto these with a rather less elegantly structured set of twenty wordings. One of these doesn’t appear
below because it’s empty of text: this is the determiner in “three blind mice”, where no text appears in front
of the number “three”.
hdeterminer-namesi ::=
a all |
b each |
c every |
d no |
e none |
f some |
g all but |
h all except |
i almost all |
j almost no |
k most |
l under half |
m at least |
n at most |
o exactly |
p fewer than |
q less than |
r more than |
s other than
9/det.§10. We look for a determiner at the start of a noun phrase; this can sometimes be followed by a
number. For example,
More than three doors
matches “more than” from the selection above, then the number “three”. It’s legal to include “of the”:
three of the doors are open
but not “of” on its own: this reduces misunderstandings when objects have names like “three of clubs”,
meaning a single playing card.
hdetermination-ofi ::=
a of the ... |
b of ... | ! fail
c ...
9/det.§11. English has an awkward ambiguity here: what does this mean?
no one
Inform would normally read this as the determiner “no” followed by the number “one”, not realising that
“one” is more likely to refer to a kind (i.e., people and not things) rather than counting something. We want
to stop this reading, so that we can read “no one” as if it were “nobody”.
The following grammar is provided to list noun phrases which will be immune from determiner parsing:
hexcluded-from-determinersi ::=
a no one ***
Chapter 9: Grammatical Forms 96
9/bp.§16. A useful little nonterminal to spot the names of relation, such as “adjacency”. (Note: not
“adjacency relation”.) This is only used when there is good reason to suspect that the word in question is
the name of a relation, so the fact that it runs relatively slowly does not matter.
hrelation-namei internal
Chapter 9: Grammatical Forms 97
9/rel.§2. These are the English names of the built-in relations. The use of hyphenation here is a fossil
from the times when Inform allowed only single-word relation names; but it doesn’t seem worth changing,
especially as the hyphenated relations are almost never needed for anything. All the same, translators into
other languages may as well drop the hyphens.
hrelation-namesi ::=
a equality |
b universal |
c provision |
d numerically-greater-than-or-equal-to |
e numerically-greater-than |
f numerically-less-than-or-equal-to |
g numerically-less-than |
h adjacency |
i regional-containment |
j containment |
k support |
l incorporation |
m carrying |
n holding |
o wearing |
p possession |
q visibility |
r touchability |
s concealment |
t enclosure
9/rel.§4. The following grammar is used to parse the subject noun phrase of sentences like
Acquaintance relates people to each other.
Since the point is to create something new, the only stipulation is that the text of the subject mustn’t be
an existing relation name.
hrelates-sentence-subjecti ::=
a hrelation-namei | ! C9RelationExists
b ...
Chapter 9: Grammatical Forms 98
9/rel.§8. The following grammar is used to parse the declaration of new relations in sentences like
Acquaintance relates people to each other.
In such a sentence, we’ll call “people” the left object noun phrase and “each other” the right object noun
phrase. The way hrelation-term-basici is written below, it seems to match any text, but that’s just an imple-
mentation convenience; the ... text will eventually have to match hk-kindi and thus to be the name of a
kind, possibly in the plural.
hrelates-sentence-left-objecti ::=
a hrelation-term-basici ( called ... ) |
b hrelation-term-basici
hrelates-sentence-right-objecti ::=
a hrelation-term-right-namedi with fast route-finding |
b hrelation-term-right-namedi when ... |
c hrelation-term-right-namedi
hrelation-term-right-namedi ::=
a hrelation-term-righti ( called ... ) |
b hrelation-term-righti
hrelation-term-righti ::=
a {another} |
b {each other} |
c {each other in groups} |
d hrelation-term-basici
hrelation-term-basici ::=
a one ... |
b various ... |
c ...
Chapter 9: Grammatical Forms 99
9/conj.§9. We now define a whole run of internals to parse verbs, used in any of their tenses. All of these
are special cases of hgeneral-verbi: that is, they all do exactly the same thing, but for limited subsets of the
possible verbs. As examples,
is
has not been
was carried by
are all, in the sense we mean it here, “verbs”. The verbs allowed are mostly those defined by declaration
sentences like
The verb to handle ...
but see below for exceptions, and of course there are many verb declarations like this in the Standard Rules,
so it looks to the author if a whole pile of verbs is built in.
We never match a verb if it is unexpectedly given in upper case form. Thus “The Glory That Is Rome is
a room” will be read as “(The Glory That Is Rome) is (a room)”, not “(The Glory That) is (Rome is a
room)”.
hgeneral-verbi internal
9/conj.§10. And this is the same but restricted to present tense, positive sense, so “carries” or “is sup-
ported by”, for instance, but not “was able to see” or “does not have”.
hgeneral-verb-present-positivei internal
9/conj.§11. And now for verbs in languages other than the source text language.
hforeign-verb-present-positivei internal
9/conj.§12. A copular verb is one which implies the equality relation: in practice, that means it’s “to be”.
So the following matches “is”, “were not”, and so on.
hcopular-verbi internal
9/conj.§13. And this is the same but restricted to present tense, positive sense, which means it’s more or
less just “is” or “are”.
hcopular-verb-present-positivei internal
9/conj.§14. A noncopular verb is anything that isn’t copular, but we also require it to be in the present
tense and the negative sense. So, for example, “does not carry” qualifies; “is not” or “supports” don’t qualify.
hnegated-noncopular-verb-presenti internal
Chapter 9: Grammatical Forms 100
9/conj.§15. A universal verb is one which implies the universal relation: in practice, that means it’s “to
relate”.
huniversal-verbi internal
9/conj.§16. A possession verb is one which implies the possession relation: in practice, that means it’s “to
have”. But this nonterminal also requires us to use it in the present tense and the positive sense, so “had”
or “does not have” won’t match.
hpossession-verb-present-positivei internal
9/conj.§17. Any verb usage which is negative in sense: this is used to diagnose problems.
hnegated-verbi internal
9/conj.§18. Any verb usage which is in the past tense: this is used to diagnose problems.
hpast-tense-verbi internal
9/conj.§20. Prepositions are simpler to parse because they lack tense and negation.
hprepositioni internal
hpreposition-implying-playeri internal
9/conj.§24. Note that numerical comparisons are handled by two methods. Verbally, they are prepositions:
“less than”, for instance, is combined with “to be”, giving us “A is less than B” and similar forms. These
wordy forms are therefore defined as prepositional usages and created as such in the Standard Rules. But
we also permit the use of the familiar mathematical symbols <, >, <= and >=. Inform treats these as verbs
without tense, so registers them as verb usages, but without the full conjugation given to a conventional
verb; and they are also excluded from the lexicon in the Phrasebook index, being notation rather than words.
(This is why the variable current_main_verb is cleared.)
hinequality-conjugationsi ::=
a < | implies the numerically-less-than relation
b > | implies the numerically-greater-than relation
c <= | implies the numerically-less-than-or-equal-to relation
d >= implies the numerically-greater-than-or-equal-to relation
Chapter 9: Grammatical Forms 101
9/conj.§28. When the source text creates a measurement adjective, such as:
A man is tall if his height is 6 feet or more.
Inform also creates a comparative form of the adjective as a preposition:
hcomparative-property-constructioni ::=
a ... than Peter is taller than Claude
9/conj.§29. And when Inform creates a value property, that also makes a preposition:
hsame-property-as-constructioni ::=
a the same ... as if Peter is the same height as Claude
9/conj.§30. It would be annoying to the reader to file all of those “same P as” prepositions in the Lexicon,
so we just file the following entry to stand for all of them:
hsame-property-as-in-lexiconi ::=
a the same property as
hverb-implies-sentence-subjecti ::=
a hinfinitive-usagei ( ... ) |
b hinfinitive-usagei
hinfinitive-usagei ::=
a hinfinitive-usage-exceptionali |
b ...
hinfinitive-usage-exceptionali ::=
a {be able to ...} |
b {be able to} |
c be ...
9/conj.§33. The text in brackets, if given, is a comma-separated list of conjugations of the verb. Each
one is matched against this:
hconjugationi ::=
a hnominative-pronouni is/are ... |
b hnominative-pronouni ...
Chapter 9: Grammatical Forms 102
9/conj.§34. This syntax was a design mistake. It generalises badly to other languages, and doesn’t even
work perfectly for English. The problem is that the source text is allowed to give only a selection of the
parts of the verb, and Inform has to guess which parts. So how does it distinguish “X is suspected” from
“X is suspecting”? It needs to know which is the present participle, and it does this by looking for an -ing
ending on either the first or last word. The following nonterminal matches for that.
hparticiple-likei ::=
a hprobable-participlei *** |
b *** hprobable-participlei
9/conj.§35. And now for the object noun phrase in the sentence.
The use of ... property perhaps looks odd. What happens if the user typed
The verb to be mystified by implies the arfle barfle gloop property.
when there is no property of that name? The answer is that we can’t check this at the time we’re parsing
this sentence, because verb definitions are read long before properties come into existence. The check will
be made later on, and for now absolutely any non-empty word range is accepted as the property name.
hverb-implies-sentence-objecti ::=
a reversed hrelation-namei relation |
b hrelation-namei relation |
c to be hprepositioni |
d to hverb-infinitivei |
e ... property |
f ... relation | ! C9VerbRelationUnknown
g {relation} | ! C9VerbRelationVague
h ... ! C9VerbUnknownMeaning
9/conj.§60.
hadaptive-verbi internal
hverb-infinitivei internal
Chapter 9: Grammatical Forms 103
9/aph.§1.
hadjective-namei internal
9/aph.§53.
hadaptive-adjectivei internal
Chapter 10: Nouns I 104
10/litp.§64. The following grammar is used to parse the new literal patterns defined in a “specifies”
sentence.
1 tonne (in metric units, in tonnes, singular) or 2 tonnes (in metric units, in tonnes, plural) specifies a
mass scaled up by 1000.
The subject nounphrase has already been converted into a list of alternatives, divided by “or”, and the
following grammar removes the optional list of groups to which the notation begins. So, for example,
hspecifies-sentence-subjecti is used on “1 tonne (in metric units, in tonnes, singular)”. “In metric units” and
“in tonnes” are names for groups of literal patterns; note that in English, these names always begin with
“in”.
However, note that a “specifies” sentence can also be used for a quite di↵erent purpose:
A length times a length specifies an area.
This gives dimensional instructions about kinds, and doesn’t have anything to do with literals and their
notation. It’s a slightly unhappy ambiguity, but the potential for confusion is very low. Nobody who defines
a literal pattern with the word “times” in can expect good results anyway, given that “times” will usually
be interpreted as multiplication when Inform eventually parses such a literal. Still, to minimise clashes, we
respond to “times” here only when there is meaningful text on either side of it.
Formally, the subject noun phrase of a “specifies” sentence must be a list of alternatives each of which
matches the following:
hspecifies-sentence-subjecti ::=
a ... ( {hliteral-pattern-group-listi} ) |
b hk-kind-articledi times hk-kind-articledi |
c hspec-type-expressioni times hspec-type-expressioni | ! C10MultiplyingNonKOVs
d ...
hliteral-pattern-group-listi ::=
a hliteral-pattern-groupi hliteral-pattern-group-list-taili |
b hliteral-pattern-groupi
hliteral-pattern-group-list-taili ::=
a , and hliteral-pattern-group-listi |
b ,/and hliteral-pattern-group-listi
hliteral-pattern-groupi ::=
a singular |
b plural |
c hliteral-pattern-group-namei |
d in ...... |
e ...... ! C10BadLPNameOption
Chapter 10: Nouns I 105
10/litp.§69. The object noun phrase of a “specifies” sentence is required to match the following grammar.
Note that the tails are mutually exclusive; you can’t set both scaling and an equivalent, for instance.
hspecifies-sentence-objecti ::=
a hkind-specifiedi hliteral-pattern-specification-taili |
b hkind-specifiedi
hkind-specifiedi ::=
a hk-kind-articledi |
b ... ! C10LPNotKOV
hliteral-pattern-specification-taili ::=
a with parts hliteral-pattern-part-listi |
b hscaling-instructioni |
c hscaling-instructioni offset by hliterali |
d offset by hliterali |
e equivalent to hliterali
hscaling-instructioni ::=
a scaled up by hcardinal-numberi |
b scaled down by hcardinal-numberi |
c scaled at hcardinal-numberi
10/litp.§71. Of the optional tails, the only tricky one is the part list, which has the following rather
extensive grammar. This handles text like:
dollars and cents (optional, preamble optional)
The text is a list of part-names, each of which can optionally be followed by a bracketed list of up to three
options in any order.
hliteral-pattern-part-listi ::=
a hliteral-pattern-parti hliteral-pattern-part-list-taili |
b hliteral-pattern-parti
hliteral-pattern-part-list-taili ::=
a , and hliteral-pattern-part-listi |
b ,/and hliteral-pattern-part-listi
hliteral-pattern-parti ::=
a hnp-balancedi ( hliteral-pattern-part-option-listi ) |
b hnp-balancedi
hliteral-pattern-part-option-listi ::=
a hliteral-pattern-part-optioni hliteral-pattern-part-option-list-taili |
b hliteral-pattern-part-optioni
hliteral-pattern-part-option-list-taili ::=
a , and hliteral-pattern-part-option-listi |
b ,/and hliteral-pattern-part-option-listi
hliteral-pattern-part-optioni ::=
a optional |
b preamble optional |
c without leading zeros |
d ...... ! C10BadLPPartOption
10/litp.§84. Group names are created when first seen (in production (d) of hliteral-pattern-groupi): the
following recognises one which has been seen before.
hliteral-pattern-group-namei internal
Chapter 10: Nouns I 106
10/today.§4. Although they are eventually stored in variables of the same kind (“time”), relative and
absolute times are parsed di↵erently – they really are not linguistically the same thing at all.
hliteral-timei ::=
a minus helapsed-timei |
b helapsed-timei |
c hclock-timei
helapsed-timei ::=
a hcardinal-numberi hour/hours |
b hcardinal-numberi minute/minutes |
c hcardinal-numberi hour/hours hcardinal-numberi minute/minutes
hclock-timei ::=
a hcardinal-numberi ham-pmi |
b hdigital-clock-timei ham-pmi
ham-pmi ::=
a am |
b pm
10/today.§6. These are times of day written in the style of a digital clock: “00:00”, “5:21”, “17:21”. The
syntax must be one or two digits, followed by a colon, followed by exactly two digits; it is permissible for
the first of two digits to be zero; when that is discarded, the hours part must be in the range 0 to 23, and
the minutes part in the range 0 to 59.
hdigital-clock-timei internal
10/today.§7. And these are the Continental equivalent, with an “h” instead of the colon: thus “16h15”
for quarter past four in the afternoon. (The standard English grammar doesn’t use this, but translators
might want to.)
hcontinental-clock-timei internal
10/today.§8. The following is used to parse the preamble to rules which take place at a specific time of
day, or when a named event occurs.
hevent-rule-preamblei ::=
a at hclock-timei |
b at the time when ... |
c at ... ! C10AtWithoutTime
Chapter 10: Nouns I 107
10/unitr.§2. The following parses the subject noun phrase of sentences like
leftwards harpoon with barb upwards translates into Unicode as 8636.
The subject “leftwards harpoon with barb upwards” is parsed against the Unicode character names known
already to make sure that this new translation doesn’t disagree with an existing one (that is, doesn’t translate
to a di↵erent code number).
htranslates-into-unicode-sentence-subjecti ::=
a hunicode-character-namei |
b ...
10/unitr.§3. And this parses the object noun phrase of such sentences – a decimal number. I was tempted
to allow hexadecimal here, but life’s too short. Unicode translation sentences are really only technicalities
needed by the built-in extensions anyway; Inform authors never type them.
htranslates-into-unicode-sentence-objecti ::=
a hcardinal-number-unlimitedi |
b ... ! C10UnicodeNonLiteral
10/unitr.§5. The following is called only on excerpts from the source where it is a fairly safe bet that a
Unicode character is referred to. For example, when the player types either of these:
”[unicode 321]odz Churchyard”
”[unicode Latin capital letter L with stroke]odz Churchyard”
...then the text after the word “unicode” is parsed by hunicode-characteri.
hunicode-characteri ::=
a hcardinal-number-unlimitedi |
b hunicode-character-namei
hunicode-character-namei internal
Chapter 11: Nouns II 108
11/ntags.§13.
define TRANS_KIND 1
define TRANS_INSTANCE 2
htranslates-into-nl-sentence-subjecti ::=
a hk-kindi |
b hinstancei
Chapter 11: Nouns II 109
11/inst.§15. The first internal matches only instances of kinds within the objects; the second matches all
instances, of whatever kind.
hinstance-of-objecti internal
hinstancei internal
Chapter 12: The S-Parser 110
12/arch.§1. We now begin the S-grammar. This is the largest subset of Inform’s grammar, and it handles
all of the text used in phrases. Nonterminals almost all have names beginning with the “s-” prefix. Strictly
speaking this means that the internal result of the nonterminal is a “meaning list”, but it’s also a useful
mnemonic to identify the grammar used in phrases.
We will start at the bottom of the S-parser and work upwards, that is, we start at simple noun phrases and
work up to complex sentence structure.
The simplest nonterminal in the S-grammar is hs-plain-texti, which accepts any non-empty piece of text. (The
same can be said exactly of hnounphrasei, and the di↵erence is purely to do with how Inform stores the results:
hnounphrasei makes nodes in the main parse tree, a rather permanent structure, whereas hs-plain-texti makes
an entry in a meaning list of possible interpretations of text.)
hs-plain-texti internal
12/arch.§3. And here is a curious variation, which is needed because equations are parsed with completely
di↵erent spacing rules, and don’t respect words. It matches any non-empty text where one of the words
contains an equals sign as one of its characters: thus
V = fl
F=ma
both match this, the first example being three words long, the second only one.
hs-plain-text-with-equalsi internal
Chapter 12: The S-Parser 111
12/lit.§1. Most of this section of code defines hliterali, the nonterminal which matches any literal constant.
Literal values are explicitly written-out constants such as “false”, “182” or “4:33 PM”. Names of objects,
rules, and so on, are also constants, but aren’t literal in our sense. In a natural language, the distinction is
a little blurry, but it’s still grammatically useful.
The S-parser uses this through an intermediate step called hs-literali, which wraps up the results of hliterali
into a meaning list, for the benefit of the rest of the S-parser; this conversion step is what the following
achieves.
hs-literali ::=
a hliterali
12/lit.§4. As can be seen: literals are numbers, text in quotation marks, the two truth states, Unicode
characters, times of day, and then anything which has been defined as a literal with a “specifies” sentence
(“25 kg specifies a weight”, say).
Note that ordinal numbers are not valid as literals: “2nd” is not a noun.
hliterali ::=
a hcardinal-numberi |
b minus hcardinal-numberi |
c hquoted-texti ( hresponse-letteri ) |
d hquoted-texti |
e hliteral-truth-statei |
f hliteral-listi |
g unicode hunicode-characteri |
h hliteral-timei | times plugin
i hliteral-unit-notationi
hliteral-unit-notationi internal
12/lit.§5. We read a few low numbers in text, but larger numbers only in digits. Textual numbers run
from 0 to 12 since that’s what clocks need.
By a cardinal we mean a number such as five or 351.
hcardinal-number-in-wordsi ::=
a zero |
b one |
c two |
d three |
e four |
f five |
g six |
h seven |
i eight |
j nine |
k ten |
l eleven |
m twelve
Chapter 12: The S-Parser 112
hordinal-number-in-wordsi ::=
a zeroth |
b first |
c second |
d third |
e fourth |
f fifth |
g sixth |
h seventh |
i eighth |
j ninth |
k tenth |
l eleventh |
m twelfth
12/lit.§8. These two internals parse a single word to see if it’s a number literal: either one of the named
cases above, or a number written out in decimal digits, perhaps with a minus sign. They won’t match any
number too large to fit into the current virtual machine, so “42000”, for instance, is not a valid literal if the
current VM setting is for the Z-machine.
hcardinal-numberi internal
hordinal-numberi internal
12/lit.§9. A small variation which lifts this restriction on the number range:
hcardinal-number-unlimitedi internal
12/lit.§11. As far as we are concerned here, double-quoted strings of text are literals whose kind is “text”.
Higher up in Inform, they are sometimes reinterpreted as “understanding” (grammar to match in the player’s
command), but that’s invisible to us.
hquoted-texti internal
hquoted-text-with-subsi internal
hquoted-text-without-subsi internal
12/lit.§12. For finicky technical reasons the easiest way to detect an empty piece of text "" is to provide
a nonterminal matching it:
hempty-texti internal
12/lit.§13. Response letters mark certain texts as responses. These are capital letters A to Z.
hresponse-letteri internal
12/lit.§14. It might seem odd that the truth states count as literals, whereas names of instances of other
kinds (people, say) do not. The argument for this is that there are always necessarily exactly two truth
states, whereas there could in principle be any number of people, colours, vehicles, and such.
hliteral-truth-statei ::=
a false |
b true
Chapter 12: The S-Parser 113
12/candd.§1. As we’ve seen, not all of the names Inform knows are literals. The following nonterminal
covers constants in general, a wider category.
The word “nothing” needs special treatment later on. Sometimes it means the dummy value “not an object”,
and is genuinely a constant value; but at other times it behaves more like a determiner, as in “if nothing is
on the table”. For now, though, we treat it as a noun.
hs-constant-valuei ::=
a hs-literali |
b nothing |
c hs-miscellaneous-proper-nouni |
d hs-rulebook-outcome-namei outcome |
e hs-use-option-namei option |
f hs-rule-namei response ( hresponse-letteri )
12/candd.§4. To be a little less vague, the “miscellaneous proper nouns” are: rule and rulebook names;
action names, as nouns; relation names; instances of kinds; activity names; table names; equation names;
and names of phrases being used as nouns for functional-programming purposes.
hs-miscellaneous-proper-nouni internal
12/candd.§5. There’s actually nothing special about rulebook outcome names or use option names; but
because they are stored internally without the compulsory words “outcome” and “option”, they need non-
terminals of their own.
hs-rulebook-outcome-namei internal
hs-use-option-namei internal
hs-rule-namei internal
12/candd.§6. We will also sometimes need a nonterminal which can only produce table column names,
and similarly for property names. These don’t fall under “miscellaneous proper nouns” above, and they
aren’t in general valid as constants.
hs-table-column-namei internal
12/candd.§7. In order to resolve a subtle distinction of usage later on, we want not only to parse a
property name but also to record whether it was used in the explicit syntax (“the property open” rather
than “open”, say). The internal hs-property-namei uses hproperty-name-as-noun-phrasei to do this.
hproperty-name-as-noun-phrasei ::=
a hdefinite-articlei hproperty-name-constructioni |
b hproperty-name-constructioni
hs-property-namei internal
Chapter 12: The S-Parser 114
12/candd.§8. “I first tried to write a story when I was about seven. It was about a dragon. I remember
nothing about it except a philological fact. My mother said nothing about the dragon, but pointed out
that one could not say “a green great dragon”, but had to say “a great green dragon”. I wondered why,
and still do” (Tolkien to Auden, 1955). We are going to allow lists of adjectives such as “green great” or
“great green” in any order: although some have suggested conceptual hierarchies for adjectives (e.g., that
size always precedes material) these are too tendentious to enforce.
The first nonterminal looks quite unnecessary; but it takes the result of parsing an adjective list and trans-
forms the result to make it a description (even though there is no actual noun). Inform has to work hard at
this sort of thing, mostly because of deficiencies in English to do with words like “scenery” and “clothing”
which can’t be used as count nouns even though, logically, they should be. Inform implements them adjec-
tivally, but this means that “scenery” – an adjective list with one entry – is sometimes a description on a
par with “door” – a common noun. In e↵ect, “scenery” is read as if it were “scenery thing”.
hs-adjective-list-as-desci ::=
a hs-adjective-listi
12/candd.§9. So now we test whether an excerpt is a list of adjectives; for example, this matches
exciting transparent green fixed in place
as a list of four adjectives.
Perhaps surprisingly, the word “not” is allowed in such lists. Since this looks as if it negates the verb, it
ought to belong to the verb phrase, and surely doesn’t belong to the grammar of nouns and their adjectives.
But there are several problems with that analysis. Firstly, English does strange things with the placing of
“not”:
The blue door is open and not transparent.
A door is usually not open.
Note that neither of these sentences places “not” adjacent to the verb, so if we’re going to say it’s part of
the verb phrase then this has to be a non-contiguous sequence of words able to grab material from possibly
distant NPs. This isn’t easy to go along with. Secondly, we also want to provide a way to write the negation
of an adjective. For instance,
exciting not transparent fixed in place
is valid. Though in this case it would be equivalent to write “opaque” in place of “not transparent”, some
adjectives do not have named negations.
The grammar for adjective lists also allows the presence of an indefinite article, less controversially, but
that then leads to an interesting and very arcane de Morgan-law-like point, a↵ecting only a tiny number of
assertion sentences. If we write:
a not great green dragon
Inform considers that “not” applies only to “great”; the dragon is still to be green. But if we write
not a great green dragon
then Inform requires it to be neither great nor green. It’s terrible style to write this sort of thing as a
description outside of a condition like the following:
if Smaug is not a great green dragon, ...
and conditions like this are parsed with “is not” as the verb and “great green dragon” as the description,
with the adjective list being just “great green”. So this awkward point about “not a...” only comes in when
writing assertion sentences like:
A hairless chimp is not a hairy animal.
Chapter 12: The S-Parser 115
(This was submitted as a bug report.) In assertions, Inform has to know for definite what the truth is, so it
can’t a↵ord to read this as saying that the chimp is either not hairy or not an animal.
hs-adjective-listi ::=
a not hindefinite-articlei hs-adjective-list-unarticledi |
b hindefinite-articlei hs-adjective-list-unarticledi |
c hs-adjective-list-unarticledi
hs-adjective-list-unarticledi ::=
a not hs-adjectivei |
b hs-adjectivei |
c not hs-adjectivei hs-adjective-list-unarticledi |
d hs-adjectivei hs-adjective-list-unarticledi
12/candd.§10. That reduces us to an internal nonterminal, which matches the longest possible adjective
name it can see.
hs-adjectivei internal
12/candd.§14. When they appear in descriptions, these adjectives serve as “qualifiers”: they qualify their
nouns. For example, “open door” consists of “open”, a qualifier, followed by “door”, a noun.
Not every value known to Inform can be qualified as a noun: in fact, very few can be. This prevents us from
writing “even 3”, that is, the number 3 as a noun qualified by the adjective “even”; doctrinally, Inform takes
the line that adjectives applied to values like 3 will never vary in their applicability – 3 is always odd – so
that it makes no sense to test for them with conditions like
if N is an even 3, ...
hs-qualifiable-nouni ::=
a hk-kindi |
b hs-instance-namei
12/candd.§15. hs-instance-namei parses text exactly as if it were hinstance-of-objecti, but is just a little faster
written as an internal like this.
hs-instance-namei internal
12/candd.§16. The following is used only in combination with a qualifiable noun: it simply provides a
filter on hs-adjective-listi to require that each adjective listed must be one which applies to the noun. For
example, “empty room” won’t be parsed as “empty” qualifying “room” because (perhaps curiously) the
Standard Rules don’t define “empty” for rooms; whereas “empty rulebook” will work.
hs-applicable-adjective-listi ::=
a hs-adjective-listi
Chapter 12: The S-Parser 116
12/candd.§17. In most programming languages, commands are like imperative verbs, but their noun
phrases are specific. print X, say, prints an unambiguously determined quantity X. Sometimes wildcards are
allowed, as when the Unix shell allows ls *.txt to list all text files in the current directory. Inform goes
further, and – in some circumstances at least – permits the X to be a more or less vague description of a
collection of values, such that only at run-time can it be determined what values X refers to.
It might look as if a description is a generalisation of a value: that is, every value is a description. In fact,
that isn’t true, because the noun part of a description has to be “qualifiable” in the sense above: so “100”,
for instance, is a value but not a description.
Grammatically, a description is a sequence of the following five elements, some of which are optional:
(a) specifier, which will be a determiner and/or an article (optional);
(b) qualifier, which for Inform means adjectives of the various kinds described above (optional);
(c) qualifiable noun (sometimes optional, sometimes compulsory); and
(d) subordinate clause, such as “in ...” or “which are on ...” (optional).
For the most part the sequence must be (a), (b), (c), (d), as in:
six of the / open / containers / in the Attic
but the composite words made up from quantifiers and kinds – something, anywhere, everybody, and such
– force us to make an exception to this:
something / open / in the Attic
which takes the sequence (a) and (c), (b), (d). We will call words like “something” and “everywhere”
specifying nouns, since they are both noun and specifier in one.
Simpler readings beat more complicated ones. Thus we won’t match a subordinate clause if there’s a way
to read the text which doesn’t need to; and similarly for specifiers.
In the grammar for hs-descriptioni, the noun is compulsory.
hs-descriptioni ::=
a hs-description-uncompositei |
b hs-np-with-relative-clausei
hs-description-uncompositei ::=
a hs-description-uncalledi ( called hs-calling-namei ) |
b hs-description-uncalledi
hs-description-uncalledi ::=
a hs-specifieri hs-description-unspecifiedi |
b hs-specifying-nouni |
c hs-specifying-nouni hs-adjective-listi |
d harticlei hs-description-unspecifiedi |
e hs-description-unspecifiedi
hs-description-unspecifiedi ::=
a hs-qualifiable-nouni |
b hs-applicable-adjective-listi hs-qualifiable-nouni
Chapter 12: The S-Parser 117
12/candd.§18. The grammar for hs-description-nounlessi is almost exactly the same except that the noun
is optional. The only di↵erence is right at the bottom.
hs-description-nounlessi ::=
a hs-description-nounless-uncompositei |
b hs-np-with-relative-clausei
hs-description-nounless-uncompositei ::=
a hs-description-nounless-uncalledi ( called hs-calling-namei ) |
b hs-description-nounless-uncalledi
hs-description-nounless-uncalledi ::=
a hs-specifieri hs-description-nounless-unspecifiedi |
b hs-specifying-nouni |
c hs-specifying-nouni hs-adjective-listi |
d harticlei hs-description-nounless-unspecifiedi |
e hs-description-nounless-unspecifiedi
hs-description-nounless-unspecifiedi ::=
a hs-qualifiable-nouni |
b hs-applicable-adjective-listi hs-qualifiable-nouni |
c hs-adjective-listi
hs-calling-namei ::=
a harticlei ... |
b ...
12/candd.§23. The following is written as an internal, voracious nonterminal for speed. It matches text
like
all
six of the
most
and so on. Note that an article can follow a determiner, as in “six of the people”, where “six of” is a
determiner. At this point we don’t need to notice whether the article is definite or not, and we’re similarly
turning a blind eye to singular vs plural.
hs-specifieri internal
12/candd.§24. Similarly, this nonterminal matches specifying nouns like “somebody” or “everywhere”.
Doctrinally, “something” is not taken to refer explicitly to the kind “thing”, whereas “somebody” does refer
to people and “everywhere” to places: English is slippery on this.
hs-specifying-nouni internal
Chapter 12: The S-Parser 118
12/candd.§27. In inline phrase definitions, as written in the Standard Rules but more or less nowhere
else, it’s legal to use some special non-kind types as tokens. For example, the Standard Rules say:
To if (c - condition) , (ph - phrase)
and neither “condition” nor “phrase” is a kind; they simply describe globs of words with particular meanings
to Inform, rather than describing values. The following nonterminal matches them. Because it’s legal to
write kinds in brackets for clarity, the same is true here, though it’s hard to see anyone ever needing to.
hs-nonkind-typei ::=
a ( hs-nonkind-typei ) |
b hs-nonkind-type-unbracketedi
hs-nonkind-type-unbracketedi internal
Chapter 12: The S-Parser 119
12/tandv.§1. A “type expression” specifies what sort of excerpt of text should appear in a given context.
Sometimes it asks for a particular value, sometimes any value matching a given description, and sometimes
it asks for something which isn’t a value at all (such as a “nonexisting variable”).
This is a concept which does not exist for conventional programming languages, which would see it as a sort
of half-way position between “value” and “type”. In particular, a “type expression” is used to lay out what
a parameter in a phrase definition should be, though it has other uses elsewhere. That certainly includes
cases which traditional programming languages would call types, so
To adjust (X - closed door) by (N - number): ...
includes two type expressions, “closed door” and “number”. But a type expression can also be a constant,
which languages like C (for instance) would consider a value and not a type at all:
To adjust (X - closed door) by (N - 11): ...
gives a definition to be used only where the second parameter evaluates to 11. In this way any constant
value is regarded as being a type – the narrow type representing only its own value.
hs-type-expressioni ::=
a harticlei hs-type-expression-unarticledi |
b hs-type-expression-unarticledi
hs-type-expression-unarticledi ::=
a hs-variable-scopei variable/variables |
b hs-variable-scopei that/which vary/varies |
c hs-nonkind-typei |
d hk-kindi |
e hs-literali |
f hs-descriptioni |
g hs-constant-valuei
12/tandv.§2. Note that a list of adjectives with no noun does not qualify as a type expression. It looks
as if it never should, on the face of it – “opaque” does not make clear what kind of object is to be opaque –
but once again we are up against the problem that Inform needs to allow some slightly noun-like adjectives.
For instance, this:
To adjust (X - scenery): ...
is allowed even though “scenery” is an adjective in Inform.
To allow this, we have a minor variation:
hs-descriptive-type-expressioni ::=
a harticlei hs-descriptive-type-expression-unarticledi |
b hs-descriptive-type-expression-unarticledi
hs-descriptive-type-expression-unarticledi ::=
a hs-adjective-list-as-desci |
b hs-type-expression-unarticledi
Chapter 12: The S-Parser 120
12/tandv.§3. And now we parse descriptions of variables such as the one appearing in
To repeat with (loopvar - nonexisting object variable)
where hs-variable-scopei matches “nonexisting object”.
Note that these forms recurse, so that syntactically we allow “T that varies” for any type expression T.
This would include contradictions in terms such as “15 that varies” or “number that varies that varies that
varies”, but we want to allow the parse here so that a problem message can be issued higher up in Inform.
Ultimately, the text must match hk-kindi in each case.
hs-variable-scopei ::=
a existing |
b existing hs-type-expressioni |
c nonexisting |
d nonexisting hs-type-expressioni |
e global |
f global hs-type-expressioni |
g hs-type-expressioni
12/tandv.§5. That’s it for type expressions, and we move on to values. There are three special circum-
stances in which we parse di↵erently: while we could write variant grammars for these situations, they would
be very large and almost identical to hs-valuei anyway, so instead we simply use hs-valuei.
The following matches only if we are in an equation written out in the phrase: for example,
let V be given by V = fl;
As mentioned earlier, this changes our conventions on word-breaking.
hif-let-equation-modei internal
12/tandv.§6. Next, we are sometimes in a situation where a local variable exists which can be referred to
by a pronoun like “it”; if so, we will enable the use of possessives like “its” to refer to properties.
hif-pronoun-presenti internal
12/tandv.§7. The other possible context is where we are expecting a table column. This enables us to
resolve ambiguities in a helpful way, but otherwise changes little.
hif-table-column-expectedi internal
Chapter 12: The S-Parser 121
hs-valuei ::=
a ( hs-valuei ) |
b hs-variablei |
c hs-constant-valuei |
d hs-valuei where hs-plain-texti |
e hif-let-equation-modei hs-plain-text-with-equalsi |
f hs-property-namei |
g hif-table-column-expectedi hs-table-column-namei |
h hs-action-pattern-as-valuei |
i hs-value-phrase-non-ofi |
j hs-adjective-list-as-desci |
k hs-purely-physical-descriptioni |
l hs-table-referencei |
m member/members of hs-descriptioni |
n member/members of hs-local-variablei |
o hs-property-namei of hs-valuei |
p hif-pronoun-presenti hpossessive-third-personi hs-property-namei |
q entry hs-valuei of/in/from hs-valuei |
r hs-descriptioni |
s hs-table-column-namei |
t hs-value-phrasei
Chapter 12: The S-Parser 122
12/tandv.§12. Internally there are three sources of these: locals, defined by “let” or “repeat” phrases;
stacked variables, which belong to rulebooks, actions or activities; and global variables. The narrower in
scope take priority over the broader: so if there are both local and global variables called “grand total”, then
the text “grand total” is parsed as the local.
hs-variablei ::=
a hdefinite-articlei hs-variablei |
b hs-local-variablei |
c hs-stacked-variablei |
d hs-global-variablei
hs-nonglobal-variablei ::=
a ( hs-nonglobal-variablei ) |
b hs-local-variablei |
c hs-stacked-variablei
hs-local-variablei internal
hs-stacked-variablei internal
12/tandv.§15. And:
hs-global-variablei internal
12/tandv.§16. As noted above, we want to parse phrases containing “of” cautiously in cases where the
excerpt being parsed looks as if it might be a property rather than use of a phrase. Here’s how we tell
whether it looks that way:
hproperty-of-shapei ::=
a hs-property-namei of ...
hs-value-phrase-non-ofi internal
hs-value-phrasei internal
Chapter 12: The S-Parser 123
hs-table-referencei ::=
a hs-table-column-namei entry |
b hs-table-column-namei in row hs-valuei of hs-valuei |
c hs-table-column-namei listed in hs-valuei |
d hs-table-column-namei corresponding to hs-table-column-namei of hs-valuei in hs-valuei |
e hs-table-column-namei of hs-valuei in hs-valuei
12/tandv.§20. Action patterns, such as “taking a container” or “opening a closed door”, are parsed by
code in the chapter on Actions; all we do here is to wrap the result in a meaning-list entry.
hs-action-pattern-as-valuei ::=
a haction-patterni
Chapter 12: The S-Parser 124
12/varc.§2. The following parses a sentence with an active verb. The syntax is not as simple as SVO
(subject, then verb, then object) because of several complications.
hs-sentencei ::=
a hs-existential-npi hs-existential-verb-taili |
b hs-noun-phrasei hs-general-verb-taili
12/varc.§3. In an existential sentence, the subject is the meaningless noun phrase “there”. English is
defective in not allowing optional subjects: it would be more logical to say “if an open door is”, but in fact
we say “if there is an open door”. This is where we parse the tail “is an open door”.
Note that we recognise “there” as a placeholder only in the subject position. English does allow it as an
object, but then it’s anaphoric, referring back to a previously discussed place – “I go into the lobby. Julia is
there.” Since Inform can’t handle anaphora, this isn’t for us.
hs-existential-npi ::=
a there
hs-existential-verb-taili ::=
a hcopular-verbi hs-noun-phrase-nounlessi
12/varc.§5. More generally, the tail syntax splits according to the verb in question. The copular verb “to
be” has special syntactic rules for its object phrase (for Inform, at least: linguists would probably analyse
this slightly di↵erently). We’ve just seen one special point: “to be” can take the placeholder “there”, which
no other verb can. (English does allow this, for archaic or dramatic purposes: “There lurks a mysterious
invisible force.” Inform doesn’t, and it also doesn’t read the mathematical usage “there exists”, though this
caused the author a certain pang of regret.) The verb “to be” is considered “copular” because it acts to
combine its subject and object: “X is 5”, “Y is blue”, and so on, refer to just one thing but make a statement
about its nature or identity. Other verbs – “to carry”, say – normally refer to two di↵erent things, at least
in their most general forms: “X carries the briefcase”. Therefore:
Mr Cogito is in the Dining Room.
should be parsed, but
Mr Cogito carries in the Dining Room.
should not. One can debate whether this is a di↵erence of syntax or semantics, but for Inform, it’s handled
at the syntax level.
Secondly, the universal verb “relates” needs a special syntax in order to handle its extra object: see below.
All other verbs are “general”.
hs-general-verb-taili ::=
a hcopular-verbi hpreposition-implying-playeri |
b hcopular-verbi hprepositioni hs-noun-phrase-nounlessi |
c hcopular-verbi hs-noun-phrase-nounlessi |
d huniversal-verbi hs-universal-relation-termi |
e hgeneral-verbi hs-noun-phrasei
Chapter 12: The S-Parser 125
12/varc.§6. The following catches the “Y to Z” right-hand term of the universal relation,
X relates Y to Z
where Y and Z must somehow be folded into a single noun phrase. Conceptually it would be neatest to
represent this as a combination kind, but that might lead us to require the presence of the heap, since
combinations are stored on the heap; and that would e↵ectively make “relates” of limited use on Z-machine
works.
hs-universal-relation-termi ::=
a hs-noun-phrasei to hs-noun-phrasei
12/varc.§7. The following parses a noun phrase with a relative clause, which is syntactically very similar
to the case of a sentence. Sometimes the verb is explicit, as here:
a woman who does not carry an animal
in which case “who”, acting as a marker of the relative clause, is the only way this di↵ers from a sentence;
but sometimes it is implicit:
a woman not in the Hall of Mists
In this case the verb is implicitly the copular verb “to be” and our grammar has to di↵er from the sentence
grammar above.
hs-np-with-relative-clausei ::=
a hs-noun-phrase-nounlessi hs-implied-relative-verb-taili |
b hs-noun-phrasei hs-relative-verb-taili
hs-implied-relative-verb-taili ::=
a hprepositioni hs-noun-phrase-nounlessi |
b not hprepositioni hs-noun-phrase-nounlessi
hs-relative-verb-taili ::=
a hrelative-clause-markeri hcopular-verbi hpreposition-implying-playeri |
b hrelative-clause-markeri hcopular-verbi hprepositioni hs-noun-phrase-nounlessi |
c hrelative-clause-markeri hcopular-verbi hs-noun-phrase-nounlessi |
d hrelative-clause-markeri huniversal-verbi hs-universal-relation-termi |
e hrelative-clause-markeri hgeneral-verbi hs-noun-phrasei
12/varc.§13. It is very nearly true that the subject and object noun phrases are parsed by hs-valuei, which
was given in “Type Expressions and Values”. But there is a technicality: for reasons to do with ambiguities,
hs-valuei needs to be able to try descriptions which involve only physical objects at one stage, and then later
to try other descriptions.
Note that hs-purely-physical-descriptioni calls hs-descriptioni which in turn may, if there’s a relative clause, call
hs-np-with-relative-clausei and thus hs-noun-phrasei. Rather than passing endless copies of a flag down the call
stack, we simply give hs-noun-phrasei a global mode of operation.
hs-purely-physical-descriptioni internal
hif-forced-physicali internal
Chapter 12: The S-Parser 126
12/varc.§14. The upshot of this is that hs-noun-phrasei is only ever called in “purely physical mode” when
it will later be called outside that mode in any event, and that therefore the set of excerpts matched by
hs-noun-phrasei genuinely is the same as that matched by hs-valuei.
hs-noun-phrasei ::=
a hif-forced-physicali hs-nonglobal-variablei |
b hif-forced-physicali hs-descriptioni |
c ^hif-forced-physicali hs-valuei |
hs-noun-phrase-nounlessi ::=
a hif-forced-physicali hs-nonglobal-variablei |
b hif-forced-physicali hs-description-nounlessi |
c ^hif-forced-physicali hs-valuei |
12/varc.§15. Finally, the following is needed for conditions (“if fixed in place scenery, ...”) where the
object referred to is understood from context.
hs-descriptive-npi ::=
a ( hs-descriptive-npi ) |
b hcardinal-numberi |
c hs-descriptioni |
d hs-adjective-list-as-desci
Chapter 12: The S-Parser 127
12/candp.§1. A condition is an excerpt of text which measures the truth of something. We will call a
condition “pure” if it is self-sufficient, rather than referring anaphorically to some implied subject. For
instance,
if the bucket is an open container, ...
contains a pure condition, but
if an open container, ...
is impure. We are very wary of impure conditions, and don’t allow the logical operations or chronological
restrictions to apply to them. So the only valid impure conditions are description noun phrases.
hs-conditioni ::=
a hs-condition-purei |
b hs-descriptive-npi
12/candp.§2. Now for pure conditions. Note that logical “and” and “or” are implemented directly right
here, rather than being phrases defined in the Standard Rules, and that they aren’t the same as the “and”
and “or” used a list dividers.
hs-condition-purei ::=
a ( hs-condition-purei ) |
b hs-condition-purei , and hs-condition-purei |
c hs-condition-purei and hs-condition-purei |
d hs-condition-purei , or hs-condition-purei |
e hs-condition-purei or hs-condition-purei |
f hs-condition-with-chronologyi |
g hs-condition-atomici
hs-condition-with-chronologyi internal
Chapter 12: The S-Parser 128
12/candp.§4. The syntax for the logical operation “not” is more complicated, because it only sometimes
work by simply preceding the text with “not”. Consider this, for instance:
if not we are carrying the torch, ...
As a result, we can’t handle negation in hs-condition-purei, and have to work into the grammar below on a case
by case basis. And where we do allow “not”, we always check the positive sense first – people do sometimes
create phrase options like “not printing anything”, for example, which begin with the word “not”.
As a condition, an action pattern is implicitly considered as a test of what the current action is:
if examining an open door, ...
This wouldn’t work so well for the past tense form:
if examined an open door, ...
because it seems too clunky as neither quite active nor passive. Who examined the open door? So Inform
uses the following version instead:
if we have examined an open door, ...
thus adopting the “science we”. Not very elegant, but the alternatives were difficult to parse. “We are”
is allowed for consistency’s sake, but does nothing, i.e., “we are taking” and “taking” are synonymous.
Translators to other languages may want to find more elegant solutions.
hs-condition-atomici ::=
a hs-phrase-option-in-usei |
b not hs-phrase-option-in-usei |
c hs-nonexistential-phrase-to-decidei |
d hs-past-action-pattern-as-conditioni |
e hs-past-action-pattern-as-negated-conditioni |
f hs-action-pattern-as-conditioni |
g hs-action-pattern-as-negated-conditioni |
h hs-sentencei |
i hs-existential-phrase-to-decidei
12/candp.§5. As before, we try to get better sensitivity to ambiguities by dividing the test for a phrase-
to-decide into two, so that the following is used at a di↵erent point if the excerpt begins “there is” than if it
doesn’t. The point of this is that some phrases to decide have wording which coincides with a description,
and in general the phrase should win, but in the case of “there is” we make the presumption that the author
intends a sentence testing the existence of something.
hs-nonexistential-phrase-to-decidei ::=
a hexistential-verb-phrasei | ! fail
b hs-phrase-to-decidei |
c not hs-phrase-to-decidei
hs-existential-phrase-to-decidei ::=
a ^hexistential-verb-phrasei | ! fail
b hs-phrase-to-decidei |
c not hs-phrase-to-decidei
hexistential-verb-phrasei ::=
a hs-existential-npi is/are ...
hs-phrase-to-decidei internal
Chapter 12: The S-Parser 129
12/candp.§6. The following only matches the phrase option names for the phrase currently being compiled;
all others are out of scope.
hs-phrase-option-in-usei internal
12/candp.§7. We have already seen action patterns used as nouns; here they are used as conditions, so
this is where the condition in
if taking the box, ...
is handled. The following nonterminal exists to enter the AP to the meaning list.
hs-action-pattern-as-conditioni ::=
a hwe-are-action-patterni
hs-action-pattern-as-negated-conditioni ::=
a haction-pattern-negatedi
hs-past-action-pattern-as-conditioni ::=
a haction-pattern-pasti
hs-past-action-pattern-as-negated-conditioni ::=
a haction-pattern-past-negatedi
12/candp.§10. The final clutch of nonterminals in the S-grammar handles individual commands, written
in their semicolon-divided list in the body of a rule or “To...” definition. For instance, in the not very
sensible rule:
Instead of jumping: now the score is 10; say ”Greetings!” instead.
Inform will use hs-commandi to parse the text of the two commands in the rule body. hs-commandi parses the
text with little attempt to judge whether the parameters of the phrase match; it simply records possibilities
for typechecking to choose between much later on.
The grammar here partially overlaps with that in hcontrol-structure-phrasei, and if one is changed, so should
the other be. It needs to be here because cases and the structural otherwise are implemented primitively by
Inform rather than as defined phrases in the Standard Rules. “Otherwise if”, on the other hand, is a defined
phrase, but we can get much better problem messages by rejecting misuse of it here than we would if we let
such misuses parse; the four productions concerning it can never match.
hs-commandi ::=
a ( hs-commandi ) |
b else/otherwise |
c else/otherwise if/unless *** begin | ! fail
d else/otherwise if/unless *** , *** |
e else/otherwise if/unless ... |
f else/otherwise ^if/unless *** |
g -- otherwise |
h -- hs-valuei |
i hs-command-phrasei |
j hs-rulebook-outcome-namei
Chapter 12: The S-Parser 130
12/candp.§15. Command phrases fall into two sorts: text substitutions and “To...” phrases. Note that
the phrase text can be prefixed or suffixed with the “instead” keyword, but not both.
hs-command-phrasei ::=
a instead hs-command-phrase-inneri |
b hs-command-phrase-inneri instead |
c hs-command-phrase-inneri
hs-command-phrase-inneri ::=
a say hs-say-phrasei |
b hs-to-phrasei
12/candp.§16. So that leaves us with two nonterminals to define. “To...” phrases are easy, or at least,
easy to delegate:
hs-to-phrasei internal
12/candp.§17. Uniquely, a say phrase takes the form of a comma-separated list, and is compiled by
regarding each entry as an independent entry.
hs-say-phrasei ::=
a hs-say-termi , hs-say-termi |
b hquoted-text-with-subsi |
c hadaptive-verbi verb |
d hadaptive-adjectivei adjective |
e hadaptive-verbi |
f hadaptive-adjectivei |
g hs-text-substitutioni
hs-say-termi ::=
a hempty-texti |
b hs-say-phrasei
hs-text-substitutioni internal
12/candp.§19. Something devious happens when production (b) of hs-say-phrasei is matched. Double-
quoted text is literal if it contains no square brackets, but is expanded if it includes text substitutions in
squares. When (b) matches, Inform expands a text such as
”Look, [the noun] said.”
into:
”Look, ”, the noun, ” said.”
and then re-parses the result with the following nonterminal; note that we make sure commas are used
correctly before handing back to hs-say-phrasei to parse the list.
hs-unpacked-text-with-substitutionsi ::=
a *** . *** | ! C12TSWithPunctuation
b , *** | ! C12EmptySubstitution
c *** , | ! C12EmptySubstitution
d *** , , *** | ! C12EmptySubstitution
e hs-say-phrasei
Chapter 15: Kinds 131
15/kinds.§19. Inform builds “natural language” in so that it can create an instance for each natural
language whose bundle it can find. “Grammatical gender” is used as a kind whose name coincides with a
property.
hnotable-linguistic-kindsi ::=
a natural language |
b grammatical gender
Chapter 15: Kinds 132
15/dkind.§1. This innermost of Inform’s grammars is used to match the names of kinds. It’s a nicely
unambiguous and clean language, with a specification closer to traditional computer-science norms – this
is not an accident: it allows for awkward functional-programming needs in a way which vaguer natural
language syntax would not.
All K-grammar nonterminals begin with the “k-” prefix, and their result pointers are to kind structures.
The K-grammar actually has two modes: normal, and phrase-token-mode. Normal mode is aptly named:
it’s almost always the one we’re using. Phrase token mode is used only when parsing definitions of phrases,
like so:
To repeat with (LV - nonexisting K variable) running from (V1 - arithmetic value of kind K) to (V2 - K)
Here the tokens “nonexisting K variable” and so on are parsed as specifications, but in such a way that any
kinds mentioned are parsed in phrase-token-mode. The di↵erence is that this enables them to refer to kind
variables such as K which are still being defined; in normal mode, that would only be allowed if K already
existed.
hif-parsing-phrase-tokensi internal
15/dkind.§2. The following internal is just a shell for hspec-descriptive-type-expressioni, but it temporarily
changes the parsing mode to phrase token parsing, so that kind variables will be read as formal prototypes.
hspec-phrase-token-typei internal
15/dkind.§3. And the following internal is in fact only hk-kindi but inside phrase token parsing mode; it’s
used when parsing the kind to be decided by a phrase (which, like phrase tokens, can involve the variables).
hk-kind-for-templatei internal
15/dkind.§4. Finally, this internal wraps hk-kind-as-name-tokeni in a similar way, while also wrapping the
result up as a specification.
hspec-kind-as-name-tokeni internal
15/dkind.§5. And here is that “name of kind...” construction, which is valid only in phrase tokens.
hk-kind-as-name-tokeni ::=
a ( hk-kind-as-name-tokeni ) |
b name of kind of hk-kind-abbreviatingi |
c name of kind hk-kind-abbreviatingi |
d name of kind of ... |
e name of kind ...
hk-kind-abbreviatingi ::=
a ( hk-kind-abbreviatingi ) |
b hk-kind-of-kindi hk-formal-kind-variablei |
c hk-kindi
Chapter 15: Kinds 133
15/dkind.§6. So now we can begin properly. Every valid kind matches hk-kindi:
hk-kindi ::=
a ( hk-kindi ) |
b ^hif-parsing-phrase-tokensi hk-kind-variablei |
c hif-parsing-phrase-tokensi hk-variable-definitioni |
d hk-base-kindi |
e hk-irregular-kind-constructioni |
f hk-kind-constructioni
hk-kind-articledi ::=
a hindefinite-articlei hk-kindi |
b hk-kindi
15/dkind.§8. In phrase-token mode, kind variables are treated as formal symbols, not as the kinds which
are their current values:
hk-variable-definitioni ::=
a hk-formal-kind-variablei |
b hk-kind-of-kindi of kind hk-formal-kind-variablei
15/dkind.§9. Some base kinds with one-word names have that word flagged with a direct pointer to the
kind, for speed of parsing. Names of base kinds, such as “number” or “vehicle”, can be registered in two
di↵erent ways (according to whether they come from the source text or from template files), so we then
make two further checks:
hk-base-kindi internal
15/dkind.§10. “Object based rulebook” has been on a voyage of unhyphenation: in the early public beta
of Inform 7, it was “object-based-rulebook” (at that time, built-in kinds had to have one-word names); then
it became “object-based rulebook”, when one-word adjectives were allowed to modify the names of built-in
kinds; and now it is preferably “object based rulebook”. But the previous syntax is permitted as an alias
to keep old source text working. And similarly for the others here, except “either/or property”, which is a
2010 addition.
hk-irregular-kind-constructioni ::=
a object-based rulebook |
b action-based rulebook |
c object-based rule |
d action-based rule |
e either-or property
15/dkind.§11. This loop looks a little slow, but there are only about 10 proper constructors.
hk-kind-constructioni internal
Chapter 15: Kinds 134
15/dkind.§15. Where the materials used in construction are not quite kinds, but can be more varied.
hk-single-materiali ::=
a ( hk-single-materiali ) |
b harticlei hk-single-materiali |
c hk-kindi
hk-optional-materiali ::=
a ( hk-optional-materiali ) |
b harticlei hk-optional-materiali |
c nothing |
d action |
e hk-kindi
hk-tupled-materiali ::=
a ( hk-tuple-listi ) |
b nothing |
c hk-single-materiali
hk-tuple-listi ::=
a hk-single-materiali , hk-tuple-listi |
b hk-single-materiali
15/dkind.§19. This is actually just hk-kindi in disguise, but only lets the result through if it’s a kind of
kind, like “arithmetic value”; something like “number” or “list of texts” will fail.
hk-kind-of-kindi ::=
a hk-kindi
15/dkind.§21. Kind variables are written with the letters A to Z. That provides for only 26 of them, but
it’s very, very rare to need more than 2, in practice. At one time I was tempted by the syntax used in the
early functional programming language Miranda (1985), which uses rows of asterisks *, **, ***, and so on
as needed. But using the letters seemed fractionally closer to natural language conventions. In English, we
do say pseudo-algebraic things like “So, let’s call our spy Mr X.” – or at least we do if we lead slightly more
exciting lives than the present author. The use of letters emphasises that this is some kind of reference, not
a direct identification. Whereas when we use asterisks, it’s with an air of censorship, of something that must
not be named (compare Stéphanie de Genlis’s gothic novella Histoire de la duchesse de C***, 1782).
The following nonterminal matches only those kind variables whose values are actually set, and it returns
those values. This is how kind variables are parsed almost all of the time.
hk-kind-variablei internal
15/dkind.§22. But we can also formally parse A to Z as their own abstract identities; now they always
parse, regardless of what might be stored in them, and they aren’t replaced with their values (which they
may not even have).
hk-formal-kind-variablei internal
Chapter 15: Kinds 135
15/dkind.§23. For efficiency’s sake, we don’t actually parse directly using this nonterminal, but it’s needed
all the same because of Preform’s optimisations.
hk-kind-variable-textsi ::=
a a/as |
b b/bs |
c c/cs |
d d/ds |
e e/es |
f f/fs |
g g/gs |
h h/hs |
i i/is |
j j/js |
k k/ks |
l l/ls |
m m/ms |
n n/ns |
o o/os |
p p/ps |
q q/qs |
r r/rs |
s s/ss |
t t/ts |
u u/us |
v v/vs |
w w/ws |
x x/xs |
y y/ys |
z z/zs
Chapter 16: Specifications 136
16/ttts.§7. These five nonterminals are a junction point between the S-parser and the rest of Inform.
Because the SP generates large, cumbersome and ephemeral meaning lists, if we want to keep and use the
results then we need to convert these to specification structures. These five hspec-...i nonterminals correspond
exactly to the hs-...i nonterminals of the same names; for instance hspec-valuei matches exactly what hs-valuei
does, but converts the results for longer-term use. (For efficiency’s sake we use caches to avoid reparsing the
same excerpt over and over, in fact, which is why these are coded as internals, but that makes no di↵erence
to the results.)
hspec-valuei internal
hspec-conditioni internal
hspec-commandi internal
hspec-type-expressioni internal
hspec-descriptive-type-expressioni internal
16/ttts.§8. This super-nonterminal matches almost anything which could be said to mean something to
Inform, so it’s frequently used as a way of finding out whether a new name will clash with some existing
meaning.
hspec-type-expression-or-valuei ::=
a hspec-type-expressioni |
b hspec-valuei
hspec-global-variablei ::=
a hs-global-variablei
16/ttts.§11. Likewise:
hspec-kindi ::=
a hk-kindi
16/ttts.§13. The following looks as if accepts any type expression, but it filters the results and passes
them on only if they refer to a description:
hspec-descriptioni ::=
a hspec-type-expressioni
hspec-instancei ::=
a hspec-type-expressioni
Chapter 16: Specifications 137
hspec-table-namei ::=
a hspec-type-expressioni
16/ttts.§16. And similarly for text which describes an action in a noun-like way: a literal stored action,
or a tested action pattern (which we coerce to a stored action).
hspec-stored-actioni ::=
a hspec-conditioni
Chapter 16: Specifications 138
16/stsp.§2. Nonkind type names in the storage category. (The internal hs-nonkind-type-unbracketedi parses
these: see Chapter 12.)
hstorage-nonkind-typesi ::=
a storage |
b storages |
c variable |
d variables |
e property-value |
f property-values |
g table-reference |
h table-references |
i list-entry |
j list-entries
Chapter 16: Specifications 139
16/cosp.§7. Nonkind type names in the condition category. (The internal hs-nonkind-type-unbracketedi
parses these: see Chapter 12.)
hcondition-nonkind-typesi ::=
a condition |
b conditions |
c now-condition |
d now-conditions
Chapter 16: Specifications 140
16/cmsp.§8. Nonkind type names in the command category. (The internal hs-nonkind-type-unbracketedi
parses these: see Chapter 12.)
hcommand-phrase-nonkind-typesi ::=
a phrase |
b phrases |
c action |
d actions
Chapter 16: Specifications 141
16/tc.§22. “Diagnosis” nonterminals are used to parse syntax which is already known to be invalid: they
simply choose between problem messages. This one picks up on misuse of structural phrases.
hstructural-phrase-problem-diagnosisi ::=
a else/otherwise ^if/unless *** | ! C16WrongOtherwise
b else/otherwise if/unless ... , ... | ! C16WrongOtherwise2
c else/otherwise if/unless ... begin | ! C16WrongOtherwise3
d if/unless ... then | ! C16WrongThen
e if ... | ! C16PossibleUnterminatedIf
f unless ... | ! C16PossibleUnterminatedUnless
g continue ! C16WrongContinue
16/tc.§31. The hunknown-text-shapei is used purely in diagnosing problems; it helps to decide, for instance,
whether the errant phrase was intended to be a text substitution or not.
hunknown-text-shapei ::=
a say ... |
b ... and/or ... |
c ...
hunknown-text-substitution-problem-diagnosisi ::=
a , ... | ! C16SayComma
b unicode ... | ! C16SayUnicode
c ... condition | ! C16SayUnknownCondition
d ... ! C16SayUnknown
16/tc.§38. These are cases where the wording used in the source text suggests some common misunder-
standing.
hunknown-value-problem-diagnosisi ::=
a turns | ! C16NumberOfTurns
b ... is/are out of play | ! C16OutOfPlay
c unicode ... | ! C16MidTextUnicode
d ... condition | ! C16UnknownCondition
e ... ! C16Unknown
hunknown-use-option-diagnosisi ::=
a ... ^option | ! C16OptionlessOption
b ... ! C16Unknown
hunknown-activity-diagnosisi ::=
a ... of | ! C16ActivityOf
b ... ! C16Unknown
Chapter 16: Specifications 142
16/tc.§135. The following chooses a problem message for a text substitution which is unrecognised.
hfailed-text-substitution-diagnosisi ::=
a time | ! C16Time2
b the time | ! C16Time2
c hspec-descriptioni | ! C16SayDescription
d hspec-type-expression-or-valuei | ! C16AllSayInvsFailed
e ... ! last-resort failed ts
16/tc.§143. This last little grammar diagnoses problems with a condition, and helps to construct a problem
message which will (usually) show which part of a compound condition caused the trouble:
hcondition-problem-diagnosisi ::=
a hcondition-problem-parti hcondition-problem-part-list-taili |
b hcondition-problem-parti
hcondition-problem-part-list-taili ::=
a , and/or hcondition-problem-diagnosisi |
b ,/and/or hcondition-problem-diagnosisi
hcondition-problem-parti ::=
a hspec-conditioni |
b hspec-valuei |
c when/while *** |
d ...
Chapter 17: Properties 143
17/prop.§7. This is a collection of the English names of some properties which have special significance
to Inform. Each one is recognised as it is created by the Standard Rules (which are in English, so there’s no
need to translate this to any other language).
hnotable-propertiesi ::=
a description |
b specification |
c indefinite appearance text |
d variable initial value
17/prop.§9. To clarify their meanings as nouns, the word “property” can be prepended; thus “the property
open”, for instance. We achieve this by registering the name in both forms. The following grammar is used
to construct this prefix.
hproperty-name-constructioni ::=
a property ...
17/prop.§12. The following matches any property name, optionally preceded by the definite article:
hproperty-namei internal
heither-or-property-namei internal
hvalue-property-namei internal
17/prop.§14. For tiresome internal reasons, we also need a version which is voracious (and doesn’t accept
the definite article):
hproperty-name-vi internal
17/prop.§15. We call a property name “ambiguous” if, syntactically, it looks like a reference to a property
of something. For example, “point of view” could be mistaken for the “point” property of something called
“view”. Formally, it’s ambiguous if it matches the following:
hname-looking-like-property-testi ::=
a *** of ***
17/prop.§16. And this internal is exactly like hproperty-namei except that it only matches ambiguous cases.
hambiguous-property-namei internal
Chapter 17: Properties 144
17/madj.§8. Measurement adjectives are created when we parse a “Definition:” clause for a new adjective,
and then only when the definition has a particular form:
Definition: A container is roomy if its carrying capacity is 10 or more.
hmeasurement-adjective-definitioni is used to parse the definition part,
its carrying capacity is 10 or more
The following grammar is a little sketchy because it’s parsed very early in Inform’s run. Eventually, though,
the text after the possessive is required always to match hproperty-namei, and the text in the range must
match hliterali.
hmeasurement-adjective-definitioni ::=
a hpossessive-third-personi ... is/are not ... | ! C17GradingMisphrased
b hpossessive-third-personi {hproperty-namei} is/are hmeasurement-rangei |
c hpossessive-third-personi ... is/are hmeasurement-rangei
hmeasurement-rangei ::=
a ... or more |
b ... or less |
c ...
Chapter 17: Properties 145
17/vpbp.§5. When properties are named as part of relation definitions, for instance, like so:
The verb to weigh (it weighs, they weigh, it is weighing) implies the weight property.
...then its name (in this case “weight”) is required to pass:
hrelation-property-namei ::=
a heither-or-property-namei | ! C17RelationWithEitherOrProperty
b hvalue-property-namei |
c ... ! C17RelationWithBadProperty
Chapter 18: Inference and Model 146
18/names.§2. These are property names to do with naming which Inform provides special support for; it
recognises the English names when they are defined by the Standard Rules. (So there is no need to translate
this to other languages.)
hnotable-naming-propertiesi ::=
a indefinite article |
b plural-named |
c proper-named |
d printed name |
e printed plural name |
f publically-named |
g privately-named |
h adaptive text viewpoint |
i neuter |
j female
Chapter 19: Space and Time 147
19/spmod.§6. These are kind names to do with spatial layout which Inform provides special support for;
it recognises the Englishs name when defined by the Standard Rules. (So there is no need to translate this
to other languages.)
hnotable-spatial-kindsi ::=
a room |
b thing |
c container |
d supporter |
e person
19/spmod.§11. These are property names to do with spatial layout which Inform provides special support
for; it recognises the English names when they are defined by the Standard Rules. (So there is no need to
translate this to other languages.)
“Matching key” has to appear in here because it both has a traditional I6 name and is used as relation
storage. If we didn’t care about it being called with_key in the I6 source code, we wouldn’t need to do
anything special with it at all.
hnotable-spatial-propertiesi ::=
a initial appearance |
b wearable |
c fixed in place |
d matching key
19/spmod.§15. “Nothing” is conspicuously absent from the possibilities below. It gets special treatment
elsewhere since it can also double as a value (the “not an object” pseudo-value).
hspatial-specifying-nounsi ::=
a something/anything *** |
b somewhere/anywhere *** |
c someone/anyone/somebody/anybody *** |
d everything *** |
e everywhere *** |
f everyone/everybody *** |
g nowhere *** |
h nobody/no-one *** |
i no one ***
19/spmod.§17. This means the same as “nothing”, in a noun context, but we annotate a parse node using
this wording in order to produce better problem messages if need be.
hnotable-spatial-noun-phrasesi ::=
a nowhere
Chapter 19: Space and Time 148
19/play.§2. The “yourself” object is special in being tied, or “aliased”, to the “player” variable, so Inform
needs to recognise it. (No need to translate; it is created in English.)
hnotable-player-instancesi ::=
a yourself
19/play.§4. “Time of day” is a perfectly normal variable and we only note down its identity in order to
find out the initial time of day intended by the source text.
“Player”, on the other hand, is unusual in two respects. First, it’s aliased to an object; second, it’s set in an
unusual way. That is, Inform does not compile
now the player is Mr Chasuble;
to something like player = O31_mr_chasuble, as it would do for a typical variable. It’s very important that
code compiled by Inform 7 doesn’t do this, because if executed it would break the invariants for the various I6
variables about the current situation. The correct thing is always to call the template routine ChangePlayer.
We ensure that by supplying an I6 schema which overrides the standard one for setting global variables:
As usual, no need to translate these; they are created in English.
hnotable-player-variablesi ::=
a player |
b score |
c time of day
19/play.§10. The adjectives “worn” and “carried” – as in, “The nautical chart is carried.” – implicitly
refer to the player as the unstated term in the relationship; that makes them our business here. “Initially
carried” is now deprecated, but is provided as synonymous with “carried” because it was once an either/or
property in the clumsier early stages of Inform 7, and people still sometimes type it.
himplicit-player-relationshipi ::=
a worn |
b carried |
c initially carried
Chapter 19: Space and Time 149
19/backd.§2. This a kind name to do with backdrops which Inform provides special support for; it recog-
nises the English name when defined by the Standard Rules. (So there is no need to translate this to other
languages.)
hnotable-backdrops-kindsi ::=
a backdrop
19/backd.§5. This is a property name to do with backdrops which Inform provides special support for; it
recognises the English name when it is defined by the Standard Rules. (So there is no need to translate this
to other languages.)
hnotable-backdrops-propertiesi ::=
a scenery
19/backd.§12. Here we defines a form of noun phrase special to Backdrops (because a backdrop can be
said to be “everywhere”, which nothing else can).
hnotable-backdrops-noun-phrasesi ::=
a everywhere
Chapter 19: Space and Time 150
19/regio.§2. This a kind name to do with regions which Inform provides special support for; it recognises
the English name when defined by the Standard Rules. (So there is no need to translate this to other
languages.)
hnotable-regions-kindsi ::=
a region
19/regio.§6. This is a property name to do with regions which Inform provides special support for; it
recognises the English name when it is defined by the Standard Rules. (So there is no need to translate this
to other languages.)
hnotable-regions-propertiesi ::=
a map region
Chapter 19: Space and Time 151
19/plmap.§5. These are kind names to do with mapping which Inform provides special support for; it
recognises the Englishs name when defined by the Standard Rules. (So there is no need to translate this to
other languages.)
hnotable-map-kindsi ::=
a direction |
b door
19/plmap.§11. These are direction names which Inform provides special support for; it recognises the
English names when defined by the Standard Rules. (So there is no need to translate this to other languages.)
hnotable-map-directionsi ::=
a up |
b down
19/plmap.§21. These are property names to do with mapping which Inform provides special support for;
it recognises the English names when they are defined by the Standard Rules. (So there is no need to
translate this to other languages.)
hnotable-map-propertiesi ::=
a opposite |
b other side
19/plmap.§27. These NPs allow us to refer to the special directions “up” and “down”:
hnotable-map-noun-phrasesi ::=
a below |
b above
Chapter 19: Space and Time 152
19/mapbp.§5. When each direction is created, so are corresponding relations and prepositional uses: for
example, “northeast” makes “mapping northeast” as a relation, and “mapped northeast of” as a prepositional
usage.
The rule is actually that production (a) in hmapping-preposition-constructioni is used for all directions except
those named in hnotable-directionsi, where (b) is used. As a result, we make “mapped inside” and “mapped
outside” instead of “mapped inside of” and “mapped outside of.” This is done to avoid ambiguities with
the already-existing meanings of inside and outside to do with spatial containment.
The use of the word “mapped” may seem itself o↵. Why define “to be mapped east of” rather than “to be
east of”? After all, that seems to be what is used in assertions like:
The Bakery is east of Pudding Lane.
In fact, the A-parser reads sentences like that by looking out specially for direction names plus “of” – so
this is parsed without using the mapping predicate for “east”. But it cannot read:
The Flour Cellar is below the Bakery.
as a direction name plus “of”, since “below” is not the name of the direction “down”, and anyway there is
no “of”.
hmapping-relation-constructioni ::=
a mapping ...
hmapping-preposition-constructioni ::=
a mapped ... of |
b mapped ...
19/mapbp.§6. Two of the directions are special to mapping, because they have to be parsed slighly
di↵erently. These are the English names; there is no need to translate this to other languages.)
hnotable-directionsi ::=
a inside |
b outside
Chapter 19: Space and Time 153
19/htmlm.§54. When names are abbreviated for use on the World Index map (for instance, “Marble
Hallway” becomes “MH”) each word is tested against the following nonterminal; those which match are
omitted. So, for instance, “Queen Of The South” comes out as “QS”.
hmap-name-abbreviation-omission-wordsi ::=
a in |
b of |
c harticlei
Chapter 19: Space and Time 154
19/epsm.§7. This conveniently filters instance names to accept only those of kind “direction”.
hdirection-namei ::=
a hinstance-of-objecti
hindex-map-sentence-subjecti ::=
a eps file |
b hdirection-namei mapped as hdirection-namei |
c ... mapped as ... | ! C19MapDirectionClue
d hinstance-of-objecti mapped hmap-positioningi |
e ... mapped ... | ! C19MapPlacement
f hmap-settingi set to hmap-setting-valuei |
g hmap-settingi set to ... | ! C19MapSettingTooLong
h ... set to ... | ! C19MapSettingOfUnknown
i rubric {hquoted-text-without-subsi} *** |
j ... ! C19MapHintUnknown
hmap-positioningi ::=
a hinstance-of-objecti of/from hinstance-of-objecti |
b above hinstance-of-objecti |
c below hinstance-of-objecti
hmap-settingi ::=
a hmap-parameteri of hmap-setting-scopei |
b ... of hmap-setting-scopei ! C19MapSettingUnknown
hmap-setting-scopei ::=
a hdefinite-articlei hmap-setting-scope-unarticledi |
b hmap-setting-scope-unarticledi
hmap-setting-scope-unarticledi ::=
a first room |
b level hcardinal-numberi |
c hk-kindi |
d hinstance-of-objecti
Chapter 19: Space and Time 155
19/epsm.§15. The map parameters all have one-word, sometimes hyphenated, names, such as the follow-
ing:
vertical-spacing, monochrome, annotation-size
For now, at least, these are all in English only.
hmap-parameteri internal
19/epsm.§17. The value of map settings is as follows. In retrospect, the “booleans” perhaps should just
have been “true” and “false”, not “on” and “o↵”. Never mind.
hmap-setting-valuei ::=
a hcardinal-numberi |
b hquoted-texti |
c hmap-setting-booleani |
d hmap-o↵seti |
e ### leads to a problem message later
hmap-setting-booleani ::=
a on |
b off
19/epsm.§18. Map o↵sets have a cutesy notation: 10&-30, for example, written as a single word. The
following nonterminal actually matches any single word (so that problems can be caught later, not now),
returning either a valid o↵set or else the ERRONEOUS_OFFSET_VALUE sentinel.
hmap-o↵seti internal
19/epsm.§19. The one part of the grammar not explicitly spelled out above was what to do with the
optional text which follows a rubric. This is a sequence of any of the following:
hmap-rubrici ::=
a size hcardinal-numberi *** |
b font {hquoted-text-without-subsi} *** |
c colour {hquoted-text-without-subsi} *** |
d at hmap-o↵seti from ... |
e at hmap-o↵seti ***
Chapter 19: Space and Time 156
19/scene.§3. This is a property name to do with scenes which Inform provides special support for; it
recognises the English name when it is defined by the Standard Rules. (So there is no need to translate this
to other languages.)
hnotable-scene-propertiesi ::=
a recurring
19/scene.§9. This is a scene name which Inform provides special support for; it recognises the English
name when it is defined by the Standard Rules. (So there is no need to translate this to other languages.)
hnotable-scenesi ::=
a entire game
hscene-ends-sentence-subjecti ::=
a hscene-namei |
b ... ! C19ScenesOnly
19/scene.§20. The adverb, if present, always matches, since the scene end is created if it doesn’t already
exist:
hscene-ends-sentence-adverbi ::=
a hscene-end-name-creatingi
19/scene.§21. The following is elementary enough, but we want to be careful because there are possible
ambiguities: the condition might contain the word “ends” in a di↵erent context, for instance, and could still
be valid in that case.
hscene-ends-sentence-objecti ::=
a htext-including-a-callingi | ! C19ScenesDisallowCalled
b play begins |
c play ends | ! C19ScenesNotPlay
d hscene-namei begins |
e hscene-namei ends |
f hscene-namei ends hscene-end-namei |
g hscene-namei ends ... | ! C19ScenesUnknownEnd
h hspec-conditioni
Chapter 19: Space and Time 157
19/scene.§25. Where the following filters instance names to allow those of scenes only, and also internally
converts the result:
hscene-namei ::=
a hdefinite-articlei hscene-name-unarticledi |
b hscene-name-unarticledi
hscene-name-unarticledi ::=
a hinstancei
19/scene.§27. Lastly, scene end names are parsed by these internals. They are identical except that the
creating case will create a new end if need be so that it never fails.
hscene-end-namei internal
hscene-end-name-creatingi internal
19/scene.§48. We’ve now seen one use of scenes: they kick o↵ rulebooks when they begin or end. The
other use for them is to predicate rules on whether they are currently playing or not, using a “during” clause.
We allow these either to name a specific scene, or to describe a collection of them:
hspec-scene-descriptioni ::=
a hspec-valuei
Chapter 20: Initialised Data 158
20/nlvar.§2. These are variable names which Inform provides special support for; it recognises the English
names when they are defined by the Standard Rules. (So there is no need to translate this to other languages.)
These are in fact hacky constructs which only the SR should ever refer to.
hnotable-variablesi ::=
a substitution-variable |
b i6-varying-global |
c i6-nothing-constant
20/nlvar.§12. The Contents index contains a list of global variables. But it doesn’t list all of the “K
understood” variables, because that would be tediously repetitive – it would duplicate most of the list of
base kinds. So the index shows just one such variable. Inform recognises these variables by parsing their
names against the following:
hvalue-understood-variable-namei ::=
a hk-kindi understood
Chapter 20: Initialised Data 159
20/bib.§2. In fact, the following contains the names of all of the bibliographic variables – those used to
set entries on the Library Card about a project. As usual, Inform uses these English wordings to detect the
creation of the variables in the Standard Rules, which are in English: so there’s no point in translating this
nonterminal.
hnotable-bibliographic-variablesi ::=
a story title |
b story author |
c story headline |
d story genre |
e story description |
f story creation year |
g release number
20/bib.§6. This is what the top line of the main source text should look like, if it’s to declare the title and
author.
htitling-linei ::=
a hplain-titling-linei ( in hnatural-languagei ) |
b hplain-titling-linei
hplain-titling-linei ::=
a {hquoted-text-without-subsi} by ... |
b {hquoted-text-without-subsi}
20/bib.§9. Inform probably shouldn’t support this sentence, which does nothing other than to fill in two
pieces of rarely-used bibliographic data (which could just as easily be variables). But two of the larger
worked examples we were trying Inform out on, in the early days, belonged to a sequence called When in
Rome. So it didn’t seem such an obscure request at the time.
This is episode 2 of ”When in Rome”.
The subject noun phrase is fixed, so the information is in the object NP, which must match:
hepisode-sentence-objecti ::=
a hcardinal-numberi of hquoted-text-without-subsi |
b ... ! C20BadEpisode
Chapter 20: Initialised Data 160
20/bib.§13. A sentence like this allows for a shopping list of release ingredients:
Release along with a public source text and a website.
The object noun phrase is an articled list, and each entry must match this.
hrelease-sentence-objecti ::=
a hprivacy-indicatori hexposed-innardsi |
b hprivacy-indicatori ... | ! C20NoSuchPublicRelease
c hexposed-innardsi |
d cover art |
e existing story file |
f file of {hquoted-text-without-subsi} called {hquoted-text-without-subsi} |
g introductory booklet |
h introductory postcard |
i website |
j {hquoted-text-without-subsi} website |
k interpreter |
l {hquoted-text-without-subsi} interpreter
20/bib.§15. Three of the secret ingredients of a project which can be released, and can optionally be
marked “public” (they appear on any website about it) or “private” (they don’t).
hprivacy-indicatori ::=
a private |
b public
hexposed-innardsi ::=
a solution |
b source text |
c library card
Chapter 20: Initialised Data 161
20/list.§1. One of the few pieces of Inform syntax which wouldn’t look out of place in a conventional
programming language; list constants are series of values, separated by commas, and enclosed in braces. The
empty list { } is valid as a constant.
The values are in fact eventually required to be constants, and to have mutually consistent kinds, but that
checking is done after parsing, so it isn’t expressed in this grammar.
hliteral-listi ::=
a \{ \} |
b \{ hliteral-list-contentsi \}
hliteral-list-contentsi ::=
a hliteral-list-entryi , hliteral-list-contentsi |
b hliteral-list-entryi
hliteral-list-entryi ::=
a hspec-valuei |
b ......
Chapter 20: Initialised Data 162
20/tab.§5. The heading of a table column is the text in its entry in the first (titling-only) row of the table.
Usually that consists only of the column’s name, but optionally the kind can also be supplied in brackets –
Inform otherwise infers the kind from the contents below. The “topic” column needs special handling since
it also overrides kind inference, making what looks like text into grammar for parsing.
htable-column-headingi ::=
a hs-table-column-namei ( hk-kindi ) |
b htable-column-heading-unbracketedi ( hk-kindi ) |
c ... ( ... ) | ! C20TableColumnBrackets
d hs-table-column-namei |
e htable-column-heading-unbracketedi
htable-column-heading-unbracketedi ::=
a harticlei | ! C20TableColumnArticle
b {topic} |
c {hproperty-namei} |
d {hs-constant-valuei} | ! C20TableColumnAlready
e ...
20/tab.§9. When a column is found with a name not seen before – say, “merit points” – the following
grammar is used to construct a proper noun to refer to this column; thus, “merit points column”.
htable-column-name-constructioni ::=
a ... column
20/tab.§12. Every cell of every table is required to match the following. Perhaps unexpectedly, the syntax
doesn’t require each entry to be a valid Inform constant; entries can also be blanks, or names of kinds (thus
specifying the kind of the table but not the contents), and there are special arrangements for grammar to
be understood (in “topic” columns) and for actions written as constants.
htable-celli ::=
a htable-cell-blanki |
b hs-global-variablei | ! C20TablePlayerEntry or C20TableVariableEntry
c htable-cell-valuei |
d hlist-of-double-quotesi |
e ... ! C20TableUnknownEntry
htable-cell-blanki ::=
a --
htable-cell-valuei ::=
a the action of hspec-stored-actioni |
b hspec-stored-actioni |
c hspec-type-expressioni
hlist-of-double-quotesi ::=
a hquoted-texti or hlist-of-double-quotesi |
b hquoted-texti
Chapter 20: Initialised Data 163
20/tab.§19. The source text declaration of tables is not easy to parse, as tabs are significantly di↵erent
from spaces or new-lines, for instance – so the ordinary rules about white space are suspended. Tabs divide
entries in a row; new-lines divide rows in a paragraph; and the table is terminated by a paragraph break.
If a table is declared as
Table 12 - Chemical Elements
then it can be referred to elsewhere in the source either as “Table 12” or as “Table of Chemical Elements”,
so both excerpts are registered as meaningful. But it is legal to declare a table with only one of the two
forms in any case.
htable-headeri ::=
a htable-new-namei ( continued ) |
b htable-new-namei ( amended ) |
c htable-new-namei ( replaced ) |
d htable-new-namei
htable-new-namei ::=
a table ... - ... |
b table {hcardinal-numberi} |
c table of ... |
d table ... ! C20TableMisnamed
20/tab.§21. The following is then used to register table names as constants. The idea is that “Table 12 -
Chemical Elements” will be registered both as Table 12 and as Table of Chemical Elements.
htable-names-constructioni ::=
a table ... |
b table of ...
20/tab.§22. Optionally, tables can have a footer line specifying additional entirely blank rows. In (b), the
... is eventually required to match hk-kindi, but this happens later on, since the bare bones of tables are
parsed very early in Inform’s run, when kinds haven’t yet been created.
htable-footeri ::=
a *** with hcardinal-numberi blank row/rows |
b *** with blank row/rows for each ...
20/tab.§24. A special rule is that if a table is called “Rankings” and contains a column of numbers followed
by a column of text, then it is used by the run-time scoring system. In retrospect, Inform really shouldn’t
support this at the compiler level (not that it does much), and in any case it’s a very old-school idea of IF.
Still, it does little harm.
hrankings-table-namei ::=
a rankings
Chapter 20: Initialised Data 164
20/tab.§26. Tables lie behind the special “defined by” sentence. For example,
Some jerseys in the Staging Area are defined by the Table of Honorary Jerseys.
Some kinds of animal are defined by the Table of Zoology.
The subject must match:
hdefined-by-sentence-subjecti ::=
a kind/kinds of hspec-type-expressioni |
b hspec-instancei | ! C20TableDefiningObject
c hspec-type-expressioni |
d ... ! C20TableDefiningTheImpossible
hdefined-by-sentence-objecti ::=
a hspec-table-namei |
b ... ! C20TableUndefined
Chapter 21: Gadgets 165
hequation-namei ::=
a equation {hcardinal-numberi} - ... |
b equation {hcardinal-numberi} |
c equation - ... |
d equation ... ! C21EquationMisnumbered
hequation-names-constructioni ::=
a equation ... |
b ... equation
21/eqns.§12. Equations are allowed to end with a “where...” clause, explaining what the symbols in it
mean. For example:
where F is a force, a = 9.801 m/ss, m1 and m2 are masses;
At the earlier stages of parsing, we simply split the “where” text away using this:
hequation-wherei ::=
a ... where ...
21/eqns.§15. The following grammar is later used to parse the text after “where”. For example:
F is a force, a = 9.801 m/ss, m1 and m2 are masses
This is split into four clauses, of which the trickiest is the third, reading just “m1”. This abbreviated form
is allowed only in permanent declarations (i.e., not in equations defined inside “let” phrases) and gives the
symbol the same definition as the one following it – so m1 becomes defined as a mass, too.
hequation-where-listi ::=
a ... | match only when looking ahead
b hequation-where-setting-entryi hequation-where-list-taili |
c hequation-where-setting-entryi
hequation-where-list-taili ::=
a , _and hequation-where-listi |
b _,/and hequation-where-listi
hequation-where-setting-entryi ::=
a hequation-where-settingi
hequation-where-settingi ::=
a hequation-symboli is/are hk-kindi |
b hequation-symboli is/are hspec-valuei |
c hequation-symboli is/are ... | ! C21EquationSymbolNonValue
d hequation-symboli = hk-kindi | ! C21EquationSymbolEqualsKOV
Chapter 21: Gadgets 166
e hequation-symboli = hspec-valuei |
f hequation-symboli = ... | ! C21EquationSymbolNonValue
g hequation-symboli
hequation-symboli ::=
a hvalid-equation-symboli |
b ### | ! C21EquationSymbolMalformed
c ... ! C21EquationSymbolMisdeclared
21/eqns.§26. This is where the criterion for being a valid symbol name is expressed: it matches only a
single word, and only if the lettering matches the regular expression [A-Za-z]?{1,8}\d?{0,2}.
hvalid-equation-symboli internal
Chapter 21: Gadgets 167
21/isin.§2. Include sentences are a way to merge lower-level programming, from another language, into
Inform source text. They are intended only as a last resort, though seasoned I6 hackers tend to reach for
them a little sooner than that.
A sentence typically takes the form:
Include (- ... -) when defining a thing.
and the following grammar defines the “when defining a thing” end.
hinform6-inclusion-locationi ::=
a hinclusion-sidei {hquoted-text-without-subsi} |
b hinclusion-sidei {hquoted-text-without-subsi} in {hquoted-text-without-subsi} |
c when defining hspec-type-expressioni |
d when defining ... | ! C21WhenDefiningUnknown
e before the library | ! C21BeforeTheLibrary
f in the preform grammar
hinclusion-sidei ::=
a before |
b instead of |
c after
21/isin.§9. “Use” sentences are simple in structure. Their object noun phrases are articled lists:
Use American dialect and the serial comma.
Each of the entries in this list must match the following; the text of the option name is taken from the ...
or ### as appropriate:
huse-sentence-objecti ::=
a ... of at least hcardinal-number-unlimitedi |
b ### of hcardinal-number-unlimitedi |
c hdefinite-articlei ... |
d ...
21/isin.§10. These are use option names which Inform provides special support for; it recognises the
English names when they are defined by the Standard Rules. (So there is no need to translate this to other
languages.)
hnotable-use-option-namei ::=
a authorial modesty |
b dynamic memory allocation |
c memory economy |
d no deprecated features |
e numbered rules |
f telemetry recording |
g scoring |
h no scoring
Chapter 21: Gadgets 168
21/isin.§14. Some use options need to acted on immediately – for instance, if they’re set in the “Op-
tions.txt” file and they a↵ect how Inform parses subsequent sentences. The following works through a list
of use options, acting on those which need immediate action.
himmediate-usei ::=
a ... | match only when looking ahead
b himmediate-use-entryi himmediate-use-taili |
c himmediate-use-entryi
himmediate-use-taili ::=
a , _and himmediate-usei |
b _,/and himmediate-usei
himmediate-use-entryi ::=
a hnotable-use-option-namei |
b ......
Chapter 22: Phrases 169
22/ph.§4. Inline definitions open with a raw Inform 6 inclusion. The lexer processes those as two words:
first (-, which serves as a marker, and then the raw text of the inclusion treated as a single “word”.
Some inline definitions also mark themselves to be included only in To phrases of the right sort: it makes no
sense to respond “yes” to a phrase “To decide what number is...”, for instance.
hinline-phrase-definitioni ::=
a (- ### - in to only |
b (- ### - in to decide if only |
c (- ### - in to decide only |
d (- ### |
e (- ### ... ! C22TailAfterInline
Chapter 22: Phrases 170
22/phud.§1. For our purposes here, phrase definitions and rules are the same thing. Inform detects these
from the punctuation used, not from their wording, and divides them into a “preamble” (the part before
the colon, or in limited cases a comma) and a “body”. Early on in Inform’s run, we parse the preamble in
what’s called “coarse mode” – we look for very little detail, and detect just enough from the wording to tell
what sort of rule/phrase is to follow.
hrule-preamblei ::=
a definition |
b this is the {... rule} |
c hevent-rule-preamblei |
d to | ! C22BareTo
e to ... ( called ... ) | ! C22DontCallPhrasesWithCalled
f {to ...} ( this is ... ) |
g to ... |
h ... ( this is the {... rule} ) |
i ...
22/phud.§4. As a safety measure, to avoid ambiguities, Inform only allows one phrase definition to begin
with “now”. It recognises such phrases as those whose preambles match:
hnow-phrase-preamblei ::=
a to now ...
22/phud.§5. Much later on, Inform returns to the definition. If the preamble matches either of the final
two productions of hrule-preamblei, then we definitely have a rule rather than a phrase definition or a timed
event; and in that case the rule’s preamble (without its name, if given) has to match the following grammar.
(Parsing this is “fine mode”.)
hrule-preamble-finei ::=
a hrule-preamble-fineri during hspec-scene-descriptioni |
b hrule-preamble-fineri
hrule-preamble-fineri ::=
a {hrulebook-stem-embellishedi} {when/while ...} |
b {hrulebook-stem-embellishedi} |
c ...
hrulebook-stem-embellishedi ::=
a hrulebook-stemi of/for ... |
b hrulebook-stemi rule about/for/on ... |
c hrulebook-stemi rule |
d hrulebook-stemi *** |
e rule for hrulebook-stemi of ... |
f rule for hrulebook-stemi *** |
g rule hrulebook-stemi of ... |
h rule hrulebook-stemi ***
Chapter 22: Phrases 171
22/phud.§8. If we can’t find a stem, the following chooses which problem to issue:
hunrecognised-rule-stem-diagnosisi ::=
a when *** | ! C22BadRulePreambleWhen
b ... ! C22BadRulePreamble
22/phud.§14. Parametric rules are those applying to values not actions, and the following is used to
choose a problem message if the value makes no sense.
hparametric-problem-diagnosisi ::=
a when the play begins/ends | ! C22WhenThePlay
b ... ! C22BadParameter
22/phud.§18. And here we choose a problem message if a rule applying to an action is used, but the
action isn’t one we recognise.
haction-problem-diagnosisi ::=
a in the presence of ... | ! C22NonActionInPresenceOf
b in ... ! C22NonActionIn
22/phud.§21. The following is used to choose a problem when the trouble with the rule occurred in a
when/while condition at the end; while all five cases produce the C22APWithBadWhen problem, they each
provide di↵erent clues as to what might have gone wrong.
haction-when-diagnosisi ::=
a ... called ... {when/while ...} |
b ... {when/while *** nothing ***} |
c ... {when/while *** nowhere ***} |
d ... and {when/while ...} |
e ... {when/while ...}
22/phud.§23.
hanl-diagnosisi ::=
a hanl-inner-diagnosisi when/while ... |
b hanl-inner-diagnosisi
hanl-inner-diagnosisi ::=
a hanl-entry-diagnosisi hanl-tail-diagnosisi |
b hanl-entry-diagnosisi
hanl-tail-diagnosisi ::=
a , _or hanl-inner-diagnosisi |
b _,/or hanl-inner-diagnosisi
hanl-entry-diagnosisi ::=
a ......
22/phud.§26.
hwhen-while-clausei ::=
a ... when/while ...
Chapter 22: Phrases 172
22/phtd.§9. Now we come to the grammar for phrase definitions (not rules). This is surprisingly compli-
cated, but many of the options are reserved for the Standard Rules.
We know from coarse mode parsing of the preamble that it starts with the word “to”.
hphrase-preamblei ::=
a hphrase-preamblei ( deprecated ) |
b hsay-preamblei |
c hto-preamblei
hto-preamblei ::=
a hto-preamblei ( arithmetic operation hcardinal-numberi ) |
b hto-preamblei ( assignment operation ) |
c {let ... be given by ...} |
d {let ...} |
e ... -- end |
f ... -- end conditional |
g ... -- end loop |
h ... -- in loop |
i ... -- in ### |
j ...
22/phtd.§10. Phrases whose definitions begin “To say” are usually text substitutions, the exception being
the primordial phrase for saying text.
hsay-preamblei ::=
a hsay-preamblei -- running on |
b {say otherwise/else} |
c {say if/unless ...} |
d {say end if/unless} |
e {say ...} -- beginning ### |
f {say ...} -- continuing ### |
g {say ...} -- ending ### with marker ### |
h {say ...} -- ending ### |
i {say ...}
Chapter 22: Phrases 173
22/phtd.§11. The following is used on the same text as hto-preamblei, but later on, for timing reasons.
Note that hk-kind-for-templatei parses hk-kindi, but in a mode which causes the kind variables to be read as
formal prototypes and not as their values. This allows for tricky definitions like:
To decide which K is (name of kind of value K) which relates to (Y - L) by (R - relation of Ks to values
of kind L)
where hk-kind-for-templatei needs to recognise “K” even though the tokens haven’t yet been parsed, so that
we don’t yet know it will be meaningful.
hto-return-datai ::=
a to {decide yes/no} |
b to {decide on ...} |
c to decide whether/if the ... |
d to decide whether/if ... |
e to decide what/which hreturn-kindi is the ... |
f to decide what/which hreturn-kindi is ... |
g to ...
hreturn-kindi ::=
a hk-kind-for-templatei |
b ... ! C22UnknownValueToDecide
22/phtd.§14. The syntax for the body of a phrase definition is that it’s a sequence of fixed single words,
which are not brackets, and bracketed token definitions, occurring in any quantity and any order. For
example:
begin the (A - activity on value of kind K) activity with (val - K)
is a sequence of word, word, token, word, word, token.
For implementation convenience, we write a grammar which splits o↵ the next piece of the definition from
the front of the text. In production (e), it’s a single word; in production (b), a token definition; and the
others all give problems for misuse of brackets.
hphrase-definition-word-or-tokeni ::=
a ( ) *** | ! C22TokenWithEmptyBrackets
b ( hphrase-token-declarationi ) *** |
c ( *** | ! C22TokenWithoutCloseBracket
d ) *** | ! C22TokenWithoutOpenBracket
e ### ***
22/phtd.§15. Note that nested brackets are allowed in the kind indication after the hyphen, and this is
sorely needed with complicated functional kinds.
hphrase-token-declarationi ::=
a *** ( *** - ...... | ! C22TokenWithNestedBrackets
b ...... - hspec-phrase-token-typei |
c ...... - hspec-kind-as-name-tokeni |
d ...... - ...... | ! C22BadTypeIndication
e hspec-kind-as-name-tokeni |
f ...... ! C22TokenMisunderstood
Chapter 22: Phrases 174
22/phtd.§30. The control structures of Inform are defined in the Standard Rules. Before the coming of
Python-style indentation to Inform, blocks of code were closed with “end...” phrases: “end if”, “end repeat”
and “end while”. In fact these are still valid, for accessibility reasons, and the following construction makes
the end phrase for a given control structure.
hend-phrase-constructioni ::=
a end ...
Chapter 22: Phrases 175
22/phod.§2. I have to say that I regret the syntax for phrase options, which makes us write commas like
the one here:
let R be the best route from X to Y, using doors;
I sometimes even regret the existence of phrase options, but it must be admitted that they are a clean way to
interface to low-level Inform 6 code. But it’s mostly the comma which annoys me (making text substitutions
unable to support phrase options); I should have gone for brackets.
The syntax for declaring phrase options is uncontroversial – it’s just a list of names – but there are wrinkles:
if the list is divided with “or” then the options are mutually exclusive, but with “and/or” they’re not. For
example, in:
To decide which object is best route from (R1 - object) to (R2 - object), using doors or using even
locked doors: ...
the following parses this list:
using doors or using even locked doors
and creates two options with hphrase-option-declaration-setting-entryi.
hphrase-option-declaration-listi ::=
a ... | match only when looking ahead
b hphrase-option-declaration-setting-entryi hphrase-option-declaration-list-taili |
c hphrase-option-declaration-setting-entryi
hphrase-option-declaration-list-taili ::=
a , _or hphrase-option-declaration-listi |
b , \and/or hphrase-option-declaration-listi |
c _,/or hphrase-option-declaration-listi |
d \and/or hphrase-option-declaration-listi
hphrase-option-declaration-setting-entryi ::=
a ...
22/phod.§4. When setting options, in an actual use of a phrase, the list is divided by “and”:
hphrase-option-listi ::=
a ... | match only when looking ahead
b hphrase-option-setting-entryi hphrase-option-list-taili |
c hphrase-option-setting-entryi
hphrase-option-list-taili ::=
a , _and hphrase-option-listi |
b _,/and hphrase-option-listi
hphrase-option-setting-entryi ::=
a hphrase-optioni |
b ... ! C22NotAPhraseOption or C22NotTheOnlyPhraseOption
22/phod.§6. The following matches any single phrase option for the phrase being used.
hphrase-optioni internal
Chapter 22: Phrases 176
22/phsf.§4. When a calling is found in, for instance, a description like this:
a body which is part of a person (called the owner)
the text after “called” is run through the following.
Note that production (b) of hnew-called-name-unarticledi checks to see if the name already has a meaning.
However, a match against (b) is disregarded if the meaning is one of those allowed to be overridden: at
present, a global variable, an object name, a table column name, a property name or a description.
hnew-called-namei ::=
a *** - *** | ! C22CalledWithDash
b hdefinite-articlei hnew-called-name-unarticledi |
c hnew-called-name-unarticledi
hnew-called-name-unarticledi ::=
a hexisting-local-namei |
b hspec-type-expression-or-valuei |
c ...
hexisting-local-namei internal
Chapter 22: Phrases 177
22/cinv.§6. Inline phrase definitions consist of raw Inform 6 code into which “inline substitutions” are
dropped; they’re rather like text with text substitutions. For example:
To print (something - text) : (- print (PrintText) something; -).
Here the inline definition is "print (PrintText) {something};" and the braced part, {something}, is a sub-
stitution. This is usually the name of one of the tokens in the phrase preamble, as it is here.
It can also be annotated using certain markers private to the Standard Rules, but those are in English only,
and not parsed by Preform, so they don’t appear in the grammar.
The unannotated text (here “something”) must match the following.
The name of any individual phrase option (valid in the phrase now being invoked) expands to true or false
according to whether it has been used; the fixed text “phrase options” expands to the whole bitmap.
hinline-substitutioni ::=
a phrase options |
b hphrase-optioni |
c hname-local-to-inline-stack-framei |
d ... ! C22BadInlineExpansion
22/cinv.§7. This matches one of the token names in the preamble to the inline definition.
hname-local-to-inline-stack-framei internal
Chapter 22: Phrases 178
22/phin.§5. The Standard Rules contain such a profusion of phrase definitions that, without making use
of subheadings, the Phrasebook Index would be a shapeless list in which it was impossible to find things.
So the indexer in fact looks at headings in the source text and attempts to group definitions by them. In
particular, in the Standard Rules, it looks for headings with this form:
Blah blah blah - Major title - Minor title
For example, we might have
Section SR5/3/2 - Control phrases - While
which would match the first production below. The first piece is discarded, and the second and third pieces
used as headings and subheadings respectively.
hheading-with-parenthesisi ::=
a {hheading-name-hyphenatedi} ( hdefinite-articlei ... ) |
b {hheading-name-hyphenatedi} ( ... ) |
c {hheading-name-hyphenatedi}
hheading-name-hyphenatedi ::=
a ... - ... - ... |
b ... - ... |
c ...
Chapter 22: Phrases 179
22/def.§1. The following is used to deal with adjective definitions. In the simple example:
Definition: A container is significant if it contains something.
we recognise this as a definition because its preamble consists just of that one word:
hdefinition-headeri ::=
a definition
22/def.§2. Having got that far, Inform descends to the body of the definition:
A container is significant if it contains something
and applies the following grammar. This parsing happens very early in Inform’s run, before most of the kinds
are created; but eventually the text of the domain is expected to match hk-kindi. The text of the condition
in productions (a) and (b) in hadjective-definitioni can have various di↵erent forms. For timing reasons, we
don’t parse it this way, but it’s as if it had to match one of the following list of choices:
(1) hmeasurement-adjective-definitioni
(2) hinform6-routine-adjective-definitioni
(3) hinform6-condition-adjective-definitioni
(4) hspec-conditioni
At any rate, it will eventually have to make sense, but not yet.
Production (c) here looks useless, but is intended to catch cases like this:
Definition: a container is roomy rather than poky: ...
where the material at ... is a phrase determining the truth of the definition. (This was a very early feature of
Inform, and one I think the language could drop without much loss. No comparable feature exists for binary
predicates, so it seems odd to have it for unary predicates, and the doubled use of colons is unfortunate.)
hadjective-definitioni ::=
a hadjective-domaini is/are hadjective-wordingi if ... |
b hadjective-domaini is/are hadjective-wordingi unless ... |
c hadjective-domaini is/are hadjective-wordingi
hadjective-domaini ::=
a ... ( called the ... ) |
b ... ( called ... ) |
c ...
hadjective-wordingi ::=
a ... rather than ... |
b ...
22/def.§6. I6-defined routine adjectives. This little grammar is one of the possible conditions at the tail
of the above. It catches definitions delegated to Inform 6 routines.
hinform6-routine-adjective-definitioni ::=
a i6 routine {hquoted-text-without-subsi} says so ( ... ) |
b i6 routine {hquoted-text-without-subsi} makes it so ( ... )
22/def.§8. I6-defined condition adjectives. And this grammar catches definitions delegated to Inform 6
conditions.
hinform6-condition-adjective-definitioni ::=
a i6 condition hquoted-text-without-subsi says so ( ... )
Chapter 23: Rules and Rulebooks 180
23/rb.§1. When a rulebook is to be created, we do a little treatment on its name. We remove any article,
and also strip o↵ the suffix “rules” or “rulebook” as redundant – see below for why. Since we want to insure
that phrase/rule preambles are unambiguous, we also want to make sure that keywords introducing phrase
definitions and timed events don’t open the rulebook name.
hnew-rulebook-namei ::=
a hdefinite-articlei hnew-rulebook-namei |
b hnew-rulebook-namei rules/rulebook |
c at *** | ! C23RulebookWithAt
d to *** | ! C23RulebookWithTo
e definition *** | ! C23RulebookWithDefinition
f ...
23/rb.§5. When a rulebook is created – say, “coordination” – Inform constructs alternative names for it
using the following – say, making “coordination rules” and “coordination rulebook”:
hrulebook-name-constructioni ::=
a ... rules |
b ... rulebook
23/rb.§9. Any new rulebook variable name is vetted by being run through this:
hrulebook-variable-namei ::=
a hunfortunate-namei | ! C23RulebookVariableAnd
b ...
23/rb.§13. The following internal finds the “stem” of a rule, that is, the part which identifies which
rulebook it will go into. For example, in
Before printing the name of the peach: ...
Instead of eating: ...
the stems are “before printing the name” and “instead”. It makes use of hrulebook-stem-inneri below, and
then does some direct parsing.
hrulebook-stemi internal
Chapter 23: Rules and Rulebooks 181
hrulebook-stem-inneri ::=
a hindefinite-articlei hrulebook-stem-inner-unarticledi |
b hdefinite-articlei hrulebook-stem-inner-unarticledi |
c hrulebook-stem-inner-unarticledi
hrulebook-stem-inner-unarticledi ::=
a rule for/about/on hrulebook-stem-namei |
b rule hrulebook-stem-namei |
c first hrulebook-stem-namei |
d last hrulebook-stem-namei |
e hrulebook-stem-namei
hrulebook-stem-namei ::=
a {when ... begins} | scenes plugin
b {when ... ends} | scenes plugin
c ...
23/rb.§18. Rulebooks do not have properties as such. The syntax which would create these creates
rulebook variables instead, which are much more useful. However, we do allow the following syntax:
Visibility rules have outcomes there is sufficient light (failure) and there is insufficient light (success).
where Inform sees that the subject (“visibility rules”) is a rulebook, and parses the object noun phrase with
the following:
hrulebook-propertyi ::=
a outcome/outcomes hrulebook-outcome-listi |
b default hrulebook-default-outcomei |
c ... ! C23NonOutcomeProperty
Chapter 23: Rules and Rulebooks 182
23/focus.§2. There are only three nameless outcomes: a rulebook can end in success, in failure, or with
no outcome. Any of these can be the default outcome, that is, can be what rulebook does if it none of its
rules cause an outcome.
hrulebook-default-outcomei ::=
a hrule-outcomei |
b ... ! C23BadDefaultOutcome
hrule-outcomei ::=
a success |
b failure |
c no outcome
23/focus.§6. Rulebooks can alternatively supply any number of named outcomes, though each of these
still has one of the three results noted above; which will be “success” unless it’s explicitly given.
The following parses a declaration of named outcomes. For example:
there is sufficient light (failure) and there is insufficient light (success)
hrulebook-outcome-listi ::=
a ... | match only when looking ahead
b hrulebook-outcome-setting-entryi hrulebook-outcome-list-taili |
c hrulebook-outcome-setting-entryi
hrulebook-outcome-list-taili ::=
a , _and/or hrulebook-outcome-listi |
b _,/and/or hrulebook-outcome-listi
hrulebook-outcome-setting-entryi ::=
a hform-of-named-rule-outcomei
hform-of-named-rule-outcomei ::=
a ... ( hrule-outcomei - the default ) |
b ... ( hrule-outcomei - default ) |
c ... ( hrule-outcomei ) |
d ... ( ... ) | ! C23BadOutcomeClarification
e ...
Chapter 23: Rules and Rulebooks 183
23/rps.§2. In order to parse sentences about how rules are placed in rulebooks, we need to be able to
parse the relevant names. (The definite article can optionally be used.)
hrulebook-namei internal
hrule-namei internal
hsubstitutes-for-sentence-subjecti ::=
a hrule-namei |
b ... ! C23NoSuchRuleExists
hsubstitutes-for-sentence-objecti ::=
a hrule-namei |
b ... ! C23NoSuchRuleExists
hdoes-nothing-sentence-subjecti ::=
a hrule-namei |
b ... ! C23NoSuchRuleExists
23/rps.§9. Explicit listing sentences allow the source text to control which rulebook(s) a given rule appears
in, and (within limits) where. A simple example:
The can’t act in the dark rule is not listed in the visibility rules.
The subject noun phrase is an articled list, each entry of which must match:
hlisted-in-sentence-subjecti ::=
a hrule-namei |
b ... ! C23NoSuchRuleExists
Chapter 23: Rules and Rulebooks 184
hlisted-in-sentence-objecti ::=
a in any rulebook |
b in hdestination-rulebooki |
c first in hdestination-rulebooki |
d last in hdestination-rulebooki |
e instead of ho↵set-rulei in hdestination-rulebooki |
f before ho↵set-rulei in hdestination-rulebooki |
g after ho↵set-rulei in hdestination-rulebooki |
h instead of ... | ! C23UnspecifiedRulebookPlacement
i before ... | ! C23UnspecifiedRulebookPlacement
j after ... | ! C23UnspecifiedRulebookPlacement
k ... ! C23ImproperRulePlacement
ho↵set-rulei ::=
a hrule-namei |
b ... ! C23NoSuchRuleExists
hdestination-rulebooki ::=
a hrulebook-namei |
b ... ! C23NoSuchRulebookPlacement
Chapter 24: Actions and Activities 185
24/chron.§3. Historical references are textual indications that a condition compares the present state with
past states: for example,
twice
for more than the third time
Note that every HR contains one of the words below, so that if hhistorical-reference-possiblei fails on an excerpt
then it cannot contain any HR; this cuts down our parsing time considerably.
hhistorical-reference-possiblei ::=
a *** once/twice/thrice/turn/turns/time/times
hhistorical-referencei ::=
a for hrepetition-specificationi |
b hrepetition-specificationi
hrepetition-specificationi ::=
a only/exactly hrepetitionsi |
b at most hrepetitionsi |
c less than hrepetitionsi |
d at least hrepetitionsi |
e more than hrepetitionsi |
f under hrepetitionsi |
g over hrepetitionsi |
h hrepetitionsi
hrepetitionsi ::=
a hiteration-repetitionsi |
b hturn-repetitionsi
hiteration-repetitionsi ::=
a once |
b twice |
c thrice |
d hrep-numberi to hrep-numberi time/times |
e hrep-numberi time/times
hturn-repetitionsi ::=
a hrep-numberi to hrep-numberi turn/turns |
b hrep-numberi turn/turns
hrep-numberi ::=
a hdefinite-articlei hordinal-numberi |
b hordinal-numberi |
c hcardinal-numberi
Chapter 24: Actions and Activities 186
24/act.§9. This is an action name which Inform provides special support for; it recognises the English
name when defined by the Standard Rules. (So there is no need to translate this to other languages.)
hnotable-actionsi ::=
a going
24/act.§10. When we want to refer to an action name as a noun, we can use this to make that explicit:
for instance, “taking” becomes “the taking action”.
haction-name-constructioni ::=
a ... action
24/act.§12. The “action pronoun” use of “it” is to be a placeholder in an action name to indicate where
a noun phrase should appear. Some actions apply to only one noun: for instance, in
taking the box
the action name is “taking”. Others apply to two nouns:
unlocking the blue door with the key
has action name “unlocking it with”. Inform always places one noun phrase after the action name, but if it
sees haction-pronouni in the action name then it places a second noun phrase at that point. (Any accusative
pronoun will do: it doesn’t have to be “it”.)
haction-pronouni ::=
a haccusative-pronouni
24/act.§14. And the following matches an action name (with no substitution of noun phrases: “unlocking
the door with” won’t match the unlocking action; only “unlocking it with” will do that).
haction-namei internal
24/act.§15. However, haction-namei can also be made to match an action name without a final preposition,
if that preposition is on the following list. For example, it allows “listening” to match the listening to action;
this is needed because of the almost unique status of “listening” in having an optional noun. (Unabbreviated
action names always win if there’s an ambiguity here: i.e., if there is a second action called just “listening”,
then that’s what “listening” will match.)
haction-optional-trailing-prepositionsi ::=
a ... to
Chapter 24: Actions and Activities 187
24/act.§18. Action variables can optionally be marked as able to extend the grammar of action patterns.
For example, the Standard Rules define:
The exiting action has an object called the container exited from (matched as ”from”).
and this allows “exiting from the cage”, say, as an action pattern.
haction-variablei ::=
a haction-variable-namei ( matched as {hquoted-text-without-subsi} ) |
b haction-variable-namei ( ... ) | ! C24BadMatchingSyntax
c haction-variable-namei
24/act.§19. And the new action variable name is vetted by being run through this:
haction-variable-namei ::=
a hunfortunate-namei | ! C24ActionVarAnd
b ...
24/act.§25. We now come to a quite difficult sentence to parse: the declaration of a new action.
Inserting it into is an action applying to two things.
Verifying the story file is an action out of world and applying to nothing.
The subject noun phrase needs little further parsing – it’s the name of the action to be created.
haction-sentence-subjecti ::=
a haction-namei | ! C24ActionAlreadyExists
b ...
24/act.§27. The object NP is trickier, because it is a sequence of “action clauses” which can occur in any
order, which are allowed but not required to be delimited as a list, and which can inconveniently contain the
word “and”; not only that, but note that in
applying to one thing and one number
the initial text “applying to one thing” would be valid as it stands. It’s convenient to define a single action
clause first:
haction-clausei ::=
a out of world |
b abbreviable |
c with past participle ... |
d applying to haction-applicationsi |
e requiring light
haction-applicationsi ::=
a nothing |
b one hact-reqi and one hact-reqi |
c one hact-reqi and hact-reqi |
d hact-reqi and one hact-reqi |
e hact-reqi and hact-reqi |
f one hact-reqi |
g two hact-reqi |
h hact-reqi |
i ... ! C24ActionMisapplied
Chapter 24: Actions and Activities 188
hact-reqi ::=
a haction-accessi hk-kindi |
b hk-kindi
haction-accessi ::=
a visible |
b touchable |
c carried
24/act.§28. We are now able to define this peculiar form of list of action clauses:
haction-sentence-objecti ::=
a haction-clausesi |
b ... ! C24ActionClauseUnknown
haction-clausesi ::=
a ... | match only on lookahead
b haction-clausesi haction-clause-terminatedi |
c haction-clause-terminatedi
haction-clause-terminatedi ::=
a haction-clausei , and |
b haction-clausei and |
c haction-clausei , |
d haction-clausei
Chapter 24: Actions and Activities 189
haction-listi ::=
a doing something/anything other than hanl-excludedi |
b doing something/anything except hanl-excludedi |
c doing something/anything to/with hanl-to-taili |
d doing something/anything |
e doing something/anything ... | ! fail
f hanli
hanl-excludedi ::=
a hanli to/with ... |
b hanli
hanl-to-taili ::=
a hanl-operandi hanl-in-taili |
b hanl-operandi
hanl-operandi ::=
a ...
hanl-in-taili ::=
a fixed in place *** | ! fail and skip
b is/are/was/were/been/listed in *** | ! fail and skip
c in ...
hanli ::=
a hanl-entryi hanl-taili |
b hanl-entryi
hanl-taili ::=
a , _or hanli |
b _,/or hanli
Chapter 24: Actions and Activities 190
24/anl.§8. Which reduces us to an internal nonterminal for an entry in this list. It actually produces
multiple matches: for example,
taking inventory
will result in a list of two possibilities – “taking inventory”, the action, with no operand; and “taking”,
the action, applied to the operand “inventory”. (It’s unlikely that the last will succeed in the end, but it’s
syntactically valid.)
hanl-entryi internal
Chapter 24: Actions and Activities 191
24/ap.§7. Action patterns are textual descriptions which act as predicates on actions, that is, they are
descriptions which are true of some actions and false of others. For example,
taking something in a dark room
won’t be true of taking the ball in the Beach, or of dropping the torch in the Cellars. Although precisely
described actions are valid as APs:
taking the beach ball
(which is true for this one action and false for all others), APs can be both more general – as above – and
even more specific:
taking the beach ball in the presence of a lifeguard
...which might not be true even if the current action is “taking the beach ball”.
APs can be very flexible and have the most complicated syntax in Inform. It’s not practical to make the
Preform grammar as explicit as one might like, but we’ll do our best. The top level establishes who the actor
will be, and whether it is an actual action or merely a request to perform the action. There are two versions
of this: the first is for contexts where the AP might occur as a noun (e.g., in a sentence like “Taking a jewel
is felonious behaviour.”). These are always present tense, and can’t be negated.
haction-patterni ::=
a asking haction-parameteri to try haction-pattern-corei |
b haction-parameteri trying haction-pattern-corei |
c an actor trying haction-pattern-corei |
d an actor haction-pattern-corei |
e trying haction-pattern-corei |
f haction-pattern-core-actori
24/ap.§8. The second version is for contexts where the AP occurs as a condition: e.g., in a sentence like
“if we have taken a jewel”. Since these can occur in both tenses and can be negated (“if we are not taking
a jewel”), there are four combinations:
hwe-are-action-patterni ::=
a we are asking haction-parameteri to try haction-pattern-corei |
b asking haction-parameteri to try haction-pattern-corei |
c haction-parameteri trying haction-pattern-corei |
d an actor trying haction-pattern-corei |
e an actor haction-pattern-corei |
f we are trying haction-pattern-corei |
g trying haction-pattern-corei |
h we are haction-pattern-corei |
i haction-pattern-core-actori
haction-pattern-negatedi ::=
a we are not asking haction-parameteri to try haction-pattern-corei |
b not asking haction-parameteri to try haction-pattern-corei |
c haction-parameteri not trying haction-pattern-corei |
d an actor not trying haction-pattern-corei |
e an actor not haction-pattern-corei |
f we are not trying haction-pattern-corei |
g not trying haction-pattern-corei |
h we are not haction-pattern-corei |
Chapter 24: Actions and Activities 192
i not haction-pattern-core-actori
haction-pattern-pasti ::=
a we have asked haction-parameteri to try haction-pattern-corei |
b haction-parameteri has tried haction-pattern-corei |
c an actor has tried haction-pattern-corei |
d an actor has haction-pattern-past-corei |
e we have tried haction-pattern-corei |
f we have haction-pattern-past-corei
haction-pattern-past-negatedi ::=
a we have not asked haction-parameteri to try haction-pattern-corei |
b haction-parameteri has not tried haction-pattern-corei |
c an actor has not tried haction-pattern-corei |
d an actor has not haction-pattern-past-corei |
e we have not tried haction-pattern-corei |
f we have not haction-pattern-past-corei
24/ap.§9. There is one more tweak at this top level. Inform allows an ambiguous but shorter and more
natural syntax in which the actor’s name simply appears at the front of the AP:
Ra✏es taking a jewel
Here there are no textual markers like “trying” to separate the actor’s name (“Ra✏es”) from the action itself
(“taking a jewel”), and all we can do is search out possibilities. If it’s possible to match the action without
an initial actor name, that takes priority, to ensure that this actorless possibility can always be written.
haction-pattern-core-actori ::=
a haction-pattern-corei |
b hactor-descriptioni haction-pattern-corei
24/ap.§10. And this voracious token matches the actor’s name as an initial excerpt, which is much faster
than exhaustive searching. It tries to break just before any “-ing” word (i.e., participle) which is not inside
parentheses; but only if the resulting name matches haction-parameteri as a constant, variable, or description;
and there is no match if the text is the name of an instance but the “-ing” word could also be read as part
of that same name. For example, if we read the text
angry waiting man taking the fish
where “angry waiting man” is the name of an individual person, then we don’t break this after “angry”
(with the action “waiting”) even though “angry” would match as an abbreviated form of the name of “angry
waiting man”.
hactor-descriptioni internal
Chapter 24: Actions and Activities 193
24/ap.§11. That completes the top level, and we can forget about actors. All of those productions come
down now to just two nonterminals, one for the present tense,
taking or dropping a container
and one for the past,
taken or dropped a container
These are written as internals so that they can set a flag to change the current tense as appropriate, but
they don’t otherwise do much:
(a) They trim away an indication of duration using hhistorical-referencei, so that, e.g., “taking the box for
the third time” has “for the third time” trimmed away;
(b) They match haction-pronominali as the most recently parsed action pattern;
(c) But otherwise they hand over to hap-common-corei to do the work.
haction-pattern-corei internal
haction-pattern-past-corei internal
24/ap.§12. “Doing it” is not the happiest of syntaxes. The idea is for this to be a sort of pronoun for
actions, allowing for anaphora, but to parse such things naturally in all cases is wishful thinking. It enables
us to write, e.g.:
Instead of Peter taking the box for the second time, try Jane doing it.
where “doing it” will refer to “taking the box”. But I wonder if the possibility for confusion is too great;
perhaps we should just cut this idea.
haction-pronominali ::=
a doing it
24/ap.§14. Anyway, we are now down to level 3: all action patterns have been whittled down to a single
use of hap-common-corei. Our next step is to recognise a condition attached with “when”:
hap-common-corei ::=
a hap-common-core-inneri when/while hcondition-in-api |
b hap-common-core-inneri |
c ... when/while hcondition-in-api | used only to diagnose problems
d ... when/while ... used only to diagnose problems
24/ap.§15. hcondition-in-api is really just hspec-conditioni in disguise – i.e., it matches a standard Inform
condition – but it’s implemented as an internal to enable Inform to set up a stack frame if there isn’t one
already, and so on.
hcondition-in-api internal
hap-common-core-inneri ::=
a hap-common-core-inner-inneri in the presence of haction-parameteri |
b hap-common-core-inner-inneri
Chapter 24: Actions and Activities 194
24/ap.§17. Level 5 now. The initial “in” clause, e.g., “in the Pantry”, requires special handling to prevent
it from clashing with other interpretations of “in” elsewhere in the grammar. It’s perhaps unexpected that
“in the Pantry” is valid as an AP, but this enables many natural-looking rules to be written (“Report rule
in the Pantry: ...”, say).
We also handle named patterns (“behaving suspiciously”, say), and those too can have restrictions on their
location (“behaving suspiciously in the Dining Room”).
hap-common-core-inner-inneri ::=
a in haction-parameteri |
b hnamed-action-patterni |
c hnamed-action-patterni in haction-parameteri |
d hap-common-core-inner-inner-inneri
hnamed-action-patterni internal
24/ap.§21. And that’s as far down as we go: to level 6. Most of the complexity is gone now, but what’s left
can’t very efficiently be written in Preform. Essentially we apply haction-listi to the text and then parse the
operands using haction-operandi, though it’s a bit more involved because we also recognise optional suffixes
special to individual actions, like the “from the cage” in “exiting from the cage”, and we fail the result if it
produces inconsistencies between alternative actions (e.g., “taking or waiting the box” makes no sense since
only one is transitive).
hap-common-core-inner-inner-inneri internal
24/ap.§22. The “operands” of an action pattern are the nouns to which it applies: for example, in “Kevin
taking or dropping something”, the operand is “something”. We treat words like “something” specially to
avoid them being read as “some thing” and thus forcing the kind of the operand to be “thing”.
haction-operandi ::=
a something/anything |
b something/anything else |
c haction-parameteri
hgoing-action-irregular-operandi ::=
a nowhere |
b somewhere
hunderstanding-action-irregular-operandi ::=
a something/anything |
b it
24/ap.§23. Finally, then, haction-parameteri. Almost anything syntactically matches here – a constant, a
description, a table entry, a variable, and so on.
haction-parameteri ::=
a hspec-type-expression-or-valuei
Chapter 24: Actions and Activities 195
24/av.§1. Activities are much simpler to create than actions. For example,
Announcing something is an activity on numbers.
The object phrase (here “an activity on numbers”) is required to match hk-kindi and, moreover, to be an
activity kind, but we don’t parse it here. What we do instead is to work on the subject phrase (here
“announcing something”):
hactivity-sentence-subjecti ::=
a hactivity-notedi ( hdocumentation-symboli ) |
b hactivity-notedi
hactivity-notedi ::=
a hactivity-new-namei ( future action ) |
b hactivity-new-namei ( ... ) | ! C24ActivityNoteUnknown
c hactivity-new-namei
hactivity-new-namei ::=
a ... of something/anything |
b ... something/anything |
c ...
24/av.§2. Once a new activity has been created, the following is used to make a noun for it; for example,
the “announcing activity”.
hactivity-name-constructioni ::=
a ... activity
24/av.§5. Any new activity variable name is vetted by being run through this:
hactivity-variable-namei ::=
a hunfortunate-namei | ! C24ActivityVarAnd
b ...
Chapter 24: Actions and Activities 196
24/av.§9. Run-time contexts are seen in the “while” clauses at the end of rules. For example:
Rule for printing the name of the lemon sherbet while listing contents: ...
Here “listing contents” is the context. These are like action patterns, but much simpler to parse – an or-
divided list of activities can be given, with or without operands; “not” can be used to negate the list; and
ordinary conditions are also allowed, as here:
Rule for printing the name of the sack while the sack is not carried: ...
where “the sack is not carried” is also a hrun-time-contexti even though it mentions no activities.
hrun-time-contexti ::=
a not hactivity-list-unnegatedi |
b hactivity-list-unnegatedi
hactivity-list-unnegatedi ::=
a ... | match only when looking ahead
b hactivity-list-entryi hactivity-list-taili |
c hactivity-list-entryi
hactivity-list-taili ::=
a , _or hrun-time-contexti |
b _,/or hrun-time-contexti
hactivity-list-entryi ::=
a hactivity-namei |
b hactivity-namei of hactivity-operandi |
c hactivity-namei hactivity-operandi |
d hspec-conditioni
24/av.§10. The optional operand handles “something” itself in productions (a) and (b) in order to prevent
it from being read as a description at production (c). This prevents “something” from being read as “some
thing”, that is, it prevents Inform from thinking that the operand value must have kind “thing”.
If we do reach (c), the expression is required to be a value, or description of values, of the kind to which the
activity applies.
hactivity-operandi ::=
a something/anything |
b something/anything else |
c hspec-type-expression-or-valuei
hactivity-namei internal
Chapter 25: Command Grammar 197
25/tfg.§5. Understand sentences take three di↵erent forms – so di↵erent, in fact, that we will parse the
subject NP to see which form we have, and only then parse the object NP (using a di↵erent grammar for
each of the three forms). As examples:
Understand ”photograph [something]” as photographing.
Understand the command ”access” as ”open”.
Understand the unbroken property as describing the pot.
hunderstand-sentence-subjecti ::=
a hunderstand-property-listi |
b the command/commands hunderstand-regular-listi |
c the verb/verbs ... | ! C25OldVerbUsage
d hunderstand-regular-listi
hunderstand-regular-listi ::=
a ... | match only when looking ahead
b hunderstand-regular-entryi hunderstand-regular-list-taili |
c hunderstand-regular-entryi
hunderstand-regular-list-taili ::=
a , _and/or hunderstand-regular-listi |
b _,/and/or hunderstand-regular-listi
hunderstand-regular-entryi ::=
a ...
25/tfg.§8. In the third case, the subject NP is a list of property names written in the formal way (with
“property”).
hunderstand-property-listi ::=
a ... | match only when looking ahead
b hunderstand-property-entryi hunderstand-property-list-taili |
c hunderstand-property-entryi
hunderstand-property-list-taili ::=
a , _and/or hunderstand-property-listi |
b _,/and/or hunderstand-property-listi
hunderstand-property-entryi ::=
a hproperty-namei property |
b ... property ! C25UnknownUnderstandProperty
Chapter 25: Command Grammar 198
25/tfg.§14. Now we turn to the object phrase. As noted above, we use three di↵erent grammars for this;
one for each of the possible subject phrase forms. The first is the most popularly used:
Understand ”take [something]” as taking.
It’s not widely known, but the object phrase here can be a list.
hunderstand-sentence-objecti ::=
a hunderstand-sentence-object-uncondi when/while ... |
b hunderstand-sentence-object-uncondi
hunderstand-sentence-object-uncondi ::=
a ... | match only when looking ahead
b hunderstand-sentence-entryi hunderstand-sentence-object-taili |
c hunderstand-sentence-entryi
hunderstand-sentence-object-taili ::=
a , _and/or hunderstand-sentence-object-uncondi |
b _,/and/or hunderstand-sentence-object-uncondi
hunderstand-sentence-entryi ::=
a hunderstand-as-thisi
25/tfg.§17. Each of the items in the object phrase list is matched against:
hunderstand-as-thisi ::=
a ... | match only when looking ahead
b a mistake |
c a mistake ( hquoted-texti ) |
d a mistake ... | ! C25TextlessMistake
e the plural of hunderstand-refi |
f plural of hunderstand-refi |
g hquoted-texti |
h hunderstand-refi ( with nouns reversed ) |
i hunderstand-refi
hunderstand-refi ::=
a haction-namei |
b hspec-descriptive-type-expressioni |
c ... ! C25UnderstandVague
25/tfg.§22. The second form of the sentence has an object phrase like so:
Understand the command ”snatch” as ”take”.
Here the grammar is very simple, and the object can’t be a list.
hunderstand-command-sentence-objecti ::=
a ... when/while ... | ! C25UnderstandCommandWhen
b something new |
c hquoted-texti |
d ... ! C25NotOldCommand
Chapter 25: Command Grammar 199
25/tfg.§25. The third and final form of the sentence has an object phrase like so:
Understand the unbroken property as describing the pot.
Once again, the object can’t be a list. Syntactically the item(s) referred to or described can be of any kind,
but in fact we restrict to kinds of object.
hunderstand-property-sentence-objecti ::=
a hunderstand-property-sentence-object-unconditionali when/while ... |
b hunderstand-property-sentence-object-unconditionali
hunderstand-property-sentence-object-unconditionali ::=
a referring to hunderstand-property-referencei |
b describing hunderstand-property-referencei |
c ... ! C25BadUnderstandProperty
hunderstand-property-referencei ::=
a hk-kindi |
b hinstance-of-objecti |
c ... ! C25BadUnderstandPropertyAs
Chapter 25: Command Grammar 200
25/gprop.§3. These are variable names to do with “Understand...” which Inform provides special support
for; it recognises the English names when they are defined by the Standard Rules or, in the case of “the X
understood”, by Inform itself. (So there is no need to translate this to other languages.)
hnotable-parsing-variablesi ::=
a hk-kindi understood |
b noun |
c location |
d actor-location |
e second noun |
f person asked |
g maximum score |
h parameter-object
Chapter 25: Command Grammar 201
25/gtok.§1. Tokens are created when text such as “drill [something] with [something]” is parsed, from an
Understand sentence or elsewhere. What happens is much the same as when text with substitutions is read:
that produces
”drill”, something, ”with”, something
and the following little grammar is used to divide this text up into its four constituent tokens.
hgrammar-token-breakingi ::=
a ... , ... |
b hquoted-texti |
c ...
25/gtok.§7. The tokens which aren’t literal words in double-quotes are parsed as follows:
hgrammar-tokeni ::=
a hnamed-grammar-tokeni |
b any hspec-descriptioni |
c any hspec-kindi |
d something related by reversed hrelation-namei |
e something related by hrelation-namei |
f something related by ... | ! C25GrammarBadRelation
g hstandard-grammar-tokeni |
h hspec-instancei |
i hspec-descriptioni |
j hspec-kindi |
k hspec-type-expressioni | ! C25BizarreToken
l ... ! C25UnknownToken
hstandard-grammar-tokeni ::=
a something |
b anything |
c things |
d things inside |
e things preferably held |
f something preferably held |
g other things |
h someone |
i somebody |
j anybody |
k anyone |
l text |
m topic | ! C25UseTextNotTopic
n a topic | ! C25UseTextNotTopic
o object | ! C25UseThingNotObject
p an object | ! C25UseThingNotObject
q something held | ! something held
r things held ! things held
hnamed-grammar-tokeni internal
Chapter 25: Command Grammar 202
htest-sentence-subjecti ::=
a hinternal-test-case-namei ( internal ) |
b ### ( internal ) | ! C25UnknownInternalTest
c ### |
d ... ! C25TestMultiWord
25/test.§4. These test case names are in English only and may change at any time without notice.
hinternal-test-case-namei ::=
a headline |
b sentence |
c description |
d dimensions |
e evaluation |
f equation |
g article |
h verb |
i adjective |
j participle |
k kind |
l map
25/test.§6. The object NP is usually just a quoted script, but it can be more elaborate:
Test me with ”x egg” in Timbuktu holding the egg.
htest-sentence-objecti ::=
a hquoted-texti |
b hquoted-texti htest-case-circumstance-listi |
c ... ! C25TestBadRequirements
htest-case-circumstance-listi ::=
a ... |
b htest-case-circumstance-listi htest-case-circumstancei |
c htest-case-circumstancei
htest-case-circumstancei ::=
a in hinstance-of-objecti |
b holding/and/, hinstance-of-objecti |
c in ... | ! C25TestBadRequirements
d holding/and/, ... | ! C25TestBadRequirements
e with ... ! C25TestDoubleWith
Chapter 26: Multimedia Plugins 203
26/fig.§5. This is a figure name which Inform provides special support for; it recognises the English name
when it is defined by the Standard Rules. (So there is no need to translate this to other languages.)
hnotable-figuresi ::=
a of cover art
Chapter 26: Multimedia Plugins 204
hexternal-file-sentence-subjecti ::=
a hdefinite-articlei hexternal-file-sentence-subjecti |
b text hexternal-file-namei |
c binary hexternal-file-namei |
d hexternal-file-namei
hexternal-file-namei ::=
a {file ...} ( owned by hexternal-file-owneri ) |
b {file ...}
hexternal-file-owneri ::=
a another project |
b project {hquoted-text-without-subsi} |
c ... ! C26BadFileOwner
26/exf.§6. The object NP is simply quoted text. Although the Preform grammar doesn’t go into this level
of detail, it’s actually required to have 3 to 23 English letters or digits, with the first being a letter.
hexternal-file-sentence-objecti ::=
a hquoted-texti |
b ... ! C26FilenameNotTextual
Chapter 27: Configuration and Control 205
27/plugs.§1. Although Inform was specifically written to create programs within a complex and unusual
domain (interactive fiction), almost all of its code is quite general, and could be used for any natural-language
programming.
We want to facilitate possible future uses of Inform in domains other than IF, and in any case it seems good
design to isolate generic linguistic assumptions from those which are based on contextual knowledge of a
given domain.
“Core” is the core of the Inform language, the largest part, which is compulsorily included. “Interactive
fiction” is an anthology of all of the rest – using it uses all of them.
For now, at least, these names should not be translated out of English.
hplugin-namei ::=
a core |
b interactive fiction |
c naming |
d instance counting |
e command |
f actions |
g spatial model |
h mapping |
i player |
j regions |
k backdrops |
l showme |
m times of day |
n scenes |
o figures |
p sounds |
q glulx external files |
r bibliographic data
27/plugs.§2. And the following matches if and only if the text in question is (a) a valid plugin name, and
(b) the name of a plugin which is being used at present.
hlanguage-elementi ::=
a hplugin-namei
Chapter 27: Configuration and Control 206
27/plugs.§6. Although most of Inform’s brain remains the same, the outermost part can be put together
from whatever skills are required: our modular oblongata, if you will. So, in principle, sentences like:
Use regions language element.
Use no figures language element.
can change the current setup. (In practice, these aren’t very useful at present, at least, because the I6
template won’t compile under most combinations; so this is really a provisional feature for now.)
“Core” is a special case. It can’t be removed; explicitly writing
Use core language element.
unplugs all other plugins, reducing Inform to a non-IF language entirely.
The subject noun phrase is an articled list, and each entry is parsed with the following.
huse-language-element-sentence-subjecti ::=
a no hplugin-namei |
b hplugin-namei |
c ... ! C27NoSuchLanguageElement
Chapter 27: Configuration and Control 207
27/index.§1. Here is an index to all of the Perform nonterminals, generated automatically by the inweb
weaver.
haccusative-pronouni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/pro.§1
used in hpronouni, haction-pronouni
hact-reqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/act.§27
used in haction-applicationsi
haction-accessi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/act.§27
used in hact-reqi
haction-applicationsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/act.§27
used in haction-clausei
haction-clausei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/act.§27
called from 24/act.§30
used in haction-clause-terminatedi
haction-clause-terminatedi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/act.§28
used in haction-clausesi
haction-clausesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/act.§28
used in haction-sentence-objecti, haction-clausesi
haction-listi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/anl.§2
called from 22/phud.§22, 24/anl.§12
haction-namei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/act.§14
called from 24/act.§17
used in haction-sentence-subjecti, hunderstand-refi
haction-name-constructioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/act.§10
called from 24/act.§11
haction-name-formali . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/ofs.§10
used in hprohibited-property-ownersi
haction-operandi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/ap.§22
called from 24/ap.§41
haction-optional-trailing-prepositionsi . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/act.§15
called from 24/act.§14
used in haction-namei
haction-parameteri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/ap.§23
called from 24/ap.§10
used in haction-patterni, hwe-are-action-patterni, haction-pattern-negatedi, haction-pattern-pasti,
haction-pattern-past-negatedi, hap-common-core-inneri, hap-common-core-inner-inneri, haction-operandi
haction-patterni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/ap.§7
called from 8/refpt.§11, 8/refpt.§35, 16/tc.§21, 22/phud.§17, 22/phud.§24, 22/phtd.§32, 24/anl.§13
used in hs-action-pattern-as-valuei
haction-pattern-corei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/ap.§11
used in haction-patterni, hwe-are-action-patterni, haction-pattern-negatedi, haction-pattern-pasti,
haction-pattern-past-negatedi, haction-pattern-core-actori
haction-pattern-core-actori . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/ap.§9
used in haction-patterni, hwe-are-action-patterni, haction-pattern-negatedi
haction-pattern-negatedi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/ap.§8
used in hs-action-pattern-as-negated-conditioni
haction-pattern-pasti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/ap.§8
used in hs-past-action-pattern-as-conditioni
haction-pattern-past-corei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/ap.§11
used in haction-pattern-pasti, haction-pattern-past-negatedi
haction-pattern-past-negatedi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/ap.§8
used in hs-past-action-pattern-as-negated-conditioni
Chapter 27: Configuration and Control 208
haction-problem-diagnosisi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/phud.§18
called from 22/phud.§22
haction-pronominali . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/ap.§12
called from 24/ap.§13
haction-pronouni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/act.§12
called from 24/act.§13, 24/act.§17, 24/act.§38, 24/act.§41, 24/anl.§13
haction-sentence-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/act.§28
called from 24/act.§33
haction-sentence-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/act.§25
called from 24/act.§33
haction-variablei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/act.§18
called from 24/act.§22
haction-variable-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/act.§19
called from 24/act.§22
used in haction-variablei
haction-when-diagnosisi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/phud.§21
called from 22/phud.§22
hactivity-list-entryi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/av.§9
used in hactivity-list-unnegatedi
hactivity-list-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/av.§9
used in hactivity-list-unnegatedi
hactivity-list-unnegatedi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/av.§9
used in hrun-time-contexti
hactivity-namei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/av.§17
used in hactivity-list-entryi
hactivity-name-constructioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/av.§2
called from 24/av.§4
hactivity-name-formali . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/ofs.§10
called from 8/mass.§37
used in hprohibited-property-ownersi
hactivity-new-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/av.§1
called from 24/av.§4
used in hactivity-notedi
hactivity-notedi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/av.§1
used in hactivity-sentence-subjecti
hactivity-operandi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/av.§10
used in hactivity-list-entryi
hactivity-sentence-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/av.§1
called from 24/av.§4
hactivity-variable-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/av.§5
called from 24/av.§7
hactor-descriptioni (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/ap.§10
used in haction-pattern-core-actori
hadaptive-adjectivei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/aph.§53
called from 9/aph.§6
used in hs-say-phrasei
hadaptive-verbi (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/conj.§60
used in hs-say-phrasei
hadjective-definitioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/def.§2
called from 22/def.§3
hadjective-domaini . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/def.§2
called from 22/def.§3
used in hadjective-definitioni
Chapter 27: Configuration and Control 209
harent-conjugationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§33
used in hverb-conjugation-instructionsi
harent-pasti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§33
used in harent-tabulationi
harent-perfecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§33
used in harent-tabulationi
harent-presenti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§33
used in harent-tabulationi
harent-tabulationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§33
used in harent-conjugationi
harticlei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/pro.§4
called from 5/prfm.§37, 5/prfm.§38, 9/aph.§3, 10/em.§13, 10/em.§20, 12/parse.§4, 12/parse.§19
used in
hbad-property-name-diagnosisi, hcreation-problem-diagnosisi, hunsuitable-namei, hforbidden-property-ownersi,
hcondition-name-inneri, hoptional-articlei, hs-description-uncalledi, hs-description-nounless-uncalledi,
hs-calling-namei, hs-specifieri, hs-type-expressioni, hs-descriptive-type-expressioni, hk-single-materiali,
hk-optional-materiali, hmap-name-abbreviation-omission-wordsi, htable-column-heading-unbracketedi
hassertion-np-as-valuei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8/refpt.§31
called from 8/refpt.§32
hbad-nonstructural-sentence-diagnosisi . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§31
called from 6/verb.§4
hbad-nonstructural-sentence-diagnosis-taili . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§31
used in hbad-nonstructural-sentence-diagnosisi
hbad-property-name-diagnosisi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/ofs.§11
used in hhas-property-namei
hbalanced-texti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5/lexs.§15
used in hnp-balancedi, hnp-articled-balancedi
hbegins-here-sentence-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7/iext.§17
called from 7/iext.§19
hbracketed-heading-qualifieri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/head.§5
used in hheading-qualifieri
hcan-be-sentence-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8/pdec.§7
called from 8/pdec.§5
hcardinal-numberi (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/lit.§8
called from 5/prfm.¶8, 5/prfm.§29, 5/prfm.§37, 5/prfm.§38, 6/vm.§10, 9/det.§12
used in hversion-identificationi, hscaling-instructioni, helapsed-timei, hclock-timei, hliterali, hs-descriptive-npi,
hmap-setting-scope-unarticledi, hmap-setting-valuei, hmap-rubrici, hepisode-sentence-objecti, htable-new-namei,
htable-footeri, hequation-namei, hto-preamblei, hrep-numberi
hcardinal-number-in-wordsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/lit.§5
called from 5/prfm.§11
hcardinal-number-unlimitedi (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/lit.§9
used in htranslates-into-unicode-sentence-objecti, hunicode-characteri, huse-sentence-objecti
hcertaintyi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§23
used in hexistential-sentencei, hregular-sentence-tail1-without-rci, hregular-sentence-tail2-without-rci,
hregular-sentence-tail3-without-rci, hregular-sentence-tail4-without-rci, hregular-sentence-tail1-inneri,
hregular-sentence-tail2-inneri, hregular-sentence-tail3-inneri, hregular-sentence-tail4-inneri,
hbad-nonstructural-sentence-diagnosis-taili
hclock-timei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/today.§4
used in hliteral-timei, hevent-rule-preamblei
hcomma-divisible-sentencei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/sent.§24
called from 6/sent.§26
hcommand-phrase-nonkind-typesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/cmsp.§8
called from 16/cmsp.§9
Chapter 27: Configuration and Control 211
hcomparative-property-constructioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/conj.§28
called from 9/conj.§27
hcondition-in-api (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/ap.§15
used in hap-common-corei
hcondition-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8/pdec.§7
used in hcan-be-sentence-objecti
hcondition-name-inneri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8/pdec.§7
used in hcondition-namei
hcondition-name-innermosti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8/pdec.§7
used in hcondition-name-inneri
hcondition-nonkind-typesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/cosp.§7
called from 16/cosp.§8
hcondition-problem-diagnosisi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/tc.§143
called from 16/tc.§37
used in hcondition-problem-part-list-taili
hcondition-problem-parti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/tc.§143
used in hcondition-problem-diagnosisi
hcondition-problem-part-list-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/tc.§143
used in hcondition-problem-diagnosisi
hconjugationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/conj.§33
called from 9/conj.§45
hcontinental-clock-timei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/today.§7
unused
hcontracted-to-be-conjugationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§31
used in hverb-conjugation-instructionsi
hcontracted-to-be-pasti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§31
used in hcontracted-to-be-tabulationi
hcontracted-to-be-past-negatedi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§31
used in hcontracted-to-be-tabulationi
hcontracted-to-be-presenti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§31
used in hcontracted-to-be-tabulationi
hcontracted-to-be-tabulationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§31
used in hcontracted-to-be-conjugationi
hcontracted-to-have-conjugationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§32
used in hverb-conjugation-instructionsi
hcontracted-to-have-presenti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§32
used in hcontracted-to-be-tabulationi, hcontracted-to-have-tabulationi
hcontracted-to-have-tabulationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§32
used in hcontracted-to-have-conjugationi
hcontrol-structure-phrasei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/rtree.§23
called from 6/rtree.§22, 8/mass.§72, 12/mlc.§2, 22/phtd.§7, 22/cph.§2
hcopular-verbi (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/conj.§12
called from 5/prfm.§29, 5/prfm.§37
used in hs-existential-verb-taili, hs-general-verb-taili, hs-relative-verb-taili
hcopular-verb-present-positivei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . 9/conj.§13
called from 5/prfm.§29, 5/prfm.§37
used in hregular-sentence-tail2-inneri
hcreation-problem-diagnosisi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8/creat.§20
called from 8/creat.§30
hdebugging-log-requesti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4/dl.§7
called from 4/dl.§9
used in hinclude-in-debugging-sentence-subjecti
Chapter 27: Configuration and Control 212
hdefined-by-sentence-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/tab.§29
called from 20/tab.§31
hdefined-by-sentence-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/tab.§26
called from 20/tab.§31
hdefinite-articlei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/pro.§5
called from 3/lexi.§10, 5/prfm.§38, 22/phsf.§0, 22/phsf.§3
used in hnounphrase-definitei, hnounphrase-articledi,
hextension-title-and-versioni, harticlei, hoptional-definite-articlei, hproperty-name-as-noun-phrasei, hs-variablei,
hmap-setting-scopei, hscene-namei, huse-sentence-objecti, hnew-called-namei, hheading-with-parenthesisi,
hnew-rulebook-namei, hrulebook-stem-inneri, hrep-numberi, hexternal-file-sentence-subjecti
hdefinition-headeri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/def.§1
called from 22/def.§3
hdestination-rulebooki . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/rps.§10
used in hlisted-in-sentence-objecti
hdetermination-ofi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/det.§10
called from 9/det.§12
hdeterminer-namesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/det.§8
called from 9/det.§7
hdigital-clock-timei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/today.§6
used in hclock-timei
hdirection-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/epsm.§7
used in hindex-map-sentence-subjecti
hdividing-sentencei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/sent.§13
called from 6/sent.§14
hdocumentation-symboli . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3/index.§8
used in hdocumentation-symbol-taili, hactivity-sentence-subjecti
hdocumentation-symbol-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3/index.§8
called from 3/index.§9
hdoes-nothing-sentence-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/rps.§6
called from 23/rps.§7
heither-or-property-namei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . 17/prop.§13
used in hrelation-property-namei
helapsed-timei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/today.§4
used in hliteral-timei
hempty-texti (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/lit.§12
used in hs-say-termi
hen-trie-indef-ai . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§4
used in hsingular-noun-to-its-indefinite-articlei
hen-trie-indef-bi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§5
used in hsingular-noun-to-its-indefinite-articlei
hen-trie-indef-ci . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§6
used in hsingular-noun-to-its-indefinite-articlei
hen-trie-irregular-compound-pasti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§44
used in hen-trie-pasti
hen-trie-irregular-compound-present-participlei . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§39
used in hen-trie-present-participlei
hen-trie-irregular-pasti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§44
used in hen-trie-pasti
hen-trie-irregular-past-participlei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§42
used in hen-trie-past-participlei
hen-trie-irregular-present-participlei . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§38
used in hen-trie-present-participlei
Chapter 27: Configuration and Control 213
hen-trie-irregular-third-person-presenti . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§43
used in hen-trie-present-verb-formi
hen-trie-modal-contracted-futurei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§35
used in hinformal-negated-modal-conjugationi
hen-trie-modal-contracted-pasti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§35
used in hinformal-negated-modal-conjugationi
hen-trie-modal-contracted-presenti . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§35
used in hinformal-negated-modal-conjugationi
hen-trie-pasti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§44
used in hregular-verb-conjugationi, hen-trie-past-participlei
hen-trie-past-participlei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§42
used in hregular-verb-conjugationi, hto-be-able-to-conjugationi, hto-be-able-to-auxiliaryi, harent-conjugationi,
hinformal-negated-modal-conjugationi
hen-trie-pasturise-exceptionsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§45
used in hpasturise-participlei
hen-trie-pasturise-regulari . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§45
used in hpasturise-participlei
hen-trie-pasturise-regular-yi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§45
used in hpasturise-participlei
hen-trie-plural-append-si . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§15
used in hsingular-noun-to-its-plurali
hen-trie-plural-assimilated-classical-inflectionsi . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§12
used in hsingular-noun-to-its-plurali
hen-trie-plural-irregulari . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§10
used in hsingular-noun-to-its-plurali
hen-trie-plural-irregular-inflectionsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§11
used in hsingular-noun-to-its-plurali
hen-trie-plural-irregular-o-suffixesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§13
used in hsingular-noun-to-its-plurali
hen-trie-plural-pronounsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§9
used in hsingular-noun-to-its-plurali
hen-trie-plural-regular-inflectionsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§14
used in hsingular-noun-to-its-plurali
hen-trie-plural-uninflectedi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§8
used in hsingular-noun-to-its-plurali
hen-trie-present-participlei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§37
used in hregular-verb-conjugationi, hto-be-able-to-conjugationi, hto-be-able-to-auxiliaryi, harent-conjugationi,
hinformal-negated-modal-conjugationi
hen-trie-present-verb-formi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§43
used in hregular-verb-conjugationi
hen-trie-regular-a-pasti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§44
used in hen-trie-pasti
hen-trie-regular-a-present-participlei . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§40
used in hen-trie-present-participlei
hen-trie-regular-b-pasti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§44
used in hen-trie-pasti
hen-trie-regular-b-present-participlei . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§41
used in hen-trie-present-participlei
hen-trie-regular-c-pasti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§44
used in hen-trie-pasti
hen-trie-regular-c-present-participlei . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§41
used in hen-trie-present-participlei
Chapter 27: Configuration and Control 214
hend-control-structure-phrasei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/rtree.§23
called from 6/rtree.§4, 22/cph.§2
hend-phrase-constructioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/phtd.§30
called from 22/phtd.§31
hepisode-sentence-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/bib.§9
called from 20/bib.§11
hequation-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21/eqns.§2
called from 21/eqns.§6
hequation-names-constructioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21/eqns.§7
called from 21/eqns.§8
hequation-symboli . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21/eqns.§15
used in hequation-where-settingi
hequation-wherei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21/eqns.§12
called from 21/eqns.§3, 21/eqns.§78
hequation-where-listi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21/eqns.§15
called from 21/eqns.§20
used in hequation-where-list-taili
hequation-where-list-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21/eqns.§15
used in hequation-where-listi
hequation-where-settingi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21/eqns.§15
used in hequation-where-setting-entryi
hequation-where-setting-entryi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21/eqns.§15
used in hequation-where-listi
hevent-rule-preamblei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/today.§8
called from 22/phud.§7
used in hrule-preamblei
hexcluded-from-determinersi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/det.§11
called from 9/det.§9
hexistential-sentencei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§18
used in hnonstructural-sentencei, hexistential-sentencei
hexistential-sentence-inneri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§19
called from 6/verb.§20, 6/verb.§21, 6/verb.§22
used in hexistential-sentencei
hexistential-sentence-inner-tail1i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§19
used in hexistential-sentence-inneri
hexistential-sentence-inner-tail2i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§19
used in hexistential-sentence-inneri
hexistential-sentence-inner-tail3i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§19
used in hexistential-sentence-inneri
hexistential-verb-phrasei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candp.§5
used in hs-nonexistential-phrase-to-decidei, hs-existential-phrase-to-decidei
hexisting-local-namei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/phsf.§4
used in hnew-called-name-unarticledi
hexposed-innardsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/bib.§15
used in hrelease-sentence-objecti
hextension-bodyi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7/iext.§12
called from 7/iext.§13
hextension-documentation-headingi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3/hdoc.§3
called from 3/hdoc.§4
hextension-documentation-paste-markeri . . . . . . . . . . . . . . . . . . . . . . . . . . 3/hdoc.§13
called from 3/hdoc.§14
hextension-end-marker-sentencei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/sent.§13
used in hdividing-sentencei
Chapter 27: Configuration and Control 215
hextension-example-headeri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3/hdoc.§5
called from 3/hdoc.§6
hextension-identifieri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/head.§5
called from 6/head.§8
used in hextension-qualifieri
hextension-qualifieri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/head.§5
called from 6/head.§4
used in hbracketed-heading-qualifieri
hextension-title-and-versioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7/iext.§3
called from 7/iext.§6
used in hbegins-here-sentence-subjecti
hextension-unversionedi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7/iext.§3
used in hextension-title-and-versioni
hextension-unversioned-inneri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7/iext.§3
used in hextension-unversionedi
hextension-versioni (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7/iext.§5
used in hextension-title-and-versioni
hexternal-file-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26/exf.§4
called from 26/exf.§8
used in hexternal-file-sentence-subjecti
hexternal-file-owneri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26/exf.§4
called from 26/exf.§8
used in hexternal-file-namei
hexternal-file-sentence-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26/exf.§6
called from 26/exf.§8
hexternal-file-sentence-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26/exf.§4
called from 26/exf.§8
used in hnounphrase-external-filei, hexternal-file-sentence-subjecti
hextra-responsei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2/isn.§11
called from 2/isn.§12
hfailed-text-substitution-diagnosisi . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/tc.§135
called from 16/tc.§130
hforbidden-property-ownersi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8/pdec.§2
called from 8/pdec.§5
hforeign-verb-present-positivei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . 9/conj.§11
called from 5/prfm.§37
used in hregular-sentence-tail4-inneri
hform-of-named-rule-outcomei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/focus.§6
called from 23/focus.§8
used in hrulebook-outcome-setting-entryi
hgeneral-verbi (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/conj.§9
called from 4/prob3.§19, 5/prfm.§29, 5/prfm.§37
used in hs-general-verb-taili, hs-relative-verb-taili
hgeneral-verb-present-positivei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . 9/conj.§10
called from 5/prfm.§29, 5/prfm.§37
used in hregular-sentence-tail1-without-rci, hregular-sentence-tail2-without-rci, hregular-sentence-tail3-without-rci,
hregular-sentence-tail4-without-rci, hregular-sentence-tail3-inneri, hregular-sentence-tail4-inneri,
hbad-nonstructural-sentence-diagnosis-taili
hgoing-action-irregular-operandi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/ap.§22
called from 24/ap.§35
hgrammar-tokeni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/gtok.§7
called from 25/gtok.§16
Chapter 27: Configuration and Control 216
hgrammar-token-breakingi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/gtok.§1
called from 25/gtok.§2
hgrammatical-gender-abbreviationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8/creat.§18
used in hgrammatical-gender-markeri
hgrammatical-gender-markeri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8/creat.§18
called from 8/creat.§19
hhas-properties-called-sentence-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/ofs.§11
called from 6/ofs.§8
used in hhas-property-name-taili
hhas-property-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/ofs.§11
used in hhas-properties-called-sentence-objecti
hhas-property-name-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/ofs.§11
used in hhas-properties-called-sentence-objecti
hheadingi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/sent.§13
used in hdividing-sentencei
hheading-name-hyphenatedi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/phin.§5
called from 22/phin.§6, 22/phin.§9
used in hheading-with-parenthesisi
hheading-qualifieri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/head.§5
called from 6/head.§4
hheading-with-parenthesisi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/phin.§5
called from 22/phin.§4
hhistorical-referencei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/chron.§4
called from 24/chron.§5
hhistorical-reference-possiblei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/chron.§3
called from 24/chron.§5
hif-copulari (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§12
used in hnounphrase-as-subjecti, hnp-inneri
hif-forced-physicali (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/varc.§13
used in hs-noun-phrasei, hs-noun-phrase-nounlessi
hif-let-equation-modei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/tandv.§5
used in hs-valuei
hif-not-deliberately-capitalisedi (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . 5/lexs.§7
used in hnounphrase-articledi, hnounphrase-as-subjecti, hnp-inneri
hif-parsing-phrase-tokensi (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§1
used in hk-kindi
hif-pronoun-presenti (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/tandv.§6
used in hs-valuei
hif-start-of-paragraphi (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5/lexs.§5
used in hdividing-sentencei, hstructural-sentencei
hif-start-of-source-texti (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5/lexs.§6
used in hstructural-sentencei
hif-table-column-expectedi (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/tandv.§7
used in hs-valuei
himmediate-usei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21/isin.§14
called from 21/isin.§13
used in himmediate-use-taili
himmediate-use-entryi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21/isin.§14
used in himmediate-usei
himmediate-use-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21/isin.§14
used in himmediate-usei
himplicit-player-relationshipi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/play.§10
called from 19/play.§11
Chapter 27: Configuration and Control 217
hinclude-in-debugging-sentence-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4/dl.§7
called from 4/dl.§9
hinclusion-sidei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21/isin.§2
used in hinform6-inclusion-locationi
hindefinite-articlei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/pro.§5
called from 3/lexi.§10, 5/prfm.§38
used in hnounphrase-articledi, hnp-kind-phrasei, harticlei, hs-adjective-listi, hk-kind-articledi,
hrulebook-stem-inneri
hindex-map-sentence-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/epsm.§8
called from 19/epsm.§20, 19/epsm.§23
hinequality-conjugationsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/conj.§24
called from 9/conj.§25
hinfinitive-usagei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/conj.§32
called from 9/conj.§41
used in hverb-implies-sentence-subjecti
hinfinitive-usage-exceptionali . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/conj.§32
called from 9/conj.§41
used in hinfinitive-usagei
hinform6-condition-adjective-definitioni . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/def.§8
called from 22/def.§9
hinform6-inclusion-locationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21/isin.§2
called from 21/isin.§7
hinform6-routine-adjective-definitioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/def.§6
called from 22/def.§7
hinformal-negated-modal-conjugationi . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§34
used in hverb-conjugation-instructionsi
hinformal-negated-modal-presenti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§34
used in hinformal-negated-modal-tabulationi
hinformal-negated-modal-tabulationi . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§34
used in hinformal-negated-modal-conjugationi
hinline-phrase-definitioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/ph.§4
called from 22/ph.§6
hinline-substitutioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/cinv.§6
called from 22/cinv.§16
hinstancei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11/inst.§15
used in htranslates-into-nl-sentence-subjecti, hscene-name-unarticledi
hinstance-of-objecti (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11/inst.§15
used in hdirection-namei, hindex-map-sentence-subjecti, hmap-positioningi, hmap-setting-scope-unarticledi,
hunderstand-property-referencei, htest-case-circumstancei
hinternal-test-case-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/test.§4
used in htest-sentence-subjecti
hiteration-repetitionsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/chron.§4
used in hrepetitionsi
hk-base-kindi (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§9
called from 5/prfm.§29, 5/prfm.§38
used in hk-kindi
hk-formal-kind-variablei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§22
called from 5/prfm.§29, 5/prfm.§38
used in hk-kind-abbreviatingi, hk-variable-definitioni
hk-irregular-kind-constructioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§10
called from 5/prfm.§38
used in hk-kindi
Chapter 27: Configuration and Control 218
hk-kindi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§6
called from 5/vocab.§7, 5/prfm.§35, 5/prfm.§38, 8/mass.§41, 8/pdec.§29, 9/rel.§31, 10/em.§19, 15/dti.§39,
15/dkind.§3, 16/taxa.§17, 16/tc.§106, 17/prop.§3, 17/prop.§6, 17/eorp.§3, 20/tab.§3, 20/tab.§34, 24/act.§22,
27/i6t.§30
used in
hkind-alias-syntaxi, htranslates-into-nl-sentence-subjecti, hs-qualifiable-nouni, hs-type-expression-unarticledi,
hk-kind-abbreviatingi, hk-kindi, hk-kind-articledi, hk-single-materiali, hk-optional-materiali, hk-kind-of-kindi,
hspec-kindi, hmap-setting-scope-unarticledi, hvalue-understood-variable-namei, htable-column-headingi,
hequation-where-settingi, hact-reqi, hunderstand-property-referencei, hnotable-parsing-variablesi
hk-kind-abbreviatingi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§5
used in hk-kind-as-name-tokeni, hk-kind-abbreviatingi
hk-kind-articledi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§7
used in hspecifies-sentence-subjecti, hkind-specifiedi
hk-kind-as-name-tokeni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§5
called from 15/dkind.§4
used in hk-kind-as-name-tokeni
hk-kind-constructioni (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§11
called from 5/prfm.§29, 5/prfm.§38
used in hk-kindi
hk-kind-for-templatei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§3
used in hreturn-kindi
hk-kind-of-kindi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§19
called from 5/prfm.§35, 5/prfm.§38
used in hk-kind-abbreviatingi, hk-variable-definitioni
hk-kind-variablei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§21
called from 5/prfm.§29, 5/prfm.§38
used in hk-kindi
hk-kind-variable-textsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§23
called from 5/prfm.§38
hk-optional-materiali . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§15
called from 5/prfm.§38, 15/dkind.§12
used in hk-optional-materiali
hk-single-materiali . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§15
called from 5/prfm.§38, 15/dkind.§12
used in hk-single-materiali, hk-tupled-materiali, hk-tuple-listi
hk-tuple-listi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§15
called from 5/prfm.§38
used in hk-tupled-materiali, hk-tuple-listi
hk-tupled-materiali . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§15
called from 5/prfm.§38, 15/dkind.§12
hk-variable-definitioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§8
called from 5/prfm.§38
used in hk-kindi
hkind-alias-syntaxi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8/refpt.§18
called from 8/refpt.§17
hkind-specifiedi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/litp.§69
used in hspecifies-sentence-objecti
hlanguage-elementi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27/plugs.§2
used in hplatform-identifieri
hlanguage-modifying-sentencei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/sent.§21
called from 6/sent.§33, 6/sent.§34
used in hstructural-sentencei
Chapter 27: Configuration and Control 219
hlist-comma-divisioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5/lexs.§17
called from 6/sent.§27, 9/conj.§44
hlist-of-double-quotesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/tab.§12
used in htable-celli, hlist-of-double-quotesi
hlist-or-divisioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/sent.§25
called from 6/sent.§28
hlisted-in-sentence-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/rps.§10
called from 23/rps.§15
hlisted-in-sentence-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/rps.§9
called from 23/rps.§15
hliterali . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/lit.§4
called from 8/mass.§43, 10/litp.§74, 11/inst.§14, 11/inst.§15, 13/treec.§9, 16/vasp.§14, 16/vasp.§17,
17/madj.§6, 17/madj.§12, 26/exf.§9
used in hliteral-pattern-specification-taili, hs-literali
hliteral-listi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/list.§1
used in hliterali
hliteral-list-contentsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/list.§1
used in hliteral-listi, hliteral-list-contentsi
hliteral-list-entryi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/list.§1
used in hliteral-list-contentsi
hliteral-pattern-groupi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/litp.§64
used in hliteral-pattern-group-listi
hliteral-pattern-group-listi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/litp.§64
used in hspecifies-sentence-subjecti, hliteral-pattern-group-list-taili
hliteral-pattern-group-list-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/litp.§64
used in hliteral-pattern-group-listi
hliteral-pattern-group-namei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . 10/litp.§84
used in hliteral-pattern-groupi
hliteral-pattern-parti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/litp.§71
used in hliteral-pattern-part-listi
hliteral-pattern-part-listi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/litp.§71
used in hliteral-pattern-specification-taili, hliteral-pattern-part-list-taili
hliteral-pattern-part-list-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/litp.§71
used in hliteral-pattern-part-listi
hliteral-pattern-part-optioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/litp.§71
used in hliteral-pattern-part-option-listi
hliteral-pattern-part-option-listi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/litp.§71
used in hliteral-pattern-parti, hliteral-pattern-part-option-list-taili
hliteral-pattern-part-option-list-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/litp.§71
used in hliteral-pattern-part-option-listi
hliteral-pattern-specification-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/litp.§69
used in hspecifies-sentence-objecti
hliteral-timei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/today.§4
used in hliterali
hliteral-truth-statei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/lit.§14
used in hliterali
hliteral-unit-notationi (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/lit.§4
used in hliterali
hmap-name-abbreviation-omission-wordsi . . . . . . . . . . . . . . . . . . . . . . . . . 19/htmlm.§54
called from 19/htmlm.§55
hmap-o↵seti (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/epsm.§18
used in hmap-setting-valuei, hmap-rubrici
Chapter 27: Configuration and Control 220
hnew-rulebook-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/rb.§1
called from 23/rb.§6
used in hnew-rulebook-namei
hnewfound-property-ofi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8/refpt.§24
called from 8/refpt.§25
hno-verb-diagnosisi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8/tass.§12
called from 8/tass.§10
hnominative-pronouni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/pro.§1
called from 8/refpt.§26, 16/cmsp.§20, 25/tfg.§3
used in hnp-inner-without-rpi, hpronouni, hconjugationi
hnon-participlesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/pro.§8
called from 9/pro.§8
hnonstructural-sentencei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§7
called from 6/verb.§4
hnotable-actionsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/act.§9
called from 24/act.§11
hnotable-backdrops-kindsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/backd.§2
called from 19/backd.§3
hnotable-backdrops-noun-phrasesi . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/backd.§12
called from 19/backd.§13
hnotable-backdrops-propertiesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/backd.§5
called from 19/backd.§6
hnotable-bibliographic-variablesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/bib.§2
called from 20/bib.§3
hnotable-directionsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/mapbp.§6
called from 19/mapbp.§7
hnotable-figuresi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26/fig.§5
called from 26/fig.§6
hnotable-linguistic-kindsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/kinds.§19
called from 15/kinds.§20
hnotable-map-directionsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/plmap.§11
called from 19/plmap.§12
hnotable-map-kindsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/plmap.§5
called from 6/ofs.§6, 19/plmap.§6
hnotable-map-noun-phrasesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/plmap.§27
called from 19/plmap.§28
hnotable-map-propertiesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/plmap.§21
called from 19/plmap.§22
hnotable-naming-propertiesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18/names.§2
called from 18/names.§3
hnotable-parsing-variablesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/gprop.§3
called from 25/gprop.§4
hnotable-player-instancesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/play.§2
called from 19/play.§3
hnotable-player-variablesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/play.§4
called from 10/em.§19, 19/play.§5
hnotable-propertiesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17/prop.§7
called from 17/prop.§8
hnotable-regions-kindsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/regio.§2
called from 19/regio.§3, 19/regio.§10
hnotable-regions-propertiesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/regio.§6
called from 19/regio.§7
Chapter 27: Configuration and Control 222
hnotable-scene-propertiesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/scene.§3
called from 19/scene.§4
hnotable-scenesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/scene.§9
called from 19/scene.§10
hnotable-spatial-kindsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/spmod.§6
called from 19/spmod.§3, 19/spmod.§7
hnotable-spatial-noun-phrasesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/spmod.§17
called from 19/spmod.§18
hnotable-spatial-propertiesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/spmod.§11
called from 19/spmod.§12
hnotable-use-option-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21/isin.§10
called from 21/isin.§8
used in himmediate-use-entryi
hnotable-variablesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/nlvar.§2
called from 20/nlvar.§3
hnounphrasei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§16
used in hstructural-sentencei, hnonstructural-sentencei, hnounphrase-definitei, hnounphrase-articledi,
hnp-balancedi, hnounphrase-alternative-listi, hcondition-name-innermosti
hnounphrase-actionablei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§16
used in hnonstructural-sentencei
hnounphrase-alternative-listi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§10
used in hnonstructural-sentencei, hnp-alternative-list-taili, hcan-be-sentence-objecti
hnounphrase-articledi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§2
called from 6/noun.§6, 8/refpt.§25
used in hnonstructural-sentencei, hnp-articled-balancedi, hnounphrase-articled-listi, hnounphrase-as-objecti,
hnounphrase-as-subjecti
hnounphrase-articled-listi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§7
called from 8/tobe.§4
used in htranslates-into-i6-sentence-objecti, hstructural-sentencei, hnonstructural-sentencei, hnp-articled-list-taili
hnounphrase-as-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§11
called from 6/verb.§10, 8/refpt.§25, 13/treec.§8
used in hnonstructural-sentencei
hnounphrase-as-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§11
called from 6/verb.§10
used in hnonstructural-sentencei
hnounphrase-definitei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§16
used in hnonstructural-sentencei
hnounphrase-external-filei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§16
used in hnonstructural-sentencei
hnounphrase-figurei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§16
used in hnonstructural-sentencei
hnounphrase-rulei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§9
used in hnonstructural-sentencei, hnounphrase-rule-listi
hnounphrase-rule-listi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§9
used in hnonstructural-sentencei, hnp-rule-list-taili
hnounphrase-soundi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§16
used in hnonstructural-sentencei
hnow-phrase-preamblei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/phud.§4
called from 22/phud.§7
hnp-alternative-list-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§10
used in hnounphrase-alternative-listi
hnp-articled-balancedi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§5
used in hnounphrase-articled-listi, hnp-inner-without-rpi
Chapter 27: Configuration and Control 223
hnp-articled-list-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§7
used in hnounphrase-articled-listi
hnp-balancedi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§5
used in hnounphrase-alternative-listi, hliteral-pattern-parti
hnp-from-or-of-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§19
used in hnp-inner-without-rpi
hnp-inneri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§11
used in hnounphrase-as-objecti, hnp-inner-without-rpi, hnp-list-taili, hnp-kind-phrase-unarticledi,
hnp-from-or-of-taili
hnp-inner-without-rpi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§16
used in hnounphrase-as-subjecti, hnp-inneri, hnp-relative-phrase-expliciti
hnp-kind-phrasei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§18
used in hnp-inner-without-rpi
hnp-kind-phrase-unarticledi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§18
used in hnp-kind-phrasei
hnp-list-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§17
used in hnp-inner-without-rpi
hnp-new-propertyi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§17
used in hnp-new-property-listi
hnp-new-property-listi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§17
used in hnp-with-or-having-taili, hnp-new-property-list-taili
hnp-new-property-list-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§17
used in hnp-new-property-listi
hnp-relative-phrase-exceptioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§14
used in hnp-relative-phrase-limitedi, hnp-relative-phrase-unlimitedi
hnp-relative-phrase-expliciti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§15
used in hnp-relative-phrase-limitedi, hnp-relative-phrase-unlimitedi
hnp-relative-phrase-impliciti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§15
used in hnp-relative-phrase-limitedi, hnp-relative-phrase-unlimitedi
hnp-relative-phrase-limitedi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§13
used in hnounphrase-as-subjecti
hnp-relative-phrase-unlimitedi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§13
used in hnp-inneri
hnp-rule-list-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§9
used in hnounphrase-rule-listi
hnp-with-or-having-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/noun.§17
used in hnp-inner-without-rpi
ho↵set-rulei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/rps.§10
used in hlisted-in-sentence-objecti
hoptional-articlei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/pro.§6
called from 9/pro.§7
hoptional-definite-articlei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/pro.§6
called from 9/pro.§7
hordinal-numberi (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/lit.§8
called from 5/prfm.§29, 5/prfm.§37, 5/prfm.§38
used in hrep-numberi
hordinal-number-in-wordsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/lit.§6
called from 5/prfm.§11
hparametric-problem-diagnosisi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/phud.§14
called from 22/phud.§17
hparticiple-likei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/conj.§34
called from 9/conj.§45
Chapter 27: Configuration and Control 224
hregular-sentence-tail1i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§25
used in hexistential-sentence-inneri, hregular-sentencei
hregular-sentence-tail1-inneri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§26
called from 6/verb.§20, 6/verb.§27
used in hexistential-sentence-inner-tail1i, hregular-sentence-tail1-without-rci, hregular-sentence-tail1i
hregular-sentence-tail1-without-rci . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§25
used in hregular-sentencei
hregular-sentence-tail2i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§25
used in hexistential-sentence-inneri, hregular-sentencei
hregular-sentence-tail2-inneri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§26
called from 6/verb.§21, 6/verb.§28
used in hexistential-sentence-inner-tail2i, hregular-sentence-tail2-without-rci, hregular-sentence-tail2i
hregular-sentence-tail2-without-rci . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§25
used in hregular-sentencei
hregular-sentence-tail3i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§25
used in hexistential-sentence-inneri, hregular-sentencei
hregular-sentence-tail3-inneri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§26
called from 6/verb.§22, 6/verb.§29
used in hexistential-sentence-inner-tail3i, hregular-sentence-tail3-without-rci, hregular-sentence-tail3i
hregular-sentence-tail3-without-rci . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§25
used in hregular-sentencei
hregular-sentence-tail4i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§25
used in hregular-sentencei
hregular-sentence-tail4-inneri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§26
called from 6/verb.§30
used in hregular-sentence-tail4-without-rci, hregular-sentence-tail4i
hregular-sentence-tail4-without-rci . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§25
used in hregular-sentencei
hregular-verb-conjugationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§25
used in hverb-conjugation-instructionsi
hregular-verb-presenti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§27
used in hregular-verb-tabulationi
hregular-verb-tabulationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§26
used in hregular-verb-conjugationi
hrelates-sentence-left-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/rel.§8
called from 9/rel.§10
hrelates-sentence-right-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/rel.§8
called from 9/rel.§10
hrelates-sentence-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/rel.§4
called from 9/rel.§6
hrelation-namei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/bp.§16
used in hrelates-sentence-subjecti, hverb-implies-sentence-objecti, hgrammar-tokeni
hrelation-name-formali . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/ofs.§10
called from 9/bp.§11, 14/equal.§1
hrelation-namesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/rel.§2
called from 9/bp.§10, 9/univr.§1, 14/equal.§1, 14/qnbp.§1, 17/provr.§1, 19/spabp.§2, 19/spabp.§3,
19/regio.§11, 19/mapbp.§1
hrelation-property-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17/vpbp.§5
called from 17/vpbp.§4
hrelation-term-basici . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/rel.§8
called from 9/rel.§10
used in hrelates-sentence-left-objecti, hrelation-term-righti
Chapter 27: Configuration and Control 227
hrelation-term-righti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/rel.§8
used in hrelation-term-right-namedi
hrelation-term-right-namedi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/rel.§8
called from 9/rel.§10
used in hrelates-sentence-right-objecti
hrelative-clause-markeri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/pro.§3
called from 3/lexi.§10, 5/prfm.§11
used in hexistential-sentence-inner-tail1i, hexistential-sentence-inner-tail2i, hexistential-sentence-inner-tail3i,
hregular-sentence-tail1-without-rci, hregular-sentence-tail2-without-rci, hregular-sentence-tail3-without-rci,
hregular-sentence-tail4-without-rci, hbad-nonstructural-sentence-diagnosis-taili, hs-relative-verb-taili
hrelease-sentence-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/bib.§13
called from 20/bib.§16
hrep-numberi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/chron.§4
used in hiteration-repetitionsi, hturn-repetitionsi
hrepetition-specificationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/chron.§4
used in hhistorical-referencei
hrepetitionsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/chron.§4
used in hrepetition-specificationi
hresponse-letteri (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/lit.§13
called from 16/vasp.§30
used in hextra-responsei, hliterali, hs-constant-valuei
hreturn-kindi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/phtd.§11
used in hto-return-datai
hrow-of-asterisksi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3/hdoc.§5
used in hextension-example-headeri
hrule-namei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/rps.§2
called from 2/isn.§8
used in hsubstitutes-for-sentence-subjecti, hsubstitutes-for-sentence-objecti, hdoes-nothing-sentence-subjecti,
hlisted-in-sentence-subjecti, ho↵set-rulei
hrule-name-formali . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/ofs.§10
called from 23/rules.§2, 23/rules.§3
hrule-outcomei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/focus.§2
used in hrulebook-default-outcomei, hform-of-named-rule-outcomei
hrule-preamblei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/phud.§1
called from 22/phud.§7
hrule-preamble-finei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/phud.§5
called from 22/phud.§7
hrule-preamble-fineri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/phud.§5
called from 22/phud.§7
used in hrule-preamble-finei
hrulebook-default-outcomei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/focus.§2
used in hrulebook-propertyi
hrulebook-namei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/rps.§2
used in hdestination-rulebooki
hrulebook-name-constructioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/rb.§5
called from 23/rb.§6
hrulebook-name-formali . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/ofs.§10
called from 8/mass.§38
used in hprohibited-property-ownersi
hrulebook-outcome-listi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/focus.§6
used in hrulebook-propertyi, hrulebook-outcome-list-taili
hrulebook-outcome-list-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/focus.§6
used in hrulebook-outcome-listi
Chapter 27: Configuration and Control 228
hrulebook-outcome-setting-entryi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/focus.§6
used in hrulebook-outcome-listi
hrulebook-propertyi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/rb.§18
called from 23/rb.§20
hrulebook-stemi (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/rb.§13
used in hrulebook-stem-embellishedi
hrulebook-stem-embellishedi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/phud.§5
used in hrule-preamble-fineri
hrulebook-stem-inneri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/rb.§14
called from 23/rb.§15
hrulebook-stem-inner-unarticledi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/rb.§14
used in hrulebook-stem-inneri
hrulebook-stem-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/rb.§14
called from 23/rb.§15
used in hrulebook-stem-inner-unarticledi
hrulebook-variable-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/rb.§9
called from 23/rb.§11
hrun-time-contexti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/av.§9
called from 24/av.§18
used in hactivity-list-taili
hs-action-pattern-as-conditioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candp.§7
used in hs-condition-atomici
hs-action-pattern-as-negated-conditioni . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candp.§7
used in hs-condition-atomici
hs-action-pattern-as-valuei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/tandv.§20
used in hs-valuei
hs-adjectivei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§10
called from 5/prfm.§29, 5/prfm.§38, 9/aph.§3
used in hs-adjective-list-unarticledi
hs-adjective-listi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§9
used in hs-adjective-list-as-desci, hs-applicable-adjective-listi, hs-description-uncalledi,
hs-description-nounless-uncalledi, hs-description-nounless-unspecifiedi
hs-adjective-list-as-desci . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§8
used in hs-descriptive-type-expression-unarticledi, hs-valuei, hs-descriptive-npi
hs-adjective-list-unarticledi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§9
used in hs-adjective-listi, hs-adjective-list-unarticledi
hs-applicable-adjective-listi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§16
used in hs-description-unspecifiedi, hs-description-nounless-unspecifiedi
hs-calling-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§22
used in hs-description-uncompositei, hs-description-nounless-uncompositei
hs-commandi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candp.§10
called from 16/ttts.§6
used in hs-commandi
hs-command-phrasei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candp.§15
used in hs-commandi
hs-command-phrase-inneri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candp.§15
used in hs-command-phrasei
hs-conditioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candp.§1
called from 16/ttts.§6, 25/test.§18
hs-condition-atomici . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candp.§4
called from 12/candp.§3
used in hs-condition-purei
Chapter 27: Configuration and Control 229
hs-condition-purei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candp.§2
called from 25/test.§18
used in hs-conditioni, hs-condition-purei
hs-condition-with-chronologyi (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candp.§3
used in hs-condition-purei
hs-constant-valuei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§1
called from 8/creat.§50
used in hs-type-expression-unarticledi, hs-valuei, htable-column-heading-unbracketedi
hs-descriptioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§17
called from 12/varc.§13
used in hs-type-expression-unarticledi, hs-valuei, hs-noun-phrasei, hs-descriptive-npi
hs-description-nounlessi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§18
used in hs-noun-phrase-nounlessi
hs-description-nounless-uncalledi . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§18
used in hs-description-nounless-uncompositei
hs-description-nounless-uncompositei . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§18
used in hs-description-nounlessi
hs-description-nounless-unspecifiedi . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§18
used in hs-description-nounless-uncalledi
hs-description-uncalledi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§17
used in hs-description-uncompositei
hs-description-uncompositei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§17
used in hs-descriptioni
hs-description-unspecifiedi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§17
used in hs-description-uncalledi
hs-descriptive-npi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/varc.§15
used in hs-descriptive-npi, hs-conditioni
hs-descriptive-type-expressioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/tandv.§2
called from 16/ttts.§6
hs-descriptive-type-expression-unarticledi . . . . . . . . . . . . . . . . . . . . . . . . . . 12/tandv.§2
used in hs-descriptive-type-expressioni
hs-existential-npi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/varc.§3
called from 8/tobe.§7, 8/creat.§1
used in hexistential-sentencei, hs-sentencei, hexistential-verb-phrasei
hs-existential-phrase-to-decidei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candp.§5
used in hs-condition-atomici
hs-existential-verb-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/varc.§3
used in hs-sentencei
hs-general-verb-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/varc.§5
used in hs-sentencei
hs-global-variablei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/tandv.§15
used in hs-variablei, hspec-global-variablei, htable-celli
hs-implied-relative-verb-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/varc.§7
used in hs-np-with-relative-clausei
hs-instance-namei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§15
called from 5/prfm.§29, 5/prfm.§38, 10/em.§19
used in hs-qualifiable-nouni
hs-literali . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/lit.§1
used in hs-constant-valuei, hs-type-expression-unarticledi
hs-local-variablei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/tandv.§13
used in hs-valuei, hs-variablei, hs-nonglobal-variablei
hs-miscellaneous-proper-nouni (internal) . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§4
used in hs-constant-valuei
Chapter 27: Configuration and Control 230
hs-nonexistential-phrase-to-decidei . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candp.§5
used in hs-condition-atomici
hs-nonglobal-variablei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/tandv.§12
used in hs-nonglobal-variablei, hs-noun-phrasei, hs-noun-phrase-nounlessi
hs-nonkind-typei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§27
used in hs-nonkind-typei, hs-type-expression-unarticledi
hs-nonkind-type-unbracketedi (internal) . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§27
used in hs-nonkind-typei
hs-noun-phrasei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/varc.§14
used in hs-sentencei, hs-general-verb-taili, hs-universal-relation-termi, hs-np-with-relative-clausei,
hs-relative-verb-taili
hs-noun-phrase-nounlessi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/varc.§14
used in hs-existential-verb-taili, hs-general-verb-taili, hs-np-with-relative-clausei, hs-implied-relative-verb-taili,
hs-relative-verb-taili
hs-np-with-relative-clausei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/varc.§7
used in hs-descriptioni, hs-description-nounlessi
hs-past-action-pattern-as-conditioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candp.§8
used in hs-condition-atomici
hs-past-action-pattern-as-negated-conditioni . . . . . . . . . . . . . . . . . . . . . . . . 12/candp.§8
used in hs-condition-atomici
hs-phrase-option-in-usei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candp.§6
used in hs-condition-atomici
hs-phrase-to-decidei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candp.§5
used in hs-nonexistential-phrase-to-decidei, hs-existential-phrase-to-decidei
hs-plain-texti (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/arch.§1
used in hs-valuei
hs-plain-text-with-equalsi (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/arch.§3
used in hs-valuei
hs-property-namei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§7
used in hs-valuei, hproperty-of-shapei
hs-purely-physical-descriptioni (internal) . . . . . . . . . . . . . . . . . . . . . . . . . 12/varc.§13
used in hs-valuei
hs-qualifiable-nouni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§14
used in hs-description-unspecifiedi, hs-description-nounless-unspecifiedi
hs-relative-verb-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/varc.§7
used in hs-np-with-relative-clausei
hs-rule-namei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§5
used in hs-constant-valuei
hs-rulebook-outcome-namei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§5
used in hs-constant-valuei, hs-commandi
hs-say-phrasei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candp.§17
used in hs-command-phrase-inneri, hs-say-termi, hs-unpacked-text-with-substitutionsi
hs-say-termi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candp.§17
used in hs-say-phrasei
hs-sentencei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/varc.§2
used in hs-condition-atomici
hs-specifieri (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§23
used in hs-description-uncalledi, hs-description-nounless-uncalledi
hs-specifying-nouni (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/candd.§24
used in hs-description-uncalledi, hs-description-nounless-uncalledi
hs-stacked-variablei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12/tandv.§14
used in hs-variablei, hs-nonglobal-variablei
Chapter 27: Configuration and Control 231
hsentence-needing-second-looki . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/ofs.§15
called from 6/ofs.§16
hsingular-noun-to-its-indefinite-articlei . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§3
called from 5/tries.§13
hsingular-noun-to-its-plurali . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§7
called from 5/natl.§8
used in hen-trie-present-verb-formi
hsomething-loose-diagnosisi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8/mass.§83
called from 8/mass.§85
hspatial-specifying-nounsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/spmod.§15
called from 19/spmod.§16
hspec-commandi (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/ttts.§7
called from 22/phtd.§32, 22/cph.§3
hspec-conditioni (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/ttts.§7
called from 19/scene.§37, 22/phtd.§32, 22/phsf.§13, 22/def.§4, 23/rules.§9, 24/ap.§15, 25/gprop.§11, 25/gl.§3
used in hspec-stored-actioni, hcondition-problem-parti, hscene-ends-sentence-objecti, hactivity-list-entryi
hspec-descriptioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/ttts.§13
called from 20/bib.§17, 20/bib.§29
used in hfailed-text-substitution-diagnosisi, hgrammar-tokeni
hspec-descriptive-type-expressioni (internal) . . . . . . . . . . . . . . . . . . . . . . . . . 16/ttts.§7
called from 15/dkind.§2, 24/ap.§4
used in hassertion-np-as-valuei, hunderstand-refi
hspec-global-variablei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/ttts.§9
used in hassertion-np-as-valuei
hspec-instancei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/ttts.§14
used in hdefined-by-sentence-subjecti, hgrammar-tokeni
hspec-kindi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/ttts.§11
used in hgrammar-tokeni
hspec-kind-as-name-tokeni (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§4
used in hphrase-token-declarationi
hspec-phrase-token-typei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . 15/dkind.§2
used in hphrase-token-declarationi
hspec-scene-descriptioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19/scene.§48
used in hrule-preamble-finei
hspec-stored-actioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/ttts.§16
used in hassertion-np-as-valuei, htable-cell-valuei
hspec-table-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/ttts.§15
used in hdefined-by-sentence-objecti
hspec-type-expressioni (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/ttts.§7
called from 8/mass.§41, 8/knowp.§4, 8/pdec.§11, 8/pdec.§30, 9/aph.§22, 16/tc.§106, 20/tab.§31, 21/eqns.§34,
22/phud.§7, 22/cinv.§72, 23/rb.§11, 24/act.§22, 24/ap.§4, 24/av.§7
used in hspecifies-sentence-subjecti, hspec-type-expression-or-valuei, hspec-descriptioni, hspec-instancei,
hspec-table-namei, htable-cell-valuei, hdefined-by-sentence-subjecti, hinform6-inclusion-locationi,
hgrammar-tokeni
hspec-type-expression-or-valuei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/ttts.§8
called from 8/pdec.§16, 8/pdec.§18, 8/pdec.§22, 17/prop.§4, 20/tab.§23, 20/tab.§31, 21/eqns.§8, 23/stv.§0
used in hfailed-text-substitution-diagnosisi, hnew-called-name-unarticledi, haction-parameteri, hactivity-operandi
hspec-valuei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/ttts.§7
called from 20/bib.§7, 22/phud.§11, 22/phtd.§32, 24/av.§4, 25/gl.§4, 25/test.§17, 26/fig.§6, 26/sfx.§4,
26/exf.§8, 27/i6t.§30
used in hspec-type-expression-or-valuei, hcondition-problem-parti, hspec-scene-descriptioni, hliteral-list-entryi,
hequation-where-settingi
Chapter 27: Configuration and Control 233
hspecifies-sentence-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/litp.§69
called from 10/litp.§68
hspecifies-sentence-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/litp.§64
called from 10/litp.§63
hstandard-grammar-tokeni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/gtok.§7
used in hgrammar-tokeni
hstorage-nonkind-typesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/stsp.§2
called from 16/stsp.§3
hstructural-phrase-problem-diagnosisi . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/tc.§22
called from 16/tc.§30
hstructural-sentencei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/sent.§20
called from 3/hdoc.§17, 6/sent.§6, 6/sent.§23
hsubstitutes-for-sentence-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/rps.§3
called from 23/rps.§5
hsubstitutes-for-sentence-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23/rps.§3
called from 23/rps.§5
htable-celli . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/tab.§12
called from 20/tab.§17
htable-cell-blanki . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/tab.§12
called from 20/tab.§31
used in htable-celli
htable-cell-valuei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/tab.§12
called from 20/tab.§16
used in htable-celli
htable-column-headingi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/tab.§5
called from 20/tab.§10
htable-column-heading-unbracketedi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/tab.§5
called from 20/tab.§10
used in htable-column-headingi
htable-column-name-constructioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/tab.§9
called from 20/tab.§10
htable-footeri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/tab.§22
called from 20/tab.§23
htable-headeri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/tab.§19
called from 20/tab.§23
htable-names-constructioni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/tab.§21
called from 20/tab.§23
htable-new-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/tab.§19
called from 20/tab.§23
used in htable-headeri
htest-case-circumstancei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/test.§6
used in htest-case-circumstance-listi
htest-case-circumstance-listi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/test.§6
used in htest-sentence-objecti, htest-case-circumstance-listi
htest-sentence-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/test.§6
called from 25/test.§15
htest-sentence-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/test.§3
called from 25/test.§14, 25/test.§15
htext-ending-with-a-callingi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8/creat.§51
called from 8/creat.§42
htext-including-a-callingi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8/creat.§51
called from 22/phsf.§8
used in hscene-ends-sentence-objecti
Chapter 27: Configuration and Control 234
htitling-linei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/bib.§6
called from 20/bib.§7
hto-be-able-to-auxiliaryi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§30
used in hverb-conjugation-instructionsi
hto-be-able-to-auxiliary-tabulationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§30
used in hto-be-able-to-auxiliaryi
hto-be-able-to-conjugationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§29
used in hverb-conjugation-instructionsi
hto-be-able-to-tabulationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§29
used in hto-be-able-to-conjugationi
hto-be-conjugationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§28
used in hverb-conjugation-instructionsi
hto-be-pasti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§28
used in hto-be-tabulationi
hto-be-presenti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§28
used in hto-be-tabulationi
hto-be-tabulationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§28
called from 9/conj.§55
used in hto-be-conjugationi
hto-do-conjugationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§24
used in hverb-conjugation-instructionsi
hto-do-presenti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§24
used in hto-do-tabulationi
hto-do-tabulationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§24
used in hto-do-conjugationi
hto-have-conjugationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§21
used in hverb-conjugation-instructionsi
hto-have-presenti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§23
used in hto-have-tabulationi
hto-have-tabulationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§22
used in hto-have-conjugationi
hto-preamblei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/phtd.§9
called from 22/phtd.§13
used in hphrase-preamblei, hto-preamblei
hto-return-datai . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/phtd.§11
called from 22/phtd.§27
htranslates-into-i6-sentence-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2/isn.§6
called from 2/isn.§9
htranslates-into-i6-sentence-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2/isn.§4
called from 2/isn.§7
htranslates-into-nl-sentence-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . . . 11/ntags.§13
called from 11/ntags.§14
htranslates-into-unicode-sentence-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . 10/unitr.§3
called from 10/unitr.§1
htranslates-into-unicode-sentence-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . 10/unitr.§2
called from 10/unitr.§1
htranslation-targeti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§17
used in hnonstructural-sentencei
hturn-repetitionsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/chron.§4
used in hrepetitionsi
hunderstand-as-thisi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/tfg.§17
used in hunderstand-sentence-entryi
Chapter 27: Configuration and Control 235
hunderstand-command-sentence-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . 25/tfg.§22
called from 25/tfg.§30
hunderstand-property-entryi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/tfg.§8
used in hunderstand-property-listi
hunderstand-property-listi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/tfg.§8
used in hunderstand-sentence-subjecti, hunderstand-property-list-taili
hunderstand-property-list-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/tfg.§8
used in hunderstand-property-listi
hunderstand-property-referencei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/tfg.§25
used in hunderstand-property-sentence-object-unconditionali
hunderstand-property-sentence-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/tfg.§25
called from 25/tfg.§31
hunderstand-property-sentence-object-unconditionali . . . . . . . . . . . . . . . . . . . . . 25/tfg.§25
used in hunderstand-property-sentence-objecti
hunderstand-refi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/tfg.§17
used in hunderstand-as-thisi
hunderstand-regular-entryi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/tfg.§7
used in hunderstand-regular-listi
hunderstand-regular-listi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/tfg.§7
used in hunderstand-sentence-subjecti, hunderstand-regular-list-taili
hunderstand-regular-list-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/tfg.§7
used in hunderstand-regular-listi
hunderstand-sentence-entryi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/tfg.§14
used in hunderstand-sentence-object-uncondi
hunderstand-sentence-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/tfg.§14
called from 25/tfg.§32
hunderstand-sentence-object-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/tfg.§14
used in hunderstand-sentence-object-uncondi
hunderstand-sentence-object-uncondi . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/tfg.§14
used in hunderstand-sentence-objecti, hunderstand-sentence-object-taili
hunderstand-sentence-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25/tfg.§5
called from 25/tfg.§29
hunderstanding-action-irregular-operandi . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/ap.§22
called from 24/ap.§35, 24/ap.§43
hunfortunate-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8/creat.§52
called from 8/creat.§53
used in hrulebook-variable-namei, haction-variable-namei, hactivity-variable-namei
hunicode-characteri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/unitr.§5
used in hliterali
hunicode-character-namei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . 10/unitr.§5
used in htranslates-into-unicode-sentence-subjecti, hunicode-characteri
huniversal-verbi (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/conj.§15
called from 5/prfm.§29, 5/prfm.§37
used in hs-general-verb-taili, hs-relative-verb-taili
hunknown-activity-diagnosisi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/tc.§38
called from 16/tc.§47
hunknown-text-shapei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/tc.§31
called from 16/tc.§20
hunknown-text-substitution-problem-diagnosisi . . . . . . . . . . . . . . . . . . . . . . . . 16/tc.§31
called from 16/tc.§36
hunknown-use-option-diagnosisi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/tc.§38
called from 16/tc.§47
Chapter 27: Configuration and Control 236
hunknown-value-problem-diagnosisi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16/tc.§38
called from 16/tc.§47
hunrecognised-rule-stem-diagnosisi . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/phud.§8
called from 22/phud.§7
hunsuitable-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8/creat.§52
called from 7/edoc.§5, 17/prop.§3
used in hunfortunate-namei
huse-language-element-sentence-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . . 27/plugs.§6
called from 27/plugs.§8
huse-option-sentence-shapei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/sent.§22
called from 4/dl.§3
huse-sentence-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21/isin.§9
called from 21/isin.§8, 21/isin.§12
hvalid-equation-symboli (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21/eqns.§26
used in hequation-symboli
hvalue-property-namei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17/prop.§13
called from 8/refpt.§29, 16/tc.§106
used in hrelation-property-namei
hvalue-understood-variable-namei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20/nlvar.§12
called from 7/edoc.§17, 20/nlvar.§13
hvariable-creation-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/verb.§16
used in hnounphrase-actionablei
hverb-conjugation-instructionsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/engin.§20
called from 5/prfm.§76, 9/conj.§55
hverb-implies-sentence-objecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/conj.§35
called from 9/conj.§42
hverb-implies-sentence-subjecti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/conj.§32
called from 9/conj.§41
hverb-infinitivei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9/conj.§60
used in hverb-implies-sentence-objecti
hversion-identificationi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/vm.§9
called from 6/vm.§10
hvirtual-machinei (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/vm.§15
used in hplatform-identifieri
hvm-description-entryi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/vm.§8
used in hvm-description-listi
hvm-description-listi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/vm.§8
called from 6/vm.§6
used in hvm-description-list-taili
hvm-description-list-taili . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6/vm.§8
used in hvm-description-listi
hwe-are-action-patterni . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24/ap.§8
used in hs-action-pattern-as-conditioni
hwhen-while-clausei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22/phud.§26
called from 22/phud.§27