Re: Inform: Pushing buttons.. (and special)


19 Sep 95 18:37:33 GMT

In article <1995Sep18.172434.13369@news.cs.indiana.edu>, "Sam Hulick" <shulick@guava.ucs.indiana.edu> writes:
>
> Actually, I got frustrated with 'push' and made my own verb 'type'.
> Type also didn't work, then I figured out the problem. I had to make my
> TypeSub do a RunRoutines(noun, before). I thought that all routines
> automatically did this, but I guess not. Plain verbs like "blah <noun>"
> do run a 'before' automatically, but when it comes to complex verbs like
> "type <special> on <noun>", then you must make your own call to
> 'before'.
>

The token "special" is showing its age badly: there are better ways to
do this kind of thing now. The problem is really that "before" applies
to the first parameter of the verb, and in the case of "type <special>
on <noun>" this would end up as the address of the word being typed.

Try copying the grammar for "consult" from "grammar.h": you can make
a token which soaks up all the text until the word "on", but doesn't
make a parameter out of it, so that the noun at the end really is the
first parameter.

Sorry it's a complicated answer! As I said above, I think "special"
is best avoided now.

Graham Nelson