[Inform 6] Parsing Issues

I’m stuck with parsing text again. Wanted to finally do some decent parsing beyond ASK/TELL ABOUT, but have no clue how. I want to parse

npc, i want to keyword

. My first feeble attempt to detect the “i” failed already:

		grammar [tmp;
				wn=verb_wordnum;
				tmp=NextWord();
				if(tmp=='i') print "Found first word.";

Can anyone spare a hint on how to go through the players’ input to detect a certain keyword that’s not in the dictionary?

Thanks!

You are running into the I6 quirk that a single-quoted string ‘foo’ is interpreted as a dictionary word, unless it is one character long, in which case it is interpreted as a character constant instead. To get a one-letter dict word, you need to include two slashes.

So, “if (tmp==‘i//’) …”

You rule!