Possible for a Third Noun to be a Third Anything instead of a Third Something?

Third noun is very cool, but I find myself really wanting it to act like a third anything, with everything in scope, rather than a third something.

It’s kinda looking like associating [any thing] tokens with scope routines is magic done by the compiler that one can’t reproduce… but I thought I’d ask if anyone knows for sure whether there’s any hope of doing this.

1 Like

This can be done with I6 tweaking.

"Any Third"

Place is a room.

A rock is in Place. A pebble is in Place.

There is a thing called a boulder. [off-stage]

Include (-
Global any_third;
-) after "Definitions.i6t".

Include (-
[ ANY_THIRD_NOUN_TOKEN  x;
	x  =  ParseToken(SCOPE_TT,  AllInScope);
	if  (x  ==  GPR_FAIL  or  GPR_REPARSE)  return  x;
	any_third  =  x;  return  GPR_PREPOSITION;
];

[ AllInScope obj ;
	switch (scope_stage) {
		1:	return false;	! only single objects allowed
		2:	objectloop(obj ofclass (+ thing +)) PlaceInScope(obj); return true;
		3:	return NULL;	! let parser guess error message
	}
];

-).

The any third noun is an object that varies. The any third noun variable translates into I6 as "any_third".

The understand token any third something translates into I6 as "ANY_THIRD_NOUN_TOKEN".

Tripling is an action applying to two things. Understand "triple [something] with [something] using [any third something]" as tripling.

Report tripling:
	say "You triple [the noun] with [the second noun] using [the any third noun]."

Test me with "x boulder / triple rock with pebble using boulder".

It would probably be better to set up some way to control which things are allowed to be in scope instead of allowing every thing at all times.

1 Like