Parser Theory / Foundations

Is it known how much they were involved in/had experience with general compiler design? Someone had to write Zilch from scratch at some point, and they couldn’t just pick up a copy of the green dragon book because it came out the same year as Zork.

2 Likes

One parser extension I’m interested in for TADS adv3Lite (but have not found a use for) is TIAAction, which allows for commands with “Direct Object, Indirect Object and Accessory Object.” The example in the docs:

>PUT COIN IN SLOT WITH TWEEZERS

Implicit actions are supported, which (presumably) means it could do something like this:

>PUT COIN IN SLOT
(with the tweezers)
...

More of a side note than a direct answer to the OP’s question. Also, I don’t know if other parsers have similar support (but I would imagine Inform does, at least).

5 Likes

That’s the neat thing about parsers. A fancier parser just accepts a superset of the basic command language. Many of the commands you’d give to the fanciest parser are the exact same ones you’d give to a two-word parser that only looks at the first few letters of each word. Or even a hacked together command line that checks for a few specific strings.

2 Likes

I appreciate all of your insights and have a bunch of new source to browse and ideas to think about.

Wonderful discussion. Wonderful community!

3 Likes

True.

One thing I do bump my head against with two-word parsers is PUT BLOB IN/ON THINGAMAJIG. I’ve seen this handled in two words as USE BLOB, PUT BLOB, or simply DROP BLOB, none of which are easily visualised as putting something in or on another thing.

3 Likes

What would it do with put coin in the shirt with pockets.

3 Likes

Easy:

>POCKET COIN

(“Verbing weirds language.” Bill Watterson, Calvin & Hobbes)

EDIT: Oops. Sorry jkj yuio. I thought you were replying to my two-word parser comment.)

2 Likes

Yes, but as you say, it doesn’t let you queue up multiple commands. On the other hand, it could address several robots at once: sensa, poet and waldo, go to weather control

And you could then do other stuff while they travelled to their destination. Great game by the way.

2 Likes

I’m very curious what Austin’s speech act theory has to offer for a parser. My understanding is that the revolutionary part of it was erasing the distinction between “expressing a proposition” and “performing an action”, treating them both as the same sort of thing (an utterance consisting of locutionary and illocutionary acts). In traditional parser IF, though, players don’t express simple truths very often: there’s a reason we call it “command” parsing, after all! And even if you consider the parser to be a separate “character”, like in the Jeeves analogy, everything you type is still meant to be a command. What other sorts of illocutionary acts are you trying to capture?

1 Like

>HELLO, SAILOR

3 Likes

YES in Colossal Cave must be the most famous. If also least imitated.

2 Likes

It depends how the world is modeled.

Imagine the game is a one-room puzzle. Let’s say you are at a party, in the kitchen.

Now, what is the command space of such a game? You can OPEN DRAWER and TAKE KNIFE.
Or for extra points TAKE KNIFE OUT OF DRAWER.

But if the game is a social simulation, it’s no good to simply stuff your pockets with knives, forks and spoons. You have to listen to the gossip, and decide how to behave. In such a case, typing each of the following should give you different results:

  • OK?
  • OK.
  • OK!
  • OK OK OK.
3 Likes

This thread reminded me of an article I read about the Apollo guidance computer (which had a simple enough parser that astronauts could use it):

For enthusiasts, here’s the source code:

7 Likes