1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-06-29 05:24:57 +03:00

Changeover to new Preform notation 4

This commit is contained in:
Graham Nelson 2020-07-28 15:49:03 +01:00
parent abf51cb170
commit 05e99b9835
48 changed files with 764 additions and 753 deletions

View file

@ -91,7 +91,7 @@ word "Include", which might e.g. be "Locksmith by Emily Short".
<extension-unversioned-inner> ::= <extension-unversioned-inner> ::=
<quoted-text> *** | ==> @<Issue PM_IncludeExtQuoted problem@> <quoted-text> *** | ==> @<Issue PM_IncludeExtQuoted problem@>
... ==> 0; <<t1>> = Wordings::first_wn(W); <<t2>> = Wordings::last_wn(W) ... ==> { 0, -, <<t1>> = Wordings::first_wn(W), <<t2>> = Wordings::last_wn(W) }
@ Quite a popular mistake, this: @ Quite a popular mistake, this:

View file

@ -247,8 +247,8 @@ and here goes:
section ... ==> { 5, - } section ... ==> { 5, - }
<extension-end-marker-sentence> ::= <extension-end-marker-sentence> ::=
... begin/begins here | ==> -1; @<Check we can begin an extension here@>; ... begin/begins here | ==> { -1, - }; @<Check we can begin an extension here@>;
... end/ends here ==> -2; @<Check we can end an extension here@>; ... end/ends here ==> { -2, - }; @<Check we can end an extension here@>;
@ Note that the extension end markers are only read in extensions, so they can @ Note that the extension end markers are only read in extensions, so they can
never accidentally match in the main source text. never accidentally match in the main source text.
@ -271,16 +271,16 @@ never accidentally match in the main source text.
= =
<structural-sentence> ::= <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;
<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> | ==> { pass 1 } <language-modifying-sentence> | ==> { pass 1 }
* | ==> 0; sfsm->nt = TRACE_NT; * | ==> { 0, - }; sfsm->nt = TRACE_NT;
* <quoted-text-without-subs> | ==> 0; sfsm->nt = TRACE_NT; * <quoted-text-without-subs> | ==> { 0, - }; sfsm->nt = TRACE_NT;
<if-start-of-paragraph> table ... | ==> 0; sfsm->nt = TABLE_NT; <if-start-of-paragraph> table ... | ==> { 0, - }; sfsm->nt = TABLE_NT;
<if-start-of-paragraph> equation ... | ==> 0; sfsm->nt = EQUATION_NT; <if-start-of-paragraph> equation ... | ==> { 0, - }; sfsm->nt = EQUATION_NT;
include the ... by ... | ==> 0; sfsm->nt = INCLUDE_NT; include the ... by ... | ==> { 0, - }; sfsm->nt = INCLUDE_NT;
include ... by ... | ==> 0; sfsm->nt = INCLUDE_NT; include ... by ... | ==> { 0, - }; sfsm->nt = INCLUDE_NT;
include (- ... ==> 0; sfsm->nt = INFORM6CODE_NT; include (- ... ==> { 0, - }; sfsm->nt = INFORM6CODE_NT;
@ Rules are ordinarily detected by their colon, which divides the header from the @ 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 rest: colons are not otherwise legal in Inform. But there's an exception. If the
@ -305,7 +305,7 @@ sentences. Whereas other nonstructural sentences can wait, these can't.
= =
<language-modifying-sentence> ::= <language-modifying-sentence> ::=
include (- ### in the preform grammar | ==> -2; sfsm->nt = INFORM6CODE_NT; 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 @ The following callback function is called by //syntax// when it breaks a

View file

@ -1,6 +1,6 @@
Total memory consumption was 257150K = 251 MB Total memory consumption was 257150K = 251 MB
62.5% was used for 1344926 objects, in 273456 frames in 201 x 800K = 160800K = 157 MB: 62.5% was used for 1344930 objects, in 273460 frames in 201 x 800K = 160800K = 157 MB:
9.8% inter_tree_node_array 36 x 8192 = 294912 objects, 25953408 bytes 9.8% inter_tree_node_array 36 x 8192 = 294912 objects, 25953408 bytes
5.4% text_stream_array 2570 x 100 = 257000 objects, 14474240 bytes 5.4% text_stream_array 2570 x 100 = 257000 objects, 14474240 bytes
@ -20,8 +20,8 @@ Total memory consumption was 257150K = 251 MB
0.3% excerpt_meaning 3102 objects, 967824 bytes 0.3% excerpt_meaning 3102 objects, 967824 bytes
0.3% inter_name_array 20 x 1000 = 20000 objects, 960640 bytes 0.3% inter_name_array 20 x 1000 = 20000 objects, 960640 bytes
0.3% inter_package 13201 objects, 950472 bytes 0.3% inter_package 13201 objects, 950472 bytes
0.3% production 3899 objects, 904568 bytes 0.3% production 3901 objects, 905032 bytes
0.3% ptoken 8420 objects, 875680 bytes 0.3% ptoken 8422 objects, 875888 bytes
0.3% grammatical_usage 3614 objects, 867360 bytes 0.3% grammatical_usage 3614 objects, 867360 bytes
0.3% individual_form 2564 objects, 861504 bytes 0.3% individual_form 2564 objects, 861504 bytes
0.3% inter_symbols_table 13201 objects, 844864 bytes 0.3% inter_symbols_table 13201 objects, 844864 bytes
@ -229,5 +229,5 @@ Total memory consumption was 257150K = 251 MB
---- emitter array storage 14368 bytes in 8 claims ---- emitter array storage 14368 bytes in 8 claims
---- code generation workspace for objects 9200 bytes in 9 claims ---- code generation workspace for objects 9200 bytes in 9 claims
20.1% was overhead - 53146680 bytes = 51901K = 50 MB 20.1% was overhead - 53146008 bytes = 51900K = 50 MB

View file

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

View file

@ -29,10 +29,10 @@ and that they aren't the same as the "and" and "or" used a list dividers.
= =
<s-condition-pure> ::= <s-condition-pure> ::=
( <s-condition-pure> ) | ==> { pass 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> 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-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> | ==> { pass 1 } <s-condition-with-chronology> | ==> { pass 1 }
<s-condition-atomic> ==> { pass 1 } <s-condition-atomic> ==> { pass 1 }
@ -103,12 +103,12 @@ to other languages may want to find more elegant solutions.
= =
<s-condition-atomic> ::= <s-condition-atomic> ::=
<s-phrase-option-in-use> | ==> { pass 1 } <s-phrase-option-in-use> | ==> { pass 1 }
not <s-phrase-option-in-use> | ==> Conditions::negate(RP[1]) not <s-phrase-option-in-use> | ==> { -, Conditions::negate(RP[1]) }
<s-nonexistential-phrase-to-decide> | ==> { pass 1 } <s-nonexistential-phrase-to-decide> | ==> { pass 1 }
<s-past-action-pattern-as-condition> | ==> { pass 1 } <s-past-action-pattern-as-condition> | ==> { pass 1 }
<s-past-action-pattern-as-negated-condition> | ==> Conditions::negate(RP[1]) <s-past-action-pattern-as-negated-condition> | ==> { -, Conditions::negate(RP[1]) }
<s-action-pattern-as-condition> | ==> { pass 1 } <s-action-pattern-as-condition> | ==> { pass 1 }
<s-action-pattern-as-negated-condition> | ==> Conditions::negate(RP[1]) <s-action-pattern-as-negated-condition> | ==> { -, Conditions::negate(RP[1]) }
<s-sentence> | ==> { pass 1 } <s-sentence> | ==> { pass 1 }
<s-existential-phrase-to-decide> ==> { pass 1 } <s-existential-phrase-to-decide> ==> { pass 1 }
@ -124,12 +124,12 @@ testing the existence of something.
<s-nonexistential-phrase-to-decide> ::= <s-nonexistential-phrase-to-decide> ::=
<existential-verb-phrase> | ==> { fail } <existential-verb-phrase> | ==> { fail }
<s-phrase-to-decide> | ==> { pass 1 } <s-phrase-to-decide> | ==> { pass 1 }
not <s-phrase-to-decide> ==> Conditions::negate(RP[1]) not <s-phrase-to-decide> ==> { -, Conditions::negate(RP[1]) }
<s-existential-phrase-to-decide> ::= <s-existential-phrase-to-decide> ::=
^<existential-verb-phrase> | ==> { fail } ^<existential-verb-phrase> | ==> { fail }
<s-phrase-to-decide> | ==> { pass 1 } <s-phrase-to-decide> | ==> { pass 1 }
not <s-phrase-to-decide> ==> Conditions::negate(RP[1]) not <s-phrase-to-decide> ==> { -, Conditions::negate(RP[1]) }
<existential-verb-phrase> ::= <existential-verb-phrase> ::=
<np-existential> is/are ... <np-existential> is/are ...
@ -170,10 +170,10 @@ is handled. The following nonterminal exists to enter the AP to the meaning list
= =
<s-action-pattern-as-condition> ::= <s-action-pattern-as-condition> ::=
<we-are-action-pattern> ==> Conditions::new_TEST_ACTION(RP[1], W); <we-are-action-pattern> ==> { -, Conditions::new_TEST_ACTION(RP[1], W) }
<s-action-pattern-as-negated-condition> ::= <s-action-pattern-as-negated-condition> ::=
<action-pattern-negated> ==> Conditions::new_TEST_ACTION(RP[1], W); <action-pattern-negated> ==> { -, Conditions::new_TEST_ACTION(RP[1], W) }
@ And similarly: @ And similarly:
@ -226,12 +226,12 @@ typechecking to choose between much later on.
<s-adaptive-text> ::= <s-adaptive-text> ::=
<s-local-variable> | ==> { fail } <s-local-variable> | ==> { fail }
<adaptive-verb> verb | ==> ExParser::say_verb(RP[1], R[1], NULL, W) <adaptive-verb> verb | ==> { -, ExParser::say_verb(RP[1], R[1], NULL, W) }
<adaptive-adjective> adjective | ==> ExParser::say_adjective(RP[1], W) <adaptive-adjective> adjective | ==> { -, ExParser::say_adjective(RP[1], W) }
<adaptive-verb> | ==> ExParser::say_verb(RP[1], R[1], NULL, W) <adaptive-verb> | ==> { -, ExParser::say_verb(RP[1], R[1], NULL, W) }
<modal-verb> <adaptive-verb-infinitive> verb | ==> @<Annotate the verb with a modal@> <modal-verb> <adaptive-verb-infinitive> verb | ==> @<Annotate the verb with a modal@>
<modal-verb> <adaptive-verb-infinitive> | ==> @<Annotate the verb with a modal@> <modal-verb> <adaptive-verb-infinitive> | ==> @<Annotate the verb with a modal@>
<adaptive-adjective> ==> ExParser::say_adjective(RP[1], W) <adaptive-adjective> ==> { -, ExParser::say_adjective(RP[1], W) }
@ "To..." phrases are easy, or at least, easy to delegate: @ "To..." phrases are easy, or at least, easy to delegate:

View file

@ -15,7 +15,7 @@ is on the table". For now, though, we treat it as a noun.
= =
<s-constant-value> ::= <s-constant-value> ::=
<s-literal> | ==> { pass 1 } <s-literal> | ==> { pass 1 }
nothing | ==> Rvalues::new_nothing_object_constant(); nothing | ==> { -, Rvalues::new_nothing_object_constant() }
<s-miscellaneous-proper-noun> | ==> { pass 1 } <s-miscellaneous-proper-noun> | ==> { pass 1 }
<s-rulebook-outcome-name> outcome | ==> { pass 1 } <s-rulebook-outcome-name> outcome | ==> { pass 1 }
<s-use-option-name> option | ==> { pass 1 } <s-use-option-name> option | ==> { pass 1 }
@ -172,7 +172,7 @@ is read as if it were "scenery thing".
= =
<s-adjective-list-as-desc> ::= <s-adjective-list-as-desc> ::=
<s-adjective-list> ==> Node::AdjectiveLists::add_adjlist(Descriptions::from_proposition(NULL, W), RP[1]) <s-adjective-list> ==> { -, Node::AdjectiveLists::add_adjlist(Descriptions::from_proposition(NULL, W), RP[1]) }
@ So now we test whether an excerpt is a list of adjectives; for example, @ So now we test whether an excerpt is a list of adjectives; for example,
this matches this matches
@ -232,15 +232,15 @@ the chimp is either not hairy or not an animal.
= =
<s-adjective-list> ::= <s-adjective-list> ::=
not <indefinite-article> <s-adjective-list-unarticled> | ==> 0; *XP = Node::AdjectiveLists::make_adjlist(Node::AdjectiveLists::negate_adjlist(RP[2]), W) not <indefinite-article> <s-adjective-list-unarticled> | ==> { 0, Node::AdjectiveLists::make_adjlist(Node::AdjectiveLists::negate_adjlist(RP[2]), W) }
<indefinite-article> <s-adjective-list-unarticled> | ==> 0; *XP = Node::AdjectiveLists::make_adjlist(RP[2], W) <indefinite-article> <s-adjective-list-unarticled> | ==> { 0, Node::AdjectiveLists::make_adjlist(RP[2], W) }
<s-adjective-list-unarticled> ==> 0; *XP = Node::AdjectiveLists::make_adjlist(RP[1], W) <s-adjective-list-unarticled> ==> { 0, Node::AdjectiveLists::make_adjlist(RP[1], W) }
<s-adjective-list-unarticled> ::= <s-adjective-list-unarticled> ::=
not <s-adjective> | ==> 0; *XP = Node::AdjectiveLists::negate_adjlist(RP[1]) not <s-adjective> | ==> { 0, Node::AdjectiveLists::negate_adjlist(RP[1]) }
<s-adjective> | ==> { 0, RP[1] } <s-adjective> | ==> { 0, RP[1] }
not <s-adjective> <s-adjective-list-unarticled> | ==> 0; *XP = Node::AdjectiveLists::join_adjlist(Node::AdjectiveLists::negate_adjlist(RP[1]), RP[2]) not <s-adjective> <s-adjective-list-unarticled> | ==> { 0, Node::AdjectiveLists::join_adjlist(Node::AdjectiveLists::negate_adjlist(RP[1]), RP[2]) }
<s-adjective> <s-adjective-list-unarticled> ==> 0; *XP = Node::AdjectiveLists::join_adjlist(RP[1], RP[2]) <s-adjective> <s-adjective-list-unarticled> ==> { 0, Node::AdjectiveLists::join_adjlist(RP[1], RP[2]) }
@ That reduces us to an internal nonterminal, which matches the longest @ That reduces us to an internal nonterminal, which matches the longest
possible adjective name it can see. possible adjective name it can see.
@ -352,14 +352,14 @@ them with conditions like
= =
<s-qualifiable-noun> ::= <s-qualifiable-noun> ::=
<k-kind> | ==> Specifications::from_kind(RP[1]); s_adj_domain = RP[1]; <k-kind> | ==> { -, Specifications::from_kind(RP[1]) }; s_adj_domain = RP[1];
<s-instance-name> ==> RP[1]; s_adj_domain = NULL; <s-instance-name> ==> { -, RP[1] }; s_adj_domain = NULL;
<s-qualifiable-common-noun> ::= <s-qualifiable-common-noun> ::=
<k-kind> ==> Specifications::from_kind(RP[1]); s_adj_domain = RP[1]; <k-kind> ==> { -, Specifications::from_kind(RP[1]) }; s_adj_domain = RP[1];
<s-qualifiable-proper-noun> ::= <s-qualifiable-proper-noun> ::=
<s-instance-name> ==> RP[1]; s_adj_domain = NULL; <s-instance-name> ==> { -, RP[1] }; s_adj_domain = NULL;
@ <s-instance-name> parses text exactly as if it were <instance-of-object>, but @ <s-instance-name> parses text exactly as if it were <instance-of-object>, but
is just a little faster written as an internal like this. is just a little faster written as an internal like this.
@ -388,7 +388,7 @@ whereas "empty rulebook" will work.
= =
<s-applicable-adjective-list> ::= <s-applicable-adjective-list> ::=
<s-adjective-list> ==> RP[1]; if ((s_adj_domain) && (Node::AdjectiveLists::adjlist_applies_to_kind(RP[1], s_adj_domain) == FALSE)) return FALSE; <s-adjective-list> ==> { -, RP[1] }; if ((s_adj_domain) && (Node::AdjectiveLists::adjlist_applies_to_kind(RP[1], s_adj_domain) == FALSE)) return FALSE;
@h Descriptions. @h Descriptions.
In most programming languages, commands are like imperative verbs, but their In most programming languages, commands are like imperative verbs, but their
@ -457,7 +457,7 @@ In the grammar for <s-description>, the noun is compulsory.
<s-description-uncalled> ::= <s-description-uncalled> ::=
<s-specifier> <s-description-unspecified> | ==> @<Glue on the quantification ML@> <s-specifier> <s-description-unspecified> | ==> @<Glue on the quantification ML@>
<s-specifying-noun> | ==> { pass 1 } <s-specifying-noun> | ==> { pass 1 }
<s-specifying-noun> <s-adjective-list> | ==> Node::AdjectiveLists::add_adjlist_w(RP[1], RP[2]) <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> | ==> { pass 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@> ^<if-trying-omission-permitted> ^<if-multiplicitous> <definite-article> <s-common-description-unspecified> | ==> @<Issue PM_DefiniteCommonNoun problem@>
<definite-article> <s-proper-description-unspecified> | ==> { pass 2 } <definite-article> <s-proper-description-unspecified> | ==> { pass 2 }
@ -466,15 +466,16 @@ In the grammar for <s-description>, the noun is compulsory.
<s-description-unspecified> ::= <s-description-unspecified> ::=
<s-qualifiable-noun> | ==> { pass 1 } <s-qualifiable-noun> | ==> { pass 1 }
<s-applicable-adjective-list> <s-qualifiable-noun> ==> Node::AdjectiveLists::add_adjlist(RP[2], RP[1]) <s-applicable-adjective-list> <s-qualifiable-noun> ==> { -, Node::AdjectiveLists::add_adjlist(RP[2], RP[1]) }
<s-common-description-unspecified> ::= <s-common-description-unspecified> ::=
<s-qualifiable-common-noun> | ==> { pass 1 } <s-qualifiable-common-noun> | ==> { pass 1 }
<s-applicable-adjective-list> <s-qualifiable-common-noun> ==> Node::AdjectiveLists::add_adjlist(RP[2], RP[1]) <s-applicable-adjective-list> <s-qualifiable-common-noun> ==> { -, Node::AdjectiveLists::add_adjlist(RP[2], RP[1]) }
<s-proper-description-unspecified> ::= <s-proper-description-unspecified> ::=
<s-qualifiable-proper-noun> | ==> { pass 1 } <s-qualifiable-proper-noun> | ==> { pass 1 }
<s-applicable-adjective-list> <s-qualifiable-proper-noun> ==> Node::AdjectiveLists::add_adjlist(RP[2], RP[1]) <s-applicable-adjective-list> <s-qualifiable-proper-noun> ==> { -, Node::AdjectiveLists::add_adjlist(RP[2], RP[1]) }
<if-trying-omission-permitted> internal 0 { <if-trying-omission-permitted> internal 0 {
#ifdef IF_MODULE #ifdef IF_MODULE
@ -503,7 +504,7 @@ except that the noun is optional. The only difference is right at the bottom.
<s-description-nounless-uncalled> ::= <s-description-nounless-uncalled> ::=
<s-specifier> <s-description-nounless-unspecified> | ==> @<Glue on the quantification ML@> <s-specifier> <s-description-nounless-unspecified> | ==> @<Glue on the quantification ML@>
<s-specifying-noun> | ==> { pass 1 } <s-specifying-noun> | ==> { pass 1 }
<s-specifying-noun> <s-adjective-list> | ==> Node::AdjectiveLists::add_adjlist_w(RP[1], RP[2]) <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> | ==> { pass 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@> ^<if-trying-omission-permitted> ^<if-multiplicitous> <definite-article> <s-common-description-unspecified> | ==> @<Issue PM_DefiniteCommonNoun problem@>
<indefinite-article> <s-description-nounless-unspecified> | ==> { pass 2 } <indefinite-article> <s-description-nounless-unspecified> | ==> { pass 2 }
@ -512,8 +513,8 @@ except that the noun is optional. The only difference is right at the bottom.
<s-description-nounless-unspecified> ::= <s-description-nounless-unspecified> ::=
<s-qualifiable-noun> | ==> { pass 1 } <s-qualifiable-noun> | ==> { pass 1 }
<s-applicable-adjective-list> <s-qualifiable-noun> | ==> Node::AdjectiveLists::add_adjlist(RP[2], RP[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]) <s-adjective-list> ==> { -, Node::AdjectiveLists::add_adjlist(Descriptions::from_proposition(NULL, W), RP[1]) }
@<Glue on the calling ML@> = @<Glue on the calling ML@> =
parse_node *p = RP[1]; parse_node *p = RP[1];
@ -590,8 +591,8 @@ context of a proper noun, as in "some tea", because it may be confusion of
= =
<s-calling-name> ::= <s-calling-name> ::=
<article> ... | ==> Node::new_with_words(UNKNOWN_NT, WR[1]) <article> ... | ==> { -, Node::new_with_words(UNKNOWN_NT, WR[1]) }
... ==> Node::new_with_words(UNKNOWN_NT, WR[1]) ... ==> { -, Node::new_with_words(UNKNOWN_NT, WR[1]) }
@ The following is written as an internal, voracious nonterminal for speed. @ The following is written as an internal, voracious nonterminal for speed.
It matches text like It matches text like

View file

@ -16,10 +16,10 @@ Note that ordinal numbers are not valid as literals: "2nd" is not a noun.
= =
<s-literal> ::= <s-literal> ::=
<cardinal-number> | ==> Rvalues::from_int(R[1], W) <cardinal-number> | ==> { -, Rvalues::from_int(R[1], W) }
minus <cardinal-number> | ==> Rvalues::from_int(-R[1], W) minus <cardinal-number> | ==> { -, Rvalues::from_int(-R[1], W) }
<quoted-text> ( <response-letter> ) | ==> Rvalues::from_wording(W) <quoted-text> ( <response-letter> ) | ==> { -, Rvalues::from_wording(W) }
<quoted-text> | ==> Rvalues::from_wording(W) <quoted-text> | ==> { -, Rvalues::from_wording(W) }
<s-literal-real-number> | ==> { pass 1 } <s-literal-real-number> | ==> { pass 1 }
<s-literal-truth-state> | ==> { pass 1 } <s-literal-truth-state> | ==> { pass 1 }
<s-literal-list> | ==> { pass 1 } <s-literal-list> | ==> { pass 1 }
@ -59,8 +59,8 @@ in principle be any number of people, colours, vehicles, and such.
= =
<s-literal-truth-state> ::= <s-literal-truth-state> ::=
false | ==> Rvalues::from_boolean(FALSE, W) false | ==> { -, Rvalues::from_boolean(FALSE, W) }
true ==> Rvalues::from_boolean(TRUE, W) true ==> { -, Rvalues::from_boolean(TRUE, W) }
@ The problem message for engineering notation should only appear once: @ The problem message for engineering notation should only appear once:
@ -75,11 +75,11 @@ Still:
= =
<s-literal-real-number> ::= <s-literal-real-number> ::=
_ pi | ==> Rvalues::from_IEEE_754(0x40490FDB, W) _ pi | ==> { -, Rvalues::from_IEEE_754(0x40490FDB, W) }
_ e | ==> Rvalues::from_IEEE_754(0x402DF854, W) _ e | ==> { -, Rvalues::from_IEEE_754(0x402DF854, W) }
plus infinity | ==> Rvalues::from_IEEE_754(0x7F800000, W) plus infinity | ==> { -, Rvalues::from_IEEE_754(0x7F800000, W) }
minus infinity | ==> Rvalues::from_IEEE_754(0xFF800000, W) minus infinity | ==> { -, Rvalues::from_IEEE_754(0xFF800000, W) }
<literal-real-in-digits> ==> Rvalues::from_IEEE_754((unsigned int) R[1], W) <literal-real-in-digits> ==> { -, Rvalues::from_IEEE_754((unsigned int) R[1], W) }
<literal-real-in-digits> internal { <literal-real-in-digits> internal {
if ((Wordings::length(W) != 1) && (Wordings::length(W) != 3)) return FALSE; if ((Wordings::length(W) != 1) && (Wordings::length(W) != 3)) return FALSE;

View file

@ -60,7 +60,7 @@ type representing only its own value.
<s-type-expression-unarticled> ::= <s-type-expression-unarticled> ::=
<s-variable-scope> variable/variables | ==> { pass 1 } <s-variable-scope> variable/variables | ==> { pass 1 }
<s-variable-scope> that/which vary/varies | ==> { pass 1 } <s-variable-scope> that/which vary/varies | ==> { pass 1 }
<k-kind> | ==> Specifications::from_kind(RP[1]) <k-kind> | ==> { -, Specifications::from_kind(RP[1]) }
<s-literal> | ==> { pass 1 } <s-literal> | ==> { pass 1 }
<s-constant-value> | ==> { pass 1 } <s-constant-value> | ==> { pass 1 }
<s-description-uncomposite> | ==> { pass 1 } <s-description-uncomposite> | ==> { pass 1 }
@ -102,12 +102,12 @@ higher up in Inform. Ultimately, the text must match <k-kind> in each case.
= =
<s-variable-scope> ::= <s-variable-scope> ::=
global | ==> Specifications::new_new_variable_like(NULL) global | ==> { -, Specifications::new_new_variable_like(NULL) }
global <s-variable-contents> | ==> { pass 1 } global <s-variable-contents> | ==> { pass 1 }
<s-variable-contents> ==> { pass 1 } <s-variable-contents> ==> { pass 1 }
<s-variable-contents> ::= <s-variable-contents> ::=
<k-kind> | ==> Specifications::new_new_variable_like(RP[1]) <k-kind> | ==> { -, Specifications::new_new_variable_like(RP[1]) }
<s-literal> | ==> @<Issue PM_TypeCantVary problem@> <s-literal> | ==> @<Issue PM_TypeCantVary problem@>
<s-constant-value> | ==> @<Issue PM_TypeCantVary problem@> <s-constant-value> | ==> @<Issue PM_TypeCantVary problem@>
<s-description-uncomposite> | ==> @<Issue PM_TypeUnmaintainable problem@> <s-description-uncomposite> | ==> @<Issue PM_TypeUnmaintainable problem@>
@ -238,25 +238,25 @@ membership, which is to say, really just a syntactic difference.
= =
<s-value-uncached> ::= <s-value-uncached> ::=
( <s-value-uncached> ) | ==> { pass 1 } ( <s-value-uncached> ) | ==> { pass 1 }
<s-variable> | ==> ExParser::val(RP[1], W) <s-variable> | ==> { -, ExParser::val(RP[1], W) }
<if-table-column-expected> <s-table-column-name> | ==> ExParser::val(RP[2], 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) <if-property-name-expected> <s-property-name> | ==> { -, ExParser::val(RP[2], W) }
<s-constant-value> | ==> ExParser::val(RP[1], W) <s-constant-value> | ==> { -, ExParser::val(RP[1], W) }
<s-equation-usage> | ==> { pass 1 } <s-equation-usage> | ==> { pass 1 }
<s-property-name> | ==> ExParser::val(RP[1], W) <s-property-name> | ==> { -, ExParser::val(RP[1], W) }
<s-action-pattern-as-value> | ==> 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) <s-value-phrase-non-of> | ==> { -, ExParser::val(RP[1], W) }
<s-adjective-list-as-desc> | ==> ExParser::val(RP[1], W) <s-adjective-list-as-desc> | ==> { -, ExParser::val(RP[1], W) }
<s-purely-physical-description> | ==> ExParser::val(RP[1], W) <s-purely-physical-description> | ==> { -, ExParser::val(RP[1], W) }
<s-table-reference> | ==> ExParser::val(RP[1], W) <s-table-reference> | ==> { -, ExParser::val(RP[1], W) }
member/members of <s-description> | ==> ExParser::val(RP[1], W) member/members of <s-description> | ==> { -, ExParser::val(RP[1], W) }
member/members of <s-local-variable> | ==> ExParser::val(RP[1], W) member/members of <s-local-variable> | ==> { -, ExParser::val(RP[1], W) }
<s-property-name> of <s-value-uncached> | ==> @<Make a belonging-to-V property@> <s-property-name> of <s-value-uncached> | ==> @<Make a belonging-to-V property@>
<if-pronoun-present> <possessive-third-person> <s-property-name> | ==> @<Make a belonging-to-it property@> <if-pronoun-present> <possessive-third-person> <s-property-name> | ==> @<Make a belonging-to-it property@>
entry <s-value-uncached> of/in/from <s-value-uncached> | ==> @<Make a list entry@> entry <s-value-uncached> of/in/from <s-value-uncached> | ==> @<Make a list entry@>
<s-description> | ==> ExParser::val(RP[1], W) <s-description> | ==> { -, ExParser::val(RP[1], W) }
<s-table-column-name> | ==> ExParser::val(RP[1], W) <s-table-column-name> | ==> { -, ExParser::val(RP[1], W) }
<s-value-phrase> ==> ExParser::val(RP[1], W) <s-value-phrase> ==> { -, ExParser::val(RP[1], W) }
@ = @ =
parse_node *ExParser::val(parse_node *v, wording W) { parse_node *ExParser::val(parse_node *v, wording W) {
@ -348,11 +348,11 @@ the text "grand total" is parsed as the local.
<s-nonglobal-variable> ::= <s-nonglobal-variable> ::=
( <s-nonglobal-variable> ) | ==> { pass 1 } ( <s-nonglobal-variable> ) | ==> { pass 1 }
<s-local-variable> | ==> ExParser::val(RP[1], W) <s-local-variable> | ==> { -, ExParser::val(RP[1], W) }
<s-stacked-variable> ==> ExParser::val(RP[1], W) <s-stacked-variable> ==> { -, ExParser::val(RP[1], W) }
<s-variable-as-value> ::= <s-variable-as-value> ::=
<s-variable> ==> ExParser::val(RP[1], W) <s-variable> ==> { -, ExParser::val(RP[1], W) }
@ This requires three internals: @ This requires three internals:

View file

@ -37,7 +37,7 @@ placeholder to stand for a missing noun phrase:
<s-noun-phrase> <s-general-verb-tail> ==> @<Make SV@>; <s-noun-phrase> <s-general-verb-tail> ==> @<Make SV@>;
<s-existential-verb-tail> ::= <s-existential-verb-tail> ::=
<copular-verb> <s-noun-phrase-nounless> ==> ExParser::Subtrees::verb_marker(RP[1], NULL, RP[2]) <copular-verb> <s-noun-phrase-nounless> ==> { -, ExParser::Subtrees::verb_marker(RP[1], NULL, RP[2]) }
@<Make SV@> = @<Make SV@> =
ExParser::Subtrees::correct_for_adjectives(RP[1], RP[2]); ExParser::Subtrees::correct_for_adjectives(RP[1], RP[2]);
@ -85,9 +85,9 @@ handle its extra object: see below.
= =
<s-general-verb-tail> ::= <s-general-verb-tail> ::=
<universal-verb> <s-universal-relation-term> | ==> ExParser::Subtrees::verb_marker(RP[1], NULL, RP[2]) <universal-verb> <s-universal-relation-term> | ==> { -, ExParser::Subtrees::verb_marker(RP[1], NULL, RP[2]) }
<meaningful-nonimperative-verb> <permitted-preposition> <s-noun-phrase> | ==> ExParser::Subtrees::verb_marker(RP[1], RP[2], RP[3]) <meaningful-nonimperative-verb> <permitted-preposition> <s-noun-phrase> | ==> { -, ExParser::Subtrees::verb_marker(RP[1], RP[2], RP[3]) }
<meaningful-nonimperative-verb> <s-noun-phrase> ==> ExParser::Subtrees::verb_marker(RP[1], NULL, RP[2]) <meaningful-nonimperative-verb> <s-noun-phrase> ==> { -, ExParser::Subtrees::verb_marker(RP[1], NULL, RP[2]) }
@ The verb marker is a temporary node used just to store the verb or preposition @ The verb marker is a temporary node used just to store the verb or preposition
usage; it's attached to the tree only briefly before sentence conversion usage; it's attached to the tree only briefly before sentence conversion
@ -114,7 +114,7 @@ works.
= =
<s-universal-relation-term> ::= <s-universal-relation-term> ::=
<s-noun-phrase> to <s-noun-phrase> ==> ExParser::val(Rvalues::from_pair(RP[1], RP[2]), W) <s-noun-phrase> to <s-noun-phrase> ==> { -, ExParser::val(Rvalues::from_pair(RP[1], RP[2]), W) }
@ The following parses a noun phrase with a relative clause, which is @ 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 syntactically very similar to the case of a sentence. Sometimes the verb is
@ -140,13 +140,13 @@ relevant noun subtree with a representation of the player-object for those.
<s-noun-phrase> <s-relative-verb-tail> ==> @<Make SN@> <s-noun-phrase> <s-relative-verb-tail> ==> @<Make SN@>
<s-implied-relative-verb-tail> ::= <s-implied-relative-verb-tail> ::=
<copular-preposition> <s-noun-phrase-nounless> | ==> ExParser::Subtrees::verb_marker(regular_to_be, RP[1], RP[2]) <copular-preposition> <s-noun-phrase-nounless> | ==> { -, ExParser::Subtrees::verb_marker(regular_to_be, RP[1], RP[2]) }
not <copular-preposition> <s-noun-phrase-nounless> ==> ExParser::Subtrees::verb_marker(negated_to_be, RP[1], RP[2]) not <copular-preposition> <s-noun-phrase-nounless> ==> { -, ExParser::Subtrees::verb_marker(negated_to_be, RP[1], RP[2]) }
<s-relative-verb-tail> ::= <s-relative-verb-tail> ::=
<relative-clause-marker> <universal-verb> <s-universal-relation-term> | ==> ExParser::Subtrees::verb_marker(RP[2], NULL, RP[3]) <relative-clause-marker> <universal-verb> <s-universal-relation-term> | ==> { -, ExParser::Subtrees::verb_marker(RP[2], NULL, RP[3]) }
<relative-clause-marker> <meaningful-nonimperative-verb> <permitted-preposition> <s-noun-phrase> | ==> ExParser::Subtrees::verb_marker(RP[2], RP[3], RP[4]) <relative-clause-marker> <meaningful-nonimperative-verb> <permitted-preposition> <s-noun-phrase> | ==> { -, ExParser::Subtrees::verb_marker(RP[2], RP[3], RP[4]) }
<relative-clause-marker> <meaningful-nonimperative-verb> <s-noun-phrase> ==> ExParser::Subtrees::verb_marker(RP[2], NULL, RP[3]) <relative-clause-marker> <meaningful-nonimperative-verb> <s-noun-phrase> ==> { -, ExParser::Subtrees::verb_marker(RP[2], NULL, RP[3]) }
@<Make SN@> = @<Make SN@> =
LOGIF(MATCHING, "So uncorrectedly RP[1] = $T\n", RP[1]); LOGIF(MATCHING, "So uncorrectedly RP[1] = $T\n", RP[1]);

View file

@ -2396,7 +2396,7 @@ condition caused the trouble:
= =
<condition-problem-diagnosis> ::= <condition-problem-diagnosis> ::=
<condition-problem-part> <condition-problem-part-tail> | ==> R[1] | R[2] <condition-problem-part> <condition-problem-part-tail> | ==> { R[1] | R[2], - }
<condition-problem-part> ==> { pass 1 } <condition-problem-part> ==> { pass 1 }
<condition-problem-part-tail> ::= <condition-problem-part-tail> ::=
@ -2404,11 +2404,11 @@ condition caused the trouble:
,/and/or <condition-problem-diagnosis> ==> { pass 1 } ,/and/or <condition-problem-diagnosis> ==> { pass 1 }
<condition-problem-part> ::= <condition-problem-part> ::=
<s-condition> | ==> 0; @<Quote this-condition-okay segment@>; <s-condition> | ==> { 0, - }; @<Quote this-condition-okay segment@>;
<s-value> | ==> INVALID_CP_BIT; @<Quote this-condition-value segment@>; <s-value> | ==> { INVALID_CP_BIT, - }; @<Quote this-condition-value segment@>;
... begins/ends | ==> WHENWHILE_CP_BIT+INVALID_CP_BIT; @<Quote scene-begins-or-ends segment@>; ... begins/ends | ==> { WHENWHILE_CP_BIT+INVALID_CP_BIT, - }; @<Quote scene-begins-or-ends segment@>;
when/while *** | ==> WHENWHILE_CP_BIT+INVALID_CP_BIT; @<Quote this-condition-bad segment@>; when/while *** | ==> { WHENWHILE_CP_BIT+INVALID_CP_BIT, - }; @<Quote this-condition-bad segment@>;
... ==> INVALID_CP_BIT; @<Quote this-condition-bad segment@>; ... ==> { INVALID_CP_BIT, - }; @<Quote this-condition-bad segment@>;
@<Quote this-condition-okay segment@> = @<Quote this-condition-okay segment@> =
if (preform_lookahead_mode == FALSE) { if (preform_lookahead_mode == FALSE) {

View file

@ -52,16 +52,16 @@ isn't expressed in this grammar.
= =
<s-literal-list> ::= <s-literal-list> ::=
\{ \} | ==> Rvalues::from_wording_of_list(Lists::kind_of_ll(Lists::empty_literal_list(Wordings::last_word(W)), FALSE), W) \{ \} | ==> { -, Rvalues::from_wording_of_list(Lists::kind_of_ll(Lists::empty_literal_list(Wordings::last_word(W)), FALSE), W) }
\{ <literal-list-contents> \} ==> Rvalues::from_wording_of_list(Lists::kind_of_ll(RP[1], FALSE), W) \{ <literal-list-contents> \} ==> { -, Rvalues::from_wording_of_list(Lists::kind_of_ll(RP[1], FALSE), W) }
<literal-list-contents> ::= <literal-list-contents> ::=
<literal-list-entry> , <literal-list-contents> | ==> 0; *XP = Lists::add_to_ll(RP[1], RP[2], W, R[1]) <literal-list-entry> , <literal-list-contents> | ==> { 0, Lists::add_to_ll(RP[1], RP[2], W, R[1]) }
<literal-list-entry> ==> 0; *XP = Lists::add_to_ll(RP[1], Lists::empty_literal_list(W), W, R[1]) <literal-list-entry> ==> { 0, Lists::add_to_ll(RP[1], Lists::empty_literal_list(W), W, R[1]) }
<literal-list-entry> ::= <literal-list-entry> ::=
<s-value> | ==> { FALSE, RP[1] } <s-value> | ==> { FALSE, RP[1] }
...... ==> TRUE; *XP = Specifications::new_UNKNOWN(W) ...... ==> { TRUE, Specifications::new_UNKNOWN(W) }
@ The grammar above builds our list structures from the bottom up. They begin @ The grammar above builds our list structures from the bottom up. They begin
with a call to: with a call to:

View file

@ -231,7 +231,7 @@ what looks like text into grammar for parsing.
<table-column-heading> ::= <table-column-heading> ::=
( *** ) | ==> @<Issue PM_TableColumnBracketed problem@> ( *** ) | ==> @<Issue PM_TableColumnBracketed problem@>
<s-table-column-name> ( ... ) | ==> { EXISTING_TC, RP[1] }; <<k1>> = Wordings::first_wn(WR[1]); <<k2>> = Wordings::last_wn(WR[1]); <s-table-column-name> ( ... ) | ==> { EXISTING_TC, 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]); <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, RP[1] }; <<k1>> = -1; <<k2>> = -1; <s-table-column-name> | ==> { EXISTING_TC, RP[1] }; <<k1>> = -1; <<k2>> = -1;
<table-column-heading-unbracketed> ==> { pass 1 } <table-column-heading-unbracketed> ==> { pass 1 }

View file

@ -248,10 +248,10 @@ two forms in any case.
= =
<table-header> ::= <table-header> ::=
<table-new-name> ( continued ) | ==> TABLE_IS_CONTINUED; <<nameforms>> = R[1] <table-new-name> ( continued ) | ==> { TABLE_IS_CONTINUED, -, <<nameforms>> = R[1] }
<table-new-name> ( amended ) | ==> TABLE_IS_AMENDED; <<nameforms>> = R[1] <table-new-name> ( amended ) | ==> { TABLE_IS_AMENDED, -, <<nameforms>> = R[1] }
<table-new-name> ( replaced ) | ==> TABLE_IS_REPLACED; <<nameforms>> = R[1] <table-new-name> ( replaced ) | ==> { TABLE_IS_REPLACED, -, <<nameforms>> = R[1] }
<table-new-name> ==> TABLE_IS_NEW; <<nameforms>> = R[1] <table-new-name> ==> { TABLE_IS_NEW, -, <<nameforms>> = R[1] }
<table-new-name> ::= <table-new-name> ::=
table ... - ... | ==> { TABLE_HAS_NUMBER_AND_NAME, - } table ... - ... | ==> { TABLE_HAS_NUMBER_AND_NAME, - }
@ -284,9 +284,9 @@ Inform's run, when kinds haven't yet been created.
= =
<table-footer> ::= <table-footer> ::=
*** with <cardinal-number> blank row/rows | ==> R[1]; <<each>> = FALSE *** with <cardinal-number> blank row/rows | ==> { R[1], -, <<each>> = FALSE }
*** with ... blank row/rows | ==> 0; <<each>> = NOT_APPLICABLE *** with ... blank row/rows | ==> { 0, -, <<each>> = NOT_APPLICABLE }
*** with blank row/rows for each/every ... ==> 0; <<each>> = TRUE *** with blank row/rows for each/every ... ==> { 0, -, <<each>> = TRUE }
@ So, here goes. We first identify the top line of the table declaration @ So, here goes. We first identify the top line of the table declaration
(the "headline"), then set the current sentence to that, even though in (the "headline"), then set the current sentence to that, even though in
@ -849,7 +849,7 @@ us issue more contextual problem messages.
= =
<table-cell> ::= <table-cell> ::=
<table-cell-blank> | ==> @<Make anomalous entry for blank@> <table-cell-blank> | ==> { BLANK_TABLE_ENTRY, Specifications::new_UNKNOWN(W) }
<k-kind-articled> | ==> @<Make anomalous entry for kind@> <k-kind-articled> | ==> @<Make anomalous entry for kind@>
<s-named-constant> | ==> { NAMED_CONSTANT_ENTRY, RP[1] } <s-named-constant> | ==> { NAMED_CONSTANT_ENTRY, RP[1] }
<s-global-variable> | ==> @<Issue PM_TablePlayerEntry or C20TableVariableEntry problem@> <s-global-variable> | ==> @<Issue PM_TablePlayerEntry or C20TableVariableEntry problem@>
@ -865,17 +865,13 @@ us issue more contextual problem messages.
<s-constant-action> | ==> { ACTION_TABLE_ENTRY, RP[1] } <s-constant-action> | ==> { ACTION_TABLE_ENTRY, RP[1] }
the action of <s-explicit-action> | ==> @<Issue PM_NonconstantActionInTable problem@> the action of <s-explicit-action> | ==> @<Issue PM_NonconstantActionInTable problem@>
<s-explicit-action> | ==> @<Issue PM_NonconstantActionInTable problem@> <s-explicit-action> | ==> @<Issue PM_NonconstantActionInTable problem@>
<instance-of-non-object> | ==> INSTANCE_TABLE_ENTRY; *XP = Rvalues::from_instance(RP[1]) <instance-of-non-object> | ==> { INSTANCE_TABLE_ENTRY, Rvalues::from_instance(RP[1]) }
<s-type-expression> ==> { SPEC_TABLE_ENTRY, RP[1] } <s-type-expression> ==> { SPEC_TABLE_ENTRY, RP[1] }
<list-of-double-quotes> ::= <list-of-double-quotes> ::=
<quoted-text> or <list-of-double-quotes> | <quoted-text> or <list-of-double-quotes> |
<quoted-text> <quoted-text>
@<Make anomalous entry for blank@> =
*X = BLANK_TABLE_ENTRY;
*XP = Specifications::new_UNKNOWN(W);
@<Make anomalous entry for kind@> = @<Make anomalous entry for kind@> =
*X = KIND_TABLE_ENTRY; *X = KIND_TABLE_ENTRY;
parse_node *new = Specifications::from_kind(RP[1]); parse_node *new = Specifications::from_kind(RP[1]);

View file

@ -380,7 +380,8 @@ mass, too.
_,/and <equation-where-list> ==> { 0, - } _,/and <equation-where-list> ==> { 0, - }
<equation-where-setting-entry> ::= <equation-where-setting-entry> ::=
<equation-where-setting> ==> 0; if (!preform_lookahead_mode) Equations::eqn_dec_var(equation_being_declared, Wordings::one_word(eq_symbol_wn), R[1], RP[1]); ... | ==> { lookahead }
<equation-where-setting> ==> { -, - }; Equations::eqn_dec_var(equation_being_declared, Wordings::one_word(eq_symbol_wn), R[1], RP[1]);
<equation-where-setting> ::= <equation-where-setting> ::=
<equation-symbol> is/are <k-kind> | ==> { EQW_IDENTIFIES_KIND, RP[2] }; eq_symbol_wn = R[1]; <equation-symbol> is/are <k-kind> | ==> { EQW_IDENTIFIES_KIND, RP[2] }; eq_symbol_wn = R[1];

View file

@ -122,19 +122,19 @@ something"):
= =
<activity-sentence-subject> ::= <activity-sentence-subject> ::=
<activity-noted> ( <documentation-symbol> ) | ==> R[1]; <<ds>> = R[2] <activity-noted> ( <documentation-symbol> ) | ==> { R[1], -, <<ds>> = R[2] }
<activity-noted> -- <documentation-symbol> -- | ==> R[1]; <<ds>> = R[2] <activity-noted> -- <documentation-symbol> -- | ==> { R[1], -, <<ds>> = R[2] }
<activity-noted> ==> R[1]; <<ds>> = -1; <activity-noted> ==> { R[1], -, <<ds>> = -1 }
<activity-noted> ::= <activity-noted> ::=
<activity-new-name> ( future action ) | ==> TRUE; <<future>> = TRUE <activity-new-name> ( future action ) | ==> { TRUE, -, <<future>> = TRUE }
<activity-new-name> ( ... ) | ==> @<Issue PM_ActivityNoteUnknown problem@> <activity-new-name> ( ... ) | ==> @<Issue PM_ActivityNoteUnknown problem@>
<activity-new-name> ==> TRUE; <<future>> = FALSE <activity-new-name> ==> { TRUE, -, <<future>> = FALSE }
<activity-new-name> ::= <activity-new-name> ::=
... of/for something/anything | ==> 0; <<any>> = TRUE ... of/for something/anything | ==> { 0, -, <<any>> = TRUE }
... something/anything | ==> 0; <<any>> = TRUE ... something/anything | ==> { 0, -, <<any>> = TRUE }
... ==> 0; <<any>> = FALSE ... ==> { 0, -, <<any>> = FALSE }
@ Once a new activity has been created, the following is used to make a @ Once a new activity has been created, the following is used to make a
noun for it; for example, the "announcing activity". noun for it; for example, the "announcing activity".
@ -455,7 +455,7 @@ it mentions no activities.
<activity-list-unnegated> ==> { 0, RP[1] } <activity-list-unnegated> ==> { 0, RP[1] }
<activity-list-unnegated> ::= <activity-list-unnegated> ::=
... | ==> 0; return preform_lookahead_mode; /* match only when looking ahead */ ... | ==> { lookahead }
<activity-list-entry> <activity-tail> | ==> @<Join the activity lists@>; <activity-list-entry> <activity-tail> | ==> @<Join the activity lists@>;
<activity-list-entry> ==> { 0, RP[1] } <activity-list-entry> ==> { 0, RP[1] }
@ -480,8 +480,8 @@ values, of the kind to which the activity applies.
= =
<activity-operand> ::= <activity-operand> ::=
something/anything | ==> FALSE; *XP = Specifications::new_UNKNOWN(W); something/anything | ==> { FALSE, Specifications::new_UNKNOWN(W) }
something/anything else | ==> FALSE; *XP = Specifications::new_UNKNOWN(W); something/anything else | ==> { FALSE, Specifications::new_UNKNOWN(W) }
<s-type-expression-or-value> ==> { TRUE, RP[1] } <s-type-expression-or-value> ==> { TRUE, RP[1] }
@<Flip the activity list parities@> = @<Flip the activity list parities@> =

View file

@ -134,7 +134,7 @@ The following parses a declaration of named outcomes. For example:
= =
<rulebook-outcome-list> ::= <rulebook-outcome-list> ::=
... | ==> 0; return preform_lookahead_mode; /* match only when looking ahead */ ... | ==> { lookahead }
<rulebook-outcome-setting-entry> <rulebook-outcome-tail> | ==> { 0, - } <rulebook-outcome-setting-entry> <rulebook-outcome-tail> | ==> { 0, - }
<rulebook-outcome-setting-entry> ==> { 0, - } <rulebook-outcome-setting-entry> ==> { 0, - }
@ -143,14 +143,14 @@ The following parses a declaration of named outcomes. For example:
_,/and/or <rulebook-outcome-list> ==> { 0, - } _,/and/or <rulebook-outcome-list> ==> { 0, - }
<rulebook-outcome-setting-entry> ::= <rulebook-outcome-setting-entry> ::=
<form-of-named-rule-outcome> ==> 0; if (!preform_lookahead_mode) @<Adopt this new named rule outcome@> <form-of-named-rule-outcome> ==> {0, - }; if (!preform_lookahead_mode) @<Adopt this new named rule outcome@>
<form-of-named-rule-outcome> ::= <form-of-named-rule-outcome> ::=
... ( <rule-outcome> - the default ) | ==> R[1]; default_rbno_flag = TRUE ... ( <rule-outcome> - the default ) | ==> { R[1], -}; default_rbno_flag = TRUE
... ( <rule-outcome> - default ) | ==> R[1]; default_rbno_flag = TRUE ... ( <rule-outcome> - default ) | ==> { R[1], -}; default_rbno_flag = TRUE
... ( <rule-outcome> ) | ==> R[1]; default_rbno_flag = FALSE ... ( <rule-outcome> ) | ==> { R[1], -}; default_rbno_flag = FALSE
... ( ... ) | ==> @<Issue PM_BadOutcomeClarification problem@> ... ( ... ) | ==> @<Issue PM_BadOutcomeClarification problem@>
... ==> SUCCESS_OUTCOME; default_rbno_flag = FALSE ... ==> { SUCCESS_OUTCOME, -}; default_rbno_flag = FALSE
<notable-rulebook-outcomes> ::= <notable-rulebook-outcomes> ::=
it is very likely | it is very likely |

View file

@ -82,16 +82,16 @@ following won't pick up many false positives.
= =
<nounphrase-rule-list> ::= <nounphrase-rule-list> ::=
... | ==> 0; *XP = NULL; return preform_lookahead_mode; /* match only when looking ahead */ ... | ==> { lookahead }
<nounphrase-rule> <np-rule-tail> | ==> 0; *XP = Diagrams::new_AND(R[2], RP[1], RP[2]) <nounphrase-rule> <np-rule-tail> | ==> { 0, Diagrams::new_AND(R[2], RP[1], RP[2]) }
<nounphrase-rule> ==> { 0, RP[1] } <nounphrase-rule> ==> { 0, RP[1] }
<np-rule-tail> ::= <np-rule-tail> ::=
, {_and} <nounphrase-rule-list> | ==> Wordings::first_wn(W); *XP= RP[1] , {_and} <nounphrase-rule-list> | ==> { Wordings::first_wn(W), RP[1] }
{_,/and} <nounphrase-rule-list> ==> Wordings::first_wn(W); *XP= RP[1] {_,/and} <nounphrase-rule-list> ==> { Wordings::first_wn(W), RP[1] }
<nounphrase-rule> ::= <nounphrase-rule> ::=
... rule ==> 0; *XP = Diagrams::new_UNPARSED_NOUN(W) ... rule ==> { 0, Diagrams::new_UNPARSED_NOUN(W) }
@ This handles the special meaning "X substitutes for Y". @ This handles the special meaning "X substitutes for Y".
@ -285,23 +285,23 @@ The subject noun phrase is an articled list, each entry of which must match:
= =
<listed-in-sentence-subject> ::= <listed-in-sentence-subject> ::=
<rule-name> | ==> { TRUE, RP[1] } <rule-name> | ==> { TRUE, RP[1] }
... ==> FALSE; @<Issue PM_NoSuchRuleExists problem@> ... ==> { FALSE, - }; @<Issue PM_NoSuchRuleExists problem@>
@ The object NP is more flexible: @ The object NP is more flexible:
= =
<listed-in-sentence-object-inner> ::= <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]; in <destination-rulebook> | ==> { MIDDLE_PLACEMENT + 1000*IN_SIDE, RP[1] }
first in <destination-rulebook> | ==> FIRST_PLACEMENT + 1000*IN_SIDE; *XP = RP[1]; first in <destination-rulebook> | ==> { FIRST_PLACEMENT + 1000*IN_SIDE, RP[1] }
last in <destination-rulebook> | ==> LAST_PLACEMENT + 1000*IN_SIDE; *XP = RP[1]; last in <destination-rulebook> | ==> { LAST_PLACEMENT + 1000*IN_SIDE, RP[1] }
instead of <rule-name> in <rulebook-name> | ==> MIDDLE_PLACEMENT + 1000*INSTEAD_SIDE; relative_to_which = RP[1]; *XP = RP[2]; instead of <rule-name> in <rulebook-name> | ==> { MIDDLE_PLACEMENT + 1000*INSTEAD_SIDE, RP[2] }; relative_to_which = RP[1];
instead of <rule-name> in ... | ==> @<Issue PM_NoSuchRulebookPlacement problem@> instead of <rule-name> in ... | ==> @<Issue PM_NoSuchRulebookPlacement problem@>
instead of ... in ... | ==> @<Issue PM_NoSuchRuleExists problem@> instead of ... in ... | ==> @<Issue PM_NoSuchRuleExists problem@>
before <rule-name> in <rulebook-name> | ==> MIDDLE_PLACEMENT + 1000*BEFORE_SIDE; relative_to_which = RP[1]; *XP = RP[2]; before <rule-name> in <rulebook-name> | ==> { MIDDLE_PLACEMENT + 1000*BEFORE_SIDE, RP[2] }; relative_to_which = RP[1];
before <rule-name> in ... | ==> @<Issue PM_NoSuchRulebookPlacement problem@> before <rule-name> in ... | ==> @<Issue PM_NoSuchRulebookPlacement problem@>
before ... in ... | ==> @<Issue PM_NoSuchRuleExists problem@> before ... in ... | ==> @<Issue PM_NoSuchRuleExists problem@>
after <rule-name> in <rulebook-name> | ==> MIDDLE_PLACEMENT + 1000*AFTER_SIDE; relative_to_which = RP[1]; *XP = RP[2]; after <rule-name> in <rulebook-name> | ==> { MIDDLE_PLACEMENT + 1000*AFTER_SIDE, RP[2] }; relative_to_which = RP[1];
after <rule-name> in ... | ==> @<Issue PM_NoSuchRulebookPlacement problem@> after <rule-name> in ... | ==> @<Issue PM_NoSuchRulebookPlacement problem@>
after ... in ... | ==> @<Issue PM_NoSuchRuleExists problem@> after ... in ... | ==> @<Issue PM_NoSuchRuleExists problem@>
instead of ... | ==> @<Issue PM_UnspecifiedRulebookPlacement problem@> instead of ... | ==> @<Issue PM_UnspecifiedRulebookPlacement problem@>

View file

@ -448,21 +448,21 @@ word "to".
= =
<phrase-preamble> ::= <phrase-preamble> ::=
<phrase-preamble> ( deprecated ) | ==> R[1]; <<deprecated>> = TRUE <phrase-preamble> ( deprecated ) | ==> { R[1], -, <<deprecated>> = TRUE }
<say-preamble> | ==> SAY_ANN; <<say-ann>> = R[1] <say-preamble> | ==> { SAY_ANN, -, <<say-ann>> = R[1] }
<to-preamble> ==> { pass 1 } <to-preamble> ==> { pass 1 }
<to-preamble> ::= <to-preamble> ::=
<to-preamble> ( arithmetic operation <cardinal-number> ) | ==> R[1]; <<operation>> = R[2] <to-preamble> ( arithmetic operation <cardinal-number> ) | ==> { R[1], -, <<operation>> = R[2] }
<to-preamble> ( assignment operation ) | ==> R[1]; <<assignment>> = TRUE <to-preamble> ( assignment operation ) | ==> { R[1], -, <<assignment>> = TRUE }
{let ... be given by ...} | ==> LET_ANN; <<eqn>> = TRUE {let ... be given by ...} | ==> { LET_ANN, -, <<eqn>> = TRUE }
{let ...} | ==> LET_ANN; <<eqn>> = FALSE {let ...} | ==> { LET_ANN, -, <<eqn>> = FALSE }
... -- end | ==> { BLOCK_ANN, - } ... -- end | ==> { BLOCK_ANN, - }
... -- end conditional | ==> { CONDITIONAL_ANN, - } ... -- end conditional | ==> { CONDITIONAL_ANN, - }
... -- end loop | ==> { LOOP_ANN, - } ... -- end loop | ==> { LOOP_ANN, - }
... -- in loop | ==> { IN_LOOP_ANN, - } ... -- in loop | ==> { IN_LOOP_ANN, - }
... -- in ### | ==> { IN_ANN, - } ... -- in ### | ==> { IN_ANN, - }
... ==> NO_ANN ... ==> { NO_ANN, - }
@ The definition remaining after the preamble is removed is then vetted. @ The definition remaining after the preamble is removed is then vetted.
This is a possibly controversial point, in fact, because the check in question This is a possibly controversial point, in fact, because the check in question
@ -472,7 +472,7 @@ messages.
= =
<phrase-vetting> ::= <phrase-vetting> ::=
( ...... ) <copular-verb> {<copular-preposition>} ( ...... ) ==> <<rel1>> = Wordings::first_wn(WR[2]); <<rel2>> = Wordings::last_wn(WR[2]); <<preposition:prep>> = RP[2]; @<Issue PM_MasksRelation problem@> ( ...... ) <copular-verb> {<copular-preposition>} ( ...... ) ==> { -, -, <<rel1>> = Wordings::first_wn(WR[2]), <<rel2>> = Wordings::last_wn(WR[2]), <<preposition:prep>> = RP[2] }; @<Issue PM_MasksRelation problem@>
@<Issue PM_MasksRelation problem@> = @<Issue PM_MasksRelation problem@> =
preposition *prep = <<preposition:prep>>; preposition *prep = <<preposition:prep>>;
@ -498,11 +498,11 @@ the exception being the primordial phrase for saying text.
= =
<say-preamble> ::= <say-preamble> ::=
<say-preamble> -- running on | ==> R[1]; <<run-on>> = TRUE <say-preamble> -- running on | ==> { R[1], -, <<run-on>> = TRUE }
{say otherwise/else} | ==> CONTROL_SANN; <<control>> = OTHERWISE_SAY_CS {say otherwise/else} | ==> { CONTROL_SANN, -, <<control>> = OTHERWISE_SAY_CS }
{say otherwise/else if/unless ...} | ==> CONTROL_SANN; <<control>> = OTHERWISE_IF_SAY_CS {say otherwise/else if/unless ...} | ==> { CONTROL_SANN, -, <<control>> = OTHERWISE_IF_SAY_CS }
{say if/unless ...} | ==> CONTROL_SANN; <<control>> = IF_SAY_CS {say if/unless ...} | ==> { CONTROL_SANN, -, <<control>> = IF_SAY_CS }
{say end if/unless} | ==> CONTROL_SANN; <<control>> = END_IF_SAY_CS {say end if/unless} | ==> { CONTROL_SANN, -, <<control>> = END_IF_SAY_CS }
{say ...} -- beginning ### | ==> { BEGIN_SANN, - } {say ...} -- beginning ### | ==> { BEGIN_SANN, - }
{say ...} -- continuing ### | ==> { CONTINUE_SANN, - } {say ...} -- continuing ### | ==> { CONTINUE_SANN, - }
{say ...} -- ending ### with marker ### | ==> { ENDM_SANN, - } {say ...} -- ending ### with marker ### | ==> { ENDM_SANN, - }
@ -648,7 +648,7 @@ give problems for misuse of brackets.
= =
<phrase-definition-word-or-token> ::= <phrase-definition-word-or-token> ::=
( ) *** | ==> @<Issue PM_TokenWithEmptyBrackets problem@> ( ) *** | ==> @<Issue PM_TokenWithEmptyBrackets problem@>
( <phrase-token-declaration> ) *** | ==> TRUE; <<token-form>> = R[1]; *XP = RP[1] ( <phrase-token-declaration> ) *** | ==> { TRUE, RP[1], <<token-form>> = R[1] }
( *** | ==> @<Issue PM_TokenWithoutCloseBracket problem@> ( *** | ==> @<Issue PM_TokenWithoutCloseBracket problem@>
) *** | ==> @<Issue PM_TokenWithoutOpenBracket problem@> ) *** | ==> @<Issue PM_TokenWithoutOpenBracket problem@>
### *** ==> { FALSE, - } ### *** ==> { FALSE, - }
@ -661,25 +661,25 @@ the hyphen, and this is sorely needed with complicated functional kinds.
= =
<phrase-token-declaration> ::= <phrase-token-declaration> ::=
*** ( *** - ...... | ==> @<Issue PM_TokenWithNestedBrackets problem@> *** ( *** - ...... | ==> @<Issue PM_TokenWithNestedBrackets problem@>
...... - a nonexisting variable | ==> TRUE; *XP = Specifications::from_kind(K_value); <<token-construct>> = NEW_LOCAL_PT_CONSTRUCT ...... - a nonexisting variable | ==> { TRUE, Specifications::from_kind(K_value), <<token-construct>> = NEW_LOCAL_PT_CONSTRUCT }
...... - a nonexisting <k-kind-for-template> variable | ==> TRUE; *XP = Specifications::from_kind(RP[1]); <<token-construct>> = NEW_LOCAL_PT_CONSTRUCT ...... - a nonexisting <k-kind-for-template> variable | ==> { TRUE, Specifications::from_kind(RP[1]), <<token-construct>> = NEW_LOCAL_PT_CONSTRUCT }
...... - a nonexisting <k-kind-for-template> that/which varies | ==> TRUE; *XP = Specifications::from_kind(RP[1]); <<token-construct>> = NEW_LOCAL_PT_CONSTRUCT ...... - a nonexisting <k-kind-for-template> that/which varies | ==> { TRUE, Specifications::from_kind(RP[1]), <<token-construct>> = NEW_LOCAL_PT_CONSTRUCT }
...... - nonexisting variable | ==> TRUE; *XP = Specifications::from_kind(K_value); <<token-construct>> = NEW_LOCAL_PT_CONSTRUCT ...... - nonexisting variable | ==> { TRUE, Specifications::from_kind(K_value), <<token-construct>> = NEW_LOCAL_PT_CONSTRUCT }
...... - nonexisting <k-kind-for-template> variable | ==> TRUE; *XP = Specifications::from_kind(RP[1]); <<token-construct>> = NEW_LOCAL_PT_CONSTRUCT ...... - nonexisting <k-kind-for-template> variable | ==> { TRUE, Specifications::from_kind(RP[1]), <<token-construct>> = NEW_LOCAL_PT_CONSTRUCT }
...... - nonexisting <k-kind-for-template> that/which varies | ==> TRUE; *XP = Specifications::from_kind(RP[1]); <<token-construct>> = NEW_LOCAL_PT_CONSTRUCT ...... - nonexisting <k-kind-for-template> that/which varies | ==> { TRUE, Specifications::from_kind(RP[1]), <<token-construct>> = NEW_LOCAL_PT_CONSTRUCT }
...... - {an existing variable} | ==> TRUE; *XP = Specifications::from_kind(K_value); Node::set_text(*XP, WR[2]); <<token-construct>> = EXISTING_LOCAL_PT_CONSTRUCT ...... - {an existing variable} | ==> { TRUE, Specifications::from_kind(K_value), <<token-construct>> = EXISTING_LOCAL_PT_CONSTRUCT }; Node::set_text(*XP, WR[2]);
...... - {an existing <k-kind-for-template> variable} | ==> TRUE; *XP = Specifications::from_kind(RP[1]); Node::set_text(*XP, WR[2]); <<token-construct>> = EXISTING_LOCAL_PT_CONSTRUCT ...... - {an existing <k-kind-for-template> variable} | ==> { TRUE, Specifications::from_kind(RP[1]), <<token-construct>> = EXISTING_LOCAL_PT_CONSTRUCT }; Node::set_text(*XP, WR[2]);
...... - {an existing <k-kind-for-template> that/which varies} | ==> TRUE; *XP = Specifications::from_kind(RP[1]); Node::set_text(*XP, WR[2]); <<token-construct>> = EXISTING_LOCAL_PT_CONSTRUCT ...... - {an existing <k-kind-for-template> that/which varies} | ==> { TRUE, Specifications::from_kind(RP[1]), <<token-construct>> = EXISTING_LOCAL_PT_CONSTRUCT }; Node::set_text(*XP, WR[2]);
...... - {existing variable} | ==> TRUE; *XP = Specifications::from_kind(K_value); Node::set_text(*XP, WR[2]); <<token-construct>> = EXISTING_LOCAL_PT_CONSTRUCT ...... - {existing variable} | ==> { TRUE, Specifications::from_kind(K_value), <<token-construct>> = EXISTING_LOCAL_PT_CONSTRUCT }; Node::set_text(*XP, WR[2]);
...... - {existing <k-kind-for-template> variable} | ==> TRUE; *XP = Specifications::from_kind(RP[1]); Node::set_text(*XP, WR[2]); <<token-construct>> = EXISTING_LOCAL_PT_CONSTRUCT ...... - {existing <k-kind-for-template> variable} | ==> { TRUE, Specifications::from_kind(RP[1]), <<token-construct>> = EXISTING_LOCAL_PT_CONSTRUCT }; Node::set_text(*XP, WR[2]);
...... - {existing <k-kind-for-template> that/which varies} | ==> TRUE; *XP = Specifications::from_kind(RP[1]); Node::set_text(*XP, WR[2]); <<token-construct>> = EXISTING_LOCAL_PT_CONSTRUCT ...... - {existing <k-kind-for-template> that/which varies} | ==> { TRUE, Specifications::from_kind(RP[1]), <<token-construct>> = EXISTING_LOCAL_PT_CONSTRUCT }; Node::set_text(*XP, WR[2]);
...... - a condition | ==> TRUE; *XP = NULL; <<token-construct>> = CONDITION_PT_CONSTRUCT ...... - a condition | ==> { TRUE, NULL, <<token-construct>> = CONDITION_PT_CONSTRUCT }
...... - condition | ==> TRUE; *XP = NULL; <<token-construct>> = CONDITION_PT_CONSTRUCT ...... - condition | ==> { TRUE, NULL, <<token-construct>> = CONDITION_PT_CONSTRUCT }
...... - a phrase | ==> TRUE; *XP = NULL; <<token-construct>> = VOID_PT_CONSTRUCT ...... - a phrase | ==> { TRUE, NULL, <<token-construct>> = VOID_PT_CONSTRUCT }
...... - phrase | ==> TRUE; *XP = NULL; <<token-construct>> = VOID_PT_CONSTRUCT ...... - phrase | ==> { TRUE, NULL, <<token-construct>> = VOID_PT_CONSTRUCT }
...... - storage | ==> TRUE; *XP = Specifications::from_kind(K_value); Node::set_text(*XP, WR[2]); <<token-construct>> = STORAGE_PT_CONSTRUCT ...... - storage | ==> { TRUE, Specifications::from_kind(K_value), <<token-construct>> = STORAGE_PT_CONSTRUCT }; Node::set_text(*XP, WR[2]);
...... - a table-reference | ==> TRUE; *XP = Specifications::from_kind(K_value); Node::set_text(*XP, WR[2]); <<token-construct>> = TABLE_REFERENCE_PT_CONSTRUCT ...... - a table-reference | ==> { TRUE, Specifications::from_kind(K_value), <<token-construct>> = TABLE_REFERENCE_PT_CONSTRUCT }; Node::set_text(*XP, WR[2]);
...... - table-reference | ==> TRUE; *XP = Specifications::from_kind(K_value); Node::set_text(*XP, WR[2]); <<token-construct>> = TABLE_REFERENCE_PT_CONSTRUCT ...... - table-reference | ==> { TRUE, Specifications::from_kind(K_value), <<token-construct>> = TABLE_REFERENCE_PT_CONSTRUCT }; Node::set_text(*XP, WR[2]);
...... - <s-phrase-token-type> | ==> { TRUE, RP[1], <<token-construct>> = STANDARD_PT_CONSTRUCT } ...... - <s-phrase-token-type> | ==> { TRUE, RP[1], <<token-construct>> = STANDARD_PT_CONSTRUCT }
...... - <s-kind-as-name-token> | ==> { TRUE, RP[1], <<token-construct>> = KIND_NAME_PT_CONSTRUCT } ...... - <s-kind-as-name-token> | ==> { TRUE, RP[1], <<token-construct>> = KIND_NAME_PT_CONSTRUCT }
...... - ...... | ==> @<Issue PM_BadTypeIndication problem@> ...... - ...... | ==> @<Issue PM_BadTypeIndication problem@>

View file

@ -128,7 +128,7 @@ and creates two options with <phrase-option-declaration-setting-entry>.
= =
<phrase-option-declaration-list> ::= <phrase-option-declaration-list> ::=
... | ==> FALSE; return preform_lookahead_mode; /* match only when looking ahead */ ... | ==> { lookahead }
<phrase-option-declaration-setting-entry> <phrase-option-declaration-tail> | ==> { pass 2 } <phrase-option-declaration-setting-entry> <phrase-option-declaration-tail> | ==> { pass 2 }
<phrase-option-declaration-setting-entry> ==> { FALSE, - } <phrase-option-declaration-setting-entry> ==> { FALSE, - }
@ -139,7 +139,12 @@ and creates two options with <phrase-option-declaration-setting-entry>.
\and/or <phrase-option-declaration-list> ==> { TRUE, - } \and/or <phrase-option-declaration-list> ==> { TRUE, - }
<phrase-option-declaration-setting-entry> ::= <phrase-option-declaration-setting-entry> ::=
... ==> FALSE; if (!preform_lookahead_mode) Phrases::Options::phod_add_phrase_option(phod_being_parsed, W); ... | ==> { lookahead }
... ==> @<Add a phrase option@>;
@<Add a phrase option@> =
Phrases::Options::phod_add_phrase_option(phod_being_parsed, W);
==> { FALSE, - };
@ = @ =
int too_many_POs_error = FALSE; int too_many_POs_error = FALSE;

View file

@ -133,22 +133,22 @@ just enough from the wording to tell what sort of rule/phrase is to follow.
= =
<rule-preamble> ::= <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} | ==> { RULE_NOT_IN_RULEBOOK_EFF, -, <<event-time>> = NOT_AN_EVENT, <<written>> = FALSE }
this is the rule | ==> @<Issue PM_NamelessRule problem@> this is the rule | ==> @<Issue PM_NamelessRule problem@>
this is ... rule | ==> @<Issue PM_UnarticledRule problem@> this is ... rule | ==> @<Issue PM_UnarticledRule problem@>
this is ... rules | ==> @<Issue PM_PluralisedRule problem@> this is ... rules | ==> @<Issue PM_PluralisedRule problem@>
<event-rule-preamble> | ==> RULE_NOT_IN_RULEBOOK_EFF; <<event-time>> = R[1] <event-rule-preamble> | ==> { RULE_NOT_IN_RULEBOOK_EFF, -, <<event-time>> = R[1] }
to | ==> @<Issue PM_BareTo problem@> to | ==> @<Issue PM_BareTo problem@>
to ... ( called ... ) | ==> @<Issue PM_DontCallPhrasesWithCalled problem@> to ... ( called ... ) | ==> @<Issue PM_DontCallPhrasesWithCalled problem@>
{to ...} ( this is the {### function} inverse to ### ) | ==> TO_PHRASE_EFF; <<named>> = TRUE; <<written>> = TRUE; <<inverted>> = TRUE; {to ...} ( this is the {### function} inverse to ### ) | ==> { TO_PHRASE_EFF, -, <<named>> = TRUE, <<written>> = TRUE, <<inverted>> = TRUE }
{to ...} ( this is the {### function} ) | ==> TO_PHRASE_EFF; <<named>> = TRUE; <<written>> = TRUE; <<inverted>> = FALSE; {to ...} ( this is the {### function} ) | ==> { TO_PHRASE_EFF, -, <<named>> = TRUE, <<written>> = TRUE, <<inverted>> = FALSE }
{to ...} ( this is ... ) | ==> TO_PHRASE_EFF; <<named>> = TRUE; <<written>> = FALSE; {to ...} ( this is ... ) | ==> { TO_PHRASE_EFF, -, <<named>> = TRUE, <<written>> = FALSE }
to ... | ==> TO_PHRASE_EFF; <<named>> = FALSE to ... | ==> { TO_PHRASE_EFF, -, <<named>> = FALSE }
... ( this is the {... rule} ) | ==> RULE_IN_RULEBOOK_EFF; <<named>> = TRUE; <<written>> = FALSE; ... ( this is the {... rule} ) | ==> { RULE_IN_RULEBOOK_EFF, -, <<named>> = TRUE, <<written>> = FALSE }
... ( this is the rule ) | ==> @<Issue PM_NamelessRule problem@> ... ( this is the rule ) | ==> @<Issue PM_NamelessRule problem@>
... ( this is ... rule ) | ==> @<Issue PM_UnarticledRule problem@> ... ( this is ... rule ) | ==> @<Issue PM_UnarticledRule problem@>
... ( this is ... rules ) | ==> @<Issue PM_PluralisedRule problem@> ... ( this is ... rules ) | ==> @<Issue PM_PluralisedRule problem@>
... ==> RULE_IN_RULEBOOK_EFF; <<named>> = FALSE ... ==> { RULE_IN_RULEBOOK_EFF, -, <<named>> = FALSE }
@<Issue PM_NamelessRule problem@> = @<Issue PM_NamelessRule problem@> =
StandardProblems::sentence_problem(Task::syntax_tree(), _p_(PM_NamelessRule), StandardProblems::sentence_problem(Task::syntax_tree(), _p_(PM_NamelessRule),
@ -203,8 +203,8 @@ following grammar. (Parsing this is "fine mode".)
= =
<rule-preamble-fine> ::= <rule-preamble-fine> ::=
<rule-preamble-finer> during <s-scene-description> | ==> R[1]; <<parse_node:scenes>> = RP[2] <rule-preamble-finer> during <s-scene-description> | ==> { R[1], -, <<parse_node:scenes>> = RP[2] }
<rule-preamble-finer> ==> R[1]; <<parse_node:scenes>> = NULL <rule-preamble-finer> ==> { R[1], -, <<parse_node:scenes>> = NULL }
<rule-preamble-finer> ::= <rule-preamble-finer> ::=
{<rulebook-stem-embellished>} {when/while ...} | ==> { TRUE, - } {<rulebook-stem-embellished>} {when/while ...} | ==> { TRUE, - }
@ -212,11 +212,11 @@ following grammar. (Parsing this is "fine mode".)
... ==> { NOT_APPLICABLE, - } ... ==> { NOT_APPLICABLE, - }
<rulebook-stem-embellished> ::= <rulebook-stem-embellished> ::=
<rulebook-stem> *** | ==> 0; <<bud1>> = Wordings::first_wn(WR[1]); <<bud2>> = Wordings::last_wn(WR[1]) <rulebook-stem> *** | ==> { 0, -, <<bud1>> = Wordings::first_wn(WR[1]), <<bud2>> = Wordings::last_wn(WR[1]) }
<article> rule for <rulebook-stem> *** | ==> 0; <<bud1>> = Wordings::first_wn(WR[1]); <<bud2>> = Wordings::last_wn(WR[1]) <article> rule for <rulebook-stem> *** | ==> { 0, -, <<bud1>> = Wordings::first_wn(WR[1]), <<bud2>> = Wordings::last_wn(WR[1]) }
<article> rule <rulebook-stem> *** | ==> 0; <<bud1>> = Wordings::first_wn(WR[1]); <<bud2>> = Wordings::last_wn(WR[1]) <article> rule <rulebook-stem> *** | ==> { 0, -, <<bud1>> = Wordings::first_wn(WR[1]), <<bud2>> = Wordings::last_wn(WR[1]) }
rule for <rulebook-stem> *** | ==> 0; <<bud1>> = Wordings::first_wn(WR[1]); <<bud2>> = Wordings::last_wn(WR[1]) rule for <rulebook-stem> *** | ==> { 0, -, <<bud1>> = Wordings::first_wn(WR[1]), <<bud2>> = Wordings::last_wn(WR[1]) }
rule <rulebook-stem> *** ==> 0; <<bud1>> = Wordings::first_wn(WR[1]); <<bud2>> = Wordings::last_wn(WR[1]) rule <rulebook-stem> *** ==> { 0, -, <<bud1>> = Wordings::first_wn(WR[1]), <<bud2>> = Wordings::last_wn(WR[1]) }
<rulebook-bud> ::= <rulebook-bud> ::=
of/for ... | ==> { TRUE, - } of/for ... | ==> { TRUE, - }
@ -970,11 +970,11 @@ might have gone wrong.
= =
<action-when-diagnosis> ::= <action-when-diagnosis> ::=
... called ... {when/while ...} | ==> 1; <<cw1>> = Wordings::first_wn(WR[3]); <<cw2>> = Wordings::last_wn(WR[3]) ... called ... {when/while ...} | ==> { 1, -, <<cw1>> = Wordings::first_wn(WR[3]), <<cw2>> = Wordings::last_wn(WR[3]) }
... {when/while *** nothing ***} | ==> 2; <<cw1>> = Wordings::first_wn(WR[2]); <<cw2>> = Wordings::last_wn(WR[2]) ... {when/while *** nothing ***} | ==> { 2, -, <<cw1>> = Wordings::first_wn(WR[2]), <<cw2>> = Wordings::last_wn(WR[2]) }
... {when/while *** nowhere ***} | ==> 3; <<cw1>> = Wordings::first_wn(WR[2]); <<cw2>> = Wordings::last_wn(WR[2]) ... {when/while *** nowhere ***} | ==> { 3, -, <<cw1>> = Wordings::first_wn(WR[2]), <<cw2>> = Wordings::last_wn(WR[2]) }
... and {when/while ...} | ==> 4; <<cw1>> = Wordings::first_wn(WR[2]); <<cw2>> = Wordings::last_wn(WR[2]) ... and {when/while ...} | ==> { 4, -, <<cw1>> = Wordings::first_wn(WR[2]), <<cw2>> = Wordings::last_wn(WR[2]) }
... {when/while ...} ==> 5; <<cw1>> = Wordings::first_wn(WR[2]); <<cw2>> = Wordings::last_wn(WR[2]) ... {when/while ...} ==> { 5, -, <<cw1>> = Wordings::first_wn(WR[2]), <<cw2>> = Wordings::last_wn(WR[2]) }
@ = @ =
<anl-diagnosis> ::= <anl-diagnosis> ::=

View file

@ -274,11 +274,11 @@ what number is...", for instance.
= =
<inline-phrase-definition> ::= <inline-phrase-definition> ::=
(- ### - in to only | ==> DECIDES_NOTHING_MOR; <<inlinecode>> = Wordings::first_wn(WR[1]) (- ### - in to only | ==> { DECIDES_NOTHING_MOR, -, <<inlinecode>> = Wordings::first_wn(WR[1]) }
(- ### - in to decide if only | ==> DECIDES_CONDITION_MOR; <<inlinecode>> = Wordings::first_wn(WR[1]) (- ### - in to decide if only | ==> { DECIDES_CONDITION_MOR, -, <<inlinecode>> = Wordings::first_wn(WR[1]) }
(- ### - in to decide only | ==> DECIDES_VALUE_MOR; <<inlinecode>> = Wordings::first_wn(WR[1]) (- ### - in to decide only | ==> { DECIDES_VALUE_MOR, -, <<inlinecode>> = Wordings::first_wn(WR[1]) }
(- ### | ==> DONT_KNOW_MOR; <<inlinecode>> = Wordings::first_wn(WR[1]) (- ### | ==> { DONT_KNOW_MOR, -, <<inlinecode>> = Wordings::first_wn(WR[1]) }
(- ### ... ==> DONT_KNOW_MOR; <<inlinecode>> = Wordings::first_wn(WR[1]); @<Issue PM_TailAfterInline problem@> (- ### ... ==> { DONT_KNOW_MOR, -, <<inlinecode>> = Wordings::first_wn(WR[1]) }; @<Issue PM_TailAfterInline problem@>
@<Issue PM_TailAfterInline problem@> = @<Issue PM_TailAfterInline problem@> =
*X = DONT_KNOW_MOR; *X = DONT_KNOW_MOR;

View file

@ -81,13 +81,13 @@ the doubled use of colons is unfortunate.)
<adjective-domain> is/are <adjective-wording> ==> { DEFINED_PHRASALLY, - } <adjective-domain> is/are <adjective-wording> ==> { DEFINED_PHRASALLY, - }
<adjective-domain> ::= <adjective-domain> ::=
... ( called the ... ) | ==> 0; <<calling>> = TRUE ... ( called the ... ) | ==> { 0, -, <<calling>> = TRUE }
... ( called ... ) | ==> 0; <<calling>> = TRUE ... ( called ... ) | ==> { 0, -, <<calling>> = TRUE }
... ==> 0; <<calling>> = FALSE ... ==> { 0, -, <<calling>> = FALSE }
<adjective-wording> ::= <adjective-wording> ::=
... rather than ... | ==> 0; <<antonym>> = TRUE ... rather than ... | ==> { 0, -, <<antonym>> = TRUE }
... ==> 0; <<antonym>> = FALSE ... ==> { 0, -, <<antonym>> = FALSE }
@ And here is the supporting code: @ And here is the supporting code:

View file

@ -195,8 +195,8 @@ the fixed text "phrase options" expands to the whole bitmap.
= =
<inline-substitution> ::= <inline-substitution> ::=
phrase options | ==> { OPTS_INSUB, - } phrase options | ==> { OPTS_INSUB, - }
<phrase-option> | ==> OPT_INSUB; <<opt>> = R[1] <phrase-option> | ==> { OPT_INSUB, -, <<opt>> = R[1] }
<name-local-to-inline-stack-frame> | ==> LOCAL_INSUB; <<local_variable:var>> = RP[1] <name-local-to-inline-stack-frame> | ==> { LOCAL_INSUB, -, <<local_variable:var>> = RP[1] }
... ==> @<Issue PM_BadInlineExpansion problem@> ... ==> @<Issue PM_BadInlineExpansion problem@>
@ This matches one of the token names in the preamble to the inline definition. @ This matches one of the token names in the preamble to the inline definition.
@ -215,7 +215,6 @@ the fixed text "phrase options" expands to the whole bitmap.
charlatans" and what they "deserve". I'm a better person now. charlatans" and what they "deserve". I'm a better person now.
@<Issue PM_BadInlineExpansion problem@> = @<Issue PM_BadInlineExpansion problem@> =
*X = PROBLEM_INSUB;
Problems::quote_source(1, current_sentence); Problems::quote_source(1, current_sentence);
Problems::quote_wording(2, W); Problems::quote_wording(2, W);
StandardProblems::handmade_problem(Task::syntax_tree(), _p_(PM_BadInlineExpansion)); StandardProblems::handmade_problem(Task::syntax_tree(), _p_(PM_BadInlineExpansion));
@ -229,6 +228,7 @@ charlatans" and what they "deserve". I'm a better person now.
"extensions. A good rule of thumb is: if you can define a phrase without " "extensions. A good rule of thumb is: if you can define a phrase without "
"using I6 insertions, do."); "using I6 insertions, do.");
Problems::issue_problem_end(); Problems::issue_problem_end();
==> { PROBLEM_INSUB, - };
@ Acting on that: @ Acting on that:

View file

@ -47,7 +47,7 @@ and the following grammar defines the "when defining a thing" end.
<inform6-inclusion-location> ::= <inform6-inclusion-location> ::=
<inclusion-side> {<quoted-text-without-subs>} | ==> @<Note segment-level inclusion@> <inclusion-side> {<quoted-text-without-subs>} | ==> @<Note segment-level inclusion@>
<inclusion-side> {<quoted-text-without-subs>} in {<quoted-text-without-subs>} | ==> @<Note section-level inclusion@> <inclusion-side> {<quoted-text-without-subs>} in {<quoted-text-without-subs>} | ==> @<Note section-level inclusion@>
when defining <s-type-expression> | ==> WHEN_DEFINING_INC; <<parse_node:s>> = RP[1] when defining <s-type-expression> | ==> { WHEN_DEFINING_INC, -, <<parse_node:s>> = RP[1] }
when defining ... | ==> @<Issue PM_WhenDefiningUnknown problem@> when defining ... | ==> @<Issue PM_WhenDefiningUnknown problem@>
before the library | ==> @<Issue PM_BeforeTheLibrary problem@> before the library | ==> @<Issue PM_BeforeTheLibrary problem@>
in the preform grammar ==> { AS_PREFORM_INC, - } in the preform grammar ==> { AS_PREFORM_INC, - }

View file

@ -88,7 +88,15 @@ present.
= =
<language-element> ::= <language-element> ::=
<plugin-name> ==> TRUE; if ((registered_plugins[R[1]] == NULL) || (registered_plugins[R[1]]->now_plugged_in == FALSE)) *X = FALSE; <plugin-name> ==> @<Result true only if plugged in@>;
@<Result true only if plugged in@> =
if ((registered_plugins[R[1]] == NULL) ||
(registered_plugins[R[1]]->now_plugged_in == FALSE)) {
==> { FALSE, - };
} else {
==> { TRUE, - };
}
@ = @ =
word_assemblage Plugins::Manage::wording(int N) { word_assemblage Plugins::Manage::wording(int N) {

View file

@ -99,12 +99,12 @@ test_scenario *ts_being_parsed = NULL;
= =
<test-sentence-object> ::= <test-sentence-object> ::=
<quoted-text> | ==> TRUE; @<Process the quoted test script@> <quoted-text> | ==> { TRUE, - }; @<Process the quoted test script@>
<quoted-text> <test-case-circumstance-list> | ==> TRUE; @<Process the quoted test script@> <quoted-text> <test-case-circumstance-list> | ==> { TRUE, - }; @<Process the quoted test script@>
... ==> @<Issue PM_TestBadRequirements problem@> ... ==> @<Issue PM_TestBadRequirements problem@>
<test-case-circumstance-list> ::= <test-case-circumstance-list> ::=
... | ==> 0; return preform_lookahead_mode; ... | ==> { lookahead }
<test-case-circumstance-list> <test-case-circumstance> | ==> { 0, - } <test-case-circumstance-list> <test-case-circumstance> | ==> { 0, - }
<test-case-circumstance> ==> { 0, - } <test-case-circumstance> ==> { 0, - }

View file

@ -122,7 +122,7 @@ traversing the parse tree to look for translation sentences of the right sort.
= =
<extra-response> ::= <extra-response> ::=
<quoted-text> ( <response-letter> ) ==> R[2]; <quoted-text> ( <response-letter> ) ==> { pass 2 }
@ = @ =
void IdentifierTranslations::plus_responses(parse_node *p, rule *R) { void IdentifierTranslations::plus_responses(parse_node *p, rule *R) {

View file

@ -323,9 +323,9 @@ those which need immediate action.
= =
<immediate-use> ::= <immediate-use> ::=
... | ==> TRUE; return preform_lookahead_mode; /* match only when looking ahead */ ... | ==> { lookahead }
<immediate-use-entry> <immediate-use-tail> | ==> { TRUE, - } <immediate-use-entry> <immediate-use-tail> |
<immediate-use-entry> ==> { TRUE, - } <immediate-use-entry>
<immediate-use-tail> ::= <immediate-use-tail> ::=
, _and <immediate-use> | , _and <immediate-use> |

View file

@ -2496,7 +2496,7 @@ of alternatives each of which matches the following:
= =
<specifies-sentence-subject> ::= <specifies-sentence-subject> ::=
... ( {<literal-pattern-group-list>} ) | ==> { pass 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]; <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@> <s-type-expression> times <s-type-expression> | ==> @<Issue PM_MultiplyingNonKOVs problem@>
... ==> { 0, NULL } ... ==> { 0, NULL }
@ -2567,17 +2567,17 @@ can't set both scaling and an equivalent, for instance.
<literal-pattern-specification-tail> ::= <literal-pattern-specification-tail> ::=
with parts <literal-pattern-part-list> | ==> { PARTS_LPC, RP[1] } with parts <literal-pattern-part-list> | ==> { PARTS_LPC, 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]; <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]; 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]; equivalent to <s-literal> ==> { EQUIVALENT_LPC, - }; LP_real_equivalent = latest_constructed_real; LP_equivalent_value = RP[1];
<scaling-instruction> ::= <scaling-instruction> ::=
scaled up by <cardinal-number> | ==> SCALING_LPC; LP_scaling = LP_SCALED_UP; LP_scaling_amount = R[1]; LP_real_scaling_amount = (double) LP_scaling_amount; scaled up by <cardinal-number> | ==> { SCALING_LPC, - }; LP_scaling = LP_SCALED_UP; LP_scaling_amount = R[1]; LP_real_scaling_amount = (double) LP_scaling_amount;
scaled up by <s-literal-real-number> | ==> SCALING_LPC; LP_scaling = LP_SCALED_UP; LP_scaling_amount = 1; LP_real_scaling_amount = latest_constructed_real; LP_to_real = TRUE; scaled up by <s-literal-real-number> | ==> { SCALING_LPC, - }; LP_scaling = LP_SCALED_UP; LP_scaling_amount = 1; LP_real_scaling_amount = latest_constructed_real; LP_to_real = TRUE;
scaled down by <cardinal-number> | ==> SCALING_LPC; LP_scaling = LP_SCALED_DOWN; LP_scaling_amount = R[1]; LP_real_scaling_amount = (double) LP_scaling_amount; scaled down by <cardinal-number> | ==> { SCALING_LPC, - }; LP_scaling = LP_SCALED_DOWN; LP_scaling_amount = R[1]; LP_real_scaling_amount = (double) LP_scaling_amount;
scaled down by <s-literal-real-number> | ==> SCALING_LPC; LP_scaling = LP_SCALED_DOWN; LP_scaling_amount = 1; LP_real_scaling_amount = latest_constructed_real; LP_to_real = TRUE; scaled down by <s-literal-real-number> | ==> { SCALING_LPC, - }; LP_scaling = LP_SCALED_DOWN; LP_scaling_amount = 1; LP_real_scaling_amount = latest_constructed_real; LP_to_real = TRUE;
scaled at <cardinal-number> | ==> SCALING_LPC; LP_scaling = LP_SCALED_AT; LP_scaling_amount = R[1]; LP_real_scaling_amount = (double) LP_scaling_amount; scaled at <cardinal-number> | ==> { SCALING_LPC, - }; LP_scaling = LP_SCALED_AT; LP_scaling_amount = R[1]; LP_real_scaling_amount = (double) LP_scaling_amount;
scaled at <s-literal-real-number> ==> SCALING_LPC; LP_scaling = LP_SCALED_AT; LP_scaling_amount = 1; LP_real_scaling_amount = latest_constructed_real; LP_to_real = TRUE; scaled at <s-literal-real-number> ==> { SCALING_LPC, - }; LP_scaling = LP_SCALED_AT; LP_scaling_amount = 1; LP_real_scaling_amount = latest_constructed_real; LP_to_real = TRUE;
@<Issue PM_LPNotKOV problem@> = @<Issue PM_LPNotKOV problem@> =
if (preform_lookahead_mode == FALSE) { if (preform_lookahead_mode == FALSE) {
@ -2606,7 +2606,7 @@ by a bracketed list of up to three options in any order.
<np-unparsed-bal> ==> { 0, RP[1] } <np-unparsed-bal> ==> { 0, RP[1] }
<literal-pattern-part-option-list> ::= <literal-pattern-part-option-list> ::=
<literal-pattern-part-option> <literal-pattern-part-option-tail> | ==> R[1] | R[2] <literal-pattern-part-option> <literal-pattern-part-option-tail> | ==> { R[1] | R[2], - }
<literal-pattern-part-option> ==> { pass 1 } <literal-pattern-part-option> ==> { pass 1 }
<literal-pattern-part-option-tail> ::= <literal-pattern-part-option-tail> ::=

View file

@ -61,14 +61,14 @@ linguistically the same thing at all.
= =
<s-literal-time> ::= <s-literal-time> ::=
minus <elapsed-time> | ==> Rvalues::from_time(-R[1], W) minus <elapsed-time> | ==> { -, Rvalues::from_time(-R[1], W) }
<elapsed-time> | ==> Rvalues::from_time(R[1], W) <elapsed-time> | ==> { -, Rvalues::from_time(R[1], W) }
<clock-time> ==> Rvalues::from_time(R[1], W) <clock-time> ==> { -, Rvalues::from_time(R[1], W) }
<elapsed-time> ::= <elapsed-time> ::=
<cardinal-number> hour/hours | ==> 60*R[1] <cardinal-number> hour/hours | ==> { 60*R[1], - }
<cardinal-number> minute/minutes | ==> R[1] <cardinal-number> minute/minutes | ==> { pass 1 }
<cardinal-number> hour/hours <cardinal-number> minute/minutes ==> 60*R[1]+R[2] <cardinal-number> hour/hours <cardinal-number> minute/minutes ==> { 60*R[1]+R[2], - }
<clock-time> ::= <clock-time> ::=
<cardinal-number> <am-pm> | ==> @<Vet the time for clock range@> <cardinal-number> <am-pm> | ==> @<Vet the time for clock range@>

View file

@ -66,8 +66,8 @@ the player types either of these:
= =
<s-unicode-character> ::= <s-unicode-character> ::=
<cardinal-number-unlimited> | ==> Rvalues::from_Unicode_point(R[1], W); if (!(UnicodeTranslations::char_in_range(R[1]))) return FALSE; <cardinal-number-unlimited> | ==> { -, Rvalues::from_Unicode_point(R[1], W) }; if (!(UnicodeTranslations::char_in_range(R[1]))) return FALSE;
<unicode-character-name> ==> Rvalues::from_Unicode_point(R[1], W) <unicode-character-name> ==> { -, Rvalues::from_Unicode_point(R[1], W) }
<unicode-character-name> internal { <unicode-character-name> internal {
parse_node *p = Lexicon::retrieve(MISCELLANEOUS_MC, W); parse_node *p = Lexicon::retrieve(MISCELLANEOUS_MC, W);

View file

@ -136,14 +136,14 @@ as the object.
= =
<verb-implies-sentence-subject> ::= <verb-implies-sentence-subject> ::=
in <natural-language> <infinitive-declaration> | ==> R[2]; <<inform_language:nl>> = (inform_language *) (RP[1]); in <natural-language> <infinitive-declaration> | ==> { R[2], -, <<inform_language:nl>> = RP[1] }
<infinitive-declaration> ==> R[1]; <<inform_language:nl>> = DefaultLanguage::get(NULL); <infinitive-declaration> ==> { R[1], -, <<inform_language:nl>> = DefaultLanguage::get(NULL) }
<infinitive-declaration> ::= <infinitive-declaration> ::=
to <infinitive-usage> ( ... ) | ==> R[1]; <<giving-parts>> = TRUE to <infinitive-usage> ( ... ) | ==> { R[1], -, <<giving-parts>> = TRUE }
to <infinitive-usage> | ==> R[1]; <<giving-parts>> = FALSE to <infinitive-usage> | ==> { R[1], -, <<giving-parts>> = FALSE }
<infinitive-usage> ( ... ) | ==> R[1]; <<giving-parts>> = TRUE <infinitive-usage> ( ... ) | ==> { R[1], -, <<giving-parts>> = TRUE }
<infinitive-usage> ==> R[1]; <<giving-parts>> = FALSE <infinitive-usage> ==> { R[1], -, <<giving-parts>> = FALSE }
<infinitive-usage> ::= <infinitive-usage> ::=
{be able to ...} | ==> { TRUE, - } {be able to ...} | ==> { TRUE, - }
@ -184,7 +184,7 @@ now absolutely any non-empty word range is accepted as the property name.
= =
<verb-implies-sentence-object> ::= <verb-implies-sentence-object> ::=
reversed <relation-name> relation | ==> REL_VERBM; *XP = BinaryPredicates::get_reversal(RP[1]) reversed <relation-name> relation | ==> { REL_VERBM, BinaryPredicates::get_reversal(RP[1]) }
<relation-name> relation | ==> { REL_VERBM, RP[1] } <relation-name> relation | ==> { REL_VERBM, RP[1] }
to <instance-of-infinitive-form> | ==> @<Use verb infinitive as shorthand@> to <instance-of-infinitive-form> | ==> @<Use verb infinitive as shorthand@>
... property | ==> { PROP_VERBM, - } ... property | ==> { PROP_VERBM, - }
@ -237,7 +237,7 @@ now absolutely any non-empty word range is accepted as the property name.
<new-verb-sentence-object-unarticled> ==> { pass 1 } <new-verb-sentence-object-unarticled> ==> { pass 1 }
<new-verb-sentence-object-unarticled> ::= <new-verb-sentence-object-unarticled> ::=
verb | ==> TRUE; *XP = NULL; verb | ==> { TRUE, NULL }
verb implying/meaning <definite-article> nounphrase-unparsed> | ==> { TRUE, RP[2] } verb implying/meaning <definite-article> nounphrase-unparsed> | ==> { TRUE, RP[2] }
verb implying/meaning <np-unparsed> ==> { TRUE, RP[1] } verb implying/meaning <np-unparsed> ==> { TRUE, RP[1] }
@ -1125,7 +1125,7 @@ int NewVerbs::takes_contraction_form(word_assemblage *wa) {
<new-adjective-sentence-object-unarticled> ==> { pass 1 } <new-adjective-sentence-object-unarticled> ==> { pass 1 }
<new-adjective-sentence-object-unarticled> ::= <new-adjective-sentence-object-unarticled> ::=
adjective | ==> TRUE; *XP = NULL adjective | ==> { TRUE, NULL }
adjective implying/meaning <definite-article> <np-unparsed> | ==> { TRUE, RP[2] } adjective implying/meaning <definite-article> <np-unparsed> | ==> { TRUE, RP[2] }
adjective implying/meaning <np-unparsed> ==> { TRUE, RP[1] } adjective implying/meaning <np-unparsed> ==> { TRUE, RP[1] }

View file

@ -304,16 +304,16 @@ to be the name of a kind, possibly in the plural.
= =
<relates-sentence-left-object> ::= <relates-sentence-left-object> ::=
<relation-term-basic> ( called ... ) | ==> R[1] | CALLED_RBIT <relation-term-basic> ( called ... ) | ==> { R[1] | CALLED_RBIT, - }
<relation-term-basic> ==> { pass 1 } <relation-term-basic> ==> { pass 1 }
<relates-sentence-right-object> ::= <relates-sentence-right-object> ::=
<relation-term-right-named> with fast route-finding | ==> R[1] | FRF_RBIT <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> when ... | ==> { R[1] | WHEN_RBIT, - }
<relation-term-right-named> ==> { pass 1 } <relation-term-right-named> ==> { pass 1 }
<relation-term-right-named> ::= <relation-term-right-named> ::=
<relation-term-right> ( called ... ) | ==> R[1] | CALLED_RBIT <relation-term-right> ( called ... ) | ==> { R[1] | CALLED_RBIT, - }
<relation-term-right> ==> { pass 1 } <relation-term-right> ==> { pass 1 }
<relation-term-right> ::= <relation-term-right> ::=

View file

@ -203,14 +203,14 @@ void Sentences::VPs::switch_dl_mode(parse_node *PN, int sense) {
@ = @ =
<include-in-debugging-sentence-subject> ::= <include-in-debugging-sentence-subject> ::=
only <debugging-log-request> | ==> R[1] | ONLY_DLR; *XP = RP[1] only <debugging-log-request> | ==> { R[1] | ONLY_DLR, RP[1] }
<debugging-log-request> ==> { pass 1 } <debugging-log-request> ==> { pass 1 }
<debugging-log-request> ::= <debugging-log-request> ::=
everything | ==> { EVERYTHING_DLR, - } everything | ==> { EVERYTHING_DLR, NULL }
nothing | ==> { NOTHING_DLR, - } nothing | ==> { NOTHING_DLR, NULL }
<preform-nonterminal> | ==> { PREFORM_DLR, RP[1] } <preform-nonterminal> | ==> { PREFORM_DLR, RP[1] }
... ==> { SOMETHING_DLR, - } ... ==> { SOMETHING_DLR, NULL }
= =
void Sentences::VPs::set_aspect_from_text(wording W, int new_state) { void Sentences::VPs::set_aspect_from_text(wording W, int new_state) {
@ -401,16 +401,16 @@ new action.
= =
<nounphrase-figure> ::= <nounphrase-figure> ::=
figure ... ==> 0; *XP = Diagrams::new_UNPARSED_NOUN(W) figure ... ==> { 0, Diagrams::new_UNPARSED_NOUN(W) }
<nounphrase-sound> ::= <nounphrase-sound> ::=
sound ... ==> 0; *XP = Diagrams::new_UNPARSED_NOUN(W) sound ... ==> { 0, Diagrams::new_UNPARSED_NOUN(W) }
<nounphrase-external-file> ::= <nounphrase-external-file> ::=
<external-file-sentence-subject> ==> 0; *XP = Diagrams::new_UNPARSED_NOUN(W) <external-file-sentence-subject> ==> { 0, Diagrams::new_UNPARSED_NOUN(W) }
<nounphrase-actionable> ::= <nounphrase-actionable> ::=
^<variable-creation-tail> ==> 0; *XP = Diagrams::new_UNPARSED_NOUN(W) ^<variable-creation-tail> ==> { 0, Diagrams::new_UNPARSED_NOUN(W) }
<variable-creation-tail> ::= <variable-creation-tail> ::=
*** that/which vary/varies | *** that/which vary/varies |
@ -420,11 +420,11 @@ new action.
= =
<translation-target-unicode> ::= <translation-target-unicode> ::=
unicode ==> TRUE; *XP = NULL; unicode ==> { TRUE, NULL }
<translation-target-i6> ::= <translation-target-i6> ::=
i6 | ==> TRUE; *XP = NULL; i6 | ==> { TRUE, NULL }
inform 6 ==> TRUE; *XP = NULL; inform 6 ==> { TRUE, NULL }
<translation-target-language> ::= <translation-target-language> ::=
<natural-language> ==> { TRUE, RP[1] } <natural-language> ==> { TRUE, RP[1] }

View file

@ -218,7 +218,7 @@ property names before they can do any damage.)
<has-property-name> ::= <has-property-name> ::=
<bad-property-name-diagnosis> | ==> { 0, - } <bad-property-name-diagnosis> | ==> { 0, - }
... ==> 0; Properties::Valued::obtain(W); ... ==> { 0, Properties::Valued::obtain(W) }
<bad-property-name-diagnosis> ::= <bad-property-name-diagnosis> ::=
<article> | ==> @<Issue PM_PropertyCalledArticle problem@> <article> | ==> @<Issue PM_PropertyCalledArticle problem@>

View file

@ -151,7 +151,7 @@ which must match:
story story
<episode-sentence-object> ::= <episode-sentence-object> ::=
episode <cardinal-number> of <quoted-text-without-subs> | ==> R[1]; <<series>> = R[2]; episode <cardinal-number> of <quoted-text-without-subs> | ==> { R[1], -, <<series>> = R[2] }
episode ... ==> @<Issue PM_BadEpisode problem@>; episode ... ==> @<Issue PM_BadEpisode problem@>;
@<Issue PM_BadEpisode problem@> = @<Issue PM_BadEpisode problem@> =

View file

@ -56,11 +56,11 @@ The object noun phrase is an articled list, and each entry must match this.
= =
<release-sentence-object> ::= <release-sentence-object> ::=
<privacy-indicator> <exposed-innards> | ==> R[2]; <<privacy>> = R[1] <privacy-indicator> <exposed-innards> | ==> { R[2], -, <<privacy>> = R[1] }
<privacy-indicator> ... | ==> @<Issue PM_NoSuchPublicRelease problem@> <privacy-indicator> ... | ==> @<Issue PM_NoSuchPublicRelease problem@>
<exposed-innards> | ==> R[1]; <<privacy>> = NOT_APPLICABLE <exposed-innards> | ==> { R[1], -, <<privacy>> = NOT_APPLICABLE }
cover art ( <quoted-text> ) | ==> COVER_ART_PAYLOAD; <<alttext>> = R[1]; cover art ( <quoted-text> ) | ==> { COVER_ART_PAYLOAD, -, <<alttext>> = R[1] }
cover art | ==> COVER_ART_PAYLOAD; <<alttext>> = -1; cover art | ==> { COVER_ART_PAYLOAD, -, <<alttext>> = -1 }
existing story file | ==> { EXISTING_STORY_FILE_PAYLOAD, - } existing story file | ==> { EXISTING_STORY_FILE_PAYLOAD, - }
existing story file called {<quoted-text-without-subs>} | ==> { NAMED_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 of {<quoted-text-without-subs>} called {<quoted-text-without-subs>} | ==> { AUXILIARY_FILE_PAYLOAD, - }

View file

@ -343,20 +343,20 @@ itself.
= =
<index-map-sentence-subject> ::= <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]; <direction-name> mapped as <direction-name> | ==> { MAPPED_AS_IMW, -, <<instance:x>> = RP[1], <<instance:y>> = RP[2] }
... mapped as ... | ==> @<Issue PM_MapDirectionClue problem@> ... mapped as ... | ==> @<Issue PM_MapDirectionClue problem@>
<instance-of-object> mapped <map-positioning> | ==> MAPPED_IMW; <<instance:x>> = RP[1]; <<instance:y>> = RP[2]; <instance-of-object> mapped <map-positioning> | ==> { MAPPED_IMW, -, <<instance:x>> = RP[1], <<instance:y>> = RP[2] }
... mapped ... | ==> @<Issue PM_MapPlacement problem@> ... mapped ... | ==> @<Issue PM_MapPlacement problem@>
<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 <map-setting-value> | ==> { SETTING_IMW, -, <<scoping>> = R[1], <<msvtype>> = R[2] }; if (R[1] == NO_IMW) *X = NO_IMW;
<map-setting> set to ... | ==> @<Issue PM_MapSettingTooLong problem@> <map-setting> set to ... | ==> @<Issue PM_MapSettingTooLong problem@>
... set to ... | ==> @<Issue PM_MapSettingOfUnknown 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@> ... ==> @<Issue PM_MapHintUnknown problem@>
<map-positioning> ::= <map-positioning> ::=
<instance-of-object> of/from <instance-of-object> | ==> TRUE; <<instance:dir>> = RP[1]; *XP = RP[2] <instance-of-object> of/from <instance-of-object> | ==> { TRUE, RP[2], <<instance:dir>> = RP[1] }
above <instance-of-object> | ==> TRUE; <<instance:dir>> = I_up; *XP = RP[1] above <instance-of-object> | ==> { TRUE, RP[1], <<instance:dir>> = I_up }
below <instance-of-object> ==> TRUE; <<instance:dir>> = I_down; *XP = RP[1] below <instance-of-object> ==> { TRUE, RP[1], <<instance:dir>> = I_down }
@<Issue PM_MapDirectionClue problem@> = @<Issue PM_MapDirectionClue problem@> =
*X = NO_IMW; *X = NO_IMW;
@ -404,8 +404,8 @@ itself.
= =
<map-setting> ::= <map-setting> ::=
<map-parameter> of <map-setting-scope> | ==> R[2]; <<wchar_t:partext>> = RP[1]; <<parindex>> = R[1] <map-parameter> of <map-setting-scope> | ==> { R[2], -, <<wchar_t:partext>> = RP[1], <<parindex>> = R[1] }
<map-parameter> | ==> ENTIRE_MAP_SCOPE; <<wchar_t:partext>> = RP[1]; <<parindex>> = R[1] <map-parameter> | ==> { ENTIRE_MAP_SCOPE, -, <<wchar_t:partext>> = RP[1], <<parindex>> = R[1] }
... of <map-setting-scope> ==> @<Issue PM_MapSettingUnknown problem@> ... of <map-setting-scope> ==> @<Issue PM_MapSettingUnknown problem@>
<map-setting-scope> ::= <map-setting-scope> ::=
@ -414,9 +414,9 @@ itself.
<map-setting-scope-unarticled> ::= <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] level <cardinal-number> | ==> { LEVEL_MAP_SCOPE, -, <<level>> = R[1] }
<k-kind> | ==> KIND_MAP_SCOPE; <<kind:kscope>> = RP[1] <k-kind> | ==> { KIND_MAP_SCOPE, -, <<kind:kscope>> = RP[1] }
<instance-of-object> ==> INSTANCE_MAP_SCOPE; <<instance:iscope>> = RP[1] <instance-of-object> ==> { INSTANCE_MAP_SCOPE, -, <<instance:iscope>> = RP[1] }
@ The map parameters all have one-word, sometimes hyphenated, names, such @ The map parameters all have one-word, sometimes hyphenated, names, such
as the following: as the following:
@ -454,11 +454,11 @@ Never mind.
= =
<map-setting-value> ::= <map-setting-value> ::=
<cardinal-number> | ==> INT_MDT; <<msvalue>> = R[1]; <<msword>> = Wordings::first_wn(W); <cardinal-number> | ==> { INT_MDT, -, <<msvalue>> = R[1], <<msword>> = Wordings::first_wn(W) }
<quoted-text> | ==> TEXT_MDT; <<msvalue>> = R[1]; <<msword>> = Wordings::first_wn(W); <quoted-text> | ==> { TEXT_MDT, -, <<msvalue>> = R[1], <<msword>> = Wordings::first_wn(W) }
<map-setting-boolean> | ==> BOOL_MDT; <<msvalue>> = R[1]; <<msword>> = Wordings::first_wn(W); <map-setting-boolean> | ==> { BOOL_MDT, -, <<msvalue>> = R[1], <<msword>> = Wordings::first_wn(W) }
<map-offset> | ==> OFF_MDT; <<msvalue>> = R[1]; <<msword>> = Wordings::first_wn(W); if (R[1] == ERRONEOUS_OFFSET_VALUE) return FALSE; <map-offset> | ==> { OFF_MDT, -, <<msvalue>> = R[1], <<msword>> = Wordings::first_wn(W) }; if (R[1] == ERRONEOUS_OFFSET_VALUE) return FALSE;
### ==> -1; <<msword>> = Wordings::first_wn(W); /* leads to a problem message later */ ### ==> { -1, -, <<msword>> = Wordings::first_wn(W) } /* leads to a problem message later */
<map-setting-boolean> ::= <map-setting-boolean> ::=
on | ==> { TRUE, - } on | ==> { TRUE, - }
@ -481,11 +481,11 @@ the following:
= =
<map-rubric> ::= <map-rubric> ::=
size <cardinal-number> *** | ==> RUBRIC_SIZE; <<rsize>> = R[1]; <<edge>> = Wordings::first_wn(WR[1]) size <cardinal-number> *** | ==> { RUBRIC_SIZE, -, <<rsize>> = R[1], <<edge>> = Wordings::first_wn(WR[1]) }
font {<quoted-text-without-subs>} *** | ==> RUBRIC_FONT; <<rfont>> = R[1]; <<edge>> = Wordings::first_wn(WR[2]) font {<quoted-text-without-subs>} *** | ==> { RUBRIC_FONT, -, <<rfont>> = R[1], <<edge>> = Wordings::first_wn(WR[2]) }
colour {<quoted-text-without-subs>} *** | ==> RUBRIC_COLOUR; <<rcol>> = R[1]; <<edge>> = Wordings::first_wn(WR[2]) colour {<quoted-text-without-subs>} *** | ==> { RUBRIC_COLOUR, -, <<rcol>> = R[1], <<edge>> = Wordings::first_wn(WR[2]) }
at <map-offset> from ... | ==> RUBRIC_OFFSET; <<roff>> = R[1]; <<edge>> = Wordings::first_wn(WR[1]) at <map-offset> from ... | ==> { RUBRIC_OFFSET, -, <<roff>> = R[1], <<edge>> = Wordings::first_wn(WR[1]) }
at <map-offset> *** ==> RUBRIC_POSITION; <<roff>> = R[1]; <<edge>> = Wordings::first_wn(WR[1]) at <map-offset> *** ==> { RUBRIC_POSITION, -, <<roff>> = R[1], <<edge>> = Wordings::first_wn(WR[1]) }
@ @

View file

@ -392,11 +392,11 @@ in a different context, for instance, and could still be valid in that case.
<text-including-a-calling> | ==> @<Issue PM_ScenesDisallowCalled problem@> <text-including-a-calling> | ==> @<Issue PM_ScenesDisallowCalled problem@>
play begins | ==> { -1, - } play begins | ==> { -1, - }
play ends | ==> @<Issue PM_ScenesNotPlay problem@> play ends | ==> @<Issue PM_ScenesNotPlay problem@>
<scene-name> begins | ==> 0; <<scene:named>> = RP[1] <scene-name> begins | ==> { 0, -, <<scene:named>> = RP[1] }
<scene-name> ends | ==> 1; <<scene:named>> = RP[1] <scene-name> ends | ==> { 1, -, <<scene:named>> = RP[1] }
<scene-name> ends <scene-end-name> | ==> R[2]; <<scene:named>> = RP[1] <scene-name> ends <scene-end-name> | ==> { R[2], -, <<scene:named>> = RP[1] }
<scene-name> ends ... | ==> @<Issue PM_ScenesUnknownEnd problem@> <scene-name> ends ... | ==> @<Issue PM_ScenesUnknownEnd problem@>
<s-condition> ==> -2; <<parse_node:cond>> = RP[1] <s-condition> ==> { -2, -, <<parse_node:cond>> = RP[1] }
@<Issue PM_ScenesDisallowCalled problem@> = @<Issue PM_ScenesDisallowCalled problem@> =
*X = -1; *X = -1;

View file

@ -697,8 +697,8 @@ a condition attached with "when":
<ap-common-core> ::= <ap-common-core> ::=
<ap-common-core-inner> when/while <condition-in-ap> | ==> { 0, RP[1] }; action_pattern *ap = *XP; ap->when = RP[2]; if (pap_failure_reason == MISC_PAPF) pap_failure_reason = WHENOKAY_PAPF; <ap-common-core-inner> when/while <condition-in-ap> | ==> { 0, RP[1] }; action_pattern *ap = *XP; ap->when = RP[2]; if (pap_failure_reason == MISC_PAPF) pap_failure_reason = WHENOKAY_PAPF;
<ap-common-core-inner> | ==> { 0, RP[1] }; <ap-common-core-inner> | ==> { 0, RP[1] };
... when/while <condition-in-ap> | ==> 0; pap_failure_reason = WHENOKAY_PAPF; return FALSE; /* used only to diagnose problems */ ... when/while <condition-in-ap> | ==> { 0, NULL }; pap_failure_reason = WHENOKAY_PAPF; return FALSE; /* used only to diagnose problems */
... when/while ... ==> 0; if (pap_failure_reason != WHENOKAY_PAPF) pap_failure_reason = WHEN_PAPF; return FALSE; /* used only to diagnose problems */ ... when/while ... ==> { 0, NULL }; if (pap_failure_reason != WHENOKAY_PAPF) pap_failure_reason = WHEN_PAPF; return FALSE; /* used only to diagnose problems */
@ <condition-in-ap> is really just <spec-condition> in disguise -- i.e., @ <condition-in-ap> is really just <spec-condition> in disguise -- i.e.,
it matches a standard Inform condition -- but it's implemented as an internal it matches a standard Inform condition -- but it's implemented as an internal

View file

@ -768,7 +768,7 @@ action to be created.
= =
<action-sentence-subject> ::= <action-sentence-subject> ::=
<action-name> | ==> @<Issue PM_ActionAlreadyExists problem@> <action-name> | ==> @<Issue PM_ActionAlreadyExists problem@>
... ==> 0; *XP = PL::Actions::act_new(W, TRUE); ... ==> { 0, PL::Actions::act_new(W, TRUE) }
@<Issue PM_ActionAlreadyExists problem@> = @<Issue PM_ActionAlreadyExists problem@> =
*XP = NULL; *XP = NULL;
@ -796,19 +796,19 @@ It's convenient to define a single action clause first:
out of world | ==> { OOW_ACT_CLAUSE, - } out of world | ==> { OOW_ACT_CLAUSE, - }
abbreviable | ==> { ABBREV_ACT_CLAUSE, - } abbreviable | ==> { ABBREV_ACT_CLAUSE, - }
with past participle ... | ==> { PP_ACT_CLAUSE, - } with past participle ... | ==> { PP_ACT_CLAUSE, - }
applying to <action-applications> | ==> APPLYING_ACT_CLAUSE; <<num>> = R[1] applying to <action-applications> | ==> { APPLYING_ACT_CLAUSE, -, <<num>> = R[1] }
requiring light ==> { LIGHT_ACT_CLAUSE, - } requiring light ==> { LIGHT_ACT_CLAUSE, - }
<action-applications> ::= <action-applications> ::=
nothing | ==> { 0, - } nothing | ==> { 0, - }
one <act-req> and one <act-req> | ==> 2; <<kind:op1>> = RP[1]; <<ac1>> = R[1]; <<kind:op2>> = RP[2]; <<ac2>> = R[2] one <act-req> and one <act-req> | ==> { 2, -, <<kind:op1>> = RP[1], <<ac1>> = R[1], <<kind:op2>> = RP[2], <<ac2>> = R[2] }
one <act-req> and <act-req> | ==> 2; <<kind:op1>> = RP[1]; <<ac1>> = R[1]; <<kind:op2>> = RP[2]; <<ac2>> = R[2] one <act-req> and <act-req> | ==> { 2, -, <<kind:op1>> = RP[1], <<ac1>> = R[1], <<kind:op2>> = RP[2], <<ac2>> = R[2] }
<act-req> and one <act-req> | ==> 2; <<kind:op1>> = RP[1]; <<ac1>> = R[1]; <<kind:op2>> = RP[2]; <<ac2>> = R[2] <act-req> and one <act-req> | ==> { 2, -, <<kind:op1>> = RP[1], <<ac1>> = R[1], <<kind:op2>> = RP[2], <<ac2>> = R[2] }
<act-req> and <act-req> | ==> 2; <<kind:op1>> = RP[1]; <<ac1>> = R[1]; <<kind:op2>> = RP[2]; <<ac2>> = R[2] <act-req> and <act-req> | ==> { 2, -, <<kind:op1>> = RP[1], <<ac1>> = R[1], <<kind:op2>> = RP[2], <<ac2>> = R[2] }
nothing or one <act-req> | ==> -1; <<kind:op1>> = RP[1]; <<ac1>> = R[1] nothing or one <act-req> | ==> { -1, -, <<kind:op1>> = RP[1], <<ac1>> = R[1] }
one <act-req> | ==> 1; <<kind:op1>> = RP[1]; <<ac1>> = R[1] one <act-req> | ==> { 1, -, <<kind:op1>> = RP[1], <<ac1>> = R[1] }
two <act-req> | ==> 2; <<kind:op1>> = RP[1]; <<ac1>> = R[1]; <<kind:op2>> = RP[1]; <<ac2>> = R[1] two <act-req> | ==> { 2, -, <<kind:op1>> = RP[1], <<ac1>> = R[1], <<kind:op2>> = RP[1], <<ac2>> = R[1] }
<act-req> | ==> 1; <<kind:op1>> = RP[1]; <<ac1>> = R[1] <act-req> | ==> { 1, -, <<kind:op1>> = RP[1], <<ac1>> = R[1] }
... ==> @<Issue PM_ActionMisapplied problem@>; ... ==> @<Issue PM_ActionMisapplied problem@>;
<act-req> ::= <act-req> ::=
@ -828,9 +828,9 @@ It's convenient to define a single action clause first:
... ==> @<Issue PM_ActionClauseUnknown problem@> ... ==> @<Issue PM_ActionClauseUnknown problem@>
<action-clauses> ::= <action-clauses> ::=
... | ==> 0; return preform_lookahead_mode; /* match only on lookahead */ ... | ==> { lookahead }
<action-clauses> <action-clause-terminated> | ==> R[2]; @<Act on this action information@> <action-clauses> <action-clause-terminated> | ==> { R[2], - }; @<Act on this action information@>
<action-clause-terminated> ==> R[1]; @<Act on this action information@> <action-clause-terminated> ==> { R[1], - }; @<Act on this action information@>
<action-clause-terminated> ::= <action-clause-terminated> ::=
<action-clause> , and | ==> { pass 1 } <action-clause> , and | ==> { pass 1 }

View file

@ -179,7 +179,7 @@ known what the action will be.
= =
<understand-condition> ::= <understand-condition> ::=
<s-non-action-condition> | ==> 0; <<parse_node:cond>> = RP[1]; <s-non-action-condition> | ==> { 0, -, <<parse_node:cond>> = RP[1] }
<s-condition> | ==> @<Issue PM_WhenAction problem@> <s-condition> | ==> @<Issue PM_WhenAction problem@>
... ==> @<Issue PM_BadWhen problem@>; ... ==> @<Issue PM_BadWhen problem@>;

View file

@ -83,7 +83,7 @@ the Standard Rules or, in the case of "the X understood", by Inform itself.
= =
<notable-parsing-variables> ::= <notable-parsing-variables> ::=
<k-kind> understood | ==> 0; <<kind:understood>> = RP[1] <k-kind> understood | ==> { 0, -, <<kind:understood>> = RP[1] }
noun | ==> { 1, - } noun | ==> { 1, - }
location | ==> { 2, - } location | ==> { 2, - }
actor-location | ==> { 3, - } actor-location | ==> { 3, - }

View file

@ -219,19 +219,19 @@ kind *PL::Parsing::Tokens::kind_for_special_token(int gtc) {
= =
<grammar-token> ::= <grammar-token> ::=
<named-grammar-token> | ==> NAMED_TOKEN_GTC; <<grammar_verb:named>> = RP[1] <named-grammar-token> | ==> { NAMED_TOKEN_GTC, -, <<grammar_verb:named>> = RP[1] }
any things | ==> ANY_THINGS_GTC; <<parse_node:s>> = Specifications::from_kind(K_thing); any things | ==> { ANY_THINGS_GTC, -, <<parse_node:s>> = Specifications::from_kind(K_thing) }
any <s-description> | ==> ANY_STUFF_GTC; <<parse_node:s>> = RP[1] any <s-description> | ==> { ANY_STUFF_GTC, -, <<parse_node:s>> = RP[1] }
anything | ==> ANY_STUFF_GTC; <<parse_node:s>> = Specifications::from_kind(K_thing); anything | ==> { ANY_STUFF_GTC, -, <<parse_node:s>> = Specifications::from_kind(K_thing) }
anybody | ==> ANY_STUFF_GTC; <<parse_node:s>> = Specifications::from_kind(K_person); anybody | ==> { ANY_STUFF_GTC, -, <<parse_node:s>> = Specifications::from_kind(K_person) }
anyone | ==> ANY_STUFF_GTC; <<parse_node:s>> = Specifications::from_kind(K_person); anyone | ==> { ANY_STUFF_GTC, -, <<parse_node:s>> = Specifications::from_kind(K_person) }
anywhere | ==> ANY_STUFF_GTC; <<parse_node:s>> = Specifications::from_kind(K_room); anywhere | ==> { ANY_STUFF_GTC, -, <<parse_node:s>> = Specifications::from_kind(K_room) }
something related by reversed <relation-name> | ==> RELATED_GTC; *XP = BinaryPredicates::get_reversal(RP[1]) something related by reversed <relation-name> | ==> { RELATED_GTC, BinaryPredicates::get_reversal(RP[1]) }
something related by <relation-name> | ==> { RELATED_GTC, RP[1] } something related by <relation-name> | ==> { RELATED_GTC, RP[1] }
something related by ... | ==> @<Issue PM_GrammarBadRelation problem@> something related by ... | ==> @<Issue PM_GrammarBadRelation problem@>
<standard-grammar-token> | ==> R[1] <standard-grammar-token> | ==> { R[1], NULL }
<definite-article> <k-kind> | ==> STUFF_GTC; <<parse_node:s>> = Specifications::from_kind(RP[2]) <definite-article> <k-kind> | ==> { STUFF_GTC, -, <<parse_node:s>> = Specifications::from_kind(RP[2]) }
<s-description> | ==> STUFF_GTC; <<parse_node:s>> = RP[1] <s-description> | ==> { STUFF_GTC, -, <<parse_node:s>> = RP[1] }
<s-type-expression> | ==> @<Issue PM_BizarreToken problem@> <s-type-expression> | ==> @<Issue PM_BizarreToken problem@>
... ==> @<Issue PM_UnknownToken problem@> ... ==> @<Issue PM_UnknownToken problem@>

View file

@ -140,7 +140,7 @@ As examples:
= =
<understand-sentence-subject> ::= <understand-sentence-subject> ::=
nothing | ==> NOTHING_UNDERSTAND_FORM; *XP = NULL nothing | ==> { NOTHING_UNDERSTAND_FORM, NULL }
<understand-property-list> | ==> { PROPERTY_UNDERSTAND_FORM, RP[1] } <understand-property-list> | ==> { PROPERTY_UNDERSTAND_FORM, RP[1] }
the command/commands <understand-regular-list> | ==> { COMMAND_UNDERSTAND_FORM, RP[1] } the command/commands <understand-regular-list> | ==> { COMMAND_UNDERSTAND_FORM, RP[1] }
the verb/verbs ... | ==> @<Issue PM_OldVerbUsage problem@> the verb/verbs ... | ==> @<Issue PM_OldVerbUsage problem@>
@ -160,13 +160,13 @@ As examples:
= =
<understand-regular-list> ::= <understand-regular-list> ::=
... | ==> 0; *XP = NULL; return preform_lookahead_mode; /* match only when looking ahead */ ... | ==> { lookahead }
<understand-regular-entry> <understand-regular-tail> | ==> @<Compose understand item list@> <understand-regular-entry> <understand-regular-tail> | ==> @<Compose understand item list@>
<understand-regular-entry> ==> { 0, RP[1] }; <understand-regular-entry> ==> { 0, RP[1] }
<understand-regular-tail> ::= <understand-regular-tail> ::=
, _and/or <understand-regular-list> | ==> { 0, RP[1] }; , _and/or <understand-regular-list> | ==> { 0, RP[1] }
_,/and/or <understand-regular-list> ==> { 0, RP[1] }; _,/and/or <understand-regular-list> ==> { 0, RP[1] }
<understand-regular-entry> ::= <understand-regular-entry> ::=
... ==> @<Make understand item@> ... ==> @<Make understand item@>
@ -176,13 +176,13 @@ formal way (with "property").
= =
<understand-property-list> ::= <understand-property-list> ::=
... | ==> 0; *XP = NULL; return preform_lookahead_mode; /* match only when looking ahead */ ... | ==> { lookahead }
<understand-property-entry> <understand-property-tail> | ==> @<Compose understand item list@> <understand-property-entry> <understand-property-tail> | ==> @<Compose understand item list@>
<understand-property-entry> ==> { 0, RP[1] }; <understand-property-entry> ==> { 0, RP[1] }
<understand-property-tail> ::= <understand-property-tail> ::=
, _and/or <understand-property-list> | ==> { 0, RP[1] }; , _and/or <understand-property-list> | ==> { 0, RP[1] }
_,/and/or <understand-property-list> ==> { 0, RP[1] }; _,/and/or <understand-property-list> ==> { 0, RP[1] }
<understand-property-entry> ::= <understand-property-entry> ::=
<property-name> property | ==> @<Make understand property item@> <property-name> property | ==> @<Make understand property item@>
@ -243,7 +243,7 @@ It's not widely known, but the object phrase here can be a list.
<understand-sentence-object-uncond> ==> { 1, RP[1] } <understand-sentence-object-uncond> ==> { 1, RP[1] }
<understand-sentence-object-uncond> ::= <understand-sentence-object-uncond> ::=
... | ==> 0; return preform_lookahead_mode; /* match only when looking ahead */ ... | ==> { lookahead }
<understand-sentence-entry> <understand-sentence-object-tail> | ==> @<Compose understand reference list@> <understand-sentence-entry> <understand-sentence-object-tail> | ==> @<Compose understand reference list@>
<understand-sentence-entry> ==> { 0, RP[1] } <understand-sentence-entry> ==> { 0, RP[1] }
@ -252,7 +252,7 @@ It's not widely known, but the object phrase here can be a list.
_,/and/or <understand-sentence-object-uncond> ==> { 0, RP[1] } _,/and/or <understand-sentence-object-uncond> ==> { 0, RP[1] }
<understand-sentence-entry> ::= <understand-sentence-entry> ::=
<understand-as-this> ==> 0; if (!preform_lookahead_mode) @<Deal with UT vars@>; <understand-as-this> ==> { 0, - }; if (!preform_lookahead_mode) @<Deal with UT vars@>;
@<Compose understand reference list@> = @<Compose understand reference list@> =
understanding_reference *ui1 = RP[1]; understanding_reference *ui1 = RP[1];
@ -277,19 +277,19 @@ It's not widely known, but the object phrase here can be a list.
= =
<understand-as-this> ::= <understand-as-this> ::=
... | ==> 0; @<Clear UT vars@>; return preform_lookahead_mode; /* match only when looking ahead */ ... | ==> { 0, - }; @<Clear UT vars@>; return preform_lookahead_mode; /* match only when looking ahead */
a mistake | ==> 0; ur_being_parsed.gv_result = GV_IS_COMMAND; ur_being_parsed.mistaken = TRUE; a mistake | ==> { 0, - }; ur_being_parsed.gv_result = GV_IS_COMMAND; ur_being_parsed.mistaken = TRUE;
a mistake ( <quoted-text> ) | ==> 0; ur_being_parsed.gv_result = GV_IS_COMMAND; ur_being_parsed.mistaken = TRUE; ur_being_parsed.mword = R[1] a mistake ( <quoted-text> ) | ==> { 0, - }; ur_being_parsed.gv_result = GV_IS_COMMAND; ur_being_parsed.mistaken = TRUE; ur_being_parsed.mword = R[1]
a mistake ... | ==> @<Issue PM_TextlessMistake problem@> a mistake ... | ==> @<Issue PM_TextlessMistake problem@>
the plural of <understand-ref> | ==> R[1]; ur_being_parsed.pluralised_reference = TRUE; the plural of <understand-ref> | ==> { R[1], - }; ur_being_parsed.pluralised_reference = TRUE;
plural of <understand-ref> | ==> R[1]; ur_being_parsed.pluralised_reference = TRUE; plural of <understand-ref> | ==> { R[1], - }; ur_being_parsed.pluralised_reference = TRUE;
<quoted-text> | ==> 0; ur_being_parsed.gv_result = GV_IS_TOKEN; <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> ( with nouns reversed ) | ==> { R[1], - }; ur_being_parsed.reversed_reference = TRUE;
<understand-ref> ==> { pass 1 } <understand-ref> ==> { pass 1 }
<understand-ref> ::= <understand-ref> ::=
<action-name> | ==> 0; ur_being_parsed.an_reference = RP[1]; <action-name> | ==> { 0, - }; ur_being_parsed.an_reference = RP[1];
<s-descriptive-type-expression> | ==> 0; ur_being_parsed.spec_reference = RP[1]; <s-descriptive-type-expression> | ==> { 0, - }; ur_being_parsed.spec_reference = RP[1];
<s-variable> | ==> @<Issue PM_UnderstandVariable problem@> <s-variable> | ==> @<Issue PM_UnderstandVariable problem@>
... ==> @<Issue PM_UnderstandVague problem@> ... ==> @<Issue PM_UnderstandVague problem@>
@ -352,7 +352,7 @@ Here the grammar is very simple, and the object can't be a list.
<understand-command-sentence-object> ::= <understand-command-sentence-object> ::=
... when/while ... | ==> @<Issue PM_UnderstandCommandWhen problem@> ... when/while ... | ==> @<Issue PM_UnderstandCommandWhen problem@>
something new | ==> { 0, - } something new | ==> { 0, - }
<quoted-text> | ==> Wordings::first_wn(W) <quoted-text> | ==> { Wordings::first_wn(W), - }
... ==> @<Issue PM_NotOldCommand problem@> ... ==> @<Issue PM_NotOldCommand problem@>
@<Issue PM_UnderstandCommandWhen problem@> = @<Issue PM_UnderstandCommandWhen problem@> =
@ -375,8 +375,8 @@ to or described can be of any kind, but in fact we restrict to kinds of object.
= =
<understand-property-sentence-object> ::= <understand-property-sentence-object> ::=
<understand-property-sentence-object-unconditional> when/while ... | ==> { 2, RP[1] }; <<level>> = R[1] <understand-property-sentence-object-unconditional> when/while ... | ==> { 2, RP[1], <<level>> = R[1] }
<understand-property-sentence-object-unconditional> ==> { 1, RP[1] }; <<level>> = R[1] <understand-property-sentence-object-unconditional> ==> { 1, RP[1], <<level>> = R[1] }
<understand-property-sentence-object-unconditional> ::= <understand-property-sentence-object-unconditional> ::=
referring to <understand-property-reference> | ==> { 1, RP[1] } referring to <understand-property-reference> | ==> { 1, RP[1] }
@ -385,7 +385,7 @@ to or described can be of any kind, but in fact we restrict to kinds of object.
<understand-property-reference> ::= <understand-property-reference> ::=
<k-kind> | ==> @<Make reference from kind, if a kind of object@> <k-kind> | ==> @<Make reference from kind, if a kind of object@>
<instance-of-object> | ==> 0; *XP = Instances::as_subject(RP[1]); <instance-of-object> | ==> { 0, Instances::as_subject(RP[1]) }
... ==> @<Issue PM_BadUnderstandPropertyAs problem@> ... ==> @<Issue PM_BadUnderstandPropertyAs problem@>
@<Make reference from kind, if a kind of object@> = @<Make reference from kind, if a kind of object@> =

View file

@ -77,9 +77,9 @@ Here is the subject:
= =
<external-file-sentence-subject> ::= <external-file-sentence-subject> ::=
<definite-article> <external-file-sentence-subject> | ==> { pass 2 } <definite-article> <external-file-sentence-subject> | ==> { pass 2 }
text <external-file-name> | ==> FALSE; <<ownership>> = R[1] text <external-file-name> | ==> { FALSE, -, <<ownership>> = R[1] }
binary <external-file-name> | ==> TRUE; <<ownership>> = R[1] binary <external-file-name> | ==> { TRUE, -, <<ownership>> = R[1] }
<external-file-name> ==> FALSE; <<ownership>> = R[1] <external-file-name> ==> { FALSE, -, <<ownership>> = R[1] }
<external-file-name> ::= <external-file-name> ::=
{file ...} ( owned by <external-file-owner> ) | ==> { pass 1 } {file ...} ( owned by <external-file-owner> ) | ==> { pass 1 }

View file

@ -109,7 +109,7 @@ int PL::Figures::new_figure_SMF(int task, parse_node *V, wording *NPs) {
@ = @ =
<figure-sentence-object> ::= <figure-sentence-object> ::=
<figure-source> ( <quoted-text> ) | ==> R[1]; <<alttext>> = R[2]; <figure-source> ( <quoted-text> ) | ==> { R[1], -, <<alttext>> = R[2] }
<figure-source> ==> { pass 1 } <figure-source> ==> { pass 1 }
<figure-source> ::= <figure-source> ::=

View file

@ -103,7 +103,7 @@ int PL::Sounds::new_sound_SMF(int task, parse_node *V, wording *NPs) {
= =
<sound-sentence-object> ::= <sound-sentence-object> ::=
<sound-source> ( <quoted-text> ) | ==> R[1]; <<alttext>> = R[2]; <sound-source> ( <quoted-text> ) | ==> { R[1], -, <<alttext>> = R[2] }
<sound-source> ==> { pass 1 } <sound-source> ==> { pass 1 }
<sound-source> ::= <sound-source> ::=