Inform Library 6/12 and Inform 6.33.1 for Unix go beta

So, you want me to replace what I did in github.com/DavidGriffith/inform … edc2de27ea with “not_holding”?

Yes, and thank you.

In library 6/12, in parser.h, ther’s a new undocumented Fake Action: Fake_Action Going; What the end use of it ?

Property before_implicit and compass_look are not defined as “Common” property It is one forgets or it is not useful?

Done.

It looks like that new Fake_Action Going has something to do with GoSub(). Exactly what, I don’t know.

before_implicit and compass_look don’t appear to be used often enought to merit them being defined as “Common”.

It seems that there is a small problem with: kiss & “(you)”

Include "parser.h"; Include "verblib.h";
Object room "Room"
with description "Room test" has light;
[ Initialise;  location = room; ];
Include "grammar.h";
Release 1 / Serial number 140808 / Inform v6.33 Library 6/12-beta1 S
Room
Room test
>kiss
(you)
That really wouldn't serve any purpose.
>

I think that in this case it’s “(yourself)” not “(you)”?
It’s the function [ ThatOrThose obj; ]; in english.h which displays this “(you)”.

Found the problem. I had Defart() improperly emitting “you” instead of “yourself”.

There’s a problem with incomplete sentence and UnknownVerb(word). After the question, “if the reply looks like a command, give it to the parser to get on with and forget about the question…”

Include "parser.h"; Include "verblib.h";
Object room "Room" with description "Room test" has light;

[ xVerbSub; "O.K. xVerbSub: xxx is understood has a verb";];

[ UnknownVerb word;
	if (word == 'xxx') return 'xverb';
	rfalse;
];

[ Initialise; location = room; ];
Include "grammar.h";

verb 'xverb' * -> xVerb;

Release 1 / Serial number 140809 / Inform v6.33 Library 6/12-beta1 S

Room
Room test

xxx
O.K. xVerbSub: xxx is understood has a verb

give
What do you want to give?

xxx
You can’t see any such thing.

give
What do you want to give?

look

Room
Room test

“xxx”, after the question is not understood has a verb, “look” it is.
You can search “.Incomplete;” in parserm.h to determine the location of the problem. After the new input, the call of the function UnknownVerb() is missing. And there’s a strange Constant LanguageIsVerb, with a ghost function: LanguageIsVerb() !?

.Incomplete;

    if (best_etype == NOTHING_PE && pattern-->1 == 0) rfalse; ! for DROP when empty-handed
    if (context == CREATURE_TOKEN) L__M(##Miscellany, 48);
    else                           L__M(##Miscellany, 49);

    #Ifdef TARGET_ZCODE;
    for (i=2 : i<INPUT_BUFFER_LEN : i++) buffer2->i = ' ';
    #Endif; ! TARGET_ZCODE
    answer_words = Keyboard(buffer2, parse2);

    first_word = WordValue(1, parse2);
    #Ifdef LanguageIsVerb;
    if (first_word == 0) {
        j = wn; first_word = LanguageIsVerb(buffer2, parse2, 1); wn = j;
    }
    #Endif; ! LanguageIsVerb

    ! Once again, if the reply looks like a command, give it to the
    ! parser to get on with and forget about the question...

    ! Once again, if the reply looks like a command
    ! (that is, VERB ... or XXX,VERB ...), give it to the parser to get
    ! on with and forget about the question...

    if (first_word) {
        if ((first_word->#dict_par1) & DICT_VERB) {
            CopyBuffer(buffer, buffer2);
            return REPARSE_CODE;
        }
        if (NumberWords(parse2) > 2) {
            j = WordValue(2, parse2);
            k = WordValue(3, parse2);
            if (j == ',//' && k && (k->#dict_par1) & DICT_VERB) {
                CopyBuffer(buffer, buffer2);
                return REPARSE_CODE;
            }
        }
    }

I’m unclear on exactly what you want me to change.

After the question: What do you want to give?, “xxx” must be understood has a verb but is not. Certainly, somewhere a call to UnknownVerb(word) is missing.
I add in parserm.h:

first_word = UnknownVerb(first_word);
k = UnknownVerb(k);[/code][code]    ! Once again, if the reply looks like a command
    ! (that is, VERB ... or XXX,VERB ...), give it to the parser to get
    ! on with and forget about the question...
    
    !+
    first_word = UnknownVerb(first_word);
    
    if (first_word) {
        if ((first_word->#dict_par1) & DICT_VERB) {
            CopyBuffer(buffer, buffer2);
            return REPARSE_CODE;
        }
        if (NumberWords(parse2) > 2) {
            j = WordValue(2, parse2);
            k = WordValue(3, parse2);
	
            !+
            k = UnknownVerb(k);
            
            if (j == ',//' && k && (k->#dict_par1) & DICT_VERB) {
                CopyBuffer(buffer, buffer2);
                return REPARSE_CODE;
            }
        }
    }

I don’t know if it’s the right way to do, but it seems to work:

Include "parser.h"; Include "verblib.h";
Object room "Room" with description "Room test" has light;
Object bob "Bob" room with name 'bob', has animate male proper;
Object apple "apple" room with name 'apple', has edible;

[ xVerbSub; "O.K. xVerbSub";];

[ UnknownVerb word;
	if (word == 'xxx') return 'xverb';
	rfalse;
];

[ Initialise; location = room; ];
Include "grammar.h";

verb 'xverb' * -> xVerb;

Release 1 / Serial number 140810 / Inform v6.33 Library 6/12-beta1 S

Room
Room test

You can see Bob and an apple here.

xxx
O.K. xVerbSub

give
What do you want to give?

xxx
O.K. xVerbSub

give
What do you want to give?

apple
(to Bob)
(first taking the apple)
Bob doesn’t seem interested.

And i don’t know what is the undocumented function: LanguageIsVerb();

    first_word = WordValue(1, parse2);
    #Ifdef LanguageIsVerb;
    if (first_word == 0) {
        j = wn; first_word = LanguageIsVerb(buffer2, parse2, 1); wn = j;
    }
    #Endif; ! LanguageIsVerb

In grammar.h: Verb ‘throw’ is not in the alphabetical order.

I don’t see why looking for an unrecognized verb there is a good idea? Typing a valid verb right after being asked “What do you want to give?” is going to be processed as a noun.

The LanguageIsVerb() business started in 6/5. I don’t know what it’s for.

In grammar.h, ‘throw’ is not in alphabetic order because I cleaved it off of ‘drop’. I’ll reorder the file before the next beta release.

To translate, the function UnknownVerb() is used for each verb the player entry. To translate or not, UnknownVerb() is broken with incomplete sentense, so we can’t use it !?

In english.h, LanguageLM Take: 13, is missing.
Verblibm.h call it: return L__M(##Take, 13, obj, SACK_OBJECT);

!----------------------------------------------------------------
Several sentences on same input is broken.

examine apple. Eat apple
examine apple then eat apple

!----------------------------------------------------------------
In english.h in function UpperCase (c), It’s not: 164 to 166 but: 164 to 165. ÿ (166) has no capital letter Ÿ in: TABLE HIGHER ZSCII CHARACTER SET. See DM4 p520.

!----------------------------------------------------------------
With the print rule (A), there’s a new line betwen the article and the noun.

Include "parser.h"; Include "verblib.h";
Object room "room" with description "Room", has light;
Object apple "apple" room;
[ Initialise;
	location = room;
	print "*** ", (A) apple, " ***^";
];
Include "grammar.h";

*** An apple ***
Release 1 / Serial number 140817 / Inform v6.33 Library 6/12-beta1 S

room
Room

You can see an apple here.

I fixed the print rule (A) and filed tickets for the other bugs. I’m very thankful for your efforts to search out and report these bugs.

Time passes.

Now the four bugs described in the previous post are fixed.

Auraes: Going back to your post about adding some calls to UnknownVerb(), here’s a commit with what you suggested. How does this work for your French adaptation efforts? github.com/DavidGriffith/inform … 957ec5f06b

In French, it is complicated to translate LanguageLM(). The grammar and the conjugation of the verbs are very different.
For example, i cannot use the function CSubjectVerb() such as it is.

!Présent (PRESENT_TENSE)                       | Imparfait (PAST_TENSE)               
!Infinitif | Je (I)    Vous (You)  Il (George) | Je         Vous       Il
!eat:
'manger'     "mange"   "mangez"    "mange"      "mangeais"  "mangiez"  "mangeait"

I can’t do that:

CSubjectVerb(actor,false,false,"mange","mangez","mange","mangeais","mangiez","mangeait");

and adapt the function, because it is not the common sense and i can’t put no more than seven parameters in a function.
I have to make a table of conjugation of the verbs.

CSubjectVerb(actor,false,false,'manger');

!-------------------------------------------------------
Can we have a constant for the colon punctuation mark: Constant COLON ": " in english.h and replace it in verlibm.h (EmptyTSub()) and parserm.h (Object InformLibrary)?
In french, we put a space character before the colon: " : " (and article before the noun…)

>take all
apple: Taken.
ball: Taken.
>
>prendre tout
la pomme : D'accord.
la balle : D'accord.
>

Oops, maybe that a function: L__M(##Miscellany, 61, obj); would be better than a constant.
For english:

61: print (name) x1, ": "; For french (or other):

61: print (the) x1, " : "; !with article and space before colon. [code]In verblibm.h:

  • if (keep_silent == 0) print (name) i, ": ";
  • if (keep_silent == 0) L__M(##Miscellany, 61, i);
    In parserm.h:
  • print (name) l, ": ";
  • L__M(##Miscellany, 61, l);[/code]Not tested.

Doing things with L__M(##Miscellany, 61, obj); seems a bit more heavy than I’d like. How about a compile-time Define of “SPACE_BEFORE_COLON” instead?
There are some other places where a colon is used, all in DEBUG sections.

You’re the boss.

We do not translate the debug section, it is still in English.

!----------------------------------------------------------------
In english.h, LanguageLM: Look:[code]Look: switch (n) {
	5,6:
		[...]
		print (the) x1, " ", (theActor) actor, " can";
	}[/code]For " can", you don't use: Tense(" can", " could")?

!----------------------------------------------------------------

In english.h: LanguageLM CommandsRead:3 “[Command replay failed. Command recording is on.]”;
There are two space characters between: failed. Command

It seems that something is wrong with: keep_silent = true;

Include "parser.h"; Include "verblib.h";

Object room "room" with description "Room" has light;
Object box  "box"  room with name 'box',  has container openable ~open;
Object box1 "box1" room with name 'box1', has container openable ~open;

[ Initialise;
	keep_silent = true;
	location = room;
];
Include "grammar.h";
Release 1 / Serial number 140823 / Inform v6.33 Library 6/12-beta1 S

room
Room

You can see a box (which is closed) and a box1 (which is closed) here.

>open box

>open box1
You open the box1. ! WRONG

>

If an Object has container and open and there is inside an Object with concealed or scenery, maybe he should display: You can see a box (which is open) here." instead of “You can see a box here.”

Include "parser.h"; Include "verblib.h";

Object room "room" with description "Room" has light;

Object -> box "box" with name 'box', has container openable open;
Object -> -> apple1 "apple1"  with name 'apple1', has edible concealed;
Object -> -> apple2 "apple2"  with name 'apple2', has edible scenery;

Object -> box1 "box1" with name 'box1', has container openable ~open;
Object -> box2 "box2" with name 'box2', has container openable open;

Object -> box3 "box3" with name 'box3', has container openable open;
Object -> -> apple  "apple" with name 'apple', has edible;

[ Initialise; location = room; ];
Include "grammar.h";
Release 1 / Serial number 140823 / Inform v6.33 Library 6/12-beta1 S

room
Room

You can see a box, a box1 (which is closed), a box2 (which is empty) and a box3 (in which
is an apple) here.

>open box
The box is already open.

>

In english.h: LanguageLM: Open: 4

Open: switch (n) {
		[...]
		4:  CSubjectVerb(actor,false,false,"open",0,"opens","opened"); print " ", (the) x1;
			Tense(", revealing ", " and revealed ");
			if (WriteListFrom(child(x1), ENGLISH_BIT+TERSE_BIT+CONCEAL_BIT) == 0) "nothing.";
			".";
		5:  CSubjectVerb(actor,false,false,"open",0,"opens","opened"); " ", (the) x1, ".";
    }

How target LanguageLM: Open: 4 to display “nothing.” I try and i can not display the message: “, revealing nothing.”
It seems as if Object container is empty, the message displayed is: L__M(##Open, 5, noun) else L__M(##Open, 4, noun). How WriteListFrom() can be equal to 0 in LanguageLM: Open: 4?
Not sure I’m clear!?