1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-06-17 07:40:47 +03:00

Changeover to new Preform notation 2

This commit is contained in:
Graham Nelson 2020-07-28 10:43:16 +01:00
parent bd86a9f9ea
commit a4d475be9d
57 changed files with 392 additions and 393 deletions

View file

@ -418,8 +418,8 @@ and no documentation.
=
<extension-body> ::=
*** ---- documentation ---- ... | ==> TRUE
... ==> FALSE
*** ---- documentation ---- ... | ==> { TRUE, - }
... ==> { FALSE, - }
@<Break the extension's text into body and documentation@> =
<extension-body>(EXW);

View file

@ -138,8 +138,8 @@ overlapping with this, and they need to match.
end repeat ==> 0; *XP = repeat_CSP
<other-significant-phrase> ::=
say ... | ==> SAY_SIGF
now ... ==> NOW_SIGF
say ... | ==> { SAY_SIGF, - }
now ... ==> { NOW_SIGF, - }
@ This is used to see if an "if" is being used with the comma notation:

View file

@ -293,34 +293,34 @@ allowed; they should probably be withdrawn.
=
<heading-qualifier> ::=
... ( <bracketed-heading-qualifier> ) | ==> R[1]
... not for release | ==> NOT_FOR_RELEASE_HQ
... for release only | ==> FOR_RELEASE_ONLY_HQ
... unindexed ==> UNINDEXED_HQ
... ( <bracketed-heading-qualifier> ) | ==> { pass 1 }
... not for release | ==> { NOT_FOR_RELEASE_HQ, - }
... for release only | ==> { FOR_RELEASE_ONLY_HQ, - }
... unindexed ==> { UNINDEXED_HQ, - }
<bracketed-heading-qualifier> ::=
not for release | ==> NOT_FOR_RELEASE_HQ
for release only | ==> FOR_RELEASE_ONLY_HQ
unindexed | ==> UNINDEXED_HQ
<platform-qualifier> | ==> R[1]
<extension-qualifier> ==> R[1]
not for release | ==> { NOT_FOR_RELEASE_HQ, - }
for release only | ==> { FOR_RELEASE_ONLY_HQ, - }
unindexed | ==> { UNINDEXED_HQ, - }
<platform-qualifier> | ==> { pass 1 }
<extension-qualifier> ==> { pass 1 }
<platform-qualifier> ::=
for <platform-identifier> only | ==> (R[1])?PLATFORM_MET_HQ:PLATFORM_UNMET_HQ
not for <platform-identifier> ==> (R[1])?PLATFORM_UNMET_HQ:PLATFORM_MET_HQ
for <platform-identifier> only | ==> { (R[1])?PLATFORM_MET_HQ:PLATFORM_UNMET_HQ, - }
not for <platform-identifier> ==> { (R[1])?PLATFORM_UNMET_HQ:PLATFORM_MET_HQ, - }
<platform-identifier> ::=
<language-element> language element | ==> R[1]
<language-element> language element | ==> { pass 1 }
...... language element | ==> @<Issue PM_UnknownLanguageElement problem@>
<current-virtual-machine> | ==> R[1]
<current-virtual-machine> | ==> { pass 1 }
...... ==> @<Issue PM_UnknownVirtualMachine problem@>
<extension-qualifier> ::=
for use with <extension-identifier> | ==> USE_WITH_HQ
for use without <extension-identifier> | ==> USE_WITHOUT_HQ
not for use with <extension-identifier> | ==> USE_WITHOUT_HQ
in place of ( <quoted-text> ) in <extension-identifier> | ==> IN_PLACE_OF_HQ
in place of ...... in <extension-identifier> ==> IN_PLACE_OF_HQ
for use with <extension-identifier> | ==> { USE_WITH_HQ, - }
for use without <extension-identifier> | ==> { USE_WITHOUT_HQ, - }
not for use with <extension-identifier> | ==> { USE_WITHOUT_HQ, - }
in place of ( <quoted-text> ) in <extension-identifier> | ==> { IN_PLACE_OF_HQ, - }
in place of ...... in <extension-identifier> ==> { IN_PLACE_OF_HQ, - }
<extension-identifier> ::=
...... by ...... ==> @<Set for-use-with extension identifier@>

View file

@ -80,10 +80,10 @@ word "Include", which might e.g. be "Locksmith by Emily Short".
=
<extension-title-and-version> ::=
version <extension-version> of <definite-article> <extension-unversioned> | ==> R[1]
version <extension-version> of <extension-unversioned> | ==> R[1]
<definite-article> <extension-unversioned> | ==> -1
<extension-unversioned> ==> -1
version <extension-version> of <definite-article> <extension-unversioned> | ==> { pass 1 }
version <extension-version> of <extension-unversioned> | ==> { pass 1 }
<definite-article> <extension-unversioned> | ==> { -1, - }
<extension-unversioned> ==> { -1, - }
<extension-unversioned> ::=
<extension-unversioned-inner> ( ... ) | ==> { 0, - }

View file

@ -236,8 +236,8 @@ and here goes:
=
<dividing-sentence> ::=
<if-start-of-paragraph> <heading> | ==> R[2]
<extension-end-marker-sentence> ==> R[1]
<if-start-of-paragraph> <heading> | ==> { pass 2 }
<extension-end-marker-sentence> ==> { pass 1 }
<heading> ::=
volume ... | ==> { 1, - }
@ -273,7 +273,7 @@ never accidentally match in the main source text.
<structural-sentence> ::=
<if-start-of-source-text> <quoted-text> | ==> 0; sfsm->nt = BIBLIOGRAPHIC_NT;
<if-start-of-source-text> <quoted-text> ... | ==> 0; sfsm->nt = BIBLIOGRAPHIC_NT;
<language-modifying-sentence> | ==> R[1]
<language-modifying-sentence> | ==> { pass 1 }
* | ==> 0; sfsm->nt = TRACE_NT;
* <quoted-text-without-subs> | ==> 0; sfsm->nt = TRACE_NT;
<if-start-of-paragraph> table ... | ==> 0; sfsm->nt = TABLE_NT;
@ -306,7 +306,7 @@ sentences. Whereas other nonstructural sentences can wait, these can't.
=
<language-modifying-sentence> ::=
include (- ### in the preform grammar | ==> -2; sfsm->nt = INFORM6CODE_NT;
use ... language element/elements ==> -1
use ... language element/elements ==> { -1, - }
@ The following callback function is called by //syntax// when it breaks a
sentence of type |BEGINHERE_NT| or |ENDHERE_NT| -- i.e., the beginning or end

View file

@ -42,12 +42,12 @@ to declare the title and author.
=
<titling-line> ::=
<plain-titling-line> ( in <natural-language> ) | ==> R[1]; *XP = RP[2];
<plain-titling-line> ==> R[1]; *XP = NULL;
<plain-titling-line> ( in <natural-language> ) | ==> { R[1], RP[2] }
<plain-titling-line> ==> { R[1], NULL }
<plain-titling-line> ::=
{<quoted-text-without-subs>} by ... | ==> TRUE
{<quoted-text-without-subs>} ==> FALSE
{<quoted-text-without-subs>} by ... | ==> { TRUE, - }
{<quoted-text-without-subs>} ==> { FALSE, - }
@<Extract title and author name wording@> =
wording TW = GET_RW(<plain-titling-line>, 1);

View file

@ -1,14 +1,14 @@
100.0% in inform7 run
66.7% in compilation to Inter
25.0% in //Phrases::Manager::compile_first_block//
66.8% in compilation to Inter
24.8% in //Phrases::Manager::compile_first_block//
9.0% in //Phrases::Manager::compile_as_needed//
7.1% in //Strings::compile_responses//
7.3% in //Strings::compile_responses//
6.5% in //World::Compile::compile//
3.3% in //Assertions::Traverse::traverse1//
3.3% in //Sentences::VPs::traverse//
2.0% in //Phrases::Manager::RulePrintingRule_routine//
1.9% in //Phrases::Manager::rulebooks_array//
0.9% in //NewVerbs::ConjugateVerb//
2.2% in //Phrases::Manager::RulePrintingRule_routine//
2.1% in //Phrases::Manager::rulebooks_array//
1.0% in //NewVerbs::ConjugateVerb//
0.8% in //Phrases::Manager::traverse//
0.5% in //Phrases::Manager::parse_rule_parameters//
0.4% in //Phrases::Manager::compile_rulebooks//
@ -25,13 +25,13 @@
0.1% in //Sentences::Rearrangement::tidy_up_ofs_and_froms//
0.1% in //Sentences::RuleSubtrees::register_recently_lexed_phrases//
0.1% in //World::complete_additions//
3.0% not specifically accounted for
2.8% not specifically accounted for
31.0% in running Inter pipeline
10.7% in step preparation
10.1% in inter step 2/12: link
7.2% in inter step 12/12: generate inform6 -> auto.inf
0.3% in inter step 10/12: reconcile-verbs
10.6% in step preparation
10.2% in inter step 2/12: link
7.3% in inter step 12/12: generate inform6 -> auto.inf
0.3% in inter step 9/12: make-identifiers-unique
0.2% in inter step 10/12: reconcile-verbs
0.2% in inter step 11/12: eliminate-redundant-labels
0.2% in inter step 6/12: assimilate
0.2% in inter step 7/12: resolve-external-symbols
@ -39,5 +39,4 @@
0.1% in inter step 5/12: resolve-conditional-compilation
0.1% in inter step 8/12: inspect-plugs
1.2% not specifically accounted for
1.9% in supervisor
0.3% not specifically accounted for
2.1% in supervisor

View file

@ -141,8 +141,8 @@ with some existing meaning.
=
<s-type-expression-or-value> ::=
<s-type-expression> | ==> RP[1]
<s-value> ==> RP[1]
<s-type-expression> | ==> { pass 1 }
<s-value> ==> { pass 1 }
@ One further convenience is for text which describes an explicit action in
a noun-like way.

View file

@ -19,8 +19,8 @@ only valid impure conditions are description noun phrases.
=
<s-condition-uncached> ::=
<s-condition-pure> | ==> RP[1]
<s-descriptive-np> ==> RP[1]
<s-condition-pure> | ==> { pass 1 }
<s-descriptive-np> ==> { pass 1 }
@ Now for pure conditions. Note that logical "and" and "or" are implemented
directly right here, rather than being phrases defined in the Standard Rules,
@ -28,13 +28,13 @@ and that they aren't the same as the "and" and "or" used a list dividers.
=
<s-condition-pure> ::=
( <s-condition-pure> ) | ==> RP[1]
( <s-condition-pure> ) | ==> { pass 1 }
<s-condition-pure> , and <s-condition-pure> | ==> Conditions::new_LOGICAL_AND(RP[1], RP[2])
<s-condition-pure> and <s-condition-pure> | ==> Conditions::new_LOGICAL_AND(RP[1], RP[2])
<s-condition-pure> , or <s-condition-pure> | ==> Conditions::new_LOGICAL_OR(RP[1], RP[2])
<s-condition-pure> or <s-condition-pure> | ==> Conditions::new_LOGICAL_OR(RP[1], RP[2])
<s-condition-with-chronology> | ==> RP[1]
<s-condition-atomic> ==> RP[1]
<s-condition-with-chronology> | ==> { pass 1 }
<s-condition-atomic> ==> { pass 1 }
@ Chronological restrictions include, for instance,
@ -102,15 +102,15 @@ to other languages may want to find more elegant solutions.
=
<s-condition-atomic> ::=
<s-phrase-option-in-use> | ==> RP[1]
<s-phrase-option-in-use> | ==> { pass 1 }
not <s-phrase-option-in-use> | ==> Conditions::negate(RP[1])
<s-nonexistential-phrase-to-decide> | ==> RP[1]
<s-past-action-pattern-as-condition> | ==> RP[1]
<s-nonexistential-phrase-to-decide> | ==> { pass 1 }
<s-past-action-pattern-as-condition> | ==> { pass 1 }
<s-past-action-pattern-as-negated-condition> | ==> Conditions::negate(RP[1])
<s-action-pattern-as-condition> | ==> RP[1]
<s-action-pattern-as-condition> | ==> { pass 1 }
<s-action-pattern-as-negated-condition> | ==> Conditions::negate(RP[1])
<s-sentence> | ==> RP[1]
<s-existential-phrase-to-decide> ==> RP[1]
<s-sentence> | ==> { pass 1 }
<s-existential-phrase-to-decide> ==> { pass 1 }
@ 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
@ -123,12 +123,12 @@ testing the existence of something.
=
<s-nonexistential-phrase-to-decide> ::=
<existential-verb-phrase> | ==> { fail }
<s-phrase-to-decide> | ==> RP[1]
<s-phrase-to-decide> | ==> { pass 1 }
not <s-phrase-to-decide> ==> Conditions::negate(RP[1])
<s-existential-phrase-to-decide> ::=
^<existential-verb-phrase> | ==> { fail }
<s-phrase-to-decide> | ==> RP[1]
<s-phrase-to-decide> | ==> { pass 1 }
not <s-phrase-to-decide> ==> Conditions::negate(RP[1])
<existential-verb-phrase> ::=
@ -216,13 +216,13 @@ typechecking to choose between much later on.
=
<s-command> ::=
( <s-command> ) | ==> RP[1]
<s-to-phrase> ==> RP[1]
( <s-command> ) | ==> { pass 1 }
<s-to-phrase> ==> { pass 1 }
<s-say-command> ::=
( <s-say-command> ) | ==> RP[1]
<s-adaptive-text> | ==> RP[1]
<s-text-substitution> ==> RP[1]
( <s-say-command> ) | ==> { pass 1 }
<s-adaptive-text> | ==> { pass 1 }
<s-text-substitution> ==> { pass 1 }
<s-adaptive-text> ::=
<s-local-variable> | ==> { fail }

View file

@ -14,11 +14,11 @@ is on the table". For now, though, we treat it as a noun.
=
<s-constant-value> ::=
<s-literal> | ==> RP[1]
<s-literal> | ==> { pass 1 }
nothing | ==> Rvalues::new_nothing_object_constant();
<s-miscellaneous-proper-noun> | ==> RP[1]
<s-rulebook-outcome-name> outcome | ==> RP[1]
<s-use-option-name> option | ==> RP[1]
<s-miscellaneous-proper-noun> | ==> { pass 1 }
<s-rulebook-outcome-name> outcome | ==> { pass 1 }
<s-use-option-name> option | ==> { pass 1 }
verb <instance-of-verb> | ==> @<Compose verb ML@>
<s-rule-name> response ( <response-letter> ) ==> @<Compose response ML@>
@ -444,36 +444,36 @@ In the grammar for <s-description>, the noun is compulsory.
=
<s-description> ::=
<s-description-uncomposite-inner> | ==> RP[1]
<s-np-with-relative-clause> ==> RP[1]
<s-description-uncomposite-inner> | ==> { pass 1 }
<s-np-with-relative-clause> ==> { pass 1 }
<s-description-uncomposite> ::=
<s-description-uncomposite-inner> ==> RP[1]
<s-description-uncomposite-inner> ==> { pass 1 }
<s-description-uncomposite-inner> ::=
<s-description-uncalled> ( called <s-calling-name> ) | ==> @<Glue on the calling ML@>
<s-description-uncalled> ==> RP[1]
<s-description-uncalled> ==> { pass 1 }
<s-description-uncalled> ::=
<s-specifier> <s-description-unspecified> | ==> @<Glue on the quantification ML@>
<s-specifying-noun> | ==> RP[1]
<s-specifying-noun> | ==> { pass 1 }
<s-specifying-noun> <s-adjective-list> | ==> Node::AdjectiveLists::add_adjlist_w(RP[1], RP[2])
<if-trying-omission-permitted> <definite-article> <s-common-description-unspecified> | ==> RP[3]
<if-trying-omission-permitted> <definite-article> <s-common-description-unspecified> | ==> { pass 3 }
^<if-trying-omission-permitted> ^<if-multiplicitous> <definite-article> <s-common-description-unspecified> | ==> @<Issue PM_DefiniteCommonNoun problem@>
<definite-article> <s-proper-description-unspecified> | ==> RP[2]
<indefinite-article> <s-description-unspecified> | ==> RP[2]
<s-description-unspecified> ==> RP[1]
<definite-article> <s-proper-description-unspecified> | ==> { pass 2 }
<indefinite-article> <s-description-unspecified> | ==> { pass 2 }
<s-description-unspecified> ==> { pass 1 }
<s-description-unspecified> ::=
<s-qualifiable-noun> | ==> RP[1]
<s-qualifiable-noun> | ==> { pass 1 }
<s-applicable-adjective-list> <s-qualifiable-noun> ==> Node::AdjectiveLists::add_adjlist(RP[2], RP[1])
<s-common-description-unspecified> ::=
<s-qualifiable-common-noun> | ==> RP[1]
<s-qualifiable-common-noun> | ==> { pass 1 }
<s-applicable-adjective-list> <s-qualifiable-common-noun> ==> Node::AdjectiveLists::add_adjlist(RP[2], RP[1])
<s-proper-description-unspecified> ::=
<s-qualifiable-proper-noun> | ==> RP[1]
<s-qualifiable-proper-noun> | ==> { pass 1 }
<s-applicable-adjective-list> <s-qualifiable-proper-noun> ==> Node::AdjectiveLists::add_adjlist(RP[2], RP[1])
<if-trying-omission-permitted> internal 0 {
@ -493,25 +493,25 @@ except that the noun is optional. The only difference is right at the bottom.
=
<s-description-nounless> ::=
<s-description-nounless-uncomposite> | ==> RP[1]
<s-np-with-relative-clause> ==> RP[1]
<s-description-nounless-uncomposite> | ==> { pass 1 }
<s-np-with-relative-clause> ==> { pass 1 }
<s-description-nounless-uncomposite> ::=
<s-description-nounless-uncalled> ( called <s-calling-name> ) | ==> @<Glue on the calling ML@>
<s-description-nounless-uncalled> ==> RP[1]
<s-description-nounless-uncalled> ==> { pass 1 }
<s-description-nounless-uncalled> ::=
<s-specifier> <s-description-nounless-unspecified> | ==> @<Glue on the quantification ML@>
<s-specifying-noun> | ==> RP[1]
<s-specifying-noun> | ==> { pass 1 }
<s-specifying-noun> <s-adjective-list> | ==> Node::AdjectiveLists::add_adjlist_w(RP[1], RP[2])
<if-trying-omission-permitted> <definite-article> <s-common-description-unspecified> | ==> RP[3]
<if-trying-omission-permitted> <definite-article> <s-common-description-unspecified> | ==> { pass 3 }
^<if-trying-omission-permitted> ^<if-multiplicitous> <definite-article> <s-common-description-unspecified> | ==> @<Issue PM_DefiniteCommonNoun problem@>
<indefinite-article> <s-description-nounless-unspecified> | ==> RP[2]
<definite-article> <s-proper-description-unspecified> | ==> RP[2]
<s-description-nounless-unspecified> ==> RP[1]
<indefinite-article> <s-description-nounless-unspecified> | ==> { pass 2 }
<definite-article> <s-proper-description-unspecified> | ==> { pass 2 }
<s-description-nounless-unspecified> ==> { pass 1 }
<s-description-nounless-unspecified> ::=
<s-qualifiable-noun> | ==> RP[1]
<s-qualifiable-noun> | ==> { pass 1 }
<s-applicable-adjective-list> <s-qualifiable-noun> | ==> Node::AdjectiveLists::add_adjlist(RP[2], RP[1])
<s-adjective-list> ==> Node::AdjectiveLists::add_adjlist(Descriptions::from_proposition(NULL, W), RP[1])

View file

@ -20,12 +20,12 @@ Note that ordinal numbers are not valid as literals: "2nd" is not a noun.
minus <cardinal-number> | ==> Rvalues::from_int(-R[1], W)
<quoted-text> ( <response-letter> ) | ==> Rvalues::from_wording(W)
<quoted-text> | ==> Rvalues::from_wording(W)
<s-literal-real-number> | ==> RP[1]
<s-literal-truth-state> | ==> RP[1]
<s-literal-list> | ==> RP[1]
unicode <s-unicode-character> | ==> RP[1]
<s-literal-time> | ==> RP[1] /* times\_plugin */
<s-literal-unit-notation> ==> RP[1]
<s-literal-real-number> | ==> { pass 1 }
<s-literal-truth-state> | ==> { pass 1 }
<s-literal-list> | ==> { pass 1 }
unicode <s-unicode-character> | ==> { pass 1 }
<s-literal-time> | ==> { pass 1 }
<s-literal-unit-notation> ==> { pass 1 }
<s-literal-unit-notation> internal {
literal_pattern *lp;

View file

@ -54,18 +54,18 @@ type representing only its own value.
=
<s-type-expression-uncached> ::=
<article> <s-type-expression-unarticled> | ==> RP[2]
<s-type-expression-unarticled> ==> RP[1]
<article> <s-type-expression-unarticled> | ==> { pass 2 }
<s-type-expression-unarticled> ==> { pass 1 }
<s-type-expression-unarticled> ::=
<s-variable-scope> variable/variables | ==> RP[1]
<s-variable-scope> that/which vary/varies | ==> RP[1]
<s-variable-scope> variable/variables | ==> { pass 1 }
<s-variable-scope> that/which vary/varies | ==> { pass 1 }
<k-kind> | ==> Specifications::from_kind(RP[1])
<s-literal> | ==> RP[1]
<s-constant-value> | ==> RP[1]
<s-description-uncomposite> | ==> RP[1]
<s-action-pattern-as-value> | ==> RP[1]
<s-description> ==> RP[1]
<s-literal> | ==> { pass 1 }
<s-constant-value> | ==> { pass 1 }
<s-description-uncomposite> | ==> { pass 1 }
<s-action-pattern-as-value> | ==> { pass 1 }
<s-description> ==> { pass 1 }
@ 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"
@ -81,12 +81,12 @@ To allow this, we have a minor variation:
=
<s-descriptive-type-expression-uncached> ::=
<article> <s-descriptive-type-expression-unarticled> | ==> RP[2]
<s-descriptive-type-expression-unarticled> ==> RP[1]
<article> <s-descriptive-type-expression-unarticled> | ==> { pass 2 }
<s-descriptive-type-expression-unarticled> ==> { pass 1 }
<s-descriptive-type-expression-unarticled> ::=
<s-adjective-list-as-desc> | ==> RP[1]
<s-type-expression-unarticled> ==> RP[1]
<s-adjective-list-as-desc> | ==> { pass 1 }
<s-type-expression-unarticled> ==> { pass 1 }
@ And now we parse descriptions of variables such as the one appearing in
@ -103,8 +103,8 @@ higher up in Inform. Ultimately, the text must match <k-kind> in each case.
=
<s-variable-scope> ::=
global | ==> Specifications::new_new_variable_like(NULL)
global <s-variable-contents> | ==> RP[1]
<s-variable-contents> ==> RP[1]
global <s-variable-contents> | ==> { pass 1 }
<s-variable-contents> ==> { pass 1 }
<s-variable-contents> ::=
<k-kind> | ==> Specifications::new_new_variable_like(RP[1])
@ -237,12 +237,12 @@ membership, which is to say, really just a syntactic difference.
=
<s-value-uncached> ::=
( <s-value-uncached> ) | ==> RP[1]
( <s-value-uncached> ) | ==> { pass 1 }
<s-variable> | ==> ExParser::val(RP[1], W)
<if-table-column-expected> <s-table-column-name> | ==> ExParser::val(RP[2], W)
<if-property-name-expected> <s-property-name> | ==> ExParser::val(RP[2], W)
<s-constant-value> | ==> ExParser::val(RP[1], W)
<s-equation-usage> | ==> RP[1]
<s-equation-usage> | ==> { pass 1 }
<s-property-name> | ==> ExParser::val(RP[1], W)
<s-action-pattern-as-value> | ==> ExParser::val(RP[1], W)
<s-value-phrase-non-of> | ==> ExParser::val(RP[1], W)
@ -341,13 +341,13 @@ the text "grand total" is parsed as the local.
=
<s-variable> ::=
<definite-article> <s-variable> | ==> RP[2]
<s-local-variable> | ==> RP[1]
<s-stacked-variable> | ==> RP[1]
<s-global-variable> ==> RP[1]
<definite-article> <s-variable> | ==> { pass 2 }
<s-local-variable> | ==> { pass 1 }
<s-stacked-variable> | ==> { pass 1 }
<s-global-variable> ==> { pass 1 }
<s-nonglobal-variable> ::=
( <s-nonglobal-variable> ) | ==> RP[1]
( <s-nonglobal-variable> ) | ==> { pass 1 }
<s-local-variable> | ==> ExParser::val(RP[1], W)
<s-stacked-variable> ==> ExParser::val(RP[1], W)

View file

@ -228,14 +228,14 @@ is the same as that matched by <s-value>.
=
<s-noun-phrase> ::=
<if-forced-physical> <s-variable-as-value> | ==> RP[2]
<if-forced-physical> <s-description> | ==> RP[2]
^<if-forced-physical> <s-value-uncached> | ==> RP[2]
<if-forced-physical> <s-variable-as-value> | ==> { pass 2 }
<if-forced-physical> <s-description> | ==> { pass 2 }
^<if-forced-physical> <s-value-uncached> | ==> { pass 2 }
<s-noun-phrase-nounless> ::=
<if-forced-physical> <s-variable-as-value> | ==> RP[2]
<if-forced-physical> <s-description-nounless> | ==> RP[2]
^<if-forced-physical> <s-value-uncached> | ==> RP[2]
<if-forced-physical> <s-variable-as-value> | ==> { pass 2 }
<if-forced-physical> <s-description-nounless> | ==> { pass 2 }
^<if-forced-physical> <s-value-uncached> | ==> { pass 2 }
@ Finally, the following is needed for conditions ("if fixed in place
scenery, ...") where the object referred to is understood from context.
@ -248,7 +248,7 @@ pre-empting descriptions.)
=
<s-descriptive-np> ::=
( <s-descriptive-np> ) | ==> RP[1]
( <s-descriptive-np> ) | ==> { pass 1 }
<cardinal-number> | ==> { fail }
<s-description> | ==> @<Construct a descriptive SN subtree@>
<s-adjective-list-as-desc> ==> @<Construct a descriptive SN subtree@>

View file

@ -2397,11 +2397,11 @@ condition caused the trouble:
=
<condition-problem-diagnosis> ::=
<condition-problem-part> <condition-problem-part-tail> | ==> R[1] | R[2]
<condition-problem-part> ==> R[1]
<condition-problem-part> ==> { pass 1 }
<condition-problem-part-tail> ::=
, and/or <condition-problem-diagnosis> | ==> R[1]
,/and/or <condition-problem-diagnosis> ==> R[1]
, and/or <condition-problem-diagnosis> | ==> { pass 1 }
,/and/or <condition-problem-diagnosis> ==> { pass 1 }
<condition-problem-part> ::=
<s-condition> | ==> 0; @<Quote this-condition-okay segment@>;
@ -2558,9 +2558,9 @@ substitution or not.
=
<unknown-text-shape> ::=
say ... | ==> SAY_UTSHAPE
... and/or ... | ==> LIST_UTSHAPE
... ==> NO_UTSHAPE
say ... | ==> { SAY_UTSHAPE, - }
... and/or ... | ==> { LIST_UTSHAPE, - }
... ==> { NO_UTSHAPE, - }
<unknown-text-substitution-problem-diagnosis> ::=
, ... | ==> @<Issue PM_SayComma problem@>

View file

@ -219,13 +219,13 @@ always to match <property-name>, and the text in the range must match
=
<measurement-adjective-definition> ::=
<possessive-third-person> ... is/are not ... | ==> @<Issue PM_GradingMisphrased problem@>
<possessive-third-person> {<property-name>} is/are <measurement-range> | ==> R[3]; *XP = RP[2]
<possessive-third-person> ... is/are <measurement-range> ==> R[2]; *XP = NULL
<possessive-third-person> {<property-name>} is/are <measurement-range> | ==> { R[3], RP[2] }
<possessive-third-person> ... is/are <measurement-range> ==> { R[2], NULL }
<measurement-range> ::=
... or more | ==> MEASURE_T_OR_MORE
... or less | ==> MEASURE_T_OR_LESS
... ==> MEASURE_T_EXACTLY
... or more | ==> { MEASURE_T_OR_MORE, - }
... or less | ==> { MEASURE_T_OR_LESS, - }
... ==> { MEASURE_T_EXACTLY, - }
@<Issue PM_GradingMisphrased problem@> =
StandardProblems::definition_problem(Task::syntax_tree(), _p_(PM_GradingMisphrased),

View file

@ -233,14 +233,14 @@ what looks like text into grammar for parsing.
<s-table-column-name> ( ... ) | ==> EXISTING_TC; *XP = RP[1]; <<k1>> = Wordings::first_wn(WR[1]); <<k2>> = Wordings::last_wn(WR[1]);
<table-column-heading-unbracketed> ( ... ) | ==> R[1]; if (R[1] != NEW_TC_PROBLEM) *X = NEW_TC_WITH_KIND; <<k1>> = Wordings::first_wn(WR[1]); <<k2>> = Wordings::last_wn(WR[1]);
<s-table-column-name> | ==> EXISTING_TC; *XP = RP[1]; <<k1>> = -1; <<k2>> = -1;
<table-column-heading-unbracketed> ==> R[1]
<table-column-heading-unbracketed> ==> { pass 1 }
<table-column-heading-unbracketed> ::=
<article> | ==> @<Issue PM_TableColumnArticle problem@>
{topic} | ==> NEW_TC_TOPIC
{<property-name>} | ==> NEW_TC_WITHOUT_KIND
{topic} | ==> { NEW_TC_TOPIC, - }
{<property-name>} | ==> { NEW_TC_WITHOUT_KIND, - }
{<s-constant-value>} | ==> @<Issue PM_TableColumnAlready problem@>
... ==> NEW_TC_WITHOUT_KIND
... ==> { NEW_TC_WITHOUT_KIND, - }
@<Issue PM_TableColumnArticle problem@> =
*X = NEW_TC_PROBLEM;

View file

@ -254,9 +254,9 @@ two forms in any case.
<table-new-name> ==> TABLE_IS_NEW; <<nameforms>> = R[1]
<table-new-name> ::=
table ... - ... | ==> TABLE_HAS_NUMBER_AND_NAME
table ### | ==> TABLE_HAS_ONLY_NUMBER
table of ... | ==> TABLE_HAS_ONLY_NAME
table ... - ... | ==> { TABLE_HAS_NUMBER_AND_NAME, - }
table ### | ==> { TABLE_HAS_ONLY_NUMBER, - }
table of ... | ==> { TABLE_HAS_ONLY_NAME, - }
table ... ==> @<Issue PM_TableMisnamed problem@>
@<Issue PM_TableMisnamed problem@> =
@ -853,7 +853,7 @@ us issue more contextual problem messages.
<k-kind-articled> | ==> @<Make anomalous entry for kind@>
<s-named-constant> | ==> NAMED_CONSTANT_ENTRY; *XP = RP[1]
<s-global-variable> | ==> @<Issue PM_TablePlayerEntry or C20TableVariableEntry problem@>
<table-cell-value> | ==> R[1]; *XP = RP[1]
<table-cell-value> | ==> { pass 1 }
<list-of-double-quotes> | ==> @<Make anomalous entry for text to be understood@>
... ==> @<Issue PM_TableUnknownEntry problem@>

View file

@ -392,7 +392,7 @@ mass, too.
<equation-symbol> ==> EQW_IDENTIFIES_NOTHING; eq_symbol_wn = R[1];
<equation-symbol> ::=
<valid-equation-symbol> | ==> R[1]
<valid-equation-symbol> | ==> { pass 1 }
### | ==> @<Issue PM_EquationSymbolMalformed problem@>
... ==> @<Issue PM_EquationSymbolMisdeclared problem@>

View file

@ -85,8 +85,8 @@ is specified, since this would otherwise not be legal Inform.
=
<bare-activity-sentence-object> ::=
<article> activity | ==> TRUE
activity ==> TRUE
<article> activity | ==> { TRUE, - }
activity ==> { TRUE, - }
@ =
int Activities::new_activity_SMF(int task, parse_node *V, wording *NPs) {
@ -260,7 +260,7 @@ Any new activity variable name is vetted by being run through this:
=
<activity-variable-name> ::=
<unfortunate-name> | ==> @<Issue PM_ActivityVarAnd problem@>
... ==> TRUE
... ==> { TRUE, - }
@<Issue PM_ActivityVarAnd problem@> =
*X = NOT_APPLICABLE;

View file

@ -291,7 +291,7 @@ The subject noun phrase is an articled list, each entry of which must match:
=
<listed-in-sentence-object-inner> ::=
in any rulebook | ==> ANY_RULE_PLACEMENT
in any rulebook | ==> { ANY_RULE_PLACEMENT, - }
in <destination-rulebook> | ==> MIDDLE_PLACEMENT + 1000*IN_SIDE; *XP = RP[1];
first in <destination-rulebook> | ==> FIRST_PLACEMENT + 1000*IN_SIDE; *XP = RP[1];
last in <destination-rulebook> | ==> LAST_PLACEMENT + 1000*IN_SIDE; *XP = RP[1];

View file

@ -150,8 +150,8 @@ phrase definitions and timed events don't open the rulebook name.
=
<new-rulebook-name> ::=
<definite-article> <new-rulebook-name> | ==> R[2]
<new-rulebook-name> rules/rulebook | ==> R[1]
<definite-article> <new-rulebook-name> | ==> { pass 2 }
<new-rulebook-name> rules/rulebook | ==> { pass 1 }
at *** | ==> @<Issue PM_RulebookWithAt problem@>
to *** | ==> @<Issue PM_RulebookWithTo problem@>
definition *** | ==> @<Issue PM_RulebookWithDefinition problem@>
@ -389,7 +389,7 @@ Any new rulebook variable name is vetted by being run through this:
=
<rulebook-variable-name> ::=
<unfortunate-name> | ==> @<Issue PM_RulebookVariableAnd problem@>
... ==> TRUE
... ==> { TRUE, - }
@<Issue PM_RulebookVariableAnd problem@> =
*X = NOT_APPLICABLE;
@ -911,8 +911,8 @@ parses the object noun phrase with the following:
=
<rulebook-property> ::=
outcome/outcomes <rulebook-outcome-list> | ==> TRUE
default <rulebook-default-outcome> | ==> FALSE
outcome/outcomes <rulebook-outcome-list> | ==> { TRUE, - }
default <rulebook-default-outcome> | ==> { FALSE, - }
... ==> @<Issue PM_NonOutcomeProperty problem@>
@<Issue PM_NonOutcomeProperty problem@> =

View file

@ -450,18 +450,18 @@ word "to".
<phrase-preamble> ::=
<phrase-preamble> ( deprecated ) | ==> R[1]; <<deprecated>> = TRUE
<say-preamble> | ==> SAY_ANN; <<say-ann>> = R[1]
<to-preamble> ==> R[1]
<to-preamble> ==> { pass 1 }
<to-preamble> ::=
<to-preamble> ( arithmetic operation <cardinal-number> ) | ==> R[1]; <<operation>> = R[2]
<to-preamble> ( assignment operation ) | ==> R[1]; <<assignment>> = TRUE
{let ... be given by ...} | ==> LET_ANN; <<eqn>> = TRUE
{let ...} | ==> LET_ANN; <<eqn>> = FALSE
... -- end | ==> BLOCK_ANN
... -- end conditional | ==> CONDITIONAL_ANN
... -- end loop | ==> LOOP_ANN
... -- in loop | ==> IN_LOOP_ANN
... -- in ### | ==> IN_ANN
... -- end | ==> { BLOCK_ANN, - }
... -- end conditional | ==> { CONDITIONAL_ANN, - }
... -- end loop | ==> { LOOP_ANN, - }
... -- in loop | ==> { IN_LOOP_ANN, - }
... -- in ### | ==> { IN_ANN, - }
... ==> NO_ANN
@ The definition remaining after the preamble is removed is then vetted.
@ -503,11 +503,11 @@ the exception being the primordial phrase for saying text.
{say otherwise/else if/unless ...} | ==> CONTROL_SANN; <<control>> = OTHERWISE_IF_SAY_CS
{say if/unless ...} | ==> CONTROL_SANN; <<control>> = IF_SAY_CS
{say end if/unless} | ==> CONTROL_SANN; <<control>> = END_IF_SAY_CS
{say ...} -- beginning ### | ==> BEGIN_SANN
{say ...} -- continuing ### | ==> CONTINUE_SANN
{say ...} -- ending ### with marker ### | ==> ENDM_SANN
{say ...} -- ending ### | ==> END_SANN
{say ...} ==> NO_SANN
{say ...} -- beginning ### | ==> { BEGIN_SANN, - }
{say ...} -- continuing ### | ==> { CONTINUE_SANN, - }
{say ...} -- ending ### with marker ### | ==> { ENDM_SANN, - }
{say ...} -- ending ### | ==> { END_SANN, - }
{say ...} ==> { NO_SANN, - }
@ The following is used on the same text as <to-preamble>, but later on,
for timing reasons.
@ -523,13 +523,13 @@ haven't yet been parsed, so that we don't yet know it will be meaningful.
=
<to-return-data> ::=
to {decide yes/no} | ==> DEC_RANN
to {decide on ...} | ==> DEV_RANN
to {decide yes/no} | ==> { DEC_RANN, - }
to {decide on ...} | ==> { DEV_RANN, - }
to decide whether/if the ... | ==> TOC_RANN
to decide whether/if ... | ==> TOC_RANN
to decide whether/if ... | ==> { TOC_RANN, - }
to decide what/which <return-kind> is the ... | ==> TOV_RANN; *XP = RP[1]
to decide what/which <return-kind> is ... | ==> TOV_RANN; *XP = RP[1]
to ... ==> TO_RANN
to ... ==> { TO_RANN, - }
<return-kind> ::=
<k-kind-for-template> | ==> 0; *XP = RP[1]
@ -651,7 +651,7 @@ give problems for misuse of brackets.
( <phrase-token-declaration> ) *** | ==> TRUE; <<token-form>> = R[1]; *XP = RP[1]
( *** | ==> @<Issue PM_TokenWithoutCloseBracket problem@>
) *** | ==> @<Issue PM_TokenWithoutOpenBracket problem@>
### *** ==> FALSE
### *** ==> { FALSE, - }
@ Phrase token declarations allow a variety of non-standard constructs.

View file

@ -129,14 +129,14 @@ and creates two options with <phrase-option-declaration-setting-entry>.
=
<phrase-option-declaration-list> ::=
... | ==> FALSE; return preform_lookahead_mode; /* match only when looking ahead */
<phrase-option-declaration-setting-entry> <phrase-option-declaration-tail> | ==> R[2]
<phrase-option-declaration-setting-entry> ==> FALSE
<phrase-option-declaration-setting-entry> <phrase-option-declaration-tail> | ==> { pass 2 }
<phrase-option-declaration-setting-entry> ==> { FALSE, - }
<phrase-option-declaration-tail> ::=
, _or <phrase-option-declaration-list> | ==> R[1]
, \and/or <phrase-option-declaration-list> | ==> TRUE
_,/or <phrase-option-declaration-list> | ==> R[1]
\and/or <phrase-option-declaration-list> ==> TRUE
, _or <phrase-option-declaration-list> | ==> { pass 1 }
, \and/or <phrase-option-declaration-list> | ==> { TRUE, - }
_,/or <phrase-option-declaration-list> | ==> { pass 1 }
\and/or <phrase-option-declaration-list> ==> { TRUE, - }
<phrase-option-declaration-setting-entry> ::=
... ==> FALSE; if (!preform_lookahead_mode) Phrases::Options::phod_add_phrase_option(phod_being_parsed, W);
@ -239,16 +239,16 @@ by "and":
=
<phrase-option-list> ::=
... | ==> FALSE; return preform_lookahead_mode; /* match only when looking ahead */
<phrase-option-setting-entry> <phrase-option-tail> | ==> R[1] | R[2]
<phrase-option-setting-entry> ==> R[1]
... | ==> { lookahead }
<phrase-option-setting-entry> <phrase-option-tail> | ==> { R[1] | R[2], - }
<phrase-option-setting-entry> ==> { pass 1 }
<phrase-option-tail> ::=
, _and <phrase-option-list> | ==> R[1]
_,/and <phrase-option-list> ==> R[1]
, _and <phrase-option-list> | ==> { pass 1 }
_,/and <phrase-option-list> ==> { pass 1 }
<phrase-option-setting-entry> ::=
<phrase-option> | ==> R[1]
<phrase-option> | ==> { pass 1 }
... ==> @<Issue PM_NotAPhraseOption or C22NotTheOnlyPhraseOption problem@>
@<Issue PM_NotAPhraseOption or C22NotTheOnlyPhraseOption problem@> =

View file

@ -132,7 +132,7 @@ just enough from the wording to tell what sort of rule/phrase is to follow.
=
<rule-preamble> ::=
definition | ==> DEFINITIONAL_PHRASE_EFF
definition | ==> { DEFINITIONAL_PHRASE_EFF, - }
this is the {... rule} | ==> RULE_NOT_IN_RULEBOOK_EFF; <<event-time>> = NOT_AN_EVENT; <<written>> = FALSE;
this is the rule | ==> @<Issue PM_NamelessRule problem@>
this is ... rule | ==> @<Issue PM_UnarticledRule problem@>
@ -207,9 +207,9 @@ following grammar. (Parsing this is "fine mode".)
<rule-preamble-finer> ==> R[1]; <<parse_node:scenes>> = NULL
<rule-preamble-finer> ::=
{<rulebook-stem-embellished>} {when/while ...} | ==> TRUE
{<rulebook-stem-embellished>} | ==> FALSE
... ==> NOT_APPLICABLE
{<rulebook-stem-embellished>} {when/while ...} | ==> { TRUE, - }
{<rulebook-stem-embellished>} | ==> { FALSE, - }
... ==> { NOT_APPLICABLE, - }
<rulebook-stem-embellished> ::=
<rulebook-stem> *** | ==> 0; <<bud1>> = Wordings::first_wn(WR[1]); <<bud2>> = Wordings::last_wn(WR[1])
@ -219,9 +219,9 @@ following grammar. (Parsing this is "fine mode".)
rule <rulebook-stem> *** ==> 0; <<bud1>> = Wordings::first_wn(WR[1]); <<bud2>> = Wordings::last_wn(WR[1])
<rulebook-bud> ::=
of/for ... | ==> TRUE
rule about/for/on ... | ==> TRUE
rule ==> FALSE
of/for ... | ==> { TRUE, - }
rule about/for/on ... | ==> { TRUE, - }
rule ==> { FALSE, - }
@ The following turns the preamble text into a PHUD. It can be used as often
as necessary in "coarse mode", but should be run once and once only on any
@ -978,16 +978,16 @@ might have gone wrong.
@ =
<anl-diagnosis> ::=
<anl-inner-diagnosis> when/while ... | ==> R[1]
<anl-inner-diagnosis> ==> R[1]
<anl-inner-diagnosis> when/while ... | ==> { pass 1 }
<anl-inner-diagnosis> ==> { pass 1 }
<anl-inner-diagnosis> ::=
<anl-entry-diagnosis> <anl-tail-diagnosis> | ==> R[1]+R[2]
<anl-entry-diagnosis> ==> R[1]
<anl-entry-diagnosis> <anl-tail-diagnosis> | ==> { R[1]+R[2], - }
<anl-entry-diagnosis> ==> { pass 1 }
<anl-tail-diagnosis> ::=
, _or <anl-inner-diagnosis> | ==> R[1]
_,/or <anl-inner-diagnosis> ==> R[1]
, _or <anl-inner-diagnosis> | ==> { pass 1 }
_,/or <anl-inner-diagnosis> ==> { pass 1 }
<anl-entry-diagnosis> ::=
...... ==> @<Diagnose problem with this ANL entry@>

View file

@ -76,9 +76,9 @@ the doubled use of colons is unfortunate.)
=
<adjective-definition> ::=
<adjective-domain> is/are <adjective-wording> if ... | ==> DEFINED_POSITIVELY
<adjective-domain> is/are <adjective-wording> unless ... | ==> DEFINED_NEGATIVELY
<adjective-domain> is/are <adjective-wording> ==> DEFINED_PHRASALLY
<adjective-domain> is/are <adjective-wording> if ... | ==> { DEFINED_POSITIVELY, - }
<adjective-domain> is/are <adjective-wording> unless ... | ==> { DEFINED_NEGATIVELY, - }
<adjective-domain> is/are <adjective-wording> ==> { DEFINED_PHRASALLY, - }
<adjective-domain> ::=
... ( called the ... ) | ==> 0; <<calling>> = TRUE

View file

@ -6,7 +6,7 @@ Defining an adjective with an I6 condition.
=
<inform6-condition-adjective-definition> ::=
i6 condition <quoted-text-without-subs> says so ( ... ) ==> R[1]
i6 condition <quoted-text-without-subs> says so ( ... ) ==> { pass 1 }
@ Which leads us to a simple set of adjectives:

View file

@ -7,8 +7,8 @@ This little grammar catches definitions delegated to Inform 6 routines.
=
<inform6-routine-adjective-definition> ::=
i6 routine {<quoted-text-without-subs>} says so ( ... ) | ==> FALSE
i6 routine {<quoted-text-without-subs>} makes it so ( ... ) ==> TRUE
i6 routine {<quoted-text-without-subs>} says so ( ... ) | ==> { FALSE, - }
i6 routine {<quoted-text-without-subs>} makes it so ( ... ) ==> { TRUE, - }
@ So here's a set of adjectives...

View file

@ -194,7 +194,7 @@ the fixed text "phrase options" expands to the whole bitmap.
=
<inline-substitution> ::=
phrase options | ==> OPTS_INSUB
phrase options | ==> { OPTS_INSUB, - }
<phrase-option> | ==> OPT_INSUB; <<opt>> = R[1]
<name-local-to-inline-stack-frame> | ==> LOCAL_INSUB; <<local_variable:var>> = RP[1]
... ==> @<Issue PM_BadInlineExpansion problem@>

View file

@ -50,12 +50,12 @@ and the following grammar defines the "when defining a thing" end.
when defining <s-type-expression> | ==> WHEN_DEFINING_INC; <<parse_node:s>> = RP[1]
when defining ... | ==> @<Issue PM_WhenDefiningUnknown problem@>
before the library | ==> @<Issue PM_BeforeTheLibrary problem@>
in the preform grammar ==> AS_PREFORM_INC
in the preform grammar ==> { AS_PREFORM_INC, - }
<inclusion-side> ::=
before | ==> BEFORE_LINK_STAGE
instead of | ==> INSTEAD_LINK_STAGE
after ==> AFTER_LINK_STAGE
before | ==> { BEFORE_LINK_STAGE, - }
instead of | ==> { INSTEAD_LINK_STAGE, - }
after ==> { AFTER_LINK_STAGE, - }
@<Note segment-level inclusion@> =
*X = SEGMENT_LEVEL_INC;

View file

@ -65,10 +65,10 @@ it hard to see what any given component has done.
=
<test-sentence-subject> ::=
<internal-test-case-name> ( internal ) | ==> R[1]
<internal-test-case-name> ( internal ) | ==> { pass 1 }
### ( internal ) | ==> @<Issue PM_UnknownInternalTest problem@>
<quoted-text> | ==> @<Issue PM_TestQuoted problem@>
### | ==> EXTERNAL_INTT
### | ==> { EXTERNAL_INTT, - }
... ==> @<Issue PM_TestMultiWord problem@>
@ These test case names are in English only and may change at any time

View file

@ -28,12 +28,12 @@ such as "The yourself object" in
=
<translates-into-i6-sentence-subject> ::=
... property | ==> PROPERTY_I6TR
... object/kind | ==> NOUN_I6TR
{... rule} | ==> RULE_I6TR
... variable | ==> VARIABLE_I6TR
... action | ==> ACTION_I6TR
understand token ... | ==> GRAMMAR_TOKEN_I6TR
... property | ==> { PROPERTY_I6TR, - }
... object/kind | ==> { NOUN_I6TR, - }
{... rule} | ==> { RULE_I6TR, - }
... variable | ==> { VARIABLE_I6TR, - }
... action | ==> { ACTION_I6TR, - }
understand token ... | ==> { GRAMMAR_TOKEN_I6TR, - }
... ==> @<Issue PM_TranslatedUnknownCategory problem@>
@<Issue PM_TranslatedUnknownCategory problem@> =
@ -51,8 +51,8 @@ will be required to pass |<extra-response>|.
=
<translates-into-i6-sentence-object> ::=
<quoted-text> with <np-articled-list> | ==> R[1]; *XP = RP[2];
<quoted-text> ==> R[1]; *XP = NULL;
<quoted-text> with <np-articled-list> | ==> { R[1], RP[2] }
<quoted-text> ==> { R[1], NULL }
@ =
void IdentifierTranslations::as(parse_node *pn) {

View file

@ -111,7 +111,7 @@ void UseOptions::new_use_option(parse_node *p) {
use <np-unparsed> ==> TRUE; *XP = RP[1]
<use-translates-as-sentence-object> ::=
(- ### | ==> TRUE
(- ### | ==> { TRUE, - }
... ==> @<Issue PM_UseTranslatesNotI6 problem@>
@<Issue PM_UseTranslatesNotI6 problem@> =
@ -142,13 +142,13 @@ option name is taken from the |...| or |###| as appropriate:
=
<use-sentence-object> ::=
... of at least <cardinal-number-unlimited> | ==> R[1]
### of <cardinal-number-unlimited> | ==> -R[1]
<definite-article> ... | ==> { 0, - }
... ==> { 0, - }
... of at least <cardinal-number-unlimited> | ==> { R[1], - }
### of <cardinal-number-unlimited> | ==> { -R[1], - }
<definite-article> ... | ==> { 0, - }
... ==> { 0, - }
<use-inter-pipeline> ::=
inter pipeline {<quoted-text>} ==> TRUE
inter pipeline {<quoted-text>} ==> { TRUE, - }
@ 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
@ -324,8 +324,8 @@ those which need immediate action.
=
<immediate-use> ::=
... | ==> TRUE; return preform_lookahead_mode; /* match only when looking ahead */
<immediate-use-entry> <immediate-use-tail> | ==> TRUE
<immediate-use-entry> ==> TRUE
<immediate-use-entry> <immediate-use-tail> | ==> { TRUE, - }
<immediate-use-entry> ==> { TRUE, - }
<immediate-use-tail> ::=
, _and <immediate-use> |

View file

@ -2495,18 +2495,18 @@ of alternatives each of which matches the following:
=
<specifies-sentence-subject> ::=
... ( {<literal-pattern-group-list>} ) | ==> R[1]; *XP = RP[1]
... ( {<literal-pattern-group-list>} ) | ==> { pass 1 }
<k-kind-articled> times <k-kind-articled> | ==> TIMES_LPN; LP_left_kind = RP[1]; LP_right_kind = RP[2];
<s-type-expression> times <s-type-expression> | ==> @<Issue PM_MultiplyingNonKOVs problem@>
... ==> 0; *XP = NULL
<literal-pattern-group-list> ::=
<literal-pattern-group> <literal-pattern-group-tail> | ==> R[1] | R[2]; @<Compose LPG lists@>;
<literal-pattern-group> ==> R[1]; *XP = RP[1]
<literal-pattern-group> ==> { pass 1 }
<literal-pattern-group-tail> ::=
, and <literal-pattern-group-list> | ==> R[1]; *XP = RP[1]
,/and <literal-pattern-group-list> ==> R[1]; *XP = RP[1]
, and <literal-pattern-group-list> | ==> { pass 1 }
,/and <literal-pattern-group-list> ==> { pass 1 }
<literal-pattern-group> ::=
singular | ==> SINGULAR_LPN; *XP = NULL;
@ -2557,7 +2557,7 @@ can't set both scaling and an equivalent, for instance.
=
<specifies-sentence-object> ::=
<kind-specified> <literal-pattern-specification-tail> | ==> R[2]; *XP = RP[2]
<kind-specified> <literal-pattern-specification-tail> | ==> { pass 2 }
<kind-specified> ==> 0; *XP = NULL
<kind-specified> ::=
@ -2566,7 +2566,7 @@ can't set both scaling and an equivalent, for instance.
<literal-pattern-specification-tail> ::=
with parts <literal-pattern-part-list> | ==> PARTS_LPC; *XP = RP[1];
<scaling-instruction> | ==> SCALING_LPC
<scaling-instruction> | ==> { SCALING_LPC, - }
<scaling-instruction> offset by <s-literal> | ==> SCALING_LPC; LP_real_offset = latest_constructed_real; LP_offset_value = RP[2];
offset by <s-literal> | ==> OFFSET_LPC; LP_real_offset = latest_constructed_real; LP_offset_value = RP[1];
equivalent to <s-literal> ==> EQUIVALENT_LPC; LP_real_equivalent = latest_constructed_real; LP_equivalent_value = RP[1];
@ -2607,16 +2607,16 @@ by a bracketed list of up to three options in any order.
<literal-pattern-part-option-list> ::=
<literal-pattern-part-option> <literal-pattern-part-option-tail> | ==> R[1] | R[2]
<literal-pattern-part-option> ==> R[1]
<literal-pattern-part-option> ==> { pass 1 }
<literal-pattern-part-option-tail> ::=
, and <literal-pattern-part-option-list> | ==> R[1]
,/and <literal-pattern-part-option-list> ==> R[1]
, and <literal-pattern-part-option-list> | ==> { pass 1 }
,/and <literal-pattern-part-option-list> ==> { pass 1 }
<literal-pattern-part-option> ::=
optional | ==> OPTIONAL_LSO
preamble optional | ==> PREAMBLE_OPTIONAL_LSO
without leading zeros | ==> WITHOUT_LEADING_ZEROS_LSO
optional | ==> { OPTIONAL_LSO, - }
preamble optional | ==> { PREAMBLE_OPTIONAL_LSO, - }
without leading zeros | ==> { WITHOUT_LEADING_ZEROS_LSO, - }
...... ==> @<Issue PM_BadLPPartOption problem@>
@<Issue PM_BadLPPartOption problem@> =

View file

@ -157,8 +157,8 @@ a specific time of day, or when a named event occurs.
=
<event-rule-preamble> ::=
at <clock-time> | ==> R[1]
at the time when ... | ==> NO_FIXED_TIME
at <clock-time> | ==> { pass 1 }
at the time when ... | ==> { NO_FIXED_TIME, - }
at the time that ... | ==> @<Issue PM_AtTimeThat problem@>
at ... ==> @<Issue PM_AtWithoutTime problem@>

View file

@ -35,8 +35,8 @@ different code number).
=
<translates-into-unicode-sentence-subject> ::=
<unicode-character-name> | ==> R[1]
... ==> -1
<unicode-character-name> | ==> { pass 1 }
... ==> { -1, - }
@ 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.
@ -45,7 +45,7 @@ the built-in extensions anyway; Inform authors never type them.
=
<translates-into-unicode-sentence-object> ::=
<cardinal-number-unlimited> | ==> R[1]
<cardinal-number-unlimited> | ==> { pass 1 }
... ==> @<Issue PM_UnicodeNonLiteral problem@>
@<Issue PM_UnicodeNonLiteral problem@> =

View file

@ -146,9 +146,9 @@ as the object.
<infinitive-usage> ==> R[1]; <<giving-parts>> = FALSE
<infinitive-usage> ::=
{be able to ...} | ==> TRUE
{be able to} | ==> TRUE
... ==> FALSE
{be able to ...} | ==> { TRUE, - }
{be able to} | ==> { TRUE, - }
... ==> { FALSE, - }
@ The text in brackets, if given, is a comma-separated list of conjugations
of the verb. Each one is matched against this:
@ -187,8 +187,8 @@ now absolutely any non-empty word range is accepted as the property name.
reversed <relation-name> relation | ==> REL_VERBM; *XP = BinaryPredicates::get_reversal(RP[1])
<relation-name> relation | ==> REL_VERBM; *XP = RP[1]
to <instance-of-infinitive-form> | ==> @<Use verb infinitive as shorthand@>
... property | ==> PROP_VERBM
built-in ... meaning | ==> BUILTIN_VERBM
... property | ==> { PROP_VERBM, - }
built-in ... meaning | ==> { BUILTIN_VERBM, - }
... relation | ==> @<Issue PM_VerbRelationUnknown problem@>
{relation} | ==> @<Issue PM_VerbRelationVague problem@>
... ==> @<Issue PM_VerbUnknownMeaning problem@>
@ -233,8 +233,8 @@ now absolutely any non-empty word range is accepted as the property name.
=
<new-verb-sentence-object> ::=
<indefinite-article> <new-verb-sentence-object-unarticled> | ==> R[2]; *XP = RP[2]
<new-verb-sentence-object-unarticled> ==> R[1]; *XP = RP[1]
<indefinite-article> <new-verb-sentence-object-unarticled> | ==> { pass 2 }
<new-verb-sentence-object-unarticled> ==> { pass 1 }
<new-verb-sentence-object-unarticled> ::=
verb | ==> TRUE; *XP = NULL;
@ -266,8 +266,8 @@ int NewVerbs::new_verb_SMF(int task, parse_node *V, wording *NPs) {
=
<verb-means-sentence-subject> ::=
<definite-article> <verb-means-sentence-subject-unarticled> | ==> R[2]; *XP = RP[2]
<verb-means-sentence-subject-unarticled> ==> R[1]; *XP = RP[1]
<definite-article> <verb-means-sentence-subject-unarticled> | ==> { pass 2 }
<verb-means-sentence-subject-unarticled> ==> { pass 1 }
<verb-means-sentence-subject-unarticled> ::=
verb to | ==> { fail }
@ -1121,8 +1121,8 @@ int NewVerbs::takes_contraction_form(word_assemblage *wa) {
=
<new-adjective-sentence-object> ::=
<indefinite-article> <new-adjective-sentence-object-unarticled> | ==> R[2]; *XP = RP[2]
<new-adjective-sentence-object-unarticled> ==> R[1]; *XP = RP[1]
<indefinite-article> <new-adjective-sentence-object-unarticled> | ==> { pass 2 }
<new-adjective-sentence-object-unarticled> ==> { pass 1 }
<new-adjective-sentence-object-unarticled> ::=
adjective | ==> TRUE; *XP = NULL

View file

@ -135,7 +135,7 @@ text of the subject mustn't be an existing relation name.
=
<relates-sentence-subject> ::=
<relation-name> | ==> @<Issue PM_RelationExists problem@>
... ==> TRUE
... ==> { TRUE, - }
@<Issue PM_RelationExists problem@> =
*X = FALSE;
@ -305,26 +305,26 @@ to be the name of a kind, possibly in the plural.
=
<relates-sentence-left-object> ::=
<relation-term-basic> ( called ... ) | ==> R[1] | CALLED_RBIT
<relation-term-basic> ==> R[1]
<relation-term-basic> ==> { pass 1 }
<relates-sentence-right-object> ::=
<relation-term-right-named> with fast route-finding | ==> R[1] | FRF_RBIT
<relation-term-right-named> when ... | ==> R[1] | WHEN_RBIT
<relation-term-right-named> ==> R[1]
<relation-term-right-named> ==> { pass 1 }
<relation-term-right-named> ::=
<relation-term-right> ( called ... ) | ==> R[1] | CALLED_RBIT
<relation-term-right> ==> R[1]
<relation-term-right> ==> { pass 1 }
<relation-term-right> ::=
{another} | ==> ANOTHER_RBIT
{each other} | ==> EACHOTHER_RBIT
{each other in groups} | ==> GROUPS_RBIT
<relation-term-basic> ==> R[1]
{another} | ==> { ANOTHER_RBIT, - }
{each other} | ==> { EACHOTHER_RBIT, - }
{each other in groups} | ==> { GROUPS_RBIT, - }
<relation-term-basic> ==> { pass 1 }
<relation-term-basic> ::=
one ... | ==> ONE_RBIT
various ... | ==> VAR_RBIT
one ... | ==> { ONE_RBIT, - }
various ... | ==> { VAR_RBIT, - }
... ==> { 0, - }
@h The parsing phase.

View file

@ -204,13 +204,13 @@ void Sentences::VPs::switch_dl_mode(parse_node *PN, int sense) {
@ =
<include-in-debugging-sentence-subject> ::=
only <debugging-log-request> | ==> R[1] | ONLY_DLR; *XP = RP[1]
<debugging-log-request> ==> R[1]; *XP = RP[1]
<debugging-log-request> ==> { pass 1 }
<debugging-log-request> ::=
everything | ==> EVERYTHING_DLR
nothing | ==> NOTHING_DLR
everything | ==> { EVERYTHING_DLR, - }
nothing | ==> { NOTHING_DLR, - }
<preform-nonterminal> | ==> PREFORM_DLR; *XP = RP[1]
... ==> SOMETHING_DLR
... ==> { SOMETHING_DLR, - }
=
void Sentences::VPs::set_aspect_from_text(wording W, int new_state) {

View file

@ -12,7 +12,7 @@ Y or Z...".
=
<either-sentence-object> ::=
either <np-unparsed> ==> TRUE; *XP = RP[1]
either <np-unparsed> ==> { pass 1 }
@ =
int Assertions::Property::either_SMF(int task, parse_node *V, wording *NPs) {

View file

@ -394,7 +394,7 @@ of grammatical gender for languages other than English.
=
<grammatical-gender-marker> ::=
... ( <grammatical-gender-abbreviation> ) ==> R[1]
... ( <grammatical-gender-abbreviation> ) ==> { pass 1 }
<grammatical-gender-abbreviation> ::=
n |

View file

@ -61,21 +61,21 @@ The object noun phrase is an articled list, and each entry must match this.
<exposed-innards> | ==> R[1]; <<privacy>> = NOT_APPLICABLE
cover art ( <quoted-text> ) | ==> COVER_ART_PAYLOAD; <<alttext>> = R[1];
cover art | ==> COVER_ART_PAYLOAD; <<alttext>> = -1;
existing story file | ==> EXISTING_STORY_FILE_PAYLOAD
existing story file called {<quoted-text-without-subs>} | ==> NAMED_EXISTING_STORY_FILE_PAYLOAD
file of {<quoted-text-without-subs>} called {<quoted-text-without-subs>} | ==> AUXILIARY_FILE_PAYLOAD
file {<quoted-text-without-subs>} in {<quoted-text-without-subs>} | ==> HIDDEN_FILE_IN_PAYLOAD
file {<quoted-text-without-subs>} | ==> HIDDEN_FILE_PAYLOAD
style sheet {<quoted-text-without-subs>} | ==> CSS_PAYLOAD
javascript {<quoted-text-without-subs>} | ==> JAVASCRIPT_PAYLOAD
introductory booklet | ==> BOOKLET_PAYLOAD
introductory postcard | ==> POSTCARD_PAYLOAD
website | ==> WEBSITE_PAYLOAD
separate figures | ==> SEPARATE_FIGURES_PAYLOAD
separate sounds | ==> SEPARATE_SOUNDS_PAYLOAD
{<quoted-text-without-subs>} website | ==> THEMED_WEBSITE_PAYLOAD
interpreter | ==> INTERPRETER_PAYLOAD
{<quoted-text-without-subs>} interpreter ==> THEMED_INTERPRETER_PAYLOAD
existing story file | ==> { EXISTING_STORY_FILE_PAYLOAD, - }
existing story file called {<quoted-text-without-subs>} | ==> { NAMED_EXISTING_STORY_FILE_PAYLOAD, - }
file of {<quoted-text-without-subs>} called {<quoted-text-without-subs>} | ==> { AUXILIARY_FILE_PAYLOAD, - }
file {<quoted-text-without-subs>} in {<quoted-text-without-subs>} | ==> { HIDDEN_FILE_IN_PAYLOAD, - }
file {<quoted-text-without-subs>} | ==> { HIDDEN_FILE_PAYLOAD, - }
style sheet {<quoted-text-without-subs>} | ==> { CSS_PAYLOAD, - }
javascript {<quoted-text-without-subs>} | ==> { JAVASCRIPT_PAYLOAD, - }
introductory booklet | ==> { BOOKLET_PAYLOAD, - }
introductory postcard | ==> { POSTCARD_PAYLOAD, - }
website | ==> { WEBSITE_PAYLOAD, - }
separate figures | ==> { SEPARATE_FIGURES_PAYLOAD, - }
separate sounds | ==> { SEPARATE_SOUNDS_PAYLOAD, - }
{<quoted-text-without-subs>} website | ==> { THEMED_WEBSITE_PAYLOAD, - }
interpreter | ==> { INTERPRETER_PAYLOAD, - }
{<quoted-text-without-subs>} interpreter ==> { THEMED_INTERPRETER_PAYLOAD, - }
@<Issue PM_NoSuchPublicRelease problem@> =
*X = BOOKLET_PAYLOAD; /* to recover harmlessly */

View file

@ -342,7 +342,7 @@ itself.
=
<index-map-sentence-subject> ::=
eps file | ==> EPSFILE_IMW
eps file | ==> { EPSFILE_IMW, - }
<direction-name> mapped as <direction-name> | ==> MAPPED_AS_IMW; <<instance:x>> = RP[1]; <<instance:y>> = RP[2];
... mapped as ... | ==> @<Issue PM_MapDirectionClue problem@>
<instance-of-object> mapped <map-positioning> | ==> MAPPED_IMW; <<instance:x>> = RP[1]; <<instance:y>> = RP[2];
@ -350,7 +350,7 @@ itself.
<map-setting> set to <map-setting-value> | ==> SETTING_IMW; <<scoping>> = R[1]; if (R[1] == NO_IMW) *X = NO_IMW; <<msvtype>> = R[2]
<map-setting> set to ... | ==> @<Issue PM_MapSettingTooLong problem@>
... set to ... | ==> @<Issue PM_MapSettingOfUnknown problem@>
rubric {<quoted-text-without-subs>} *** | ==> RUBRIC_IMW
rubric {<quoted-text-without-subs>} *** | ==> { RUBRIC_IMW, - }
... ==> @<Issue PM_MapHintUnknown problem@>
<map-positioning> ::=
@ -409,11 +409,11 @@ itself.
... of <map-setting-scope> ==> @<Issue PM_MapSettingUnknown problem@>
<map-setting-scope> ::=
<definite-article> <map-setting-scope-unarticled> | ==> R[2]
<map-setting-scope-unarticled> ==> R[1]
<definite-article> <map-setting-scope-unarticled> | ==> { pass 2 }
<map-setting-scope-unarticled> ==> { pass 1 }
<map-setting-scope-unarticled> ::=
first room | ==> FIRST_ROOM_MAP_SCOPE
first room | ==> { FIRST_ROOM_MAP_SCOPE, - }
level <cardinal-number> | ==> LEVEL_MAP_SCOPE; <<level>> = R[1]
<k-kind> | ==> KIND_MAP_SCOPE; <<kind:kscope>> = RP[1]
<instance-of-object> ==> INSTANCE_MAP_SCOPE; <<instance:iscope>> = RP[1]
@ -461,8 +461,8 @@ Never mind.
### ==> -1; <<msword>> = Wordings::first_wn(W); /* leads to a problem message later */
<map-setting-boolean> ::=
on | ==> TRUE
off ==> FALSE
on | ==> { TRUE, - }
off ==> { FALSE, - }
@ Map offsets have a cutesy notation: |10&-30|, for example, written as a
single word. The following nonterminal actually matches any single word

View file

@ -381,7 +381,7 @@ if it doesn't already exist:
=
<scene-ends-sentence-adverb> ::=
<scene-end-name-creating> ==> R[1]
<scene-end-name-creating> ==> { pass 1 }
@ The following is elementary enough, but we want to be careful because
there are possible ambiguities: the condition might contain the word "ends"
@ -390,7 +390,7 @@ in a different context, for instance, and could still be valid in that case.
=
<scene-ends-sentence-object> ::=
<text-including-a-calling> | ==> @<Issue PM_ScenesDisallowCalled problem@>
play begins | ==> -1
play begins | ==> { -1, - }
play ends | ==> @<Issue PM_ScenesNotPlay problem@>
<scene-name> begins | ==> 0; <<scene:named>> = RP[1]
<scene-name> ends | ==> 1; <<scene:named>> = RP[1]
@ -427,8 +427,8 @@ and also internally converts the result:
=
<scene-name> ::=
<definite-article> <scene-name-unarticled> | ==> R[2]; *XP = RP[2]
<scene-name-unarticled> ==> R[1]; *XP = RP[1]
<definite-article> <scene-name-unarticled> | ==> { pass 2 }
<scene-name-unarticled> ==> { pass 1 }
<scene-name-unarticled> ::=
<instance-of-non-object> ==> @<Convert instance result to scene result, if possible@>

View file

@ -147,7 +147,7 @@ for instance, we don't want to count the "in" from "fixed in place".
<anl-in-tail> ::=
fixed in place *** | ==> { advance Wordings::delta(WR[1], W) }
is/are/was/were/been/listed in *** | ==> { advance Wordings::delta(WR[1], W) }
in ... ==> TRUE
in ... ==> { TRUE, - }
@<Augment ANL with in clause@> =
action_name_list *anl = RP[1];

View file

@ -794,17 +794,17 @@ We treat words like "something" specially to avoid them being read as
=
<action-operand> ::=
something/anything | ==> FALSE
something/anything else | ==> FALSE
something/anything | ==> { FALSE, - }
something/anything else | ==> { FALSE, - }
<action-parameter> ==> TRUE; *XP = RP[1]
<going-action-irregular-operand> ::=
nowhere | ==> FALSE
somewhere ==> TRUE
nowhere | ==> { FALSE, - }
somewhere ==> { TRUE, - }
<understanding-action-irregular-operand> ::=
something/anything | ==> TRUE
it ==> FALSE
something/anything | ==> { TRUE, - }
it ==> { FALSE, - }
@ Finally, then, <action-parameter>. Almost anything syntactically matches
here -- a constant, a description, a table entry, a variable, and so on.

View file

@ -531,16 +531,16 @@ and this allows "exiting from the cage", say, as an action pattern.
=
<action-variable> ::=
<action-variable-name> ( matched as {<quoted-text-without-subs>} ) | ==> TRUE
<action-variable-name> ( matched as {<quoted-text-without-subs>} ) | ==> { TRUE, - }
<action-variable-name> ( ... ) | ==> @<Issue PM_BadMatchingSyntax problem@>
<action-variable-name> ==> FALSE
<action-variable-name> ==> { FALSE, - }
@ And the new action variable name is vetted by being run through this:
=
<action-variable-name> ::=
<unfortunate-name> | ==> @<Issue PM_ActionVarAnd problem@>
... ==> TRUE
... ==> { TRUE, - }
@<Issue PM_BadMatchingSyntax problem@> =
*X = NOT_APPLICABLE;
@ -708,8 +708,8 @@ void PL::Actions::compile_action_name_var_creators(void) {
=
<new-action-sentence-object> ::=
<indefinite-article> <new-action-sentence-object-unarticled> | ==> R[2]; *XP = RP[2]
<new-action-sentence-object-unarticled> ==> R[1]; *XP = RP[1]
<indefinite-article> <new-action-sentence-object-unarticled> | ==> { pass 2 }
<new-action-sentence-object-unarticled> ==> { pass 1 }
<new-action-sentence-object-unarticled> ::=
action <nounphrase-actionable> | ==> TRUE; *XP = RP[1]
@ -793,11 +793,11 @@ It's convenient to define a single action clause first:
=
<action-clause> ::=
out of world | ==> OOW_ACT_CLAUSE
abbreviable | ==> ABBREV_ACT_CLAUSE
with past participle ... | ==> PP_ACT_CLAUSE
out of world | ==> { OOW_ACT_CLAUSE, - }
abbreviable | ==> { ABBREV_ACT_CLAUSE, - }
with past participle ... | ==> { PP_ACT_CLAUSE, - }
applying to <action-applications> | ==> APPLYING_ACT_CLAUSE; <<num>> = R[1]
requiring light ==> LIGHT_ACT_CLAUSE
requiring light ==> { LIGHT_ACT_CLAUSE, - }
<action-applications> ::=
nothing | ==> { 0, - }
@ -812,13 +812,13 @@ It's convenient to define a single action clause first:
... ==> @<Issue PM_ActionMisapplied problem@>;
<act-req> ::=
<action-access> <k-kind> | ==> R[1]; *XP = RP[2]; @<Check action kind@>;
<k-kind> ==> UNRESTRICTED_ACCESS; *XP = RP[1]; @<Check action kind@>;
<action-access> <k-kind> | ==> { R[1], RP[2] }; @<Check action kind@>;
<k-kind> ==> { UNRESTRICTED_ACCESS, RP[1] }; @<Check action kind@>;
<action-access> ::=
visible | ==> DOESNT_REQUIRE_ACCESS
touchable | ==> REQUIRES_ACCESS
carried ==> REQUIRES_POSSESSION
visible | ==> { DOESNT_REQUIRE_ACCESS, - }
touchable | ==> { REQUIRES_ACCESS, - }
carried ==> { REQUIRES_POSSESSION, - }
@ We are now able to define this peculiar form of list of action clauses:
@ -833,10 +833,10 @@ It's convenient to define a single action clause first:
<action-clause-terminated> ==> R[1]; @<Act on this action information@>
<action-clause-terminated> ::=
<action-clause> , and | ==> R[1]
<action-clause> and | ==> R[1]
<action-clause> , | ==> R[1]
<action-clause> ==> R[1]
<action-clause> , and | ==> { pass 1 }
<action-clause> and | ==> { pass 1 }
<action-clause> , | ==> { pass 1 }
<action-clause> ==> { pass 1 }
@<Issue PM_ActionClauseUnknown problem@> =
StandardProblems::sentence_problem(Task::syntax_tree(), _p_(PM_ActionClauseUnknown),

View file

@ -59,9 +59,9 @@ four constituent tokens.
=
<grammar-token-breaking> ::=
... , ... | ==> NOT_APPLICABLE
<quoted-text> | ==> TRUE
... ==> FALSE
... , ... | ==> { NOT_APPLICABLE, - }
<quoted-text> | ==> { TRUE, - }
... ==> { FALSE, - }
@ We use a different punctuation set, in which forward slashes break words,
to handle such as:
@ -236,15 +236,15 @@ kind *PL::Parsing::Tokens::kind_for_special_token(int gtc) {
... ==> @<Issue PM_UnknownToken problem@>
<standard-grammar-token> ::=
something | ==> NOUN_TOKEN_GTC
things | ==> MULTI_TOKEN_GTC
things inside | ==> MULTIINSIDE_TOKEN_GTC
things preferably held | ==> MULTIHELD_TOKEN_GTC
something preferably held | ==> HELD_TOKEN_GTC
other things | ==> MULTIEXCEPT_TOKEN_GTC
someone | ==> CREATURE_TOKEN_GTC
somebody | ==> CREATURE_TOKEN_GTC
text | ==> TOPIC_TOKEN_GTC
something | ==> { NOUN_TOKEN_GTC, - }
things | ==> { MULTI_TOKEN_GTC, - }
things inside | ==> { MULTIINSIDE_TOKEN_GTC, - }
things preferably held | ==> { MULTIHELD_TOKEN_GTC, - }
something preferably held | ==> { HELD_TOKEN_GTC, - }
other things | ==> { MULTIEXCEPT_TOKEN_GTC, - }
someone | ==> { CREATURE_TOKEN_GTC, - }
somebody | ==> { CREATURE_TOKEN_GTC, - }
text | ==> { TOPIC_TOKEN_GTC, - }
topic | ==> @<Issue PM_UseTextNotTopic problem@>
a topic | ==> @<Issue PM_UseTextNotTopic problem@>
object | ==> @<Issue PM_UseThingNotObject problem@>

View file

@ -285,7 +285,7 @@ It's not widely known, but the object phrase here can be a list.
plural of <understand-ref> | ==> R[1]; ur_being_parsed.pluralised_reference = TRUE;
<quoted-text> | ==> 0; ur_being_parsed.gv_result = GV_IS_TOKEN;
<understand-ref> ( with nouns reversed ) | ==> R[1]; ur_being_parsed.reversed_reference = TRUE;
<understand-ref> ==> R[1]
<understand-ref> ==> { pass 1 }
<understand-ref> ::=
<action-name> | ==> 0; ur_being_parsed.an_reference = RP[1];

View file

@ -158,8 +158,8 @@ to other natural languages.
=
<documentation-symbol-tail> ::=
... ( <documentation-symbol> ) | ==> R[1]
... -- <documentation-symbol> -- ==> R[1]
... ( <documentation-symbol> ) | ==> { pass 1 }
... -- <documentation-symbol> -- ==> { pass 1 }
<documentation-symbol> ::=
documented at ### ==> Wordings::first_wn(WR[1])

View file

@ -66,41 +66,41 @@ phrase tokens.
=
<k-kind-as-name-token> ::=
( <k-kind-as-name-token> ) | ==> RP[1]
name of kind of <k-kind-abbreviating> | ==> RP[1]
name of kind <k-kind-abbreviating> | ==> RP[1]
name of kind of ... | ==> NULL
name of kind ... ==> NULL
( <k-kind-as-name-token> ) | ==> { pass 1 }
name of kind of <k-kind-abbreviating> | ==> { pass 1 }
name of kind <k-kind-abbreviating> | ==> { pass 1 }
name of kind of ... | ==> { -, NULL }
name of kind ... ==> { -, NULL }
<k-kind-abbreviating> ::=
( <k-kind-abbreviating> ) | ==> RP[1]
( <k-kind-abbreviating> ) | ==> { pass 1 }
<k-kind-of-kind> <k-formal-kind-variable> | ==> Kinds::variable_construction(R[2], RP[1])
<k-kind> ==> RP[1]
<k-kind> ==> { pass 1 }
@ So now we can begin properly. Every valid kind matches <k-kind>:
=
<k-kind> ::=
( <k-kind> ) | ==> RP[1]
^<if-parsing-phrase-tokens> <k-kind-variable> | ==> RP[2]
<if-parsing-phrase-tokens> <k-variable-definition> | ==> RP[2]
<k-base-kind> | ==> RP[1]
<k-irregular-kind-construction> | ==> RP[1]
<k-kind-construction> ==> RP[1]
( <k-kind> ) | ==> { pass 1 }
^<if-parsing-phrase-tokens> <k-kind-variable> | ==> { pass 2 }
<if-parsing-phrase-tokens> <k-variable-definition> | ==> { pass 2 }
<k-base-kind> | ==> { pass 1 }
<k-irregular-kind-construction> | ==> { pass 1 }
<k-kind-construction> ==> { pass 1 }
@ And, as a convenient shorthand:
=
<k-kind-articled> ::=
<indefinite-article> <k-kind> | ==> RP[2]
<k-kind> ==> RP[1]
<indefinite-article> <k-kind> | ==> { pass 2 }
<k-kind> ==> { pass 1 }
@ In phrase-token mode, kind variables are treated as formal symbols, not as
the kinds which are their current values:
=
<k-variable-definition> ::=
<k-formal-kind-variable> | ==> RP[1]
<k-formal-kind-variable> | ==> { pass 1 }
<k-kind-of-kind> of kind <k-formal-kind-variable> ==> Kinds::variable_construction(R[2], RP[1])
@ Some base kinds with one-word names have that word flagged with a direct
@ -242,19 +242,19 @@ be more varied.
=
<k-single-material> ::=
( <k-single-material> ) | ==> RP[1]
<article> <k-single-material> | ==> RP[2]
<k-kind> ==> RP[1]
( <k-single-material> ) | ==> { pass 1 }
<article> <k-single-material> | ==> { pass 2 }
<k-kind> ==> { pass 1 }
<k-optional-material> ::=
( <k-optional-material> ) | ==> RP[1]
<article> <k-optional-material> | ==> RP[2]
( <k-optional-material> ) | ==> { pass 1 }
<article> <k-optional-material> | ==> { pass 2 }
nothing | ==> K_nil
action | ==> K_action_name
<k-kind> ==> RP[1]
<k-kind> ==> { pass 1 }
<k-tupled-material> ::=
( <k-tuple-list> ) | ==> RP[1]
( <k-tuple-list> ) | ==> { pass 1 }
nothing | ==> K_nil
<k-single-material> ==> Kinds::binary_construction(CON_TUPLE_ENTRY, RP[1], K_nil)

View file

@ -76,18 +76,18 @@ Here is the subject:
=
<external-file-sentence-subject> ::=
<definite-article> <external-file-sentence-subject> | ==> R[2]
<definite-article> <external-file-sentence-subject> | ==> { pass 2 }
text <external-file-name> | ==> FALSE; <<ownership>> = R[1]
binary <external-file-name> | ==> TRUE; <<ownership>> = R[1]
<external-file-name> ==> FALSE; <<ownership>> = R[1]
<external-file-name> ::=
{file ...} ( owned by <external-file-owner> ) | ==> R[1]
{file ...} ==> NOT_APPLICABLE
{file ...} ( owned by <external-file-owner> ) | ==> { pass 1 }
{file ...} ==> { NOT_APPLICABLE, - }
<external-file-owner> ::=
another project | ==> FALSE
project {<quoted-text-without-subs>} | ==> TRUE
another project | ==> { FALSE, - }
project {<quoted-text-without-subs>} | ==> { TRUE, - }
... ==> @<Issue PM_BadFileOwner problem@>
@<Issue PM_BadFileOwner problem@> =
@ -110,7 +110,7 @@ letters or digits, with the first being a letter.
=
<external-file-sentence-object> ::=
<quoted-text> | ==> R[1]
<quoted-text> | ==> { pass 1 }
... ==> @<Issue PM_FilenameNotTextual problem@>
@<Issue PM_FilenameNotTextual problem@> =
@ -123,8 +123,8 @@ letters or digits, with the first being a letter.
=
<new-file-sentence-object> ::=
<indefinite-article> <new-file-sentence-object-unarticled> | ==> R[2]; *XP = RP[2]
<new-file-sentence-object-unarticled> ==> R[1]; *XP = RP[1]
<indefinite-article> <new-file-sentence-object-unarticled> | ==> { pass 2 }
<new-file-sentence-object-unarticled> ==> { pass 1 }
<new-file-sentence-object-unarticled> ::=
called <np-unparsed> ==> TRUE; *XP = RP[1];

View file

@ -76,8 +76,8 @@ blorb_figure *PL::Figures::new_blorb_figure(instance *nc) {
=
<new-figure-sentence-object> ::=
<definite-article> <new-figure-sentence-object-unarticled> | ==> R[2]; *XP = RP[2]
<new-figure-sentence-object-unarticled> ==> R[1]; *XP = RP[1]
<definite-article> <new-figure-sentence-object-unarticled> | ==> { pass 2 }
<new-figure-sentence-object-unarticled> ==> { pass 1 }
<new-figure-sentence-object-unarticled> ::=
file <np-unparsed> ==> TRUE; *XP = RP[1]
@ -110,11 +110,11 @@ int PL::Figures::new_figure_SMF(int task, parse_node *V, wording *NPs) {
@ =
<figure-sentence-object> ::=
<figure-source> ( <quoted-text> ) | ==> R[1]; <<alttext>> = R[2];
<figure-source> ==> R[1]
<figure-source> ==> { pass 1 }
<figure-source> ::=
of cover art | ==> -1
<quoted-text> | ==> R[1]
of cover art | ==> { -1, - }
<quoted-text> | ==> { pass 1 }
... ==> @<Issue PM_PictureNotTextual problem@>;
@<Issue PM_PictureNotTextual problem@> =

View file

@ -68,8 +68,8 @@ blorb_sound *PL::Sounds::new_blorb_sound(instance *nc) {
=
<new-sound-sentence-object> ::=
<definite-article> <new-sound-sentence-object-unarticled> | ==> R[2]; *XP = RP[2]
<new-sound-sentence-object-unarticled> ==> R[1]; *XP = RP[1]
<definite-article> <new-sound-sentence-object-unarticled> | ==> { pass 2 }
<new-sound-sentence-object-unarticled> ==> { pass 1 }
<new-sound-sentence-object-unarticled> ::=
file <np-unparsed> ==> TRUE; *XP = RP[1]
@ -103,12 +103,12 @@ int PL::Sounds::new_sound_SMF(int task, parse_node *V, wording *NPs) {
=
<sound-sentence-object> ::=
<sound-source> ( <quoted-text> ) | ==> R[1]; <<alttext>> = R[2];
<sound-source> ==> R[1]
<sound-source> ( <quoted-text> ) | ==> R[1]; <<alttext>> = R[2];
<sound-source> ==> { pass 1 }
<sound-source> ::=
<quoted-text> | ==> R[1]
... ==> @<Issue PM_SoundNotTextual problem@>;
<quoted-text> | ==> { pass 1 }
... ==> @<Issue PM_SoundNotTextual problem@>;
@<Issue PM_SoundNotTextual problem@> =
StandardProblems::sentence_problem(Task::syntax_tree(), _p_(PM_SoundNotTextual),

View file

@ -91,7 +91,7 @@ text of three asterisks in a row.
=
<extension-example-header> ::=
example : <row-of-asterisks> ... - ... | ==> R[1]
example : <row-of-asterisks> ... - ... | ==> { pass 1 }
example : ... - ... ==> { 0, - }
<row-of-asterisks> ::=

View file

@ -78,9 +78,9 @@ And these are parsed by the following simple Preform grammar:
... = <gender> proper noun ==> @<Create proper noun@>;
<gender> ::=
neuter | ==> NEUTER_GENDER
masculine | ==> MASCULINE_GENDER
feminine ==> FEMININE_GENDER
neuter | ==> { NEUTER_GENDER, - }
masculine | ==> { MASCULINE_GENDER, - }
feminine ==> { FEMININE_GENDER, - }
<meaning> internal 1 {
*XP = Relating::find(W);

View file

@ -54,8 +54,8 @@ code of Inform by //inweb//. For example, the excerpt of grammar might have
come from some (hypothetical) source code looking like this:
= (text as Preform)
<competitor> ::=
<ordinal-number> runner | ==> TRUE
runner no <cardinal-number> ==> FALSE
<ordinal-number> runner | ==> { TRUE, - }
runner no <cardinal-number> ==> { FALSE, - }
=
Definitions like this one are scattered all across the Inform web, in order
to keep them close to the code which relates to them. //inweb// tears this
@ -83,8 +83,8 @@ the production, |R[2]| the second, and so on; |RP[1]| and so on hold the
pointer results. For example, you could make a very crude calculator with:
= (text as Preform)
<arithmetic> ::=
<cardinal-number> | ==> R[1]
<cardinal-number> plus <cardinal-number> ==> R[1]+R[2]
<cardinal-number> | ==> { pass 1 }
<cardinal-number> plus <cardinal-number> ==> { R[1]+R[2], - }
=
Here |R[1]+R[2]| produces a result by composition of the two results of
the <cardinal-number> nontermimal which occurred when parsing the line.
@ -95,14 +95,14 @@ Or consider the following refinement of <competitor>:
= (text as Preform)
<competitor> ::=
the pacemaker | ==> { 1, - }
<ordinal-number> runner | ==> R[1]
runner no <cardinal-number> ==> R[1]
<ordinal-number> runner | ==> { pass 1 }
runner no <cardinal-number> ==> { pass 1 }
=
Now "4th runner" matches with integer result 4, because <ordinal-number>
matches "4th" with integer result 4, and that goes into |R[1]|. Similarly,
"runner no 17" ends up with integer result 17. "The pacemaker" matches
with integer result 1; here there are no intermediate results to make use
of, so |R[...]| can't be used.
of, so |pass| can't be used.
@ The arrows and expressions are optional, and if they are omitted, then the
result integer is set to the alternative number, counting up from 0. For
@ -197,8 +197,8 @@ order in which they appear. For example, in
= (text as Preform)
<competitor> ::=
the pacemaker | ==> { 1, - }
<ordinal-number> runner | ==> R[1]
runner no <cardinal-number> ==> R[1]
<ordinal-number> runner | ==> { pass 1 }
runner no <cardinal-number> ==> { pass 1 }
=
the |the pacemaker| row is numbered 0, |<ordinal-number> runner| is numbered 1,
and so on. Those "match numbers" have little outward significance, but help

View file

@ -42,8 +42,8 @@ suppose //inweb// sees the following in the web it is tangling:
= (text as Preform)
<competitor> ::=
the pacemaker | ==> { 1, - }
<ordinal-number> runner | ==> R[1]
runner no <cardinal-number> ==> R[1]
<ordinal-number> runner | ==> { pass 1 }
runner no <cardinal-number> ==> { pass 1 }
=
It then tangles this macro usage into //Nonterminals::register// above:
= (text as C)